1 From a5009b362d65c24e7b2a40824e351903d75a47dc Mon Sep 17 00:00:00 2001
2 From: Alex Marginean <alexandru.marginean@nxp.com>
3 Date: Mon, 6 Jan 2020 16:36:44 +0200
4 Subject: [PATCH] arm64: dts: fsl-ls1028a: prepare dts for overlay
6 Named the ports node of the Felix Eth switch so it can be used in DT
7 overlays to associate the ports with proper PHYs.
8 Ports are now by default disabled in dtsi, so if the board dts doesn't
9 do anything about them they stay disabled.
10 Updated RDB and QDS dts files to match.
11 Replaced all 'phy-connection-type' with 'phy-mode'.
12 The set-up for protocol 7777 on QDS was changed to a single quad port card
13 in slot 1. This requires a QDS board with no lane B rework and a AQR412
14 or similar PHY card without any lane rework done on it.
16 Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
18 .../boot/dts/freescale/fsl-ls1028a-qds-7777.dtsi | 58 ++++++++++-----------
19 .../boot/dts/freescale/fsl-ls1028a-qds-9999.dtsi | 59 ++++++++++------------
20 .../boot/dts/freescale/fsl-ls1028a-qds-x3xx.dtsi | 51 ++++++++++++-------
21 .../boot/dts/freescale/fsl-ls1028a-qds-x5xx.dtsi | 43 ++++++++++------
22 arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts | 44 +++++++++-------
23 arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 27 +++++++---
24 6 files changed, 161 insertions(+), 121 deletions(-)
26 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-7777.dtsi
27 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-7777.dtsi
32 - /* two ports on AQR412 */
33 - slot1_sxgmii2: ethernet-phy@2 {
35 + slot1_sxgmii0: ethernet-phy@0 {
37 compatible = "ethernet-phy-ieee802.3-c45";
39 - slot1_sxgmii3: ethernet-phy@3 {
42 + slot1_sxgmii1: ethernet-phy@1 {
44 compatible = "ethernet-phy-ieee802.3-c45";
49 - slot2_sxgmii0: ethernet-phy@2 {
51 + slot1_sxgmii2: ethernet-phy@2 {
53 compatible = "ethernet-phy-ieee802.3-c45";
58 - slot3_sxgmii0: ethernet-phy@2 {
61 + slot1_sxgmii3: ethernet-phy@3 {
63 compatible = "ethernet-phy-ieee802.3-c45";
69 - phy-handle = <&slot1_sxgmii2>;
70 - phy-connection-type = "2500base-x";
75 + phy-handle = <&slot1_sxgmii0>;
76 + phy-mode = "2500base-x";
80 - phy-handle = <&slot2_sxgmii0>;
81 - phy-connection-type = "2500base-x";
85 + phy-handle = <&slot1_sxgmii1>;
86 + phy-mode = "2500base-x";
90 - phy-handle = <&slot3_sxgmii0>;
91 - phy-connection-type = "2500base-x";
95 + phy-handle = <&slot1_sxgmii2>;
96 + phy-mode = "2500base-x";
100 - phy-handle = <&slot1_sxgmii3>;
101 - phy-connection-type = "2500base-x";
104 + phy-handle = <&slot1_sxgmii3>;
105 + phy-mode = "2500base-x";
108 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-9999.dtsi
109 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-9999.dtsi
111 slot1_sgmii0: ethernet-phy@1c {
115 slot1_sgmii1: ethernet-phy@1d {
119 slot1_sgmii2: ethernet-phy@1e {
122 - slot1_sgmii3: ethernet-phy@1f {
129 - slot2_sgmii0: ethernet-phy@1c {
132 - slot2_sgmii1: ethernet-phy@1d {
135 - slot2_sgmii2: ethernet-phy@1e {
138 - slot2_sgmii3: ethernet-phy@1f {
139 + slot1_sgmii3: ethernet-phy@1f {
146 - phy-handle = <&slot1_sgmii0>;
147 - phy-connection-type = "sgmii";
152 + phy-handle = <&slot1_sgmii0>;
153 + phy-mode = "sgmii";
154 + managed = "in-band-status";
158 - phy-handle = <&slot2_sgmii0>;
159 - phy-connection-type = "sgmii";
163 + phy-handle = <&slot1_sgmii1>;
164 + phy-mode = "sgmii";
165 + managed = "in-band-status";
169 - phy-handle = <&slot1_sgmii2>;
170 - phy-connection-type = "sgmii";
174 + phy-handle = <&slot1_sgmii2>;
175 + phy-mode = "sgmii";
176 + managed = "in-band-status";
180 - phy-handle = <&slot1_sgmii3>;
181 - phy-connection-type = "sgmii";
184 + phy-handle = <&slot1_sgmii3>;
185 + phy-mode = "sgmii";
186 + managed = "in-band-status";
189 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-x3xx.dtsi
190 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-x3xx.dtsi
194 /* 4 ports on AQR412 */
195 - slot2_qsgmii0: ethernet-phy@0 {
196 + slot2_qxgmii0: ethernet-phy@0 {
198 compatible = "ethernet-phy-ieee802.3-c45";
200 - slot2_qsgmii1: ethernet-phy@1 {
202 + slot2_qxgmii1: ethernet-phy@1 {
204 compatible = "ethernet-phy-ieee802.3-c45";
206 - slot2_qsgmii2: ethernet-phy@2 {
208 + slot2_qxgmii2: ethernet-phy@2 {
210 compatible = "ethernet-phy-ieee802.3-c45";
212 - slot2_qsgmii3: ethernet-phy@3 {
214 + slot2_qxgmii3: ethernet-phy@3 {
216 compatible = "ethernet-phy-ieee802.3-c45";
222 - phy-handle = <&slot2_qsgmii0>;
223 - phy-connection-type = "usxgmii";
228 + phy-handle = <&slot2_qxgmii0>;
229 + phy-mode = "usxgmii";
230 + managed = "in-band-status";
234 - phy-handle = <&slot2_qsgmii1>;
235 - phy-connection-type = "usxgmii";
239 + phy-handle = <&slot2_qxgmii1>;
240 + phy-mode = "usxgmii";
241 + managed = "in-band-status";
245 - phy-handle = <&slot2_qsgmii2>;
246 - phy-connection-type = "usxgmii";
250 + phy-handle = <&slot2_qxgmii2>;
251 + phy-mode = "usxgmii";
252 + managed = "in-band-status";
256 - phy-handle = <&slot2_qsgmii3>;
257 - phy-connection-type = "usxgmii";
260 + phy-handle = <&slot2_qxgmii3>;
261 + phy-mode = "usxgmii";
262 + managed = "in-band-status";
265 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-x5xx.dtsi
266 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-qds-x5xx.dtsi
268 slot2_qsgmii0: ethernet-phy@8 {
272 slot2_qsgmii1: ethernet-phy@9 {
276 slot2_qsgmii2: ethernet-phy@a {
280 slot2_qsgmii3: ethernet-phy@b {
287 - phy-handle = <&slot2_qsgmii0>;
288 - phy-connection-type = "qsgmii";
293 + phy-handle = <&slot2_qsgmii0>;
294 + phy-mode = "qsgmii";
295 + managed = "in-band-status";
299 - phy-handle = <&slot2_qsgmii1>;
300 - phy-connection-type = "qsgmii";
304 + phy-handle = <&slot2_qsgmii1>;
305 + phy-mode = "qsgmii";
306 + managed = "in-band-status";
310 - phy-handle = <&slot2_qsgmii2>;
311 - phy-connection-type = "qsgmii";
315 + phy-handle = <&slot2_qsgmii2>;
316 + phy-mode = "qsgmii";
317 + managed = "in-band-status";
321 - phy-handle = <&slot2_qsgmii3>;
322 - phy-connection-type = "qsgmii";
325 + phy-handle = <&slot2_qsgmii3>;
326 + phy-mode = "qsgmii";
327 + managed = "in-band-status";
330 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
331 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a-rdb.dts
332 @@ -233,28 +233,34 @@
337 - phy-handle = <&qsgmii_phy1>;
338 - phy-connection-type = "qsgmii";
339 - managed = "in-band-status";
344 + phy-handle = <&qsgmii_phy1>;
345 + phy-mode = "qsgmii";
346 + managed = "in-band-status";
350 - phy-handle = <&qsgmii_phy2>;
351 - phy-connection-type = "qsgmii";
352 - managed = "in-band-status";
356 + phy-handle = <&qsgmii_phy2>;
357 + phy-mode = "qsgmii";
358 + managed = "in-band-status";
362 - phy-handle = <&qsgmii_phy3>;
363 - phy-connection-type = "qsgmii";
364 - managed = "in-band-status";
368 + phy-handle = <&qsgmii_phy3>;
369 + phy-mode = "qsgmii";
370 + managed = "in-band-status";
374 - phy-handle = <&qsgmii_phy4>;
375 - phy-connection-type = "qsgmii";
376 - managed = "in-band-status";
379 + phy-handle = <&qsgmii_phy4>;
380 + phy-mode = "qsgmii";
381 + managed = "in-band-status";
386 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
387 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
388 @@ -792,30 +792,39 @@
389 clocks = <&clockgen 2 3>;
394 + ethernet-switch@0,5 {
395 reg = <0x000500 0 0 0 0>;
397 interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
400 + mscc_felix_ports: ports {
401 #address-cells = <1>;
405 - switch_port0: port@0 {
406 + mscc_felix_port0: port@0 {
408 + status = "disabled";
410 - switch_port1: port@1 {
412 + mscc_felix_port1: port@1 {
414 + status = "disabled";
416 - switch_port2: port@2 {
418 + mscc_felix_port2: port@2 {
420 + status = "disabled";
422 - switch_port3: port@3 {
424 + mscc_felix_port3: port@3 {
426 + status = "disabled";
429 /* internal to-cpu ports */
431 + mscc_felix_port4: port@4 {
433 ethernet = <&enetc_port2>;
441 + mscc_felix_port5: port@5 {
450 enetc_port3: ethernet@0,6 {
451 compatible = "fsl,enetc";
452 reg = <0x000600 0 0 0 0>;