1 From f5f011742b6ec9ad1db54de9e8296f1d5a3ede8a Mon Sep 17 00:00:00 2001
2 From: Claudiu Manoil <claudiu.manoil@nxp.com>
3 Date: Fri, 14 Jun 2019 19:24:27 +0300
4 Subject: [PATCH] arm64: dts: fsl: ls1028a: Add Felix switch port DT node
6 Add the switch device node, available on PF5, so that the
7 switch port sub-nodes (net devices) can be linked to
8 corresponding board specific phy nodes (external ports) or
9 have their link mode defined (internal ports).
10 The switch device features 6 ports, 4 with external links
11 and 2 internally facing to the ls1028a SoC and connected via
12 fixed links to 2 internal enetc ethernet contoller ports.
13 Add the corresponding enetc internal port device nodes,
14 mapped to PF2 and PF6 PCIe functions.
15 And don't forget to enable the 4MB BAR4 in the root complex
16 ECAM space, where the switch registers are mapped.
18 Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
20 arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 58 +++++++++++++++++++++++++-
21 1 file changed, 57 insertions(+), 1 deletion(-)
23 --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
24 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
26 /* PF1: VF0-1 BAR0 - non-prefetchable memory */
27 0x82000000 0x0 0x00000000 0x1 0xf8210000 0x0 0x020000
28 /* PF1: VF0-1 BAR2 - prefetchable memory */
29 - 0xc2000000 0x0 0x00000000 0x1 0xf8230000 0x0 0x020000>;
30 + 0xc2000000 0x0 0x00000000 0x1 0xf8230000 0x0 0x020000
31 + /* BAR4 (PF5) - non-prefetchable memory */
32 + 0x82000000 0x0 0x00000000 0x1 0xfc000000 0x0 0x400000>;
34 enetc_port0: ethernet@0,0 {
35 compatible = "fsl,enetc";
41 + compatible = "fsl,enetc";
42 + reg = <0x000200 0 0 0 0>;
49 compatible = "fsl,enetc-ptp";
50 reg = <0x000400 0 0 0 0>;
51 clocks = <&clockgen 4 0>;
55 + compatible = "mscc,felix-switch";
56 + reg = <0x000500 0 0 0 0>;
59 + #address-cells = <1>;
62 + /* external ports */
63 + switch_port0: port@0 {
66 + switch_port1: port@1 {
69 + switch_port2: port@2 {
72 + switch_port3: port@3 {
75 + /* internal to-cpu ports */
93 + compatible = "fsl,enetc";
94 + reg = <0x000600 0 0 0 0>;