From 960a30092204fa8f1901f0c2184ba0c3563797ce Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Wed, 23 Dec 2020 00:37:53 +0800 Subject: [PATCH] =?UTF-8?q?ipq40xx=EF=BC=9A=E4=BB=8ELED=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E4=B8=AD=E5=88=A0=E9=99=A4=E5=9E=8B=E5=8F=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ipq40xx/base-files/etc/board.d/01_leds | 97 ++++++++----------- .../arm/boot/dts/qcom-ipq4019-cm520-79f.dts | 86 +++++++++++++--- .../arm/boot/dts/qcom-ipq4019-r619ac.dtsi | 6 +- 3 files changed, 116 insertions(+), 73 deletions(-) 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 index 0144b3e7..0d6a009b 100755 --- a/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/root/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -8,86 +8,75 @@ board_config_update board=$(board_name) -boardname="${board##*,}" case "$board" in alfa-network,ap120c-ac) - ucidef_set_led_netdev "wan" "WAN" "${boardname}:amber:wan" "eth1" + ucidef_set_led_netdev "wan" "WAN" "amber:wan" "eth1" ;; asus,rt-ac58u) - ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "${boardname}:blue:lan" "switch0" "0x1e" - ;; -asus,rt-acrh17) - ucidef_set_led_default "status" "STATUS" "${boardname}:blue:status" "1" - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy1tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5g" "phy0tpt" - ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "${boardname}:blue:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "${boardname}:blue:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "${boardname}:blue:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "${boardname}:blue:lan4" "switch0" "0x10" + 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" "fritz4040:green:wlan" "phy0tpt" "phy1tpt" - ucidef_set_led_netdev "wan" "WAN" "fritz4040:green:wan" "eth1" - ucidef_set_led_switch "lan" "LAN" "fritz4040:green:lan" "switch0" "0x1e" + 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" "${boardname}:green:wlan" "phy0tpt" + 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" "${boardname}:blue:lan" "eth0" - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:yellow:wlan5g" "phy1tpt" - ucidef_set_led_default "mesh" "MESH" "${boardname}:blue:mesh" "0" + 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" "${boardname}:blue:lan1" "eth0" - ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:blue:lan2" "eth1" + 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" "${boardname}:green:wlan2G" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" - ucidef_set_led_netdev "lan1" "LAN1" "${boardname}:green:lan1" "eth0" - ucidef_set_led_netdev "lan2" "LAN2" "${boardname}:green:lan2" "eth1" + 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" "${boardname}:blue:wan" "eth1" - ucidef_set_led_switch "lan1" "LAN1" "${boardname}:blue:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "${boardname}:blue:lan2" "switch0" "0x08" + 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" "${boardname}:blue:power" "1" - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:blue:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:blue:wlan5g" "phy1tpt" - ucidef_set_led_netdev "wan" "WAN" "${boardname}:blue:wan" "eth1" + 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" ;; -netgear,ex6100v2 |\ -netgear,ex6150v2) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "ex61x0v2:green:router" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "ex61x0v2:green:client" "phy1tpt" - ;; p2w,r619ac |\ p2w,r619ac-128m) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "r619ac:blue:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "r619ac:blue:wlan5g" "phy1tpt" + 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" "e2600ac:green:wlan0" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN1" "e2600ac:green:wlan1" "phy1tpt" - ;; -zyxel,nbg6617) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" - ;; -zyxel,wre6606) - ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt" - ;; -*) + ucidef_set_led_wlan "wlan2g" "WLAN0" "green:wlan0" "phy0tpt" + ucidef_set_led_wlan "wlan5g" "WLAN1" "green:wlan1" "phy1tpt" ;; esac 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"; };