Skip to content

Commit c9cc6b6

Browse files
Linus Walleijkuba-moo
authored andcommitted
ARM: dts: Fix up wrv54g device tree
Fix up the KS8995 switch and PHYs the way that is most likely: - Phy 1-4 is certainly the PHYs of the KS8995 (mask 0x1e in the outoftree code masks PHYs 1,2,3,4). - Phy 5 is the MII-P5 separate WAN phy of the KS8995 directly connected to EthC. - The EthB MII is probably connected as CPU interface to the KS8995. Properly integrate the KS8995 switch using the new bindings. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/20250625-ks8995-dsa-bindings-v2-2-ce71dce9be0b@linaro.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent a0f29a0 commit c9cc6b6

File tree

1 file changed

+78
-14
lines changed

1 file changed

+78
-14
lines changed

arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-wrv54g.dts

Lines changed: 78 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,55 @@
7272
cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
7373
num-chipselects = <1>;
7474

75-
switch@0 {
75+
ethernet-switch@0 {
7676
compatible = "micrel,ks8995";
7777
reg = <0>;
7878
spi-max-frequency = <50000000>;
79+
80+
/*
81+
* The PHYs are accessed over the external MDIO
82+
* bus and not internally through the switch control
83+
* registers.
84+
*/
85+
ethernet-ports {
86+
#address-cells = <1>;
87+
#size-cells = <0>;
88+
89+
ethernet-port@0 {
90+
reg = <0>;
91+
label = "1";
92+
phy-mode = "mii";
93+
phy-handle = <&phy1>;
94+
};
95+
ethernet-port@1 {
96+
reg = <1>;
97+
label = "2";
98+
phy-mode = "mii";
99+
phy-handle = <&phy2>;
100+
};
101+
ethernet-port@2 {
102+
reg = <2>;
103+
label = "3";
104+
phy-mode = "mii";
105+
phy-handle = <&phy3>;
106+
};
107+
ethernet-port@3 {
108+
reg = <3>;
109+
label = "4";
110+
phy-mode = "mii";
111+
phy-handle = <&phy4>;
112+
};
113+
ethernet-port@4 {
114+
reg = <4>;
115+
ethernet = <&ethb>;
116+
phy-mode = "mii";
117+
fixed-link {
118+
speed = <100>;
119+
full-duplex;
120+
};
121+
};
122+
123+
};
79124
};
80125
};
81126

@@ -135,40 +180,59 @@
135180
};
136181

137182
/*
138-
* EthB - connected to the KS8995 switch ports 1-4
139-
* FIXME: the boardfile defines .phy_mask = 0x1e for this port to enable output to
140-
* all four switch ports, also using an out of tree multiphy patch.
141-
* Do we need a new binding and property for this?
183+
* EthB connects to the KS8995 CPU port and faces ports 1-4
184+
* through the switch fabric.
185+
*
186+
* To complicate things, the MDIO channel is also only
187+
* accessible through EthB, but used independently for PHY
188+
* control.
142189
*/
143-
ethernet@c8009000 {
190+
ethb: ethernet@c8009000 {
144191
status = "okay";
145192
queue-rx = <&qmgr 3>;
146193
queue-txready = <&qmgr 20>;
147-
phy-mode = "rgmii";
148-
phy-handle = <&phy4>;
194+
phy-mode = "mii";
195+
fixed-link {
196+
speed = <100>;
197+
full-duplex;
198+
};
149199

150200
mdio {
151201
#address-cells = <1>;
152202
#size-cells = <0>;
153203

154-
/* Should be ports 1-4 on the KS8995 switch */
204+
/*
205+
* LAN ports 1-4 on the KS8995 switch
206+
* and PHY5 for WAN need to be accessed
207+
* through this external MDIO channel.
208+
*/
209+
phy1: ethernet-phy@1 {
210+
reg = <1>;
211+
};
212+
phy2: ethernet-phy@2 {
213+
reg = <2>;
214+
};
215+
phy3: ethernet-phy@3 {
216+
reg = <3>;
217+
};
155218
phy4: ethernet-phy@4 {
156219
reg = <4>;
157220
};
158-
159-
/* Should be port 5 on the KS8995 switch */
160221
phy5: ethernet-phy@5 {
161222
reg = <5>;
162223
};
163224
};
164225
};
165226

166-
/* EthC - connected to KS8995 switch port 5 */
167-
ethernet@c800a000 {
227+
/*
228+
* EthC connects to MII-P5 on the KS8995 bypassing
229+
* all of the switch logic and facing PHY5
230+
*/
231+
ethc: ethernet@c800a000 {
168232
status = "okay";
169233
queue-rx = <&qmgr 4>;
170234
queue-txready = <&qmgr 21>;
171-
phy-mode = "rgmii";
235+
phy-mode = "mii";
172236
phy-handle = <&phy5>;
173237
};
174238
};

0 commit comments

Comments
 (0)