Skip to content

Commit b127dbf

Browse files
littleqypConchuOD
authored andcommitted
riscv: dts: starfive: Add mmc nodes on VisionFive 2 board
Add the mmc nodes for the StarFive JH7110 SoC. Set mmc0 node to emmc and set mmc1 node to sd. Signed-off-by: William Qiu <william.qiu@starfivetech.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 7dafcfa commit b127dbf

File tree

2 files changed

+128
-0
lines changed

2 files changed

+128
-0
lines changed

arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-2.dtsi

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
i2c2 = &i2c2;
1818
i2c5 = &i2c5;
1919
i2c6 = &i2c6;
20+
mmc0 = &mmc0;
21+
mmc1 = &mmc1;
2022
serial0 = &uart0;
2123
};
2224

@@ -201,6 +203,35 @@
201203
status = "okay";
202204
};
203205

206+
&mmc0 {
207+
max-frequency = <100000000>;
208+
bus-width = <8>;
209+
cap-mmc-highspeed;
210+
mmc-ddr-1_8v;
211+
mmc-hs200-1_8v;
212+
non-removable;
213+
cap-mmc-hw-reset;
214+
post-power-on-delay-ms = <200>;
215+
pinctrl-names = "default";
216+
pinctrl-0 = <&mmc0_pins>;
217+
vmmc-supply = <&vcc_3v3>;
218+
vqmmc-supply = <&emmc_vdd>;
219+
status = "okay";
220+
};
221+
222+
&mmc1 {
223+
max-frequency = <100000000>;
224+
bus-width = <4>;
225+
no-sdio;
226+
no-mmc;
227+
broken-cd;
228+
cap-sd-highspeed;
229+
post-power-on-delay-ms = <200>;
230+
pinctrl-names = "default";
231+
pinctrl-0 = <&mmc1_pins>;
232+
status = "okay";
233+
};
234+
204235
&qspi {
205236
#address-cells = <1>;
206237
#size-cells = <0>;
@@ -306,6 +337,71 @@
306337
};
307338
};
308339

340+
mmc0_pins: mmc0-0 {
341+
rst-pins {
342+
pinmux = <GPIOMUX(62, GPOUT_SYS_SDIO0_RST,
343+
GPOEN_ENABLE,
344+
GPI_NONE)>;
345+
bias-pull-up;
346+
drive-strength = <12>;
347+
input-disable;
348+
input-schmitt-disable;
349+
slew-rate = <0>;
350+
};
351+
352+
mmc-pins {
353+
pinmux = <PINMUX(64, 0)>,
354+
<PINMUX(65, 0)>,
355+
<PINMUX(66, 0)>,
356+
<PINMUX(67, 0)>,
357+
<PINMUX(68, 0)>,
358+
<PINMUX(69, 0)>,
359+
<PINMUX(70, 0)>,
360+
<PINMUX(71, 0)>,
361+
<PINMUX(72, 0)>,
362+
<PINMUX(73, 0)>;
363+
bias-pull-up;
364+
drive-strength = <12>;
365+
input-enable;
366+
};
367+
};
368+
369+
mmc1_pins: mmc1-0 {
370+
clk-pins {
371+
pinmux = <GPIOMUX(10, GPOUT_SYS_SDIO1_CLK,
372+
GPOEN_ENABLE,
373+
GPI_NONE)>;
374+
bias-pull-up;
375+
drive-strength = <12>;
376+
input-disable;
377+
input-schmitt-disable;
378+
slew-rate = <0>;
379+
};
380+
381+
mmc-pins {
382+
pinmux = <GPIOMUX(9, GPOUT_SYS_SDIO1_CMD,
383+
GPOEN_SYS_SDIO1_CMD,
384+
GPI_SYS_SDIO1_CMD)>,
385+
<GPIOMUX(11, GPOUT_SYS_SDIO1_DATA0,
386+
GPOEN_SYS_SDIO1_DATA0,
387+
GPI_SYS_SDIO1_DATA0)>,
388+
<GPIOMUX(12, GPOUT_SYS_SDIO1_DATA1,
389+
GPOEN_SYS_SDIO1_DATA1,
390+
GPI_SYS_SDIO1_DATA1)>,
391+
<GPIOMUX(7, GPOUT_SYS_SDIO1_DATA2,
392+
GPOEN_SYS_SDIO1_DATA2,
393+
GPI_SYS_SDIO1_DATA2)>,
394+
<GPIOMUX(8, GPOUT_SYS_SDIO1_DATA3,
395+
GPOEN_SYS_SDIO1_DATA3,
396+
GPI_SYS_SDIO1_DATA3)>;
397+
bias-pull-up;
398+
drive-strength = <12>;
399+
input-enable;
400+
input-schmitt-enable;
401+
slew-rate = <0>;
402+
};
403+
};
404+
309405
spi0_pins: spi0-0 {
310406
mosi-pins {
311407
pinmux = <GPIOMUX(52, GPOUT_SYS_SPI0_TXD,

arch/riscv/boot/dts/starfive/jh7110.dtsi

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,38 @@
821821
<&syscrg JH7110_SYSRST_WDT_CORE>;
822822
};
823823

824+
mmc0: mmc@16010000 {
825+
compatible = "starfive,jh7110-mmc";
826+
reg = <0x0 0x16010000 0x0 0x10000>;
827+
clocks = <&syscrg JH7110_SYSCLK_SDIO0_AHB>,
828+
<&syscrg JH7110_SYSCLK_SDIO0_SDCARD>;
829+
clock-names = "biu","ciu";
830+
resets = <&syscrg JH7110_SYSRST_SDIO0_AHB>;
831+
reset-names = "reset";
832+
interrupts = <74>;
833+
fifo-depth = <32>;
834+
fifo-watermark-aligned;
835+
data-addr = <0>;
836+
starfive,sysreg = <&sys_syscon 0x14 0x1a 0x7c000000>;
837+
status = "disabled";
838+
};
839+
840+
mmc1: mmc@16020000 {
841+
compatible = "starfive,jh7110-mmc";
842+
reg = <0x0 0x16020000 0x0 0x10000>;
843+
clocks = <&syscrg JH7110_SYSCLK_SDIO1_AHB>,
844+
<&syscrg JH7110_SYSCLK_SDIO1_SDCARD>;
845+
clock-names = "biu","ciu";
846+
resets = <&syscrg JH7110_SYSRST_SDIO1_AHB>;
847+
reset-names = "reset";
848+
interrupts = <75>;
849+
fifo-depth = <32>;
850+
fifo-watermark-aligned;
851+
data-addr = <0>;
852+
starfive,sysreg = <&sys_syscon 0x9c 0x1 0x3e>;
853+
status = "disabled";
854+
};
855+
824856
gmac0: ethernet@16030000 {
825857
compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
826858
reg = <0x0 0x16030000 0x0 0x10000>;

0 commit comments

Comments
 (0)