Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 1 | Qualcomm Technologies, Inc. Standard Secure Digital Host Controller (SDHC) |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 2 | |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 3 | Secure Digital Host Controller provides standard host interface to SD/MMC/SDIO cards. |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 4 | |
| 5 | Required properties: |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 6 | - compatible : should be "qcom,sdhci-msm" |
Sayali Lokhande | f0ee1ff | 2016-08-25 20:46:01 +0530 | [diff] [blame] | 7 | 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 Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 10 | - 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 Tummala | 079ed85 | 2015-10-29 20:18:45 +0530 | [diff] [blame] | 13 | optional ones are "tlmm_mem" |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 14 | - 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 | |
| 20 | Required alias: |
| 21 | - The slot number is specified via an alias with the following format |
| 22 | 'sdhc{n}' where n is the slot number. |
| 23 | |
| 24 | Optional 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 Yu | f7c9133 | 2014-08-20 16:56:18 +0800 | [diff] [blame] | 32 | - 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 Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 35 | - 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 Shenhar | 7dc5f79 | 2015-05-18 12:12:48 +0300 | [diff] [blame] | 41 | - 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 Broner | c788a67 | 2015-09-08 15:39:11 +0300 | [diff] [blame] | 49 | - 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 Anamula | 5a256df | 2015-10-16 14:38:28 +0530 | [diff] [blame] | 69 | - qcom,core_3_0v_support: an optional property that is used to fake |
| 70 | 3.0V support for SDIO devices. |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 71 | |
| 72 | In 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 83 | |
Venkat Gopalakrishnan | 7f69157 | 2013-06-23 17:36:46 -0700 | [diff] [blame] | 84 | Tlmm pins are specified as <clk cmd data> and starting with eMMC5.0 as |
| 85 | <clk cmd data rclk> |
| 86 | |
Pratibhasagar V | 9acf264 | 2013-11-21 21:07:21 +0530 | [diff] [blame] | 87 | - 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 Gopalakrishnan | 9a62e04 | 2015-03-03 16:14:55 -0800 | [diff] [blame] | 92 | - qcom,large-address-bus - specifies whether the soc is capable of |
| 93 | supporting larger than 32 bit address bus width. |
Maya Erez | 994cf2f | 2014-10-21 20:22:04 +0300 | [diff] [blame] | 94 | |
Dov Levenglick | c9033ab | 2015-03-10 16:00:56 +0200 | [diff] [blame] | 95 | - 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 98 | Example: |
| 99 | |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 100 | aliases { |
| 101 | sdhc1 = &sdhc_1; |
Georgi Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 102 | }; |
| 103 | |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 104 | 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 110 | |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 111 | 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 115 | |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 116 | 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 120 | |
Talel Shenhar | 7dc5f79 | 2015-05-18 12:12:48 +0300 | [diff] [blame] | 121 | qcom,devfreq,freq-table = <52000000 200000000>; |
| 122 | |
Pratibhasagar V | 9acf264 | 2013-11-21 21:07:21 +0530 | [diff] [blame] | 123 | 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 Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 128 | qcom,bus-width = <4>; |
| 129 | qcom,nonremovable; |
Venkat Gopalakrishnan | 9a62e04 | 2015-03-03 16:14:55 -0800 | [diff] [blame] | 130 | qcom,large-address-bus; |
Asutosh Das | 0ef2481 | 2012-12-18 16:14:02 +0530 | [diff] [blame] | 131 | 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 Broner | c788a67 | 2015-09-08 15:39:11 +0300 | [diff] [blame] | 140 | |
| 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 Djakov | d252950 | 2014-03-10 17:37:11 +0200 | [diff] [blame] | 152 | }; |