blob: 8c41926fe4516ebd2982c4c99949a70c5063eea4 [file] [log] [blame]
Asutosh Das33a4ff52012-12-18 16:14:02 +05301Qualcomm Standard Secure Digital Host Controller (SDHC)
2
3Secure Digital Host Controller provides standard host interface to SD/MMC/SDIO cards.
4
5Required properties:
6 - compatible : should be "qcom,sdhci-msm"
7 - reg : should contain SDHC, SD Core register map.
8 - reg-names : indicates various resources passed to driver (via reg proptery) by name.
9 Required "reg-names" are "hc_mem" and "core_mem"
10 - interrupts : should contain SDHC interrupts.
11 - interrupt-names : indicates interrupts passed to driver (via interrupts property) by name.
12 Required "interrupt-names" are "hc_irq" and "pwr_irq".
13 - <supply-name>-supply: phandle to the regulator device tree node
14 Required "supply-name" are "vdd" and "vdd-io".
Sahitya Tummala00240122013-02-28 19:50:51 +053015 - qcom,clk-rates: this is an array that specifies supported SDHC clock
16 frequencies for a slot, Units - Hz.
Asutosh Das33a4ff52012-12-18 16:14:02 +053017
18Required alias:
19- The slot number is specified via an alias with the following format
20 'sdhc{n}' where n is the slot number.
21
22Optional Properties:
23 - interrupt-names - "status_irq". This status_irq will be used for card
24 detection.
Sahitya Tummala62448d92013-03-12 14:57:46 +053025 - cd-gpios: specify GPIO for card detection. If this property is
26 defined, then it means SDHC device has more than one interrupt
27 parent and hence, it is required to define the following properties
28 to configure interrupts from multiple parents -
29
30 interrupt-parent - This must provide reference to the current
31 device node.
32 #address-cells - Should provide a value of 0.
33 interrupts - Should be <0 1 2> and it is an index to the
34 interrupt-map.
35 #interrupt-cells - should provide a value of 1.
36 #interrupt-mask - should provide a value of 0xffffffff.
37 interrupt-map - Must create mapping for the number of interrupts
38 that are defined in above interrupts property.
39 For SDHC device node, it must define 3 mappings for
40 hc_irq, pwr_irq and status_irq in the format
41 mentioned in below example node of sdhc_2.
42
Asutosh Das33a4ff52012-12-18 16:14:02 +053043 - qcom,bus-width - defines the bus I/O width that controller supports.
44 Units - number of bits. The valid bus-width values are
45 1, 4 and 8.
46 - qcom,nonremovable - specifies whether the card in slot is
47 hot pluggable or hard wired.
48 - qcom,bus-speed-mode - specifies supported bus speed modes by host.
49 The supported bus speed modes are :
50 "HS200_1p8v" - indicates that host can support HS200 at 1.8v.
51 "HS200_1p2v" - indicates that host can support HS200 at 1.2v.
52 "DDR_1p8v" - indicates that host can support DDR mode at 1.8v.
53 "DDR_1p2v" - indicates that host can support DDR mode at 1.2v.
Sahitya Tummalab4e84042013-03-10 07:03:17 +053054 - qcom,cpu-dma-latency-us: specifies acceptable DMA latency in microseconds. There is
55 no default value that the driver assumes if this property
56 is not specified. So if this property is not specified,
57 then SDHC driver will not vote for PM QOS.
Asutosh Das1369f7b2013-06-03 18:56:52 +053058 - qcom,dat1-mpm-int: specifies MPM interrupt number (e.g. sdhc_2 node below)
59 corresponding to DAT1 line of SDHC (used only if slot has dedicated
60 DAT1 MSM pin (not GPIO))
Asutosh Das33a4ff52012-12-18 16:14:02 +053061
62In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
63 - qcom,<supply>-always-on - specifies whether supply should be kept "on" always.
64 - qcom,<supply>-lpm_sup - specifies whether supply can be kept in low power mode (lpm).
65 - qcom,<supply>-voltage_level - specifies voltage levels for supply. Should be
66 specified in pairs (min, max), units uV.
67 - qcom,<supply>-current_level - specifies load levels for supply in lpm or
68 high power mode (hpm). Should be specified in
69 pairs (lpm, hpm), units uA.
70
71 - gpios - specifies gpios assigned for sdhc slot.
72 - qcom,gpio-names - a list of strings that map in order to the list of gpios
73
Asutosh Das390519d2012-12-21 12:21:42 +053074 A slot has either gpios or dedicated tlmm pins as represented below.
75 - qcom,pad-pull-on - Active pull configuration for sdc tlmm pins
76 - qcom,pad-pull-off - Suspend pull configuration for sdc tlmm pins.
77 - qcom,pad-drv-on - Active drive strength configuration for sdc tlmm pins.
78 - qcom,pad-drv-off - Suspend drive strength configuration for sdc tlmm pins.
Venkat Gopalakrishnan2d397062013-06-23 17:36:46 -070079 Tlmm pins are specified as <clk cmd data> and starting with eMMC5.0 as
80 <clk cmd data rclk>
Asutosh Das390519d2012-12-21 12:21:42 +053081
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +053082 - qcom,bus-bw-vectors-bps: specifies array of throughput values in
83 Bytes/sec. The values in the array are determined according to
84 supported bus speed modes. For example, if host supports SDR12 mode,
85 value is 13631488 Bytes/sec.
86 - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
87 below optional properties:
88 - qcom,msm-bus,name
89 - qcom,msm-bus,num-cases
90 - qcom,msm-bus,active-only
91 - qcom,msm-bus,num-paths
92 - qcom,msm-bus,vectors-KBps
93
Asutosh Das33a4ff52012-12-18 16:14:02 +053094Example:
95
96 aliases {
97 sdhc1 = &sdhc_1;
Asutosh Das390519d2012-12-21 12:21:42 +053098 sdhc2 = &sdhc_2;
Asutosh Das33a4ff52012-12-18 16:14:02 +053099 };
100
101 sdhc_1: qcom,sdhc@f9824900 {
102 compatible = "qcom,sdhci-msm";
103 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
104 reg-names = "hc_mem", "core_mem";
105 interrupts = <0 123 0>, <0 138 0>;
106 interrupt-names = "hc_irq", "pwr_irq";
107
108 vdd-supply = <&pm8941_l21>;
109 vdd-io-supply = <&pm8941_l13>;
110 qcom,vdd-voltage-level = <2950000 2950000>;
111 qcom,vdd-current-level = <9000 800000>;
112
113 qcom,vdd-io-always-on;
114 qcom,vdd-io-lpm-sup;
115 qcom,vdd-io-voltage-level = <1800000 2950000>;
116 qcom,vdd-io-current-level = <6 22000>;
117
118 qcom,bus-width = <4>;
119 qcom,nonremovable;
120 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
Sahitya Tummala00240122013-02-28 19:50:51 +0530121 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das33a4ff52012-12-18 16:14:02 +0530122
123 gpios = <&msmgpio 40 0>, /* CLK */
124 <&msmgpio 39 0>, /* CMD */
125 <&msmgpio 38 0>, /* DATA0 */
126 <&msmgpio 37 0>, /* DATA1 */
127 <&msmgpio 36 0>, /* DATA2 */
128 <&msmgpio 35 0>; /* DATA3 */
129 qcom,gpio-names = "CLK", "CMD", "DAT0", "DAT1", "DAT2", "DAT3";
130 };
Asutosh Das390519d2012-12-21 12:21:42 +0530131
132 sdhc_2: qcom,sdhc@f98a4900 {
133 compatible = "qcom,sdhci-msm";
134 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
135 reg-names = "hc_mem", "core_mem";
Sahitya Tummala62448d92013-03-12 14:57:46 +0530136
137 #address-cells = <0>;
138 interrupt-parent = <&sdhc_2>;
139 interrupts = <0 1 2>;
140 #interrupt-cells = <1>;
141 interrupt-map-mask = <0xffffffff>;
142 interrupt-map = <0 &intc 0 125 0
143 1 &intc 0 221 0
144 2 &msmgpio 62 0x3>;
145 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
146 cd-gpios = <&msmgpio 62 0x1>;
Asutosh Das390519d2012-12-21 12:21:42 +0530147
148 vdd-supply = <&pm8941_l21>;
149 vdd-io-supply = <&pm8941_l13>;
150
151 qcom,bus-width = <4>;
Sahitya Tummala00240122013-02-28 19:50:51 +0530152 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das390519d2012-12-21 12:21:42 +0530153
154 qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
155 qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
156 qcom,pad-drv-on = <0x7 0x4 0x4>; /* 16mA, 10mA, 10mA */
157 qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */
Sahitya Tummalab4e84042013-03-10 07:03:17 +0530158
159 qcom,cpu-dma-latency-us = <200>;
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +0530160 qcom,msm-bus,name = "sdhc2";
161 qcom,msm-bus,num-cases = <7>;
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +0530162 qcom,msm-bus,num-paths = <1>;
163 qcom,msm-bus,vectors-KBps = <81 512 0 0>, /* No vote */
164 <81 512 6656 13312>, /* 13 MB/s*/
165 <81 512 13312 26624>, /* 26 MB/s */
166 <81 512 26624 53248>, /* 52 MB/s */
167 <81 512 53248 106496>, /* 104 MB/s */
168 <81 512 106496 212992>, /* 208 MB/s */
169 <81 512 2147483647 4294967295>; /* Max. bandwidth */
170 qcom,bus-bw-vectors-bps = <0 13631488 27262976 54525952 109051904 218103808 4294967295>;
Asutosh Das1369f7b2013-06-03 18:56:52 +0530171 qcom,dat1-mpm-int = <44>;
Asutosh Das390519d2012-12-21 12:21:42 +0530172 };