From 9dbca6bf6e6e088afd18fb532ed9135c21aec1cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 15 Mar 2022 12:40:40 +0100 Subject: [PATCH 01/17] uboot-bcm4908: use "xxd" from staging_dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes: bash: xxd: command not found on hosts without xxd installed. Signed-off-by: Rafał Miłecki --- package/boot/uboot-bcm4908/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile index 489b4d69bf..dc862f4e32 100644 --- a/package/boot/uboot-bcm4908/Makefile +++ b/package/boot/uboot-bcm4908/Makefile @@ -32,10 +32,10 @@ define Build/Prepare $(call Build/Prepare/Default) mkdir -p $(PKG_BUILD_DIR)/include/generated/ ( cd $(PKG_BUILD_DIR)/board/broadcom/bcmbca/httpd/html/ && \ - xxd -i index.html > ../../../../../include/generated/index.h && \ - xxd -i flashing.html > ../../../../../include/generated/flashing.h && \ - xxd -i fail.html > ../../../../../include/generated/fail.h && \ - xxd -i 404.html > ../../../../../include/generated/404.h ) + $(STAGING_DIR_HOST)/bin/xxd -i index.html > ../../../../../include/generated/index.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i flashing.html > ../../../../../include/generated/flashing.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i fail.html > ../../../../../include/generated/fail.h && \ + $(STAGING_DIR_HOST)/bin/xxd -i 404.html > ../../../../../include/generated/404.h ) endef define Build/InstallDev From 3592aa85664040a118654555afb78659af756a4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 15 Mar 2022 14:30:20 +0100 Subject: [PATCH 02/17] uboot-bcm4908: update to the latest generic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 0625aad74d arm: dts: add ASUS GT-AX6000 6fb1cb624d arm: dts: add Netgear RAXE450 / RAXE550 Signed-off-by: Rafał Miłecki --- package/boot/uboot-bcm4908/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile index dc862f4e32..b226096184 100644 --- a/package/boot/uboot-bcm4908/Makefile +++ b/package/boot/uboot-bcm4908/Makefile @@ -7,9 +7,9 @@ PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git -PKG_SOURCE_DATE:=2022-03-03 -PKG_SOURCE_VERSION:=92e9eca819c9c898d9d2010e1a217726c42c8c47 -PKG_MIRROR_HASH:=11c37fe4c18d55e799153600d1cfd8ee9ca7da8326d0024c1d825f4a327c5f0d +PKG_SOURCE_DATE:=2022-03-15 +PKG_SOURCE_VERSION:=0625aad74d1f5b6f9c068955ad3fd7f6df635e50 +PKG_MIRROR_HASH:=0602e0e4f101ead206940eccca832b75191905c1e81290340a89b07dbee7a6ce include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk From f4c2dab544ec22fac6ab2de32aa5bb361c7566f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 15 Mar 2022 18:41:03 +0100 Subject: [PATCH 03/17] uboot-bcm4908: add BCM4912 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- package/boot/uboot-bcm4908/Makefile | 8 +++++++- .../200-configs-bcm94908-unset-CONFIG_SPL.patch | 14 +++++++++++++- ...support-for-ATF-when-compiling-U-Boot-wit.patch | 14 +++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile index b226096184..d6b689c9ce 100644 --- a/package/boot/uboot-bcm4908/Makefile +++ b/package/boot/uboot-bcm4908/Makefile @@ -25,8 +25,14 @@ define U-Boot/bcm4908 UBOOT_CONFIG:=bcm94908 endef +define U-Boot/bcm4912 + NAME:=Broadcom's BCM4912 + UBOOT_CONFIG:=bcm94912 +endef + UBOOT_TARGETS := \ - bcm4908 + bcm4908 \ + bcm4912 define Build/Prepare $(call Build/Prepare/Default) diff --git a/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch b/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch index 26189bc571..0b434f356a 100644 --- a/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch +++ b/package/boot/uboot-bcm4908/patches/200-configs-bcm94908-unset-CONFIG_SPL.patch @@ -23,7 +23,8 @@ shipped with every firmware. Signed-off-by: Rafał Miłecki --- configs/bcm94908_defconfig | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + configs/bcm94912_defconfig | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) --- a/configs/bcm94908_defconfig +++ b/configs/bcm94908_defconfig @@ -36,3 +37,14 @@ Signed-off-by: Rafał Miłecki CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_ENV_VARS_UBOOT_CONFIG=y CONFIG_TPL_SYS_MALLOC_F_LEN=0x11000 +--- a/configs/bcm94912_defconfig ++++ b/configs/bcm94912_defconfig +@@ -22,7 +22,7 @@ CONFIG_TPL_LIBCOMMON_SUPPORT=y + CONFIG_TPL_LIBGENERIC_SUPPORT=y + CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000 + CONFIG_NR_DRAM_BANKS=2 +-CONFIG_SPL=y ++# CONFIG_SPL is not set + CONFIG_SPL_LIBDISK_SUPPORT=y + CONFIG_ENV_VARS_UBOOT_CONFIG=y + CONFIG_TPL_SYS_MALLOC_F_LEN=0x10000 diff --git a/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch b/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch index 1e59705ac0..187ee96b18 100644 --- a/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch +++ b/package/boot/uboot-bcm4908/patches/201-Assume-TPL-support-for-ATF-when-compiling-U-Boot-wit.patch @@ -19,8 +19,9 @@ deal with compiling SPL or TPL. Signed-off-by: Rafał Miłecki --- arch/arm/mach-bcmbca/bcm4908/cpu.c | 2 +- + arch/arm/mach-bcmbca/bcm4912/cpu.c | 2 +- board/broadcom/bcmbca/board.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) + 3 files changed, 4 insertions(+), 4 deletions(-) --- a/arch/arm/mach-bcmbca/bcm4908/cpu.c +++ b/arch/arm/mach-bcmbca/bcm4908/cpu.c @@ -33,6 +34,17 @@ Signed-off-by: Rafał Miłecki void boot_secondary_cpu(unsigned long vector) { uint32_t cpu, nr_cpus = QUAD_CPUS; +--- a/arch/arm/mach-bcmbca/bcm4912/cpu.c ++++ b/arch/arm/mach-bcmbca/bcm4912/cpu.c +@@ -174,7 +174,7 @@ int bcmbca_get_boot_device(void) + return BOOT_DEVICE_NONE; + } + +-#if !defined(CONFIG_TPL_ATF) ++#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF) + void boot_secondary_cpu(unsigned long vector) + { + uint32_t cpu, nr_cpus = 4; --- a/board/broadcom/bcmbca/board.c +++ b/board/broadcom/bcmbca/board.c @@ -103,7 +103,7 @@ void board_spinor_init(void) From 2de86691b67ea73d858ec1c78757faae795691e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Tue, 15 Mar 2022 18:42:15 +0100 Subject: [PATCH 04/17] bcm4908: include U-Boot DTB files for ASUS GT-AX6000 & Netgear RAX220 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rafał Miłecki --- target/linux/bcm4908/image/bootfs-generic.its | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/target/linux/bcm4908/image/bootfs-generic.its b/target/linux/bcm4908/image/bootfs-generic.its index bd566d5d22..d32e094eb5 100644 --- a/target/linux/bcm4908/image/bootfs-generic.its +++ b/target/linux/bcm4908/image/bootfs-generic.its @@ -62,6 +62,28 @@ }; }; + fdt_GTAX6000 { + description = "dtb"; + data = /incbin/("${images_dir}/u-boot/GTAX6000.dtb"); + type = "flat_dt"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + + fdt_uboot_RAX220 { + description = "dtb"; + data = /incbin/("${images_dir}/u-boot/RAX220.dtb"); + type = "flat_dt"; + compression = "none"; + + hash-1 { + algo = "sha256"; + }; + }; + fdt_linux_RAX220 { description = "dtb"; data = /incbin/("${dts_dir}/broadcom/bcm4908/bcm4908-netgear-raxe500.dtb"); @@ -80,6 +102,18 @@ loadables = "atf", "uboot"; }; + conf_ub_GTAX6000 { + description = "GTAX6000"; + fdt = "fdt_GTAX6000"; + loadables = "atf", "uboot"; + }; + + conf_ub_RAX220 { + description = "RAX220"; + fdt = "fdt_uboot_RAX220"; + loadables = "atf", "uboot"; + }; + conf_lx_RAX220 { description = "BRCM 63xxx linux"; kernel = "kernel"; From 832b90216f5d9f5c825d7c89609fde9508d48d57 Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Wed, 16 Mar 2022 01:25:08 +0200 Subject: [PATCH 05/17] qoriq: enable I2C in target kernel config The I2C controller used in QorIQ PPC devices requires the mpc-i2c driver, which is enabled by the I2C_MPC kernel config symbol. Enable this and its dependencies in the target kernel config, as is done for the mpc85xx target. This fixes missing hwmon, rtc and tpm devices on the M300. Signed-off-by: Stijn Tintel --- target/linux/qoriq/config-5.10 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/qoriq/config-5.10 b/target/linux/qoriq/config-5.10 index 0a338ee9da..6a582bbcd5 100644 --- a/target/linux/qoriq/config-5.10 +++ b/target/linux/qoriq/config-5.10 @@ -177,6 +177,9 @@ CONFIG_HAS_IOPORT_MAP=y CONFIG_HWMON=y CONFIG_HW_CONSOLE=y CONFIG_HW_RANDOM=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_MPC=y CONFIG_ILLEGAL_POINTER_VALUE=0x5deadbeef0000000 CONFIG_INITRAMFS_SOURCE="" CONFIG_INPUT=y From be89c9eec4c28123b61ed020ad5b8b02905e73af Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Fri, 18 Feb 2022 00:23:45 +0100 Subject: [PATCH 06/17] ramips: mt7620: Add support for D-Link DWR-961 A1 The DWR-961 A1 Wireless Router is based on the MT7620A SoC. It's a merge of two Amit boards: DWR-960 with ethernet part of Lava LR-25G001. ROMID it's taken from Telenor branded version and it works with tested device. Images from D-Link site for this router are from DWR-953 and it have ROMID DLK6E2424001. I don't know if it's mistake on web-site or if it's will require different image. Specification: - MediaTek MT7620A (580 Mhz) - 128 MB of RAM - 16 MB of FLASH - 1x 802.11bgn radio - 1x 802.11ac radio (MT7612 mpcie card) - 5x 10/100/1000 Mbps Ethernet: 4xLAN and 1xWAN (QCA8337) - 2x internal, non-detachable antennas (Wifi 2.4G) - 3x external, detachable antennas (2x LTE, 1x Wifi 5G) - 1x LTE modem cat 6 - UART (J5) header on PCB (57600 8n1) - 13x LED, 2x button - JBOOT bootloader Installation: Apply factory image via http web-gui or JBOOT recovery page How to revert to OEM firmware: - push the reset button and turn on the power. Wait until LED start blinking (~10sec.) - upload original factory image via JBOOT http (IP: 192.168.123.254) Signed-off-by: Pawel Dembicki --- .../ramips/dts/mt7620a_dlink_dwr-960.dts | 174 +---------------- .../ramips/dts/mt7620a_dlink_dwr-961-a1.dts | 62 ++++++ .../ramips/dts/mt7620a_dlink_dwr-96x.dtsi | 178 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 15 ++ .../mt7620/base-files/etc/board.d/01_leds | 4 + .../mt7620/base-files/etc/board.d/02_network | 8 + .../base-files/etc/board.d/03_gpio_switches | 3 +- .../etc/hotplug.d/firmware/10-rt2x00-eeprom | 1 + 8 files changed, 273 insertions(+), 172 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts create mode 100644 target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts index 77b94a1190..3de9533edc 100644 --- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts @@ -1,93 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "mt7620a.dtsi" - -#include -#include -#include +#include "mt7620a_dlink_dwr-96x.dtsi" / { compatible = "dlink,dwr-960", "ralink,mt7620a-soc"; model = "D-Link DWR-960"; - - aliases { - led-boot = &led_status; - led-failsafe = &led_status; - led-running = &led_status; - led-upgrade = &led_status; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_status: status { - label = "green:status"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - wan { - label = "green:wan"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - lan { - label = "green:lan"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - sms { - label = "green:sms"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - signal_green { - label = "green:signal"; - gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; - }; - - signal_red { - label = "red:signal"; - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - }; - - 4g { - label = "green:4g"; - gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; - }; - - 3g { - label = "green:3g"; - gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; - }; - - wlan5g { - label = "green:wlan5g"; - gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - wlan2g { - label = "green:wlan2g"; - gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - }; }; ðernet { @@ -112,91 +29,6 @@ }; }; -&gpio1 { - status = "okay"; -}; - -&gpio2 { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "jboot"; - reg = <0x0 0x10000>; - read-only; - }; - - partition@10000 { - compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = ; - openwrt,offset = <0x10000>; - label = "firmware"; - reg = <0x10000 0xfe0000>; - }; - - config: partition@ff0000 { - label = "config"; - reg = <0xff0000 0x10000>; - read-only; - }; - }; - }; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - ieee80211-freq-limit = <5000000 6000000>; - mediatek,mtd-eeprom = <&config 0xe08e>; - nvmem-cells = <&macaddr_config_e50e>; - nvmem-cell-names = "mac-address"; - mac-address-increment = <2>; - }; -}; - -&state_default { - default { - groups = "i2c", "wled", "spi refclk", "uartf", "ephy"; - function = "gpio"; - }; -}; - -&config { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_config_e50e: macaddr@e50e { - reg = <0xe50e 0x6>; - }; +&wifi { + mediatek,mtd-eeprom = <&config 0xe08e>; }; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts new file mode 100644 index 0000000000..7eae666668 --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-961-a1.dts @@ -0,0 +1,62 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * D-Link DWR-961 A1 Board Description + * Copyright 2022 Pawel Dembicki + */ +#include "mt7620a_dlink_dwr-96x.dtsi" + +/ { + compatible = "dlink,dwr-961-a1", "ralink,mt7620a-soc"; + model = "D-Link DWR-961 A1"; + + leds { + hidden-1 { /* hidden next to wlan5g led */ + label = "green:hidden-1"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + hidden-2 { /* hidden next to sms led*/ + label = "green:hidden-2"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + + port@5 { + status = "okay"; + phy-mode = "rgmii"; + mediatek,fixed-link = <1000 1 1 1>; + }; + + mdio-bus { + status = "okay"; + + ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + qca,ar8327-initvals = < + 0x04 0x87300000 /* PORT0 PAD MODE CTRL */ + 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x80 0x00001200 /* PORT1_STATUS */ + 0x84 0x00001200 /* PORT2_STATUS */ + 0x88 0x00001200 /* PORT3_STATUS */ + 0x8c 0x00001200 /* PORT4_STATUS */ + 0x90 0x00001200 /* PORT5_STATUS */ + 0x94 0x00000000 /* PORT6_STATUS */ + >; + }; + }; +}; + +&gsw { + mediatek,ephy-base = /bits/ 8 <8>; +}; + +&wifi { + mediatek,mtd-eeprom = <&config 0xe29e>; +}; diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi new file mode 100644 index 0000000000..a5fd705eba --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-96x.dtsi @@ -0,0 +1,178 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * D-Link DWR-96x Common Board Description + * Copyright 2022 Pawel Dembicki + */ +#include "mt7620a.dtsi" + +#include +#include +#include + +/ { + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "green:status"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "green:wan"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + sms { + label = "green:sms"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + signal_green { + label = "green:signal"; + gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>; + }; + + signal_red { + label = "red:signal"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + }; + + 4g { + label = "green:4g"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + }; + + 3g { + label = "green:3g"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + ieee80211-freq-limit = <5000000 6000000>; + nvmem-cells = <&macaddr_config_e50e>; + nvmem-cell-names = "mac-address"; + mac-address-increment = <(2)>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "jboot"; + reg = <0x0 0x10000>; + read-only; + }; + + partition@10000 { + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; + openwrt,offset = <0x10000>; + label = "firmware"; + reg = <0x10000 0xfe0000>; + }; + + config: partition@ff0000 { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + label = "config"; + reg = <0xff0000 0x10000>; + read-only; + + macaddr_config_e50e: macaddr@e50e { + reg = <0xe50e 0x6>; + }; + }; + }; + }; +}; + +&state_default { + default { + groups = "i2c", "wled", "spi refclk", "uartf", "ephy"; + function = "gpio"; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 5efb4e5e17..49d25b947f 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -314,6 +314,21 @@ define Device/dlink_dwr-960 endef TARGET_DEVICES += dlink_dwr-960 +define Device/dlink_dwr-961-a1 + $(Device/amit_jboot) + SOC := mt7620a + IMAGE_SIZE := 16256k + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DWR-961 + DEVICE_VARIANT := A1 + DLINK_ROM_ID := DLK6E3813001 + DLINK_FAMILY_MEMBER := 0x6E38 + DLINK_FIRMWARE_SIZE := 0xFE0000 + DEVICE_PACKAGES += kmod-mt76x2 kmod-usb-net-qmi-wwan kmod-usb-serial-option \ + uqmi +endef +TARGET_DEVICES += dlink_dwr-961-a1 + define Device/domywifi_dm202 SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 1f53930311..5f105bd834 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -81,6 +81,10 @@ dlink,dwr-960) ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x2e" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x01" ;; +dlink,dwr-961-a1) + ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x3c" + ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x02" + ;; domywifi,dm202|\ domywifi,dm203|\ domywifi,dw22d) diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 47bd02f3d1..3ed72fa3ab 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -130,6 +130,13 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "5:lan" "0:wan" "6@eth0" ;; + dlink,dwr-961-a1) + ucidef_add_switch "switch0" \ + "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" "0@eth0" + ucidef_add_switch "switch1" \ + "5:lan" "6@eth0" + ucidef_add_switch_attr "switch1" "enable" "false" + ;; edimax,br-6478ac-v2|\ lb-link,bl-w1200|\ tplink,archer-c2-v1) @@ -303,6 +310,7 @@ ramips_setup_macs() dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ dlink,dwr-960|\ + dlink,dwr-961-a1|\ lava,lr-25g001) wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches index 969e9eba63..81daca4978 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/03_gpio_switches @@ -10,7 +10,8 @@ dlink,dir-510l) ucidef_add_gpio_switch "usb_enable1" "USB 1A enable" "12" "0" ucidef_add_gpio_switch "usb_enable05" "USB 0.5A enable" "13" "1" ;; -dlink,dwr-960) +dlink,dwr-960|\ +dlink,dwr-961-a1) ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "0" "1" ;; head-weblink,hdrm200) diff --git a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 291f89f41d..2d1ac2e872 100644 --- a/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/mt7620/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -29,6 +29,7 @@ case "$FIRMWARE" in dlink,dwr-921-c1|\ dlink,dwr-922-e2|\ dlink,dwr-960|\ + dlink,dwr-961-a1|\ lava,lr-25g001) wan_mac=$(jboot_config_read -m -i $(find_mtd_part "config") -o 0xE000) wifi_mac=$(macaddr_add "$wan_mac" 1) From 7bc20cb6143e089fae6ad4b173fc42b55bdbecfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20de=20Saint=20L=C3=A9ger?= Date: Wed, 16 Mar 2022 10:19:30 +0100 Subject: [PATCH 07/17] ramips: add support for Netgear WN3000RPv3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo --- .../dts/mt7620a_netgear_wn3000rp-v3.dts | 155 +---------------- .../dts/mt7620a_netgear_wn3100rp-v2.dts | 8 + .../ramips/dts/mt7620a_netgear_wn3x00rp.dtsi | 158 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 16 ++ .../mt7620/base-files/etc/board.d/01_leds | 3 +- .../mt7620/base-files/etc/board.d/02_network | 1 + 6 files changed, 186 insertions(+), 155 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts create mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts index c6fe7baa67..cddffb7224 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts @@ -1,161 +1,8 @@ /* This file is released into the public domain */ -#include "mt7620a.dtsi" - -#include -#include +#include "mt7620a_netgear_wn3x00rp.dtsi" / { compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc"; model = "Netgear WN3000RP v3"; - - aliases { - led-boot = &led_power_green; - led-failsafe = &led_power_green; - led-running = &led_power_green; - led-upgrade = &led_power_green; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_power_green: power_g { - label = "green:power"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - power_r { - label = "red:power"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - client_g { - label = "green:client"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - client_r { - label = "red:client"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - router_g { - label = "green:router"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - router_r { - label = "red:router"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "green:wps"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - l_arrow { - label = "blue:leftarrow"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - r_arrow { - label = "blue:rightarrow"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x40000 0x7b0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x10000>; - read-only; - }; - }; - }; -}; - -ðernet { - nvmem-cells = <&macaddr_art_0>; - nvmem-cell-names = "mac-address"; -}; - -&wmac { - ralink,mtd-eeprom = <&art 0x1000>; - - nvmem-cells = <&macaddr_art_6>; - nvmem-cell-names = "mac-address"; -}; - -&state_default { - default { - groups = "i2c", "uartf", "spi refclk"; - function = "gpio"; - }; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts new file mode 100644 index 0000000000..af4a73bade --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts @@ -0,0 +1,8 @@ +/* This file is released into the public domain */ + +#include "mt7620a_netgear_wn3x00rp.dtsi" + +/ { + compatible = "netgear,wn3100rp-v2", "ralink,mt7620a-soc"; + model = "Netgear WN3100RP v2"; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi new file mode 100644 index 0000000000..914d4e6bba --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi @@ -0,0 +1,158 @@ +/* This file is released into the public domain */ + +#include "mt7620a.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_g { + label = "green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + power_r { + label = "red:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + client_g { + label = "green:client"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + client_r { + label = "red:client"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + router_g { + label = "green:router"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + router_r { + label = "red:router"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + l_arrow { + label = "blue:leftarrow"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + r_arrow { + label = "blue:rightarrow"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0x7b0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + ralink,mtd-eeprom = <&art 0x1000>; + + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&state_default { + default { + groups = "i2c", "uartf", "spi refclk"; + function = "gpio"; + }; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 49d25b947f..d2a2c90460 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -819,6 +819,22 @@ define Device/netgear_wn3000rp-v3 endef TARGET_DEVICES += netgear_wn3000rp-v3 +define Device/netgear_wn3100rp-v2 + SOC := mt7620a + IMAGE_SIZE := 7872k + NETGEAR_HW_ID := 29764883+8+0+32+2x2+0 + NETGEAR_BOARD_ID := WN3100RPv2 + BLOCKSIZE := 4k + IMAGES += factory.bin + KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ + append-uImage-fakehdr filesystem + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | netgear-dni + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := WN3100RP + DEVICE_VARIANT := v2 +endef +TARGET_DEVICES += netgear_wn3100rp-v2 + define Device/netis_wf2770 SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 5f105bd834..1293c34cbf 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -161,7 +161,8 @@ lenovo,newifi-y1s) ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" ;; netgear,ex2700|\ -netgear,wn3000rp-v3) +netgear,wn3000rp-v3|\ +netgear,wn3100rp-v2) ucidef_set_led_netdev "wifi_led" "wifi" "green:router" "wlan0" ;; netgear,ex3700|\ diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 3ed72fa3ab..f7bc41669f 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -54,6 +54,7 @@ ramips_setup_interfaces() netgear,ex6120|\ netgear,ex6130|\ netgear,wn3000rp-v3|\ + netgear,wn3100rp-v2|\ planex,cs-qr10|\ planex,mzk-ex300np|\ planex,mzk-ex750np|\ From fe34001ee5a6bdb6208ed935e0302d26deafe249 Mon Sep 17 00:00:00 2001 From: Sungbo Eo Date: Wed, 16 Mar 2022 23:10:45 +0900 Subject: [PATCH 08/17] Revert "ramips: add support for Netgear WN3000RPv3" This reverts commit 7bc20cb6143e089fae6ad4b173fc42b55bdbecfe. It adds support for Netgear WN3100RPv2, but the commit title is wrong. It will be re-added with the correct title. Signed-off-by: Sungbo Eo --- .../dts/mt7620a_netgear_wn3000rp-v3.dts | 155 ++++++++++++++++- .../dts/mt7620a_netgear_wn3100rp-v2.dts | 8 - .../ramips/dts/mt7620a_netgear_wn3x00rp.dtsi | 158 ------------------ target/linux/ramips/image/mt7620.mk | 16 -- .../mt7620/base-files/etc/board.d/01_leds | 3 +- .../mt7620/base-files/etc/board.d/02_network | 1 - 6 files changed, 155 insertions(+), 186 deletions(-) delete mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts delete mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts index cddffb7224..c6fe7baa67 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts @@ -1,8 +1,161 @@ /* This file is released into the public domain */ -#include "mt7620a_netgear_wn3x00rp.dtsi" +#include "mt7620a.dtsi" + +#include +#include / { compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc"; model = "Netgear WN3000RP v3"; + + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_g { + label = "green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + power_r { + label = "red:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + client_g { + label = "green:client"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + client_r { + label = "red:client"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + router_g { + label = "green:router"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + router_r { + label = "red:router"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + l_arrow { + label = "blue:leftarrow"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + r_arrow { + label = "blue:rightarrow"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0x7b0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + ralink,mtd-eeprom = <&art 0x1000>; + + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&state_default { + default { + groups = "i2c", "uartf", "spi refclk"; + function = "gpio"; + }; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts deleted file mode 100644 index af4a73bade..0000000000 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts +++ /dev/null @@ -1,8 +0,0 @@ -/* This file is released into the public domain */ - -#include "mt7620a_netgear_wn3x00rp.dtsi" - -/ { - compatible = "netgear,wn3100rp-v2", "ralink,mt7620a-soc"; - model = "Netgear WN3100RP v2"; -}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi deleted file mode 100644 index 914d4e6bba..0000000000 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi +++ /dev/null @@ -1,158 +0,0 @@ -/* This file is released into the public domain */ - -#include "mt7620a.dtsi" - -#include -#include - -/ { - aliases { - led-boot = &led_power_green; - led-failsafe = &led_power_green; - led-running = &led_power_green; - led-upgrade = &led_power_green; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_power_green: power_g { - label = "green:power"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - power_r { - label = "red:power"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - client_g { - label = "green:client"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - client_r { - label = "red:client"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - router_g { - label = "green:router"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - router_r { - label = "red:router"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "green:wps"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - l_arrow { - label = "blue:leftarrow"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - r_arrow { - label = "blue:rightarrow"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x40000 0x7b0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x10000>; - read-only; - }; - }; - }; -}; - -ðernet { - nvmem-cells = <&macaddr_art_0>; - nvmem-cell-names = "mac-address"; -}; - -&wmac { - ralink,mtd-eeprom = <&art 0x1000>; - - nvmem-cells = <&macaddr_art_6>; - nvmem-cell-names = "mac-address"; -}; - -&state_default { - default { - groups = "i2c", "uartf", "spi refclk"; - function = "gpio"; - }; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; -}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index d2a2c90460..49d25b947f 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -819,22 +819,6 @@ define Device/netgear_wn3000rp-v3 endef TARGET_DEVICES += netgear_wn3000rp-v3 -define Device/netgear_wn3100rp-v2 - SOC := mt7620a - IMAGE_SIZE := 7872k - NETGEAR_HW_ID := 29764883+8+0+32+2x2+0 - NETGEAR_BOARD_ID := WN3100RPv2 - BLOCKSIZE := 4k - IMAGES += factory.bin - KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ - append-uImage-fakehdr filesystem - IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | netgear-dni - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := WN3100RP - DEVICE_VARIANT := v2 -endef -TARGET_DEVICES += netgear_wn3100rp-v2 - define Device/netis_wf2770 SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 1293c34cbf..5f105bd834 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -161,8 +161,7 @@ lenovo,newifi-y1s) ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" ;; netgear,ex2700|\ -netgear,wn3000rp-v3|\ -netgear,wn3100rp-v2) +netgear,wn3000rp-v3) ucidef_set_led_netdev "wifi_led" "wifi" "green:router" "wlan0" ;; netgear,ex3700|\ diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index f7bc41669f..3ed72fa3ab 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -54,7 +54,6 @@ ramips_setup_interfaces() netgear,ex6120|\ netgear,ex6130|\ netgear,wn3000rp-v3|\ - netgear,wn3100rp-v2|\ planex,cs-qr10|\ planex,mzk-ex300np|\ planex,mzk-ex750np|\ From 46c5de53856d97a1a926a272acc76a9af654f320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20de=20Saint=20L=C3=A9ger?= Date: Wed, 16 Mar 2022 10:19:30 +0100 Subject: [PATCH 09/17] ramips: add support for Netgear WN3100RPv2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for the Netgear WN3100RPv2 http://www.netgear.com/support/product/wn3100rpv2.aspx Specifications: - SoC: MediaTek MT7620A (580MHz, ramips) - RAM: 32MB DDR - Storage: 8MB NOR SPI flash - Wireless: builtin MT7620A, 2x2:2 with u.FL connectors - Ethernet: 1x100M - Stock firmware based on OpenWRT Kamikaze Like the EX2700, the bootloader expects a secondary image signature, see https://forum.openwrt.org/viewtopic.php?pid=312577#p312577 This device seems to be same hardware as a WN3000RPv3 Flash instructions: - Use the Netgear WebUI to upgrade to OpenWRT using the factory image (see note below), - Use the sysupgrade image for upgrading versions from OpenWRT, - TFTP recovery procedure can be used to flash the factory image (preferred method). Note: - The WebUI may not reboot automatically, wait at least 5 minutes before powercycling the device Flashing using TFTP: - Set you IP address to 192.168.1.10/24 (no gateway) - Connect your machine to the Ethernet port - Power off the device and wait for 10 seconds, - Hold the reset button and power on the device (do not release reset), - Hold the reset button until the green light is flashing (Approx. 15s) - launch tftp, set mode to binary and connect to 192.168.1.1 - put the factory firmware image - All leds will switch off (like a power off), this is normal - Wait for the device to reboot in the new OpenWRT image (max 5 mins) - The first boot will take longer than usual. - After boot, the Device IP on the ethernet port is 192.168.1.1 Signed-off-by: Rodolphe de Saint Léger [drop unneeded includes in dts, wrap commit message] Signed-off-by: Sungbo Eo --- .../dts/mt7620a_netgear_wn3000rp-v3.dts | 155 +---------------- .../dts/mt7620a_netgear_wn3100rp-v2.dts | 8 + .../ramips/dts/mt7620a_netgear_wn3x00rp.dtsi | 158 ++++++++++++++++++ target/linux/ramips/image/mt7620.mk | 16 ++ .../mt7620/base-files/etc/board.d/01_leds | 3 +- .../mt7620/base-files/etc/board.d/02_network | 1 + 6 files changed, 186 insertions(+), 155 deletions(-) create mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts create mode 100644 target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts index c6fe7baa67..cddffb7224 100644 --- a/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3000rp-v3.dts @@ -1,161 +1,8 @@ /* This file is released into the public domain */ -#include "mt7620a.dtsi" - -#include -#include +#include "mt7620a_netgear_wn3x00rp.dtsi" / { compatible = "netgear,wn3000rp-v3", "ralink,mt7620a-soc"; model = "Netgear WN3000RP v3"; - - aliases { - led-boot = &led_power_green; - led-failsafe = &led_power_green; - led-running = &led_power_green; - led-upgrade = &led_power_green; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; - - leds { - compatible = "gpio-leds"; - - led_power_green: power_g { - label = "green:power"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - - power_r { - label = "red:power"; - gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; - }; - - client_g { - label = "green:client"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - client_r { - label = "red:client"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - router_g { - label = "green:router"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - router_r { - label = "red:router"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "green:wps"; - gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; - }; - - l_arrow { - label = "blue:leftarrow"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - - r_arrow { - label = "blue:rightarrow"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x40000 0x7b0000>; - }; - - art: partition@7f0000 { - label = "art"; - reg = <0x7f0000 0x10000>; - read-only; - }; - }; - }; -}; - -ðernet { - nvmem-cells = <&macaddr_art_0>; - nvmem-cell-names = "mac-address"; -}; - -&wmac { - ralink,mtd-eeprom = <&art 0x1000>; - - nvmem-cells = <&macaddr_art_6>; - nvmem-cell-names = "mac-address"; -}; - -&state_default { - default { - groups = "i2c", "uartf", "spi refclk"; - function = "gpio"; - }; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; }; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts new file mode 100644 index 0000000000..af4a73bade --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3100rp-v2.dts @@ -0,0 +1,8 @@ +/* This file is released into the public domain */ + +#include "mt7620a_netgear_wn3x00rp.dtsi" + +/ { + compatible = "netgear,wn3100rp-v2", "ralink,mt7620a-soc"; + model = "Netgear WN3100RP v2"; +}; diff --git a/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi new file mode 100644 index 0000000000..914d4e6bba --- /dev/null +++ b/target/linux/ramips/dts/mt7620a_netgear_wn3x00rp.dtsi @@ -0,0 +1,158 @@ +/* This file is released into the public domain */ + +#include "mt7620a.dtsi" + +#include +#include + +/ { + aliases { + led-boot = &led_power_green; + led-failsafe = &led_power_green; + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power_green: power_g { + label = "green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + power_r { + label = "red:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + client_g { + label = "green:client"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + client_r { + label = "red:client"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + router_g { + label = "green:router"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + router_r { + label = "red:router"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "green:wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + + l_arrow { + label = "blue:leftarrow"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + r_arrow { + label = "blue:rightarrow"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x40000 0x7b0000>; + }; + + art: partition@7f0000 { + label = "art"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_art_0>; + nvmem-cell-names = "mac-address"; +}; + +&wmac { + ralink,mtd-eeprom = <&art 0x1000>; + + nvmem-cells = <&macaddr_art_6>; + nvmem-cell-names = "mac-address"; +}; + +&state_default { + default { + groups = "i2c", "uartf", "spi refclk"; + function = "gpio"; + }; +}; + +&art { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; +}; diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 49d25b947f..d2a2c90460 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -819,6 +819,22 @@ define Device/netgear_wn3000rp-v3 endef TARGET_DEVICES += netgear_wn3000rp-v3 +define Device/netgear_wn3100rp-v2 + SOC := mt7620a + IMAGE_SIZE := 7872k + NETGEAR_HW_ID := 29764883+8+0+32+2x2+0 + NETGEAR_BOARD_ID := WN3100RPv2 + BLOCKSIZE := 4k + IMAGES += factory.bin + KERNEL := $(KERNEL_DTB) | uImage lzma | pad-offset 64k 64 | \ + append-uImage-fakehdr filesystem + IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | netgear-dni + DEVICE_VENDOR := NETGEAR + DEVICE_MODEL := WN3100RP + DEVICE_VARIANT := v2 +endef +TARGET_DEVICES += netgear_wn3100rp-v2 + define Device/netis_wf2770 SOC := mt7620a IMAGE_SIZE := 16064k diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds index 5f105bd834..1293c34cbf 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds @@ -161,7 +161,8 @@ lenovo,newifi-y1s) ucidef_set_led_netdev "wan" "WAN" "blue:internet" "eth0.2" "tx rx" ;; netgear,ex2700|\ -netgear,wn3000rp-v3) +netgear,wn3000rp-v3|\ +netgear,wn3100rp-v2) ucidef_set_led_netdev "wifi_led" "wifi" "green:router" "wlan0" ;; netgear,ex3700|\ diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 3ed72fa3ab..f7bc41669f 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -54,6 +54,7 @@ ramips_setup_interfaces() netgear,ex6120|\ netgear,ex6130|\ netgear,wn3000rp-v3|\ + netgear,wn3100rp-v2|\ planex,cs-qr10|\ planex,mzk-ex300np|\ planex,mzk-ex750np|\ From e17c6ee62770005e398364ee5d955c9a8ab6f016 Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Wed, 16 Mar 2022 15:04:56 +0100 Subject: [PATCH 10/17] openssl: bump to 1.1.1n This is a bugfix release. Changelog: *) Fixed a bug in the BN_mod_sqrt() function that can cause it to loop forever for non-prime moduli. (CVE-2022-0778) *) Add ciphersuites based on DHE_PSK (RFC 4279) and ECDHE_PSK (RFC 5489) to the list of ciphersuites providing Perfect Forward Secrecy as required by SECLEVEL >= 3. Signed-off-by: Martin Schiller --- package/libs/openssl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index 8ca4d83380..b50620118a 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl PKG_BASE:=1.1.1 -PKG_BUGFIX:=m +PKG_BUGFIX:=n PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) -PKG_RELEASE:=3 +PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_BUILD_PARALLEL:=1 @@ -25,7 +25,7 @@ PKG_SOURCE_URL:= \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/ \ ftp://ftp.pca.dfn.de/pub/tools/net/openssl/source/old/$(PKG_BASE)/ -PKG_HASH:=f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96 +PKG_HASH:=40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a PKG_LICENSE:=OpenSSL PKG_LICENSE_FILES:=LICENSE From e8a0c55909427703b7c72ed46326531397287b20 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Sat, 12 Mar 2022 22:04:30 -0800 Subject: [PATCH 11/17] base-files: Align rootfs_data upgrades to 64KiB on eMMC Rootfs overlays get created at a ROOTDEV_OVERLAY_ALIGN (64KiB) alignment after the rootfs, but emmc_do_upgrade() is assuming it comes at the very next 512-byte sector. Suggested-by: Christian Lamparter Signed-off-by: Brian Norris (move spaces around, mention fstools' libtoolfs) Signed-off-by: Christian Lamparter --- package/base-files/files/lib/upgrade/emmc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/emmc.sh b/package/base-files/files/lib/upgrade/emmc.sh index 15fa370cd9..c3b02864aa 100644 --- a/package/base-files/files/lib/upgrade/emmc.sh +++ b/package/base-files/files/lib/upgrade/emmc.sh @@ -19,8 +19,11 @@ emmc_upgrade_tar() { [ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] && export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) - [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && + [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && { export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) + # Account for 64KiB ROOTDEV_OVERLAY_ALIGN in libfstools + EMMC_ROOTFS_BLOCKS=$(((EMMC_ROOTFS_BLOCKS + 127) & ~127)) + } if [ -z "$UPGRADE_BACKUP" ]; then if [ "$EMMC_DATA_DEV" ]; then From 80b88b083aa3c38ddd2efb89614c2c55dcaa3037 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 9 Mar 2022 22:31:14 -0800 Subject: [PATCH 12/17] argp-standalone: fix compilation with Alpine Linux This package is a C89 one. Add the proper CFLAG to fix compilation. Signed-off-by: Rosen Penev --- package/libs/argp-standalone/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile index 21b154f29d..1a48dcb2cd 100644 --- a/package/libs/argp-standalone/Makefile +++ b/package/libs/argp-standalone/Makefile @@ -34,8 +34,10 @@ define Package/argp-standalone/description endef MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) $(FPIC)" + CFLAGS="$(TARGET_CFLAGS) $(FPIC) -std=gnu89" +HOST_MAKE_FLAGS += \ + CFLAGS="$(HOST_CFLAGS) $(FPIC) -std=gnu89" define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include From 7e614820a89208c4e91a3a5f9de07a5402accdaa Mon Sep 17 00:00:00 2001 From: Martin Kennedy Date: Sat, 27 Nov 2021 20:59:18 -0500 Subject: [PATCH 13/17] mpc85xx: add support for Extreme Networks WS-AP3825i Hardware: - SoC: Freescale P1020 - CPU: 2x e500v2 @ 800MHz - Flash: 64MiB NOR (1x Intel JS28F512) - Memory: 256MiB (2x ProMOS DDR3 V73CAG01168RBJ-I9H 1Gb) - WiFi1: 2.4+5GHz abgn 3x3 (Atheros AR9590) - Wifi2: 5GHz an+ac 3x3 (Qualcomm Atheros QCA9890) - ETH: 2x PoE Gigabit Ethernet (2x Atheros AR8035) - Power: 12V (center-positive barrel) or 48V PoE (active or passive) - Serial: Cisco-compatible RJ45 next to 12V power socket (115200 baud) - LED Driver: TI LV164A - LEDs: (not functioning) - 2x Power (Green + Orange) - 4x ETH (ETH1 + ETH2) x (Green + Orange) - 2x WiFi (WiFi2 + WiFi1) Installation: 1. Grab the OpenWrt initramfs , e.g. openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin. Place it in the root directory of a DHCP+TFTP server, e.g. OpenWrt `dnsmasq` with configuration `dhcp.server.enable_tftp='1'`. 2. Connect to the serial port and boot the AP with options e.g. 115200,N,8. Stop autoboot in U-Boot by pressing Enter after 'Scanning JFFS2 FS:' begins, then waiting for the prompt to be interrupted. Credentials are identical to the one in the APs interface. By default it is admin / new2day: if these do not work, follow the OEM's reset procedure using the reset button. 3. Set the bootcmd so the AP can boot OpenWrt by executing: ```uboot setenv boot_openwrt "cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go;" setenv bootcmd "run boot_openwrt" saveenv ``` If you plan on going back to the vendor firmware - the bootcmd for it is stored in the boot_flash variable. 4. Load the initramfs image to RAM and boot by executing ```uboot setenv ipaddr ; setenv serverip ; tftpboot 0x2000000 ; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go; ``` 5. Make a backup of the "firmware" partition if you ever wish to go back to the vendor firmware. 6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp folder. 7. Flash OpenWrt using sysupgrade. ```ash sysupgrade /tmp/ ``` Notes: - We must step through the `bootm` process manually to avoid fdt relocation. To explain: the stock U-boot (and stock Linux) are configured with a very large CONFIG_SYS_BOOTMAPSZ (and the device's stock Linux kernel is configured to be able to handle it). The U-boot version predates the check for the `fdt_high` variable, meaning that upon fdt relocation, the fdt can (and will) be moved to a very high address; the default appears to be 0x9ffa000. This address is so high that when the Linux kernel starts reading the fdt at the beginning of the boot process, it encounters a memory access exception and panics[5]. While it is possible to reduce the highest address the fdt will be relocated to by setting `bootm_size`, this also has the side effect of limiting the amount of RAM the kernel can use[3]. - Because it is not relocated, the flattened device tree needs to be padded in the build process to guarantee that `fdt resize` has enough space. - The primary ethernet MAC address is stored (and set) in U-boot; they are shimmed into the device tree by 'fdt boardsetup' through the 'local-mac-address' property of the respective ethernet node, so OpenWrt does not need to set this at runtime. Note that U-boot indexes the ethernet nodes by alias, which is why the device tree explicitly aliases ethernet1 to enet2. - LEDs do not function under OpenWrt. Each of 8 LEDs is connected to an output of a TI LV164A shift register, which is wired to GPIO lines and operates through bit-banged SPI. Unfortunately, I am unable to get the spi-gpio driver to recognize the `led_spi` device tree node at all, as confirmed by patching in printk messages demonstrating spi-gpio.c::spi_gpio_probe never runs. It is possible to manually articulate the shift register by exporting the GPIO lines and stepping their values through the sysfs. - Though they do not function under OpenWrt, I have left the pinout details of the LEDs and shift register in the device tree to represent real hardware. - An archive of the u-boot and Linux source for the AP3825i (which is one device of a range of devices code-named 'CHANTRY') be found here[1]. - The device has an identical case to both the Enterasys WS-AP3725i and Adtran BSAP-2030[2] (and potentially other Adtran BSAPs). Given that there is no FCC ID for the board itself (only its WLAN modules), it's likely these are generic boards, and even that the WS-AP3725i is identical, with only a change in WLAN card. I have ordered one to confirm this. - For additional information: the process of porting the board is documented in an OpenWrt forum thread[4]. [1]: magnet:?xt=urn:btih:f5306a5dfd06d42319e4554565429f84dde96bbc [2]: https://forum.openwrt.org/t/support-for-adtran-bluesocket-bsap-2030/48538 [3]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/29 [4]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168 [5]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/26 Tested-by: Martin Kennedy Signed-off-by: Martin Kennedy --- .../etc/hotplug.d/ieee80211/10-fix-wifi-mac | 3 +- .../arch/powerpc/boot/dts/ws-ap3825i.dts | 249 ++++++++++++++++++ .../arch/powerpc/platforms/85xx/ws-ap3825i.c | 91 +++++++ target/linux/mpc85xx/image/Makefile | 6 + target/linux/mpc85xx/image/p1020.mk | 12 + target/linux/mpc85xx/p1020/config-default | 3 + ...-powerpc-85xx-add-ws-ap3825i-support.patch | 44 ++++ 7 files changed, 407 insertions(+), 1 deletion(-) create mode 100644 target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts create mode 100644 target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c create mode 100644 target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch diff --git a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac index c6cede3a1f..8050c7bea2 100644 --- a/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac +++ b/target/linux/mpc85xx/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -12,7 +12,8 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in -enterasys,ws-ap3710i) +enterasys,ws-ap3710i|\ +extreme-networks,ws-ap3825i) mtd_get_mac_ascii cfg2 RADIOADDR${PHYNBR} > /sys${DEVPATH}/macaddress ;; ocedo,panda) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts new file mode 100644 index 0000000000..3dcbac21a4 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts @@ -0,0 +1,249 @@ +// SPDX-License-Identifier: GPL-2.0-or-later or MIT + +/include/ "fsl/p1020si-pre.dtsi" + +#include +#include + +/ { + model = "Extreme Networks WS-AP3825i"; + compatible = "extreme-networks,ws-ap3825i"; + + aliases { + ethernet0 = &enet0; + ethernet1 = &enet2; + led-boot = &led_power_green; + led-failsafe = &led_power_red; + led-running = &led_power_green; + led-upgrade = &led_power_red; + }; + + chosen { + bootargs-override = "console=ttyS0,115200"; + }; + + memory { + device_type = "memory"; + }; + + led_spi { + /* + * This is currently non-functioning because the spi-gpio + * driver refuses to register when presented with this node. + */ + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + sck-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + mosi-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + num-chipselects = <0>; + + spi_gpio: led_gpio@0 { + compatible = "fairchild,74hc595"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + registers-number = <1>; + spi-max-frequency = <100000>; + }; + }; + + leds { + compatible = "gpio-leds"; + + wifi1 { + gpios = <&spi_gpio 3 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:green:radio1"; + linux,default-trigger = "phy0tpt"; + }; + + wifi2 { + gpios = <&spi_gpio 2 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:green:radio2"; + linux,default-trigger = "phy1tpt"; + }; + + led_power_green: power_green { + gpios = <&spi_gpio 0 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:green:power"; + }; + + led_power_red: power_red { + gpios = <&spi_gpio 1 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:red:power"; + }; + + eth0_red { + gpios = <&spi_gpio 6 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:red:eth0"; + }; + + eth0_green { + gpios = <&spi_gpio 4 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:green:eth0"; + }; + + eth1_red { + gpios = <&spi_gpio 7 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:red:eth1"; + }; + + eth1_green { + gpios = <&spi_gpio 5 GPIO_ACTIVE_HIGH>; + label = "ws-ap3825i:green:eth1"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + lbc: localbus@ffe05000 { + reg = <0 0xffe05000 0 0x1000>; + ranges = <0x0 0x0 0x0 0xec000000 0x4000000>; + + nor@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-flash"; + reg = <0x0 0x0 0x4000000>; + bank-width = <2>; + device-width = <1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + compatible = "denx,fit"; + reg = <0x0 0x3d60000>; + label = "firmware"; + }; + + partition@3d60000 { + reg = <0x3d60000 0x20000>; + label = "calib"; + read-only; + }; + + partition@3d80000{ + reg = <0x3d80000 0x80000>; + label = "u-boot"; + read-only; + }; + + partition@3e00000{ + reg = <0x3e00000 0x100000>; + label = "nvram"; + read-only; + }; + + partition@3f00000 { + reg = <0x3f00000 0x20000>; + label = "cfg2"; + read-only; + }; + + partition@3f20000 { + reg = <0x3f20000 0x20000>; + label = "cfg1"; + read-only; + }; + }; + }; + }; + + soc: soc@ffe00000 { + ranges = <0x0 0x0 0xffe00000 0x100000>; + + gpio0: gpio-controller@fc00 { + }; + + mdio@24000 { + phy0: ethernet-phy@0 { + interrupts = <3 1 0 0>; + reg = <0x5>; + reset-gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; + }; + + phy2: ethernet-phy@2 { + interrupts = <1 1 0 0>; + reg = <0x6>; + reset-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + }; + + mdio@25000 { + status = "disabled"; + }; + + mdio@26000 { + status = "disabled"; + }; + + enet0: ethernet@b0000 { + status = "okay"; + phy-handle = <&phy0>; + phy-connection-type = "rgmii-id"; + }; + + enet1: ethernet@b1000 { + status = "disabled"; + }; + + enet2: ethernet@b2000 { + status = "okay"; + phy-handle = <&phy2>; + phy-connection-type = "rgmii-id"; + }; + + usb@22000 { + phy_type = "ulpi"; + dr_mode = "host"; + }; + + usb@23000 { + status = "disabled"; + }; + }; + + pci0: pcie@ffe09000 { + ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; + reg = <0 0xffe09000 0 0x1000>; + pcie@0 { + ranges = <0x2000000 0x0 0xa0000000 + 0x2000000 0x0 0xa0000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; + + pci1: pcie@ffe0a000 { + reg = <0 0xffe0a000 0 0x1000>; + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; + pcie@0 { + ranges = <0x2000000 0x0 0x80000000 + 0x2000000 0x0 0x80000000 + 0x0 0x20000000 + + 0x1000000 0x0 0x0 + 0x1000000 0x0 0x0 + 0x0 0x100000>; + }; + }; +}; + +/include/ "fsl/p1020si-post.dtsi" diff --git a/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c new file mode 100644 index 0000000000..5a0919c200 --- /dev/null +++ b/target/linux/mpc85xx/files/arch/powerpc/platforms/85xx/ws-ap3825i.c @@ -0,0 +1,91 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +/* + * Extreme Networks WS-AP3825i Board Setup + * + * Copyright (C) 2021 Martin Kennedy + * + * Based on: + * mpc85xx_rdb.c: + * MPC85xx RDB Board Setup + * Copyright 2013 Freescale Semiconductor Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include "smp.h" + +#include "mpc85xx.h" + +void __init ws_ap3825i_pic_init(void) +{ + struct mpic *mpic; + + mpic = mpic_alloc(NULL, 0, + MPIC_BIG_ENDIAN | + MPIC_SINGLE_DEST_CPU, + 0, 256, " OpenPIC "); + + BUG_ON(mpic == NULL); + mpic_init(mpic); +} + +/* + * Setup the architecture + */ +static void __init ws_ap3825i_setup_arch(void) +{ + if (ppc_md.progress) + ppc_md.progress("ws_ap3825i_setup_arch()", 0); + + mpc85xx_smp_init(); + + fsl_pci_assign_primary(); + + pr_info("WS-AP3825i board from Extreme Networks\n"); +} + +machine_arch_initcall(ws_ap3825i, mpc85xx_common_publish_devices); + +/* + * Called very early, device-tree isn't unflattened + */ +static int __init ws_ap3825i_probe(void) +{ + if (of_machine_is_compatible("extreme-networks,ws-ap3825i")) + return 1; + return 0; +} + +define_machine(ws_ap3825i) { + .name = "P1020 RDB", + .probe = ws_ap3825i_probe, + .setup_arch = ws_ap3825i_setup_arch, + .init_IRQ = ws_ap3825i_pic_init, +#ifdef CONFIG_PCI + .pcibios_fixup_bus = fsl_pcibios_fixup_bus, + .pcibios_fixup_phb = fsl_pcibios_fixup_phb, +#endif + .get_irq = mpic_get_irq, + .calibrate_decr = generic_calibrate_decr, + .progress = udbg_progress, +}; diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 2b81884032..e1d1bc6948 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -3,6 +3,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk +DEVICE_VARS += DTB_SIZE + +define Build/dtb + $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE)) +endef + define Device/Default PROFILES := Default DEVICE_DTS := $(lastword $(subst _, ,$(1))) diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index 64cad1ad9c..234bdc26a1 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -68,6 +68,18 @@ define Device/enterasys_ws-ap3710i endef TARGET_DEVICES += enterasys_ws-ap3710i +define Device/extreme-networks_ws-ap3825i + DEVICE_VENDOR := Extreme Networks + DEVICE_MODEL := WS-AP3825i + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + BLOCKSIZE := 128k + DTB_SIZE := 20480 + KERNEL = kernel-bin | lzma | dtb | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb + IMAGES := sysupgrade.bin + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata +endef +TARGET_DEVICES += extreme-networks_ws-ap3825i + define Device/ocedo_panda DEVICE_VENDOR := OCEDO DEVICE_MODEL := Panda diff --git a/target/linux/mpc85xx/p1020/config-default b/target/linux/mpc85xx/p1020/config-default index 31fce8b60a..6f2a9d2c3b 100644 --- a/target/linux/mpc85xx/p1020/config-default +++ b/target/linux/mpc85xx/p1020/config-default @@ -7,6 +7,7 @@ CONFIG_EEPROM_LEGACY=y # CONFIG_FSL_CORENET_CF is not set CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_GENERIC_TBSYNC=y +CONFIG_GPIO_74X164=y # CONFIG_GPIO_MAX77620 is not set CONFIG_HAVE_RCU_TABLE_FREE=y CONFIG_HIVEAP_330=y @@ -40,6 +41,7 @@ CONFIG_RPS=y # CONFIG_RTC_DRV_MAX77686 is not set CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_SMP=y +CONFIG_SPI_GPIO=y CONFIG_SWCONFIG_B53=y # CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set CONFIG_SWCONFIG_B53_PHY_DRIVER=y @@ -49,4 +51,5 @@ CONFIG_SWCONFIG_B53_PHY_DRIVER=y CONFIG_TREE_RCU=y CONFIG_UBIFS_FS=y CONFIG_WS_AP3710I=y +CONFIG_WS_AP3825I=y CONFIG_XPS=y diff --git a/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch new file mode 100644 index 0000000000..881f88ddb5 --- /dev/null +++ b/target/linux/mpc85xx/patches-5.10/107-powerpc-85xx-add-ws-ap3825i-support.patch @@ -0,0 +1,44 @@ +From 2fa1a7983ef30f3c7486f9b07c001bee87d1f6d6 Mon Sep 17 00:00:00 2001 +From: Martin Kennedy +Date: Sat, 1 Jan 2022 11:01:37 -0500 +Subject: [PATCH] PowerPC 85xx: Add WS-AP3825i support + +This patch adds support for building Linux for the Extreme Networks +WS-AP3825i AP. + +diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig +index 764b916..66cbb73 100644 +--- a/arch/powerpc/platforms/85xx/Kconfig ++++ b/arch/powerpc/platforms/85xx/Kconfig +@@ -82,6 +82,16 @@ config WS_AP3710I + This board is a Concurrent Dual-Band wireless access point with a + Freescale P1020 SoC. + ++config WS_AP3825I ++ bool "Extreme Networks WS-AP3825i" ++ select DEFAULT_UIMAGE ++ select ARCH_REQUIRE_GPIOLIB ++ select GPIO_MPC8XXX ++ help ++ This option enables support for the Extreme Networks WS-AP3825i board. ++ This board is a Concurrent Dual-Band wireless access point with a ++ Freescale P1020 SoC. ++ + config MPC8540_ADS + bool "Freescale MPC8540 ADS" + select DEFAULT_UIMAGE +diff --git a/arch/powerpc/platforms/85xx/Makefile b/arch/powerpc/platforms/85xx/Makefile +index 443b44b..d37b650 100644 +--- a/arch/powerpc/platforms/85xx/Makefile ++++ b/arch/powerpc/platforms/85xx/Makefile +@@ -27,6 +27,7 @@ obj-$(CONFIG_P1023_RDB) += p1023_rdb.o + obj-$(CONFIG_PANDA) += panda.o + obj-$(CONFIG_TWR_P102x) += twr_p102x.o + obj-$(CONFIG_WS_AP3710I) += ws-ap3710i.o ++obj-$(CONFIG_WS_AP3825I) += ws-ap3825i.o + obj-$(CONFIG_CORENET_GENERIC) += corenet_generic.o + obj-$(CONFIG_FB_FSL_DIU) += t1042rdb_diu.o + obj-$(CONFIG_RED_15W_REV1) += red15w_rev1.o +-- +2.25.1 + From 621b0589fb5cc1cbab826deb1614009fb60ad995 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Wed, 16 Mar 2022 17:34:24 +0100 Subject: [PATCH 14/17] ipq806x: fix TP-Link Archer VR2600v bootlooping Timo Schroeder reported: "The TP-Link Archer VR2600v is stuck in a boot loop on written snapshot image. It's able to boot using the snapshot uimage though, but there ath10k firmware can't be found. 21.02.2 release version doesn't have either problem." The VR2600v has a 512 byte header at the beginning of the firmware that needs to be accounted for. Fixes: f6a01d7f5c3d ("ipq806x: convert TP-Link Archer VR2600v to denx,uimage") Reported-by: Timo Schroeder References: Signed-off-by: Christian Lamparter --- .../ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts index 8fa0a5d291..27d9fc84b3 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts @@ -257,7 +257,8 @@ partition@320000 { label = "firmware"; reg = <0x320000 0xc60000>; - compatible = "denx,uimage"; + compatible = "openwrt,uimage"; + openwrt,offset = <512>; /* account for pad-extra 512 */ }; /* hole 0xf80000 - 0xfaf100 */ From dadedd5580c53752c0f308ac2861bb07c7f88801 Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Tue, 15 Mar 2022 22:53:04 +0100 Subject: [PATCH 15/17] lantiq: fritz7362sl: fix SPI flash node reg property The &spi node has #address-cells = <1> and #size-cells = <0>. Drop the extra 0 in the reg property from the SPI flash node to ensure it's number of cells matches the definition in the parent node. This also makes the reg property for the SPI flash node consistent with all other VR9 boards. Fixes: eae6cac6a30b ("lantiq: add support for AVM FRITZ!Box 7362 SL") Signed-off-by: Martin Blumenstingl --- .../files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index 4d86bf5542..37fee61588 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -22,7 +22,7 @@ #address-cells = <1>; #size-cells = <1>; compatible = "jedec,spi-nor"; - reg = <4 0>; + reg = <4>; spi-max-frequency = <1000000>; urlader: partition@0 { From a6222738760b9ab796ac0f69d6df8b3f2b9c2f26 Mon Sep 17 00:00:00 2001 From: Jan Hoffmann Date: Wed, 16 Mar 2022 18:24:23 +0100 Subject: [PATCH 16/17] lantiq: fritz7362sl: add partition subnode for SPI flash Without a partition subnode ofpart_core still parses direct subnodes as partitions, but it ignores nodes with a compatible property. Due to this, the switch to nvmem-cells made the urlader partition inaccessible. As a result, the wireless network was broken, as the calibration data is read from that partition by a script. Fixes: #8983 Signed-off-by: Jan Hoffmann --- .../boot/dts/lantiq/vr9_avm_fritz7362sl.dts | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts index 37fee61588..c75edd933c 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz7362sl.dts @@ -25,22 +25,28 @@ reg = <4>; spi-max-frequency = <1000000>; - urlader: partition@0 { - reg = <0x0 0x40000>; - label = "urlader"; - read-only; - }; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; - partition@40000 { - reg = <0x40000 0x60000>; - label = "tffs (1)"; - read-only; - }; + urlader: partition@0 { + reg = <0x0 0x40000>; + label = "urlader"; + read-only; + }; - partition@A0000 { - reg = <0xA0000 0x60000>; - label = "tffs (2)"; - read-only; + partition@40000 { + reg = <0x40000 0x60000>; + label = "tffs (1)"; + read-only; + }; + + partition@A0000 { + reg = <0xA0000 0x60000>; + label = "tffs (2)"; + read-only; + }; }; }; }; From 83ca16fc4350c65110caeb7143afc9e9cd300d23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Thu, 17 Mar 2022 07:53:55 +0100 Subject: [PATCH 17/17] mpc85xx: fix missing kernel config symbol and DTS whitespace issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Buildbot has reported following issue while crunching mpc85xx/p1010 subtarget: Extreme Networks WS-AP3825i (WS_AP3825I) [N/y/?] (NEW) Fix it by disabling that config symbol in target kernel config and while at it fix DTS whitespace issue. Fixes: 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i") Signed-off-by: Petr Štetiar --- target/linux/mpc85xx/config-5.10 | 1 + target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/mpc85xx/config-5.10 b/target/linux/mpc85xx/config-5.10 index e140239fc0..022fc75dac 100644 --- a/target/linux/mpc85xx/config-5.10 +++ b/target/linux/mpc85xx/config-5.10 @@ -265,6 +265,7 @@ CONFIG_VDSO32=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_WATCHDOG_CORE=y # CONFIG_WS_AP3710I is not set +# CONFIG_WS_AP3825I is not set # CONFIG_XES_MPC85xx is not set CONFIG_XZ_DEC_BCJ=y CONFIG_XZ_DEC_POWERPC=y diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts index 3dcbac21a4..b4a90b31c7 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3825i.dts @@ -27,7 +27,7 @@ }; led_spi { - /* + /* * This is currently non-functioning because the spi-gpio * driver refuses to register when presented with this node. */