[openwrt/openwrt] rockchip: add led and network config to nanopi r6s

LEDE Commits lede-commits at lists.infradead.org
Sun Aug 11 10:00:11 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c609c3bd6ef4b7ba7ddcd346c87e2cff3602067f

commit c609c3bd6ef4b7ba7ddcd346c87e2cff3602067f
Author: Ben Whitten <ben.whitten at gmail.com>
AuthorDate: Tue Jun 4 19:21:36 2024 +0100

    rockchip: add led and network config to nanopi r6s
    
    We need to configure the led and network config for this board on
    start as per the others
    
    Signed-off-by: Ben Whitten <ben.whitten at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15607
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/rockchip/armv8/base-files/etc/board.d/01_leds          | 5 +++++
 target/linux/rockchip/armv8/base-files/etc/board.d/02_network       | 6 +++++-
 .../rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity | 3 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
index ef89461056..6f6dfbf73e 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
@@ -28,6 +28,11 @@ friendlyarm,nanopi-r5s)
 	ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth1"
 	ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth2"
 	;;
+friendlyarm,nanopi-r6s)
+	ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1"
+	ucidef_set_led_netdev "lan1" "LAN1" "lan1_led" "eth2"
+	ucidef_set_led_netdev "lan2" "LAN2" "lan2_led" "eth0"
+	;;
 esac
 
 board_config_flush
diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
index f1192c9371..506ef67245 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
@@ -24,6 +24,9 @@ rockchip_setup_interfaces()
 	friendlyarm,nanopi-r5s)
 		ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
 		;;
+	friendlyarm,nanopi-r6s)
+		ucidef_set_interfaces_lan_wan 'eth0 eth2' 'eth1'
+		;;
 	sinovoip,rk3568-bpi-r2pro)
 		ucidef_set_interfaces_lan_wan 'lan0 lan1 lan2 lan3' 'eth0'
 		;;
@@ -57,7 +60,8 @@ rockchip_setup_macs()
 		wan_mac=$(get_mac_binary "/sys/bus/i2c/devices/2-0051/eeprom" 0xfa)
 		lan_mac=$(macaddr_setbit_la "$wan_mac")
 		;;
-	friendlyarm,nanopi-r5c)
+	friendlyarm,nanopi-r5c|\
+	friendlyarm,nanopi-r6s)
 		wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
 		;;
diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
index 8bbce1c328..5716aaf496 100644
--- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
+++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
@@ -49,7 +49,8 @@ sinovoip,rk3568-bpi-r2pro)
 	set_interface_core 2 "eth0"
 	set_interface_core 4 "eth1"
 	;;
-friendlyarm,nanopi-r5s)
+friendlyarm,nanopi-r5s|\
+friendlyarm,nanopi-r6s)
 	set_interface_core 2 "eth0"
 	set_interface_core 4 "eth1"
 	set_interface_core 8 "eth2"




More information about the lede-commits mailing list