From f4659685c5f606e0e7ce43596745bb873ed1cc3c Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 4 Sep 2021 12:15:18 +0800 Subject: [PATCH] ramips: mt7621: devices typo fixes Fixes: a3c941d ("ramips: add ZTE e8820s support") --- .../linux/ramips/dts/mt7620a_fon_fon2601.dts | 1 + .../linux/ramips/dts/mt7621_hiwifi_hc5962.dts | 30 ++++++++++++------- target/linux/ramips/dts/mt7621_zte_e8820s.dts | 18 +++++------ target/linux/ramips/image/mt7621.mk | 1 + .../mt7620/base-files/lib/upgrade/platform.sh | 2 -- .../mt7621/base-files/etc/board.d/01_leds | 8 ++--- .../mt7621/base-files/etc/board.d/02_network | 5 +--- 7 files changed, 35 insertions(+), 30 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts index 373205e72..7dba15cad 100644 --- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts +++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts @@ -149,6 +149,7 @@ &pcie { status = "okay"; }; + &pcie0 { wifi@0,0 { compatible = "pci14c3,7662"; diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts index 0bc29b31b..774fb93d9 100644 --- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts +++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts @@ -129,18 +129,28 @@ }; }; -ðernet { - compatible = "mediatek,ralink-mt7621-eth"; - mediatek,switch = <&gsw>; -}; - &switch0 { - /delete-property/ compatible; - phy-mode = "rgmii"; -}; + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; -&gsw { - compatible = "mediatek,ralink-mt7621-gsw"; + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "wan"; + }; + }; }; &state_default { diff --git a/target/linux/ramips/dts/mt7621_zte_e8820s.dts b/target/linux/ramips/dts/mt7621_zte_e8820s.dts index 5a0012441..2e775a7c4 100644 --- a/target/linux/ramips/dts/mt7621_zte_e8820s.dts +++ b/target/linux/ramips/dts/mt7621_zte_e8820s.dts @@ -1,4 +1,4 @@ -/dts-v1/; +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT #include "mt7621.dtsi" @@ -24,23 +24,23 @@ leds { compatible = "gpio-leds"; + led_power: power { + label = "white:power"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + led_sys: sys { - label = "e8820s:white:sys"; + label = "white:sys"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; }; - led_power: power { - label = "e8820s:white:power"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - }; - wlan2g { - label = "e8820s:white:wlan2g"; + label = "white:wlan2g"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; }; wlan5g { - label = "e8820s:white:wlan5g"; + label = "white:wlan5g"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 442171f4a..15746d73c 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1745,6 +1745,7 @@ endef TARGET_DEVICES += zyxel_wap6805 define Device/zte_e8820s + $(Device/dsa-migration) $(Device/uimage-lzma-loader) BLOCKSIZE := 128k PAGESIZE := 2048 diff --git a/target/linux/ramips/mt7620/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7620/base-files/lib/upgrade/platform.sh index 551931228..40272d4a7 100755 --- a/target/linux/ramips/mt7620/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7620/base-files/lib/upgrade/platform.sh @@ -33,8 +33,6 @@ platform_do_upgrade() { xiaomi,miwifi-r3) # this make it compatible with breed dd if=/dev/mtd0 bs=64 count=1 2>/dev/null | grep -qi breed && CI_KERNPART_EXT="kernel_stock" - dd if=/dev/mtd7 bs=64 count=1 2>/dev/null | grep -o MIPS.*Linux | grep -qi X-WRT && CI_KERNPART_EXT="kernel_stock" - dd if=/dev/mtd7 bs=64 count=1 2>/dev/null | grep -o MIPS.*Linux | grep -qi NATCAP && CI_KERNPART_EXT="kernel0_rsvd" nand_do_upgrade "$1" ;; *) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds index 6fe6327dd..03dbd8a99 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds @@ -126,11 +126,9 @@ youhua,wr1200js) ucidef_set_led_netdev "internet" "INTERNET" "green:wan" "wan" ;; zte,e8820s) - ucidef_set_led_netdev "sys" "SYS_LED" "$boardname:white:sys" "eth0" "tx rx" - ucidef_set_led_default "power" "POWER_LED" "$boardname:white:power" "0x01" - ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:white:wlan2g" "ra0" - ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:white:wlan5g" "rai0" - ;; + ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "white:wlan2g" "ra0" + ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "white:wlan5g" "rai0" + ;; esac board_config_flush diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 944f43fb2..f59b9aa85 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -22,6 +22,7 @@ ramips_setup_interfaces() ucidef_set_interface_lan "lan" ;; ampedwireless,ally-r1900k|\ + hiwifi,hc5962|\ xiaomi,mi-router-3-pro) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan" ;; @@ -54,10 +55,6 @@ ramips_setup_interfaces() gnubee,gb-pc2) ucidef_set_interface_lan "lan1 lan2" ;; - hiwifi,hc5962) - ucidef_add_switch "switch0" \ - "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" - ;; linksys,re6500|\ netgear,wac104) ucidef_set_interface_lan "lan1 lan2 lan3 lan4"