[PATCH 3/3] ramips: hlk-7621a-evb: rename switch ports

Reinhard Max reinhard at m4x.de
Wed Apr 13 05:05:54 PDT 2022


Rename the switch ports from 'lan[1..4]' and 'wan' to 'p[0..4]'. This
matches the SoC documentation and the silkscreen for the port LEDs on
the module. There is no LAN/WAN labeling on the board itself.

This eval board is so universal (many additional interfaces broken out
on pin headers, mPCIe slot, USB, etc.) that chances are high that is
being used for other things than a traditional LAN/WAN router, and then
the 'wan' naming of the 5th port might get into the way, so better stick
with the SoC naming.

Signed-off-by: Reinhard Max <reinhard at m4x.de>
---
 .../linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts   | 10 +++++-----
 .../ramips/mt7621/base-files/etc/board.d/02_network    |  3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
index 20e99352f3..6b22e04b35 100644
--- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
+++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
@@ -65,27 +65,27 @@
 	ports {
 		port at 0 {
 			status = "okay";
-			label = "lan1";
+			label = "p0";
 		};
 
 		port at 1 {
 			status = "okay";
-			label = "lan2";
+			label = "p1";
 		};
 
 		port at 2 {
 			status = "okay";
-			label = "lan3";
+			label = "p2";
 		};
 
 		port at 3 {
 			status = "okay";
-			label = "lan4";
+			label = "p3";
 		};
 
 		port at 4 {
 			status = "okay";
-			label = "wan";
+			label = "p4";
 		};
 	};
 };
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 1fc0ccdd5b..eb931defaa 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -55,6 +55,9 @@ ramips_setup_interfaces()
 	gnubee,gb-pc2)
 		ucidef_set_interface_lan "lan1 lan2"
 		;;
+	hilink,hlk-7621a-evb)
+		ucidef_set_interface_lan "p0 p1 p2 p3 p4"
+		;;
 	linksys,re6500|\
 	netgear,wac104)
 		ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
-- 
2.34.1




More information about the openwrt-devel mailing list