Commit ba4aebce authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Florian Fainelli
Browse files

ARM: dts: BCM5301X: Describe switch ports in the main DTS



All Northstar SoCs have BCM5301x switches (BCM53011, BCM53012) with 8
ports (0-8 without 6). By design 3 switch ports (5, 7 and 8) are
hardwired to 3 on-SoC Ethernet interfaces. Switch port 8 requires
forcing link state.

It seems that global Northstar .dtsi file is the best place to describe
those hw details. Only device specific bits (like labels) should go to
device .dts files.

This seems to fit well with a tiny exception of Asus RT-AC88U which
somehow was designed to have switch 5 connected to an extra switch. This
case was simply handled with a /delete-property/.

Signed-off-by: default avatarRafał Miłecki <rafal@milecki.pl>
Reviewed-by: Christian Lamparter <chunkeey@gmail.com> (MR32+MR26)
Link: https://lore.kernel.org/r/20230605132109.7933-1-zajec5@gmail.com


Signed-off-by: default avatarFlorian Fainelli <florian.fainelli@broadcom.com>
parent 1d5682cc
Loading
Loading
Loading
Loading
+40 −1
Original line number Diff line number Diff line
@@ -304,10 +304,49 @@

		status = "disabled";

		/* ports are defined in board DTS */
		ports {
			#address-cells = <1>;
			#size-cells = <0>;

			port@0 {
				reg = <0>;
			};

			port@1 {
				reg = <1>;
			};

			port@2 {
				reg = <2>;
			};

			port@3 {
				reg = <3>;
			};

			port@4 {
				reg = <4>;
			};

			port@5 {
				reg = <5>;
				ethernet = <&gmac0>;
			};

			port@7 {
				reg = <7>;
				ethernet = <&gmac1>;
			};

			port@8 {
				reg = <8>;
				ethernet = <&gmac2>;

				fixed-link {
					speed = <1000>;
					full-duplex;
				};
			};
		};
	};

+0 −7
Original line number Diff line number Diff line
@@ -159,34 +159,27 @@

	ports {
		port@0 {
			reg = <0>;
			label = "lan1";
		};

		port@1 {
			reg = <1>;
			label = "lan2";
		};

		port@2 {
			reg = <2>;
			label = "lan3";
		};

		port@3 {
			reg = <3>;
			label = "lan4";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};
+0 −4
Original line number Diff line number Diff line
@@ -75,19 +75,15 @@

	ports {
		port@0 {
			reg = <0>;
			label = "poe";
		};

		port@4 {
			reg = <4>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};
+0 −3
Original line number Diff line number Diff line
@@ -82,14 +82,11 @@

	ports {
		port@4 {
			reg = <4>;
			label = "lan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};
+0 −7
Original line number Diff line number Diff line
@@ -100,34 +100,27 @@

	ports {
		port@0 {
			reg = <0>;
			label = "lan4";
		};

		port@1 {
			reg = <1>;
			label = "lan3";
		};

		port@2 {
			reg = <2>;
			label = "lan2";
		};

		port@3 {
			reg = <3>;
			label = "lan1";
		};

		port@4 {
			reg = <4>;
			label = "wan";
		};

		port@5 {
			reg = <5>;
			label = "cpu";
			ethernet = <&gmac0>;
		};
	};
};
Loading