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#
30 - const: mediatek,mt7623-mmc
31 - const: mediatek,mt2701-mmc
33 - const: mediatek,mt8186-mmc
34 - const: mediatek,mt8183-mmc
36 - const: mediatek,mt8192-mmc
37 - const: mediatek,mt8183-mmc
39 - const: mediatek,mt8195-mmc
40 - const: mediatek,mt8183-mmc
45 - description: base register (required).
46 - description: top base register (required for MT8183).
50 Should contain phandle for the clock feeding the MMC controller.
53 - description: source clock (required).
54 - description: HCLK which used for host (required).
55 - description: independent source clock gate (required for MT2712).
56 - description: bus clock used for internal register access (required for MT2712 MSDC0/3).
57 - description: msdc subsys clock gate (required for MT8192).
58 - description: peripheral bus clock gate (required for MT8192).
59 - description: AXI bus clock gate (required for MT8192).
60 - description: AHB bus clock gate (required for MT8192).
84 should contain default/high speed pin ctrl.
89 should contain uhs mode pin ctrl.
94 PLL of the source clock.
97 assigned-clock-parents:
99 parent of source clock, used for HS400 mode to get 400Mhz source clock.
103 $ref: /schemas/types.yaml#/definitions/uint32
105 HS400 DS delay setting.
109 mediatek,hs200-cmd-int-delay:
110 $ref: /schemas/types.yaml#/definitions/uint32
112 HS200 command internal delay setting.
113 This field has total 32 stages.
114 The value is an integer from 0 to 31.
118 mediatek,hs400-cmd-int-delay:
119 $ref: /schemas/types.yaml#/definitions/uint32
121 HS400 command internal delay setting.
122 This field has total 32 stages.
123 The value is an integer from 0 to 31.
127 mediatek,hs400-cmd-resp-sel-rising:
128 $ref: /schemas/types.yaml#/definitions/flag
130 HS400 command response sample selection.
131 If present, HS400 command responses are sampled on rising edges.
132 If not present, HS400 command responses are sampled on falling edges.
134 mediatek,hs400-ds-dly3:
135 $ref: /schemas/types.yaml#/definitions/uint32
137 Gear of the third delay line for DS for input data latch in data
138 pad macro, there are 32 stages from 0 to 31.
139 For different corner IC, the time is different about one step, it is
141 The value is confirmed by doing scan and calibration to find a best
142 value with corner IC and it is valid only for HS400 mode.
147 $ref: /schemas/types.yaml#/definitions/uint32
149 Some SoCs do not support enhance_rx, need set correct latch-ck to avoid
150 data crc error caused by stop clock(fifo full) Valid range = [0:0x7].
151 if not present, default value is 0.
152 applied to compatible "mediatek,mt2701-mmc".
178 const: mediatek,mt8183-mmc
184 unevaluatedProperties: false
188 #include <dt-bindings/interrupt-controller/irq.h>
189 #include <dt-bindings/interrupt-controller/arm-gic.h>
190 #include <dt-bindings/clock/mt8173-clk.h>
192 compatible = "mediatek,mt8173-mmc";
193 reg = <0x11230000 0x1000>;
194 interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_LOW>;
195 vmmc-supply = <&mt6397_vemc_3v3_reg>;
196 vqmmc-supply = <&mt6397_vio18_reg>;
197 clocks = <&pericfg CLK_PERI_MSDC30_0>,
198 <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
199 clock-names = "source", "hclk";
200 pinctrl-names = "default", "state_uhs";
201 pinctrl-0 = <&mmc0_pins_default>;
202 pinctrl-1 = <&mmc0_pins_uhs>;
203 assigned-clocks = <&topckgen CLK_TOP_MSDC50_0_SEL>;
204 assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_D2>;
205 hs400-ds-delay = <0x14015>;
206 mediatek,hs200-cmd-int-delay = <26>;
207 mediatek,hs400-cmd-int-delay = <14>;
208 mediatek,hs400-cmd-resp-sel-rising;