From e6fdab97ca43c794ebf3aa01b7891fff7c9e1712 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Mon, 12 Feb 2024 23:27:35 +0800 Subject: [PATCH] ramips: remove pb-boot layout for jcg q20 If you need webUI recovery interface, use this instead: https://github.com/DragonBluep/uboot-mt7621 Signed-off-by: Tianling Shen --- .../ramips/dts/mt7621_jcg_q20-pb-boot.dts | 78 ------ target/linux/ramips/dts/mt7621_jcg_q20.dts | 230 +++++++++++++----- target/linux/ramips/dts/mt7621_jcg_q20.dtsi | 117 --------- target/linux/ramips/image/mt7621.mk | 6 - .../mt7621/base-files/etc/board.d/02_network | 1 - .../mt7621/base-files/lib/upgrade/platform.sh | 1 - 6 files changed, 168 insertions(+), 265 deletions(-) delete mode 100644 target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts delete mode 100644 target/linux/ramips/dts/mt7621_jcg_q20.dtsi diff --git a/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts b/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts deleted file mode 100644 index aa0df66e92..0000000000 --- a/target/linux/ramips/dts/mt7621_jcg_q20-pb-boot.dts +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "mt7621_jcg_q20.dtsi" - -/ { - compatible = "jcg,q20-pb-boot", "mediatek,mt7621-soc"; - model = "JCG Q20 (pb-boot)"; -}; - -&partitions { - partition@0 { - label = "Bootloader"; - reg = <0x0 0x80000>; - }; - - partition@80000 { - label = "Nvram"; - reg = <0x80000 0x40000>; - read-only; - }; - - partition@c0000 { - label = "Bdata"; - reg = <0xc0000 0x40000>; - read-only; - }; - - factory: partition@100000 { - label = "Factory"; - reg = <0x100000 0x80000>; - read-only; - - compatible = "nvmem-cells"; - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; - - macaddr_factory_3fff4: macaddr@3fff4 { - compatible = "mac-base"; - reg = <0x3fff4 0x6>; - #nvmem-cell-cells = <1>; - }; - - macaddr_factory_3fffa: macaddr@3fffa { - compatible = "mac-base"; - reg = <0x3fffa 0x6>; - #nvmem-cell-cells = <1>; - }; - }; - }; - - partition@180000 { - label = "crash"; - reg = <0x180000 0x40000>; - read-only; - }; - - partition@1c0000 { - label = "crash_log"; - reg = <0x1c0000 0x40000>; - read-only; - }; - - partition@200000 { - label = "kernel"; - reg = <0x200000 0x400000>; - }; - - partition@600000 { - label = "ubi"; - reg = <0x600000 0x7980000>; - }; -}; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts index 894341c792..03e0eab25b 100644 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dts +++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts @@ -1,11 +1,59 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7621_jcg_q20.dtsi" +#include "mt7621.dtsi" + +#include +#include +#include / { compatible = "jcg,q20", "mediatek,mt7621-soc"; model = "JCG Q20"; + aliases { + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + label-mac-device = &gmac0; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status_red { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; + }; + + led_status_blue: status_blue { + function = LED_FUNCTION_STATUS; + color = ; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + ubi-concat { compatible = "mtd-concat"; devices = <&ubiconcat0 &ubiconcat1>; @@ -23,80 +71,138 @@ }; }; -&partitions { - partition@0 { - label = "Bootloader"; - reg = <0x0 0x80000>; - read-only; - }; +&nand { + status = "okay"; - partition@80000 { - label = "Config"; - reg = <0x80000 0x80000>; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - factory: partition@100000 { - label = "Factory"; - reg = <0x100000 0x80000>; - read-only; + partition@0 { + label = "Bootloader"; + reg = <0x0 0x80000>; + read-only; + }; - compatible = "nvmem-cells"; - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; + partition@80000 { + label = "Config"; + reg = <0x80000 0x80000>; + }; - eeprom_factory_0: eeprom@0 { - reg = <0x0 0xe00>; - }; + factory: partition@100000 { + label = "Factory"; + reg = <0x100000 0x80000>; + read-only; - macaddr_factory_3fff4: macaddr@3fff4 { - compatible = "mac-base"; - reg = <0x3fff4 0x6>; - #nvmem-cell-cells = <1>; - }; + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; - macaddr_factory_3fffa: macaddr@3fffa { - compatible = "mac-base"; - reg = <0x3fffa 0x6>; - #nvmem-cell-cells = <1>; + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_3fff4: macaddr@3fff4 { + reg = <0x3fff4 0x6>; + }; + + macaddr_factory_3fffa: macaddr@3fffa { + reg = <0x3fffa 0x6>; + }; }; }; - }; - partition@180000 { - label = "kernel"; - reg = <0x180000 0x400000>; - }; + partition@180000 { + label = "kernel"; + reg = <0x180000 0x400000>; + }; - ubiconcat0: partition@580000 { - label = "ubiconcat0"; - reg = <0x580000 0x1c00000>; - }; + ubiconcat0: partition@580000 { + label = "ubiconcat0"; + reg = <0x580000 0x1c00000>; + }; - partition@2180000 { - label = "firmware_backup"; - reg = <0x2180000 0x2000000>; - }; + partition@2180000 { + label = "firmware_backup"; + reg = <0x2180000 0x2000000>; + }; - partition@4180000 { - label = "rootfs_data_back"; - reg = <0x4180000 0x80000>; - read-only; - }; + partition@4180000 { + label = "rootfs_data_back"; + reg = <0x4180000 0x80000>; + read-only; + }; - partition@4200000 { - label = "nvram_config"; - reg = <0x4200000 0x80000>; - read-only; - }; + partition@4200000 { + label = "nvram_config"; + reg = <0x4200000 0x80000>; + read-only; + }; - ubiconcat1: partition@4280000 { - label = "ubiconcat1"; - reg = <0x4280000 0x3d00000>; - }; + ubiconcat1: partition@4280000 { + label = "ubiconcat1"; + reg = <0x4280000 0x3d00000>; + }; - /* - * last 512 KiB are for the bad block table - */ + /* + * last 512 KiB are for the bad block table + */ + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + mediatek,disable-radar-background; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_3fff4>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy0>; + + nvmem-cells = <&macaddr_factory_3fffa>; + nvmem-cell-names = "mac-address"; +}; + +&mdio { + ethphy0: ethernet-phy@0 { + reg = <0>; + }; +}; + +&switch0 { + ports { + port@1 { + status = "okay"; + label = "lan1"; + }; + + port@4 { + status = "okay"; + label = "lan2"; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; }; diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dtsi b/target/linux/ramips/dts/mt7621_jcg_q20.dtsi deleted file mode 100644 index 843fd7b870..0000000000 --- a/target/linux/ramips/dts/mt7621_jcg_q20.dtsi +++ /dev/null @@ -1,117 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "mt7621.dtsi" - -#include -#include - -/ { - aliases { - led-boot = &led_status_red; - led-failsafe = &led_status_red; - led-running = &led_status_blue; - led-upgrade = &led_status_blue; - label-mac-device = &gmac0; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - leds { - compatible = "gpio-leds"; - - led_status_red: status_red { - function = LED_FUNCTION_STATUS; - color = ; - gpios = <&gpio 14 GPIO_ACTIVE_HIGH>; - }; - - led_status_blue: status_blue { - function = LED_FUNCTION_STATUS; - color = ; - gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&nand { - status = "okay"; - - partitions: partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie1 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; - mediatek,disable-radar-background; - }; -}; - -&gmac0 { - nvmem-cells = <&macaddr_factory_3fff4 0>; - nvmem-cell-names = "mac-address"; -}; - -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy0>; - - nvmem-cells = <&macaddr_factory_3fffa 0>; - nvmem-cell-names = "mac-address"; -}; - -&mdio { - ethphy0: ethernet-phy@0 { - reg = <0>; - }; -}; - -&switch0 { - ports { - port@1 { - status = "okay"; - label = "lan1"; - }; - - port@4 { - status = "okay"; - label = "lan2"; - }; - }; -}; - -&state_default { - gpio { - groups = "jtag", "wdt"; - function = "gpio"; - }; -}; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index c103492194..90647219f3 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1502,12 +1502,6 @@ define Device/jcg_q20 endef TARGET_DEVICES += jcg_q20 -define Device/jcg_q20-pb-boot - $(Device/jcg_q20) - DEVICE_MODEL += (pb-boot) -endef -TARGET_DEVICES += jcg_q20-pb-boot - define Device/jcg_y2 $(Device/dsa-migration) $(Device/uimage-lzma-loader) 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 d53a6f3dbe..8ba93ca649 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 @@ -74,7 +74,6 @@ ramips_setup_interfaces() iodata,wn-deax1800gr|\ iptime,a3002mesh|\ jcg,q20|\ - jcg,q20-pb-boot|\ jdcloud,re-sp-01b|\ lenovo,newifi-d1|\ mikrotik,routerboard-m33g|\ diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh index d3614bde8b..4168ad1ded 100755 --- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh @@ -80,7 +80,6 @@ platform_do_upgrade() { iptime,ax2004m|\ iptime,t5004|\ jcg,q20|\ - jcg,q20-pb-boot|\ linksys,e5600|\ linksys,e7350|\ linksys,ea6350-v4|\