Skip to content

Commit 5e6cdf0

Browse files
jjian zhoumbgg
authored andcommitted
arm64: dts: mt8183: add mmc node
Add mmc DTS node to the mt8183 and mt8183-evb. Signed-off-by: Jjian Zhou <jjian.zhou-NuS5LvNUpcJWk0Htik3J/[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Matthias Brugger <[email protected]>
1 parent e9cabfd commit 5e6cdf0

File tree

2 files changed

+170
-0
lines changed

2 files changed

+170
-0
lines changed

arch/arm64/boot/dts/mediatek/mt8183-evb.dts

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,47 @@
7373
clock-frequency = <1000000>;
7474
};
7575

76+
&mmc0 {
77+
status = "okay";
78+
pinctrl-names = "default", "state_uhs";
79+
pinctrl-0 = <&mmc0_pins_default>;
80+
pinctrl-1 = <&mmc0_pins_uhs>;
81+
bus-width = <8>;
82+
max-frequency = <200000000>;
83+
cap-mmc-highspeed;
84+
mmc-hs200-1_8v;
85+
mmc-hs400-1_8v;
86+
cap-mmc-hw-reset;
87+
no-sdio;
88+
no-sd;
89+
hs400-ds-delay = <0x12814>;
90+
vmmc-supply = <&mt6358_vemc_reg>;
91+
vqmmc-supply = <&mt6358_vio18_reg>;
92+
assigned-clocks = <&topckgen CLK_TOP_MUX_MSDC50_0>;
93+
assigned-clock-parents = <&topckgen CLK_TOP_MSDCPLL_CK>;
94+
non-removable;
95+
};
96+
97+
&mmc1 {
98+
status = "okay";
99+
pinctrl-names = "default", "state_uhs";
100+
pinctrl-0 = <&mmc1_pins_default>;
101+
pinctrl-1 = <&mmc1_pins_uhs>;
102+
bus-width = <4>;
103+
max-frequency = <200000000>;
104+
cap-sd-highspeed;
105+
sd-uhs-sdr50;
106+
sd-uhs-sdr104;
107+
cap-sdio-irq;
108+
no-mmc;
109+
no-sd;
110+
vmmc-supply = <&mt6358_vmch_reg>;
111+
vqmmc-supply = <&mt6358_vmc_reg>;
112+
keep-power-in-suspend;
113+
enable-sdio-wakeup;
114+
non-removable;
115+
};
116+
76117
&pio {
77118
i2c_pins_0: i2c0{
78119
pins_i2c{
@@ -138,6 +179,111 @@
138179
};
139180
};
140181

182+
mmc0_pins_default: mmc0default {
183+
pins_cmd_dat {
184+
pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
185+
<PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
186+
<PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
187+
<PINMUX_GPIO132__FUNC_MSDC0_DAT3>,
188+
<PINMUX_GPIO126__FUNC_MSDC0_DAT4>,
189+
<PINMUX_GPIO129__FUNC_MSDC0_DAT5>,
190+
<PINMUX_GPIO127__FUNC_MSDC0_DAT6>,
191+
<PINMUX_GPIO130__FUNC_MSDC0_DAT7>,
192+
<PINMUX_GPIO122__FUNC_MSDC0_CMD>;
193+
input-enable;
194+
bias-pull-up;
195+
};
196+
197+
pins_clk {
198+
pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
199+
bias-pull-down;
200+
};
201+
202+
pins_rst {
203+
pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
204+
bias-pull-up;
205+
};
206+
};
207+
208+
mmc0_pins_uhs: mmc0@0{
209+
pins_cmd_dat {
210+
pinmux = <PINMUX_GPIO123__FUNC_MSDC0_DAT0>,
211+
<PINMUX_GPIO128__FUNC_MSDC0_DAT1>,
212+
<PINMUX_GPIO125__FUNC_MSDC0_DAT2>,
213+
<PINMUX_GPIO132__FUNC_MSDC0_DAT3>,
214+
<PINMUX_GPIO126__FUNC_MSDC0_DAT4>,
215+
<PINMUX_GPIO129__FUNC_MSDC0_DAT5>,
216+
<PINMUX_GPIO127__FUNC_MSDC0_DAT6>,
217+
<PINMUX_GPIO130__FUNC_MSDC0_DAT7>,
218+
<PINMUX_GPIO122__FUNC_MSDC0_CMD>;
219+
input-enable;
220+
drive-strength = <MTK_DRIVE_10mA>;
221+
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
222+
};
223+
224+
pins_clk {
225+
pinmux = <PINMUX_GPIO124__FUNC_MSDC0_CLK>;
226+
drive-strength = <MTK_DRIVE_10mA>;
227+
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
228+
};
229+
230+
pins_ds {
231+
pinmux = <PINMUX_GPIO131__FUNC_MSDC0_DSL>;
232+
drive-strength = <MTK_DRIVE_10mA>;
233+
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
234+
};
235+
236+
pins_rst {
237+
pinmux = <PINMUX_GPIO133__FUNC_MSDC0_RSTB>;
238+
drive-strength = <MTK_DRIVE_10mA>;
239+
bias-pull-up;
240+
};
241+
};
242+
243+
mmc1_pins_default: mmc1default {
244+
pins_cmd_dat {
245+
pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
246+
<PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
247+
<PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
248+
<PINMUX_GPIO33__FUNC_MSDC1_DAT2>,
249+
<PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
250+
input-enable;
251+
bias-pull-up;
252+
};
253+
254+
pins_clk {
255+
pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
256+
input-enable;
257+
bias-pull-down;
258+
};
259+
260+
pins_pmu {
261+
pinmux = <PINMUX_GPIO178__FUNC_GPIO178>,
262+
<PINMUX_GPIO166__FUNC_GPIO166>;
263+
output-high;
264+
};
265+
};
266+
267+
mmc1_pins_uhs: mmc1@0{
268+
pins_cmd_dat {
269+
pinmux = <PINMUX_GPIO31__FUNC_MSDC1_CMD>,
270+
<PINMUX_GPIO32__FUNC_MSDC1_DAT0>,
271+
<PINMUX_GPIO34__FUNC_MSDC1_DAT1>,
272+
<PINMUX_GPIO33__FUNC_MSDC1_DAT2>,
273+
<PINMUX_GPIO30__FUNC_MSDC1_DAT3>;
274+
drive-strength = <MTK_DRIVE_6mA>;
275+
input-enable;
276+
bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
277+
};
278+
279+
pins_clk {
280+
pinmux = <PINMUX_GPIO29__FUNC_MSDC1_CLK>;
281+
drive-strength = <MTK_DRIVE_6mA>;
282+
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
283+
input-enable;
284+
};
285+
};
286+
141287
spi_pins_1: spi1{
142288
pins_spi{
143289
pinmux = <PINMUX_GPIO161__FUNC_SPI1_A_MI>,

arch/arm64/boot/dts/mediatek/mt8183.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,30 @@
648648
#clock-cells = <1>;
649649
};
650650

651+
mmc0: mmc@11230000 {
652+
compatible = "mediatek,mt8183-mmc";
653+
reg = <0 0x11230000 0 0x1000>,
654+
<0 0x11f50000 0 0x1000>;
655+
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
656+
clocks = <&topckgen CLK_TOP_MUX_MSDC50_0>,
657+
<&infracfg CLK_INFRA_MSDC0>,
658+
<&infracfg CLK_INFRA_MSDC0_SCK>;
659+
clock-names = "source", "hclk", "source_cg";
660+
status = "disabled";
661+
};
662+
663+
mmc1: mmc@11240000 {
664+
compatible = "mediatek,mt8183-mmc";
665+
reg = <0 0x11240000 0 0x1000>,
666+
<0 0x11e10000 0 0x1000>;
667+
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
668+
clocks = <&topckgen CLK_TOP_MUX_MSDC30_1>,
669+
<&infracfg CLK_INFRA_MSDC1>,
670+
<&infracfg CLK_INFRA_MSDC1_SCK>;
671+
clock-names = "source", "hclk", "source_cg";
672+
status = "disabled";
673+
};
674+
651675
efuse: efuse@11f10000 {
652676
compatible = "mediatek,mt8183-efuse",
653677
"mediatek,efuse";

0 commit comments

Comments
 (0)