1 * Rockchip specific extensions to the Synopsys Designware Mobile
2 Storage Host Controller
4 The Synopsys designware mobile storage host controller is used to interface
5 a SoC with storage medium such as eMMC or SD/MMC cards. This file documents
6 differences between the core Synopsys dw mshc controller properties described
7 by synopsys-dw-mshc.txt and the properties used by the Rockchip specific
8 extensions to the Synopsys Designware Mobile Storage Host Controller.
12 * compatible: should be
13 - "rockchip,rk_mmc": for controllers compliant with Rockchip sdmmc.
14 - "rockchip,rk3188-sdmmc": for Rockchip RK3188 and following
15 - "rockchip,rk3288-sdmmc": for Rockchip RK3288 and following
16 * pinctrl-0: Should specify pin control groups used for this controller.
17 * pinctrl-names: The corresponding state of the various definitions ,such as "default","idle".
18 * clocks: Clock IDs array as required by the controller.
19 * clock-names: names of clock correseponding IDs clock property as requested by the controller driver.
22 specifies the number of slots supported by the controller.
23 The number of physical slots actually used could be equal or less than the
24 value specified by num-slots. If this property is not specified, the value
25 of num-slot property is assumed to be 1.
27 * fifo-depth: The maximum size of the tx/rx fifo's. If this property is not
28 specified, the default value of the fifo size is determined from the
31 * bus-width: as documented in mmc core bindings.
33 * wp-gpios: specifies the write protect gpio line. The format of the
34 gpio specifier depends on the gpio controller. If a GPIO is not used
35 for write-protect, this property is optional.
37 * disable-wp: If the wp-gpios property isn't present then (by default)
38 we'd assume that the write protect is hooked up directly to the
39 controller's special purpose write protect line (accessible via
40 the WRTPRT register). However, it's possible that we simply don't
41 want write protect. In that case specify 'disable-wp'.
42 NOTE: This property is not required for slots known to always
43 connect to eMMC or SDIO cards.
46 Stable clk freq for data transfer
49 Host issue slave devices for timing supportted ranges from this clk gap
52 Indicate if this controller support highspeed mode or not
55 Indicate this controller works as emmc
58 Indicate this controller works as sd/mmc card
61 Indicate this controller works as sdio function(card)
64 Indicate this controller will ignore pm notify
66 * keep-power-in-suspend:
67 Indicate this controller should keep power in system suspend
70 For SD/MMC card, detect card insert/remove with controller's register flag
73 For SD/MMC card insert/remove debounce time
76 * caps2-mmc-hs200-1_8v: Supports mmc HS200 SDR 1.8V mode
78 * caps2-mmc-hs200-1_2v: Supports mmc HS200 SDR 1.2V mode
80 * broken-cd: as documented in mmc core bindings.
82 * vmmc-supply: The phandle to the regulator to use for vmmc. If this is
83 specified we'll defer probe until we can find this regulator.
85 * poll-hw-reset: need hardware reset for some eMMCs with VCCQ always supplied when powered up
88 Example: adding device info in dtsi file
90 emmc: rksdmmc@ff0f0000 {
91 compatible = "rockchip,rk_mmc","rockchip,rk32xx-sdmmc";
93 reg = <0xff0f0000 0x4000>;
94 interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;/*irq=67*/
97 //pinctrl-names = "default",,"suspend";
98 //pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_wp &sd0_pwr &sd0_bus1 &sd0_bus4>;
99 clocks = <&clk_emmc>, <&clk_gates8 6>;
100 clock-names = "clk_mmc", "hclk_mmc";
102 fifo-depth = <0x100>;
106 sdmmc: rksdmmc@ff0c0000 {
107 compatible = "rockchip,rk_mmc","rockchip,rk32xx-sdmmc";
108 device_type = "sdmmc";
109 reg = <0xff0c0000 0x4000>;
110 interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; /*irq=64*/
111 #address-cells = <1>;
113 pinctrl-names = "default","idle";
114 pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_dectn &sdmmc0_bus4>;
115 pinctrl-1 = <&sdmmc0_gpio>;
116 clocks = <&clk_sdmmc>, <&clk_gates8 3>;
117 clock-names = "clk_mmc", "hclk_mmc";
119 fifo-depth = <0x100>;
124 sdio: rksdmmc@ff0d0000 {
125 compatible = "rockchip,rk_mmc","rockchip,rk32xx-sdmmc";
126 device_type = "sdio";
127 reg = <0xff0d0000 0x4000>;
128 interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
129 #address-cells = <1>;
131 pinctrl-names = "default","idle";
132 pinctrl-0 = <&sdio0_clk &sdio0_cmd &sdio0_dectn &sdio0_wrprt &sdio0_pwr &sdio0_bkpwr
133 &sdio0_intn &sdio0_bus4>;
134 pinctrl-1 = <&sdio0_gpio>;
135 clocks = <&clk_sdio0>, <&clk_gates8 4>;
136 clock-names = "clk_mmc", "hclk_mmc";
138 fifo-depth = <0x100>;
142 sdio1: rksdmmc@ff0e0000 {
143 compatible = "rockchip,rk_mmc","rockchip,rk32xx-sdmmc";
144 device_type = "sdio";
145 reg = <0xff0e0000 0x4000>;
146 interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
147 #address-cells = <1>;
149 //pinctrl-names = "default","suspend";
150 //pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_wp &sd1_bus1 &sd1_bus4>;
151 /*gate8_0 --hclk_sdmmc_ahb_arbi_gate_en, gate13_2 --clk_sdio1_src_gate_en*/
152 clocks = <&clk_sdio1>, <&clk_gates8 5>;
153 clock-names = "clk_mmc", "hclk_mmc";
155 fifo-depth = <0x100>;
162 Example: Adding child nodes in dts file
165 clock-frequency = <200000000>;
166 clock-freq-min-max = <400000 200000000>;
171 keep-power-in-suspend;
176 clock-frequency = <50000000>;
177 lock-freq-min-max = <400000 50000000>;
181 card-detect-delay = <200>;
182 vmmc-supply = <&rk808_ldo5_reg>;
187 clock-frequency = <50000000>;
188 clock-freq-min-max = <200000 50000000>;
192 keep-power-in-suspend;