[PATCH 2/2] [WIP]: ath79: remove confusing switch only

Randy Li ayaka at soulik.info
Wed Oct 11 13:59:36 PDT 2023


SW_ONLY_MODE in 9.7.1 Ethernet Configuration means the GMAC0 didn't
connect to switch, it is possible for AR9344 that GMAC0 connects
to an external PHY. But it is not case of the most of devices
here.

Signed-off-by: Randy Li <ayaka at soulik.info>
---
 .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts  |  4 ++++
 target/linux/ath79/dts/ar9344_tplink_cpe.dtsi |  4 ++++
 .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts | 20 +++++++++----------
 .../ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts |  4 ++++
 .../linux/ath79/dts/ar9344_wd_mynet-n600.dts  |  5 ++++-
 .../ath79/dts/ar9344_zbtlink_zbt-wd323.dts    |  4 ++++
 6 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
index 0fc3488445..b83d284e60 100644
--- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts
@@ -96,6 +96,10 @@
 	mac-address-increment = <(-1)>;
 };
 
+&swphy4 {
+	status = "okay";
+};
+
 &eth1 {
 	phy-handle = <&swphy4>;
 
diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
index 9d8873ddaf..a120d25ecc 100644
--- a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
@@ -88,6 +88,10 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&swphy4 {
+	status = "okay";
+};
+
 &eth0 {
 	status = "okay";
 
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
index 1600e12b64..2aaf254cbe 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
@@ -53,18 +53,8 @@
 	mac-address-increment = <1>;
 };
 
-&eth1 {
+&swphy4 {
 	status = "okay";
-
-	nvmem-cells = <&macaddr_uboot_1fc00>;
-	nvmem-cell-names = "mac-address";
-	mac-address-increment = <(-1)>;
-
-	gmac-config {
-		device = <&gmac>;
-		switch-phy-swap = <0>;
-		switch-only-mode = <1>;
-	};
 };
 
 &eth0 {
@@ -76,3 +66,11 @@
 	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&eth1 {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <(-1)>;
+};
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts
index 49526fb6d2..e16c0700ca 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wr841hp-v2.dts
@@ -137,6 +137,10 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&swphy0 {
+	status = "okay";
+};
+
 &eth0 {
 	status = "okay";
 
diff --git a/target/linux/ath79/dts/ar9344_wd_mynet-n600.dts b/target/linux/ath79/dts/ar9344_wd_mynet-n600.dts
index 3c0e9c56a1..c7ad149054 100644
--- a/target/linux/ath79/dts/ar9344_wd_mynet-n600.dts
+++ b/target/linux/ath79/dts/ar9344_wd_mynet-n600.dts
@@ -91,6 +91,10 @@
 	status = "okay";
 };
 
+&swphy0 {
+	status = "okay";
+};
+
 &eth0 {
 	status = "okay";
 
@@ -99,7 +103,6 @@
 	gmac-config {
 		device = <&gmac>;
 		switch-phy-swap = <1>;
-		switch-only-mode = <1>;
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
index 8dc1ceb666..b1c3206eca 100644
--- a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
+++ b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
@@ -89,6 +89,10 @@
 	status = "okay";
 };
 
+&swphy4 {
+	status = "okay";
+};
+
 &eth0 {
 	status = "okay";
 	phy-handle = <&swphy4>;
-- 
2.41.0




More information about the openwrt-devel mailing list