blob: 87281f76be8f131a215a89f40c934418287ab2b2 [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 Das33a4ff52012-12-18 16:14:02 +053058
59In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
60 - qcom,<supply>-always-on - specifies whether supply should be kept "on" always.
61 - qcom,<supply>-lpm_sup - specifies whether supply can be kept in low power mode (lpm).
62 - qcom,<supply>-voltage_level - specifies voltage levels for supply. Should be
63 specified in pairs (min, max), units uV.
64 - qcom,<supply>-current_level - specifies load levels for supply in lpm or
65 high power mode (hpm). Should be specified in
66 pairs (lpm, hpm), units uA.
67
68 - gpios - specifies gpios assigned for sdhc slot.
69 - qcom,gpio-names - a list of strings that map in order to the list of gpios
70
Asutosh Das390519d2012-12-21 12:21:42 +053071 A slot has either gpios or dedicated tlmm pins as represented below.
72 - qcom,pad-pull-on - Active pull configuration for sdc tlmm pins
73 - qcom,pad-pull-off - Suspend pull configuration for sdc tlmm pins.
74 - qcom,pad-drv-on - Active drive strength configuration for sdc tlmm pins.
75 - qcom,pad-drv-off - Suspend drive strength configuration for sdc tlmm pins.
76 Tlmm pins are specified as <clk cmd data>
77
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +053078 - qcom,bus-bw-vectors-bps: specifies array of throughput values in
79 Bytes/sec. The values in the array are determined according to
80 supported bus speed modes. For example, if host supports SDR12 mode,
81 value is 13631488 Bytes/sec.
82 - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
83 below optional properties:
84 - qcom,msm-bus,name
85 - qcom,msm-bus,num-cases
86 - qcom,msm-bus,active-only
87 - qcom,msm-bus,num-paths
88 - qcom,msm-bus,vectors-KBps
89
Asutosh Das33a4ff52012-12-18 16:14:02 +053090Example:
91
92 aliases {
93 sdhc1 = &sdhc_1;
Asutosh Das390519d2012-12-21 12:21:42 +053094 sdhc2 = &sdhc_2;
Asutosh Das33a4ff52012-12-18 16:14:02 +053095 };
96
97 sdhc_1: qcom,sdhc@f9824900 {
98 compatible = "qcom,sdhci-msm";
99 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
100 reg-names = "hc_mem", "core_mem";
101 interrupts = <0 123 0>, <0 138 0>;
102 interrupt-names = "hc_irq", "pwr_irq";
103
104 vdd-supply = <&pm8941_l21>;
105 vdd-io-supply = <&pm8941_l13>;
106 qcom,vdd-voltage-level = <2950000 2950000>;
107 qcom,vdd-current-level = <9000 800000>;
108
109 qcom,vdd-io-always-on;
110 qcom,vdd-io-lpm-sup;
111 qcom,vdd-io-voltage-level = <1800000 2950000>;
112 qcom,vdd-io-current-level = <6 22000>;
113
114 qcom,bus-width = <4>;
115 qcom,nonremovable;
116 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
Sahitya Tummala00240122013-02-28 19:50:51 +0530117 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das33a4ff52012-12-18 16:14:02 +0530118
119 gpios = <&msmgpio 40 0>, /* CLK */
120 <&msmgpio 39 0>, /* CMD */
121 <&msmgpio 38 0>, /* DATA0 */
122 <&msmgpio 37 0>, /* DATA1 */
123 <&msmgpio 36 0>, /* DATA2 */
124 <&msmgpio 35 0>; /* DATA3 */
125 qcom,gpio-names = "CLK", "CMD", "DAT0", "DAT1", "DAT2", "DAT3";
126 };
Asutosh Das390519d2012-12-21 12:21:42 +0530127
128 sdhc_2: qcom,sdhc@f98a4900 {
129 compatible = "qcom,sdhci-msm";
130 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
131 reg-names = "hc_mem", "core_mem";
Sahitya Tummala62448d92013-03-12 14:57:46 +0530132
133 #address-cells = <0>;
134 interrupt-parent = <&sdhc_2>;
135 interrupts = <0 1 2>;
136 #interrupt-cells = <1>;
137 interrupt-map-mask = <0xffffffff>;
138 interrupt-map = <0 &intc 0 125 0
139 1 &intc 0 221 0
140 2 &msmgpio 62 0x3>;
141 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
142 cd-gpios = <&msmgpio 62 0x1>;
Asutosh Das390519d2012-12-21 12:21:42 +0530143
144 vdd-supply = <&pm8941_l21>;
145 vdd-io-supply = <&pm8941_l13>;
146
147 qcom,bus-width = <4>;
Sahitya Tummala00240122013-02-28 19:50:51 +0530148 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das390519d2012-12-21 12:21:42 +0530149
150 qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
151 qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
152 qcom,pad-drv-on = <0x7 0x4 0x4>; /* 16mA, 10mA, 10mA */
153 qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */
Sahitya Tummalab4e84042013-03-10 07:03:17 +0530154
155 qcom,cpu-dma-latency-us = <200>;
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +0530156 qcom,msm-bus,name = "sdhc2";
157 qcom,msm-bus,num-cases = <7>;
158 qcom,msm-bus,active-only = <0>;
159 qcom,msm-bus,num-paths = <1>;
160 qcom,msm-bus,vectors-KBps = <81 512 0 0>, /* No vote */
161 <81 512 6656 13312>, /* 13 MB/s*/
162 <81 512 13312 26624>, /* 26 MB/s */
163 <81 512 26624 53248>, /* 52 MB/s */
164 <81 512 53248 106496>, /* 104 MB/s */
165 <81 512 106496 212992>, /* 208 MB/s */
166 <81 512 2147483647 4294967295>; /* Max. bandwidth */
167 qcom,bus-bw-vectors-bps = <0 13631488 27262976 54525952 109051904 218103808 4294967295>;
Asutosh Das390519d2012-12-21 12:21:42 +0530168 };