blob: d502f789d4ee0de24676c1a3eb8617ab8a7f2f48 [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.
Venkat Gopalakrishnan2d397062013-06-23 17:36:46 -070076 Tlmm pins are specified as <clk cmd data> and starting with eMMC5.0 as
77 <clk cmd data rclk>
Asutosh Das390519d2012-12-21 12:21:42 +053078
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +053079 - qcom,bus-bw-vectors-bps: specifies array of throughput values in
80 Bytes/sec. The values in the array are determined according to
81 supported bus speed modes. For example, if host supports SDR12 mode,
82 value is 13631488 Bytes/sec.
83 - Refer to "Documentation/devicetree/bindings/arm/msm/msm_bus.txt" for
84 below optional properties:
85 - qcom,msm-bus,name
86 - qcom,msm-bus,num-cases
87 - qcom,msm-bus,active-only
88 - qcom,msm-bus,num-paths
89 - qcom,msm-bus,vectors-KBps
90
Asutosh Das33a4ff52012-12-18 16:14:02 +053091Example:
92
93 aliases {
94 sdhc1 = &sdhc_1;
Asutosh Das390519d2012-12-21 12:21:42 +053095 sdhc2 = &sdhc_2;
Asutosh Das33a4ff52012-12-18 16:14:02 +053096 };
97
98 sdhc_1: qcom,sdhc@f9824900 {
99 compatible = "qcom,sdhci-msm";
100 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
101 reg-names = "hc_mem", "core_mem";
102 interrupts = <0 123 0>, <0 138 0>;
103 interrupt-names = "hc_irq", "pwr_irq";
104
105 vdd-supply = <&pm8941_l21>;
106 vdd-io-supply = <&pm8941_l13>;
107 qcom,vdd-voltage-level = <2950000 2950000>;
108 qcom,vdd-current-level = <9000 800000>;
109
110 qcom,vdd-io-always-on;
111 qcom,vdd-io-lpm-sup;
112 qcom,vdd-io-voltage-level = <1800000 2950000>;
113 qcom,vdd-io-current-level = <6 22000>;
114
115 qcom,bus-width = <4>;
116 qcom,nonremovable;
117 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
Sahitya Tummala00240122013-02-28 19:50:51 +0530118 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das33a4ff52012-12-18 16:14:02 +0530119
120 gpios = <&msmgpio 40 0>, /* CLK */
121 <&msmgpio 39 0>, /* CMD */
122 <&msmgpio 38 0>, /* DATA0 */
123 <&msmgpio 37 0>, /* DATA1 */
124 <&msmgpio 36 0>, /* DATA2 */
125 <&msmgpio 35 0>; /* DATA3 */
126 qcom,gpio-names = "CLK", "CMD", "DAT0", "DAT1", "DAT2", "DAT3";
127 };
Asutosh Das390519d2012-12-21 12:21:42 +0530128
129 sdhc_2: qcom,sdhc@f98a4900 {
130 compatible = "qcom,sdhci-msm";
131 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
132 reg-names = "hc_mem", "core_mem";
Sahitya Tummala62448d92013-03-12 14:57:46 +0530133
134 #address-cells = <0>;
135 interrupt-parent = <&sdhc_2>;
136 interrupts = <0 1 2>;
137 #interrupt-cells = <1>;
138 interrupt-map-mask = <0xffffffff>;
139 interrupt-map = <0 &intc 0 125 0
140 1 &intc 0 221 0
141 2 &msmgpio 62 0x3>;
142 interrupt-names = "hc_irq", "pwr_irq", "status_irq";
143 cd-gpios = <&msmgpio 62 0x1>;
Asutosh Das390519d2012-12-21 12:21:42 +0530144
145 vdd-supply = <&pm8941_l21>;
146 vdd-io-supply = <&pm8941_l13>;
147
148 qcom,bus-width = <4>;
Sahitya Tummala00240122013-02-28 19:50:51 +0530149 qcom,clk-rates = <400000 20000000 25000000 50000000 100000000 200000000>;
Asutosh Das390519d2012-12-21 12:21:42 +0530150
151 qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
152 qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
153 qcom,pad-drv-on = <0x7 0x4 0x4>; /* 16mA, 10mA, 10mA */
154 qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */
Sahitya Tummalab4e84042013-03-10 07:03:17 +0530155
156 qcom,cpu-dma-latency-us = <200>;
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +0530157 qcom,msm-bus,name = "sdhc2";
158 qcom,msm-bus,num-cases = <7>;
Sahitya Tummala9f5cbb82013-03-10 14:12:52 +0530159 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 };