[openwrt/openwrt] bmips: dgnd3700v2: enable external BCM53125 switch

LEDE Commits lede-commits at lists.infradead.org
Tue Mar 21 12:55:10 PDT 2023


noltari pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/61f3c3b1eebd598b62f03cb2c63dde965624e0f1

commit 61f3c3b1eebd598b62f03cb2c63dde965624e0f1
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Mon May 23 20:52:53 2022 +0200

    bmips: dgnd3700v2: enable external BCM53125 switch
    
    The Netgear DGND3700v2 has an external BCM53125 switch which can now be enabled
    as a DSA disjoint switch tree setup.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 .../bmips/dts/bcm6362-netgear-dgnd3700-v2.dts      | 56 +++++++++++++++++++++-
 .../bmips/nand/base-files/etc/board.d/02_network   |  2 +-
 2 files changed, 56 insertions(+), 2 deletions(-)

diff --git a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
index b99fecaaa6..d0befc2c34 100644
--- a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
+++ b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
@@ -148,6 +148,58 @@
 	};
 };
 
+&mdio_ext {
+	switch at 1e {
+		compatible = "brcm,bcm53125";
+		reg = <30>;
+
+		dsa,member = <1 0>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				label = "lan1";
+			};
+
+			port at 1 {
+				reg = <1>;
+				label = "lan2";
+			};
+
+			port at 2 {
+				reg = <2>;
+				label = "lan3";
+			};
+
+			port at 3 {
+				reg = <3>;
+				label = "lan4";
+			};
+
+			port at 4 {
+				reg = <4>;
+				label = "wan";
+			};
+
+			port at 8 {
+				reg = <8>;
+				label = "cpu";
+
+				phy-mode = "rgmii";
+				ethernet = <&switch0port4>;
+
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
+		};
+	};
+};
+
 &nflash {
 	status = "okay";
 
@@ -224,8 +276,10 @@
 };
 
 &switch0 {
+	dsa,member = <0 0>;
+
 	ports {
-		port at 4 {
+		switch0port4: port at 4 {
 			reg = <4>;
 			label = "extsw";
 
diff --git a/target/linux/bmips/nand/base-files/etc/board.d/02_network b/target/linux/bmips/nand/base-files/etc/board.d/02_network
index e853621665..3134116bc2 100644
--- a/target/linux/bmips/nand/base-files/etc/board.d/02_network
+++ b/target/linux/bmips/nand/base-files/etc/board.d/02_network
@@ -11,7 +11,7 @@ comtrend,vr-3032u)
 	;;
 netgear,dgnd3700-v2)
 	ucidef_set_bridge_device switch
-	ucidef_set_interface_lan "extsw"
+	ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
 	;;
 esac
 




More information about the lede-commits mailing list