1 # SPDX-License-Identifier: GPL-2.0
4 $id: http://devicetree.org/schemas/mmc/mtk-sd.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: MTK MSDC Storage Host Controller Binding
10 - Chaotian Jing <chaotian.jing@mediatek.com>
11 - Wenbin Mei <wenbin.mei@mediatek.com>
14 - $ref: mmc-controller.yaml#
31 - const: mediatek,mt7623-mmc
32 - const: mediatek,mt2701-mmc
39 - const: mediatek,mt8183-mmc
44 - description: base register (required).
45 - description: top base register (required for MT8183).
49 Should contain phandle for the clock feeding the MMC controller.
52 - description: source clock (required).
53 - description: HCLK which used for host (required).
54 - description: independent source clock gate (required for MT2712).
55 - description: bus clock used for internal register access (required for MT2712 MSDC0/3).
56 - description: msdc subsys clock gate (required for MT8192).
57 - description: peripheral bus clock gate (required for MT8192).
58 - description: AXI bus clock gate (required for MT8192).
59 - description: AHB bus clock gate (required for MT8192).
75 Should at least contain MSDC GIC interrupt. To support SDIO in-band wakeup, an extended
76 interrupt is required and be configured as wakeup source irq.
87 Should at least contain default and state_uhs. To support SDIO in-band wakeup, dat1 pin
88 will be switched between GPIO mode and SDIO DAT1 mode, state_eint is mandatory in this
98 should contain default/high speed pin ctrl.
103 should contain uhs mode pin ctrl.
108 should switch dat1 pin to GPIO mode.
113 PLL of the source clock.
116 assigned-clock-parents:
118 parent of source clock, used for HS400 mode to get 400Mhz source clock.
122 $ref: /schemas/types.yaml#/definitions/uint32
124 HS400 DS delay setting.
128 mediatek,hs200-cmd-int-delay:
129 $ref: /schemas/types.yaml#/definitions/uint32
131 HS200 command internal delay setting.
132 This field has total 32 stages.
133 The value is an integer from 0 to 31.
137 mediatek,hs400-cmd-int-delay:
138 $ref: /schemas/types.yaml#/definitions/uint32
140 HS400 command internal delay setting.
141 This field has total 32 stages.
142 The value is an integer from 0 to 31.
146 mediatek,hs400-cmd-resp-sel-rising:
147 $ref: /schemas/types.yaml#/definitions/flag
149 HS400 command response sample selection.
150 If present, HS400 command responses are sampled on rising edges.
151 If not present, HS400 command responses are sampled on falling edges.
153 mediatek,hs400-ds-dly3:
154 $ref: /schemas/types.yaml#/definitions/uint32
156 Gear of the third delay line for DS for input data latch in data
157 pad macro, there are 32 stages from 0 to 31.
158 For different corner IC, the time is different about one step, it is
160 The value is confirmed by doing scan and calibration to find a best
161 value with corner IC and it is valid only for HS400 mode.
166 $ref: /schemas/types.yaml#/definitions/uint32
168 Some SoCs do not support enhance_rx, need set correct latch-ck to avoid
169 data crc error caused by stop clock(fifo full) Valid range = [0:0x7].
170 if not present, default value is 0.
171 applied to compatible "mediatek,mt2701-mmc".
197 const: mediatek,mt8183-mmc
203 unevaluatedProperties: false
207 #include <dt-bindings/interrupt-controller/irq.h>
208 #include <dt-bindings/interrupt-controller/arm-gic.h>
209 #include <dt-bindings/clock/mt8173-clk.h>
211 compatible = "mediatek,mt8173-mmc";
212 reg = <0x11230000 0x1000>;
213 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
214 vmmc-supply = <&mt6397_vemc_3v3_reg>;
215 vqmmc-supply = <&mt6397_vio18_reg>;
216 clocks = <&pericfg CLK_PERI_MSDC30_0>,
217 <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
218 clock-names = "source", "hclk";
219 pinctrl-names = "default", "state_uhs";
220 pinctrl-0 = <&mmc0_pins_default>;
221 pinctrl-1 = <&mmc0_pins_uhs>;
222 assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
223 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
224 hs400-ds-delay = <0x14015>;
225 mediatek,hs200-cmd-int-delay = <26>;
226 mediatek,hs400-cmd-int-delay = <14>;
227 mediatek,hs400-cmd-resp-sel-rising;
231 compatible = "mediatek,mt8173-mmc";
232 reg = <0x11260000 0x1000>;
233 clock-names = "source", "hclk";
234 clocks = <&pericfg CLK_PERI_MSDC30_3>,
235 <&topckgen CLK_TOP_MSDC50_2_H_SEL>;
236 interrupt-names = "msdc", "sdio_wakeup";
237 interrupts-extended = <&gic GIC_SPI 74 IRQ_TYPE_LEVEL_LOW 0>,
238 <&pio 23 IRQ_TYPE_LEVEL_LOW>;
239 pinctrl-names = "default", "state_uhs", "state_eint";
240 pinctrl-0 = <&mmc2_pins_default>;
241 pinctrl-1 = <&mmc2_pins_uhs>;
242 pinctrl-2 = <&mmc2_pins_eint>;
244 max-frequency = <200000000>;
247 keep-power-in-suspend;
253 vmmc-supply = <&sdio_fixed_3v3>;
254 vqmmc-supply = <&mt6397_vgp3_reg>;
255 mmc-pwrseq = <&wifi_pwrseq>;