From e62818f6dd9cf1c58b972caa885dccf4465e9b39 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 23 Dec 2020 00:41:55 +0800 Subject: [PATCH] ipq40xx: remove model name from LED labels MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在LED文件移除板卡名称 --- .../ipq40xx/base-files/etc/board.d/01_leds | 85 ++++++++++++++++++ .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 86 +++++++++++++++---- .../arm/boot/dts/qcom-ipq4019-r619ac.dtsi | 6 +- 3 files changed, 158 insertions(+), 19 deletions(-) create mode 100755 root/target/linux/ipq40xx/base-files/etc/board.d/01_leds diff --git a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds new file mode 100755 index 00000000..0d6a009b --- /dev/null +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -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 \ No newline at end of file diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts index 019a8a19..ef625e1d 100644 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts @@ -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"; -}; +}; \ No newline at end of file diff --git a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi index 81018dd0..42a186f6 100644 --- a/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi +++ b/root/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi @@ -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"; };