1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

ipq40xx: remove model name from LED labels

在LED文件移除板卡名称
This commit is contained in:
suyuan 2020-12-23 00:41:55 +08:00
parent 2cc59560c7
commit e62818f6dd
3 changed files with 158 additions and 19 deletions

View file

@ -0,0 +1,85 @@
#!/bin/sh
#
# Copyright (C) 2015 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
alfa-network,ap120c-ac)
ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1"
;;
asus,rt-ac58u)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
;;
avm,fritzbox-4040)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt" "phy1tpt"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x1e"
;;
avm,fritzbox-7530 |\
glinet,gl-b1300)
ucidef_set_led_wlan "wlan" "WLAN" "green:wlan" "phy0tpt"
;;
edgecore,ecw5211 |\
zyxel,nbg6617 |\
zyxel,wre6606)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
;;
edgecore,oap100)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
;;
engenius,eap1300)
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "yellow:wlan5g" "phy1tpt"
ucidef_set_led_default "mesh" "MESH" "blue:mesh" "0"
;;
engenius,eap2200)
ucidef_set_led_netdev "lan1" "LAN1" "blue:lan1" "eth0"
ucidef_set_led_netdev "lan2" "LAN2" "blue:lan2" "eth1"
;;
engenius,ens620ext)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy1tpt"
ucidef_set_led_netdev "lan1" "LAN1" "green:lan1" "eth0"
ucidef_set_led_netdev "lan2" "LAN2" "green:lan2" "eth1"
;;
mobipromo,cm520-79f)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08"
;;
pangu,l1000)
ucidef_set_led_default "power" "POWER" "blue:power" "1"
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
;;
p2w,r619ac |\
p2w,r619ac-128m)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "blue:wlan2g" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "blue:wlan5g" "phy1tpt"
;;
netgear,ex6100v2 |\
netgear,ex6150v2)
ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:router" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:client" "phy1tpt"
;;
qxwlan,e2600ac-c1 |\
qxwlan,e2600ac-c2)
ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt"
ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt"
;;
esac
board_config_flush
exit 0

View file

@ -16,10 +16,6 @@
led-upgrade = &led_sys;
};
chosen {
bootargs-append = " ubi.block=0,1 root=/dev/ubiblock0_1";
};
soc {
rng@22000 {
status = "okay";
@ -133,41 +129,41 @@
leds {
compatible = "gpio-leds";
led_usb: usb {
label = "cm520-79f:blue:usb";
usb {
label = "blue:usb";
gpios = <&tlmm 10 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "usbport";
trigger-sources = <&usb3_port1>, <&usb3_port2>, <&usb2_port1>;
};
led_sys: can {
label = "cm520-79f:blue:can";
label = "blue:can";
gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>;
};
wan {
label = "cm520-79f:blue:wan";
label = "blue:wan";
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "cm520-79f:blue:lan1";
label = "blue:lan1";
gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
};
lan2 {
label = "cm520-79f:blue:lan2";
label = "blue:lan2";
gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
};
wlan2g {
label = "cm520-79f:blue:wlan2g";
label = "blue:wlan2g";
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "cm520-79f:blue:wlan5g";
label = "blue:wlan5g";
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
@ -220,8 +216,66 @@
#size-cells = <1>;
partition@0 {
label = "Bootloader";
reg = <0x0 0xb00000>;
label = "SBL1";
reg = <0x0 0x100000>;
read-only;
};
partition@100000 {
label = "MIBIB";
reg = <0x100000 0x100000>;
read-only;
};
partition@200000 {
label = "BOOTCONFIG";
reg = <0x200000 0x100000>;
};
partition@300000 {
label = "QSEE";
reg = <0x300000 0x100000>;
read-only;
};
partition@400000 {
label = "QSEE_1";
reg = <0x400000 0x100000>;
read-only;
};
partition@500000 {
label = "CDT";
reg = <0x500000 0x80000>;
read-only;
};
partition@580000 {
label = "CDT_1";
reg = <0x580000 0x80000>;
read-only;
};
partition@600000 {
label = "BOOTCONFIG1";
reg = <0x600000 0x80000>;
};
partition@680000 {
label = "APPSBLENV";
reg = <0x680000 0x80000>;
};
partition@700000 {
label = "APPSBL";
reg = <0x700000 0x200000>;
read-only;
};
partition@900000 {
label = "APPSBL_1";
reg = <0x900000 0x200000>;
read-only;
};
art: partition@b00000 {
@ -231,7 +285,7 @@
};
partition@b80000 {
label = "rootfs";
label = "ubi";
reg = <0xb80000 0x7480000>;
};
};
@ -297,4 +351,4 @@
&wifi1 {
status = "okay";
qcom,ath10k-calibration-variant = "CM520-79F";
};
};

View file

@ -84,18 +84,18 @@
pinctrl-names = "default";
led_sys: sys {
label = "r619ac:blue:sys";
label = "blue:sys";
gpios = <&tlmm 39 GPIO_ACTIVE_HIGH>;
};
wlan2g {
label = "r619ac:blue:wlan2g";
label = "blue:wlan2g";
gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
wlan5g {
label = "r619ac:blue:wlan5g";
label = "blue:wlan5g";
gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy1tpt";
};