Skip to content

Commit f430d71

Browse files
inochisaRevySR
authored andcommitted
UPSTREAM: riscv: dts: sophgo: add ethernet GMAC device for sg2042
Add ethernet GMAC device node for the sg2042. Tested-by: Han Gao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Inochi Amaoto <[email protected]> Signed-off-by: Chen Wang <[email protected]> Signed-off-by: Chen Wang <[email protected]> (cherry picked from commit 39539df) Signed-off-by: Han Gao <[email protected]>
1 parent 7176251 commit f430d71

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

arch/riscv/boot/dts/sophgo/sg2042.dtsi

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,67 @@
569569
status = "disabled";
570570
};
571571

572+
gmac0: ethernet@7040026000 {
573+
compatible = "sophgo,sg2042-dwmac", "snps,dwmac-5.00a";
574+
reg = <0x70 0x40026000 0x0 0x4000>;
575+
clocks = <&clkgen GATE_CLK_AXI_ETH0>,
576+
<&clkgen GATE_CLK_PTP_REF_I_ETH0>,
577+
<&clkgen GATE_CLK_TX_ETH0>;
578+
clock-names = "stmmaceth", "ptp_ref", "tx";
579+
dma-noncoherent;
580+
interrupt-parent = <&intc>;
581+
interrupts = <132 IRQ_TYPE_LEVEL_HIGH>;
582+
interrupt-names = "macirq";
583+
resets = <&rstgen RST_ETH0>;
584+
reset-names = "stmmaceth";
585+
snps,multicast-filter-bins = <0>;
586+
snps,perfect-filter-entries = <1>;
587+
snps,aal;
588+
snps,tso;
589+
snps,txpbl = <32>;
590+
snps,rxpbl = <32>;
591+
snps,mtl-rx-config = <&gmac0_mtl_rx_setup>;
592+
snps,mtl-tx-config = <&gmac0_mtl_tx_setup>;
593+
snps,axi-config = <&gmac0_stmmac_axi_setup>;
594+
status = "disabled";
595+
596+
mdio {
597+
compatible = "snps,dwmac-mdio";
598+
#address-cells = <1>;
599+
#size-cells = <0>;
600+
};
601+
602+
gmac0_mtl_rx_setup: rx-queues-config {
603+
snps,rx-queues-to-use = <8>;
604+
queue0 {};
605+
queue1 {};
606+
queue2 {};
607+
queue3 {};
608+
queue4 {};
609+
queue5 {};
610+
queue6 {};
611+
queue7 {};
612+
};
613+
614+
gmac0_mtl_tx_setup: tx-queues-config {
615+
snps,tx-queues-to-use = <8>;
616+
queue0 {};
617+
queue1 {};
618+
queue2 {};
619+
queue3 {};
620+
queue4 {};
621+
queue5 {};
622+
queue6 {};
623+
queue7 {};
624+
};
625+
626+
gmac0_stmmac_axi_setup: stmmac-axi-config {
627+
snps,blen = <16 8 4 0 0 0 0>;
628+
snps,wr_osr_lmt = <1>;
629+
snps,rd_osr_lmt = <2>;
630+
};
631+
};
632+
572633
emmc: mmc@704002a000 {
573634
compatible = "sophgo,sg2042-dwcmshc";
574635
reg = <0x70 0x4002a000 0x0 0x1000>;

0 commit comments

Comments
 (0)