Skip to content

Commit ed4dd5b

Browse files
Christophe RoullierAlexandre Torgue
authored andcommitted
arm64: dts: st: add ethernet1 and ethernet2 support on stm32mp25
Both instances ethernet based on GMAC SNPS IP on stm32mp25. GMAC IP version is SNPS 5.3 Signed-off-by: Christophe Roullier <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Signed-off-by: Alexandre Torgue <[email protected]>
1 parent 7253ddc commit ed4dd5b

File tree

2 files changed

+100
-0
lines changed

2 files changed

+100
-0
lines changed

arch/arm64/boot/dts/st/stm32mp251.dtsi

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,55 @@
497497
access-controllers = <&rifsc 76>;
498498
status = "disabled";
499499
};
500+
501+
ethernet1: ethernet@482c0000 {
502+
compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20";
503+
reg = <0x482c0000 0x4000>;
504+
reg-names = "stmmaceth";
505+
interrupts-extended = <&intc GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
506+
interrupt-names = "macirq";
507+
clock-names = "stmmaceth",
508+
"mac-clk-tx",
509+
"mac-clk-rx",
510+
"ptp_ref",
511+
"ethstp",
512+
"eth-ck";
513+
clocks = <&rcc CK_ETH1_MAC>,
514+
<&rcc CK_ETH1_TX>,
515+
<&rcc CK_ETH1_RX>,
516+
<&rcc CK_KER_ETH1PTP>,
517+
<&rcc CK_ETH1_STP>,
518+
<&rcc CK_KER_ETH1>;
519+
snps,axi-config = <&stmmac_axi_config_1>;
520+
snps,mixed-burst;
521+
snps,mtl-rx-config = <&mtl_rx_setup_1>;
522+
snps,mtl-tx-config = <&mtl_tx_setup_1>;
523+
snps,pbl = <2>;
524+
snps,tso;
525+
st,syscon = <&syscfg 0x3000>;
526+
access-controllers = <&rifsc 60>;
527+
status = "disabled";
528+
529+
mtl_rx_setup_1: rx-queues-config {
530+
snps,rx-queues-to-use = <2>;
531+
queue0 {};
532+
queue1 {};
533+
};
534+
535+
mtl_tx_setup_1: tx-queues-config {
536+
snps,tx-queues-to-use = <4>;
537+
queue0 {};
538+
queue1 {};
539+
queue2 {};
540+
queue3 {};
541+
};
542+
543+
stmmac_axi_config_1: stmmac-axi-config {
544+
snps,blen = <0 0 0 0 16 8 4>;
545+
snps,rd_osr_lmt = <0x7>;
546+
snps,wr_osr_lmt = <0x7>;
547+
};
548+
};
500549
};
501550

502551
bsec: efuse@44000000 {

arch/arm64/boot/dts/st/stm32mp253.dtsi

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,54 @@
4141
&optee {
4242
interrupts = <GIC_PPI 15 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
4343
};
44+
45+
&rifsc {
46+
ethernet2: ethernet@482d0000 {
47+
compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20";
48+
reg = <0x482d0000 0x4000>;
49+
reg-names = "stmmaceth";
50+
interrupts-extended = <&intc GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>;
51+
interrupt-names = "macirq";
52+
clock-names = "stmmaceth",
53+
"mac-clk-tx",
54+
"mac-clk-rx",
55+
"ptp_ref",
56+
"ethstp",
57+
"eth-ck";
58+
clocks = <&rcc CK_ETH2_MAC>,
59+
<&rcc CK_ETH2_TX>,
60+
<&rcc CK_ETH2_RX>,
61+
<&rcc CK_KER_ETH2PTP>,
62+
<&rcc CK_ETH2_STP>,
63+
<&rcc CK_KER_ETH2>;
64+
snps,axi-config = <&stmmac_axi_config_2>;
65+
snps,mixed-burst;
66+
snps,mtl-rx-config = <&mtl_rx_setup_2>;
67+
snps,mtl-tx-config = <&mtl_tx_setup_2>;
68+
snps,pbl = <2>;
69+
snps,tso;
70+
st,syscon = <&syscfg 0x3400>;
71+
access-controllers = <&rifsc 61>;
72+
status = "disabled";
73+
74+
mtl_rx_setup_2: rx-queues-config {
75+
snps,rx-queues-to-use = <2>;
76+
queue0 {};
77+
queue1 {};
78+
};
79+
80+
mtl_tx_setup_2: tx-queues-config {
81+
snps,tx-queues-to-use = <4>;
82+
queue0 {};
83+
queue1 {};
84+
queue2 {};
85+
queue3 {};
86+
};
87+
88+
stmmac_axi_config_2: stmmac-axi-config {
89+
snps,blen = <0 0 0 0 16 8 4>;
90+
snps,rd_osr_lmt = <0x7>;
91+
snps,wr_osr_lmt = <0x7>;
92+
};
93+
};
94+
};

0 commit comments

Comments
 (0)