Skip to content

Commit 1ff166c

Browse files
Samin GuoConchuOD
authored andcommitted
riscv: dts: starfive: jh7110: Add ethernet device nodes
Add JH7110 ethernet device node to support gmac driver for the JH7110 RISC-V SoC. Tested-by: Tommaso Merciai <tomm.merciai@gmail.com> Signed-off-by: Yanhong Wang <yanhong.wang@starfivetech.com> Signed-off-by: Samin Guo <samin.guo@starfivetech.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
1 parent 3e6670a commit 1ff166c

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

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

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,13 @@
276276
#clock-cells = <0>;
277277
};
278278

279+
stmmac_axi_setup: stmmac-axi-config {
280+
snps,lpi_en;
281+
snps,wr_osr_lmt = <4>;
282+
snps,rd_osr_lmt = <4>;
283+
snps,blen = <256 128 64 32 0 0 0>;
284+
};
285+
279286
tdm_ext: tdm-ext-clock {
280287
compatible = "fixed-clock";
281288
clock-output-names = "tdm_ext";
@@ -564,6 +571,68 @@
564571
<&syscrg JH7110_SYSRST_WDT_CORE>;
565572
};
566573

574+
gmac0: ethernet@16030000 {
575+
compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
576+
reg = <0x0 0x16030000 0x0 0x10000>;
577+
clocks = <&aoncrg JH7110_AONCLK_GMAC0_AXI>,
578+
<&aoncrg JH7110_AONCLK_GMAC0_AHB>,
579+
<&syscrg JH7110_SYSCLK_GMAC0_PTP>,
580+
<&aoncrg JH7110_AONCLK_GMAC0_TX_INV>,
581+
<&syscrg JH7110_SYSCLK_GMAC0_GTXC>;
582+
clock-names = "stmmaceth", "pclk", "ptp_ref",
583+
"tx", "gtx";
584+
resets = <&aoncrg JH7110_AONRST_GMAC0_AXI>,
585+
<&aoncrg JH7110_AONRST_GMAC0_AHB>;
586+
reset-names = "stmmaceth", "ahb";
587+
interrupts = <7>, <6>, <5>;
588+
interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
589+
rx-fifo-depth = <2048>;
590+
tx-fifo-depth = <2048>;
591+
snps,multicast-filter-bins = <64>;
592+
snps,perfect-filter-entries = <8>;
593+
snps,fixed-burst;
594+
snps,no-pbl-x8;
595+
snps,force_thresh_dma_mode;
596+
snps,axi-config = <&stmmac_axi_setup>;
597+
snps,tso;
598+
snps,en-tx-lpi-clockgating;
599+
snps,txpbl = <16>;
600+
snps,rxpbl = <16>;
601+
starfive,syscon = <&aon_syscon 0xc 0x12>;
602+
status = "disabled";
603+
};
604+
605+
gmac1: ethernet@16040000 {
606+
compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20";
607+
reg = <0x0 0x16040000 0x0 0x10000>;
608+
clocks = <&syscrg JH7110_SYSCLK_GMAC1_AXI>,
609+
<&syscrg JH7110_SYSCLK_GMAC1_AHB>,
610+
<&syscrg JH7110_SYSCLK_GMAC1_PTP>,
611+
<&syscrg JH7110_SYSCLK_GMAC1_TX_INV>,
612+
<&syscrg JH7110_SYSCLK_GMAC1_GTXC>;
613+
clock-names = "stmmaceth", "pclk", "ptp_ref",
614+
"tx", "gtx";
615+
resets = <&syscrg JH7110_SYSRST_GMAC1_AXI>,
616+
<&syscrg JH7110_SYSRST_GMAC1_AHB>;
617+
reset-names = "stmmaceth", "ahb";
618+
interrupts = <78>, <77>, <76>;
619+
interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
620+
rx-fifo-depth = <2048>;
621+
tx-fifo-depth = <2048>;
622+
snps,multicast-filter-bins = <64>;
623+
snps,perfect-filter-entries = <8>;
624+
snps,fixed-burst;
625+
snps,no-pbl-x8;
626+
snps,force_thresh_dma_mode;
627+
snps,axi-config = <&stmmac_axi_setup>;
628+
snps,tso;
629+
snps,en-tx-lpi-clockgating;
630+
snps,txpbl = <16>;
631+
snps,rxpbl = <16>;
632+
starfive,syscon = <&sys_syscon 0x90 0x2>;
633+
status = "disabled";
634+
};
635+
567636
aoncrg: clock-controller@17000000 {
568637
compatible = "starfive,jh7110-aoncrg";
569638
reg = <0x0 0x17000000 0x0 0x10000>;

0 commit comments

Comments
 (0)