From 085f66de9a1e0cba44eb15deb4f4803f1ac2286f Mon Sep 17 00:00:00 2001
From: Jan Hoffmann <jan@3e8.eu>
Date: Sun, 26 May 2019 15:01:09 +0200
Subject: ramips: create R6220 dtsi and improve WNDR3700v5 support

The R6220 and WNDR3700v5 are identical apart from using NAND/NOR flash and
having a different casing. This adds a new cleaned up R6220.dtsi with the
common bits for both devices. Both devices now have feature parity.

Performed cleanup:
 * generic DTS node names
 * regulator for usb power
 * added missing pinctrl groups
 * use switch port instead of VLAN as trigger for WAN LED

Fixes for WNDR3700v5:
 * all LEDS work
 * correct ethernet MAC addresses

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
---
 target/linux/ramips/base-files/etc/board.d/01_leds    | 5 +++--
 target/linux/ramips/base-files/etc/board.d/02_network | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

(limited to 'target/linux/ramips/base-files')

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds
index 24234dfddd..1b02088ed2 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -287,8 +287,9 @@ px-4885-8M)
 	set_wifi_led "px-4885:orange:wifi"
 	;;
 r6220|\
-netgear,r6350)
-	ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2
+netgear,r6350|\
+wndr3700v5)
+	ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10"
 	set_wifi_led "$boardname:green:wifi"
 	;;
 rakwireless,rak633)
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network
index 9c9f2bef9c..aa0816c9cc 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -622,7 +622,8 @@ ramips_setup_macs()
 		wan_mac=$(mtd_get_mac_binary factory 46)
 		;;
 	r6220|\
-	netgear,r6350)
+	netgear,r6350|\
+	wndr3700v5)
 		wan_mac=$(mtd_get_mac_binary factory 4)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
 		;;
-- 
cgit v1.2.3