blob: fd7e140f68c8aebe2b2ea7b2e71ca684e301216b [file] [log] [blame]
Asutosh Das0ef24812012-12-18 16:14:02 +05301Qualcomm Technologies, Inc. Standard Secure Digital Host Controller (SDHC)
Georgi Djakovd2529502014-03-10 17:37:11 +02002
Asutosh Das0ef24812012-12-18 16:14:02 +05303Secure Digital Host Controller provides standard host interface to SD/MMC/SDIO cards.
Georgi Djakovd2529502014-03-10 17:37:11 +02004
5Required properties:
Asutosh Das0ef24812012-12-18 16:14:02 +05306 - compatible : should be "qcom,sdhci-msm"
Sayali Lokhandef0ee1ff2016-08-25 20:46:01 +05307 For SDCC version 5.0.0, MCI registers are removed from SDCC interface
8 and some registers are moved to HC. New compatible string is added to
9 support this change - "qcom,sdhci-msm-v5".
Asutosh Das0ef24812012-12-18 16:14:02 +053010 - reg : should contain SDHC, SD Core register map.
11 - reg-names : indicates various resources passed to driver (via reg proptery) by name.
12 Required "reg-names" are "hc_mem" and "core_mem"
Sahitya Tummala079ed852015-10-29 20:18:45 +053013 optional ones are "tlmm_mem"
Asutosh Das0ef24812012-12-18 16:14:02 +053014 - interrupts : should contain SDHC interrupts.
15 - interrupt-names : indicates interrupts passed to driver (via interrupts property) by name.
16 Required "interrupt-names" are "hc_irq" and "pwr_irq".
17 - <supply-name>-supply: phandle to the regulator device tree node
18 Required "supply-name" are "vdd" and "vdd-io".
19
20Required alias:
21- The slot number is specified via an alias with the following format
22 'sdhc{n}' where n is the slot number.
23
24Optional Properties:
25 - interrupt-names - "status_irq". This status_irq will be used for card
26 detection.
27 - qcom,bus-width - defines the bus I/O width that controller supports.
28 Units - number of bits. The valid bus-width values are
29 1, 4 and 8.
30 - qcom,nonremovable - specifies whether the card in slot is
31 hot pluggable or hard wired.
Guoping Yuf7c91332014-08-20 16:56:18 +080032 - qcom,nonhotplug - specifies the card in slot is not hot pluggable.
33 if card lost or removed manually at runtime, don't retry
34 to redetect it until next reboot probe.
Asutosh Das0ef24812012-12-18 16:14:02 +053035 - qcom,bus-speed-mode - specifies supported bus speed modes by host.
36 The supported bus speed modes are :
37 "HS200_1p8v" - indicates that host can support HS200 at 1.8v.
38 "HS200_1p2v" - indicates that host can support HS200 at 1.2v.
39 "DDR_1p8v" - indicates that host can support DDR mode at 1.8v.
40 "DDR_1p2v" - indicates that host can support DDR mode at 1.2v.
Talel Shenhar7dc5f792015-05-18 12:12:48 +030041 - qcom,devfreq,freq-table - specifies supported frequencies for clock scaling.
42 Clock scaling logic shall toggle between these frequencies based
43 on card load. In case the defined frequencies are over or below
44 the supported card frequencies, they will be overridden
45 during card init. In case this entry is not supplied,
46 the driver will construct one based on the card
47 supported max and min frequencies.
48 The frequencies must be ordered from lowest to highest.
Gilad Bronerc788a672015-09-08 15:39:11 +030049 - qcom,pm-qos-irq-type - the PM QoS request type to be used for IRQ voting.
50 Can be either "affine_cores" or "affine_irq". If not specified, will default
51 to "affine_cores". Use "affine_irq" setting in case an IRQ balancer is active,
52 and IRQ affinity changes during runtime.
53 - qcom,pm-qos-irq-cpu - specifies the CPU for which IRQ voting shall be done.
54 If "affine_cores" was specified for property 'qcom,pm-qos-irq-type'
55 then this property must be defined, and is not relevant otherwise.
56 - qcom,pm-qos-irq-latency - a tuple defining two latency values with which
57 PM QoS IRQ voting shall be done. The first value is the latecy to be used
58 when load is high (performance mode) and the second is for low loads
59 (power saving mode).
60 - qcom,pm-qos-cpu-groups - defines cpu groups mapping.
61 Each cell represnets a group, which is a cpu bitmask defining which cpus belong
62 to that group.
63 - qcom,pm-qos-<mode>-latency-us - where <mode> is either "cmdq" or "legacy".
64 An array of latency value tuples, each tuple corresponding to a cpu group in the order
65 defined in property 'qcom,pm-qos-cpu-groups'. The first value is the latecy to be used
66 when load is high (performance mode) and the second is for low loads
67 (power saving mode). These values will be used for cpu group voting for
68 command-queueing mode or legacy respectively.
Pavan Anamula5a256df2015-10-16 14:38:28 +053069 - qcom,core_3_0v_support: an optional property that is used to fake
70 3.0V support for SDIO devices.
Asutosh Das0ef24812012-12-18 16:14:02 +053071
72In the following, <supply> can be vdd (flash core voltage) or vdd-io (I/O voltage).
73 - qcom,<supply>-always-on - specifies whether supply should be kept "on" always.
74 - qcom,<supply>-lpm_sup - specifies whether supply can be kept in low power mode (lpm).
75 - qcom,<supply>-voltage_level - specifies voltage levels for supply. Should be
76 specified in pairs (min, max), units uV.
77 - qcom,<supply>-current_level - specifies load levels for supply in lpm or
78 high power mode (hpm). Should be specified in
79 pairs (lpm, hpm), units uA.
80
81 - gpios - specifies gpios assigned for sdhc slot.
82 - qcom,gpio-names - a list of strings that map in order to the list of gpios
Georgi Djakovd2529502014-03-10 17:37:11 +020083
Venkat Gopalakrishnan7f691572013-06-23 17:36:46 -070084 Tlmm pins are specified as <clk cmd data> and starting with eMMC5.0 as
85 <clk cmd data rclk>
86
Pratibhasagar V9acf2642013-11-21 21:07:21 +053087 - Refer to "Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt"
88 for following optional properties:
89 - pinctrl-names
90 - pinctrl-0, pinctrl-1,.. pinctrl-n
91
Venkat Gopalakrishnan9a62e042015-03-03 16:14:55 -080092 - qcom,large-address-bus - specifies whether the soc is capable of
93 supporting larger than 32 bit address bus width.
Maya Erez994cf2f2014-10-21 20:22:04 +030094
Dov Levenglickc9033ab2015-03-10 16:00:56 +020095 - qcom,wakeup-on-idle: if configured, the mmcqd thread will call
96 set_wake_up_idle(), thereby voting for it to be called on idle CPUs.
97
Georgi Djakovd2529502014-03-10 17:37:11 +020098Example:
99
Asutosh Das0ef24812012-12-18 16:14:02 +0530100 aliases {
101 sdhc1 = &sdhc_1;
Georgi Djakovd2529502014-03-10 17:37:11 +0200102 };
103
Asutosh Das0ef24812012-12-18 16:14:02 +0530104 sdhc_1: qcom,sdhc@f9824900 {
105 compatible = "qcom,sdhci-msm";
106 reg = <0xf9824900 0x11c>, <0xf9824000 0x800>;
107 reg-names = "hc_mem", "core_mem";
108 interrupts = <0 123 0>, <0 138 0>;
109 interrupt-names = "hc_irq", "pwr_irq";
Georgi Djakovd2529502014-03-10 17:37:11 +0200110
Asutosh Das0ef24812012-12-18 16:14:02 +0530111 vdd-supply = <&pm8941_l21>;
112 vdd-io-supply = <&pm8941_l13>;
113 qcom,vdd-voltage-level = <2950000 2950000>;
114 qcom,vdd-current-level = <9000 800000>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200115
Asutosh Das0ef24812012-12-18 16:14:02 +0530116 qcom,vdd-io-always-on;
117 qcom,vdd-io-lpm-sup;
118 qcom,vdd-io-voltage-level = <1800000 2950000>;
119 qcom,vdd-io-current-level = <6 22000>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200120
Talel Shenhar7dc5f792015-05-18 12:12:48 +0300121 qcom,devfreq,freq-table = <52000000 200000000>;
122
Pratibhasagar V9acf2642013-11-21 21:07:21 +0530123 pinctrl-names = "active", "sleep";
124 pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
125 pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_on &sdc1_data_on>;
126
127
Asutosh Das0ef24812012-12-18 16:14:02 +0530128 qcom,bus-width = <4>;
129 qcom,nonremovable;
Venkat Gopalakrishnan9a62e042015-03-03 16:14:55 -0800130 qcom,large-address-bus;
Asutosh Das0ef24812012-12-18 16:14:02 +0530131 qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
132
133 gpios = <&msmgpio 40 0>, /* CLK */
134 <&msmgpio 39 0>, /* CMD */
135 <&msmgpio 38 0>, /* DATA0 */
136 <&msmgpio 37 0>, /* DATA1 */
137 <&msmgpio 36 0>, /* DATA2 */
138 <&msmgpio 35 0>; /* DATA3 */
139 qcom,gpio-names = "CLK", "CMD", "DAT0", "DAT1", "DAT2", "DAT3";
Gilad Bronerc788a672015-09-08 15:39:11 +0300140
141 qcom,pm-qos-irq-type = "affine_cores";
142 qcom,pm-qos-irq-cpu = <0>;
143 qcom,pm-qos-irq-latency = <500 100>;
144 qcom,pm-qos-cpu-groups = <0x03 0x0c>;
145 qcom,pm-qos-cmdq-latency-us = <50 100>, <50 100>;
146 qcom,pm-qos-legacy-latency-us = <50 100>, <50 100>;
147 };
148
149 sdhc_2: qcom,sdhc@f98a4900 {
150 qcom,pm-qos-irq-type = "affine_irq";
151 qcom,pm-qos-irq-latency = <120 200>;
Georgi Djakovd2529502014-03-10 17:37:11 +0200152 };