Skip to content

Commit 46a9556

Browse files
mwalleclaudiubeznea
authored andcommitted
ARM: dts: kswitch-d10: enable networking
Enable all the necessary network related nodes, wire the pinctrl configurations, add the PHYs and connect them to the corresponding network ports. Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Claudiu Beznea <[email protected]> Signed-off-by: Claudiu Beznea <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nicolas Ferre <[email protected]>
1 parent 2952d32 commit 46a9556

File tree

3 files changed

+139
-0
lines changed

3 files changed

+139
-0
lines changed

arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-6g-2gs.dts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,19 @@
7676
function = "fc4_b";
7777
};
7878
};
79+
80+
&port2 {
81+
phys = <&serdes 2 SERDES6G(0)>;
82+
sfp = <&sfp0>;
83+
managed = "in-band-status";
84+
phy-mode = "sgmii";
85+
status = "okay";
86+
};
87+
88+
&port3 {
89+
phys = <&serdes 3 SERDES6G(1)>;
90+
sfp = <&sfp1>;
91+
managed = "in-band-status";
92+
phy-mode = "sgmii";
93+
status = "okay";
94+
};

arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt-8g.dts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,29 @@
1111
compatible = "kontron,kswitch-d10-mmt-8g", "kontron,s1921",
1212
"microchip,lan9668", "microchip,lan966";
1313
};
14+
15+
&mdio0 {
16+
phy2: ethernet-phy@3 {
17+
reg = <3>;
18+
};
19+
20+
phy3: ethernet-phy@4 {
21+
reg = <4>;
22+
};
23+
};
24+
25+
&port2 {
26+
phys = <&serdes 2 SERDES6G(0)>;
27+
phy-handle = <&phy2>;
28+
phy-mode = "sgmii";
29+
managed = "in-band-status";
30+
status = "okay";
31+
};
32+
33+
&port3 {
34+
phys = <&serdes 3 SERDES6G(1)>;
35+
phy-handle = <&phy3>;
36+
phy-mode = "sgmii";
37+
managed = "in-band-status";
38+
status = "okay";
39+
};

arch/arm/boot/dts/lan966x-kontron-kswitch-d10-mmt.dtsi

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
/dts-v1/;
77
#include "lan966x.dtsi"
8+
#include "dt-bindings/phy/phy-lan966x-serdes.h"
89

910
/ {
1011
aliases {
@@ -52,6 +53,12 @@
5253
function = "fc3_b";
5354
};
5455

56+
miim_c_pins: miim-c-pins {
57+
/* MDC, MDIO */
58+
pins = "GPIO_59", "GPIO_60";
59+
function = "miim_c";
60+
};
61+
5562
sgpio_a_pins: sgpio-a-pins {
5663
/* SCK, D0, D1 */
5764
pins = "GPIO_32", "GPIO_33", "GPIO_34";
@@ -71,6 +78,92 @@
7178
};
7279
};
7380

81+
&mdio0 {
82+
pinctrl-0 = <&miim_c_pins>;
83+
pinctrl-names = "default";
84+
reset-gpios = <&gpio 29 GPIO_ACTIVE_LOW>;
85+
clock-frequency = <2500000>;
86+
status = "okay";
87+
88+
phy4: ethernet-phy@5 {
89+
reg = <5>;
90+
coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
91+
};
92+
93+
phy5: ethernet-phy@6 {
94+
reg = <6>;
95+
coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
96+
};
97+
98+
phy6: ethernet-phy@7 {
99+
reg = <7>;
100+
coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
101+
};
102+
103+
phy7: ethernet-phy@8 {
104+
reg = <8>;
105+
coma-mode-gpios = <&gpio 37 GPIO_ACTIVE_HIGH>;
106+
};
107+
};
108+
109+
&mdio1 {
110+
status = "okay";
111+
};
112+
113+
&phy0 {
114+
status = "okay";
115+
};
116+
117+
&phy1 {
118+
status = "okay";
119+
};
120+
121+
&port0 {
122+
phys = <&serdes 0 CU(0)>;
123+
phy-handle = <&phy0>;
124+
phy-mode = "gmii";
125+
status = "okay";
126+
};
127+
128+
&port1 {
129+
phys = <&serdes 1 CU(1)>;
130+
phy-handle = <&phy1>;
131+
phy-mode = "gmii";
132+
status = "okay";
133+
};
134+
135+
&port4 {
136+
phys = <&serdes 4 SERDES6G(2)>;
137+
phy-handle = <&phy4>;
138+
phy-mode = "qsgmii";
139+
status = "okay";
140+
};
141+
142+
&port5 {
143+
phys = <&serdes 5 SERDES6G(2)>;
144+
phy-handle = <&phy5>;
145+
phy-mode = "qsgmii";
146+
status = "okay";
147+
};
148+
149+
&port6 {
150+
phys = <&serdes 6 SERDES6G(2)>;
151+
phy-handle = <&phy6>;
152+
phy-mode = "qsgmii";
153+
status = "okay";
154+
};
155+
156+
&port7 {
157+
phys = <&serdes 7 SERDES6G(2)>;
158+
phy-handle = <&phy7>;
159+
phy-mode = "qsgmii";
160+
status = "okay";
161+
};
162+
163+
&serdes {
164+
status = "okay";
165+
};
166+
74167
&sgpio {
75168
pinctrl-0 = <&sgpio_a_pins>, <&sgpio_b_pins>;
76169
pinctrl-names = "default";
@@ -88,6 +181,10 @@
88181
};
89182
};
90183

184+
&switch {
185+
status = "okay";
186+
};
187+
91188
&watchdog {
92189
status = "okay";
93190
};

0 commit comments

Comments
 (0)