From 0da0aab6f2edc59e00c3c50a3c8f8d7e6f27c0b1 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 15 Sep 2020 12:31:56 +0200 Subject: [PATCH 01/32] rtl838x: remove some debug output in rtl838x-nor.c Seems like leftovers from development, remove them. Signed-off-by: Adrian Schmutzler --- .../linux/rtl838x/files-5.4/drivers/mtd/spi-nor/rtl838x-nor.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/target/linux/rtl838x/files-5.4/drivers/mtd/spi-nor/rtl838x-nor.c b/target/linux/rtl838x/files-5.4/drivers/mtd/spi-nor/rtl838x-nor.c index 0d8f9dbd3e..20d93ae962 100644 --- a/target/linux/rtl838x/files-5.4/drivers/mtd/spi-nor/rtl838x-nor.c +++ b/target/linux/rtl838x/files-5.4/drivers/mtd/spi-nor/rtl838x-nor.c @@ -147,7 +147,6 @@ ssize_t rtl838x_do_read(struct rtl838x_nor *rtl838x_nor, loff_t from, while (length >= 4) { SPI_WAIT_READY; *((uint32_t *) buffer) = spi_r32(SFDR); -/* printk("%.8x ", *((uint32_t*) buffer)); */ buffer += 4; length -= 4; } @@ -159,7 +158,6 @@ ssize_t rtl838x_do_read(struct rtl838x_nor *rtl838x_nor, loff_t from, while (length > 0) { SPI_WAIT_READY; *(buffer) = spi_r32(SFDR) >> 24; -/* printk("%.2x ", *(buffer)); */ buffer++; length--; } @@ -200,7 +198,6 @@ static ssize_t rtl838x_do_4bf_read(struct rtl838x_nor *rtl838x_nor, loff_t from, while (length >= 4) { SPI_WAIT_READY; *((uint32_t *) buffer) = spi_r32(SFDR); -/* printk("%.8x ", *((uint32_t*) buffer)); */ buffer += 4; length -= 4; } @@ -212,7 +209,6 @@ static ssize_t rtl838x_do_4bf_read(struct rtl838x_nor *rtl838x_nor, loff_t from, while (length > 0) { SPI_WAIT_READY; *(buffer) = spi_r32(SFDR) >> 24; -/* printk("%.2x ", *(buffer)); */ buffer++; length--; } From 5c0cecb6c6bef941b803c7494b087ac08c473f87 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Tue, 15 Sep 2020 12:41:37 +0200 Subject: [PATCH 02/32] rtl838x: refresh config Use "make kernel_oldconfig" to update and sort target config. Signed-off-by: Adrian Schmutzler --- target/linux/rtl838x/config-5.4 | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/target/linux/rtl838x/config-5.4 b/target/linux/rtl838x/config-5.4 index 4cd2fddba3..a9955b8f92 100644 --- a/target/linux/rtl838x/config-5.4 +++ b/target/linux/rtl838x/config-5.4 @@ -24,8 +24,6 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_CEVT_R4K=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLONE_BACKWARDS=y -CONFIG_COMMON_CLK=y -# CONFIG_COMMON_CLK_BOSTON is not set CONFIG_COMPAT_32BIT_TIME=y CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 CONFIG_CPU_BIG_ENDIAN=y @@ -55,8 +53,10 @@ CONFIG_DTC=y CONFIG_EARLY_PRINTK=y CONFIG_EFI_EARLYCON=y CONFIG_ETHERNET_PACKET_MANGLE=y -# CONFIG_FIXED_PHY is not set -# CONFIG_FONT_SUPPORT is not set +CONFIG_FIXED_PHY=y +CONFIG_FONT_8x16=y +CONFIG_FONT_AUTOSELECT=y +CONFIG_FONT_SUPPORT=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_CLOCKEVENTS=y @@ -79,7 +79,8 @@ CONFIG_GENERIC_SCHED_CLOCK=y CONFIG_GENERIC_SMP_IDLE_THREAD=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y -CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_RTL838X=y +CONFIG_GRO_CELLS=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y @@ -91,6 +92,7 @@ CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_ASM_MODVERSIONS=y +CONFIG_HAVE_CBPF_JIT=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CONTEXT_TRACKING=y CONFIG_HAVE_COPY_THREAD_TLS=y @@ -120,6 +122,8 @@ CONFIG_HAVE_RSEQ=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y # CONFIG_HIGH_RES_TIMERS is not set +CONFIG_HZ=250 +CONFIG_HZ_250=y CONFIG_HZ_PERIODIC=y CONFIG_INITRAMFS_SOURCE="" CONFIG_IRQCHIP=y @@ -128,6 +132,7 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y +CONFIG_JFFS2_ZLIB=y CONFIG_LEDS_GPIO=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 @@ -141,6 +146,7 @@ CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set @@ -182,11 +188,10 @@ CONFIG_OF_IRQ=y CONFIG_OF_KOBJ=y CONFIG_OF_MDIO=y CONFIG_OF_NET=y -CONFIG_SERIAL_OF_PLATFORM=y CONFIG_PCI_DRIVERS_LEGACY=y CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 -# CONFIG_PHYLIB is not set +CONFIG_PHYLIB=y CONFIG_PHYLINK=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_SINGLE is not set @@ -197,10 +202,8 @@ CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y CONFIG_RTL838X=y -CONFIG_GPIO_RTL838X=y -CONFIG_SERIAL_8250_RUNTIME_UARTS=2 -CONFIG_SERIAL_8250_NR_UARTS=2 CONFIG_SERIAL_MCTRL_GPIO=y +CONFIG_SERIAL_OF_PLATFORM=y CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y @@ -223,4 +226,5 @@ CONFIG_TARGET_ISA_REV=2 CONFIG_TICK_CPU_ACCOUNTING=y CONFIG_TINY_SRCU=y CONFIG_USE_OF=y -CONFIG_JFFS2_ZLIB=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_ZLIB_INFLATE=y From 300173950da07e43b56d819114c1d1271ea213cc Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 16 Sep 2020 16:29:21 +0200 Subject: [PATCH 03/32] rtl838x: fix incorrect assignment from kstrtoul in serial.c Assign return value of kstrtoul to error variable instead of conversion value. Suggested-by: Birger Koblitz Signed-off-by: Adrian Schmutzler --- target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c b/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c index 8a85933baf..74a29c505e 100644 --- a/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c +++ b/target/linux/rtl838x/files-5.4/arch/mips/rtl838x/serial.c @@ -54,7 +54,7 @@ int __init rtl838x_serial_init(void) s = strstr(arcs_cmdline, "console=ttyS0,"); if (s) { s += 14; - baud = kstrtoul(s, 10, &baud); + err = kstrtoul(s, 10, &baud); if (err) baud = 0; while (isdigit(*s)) From cb9bb908de1772d52bec73e6efffb0b803c8e41e Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 10 Sep 2020 17:24:52 +0200 Subject: [PATCH 04/32] base-files: drop default setup for vconfig vconfig has been disabled by default since 2015 [1] and there are no remaining uses in entire OpenWrt trunk. However, we still set up a specific name_type for it during boot. While this setup is properly implemented to be only triggered when vconfig is present, it still seems anachronistic and unnecessary to set up a standard for a tool that is not used anymore. Therefore, this removes the set_name_type initialization and leaves it for those people actually using the tool to configure it as needed. [1] 899a23227e55 ("busybox: improve applets & deprecate ifconfig, route") Signed-off-by: Adrian Schmutzler --- package/base-files/Makefile | 2 +- package/base-files/files/etc/init.d/boot | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 73455174db..db9be216e6 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=229 +PKG_RELEASE:=230 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index 958a67599e..b36323a97e 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -20,7 +20,6 @@ uci_apply_defaults() { boot() { [ -f /proc/mounts ] || /sbin/mount_root [ -f /proc/jffs2_bbc ] && echo "S" > /proc/jffs2_bbc - [ -f /proc/net/vlan/config ] && vconfig set_name_type DEV_PLUS_VID_NO_PAD mkdir -p /var/run mkdir -p /var/log From a99614a44f205f48db4278988566d2b6b2b96295 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sat, 12 Sep 2020 20:54:04 +0200 Subject: [PATCH 05/32] ath79: consistently use "info" label for default-mac partition The tp-link safeloader devices typically contain a partition "default-mac" which stores the MAC addresses. It is followed by other partitions containing device info, like {"default-mac", 0x610000, 0x00020}, {"pin", 0x610100, 0x00020}, {"product-info", 0x611100, 0x01000}, In DTS, we typically assign a 0x10000 sized partition for these, which is mostly labelled "mac" or "info". In rarer cases, the partitions have been enclosed in a larger "tplink" or "config" partition. However, when comparing different devices, the implementation appears relatively arbitrary at the moment. Thus, this PR aims at harmonizing these partitions by always using the name "info" for the DTS partition containing "default-mac". "info" is preferred over "mac" as we never just have "default-mac" alone, but always some other device-info partitions as well. While at it, this also establishes a similar partitioning for the few devices where the "info" partitions are part of a bigger unspecific "config" partition or similar. Besides the harmonization itself, this also allows to merge a few cases in 11-ath10k-caldata. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar9344_tplink_cpe.dtsi | 2 +- .../dts/qca9531_tplink_tl-wr902ac-v1.dts | 14 +++++++++---- .../dts/qca9533_tplink_tl-wa850re-v2.dts | 20 +++++++++++++++---- .../ath79/dts/qca9558_tplink_re350k-v1.dts | 20 +++++++++++++++---- .../dts/qca9561_tplink_archer-c58-v1.dts | 4 ++-- .../dts/qca9561_tplink_archer-c59-v1.dts | 4 ++-- .../dts/qca9561_tplink_archer-c59-v2.dts | 4 ++-- .../ath79/dts/qca9561_tplink_archer-c5x.dtsi | 6 +++--- .../dts/qca9561_tplink_archer-c60-v1.dts | 4 ++-- .../dts/qca9561_tplink_archer-c60-v2.dts | 4 ++-- .../dts/qca9561_tplink_archer-c60-v3.dts | 4 ++-- .../ath79/dts/qca9561_tplink_archer-c6x.dtsi | 6 +++--- .../dts/qca9563_tplink_archer-c6-v2-us.dts | 4 ++-- .../ath79/dts/qca9563_tplink_archer-c6-v2.dts | 4 ++-- .../dts/qca9563_tplink_archer-x6-v2.dtsi | 4 ++-- .../dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts | 4 ++-- .../dts/qca9563_tplink_tl-wpa8630p-v2-int.dts | 4 ++-- .../dts/qca9563_tplink_tl-wpa8630p-v2.dtsi | 4 ++-- .../etc/hotplug.d/firmware/11-ath10k-caldata | 18 +++++------------ 19 files changed, 78 insertions(+), 56 deletions(-) diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi index e8a3bdc399..044f6c5c19 100644 --- a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi @@ -100,7 +100,7 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&info 0x08>; + mtd-mac-address = <&info 0x8>; }; ð0 { diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts index 0e338fe012..6d9cdf8b3f 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts @@ -126,9 +126,15 @@ reg = <0x020000 0x730000>; }; - tplink: partition@750000 { + info: partition@750000 { + label = "info"; + reg = <0x750000 0x010000>; + read-only; + }; + + partition@760000 { label = "tplink"; - reg = <0x750000 0x0a0000>; + reg = <0x760000 0x090000>; read-only; }; @@ -146,7 +152,7 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&tplink 0x8>; + mtd-mac-address = <&info 0x8>; mtd-mac-address-increment = <1>; }; @@ -158,7 +164,7 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&tplink 0x8>; + mtd-mac-address = <&info 0x8>; }; &pcie0 { diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts index e103b66cbd..6f7f3cca79 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts @@ -125,9 +125,21 @@ compatible = "tplink,firmware"; }; - config: partition@3b0000 { + partition@3b0000 { + label = "partition-table"; + reg = <0x3b0000 0x010000>; + read-only; + }; + + info: partition@3c0000 { + label = "info"; + reg = <0x3c0000 0x010000>; + read-only; + }; + + partition@3d0000 { label = "config"; - reg = <0x3b0000 0x040000>; + reg = <0x3d0000 0x020000>; read-only; }; @@ -145,7 +157,7 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&config 0x10008>; + mtd-mac-address = <&info 0x8>; }; ð1 { @@ -156,5 +168,5 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x10008>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts index 887b6eea5f..7c27c97934 100644 --- a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts @@ -100,7 +100,7 @@ phy-handle = <&phy4>; pll-data = <0x9e000000 0x80000101 0x80001313>; - mtd-mac-address = <&config 0x10008>; + mtd-mac-address = <&info 0x8>; gmac-config { device = <&gmac>; @@ -144,9 +144,21 @@ reg = <0x020000 0xd70000>; }; - config: partition@d90000 { + partition@d90000 { + label = "partition-table"; + reg = <0xd90000 0x010000>; + read-only; + }; + + info: partition@da0000 { + label = "info"; + reg = <0xda0000 0x020000>; + read-only; + }; + + partition@dc0000 { label = "config"; - reg = <0xd90000 0x260000>; + reg = <0xdc0000 0x230000>; read-only; }; @@ -167,5 +179,5 @@ status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&config 0x10008>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts index db2e38bbcb..dfd299b0a0 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts @@ -28,8 +28,8 @@ read-only; }; - mac: partition@10000 { - label = "mac"; + info: partition@10000 { + label = "info"; reg = <0x010000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index 773b071a34..cb0dca59ee 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -52,8 +52,8 @@ read-only; }; - mac: partition@10000 { - label = "mac"; + info: partition@10000 { + label = "info"; reg = <0x010000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts index e70afbffd9..c2dad233fa 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v2.dts @@ -58,8 +58,8 @@ read-only; }; - mac: partition@30000 { - label = "mac"; + info: partition@30000 { + label = "info"; reg = <0x030000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi index aa33d13c85..06df553d49 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi @@ -130,7 +130,7 @@ phy-handle = <&swphy0>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; mtd-mac-address-increment = <1>; gmac-config { @@ -144,12 +144,12 @@ ð1 { status = "okay"; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts index a83b5881d4..349c0623d6 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v1.dts @@ -40,8 +40,8 @@ read-only; }; - mac: partition@10000 { - label = "mac"; + info: partition@10000 { + label = "info"; reg = <0x010000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts index c19e4e973d..ebd5254a2c 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v2.dts @@ -40,8 +40,8 @@ read-only; }; - mac: partition@1fb00 { - label = "mac"; + info: partition@1fb00 { + label = "info"; reg = <0x01fb00 0x000500>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts index 444d54b000..3187bcda63 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c60-v3.dts @@ -35,8 +35,8 @@ read-only; }; - mac: partition@1fb00 { - label = "mac"; + info: partition@1fb00 { + label = "info"; reg = <0x01fb00 0x000500>; read-only; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi index 993c6acc56..b001938d92 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi @@ -76,19 +76,19 @@ phy-handle = <&swphy4>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; mtd-mac-address-increment = <1>; }; ð1 { status = "okay"; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts index 3a6f00bf4e..63185ca7e5 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2-us.dts @@ -96,8 +96,8 @@ read-only; }; - mac: partition@20000 { - label = "mac"; + info: partition@20000 { + label = "info"; reg = <0x020000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts index e7ceec9b37..7defe6a2a2 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c6-v2.dts @@ -96,8 +96,8 @@ read-only; }; - mac: partition@20000 { - label = "mac"; + info: partition@20000 { + label = "info"; reg = <0x020000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi index 275f71316c..15be4c2967 100644 --- a/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x6-v2.dtsi @@ -42,12 +42,12 @@ phy-mode = "sgmii"; phy-handle = <&phy0>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; &wmac { status = "okay"; mtd-cal-data = <&art 0x1000>; - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts index afcb471670..c205b78545 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-eu.dts @@ -9,8 +9,8 @@ }; &partitions { - mac: partition@630000 { - label = "mac"; + info: partition@630000 { + label = "info"; reg = <0x630000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts index 8655283f58..9990a253ca 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2-int.dts @@ -15,8 +15,8 @@ read-only; }; - mac: partition@7e0000 { - label = "mac"; + info: partition@7e0000 { + label = "info"; reg = <0x7e0000 0x010000>; read-only; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi index 2d3128e037..be691a843b 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630p-v2.dtsi @@ -35,9 +35,9 @@ }; ð0 { - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; &wmac { - mtd-mac-address = <&mac 0x8>; + mtd-mac-address = <&info 0x8>; }; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 39b2d0ba49..89a64fbf35 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -98,7 +98,8 @@ case "$FIRMWARE" in tplink,archer-c2-v3|\ tplink,archer-c7-v4|\ tplink,archer-c7-v5|\ - tplink,archer-c25-v1) + tplink,archer-c25-v1|\ + tplink,tl-wr902ac-v1) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1) ;; @@ -118,7 +119,7 @@ case "$FIRMWARE" in ;; tplink,re350k-v1) caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary config 0x10008) +2) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +2) ;; tplink,re355-v1|\ tplink,re450-v1) @@ -134,10 +135,6 @@ case "$FIRMWARE" in caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary u-boot 0x0fc00) +1) ;; - tplink,tl-wr902ac-v1) - caldata_extract "art" 0x5000 0x844 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary tplink 0x8) -1) - ;; esac ;; "ath10k/cal-pci-0000:01:00.0.bin") @@ -195,18 +192,13 @@ case "$FIRMWARE" in tplink,archer-c6-v2|\ tplink,archer-c6-v2-us) caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) -1) + ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) -1) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + tplink,eap225-wall-v2|\ tplink,tl-wpa8630p-v2-eu|\ tplink,tl-wpa8630p-v2-int) - caldata_extract "art" 0x5000 0x2f20 - ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary mac 0x8) +1) - ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ - /lib/firmware/ath10k/QCA9888/hw2.0/board.bin - ;; - tplink,eap225-wall-v2) caldata_extract "art" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) +1) ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ From c68105c3b4f616931444174ff6d893c8fbaf9465 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 13 Sep 2020 14:48:26 +0200 Subject: [PATCH 06/32] ath79: use common device definition for Buffalo devices The Buffalo devices in ath79 share their image generation code, so let's create a shared Device definition for them. Since most of them use BUFFALO_HWVER := 3, this is moved as default to the shared definition as well. Signed-off-by: Adrian Schmutzler --- target/linux/ath79/image/common-buffalo.mk | 15 +++++++++ target/linux/ath79/image/generic.mk | 39 ++++++---------------- target/linux/ath79/image/tiny.mk | 9 ++--- 3 files changed, 27 insertions(+), 36 deletions(-) diff --git a/target/linux/ath79/image/common-buffalo.mk b/target/linux/ath79/image/common-buffalo.mk index d62b7eea94..31936b8234 100644 --- a/target/linux/ath79/image/common-buffalo.mk +++ b/target/linux/ath79/image/common-buffalo.mk @@ -1,3 +1,5 @@ +DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER + define Build/buffalo-tag $(eval product=$(word 1,$(1))) $(eval hwver=$(word 2,$(1))) @@ -17,3 +19,16 @@ define Build/buffalo-tftp-header ) > $@.new mv $@.new $@ endef + + +define Device/buffalo_common + DEVICE_VENDOR := Buffalo + BUFFALO_PRODUCT := + BUFFALO_HWVER := 3 + IMAGES += factory.bin tftp.bin + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ + pad-rootfs | check-size + IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc $$$$(BUFFALO_PRODUCT) 1.99 | \ + buffalo-tag $$$$(BUFFALO_PRODUCT) $$$$(BUFFALO_HWVER) + IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header +endef diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 7a00bae287..4b6cdaa826 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -315,17 +315,12 @@ endef TARGET_DEVICES += avm_fritzdvbc define Device/buffalo_bhr-4grv + $(Device/buffalo_common) SOC := ar7242 - DEVICE_VENDOR := Buffalo DEVICE_MODEL := BHR-4GRV + BUFFALO_PRODUCT := BHR-4GRV DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport IMAGE_SIZE := 32256k - IMAGES += factory.bin tftp.bin - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size - IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | \ - buffalo-tag BHR-4GRV 3 - IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header SUPPORTED_DEVICES += wzr-hp-g450h endef TARGET_DEVICES += buffalo_bhr-4grv @@ -339,51 +334,37 @@ endef TARGET_DEVICES += buffalo_bhr-4grv2 define Device/buffalo_wzr-hp-ag300h + $(Device/buffalo_common) SOC := ar7161 - DEVICE_VENDOR := Buffalo DEVICE_MODEL := WZR-HP-AG300H - IMAGE_SIZE := 32320k - IMAGES += factory.bin tftp.bin - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size - IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | \ - buffalo-tag WZR-HP-AG300H 3 - IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header + BUFFALO_PRODUCT := WZR-HP-AG300H DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-leds-reset kmod-owl-loader + IMAGE_SIZE := 32320k SUPPORTED_DEVICES += wzr-hp-ag300h endef TARGET_DEVICES += buffalo_wzr-hp-ag300h define Device/buffalo_wzr-hp-g302h-a1a0 + $(Device/buffalo_common) SOC := ar7242 - DEVICE_VENDOR := Buffalo DEVICE_MODEL := WZR-HP-G302H DEVICE_VARIANT := A1A0 + BUFFALO_PRODUCT := WZR-HP-G302H + BUFFALO_HWVER := 4 DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport IMAGE_SIZE := 32128k - IMAGES += factory.bin tftp.bin - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size - IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | \ - buffalo-tag WZR-HP-G302H 4 - IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header SUPPORTED_DEVICES += wzr-hp-g300nh2 endef TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0 define Device/buffalo_wzr-hp-g450h + $(Device/buffalo_common) SOC := ar7242 - DEVICE_VENDOR := Buffalo DEVICE_MODEL := WZR-HP-G450H/WZR-450HP + BUFFALO_PRODUCT := WZR-HP-G450H DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport IMAGE_SIZE := 32256k - IMAGES += factory.bin tftp.bin - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size - IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | \ - buffalo-tag WZR-HP-G450H 3 - IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header SUPPORTED_DEVICES += wzr-hp-g450h endef TARGET_DEVICES += buffalo_wzr-hp-g450h diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 9f4f89bd9a..83c34d718b 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -1,16 +1,11 @@ include ./common-buffalo.mk define Device/buffalo_whr-g301n + $(Device/buffalo_common) SOC := ar7240 - DEVICE_VENDOR := Buffalo DEVICE_MODEL := WHR-G301N + BUFFALO_PRODUCT := WHR-G301N IMAGE_SIZE := 3712k - IMAGES += factory.bin tftp.bin - IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \ - pad-rootfs | check-size - IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | \ - buffalo-tag WHR-G301N 3 - IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header SUPPORTED_DEVICES += whr-g301n DEFAULT := n endef From 25f2f66eeaf720e3db154019fe0b32a146c6082f Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Sun, 13 Sep 2020 15:27:49 +0200 Subject: [PATCH 07/32] ath79: add support for Buffalo WZR-600DHP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hardware of this device seems to be identical to WZR-HP-AG300H. It was already implemented as a clone in ar71xx. Specification: - 680 MHz CPU (Qualcomm Atheros AR7161) - 128 MiB RAM - 32 MiB Flash - WiFi 5 GHz a/n - WiFi 2.4 GHz b/g/n - 5x 1000Base-T Ethernet - 1x USB 2.0 Installation of OpenWRT from vendor firmware: - Connect to the Web-interface at http://192.168.11.1 - Go to “Administration” → “Firmware Upgrade” - Upload the OpenWrt factory image Signed-off-by: Adrian Schmutzler --- .../ath79/dts/ar7161_buffalo_wzr-600dhp.dts | 9 + .../dts/ar7161_buffalo_wzr-hp-ag300h.dts | 267 +---------------- .../dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 268 ++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 2 + target/linux/ath79/image/generic.mk | 14 +- 6 files changed, 294 insertions(+), 267 deletions(-) create mode 100644 target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts create mode 100644 target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts new file mode 100644 index 0000000000..beee19ed6f --- /dev/null +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-600dhp.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7161_buffalo_wzr-hp-ag300h.dtsi" + +/ { + compatible = "buffalo,wzr-600dhp", "qca,ar7161"; + model = "Buffalo WZR-600DHP"; +}; diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts index 43f35683bd..807f76cf17 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts @@ -1,272 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include -#include - -#include "ar7100.dtsi" +#include "ar7161_buffalo_wzr-hp-ag300h.dtsi" / { compatible = "buffalo,wzr-hp-ag300h", "qca,ar7161"; - model = "Buffalo WZR-HP-AG300H/WZR-600DHP"; - - aliases { - led-boot = &led_diag; - led-failsafe = &led_diag; - led-upgrade = &led_diag; - }; - - extosc: ref { - compatible = "fixed-clock"; - #clock-cells = <0>; - clock-output-names = "ref"; - clock-frequency = <40000000>; - }; - - leds { - compatible = "gpio-leds"; - - led_diag: diag { - label = "buffalo:red:diag"; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - }; - }; - - ath9k-leds { - compatible = "gpio-leds"; - - band2g_a { - label = "buffalo:amber:band2g"; - gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>; - }; - - usb { - label = "buffalo:green:usb"; - gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>; - trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>; - linux,default-trigger = "usbport"; - }; - - band2g_g { - label = "buffalo:green:band2g"; - gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy0tpt"; - }; - - band5g_g { - label = "buffalo:green:band5g"; - gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>; - linux,default-trigger = "phy1tpt"; - }; - - router { - label = "buffalo:green:router"; - gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>; - }; - - movie_engine { - label = "buffalo:blue:movie_engine"; - gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>; - }; - - band5g_a { - label = "buffalo:amber:band5g"; - gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - linux,code = ; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - usb { - linux,code = ; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - aoss { - linux,code = ; - gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - router_auto { - linux,code = ; - gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - router_off { - linux,code = ; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - movie_engine { - linux,code = ; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - gpio-export { - compatible = "gpio-export"; - - gpio_usb_power { - gpio-export,name = "buffalo:power:usb"; - gpio-export,output = <1>; - gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; - }; - }; - - flash { - compatible = "mtd-concat"; - - devices = <&flash0 &flash1>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - partition@0 { - label = "u-boot"; - reg = <0x0000000 0x0040000>; - read-only; - }; - - partition@40000 { - label = "u-boot-env"; - reg = <0x0040000 0x0010000>; - read-only; - }; - - art: partition@50000 { - label = "art"; - reg = <0x0050000 0x0010000>; - read-only; - }; - - partition@60000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x0060000 0x1f90000>; - }; - - partition@1ff0000 { - label = "user_property"; - reg = <0x1ff0000 0x0010000>; - read-only; - }; - }; - }; -}; - -&usb_phy { - status = "okay"; -}; - -&usb1 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - usb_ohci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&usb2 { - #address-cells = <1>; - #size-cells = <0>; - status = "okay"; - - usb_ehci_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; -}; - -&pcie0 { - status = "okay"; - - ath9k0: wifi@0,11 { - compatible = "pci168c,0029"; - reg = <0x8800 0 0 0 0>; - qca,no-eeprom; - #gpio-cells = <2>; - gpio-controller; - }; - - ath9k1: wifi@0,12 { - compatible = "pci168c,0029"; - reg = <0x9000 0 0 0 0>; - qca,no-eeprom; - #gpio-cells = <2>; - gpio-controller; - }; -}; - -&uart { - status = "okay"; -}; - -&pll { - clocks = <&extosc>; -}; - -&spi { - status = "okay"; - - num-cs = <2>; - cs-gpios = <0>, <0>; - - flash0: flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <50000000>; - m25p,fast-read; - }; - - flash1: flash@1 { - compatible = "jedec,spi-nor"; - reg = <1>; - spi-max-frequency = <50000000>; - m25p,fast-read; - }; -}; - -&mdio0 { - status = "okay"; - - phy4: ethernet-phy@4 { - reg = <4>; - phy-mode = "rgmii"; - }; -}; - -ð0 { - status = "okay"; - - mtd-mac-address = <&art 0x120c>; - - fixed-link { - speed = <1000>; - full-duplex; - }; -}; - -ð1 { - status = "okay"; - - mtd-mac-address = <&art 0x520c>; - mtd-mac-address-increment = <1>; - - phy-handle = <&phy4>; + model = "Buffalo WZR-HP-AG300H"; }; diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi new file mode 100644 index 0000000000..c0040b4bbe --- /dev/null +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -0,0 +1,268 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include + +#include "ar7100.dtsi" + +/ { + aliases { + led-boot = &led_diag; + led-failsafe = &led_diag; + led-upgrade = &led_diag; + }; + + extosc: ref { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-output-names = "ref"; + clock-frequency = <40000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_diag: diag { + label = "buffalo:red:diag"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + band2g_a { + label = "buffalo:amber:band2g"; + gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "buffalo:green:usb"; + gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>; + trigger-sources = <&usb_ohci_port>, <&usb_ehci_port>; + linux,default-trigger = "usbport"; + }; + + band2g_g { + label = "buffalo:green:band2g"; + gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + band5g_g { + label = "buffalo:green:band5g"; + gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + router { + label = "buffalo:green:router"; + gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>; + }; + + movie_engine { + label = "buffalo:blue:movie_engine"; + gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>; + }; + + band5g_a { + label = "buffalo:amber:band5g"; + gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + usb { + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + aoss { + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + router_auto { + linux,code = ; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + router_off { + linux,code = ; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + movie_engine { + linux,code = ; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + gpio_usb_power { + gpio-export,name = "buffalo:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; + }; + }; + + flash { + compatible = "mtd-concat"; + + devices = <&flash0 &flash1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x0040000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x0040000 0x0010000>; + read-only; + }; + + art: partition@50000 { + label = "art"; + reg = <0x0050000 0x0010000>; + read-only; + }; + + partition@60000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x0060000 0x1f90000>; + }; + + partition@1ff0000 { + label = "user_property"; + reg = <0x1ff0000 0x0010000>; + read-only; + }; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&usb1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + usb_ohci_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + usb_ehci_port: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&pcie0 { + status = "okay"; + + ath9k0: wifi@0,11 { + compatible = "pci168c,0029"; + reg = <0x8800 0 0 0 0>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + }; + + ath9k1: wifi@0,12 { + compatible = "pci168c,0029"; + reg = <0x9000 0 0 0 0>; + qca,no-eeprom; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&uart { + status = "okay"; +}; + +&pll { + clocks = <&extosc>; +}; + +&spi { + status = "okay"; + + num-cs = <2>; + cs-gpios = <0>, <0>; + + flash0: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + }; + + flash1: flash@1 { + compatible = "jedec,spi-nor"; + reg = <1>; + spi-max-frequency = <50000000>; + m25p,fast-read; + }; +}; + +&mdio0 { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&art 0x120c>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x520c>; + mtd-mac-address-increment = <1>; + + phy-handle = <&phy4>; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index f437f7432f..40ea14fa9b 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -94,6 +94,7 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0" ;; + buffalo,wzr-600dhp|\ buffalo,wzr-hp-ag300h|\ tplink,archer-c25-v1|\ tplink,archer-c60-v1|\ diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 5ecae96cd1..3983b1f8c0 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -132,6 +132,7 @@ case "$FIRMWARE" in ;; "ath9k-eeprom-pci-0000:00:11.0.bin") case $board in + buffalo,wzr-600dhp|\ buffalo,wzr-hp-ag300h|\ netgear,wndr3700|\ netgear,wndr3700-v2|\ @@ -155,6 +156,7 @@ case "$FIRMWARE" in ;; "ath9k-eeprom-pci-0000:00:12.0.bin") case $board in + buffalo,wzr-600dhp|\ buffalo,wzr-hp-ag300h|\ netgear,wndr3700|\ netgear,wndr3700-v2|\ diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 4b6cdaa826..7e5b09af2b 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -333,16 +333,26 @@ define Device/buffalo_bhr-4grv2 endef TARGET_DEVICES += buffalo_bhr-4grv2 -define Device/buffalo_wzr-hp-ag300h +define Device/buffalo_wzr_ar7161 $(Device/buffalo_common) SOC := ar7161 - DEVICE_MODEL := WZR-HP-AG300H BUFFALO_PRODUCT := WZR-HP-AG300H DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \ kmod-leds-reset kmod-owl-loader IMAGE_SIZE := 32320k SUPPORTED_DEVICES += wzr-hp-ag300h endef + +define Device/buffalo_wzr-600dhp + $(Device/buffalo_wzr_ar7161) + DEVICE_MODEL := WZR-600DHP +endef +TARGET_DEVICES += buffalo_wzr-600dhp + +define Device/buffalo_wzr-hp-ag300h + $(Device/buffalo_wzr_ar7161) + DEVICE_MODEL := WZR-HP-AG300H +endef TARGET_DEVICES += buffalo_wzr-hp-ag300h define Device/buffalo_wzr-hp-g302h-a1a0 From 947bfc62d003ea54c13470ee6bbc9f20827592b0 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 16 Sep 2020 17:34:35 +0200 Subject: [PATCH 08/32] ath79: fix button types for WZR-HP-AG300H and WZR-600DHP Router and Movie "keys" are actually switches for both devices according to the manual. This has been properly implemented in ar71xx, but overlooked when porting to ath79. Fixes: 480bf2827392 ("ath79: add support for Buffalo WZR-HP-AG300H") Signed-off-by: Adrian Schmutzler --- target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi index c0040b4bbe..d369a4d937 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi @@ -94,18 +94,21 @@ router_auto { linux,code = ; + linux,input-type = ; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; debounce-interval = <60>; }; router_off { linux,code = ; + linux,input-type = ; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; debounce-interval = <60>; }; movie_engine { linux,code = ; + linux,input-type = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; debounce-interval = <60>; }; From 673062fc56c05ec613f416b0da7325be46e65a29 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 16 Sep 2020 18:47:52 +0200 Subject: [PATCH 09/32] mac80211: allow bigger A-MSDU sizes in VHT, even if HT is limited Improves tx throughput when connecting to some APs (e.g. Asus RT-AC88U) Signed-off-by: Felix Fietkau --- ...igger-A-MSDU-sizes-in-VHT-even-if-HT.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch b/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch new file mode 100644 index 0000000000..b67030d135 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch @@ -0,0 +1,26 @@ +From: Felix Fietkau +Date: Wed, 16 Sep 2020 18:43:46 +0200 +Subject: [PATCH] mac80211: allow bigger A-MSDU sizes in VHT, even if HT is + limited + +Some APs (e.g. Asus RT-AC88U) have been observed to report an HT MSDU size +limit of 3839 and a VHT limit of 7991. These APs can handle bigger frames +than 3839 bytes just fine, so we should remove the VHT limit based on the +HT capabilities. This improves tx throughput. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/vht.c ++++ b/net/mac80211/vht.c +@@ -315,10 +315,6 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru + + sta->sta.bandwidth = ieee80211_sta_cur_vht_bw(sta); + +- /* If HT IE reported 3839 bytes only, stay with that size. */ +- if (sta->sta.max_amsdu_len == IEEE80211_MAX_MPDU_LEN_HT_3839) +- return; +- + switch (vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK) { + case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454: + sta->sta.max_amsdu_len = IEEE80211_MAX_MPDU_LEN_VHT_11454; From 4a46f36f99935aee2cc75990e38feceff3ec5dad Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Thu, 10 Sep 2020 21:42:37 +0200 Subject: [PATCH 10/32] lantiq: remove trailing whitespaces in dts Remove trailing whitespaces in dts files. Signed-off-by: Aleksander Jan Bajkowski --- .../mips/boot/dts/lantiq/vr9_avm_fritz7412.dts | 16 ++++++++-------- .../mips/boot/dts/lantiq/vr9_tplink_vr200.dts | 2 +- .../mips/boot/dts/lantiq/vr9_tplink_vr200v.dts | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts index fe02d53c83..85fb3368c6 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_avm_fritz7412.dts @@ -32,13 +32,13 @@ keys { compatible = "gpio-keys-polled"; poll-interval = <100>; - + wps { label = "wps"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; linux,code = ; }; - + dect { label = "dect"; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; @@ -54,27 +54,27 @@ gpios = <&gpio 6 GPIO_ACTIVE_LOW>; default-state = "keep"; }; - + power_red: power_red { label = "fritz7412:red:power"; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; }; - + fon { label = "fritz7412:green:fon"; gpios = <&gpio 34 GPIO_ACTIVE_LOW>; }; - + dect { label = "fritz7412:green:dect"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; }; - + wifi: wifi { label = "fritz7412:green:wifi"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; }; - + info: info { label = "fritz7412:green:info"; gpios = <&gpio 35 GPIO_ACTIVE_LOW>; @@ -205,7 +205,7 @@ #address-cells = <1>; #size-cells = <0>; compatible = "lantiq,xrx200-mdio"; - + phy11: ethernet-phy@11 { reg = <0x11>; compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22"; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts index 98f2282579..512db47e7d 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dts @@ -88,5 +88,5 @@ label = "vr200:blue:wps"; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; - }; + }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts index 2e25a72a83..d042714a5b 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_tplink_vr200v.dts @@ -88,7 +88,7 @@ label = "vr200v:blue:phone"; gpios = <&gpio 44 GPIO_ACTIVE_LOW>; }; - }; + }; }; &vmmc { From 179073b0cca3e25e42f56cc5151b2c634a974acf Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 18 May 2020 12:34:06 +0200 Subject: [PATCH 11/32] firmware: ipq-wifi: enable use on IPQ806x This enables the ipq-wifi package to be used on IPQ806x target. Its needed for boards using a different BDF than one shipped in the upstream board-2.bin. Currently needed for Edgecore ECW5410. Signed-off-by: Robert Marko --- package/firmware/ipq-wifi/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index ee7b194601..0d1a737d59 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -46,7 +46,7 @@ define Package/ipq-wifi-default SUBMENU:=ath10k Board-Specific Overrides SECTION:=firmware CATEGORY:=Firmware - DEPENDS:=@TARGET_ipq40xx + DEPENDS:=@(TARGET_ipq40xx||TARGET_ipq806x) TITLE:=Custom Board endef From 6133ac8e99709cf1ab78c8a46b1d319f33d4e0ee Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 18 May 2020 12:25:20 +0200 Subject: [PATCH 12/32] ipq806x: 5.4: enable AT803X driver Its needed for Edgecore ECW5410 which does not use QCA8337 switch, but rather 2x AR8033 PHY-s directly connected to GMAC-s. Signed-off-by: Robert Marko --- target/linux/ipq806x/config-5.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ipq806x/config-5.4 b/target/linux/ipq806x/config-5.4 index 263d153dde..568c5df39e 100644 --- a/target/linux/ipq806x/config-5.4 +++ b/target/linux/ipq806x/config-5.4 @@ -68,6 +68,7 @@ CONFIG_ARM_QCOM_CPUIDLE=y CONFIG_ARM_THUMB=y CONFIG_ARM_UNWIND=y CONFIG_ARM_VIRT_EXT=y +CONFIG_AT803X_PHY=y CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_MQ_PCI=y From 811af0d98adfc3e71cea134491a2255961cceac6 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 18 May 2020 12:28:37 +0200 Subject: [PATCH 13/32] ipq806x: add GSBI1 node to DTSI IPQ806x series also has a GSBI1 with UART and I2C peripherals, so lets add the node for it. Its needed for Edgecore ECW5410 which uses the UART from GSBI1 as second UART for Bluetooth. Signed-off-by: Robert Marko --- .../patches-5.4/851-add-gsbi1-dts.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch diff --git a/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch b/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch new file mode 100644 index 0000000000..2e1cb70e11 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/851-add-gsbi1-dts.patch @@ -0,0 +1,46 @@ +Index: linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi +=================================================================== +--- linux-5.4.65.orig/arch/arm/boot/dts/qcom-ipq8064.dtsi ++++ linux-5.4.65/arch/arm/boot/dts/qcom-ipq8064.dtsi +@@ -865,6 +865,41 @@ + reg = <0x12100000 0x10000>; + }; + ++ gsbi1: gsbi@12440000 { ++ compatible = "qcom,gsbi-v1.0.0"; ++ cell-index = <1>; ++ reg = <0x12440000 0x100>; ++ clocks = <&gcc GSBI1_H_CLK>; ++ clock-names = "iface"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ status = "disabled"; ++ ++ syscon-tcsr = <&tcsr>; ++ ++ gsbi1_serial: serial@12450000 { ++ compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; ++ reg = <0x12450000 0x100>, ++ <0x12400000 0x03>; ++ interrupts = ; ++ clocks = <&gcc GSBI1_UART_CLK>, <&gcc GSBI1_H_CLK>; ++ clock-names = "core", "iface"; ++ status = "disabled"; ++ }; ++ ++ gsbi1_i2c: i2c@12460000 { ++ compatible = "qcom,i2c-qup-v1.1.1"; ++ reg = <0x12460000 0x1000>; ++ interrupts = ; ++ clocks = <&gcc GSBI1_QUP_CLK>, <&gcc GSBI1_H_CLK>; ++ clock-names = "core", "iface"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ }; ++ + gsbi2: gsbi@12480000 { + compatible = "qcom,gsbi-v1.0.0"; + cell-index = <2>; From 43a53891ce8f141e11960bc7b4ad369588ac341d Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 18 May 2020 12:35:15 +0200 Subject: [PATCH 14/32] ipq806x: import bootargs-append from IPQ40xx This imports the patch that adds bootargs-append support from IPQ40xx. This way we can append additional boot arguments from DTS instead of only being able to overwrite them. This way dual firmware devices can use the rootfs number that bootloader passes to decide from what to boot. But we still need to append console info and ubi root info. This is used by Edgecore ECW5410. Signed-off-by: Robert Marko --- .../patches-5.4/997-device_tree_cmdline.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch diff --git a/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch b/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch new file mode 100644 index 0000000000..92f82b3788 --- /dev/null +++ b/target/linux/ipq806x/patches-5.4/997-device_tree_cmdline.patch @@ -0,0 +1,14 @@ +Index: linux-5.4.65/drivers/of/fdt.c +=================================================================== +--- linux-5.4.65.orig/drivers/of/fdt.c ++++ linux-5.4.65/drivers/of/fdt.c +@@ -1059,6 +1059,9 @@ int __init early_init_dt_scan_chosen(uns + p = of_get_flat_dt_prop(node, "bootargs", &l); + if (p != NULL && l > 0) + strlcpy(data, p, min(l, COMMAND_LINE_SIZE)); ++ p = of_get_flat_dt_prop(node, "bootargs-append", &l); ++ if (p != NULL && l > 0) ++ strlcat(data, p, min_t(int, strlen(data) + (int)l, COMMAND_LINE_SIZE)); + + /* + * CONFIG_CMDLINE is meant to be a default in case nothing else From 59f0a0fd839e239987ca14dcefe19717aaa71cd0 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 7 Sep 2020 12:43:37 +0200 Subject: [PATCH 15/32] ipq806x: add Edgecore ECW5410 support This patch adds support for the Edgecore ECW5410 indoor AP. Specification: - SoC: Qualcomm Atheros IPQ8068 ARMv7 2x Cortex A-15 - RAM: 256MB(225 usable) DDR3 - NOR Flash: 16MB SPI NOR - NAND Flash: 128MB S34MS01G2 Parallel NAND - Ethernet: 2 x 1G via 2x AR8033 PHY-s connected directly to GMAC2 and GMAC3 via SGMII (802.3af POE IN on eth0) - USB: 1 x USB 3.0 SuperSpeed - WLAN: 2x QCA9994 AC Wawe 2 (1x 2GHz bgn, 1x 5GHz acn) - CC2540 BLE - UART console on RJ45 next to ethernet ports exposed. Its Cisco pin compatible, 115200 8n1 baud. Installation instructions: Through stock firmware or initramfs. 1.Connect to console 2. Login with root account, if password is unknown then interrupt the boot with f and reset it in failsafe. 3. Transfer factory image 4. Flash the image with ubiformat /dev/mtd1 -y -f This will replace the rootfs2 with OpenWrt, if you are currently running from rootfs2 then simply change /dev/mtd1 to /dev/mtd0 Note Initramfs: 1. Connect to console 2. Transfer the image from TFTP server with tftpboot, or by using DHCP advertised image with dhcp command. 3. bootm 4. Run ubiformat /dev/mtd1 You need to interrupt the bootloader after rebooting and run: run altbootcmd This will switch your active rootfs partition to one you wrote to and boot from it. So if rootfs1 is active, then it will change it to rootfs2. This will format the rootfs2 partition, if your active partition is 2 then simply change /dev/mtd1 with /dev/mtd0 If you dont format the partition you will be writing too, then sysupgrade will find existing UBI rootfs and kernel volumes and update those. This will result in wrong ordering and OpenWrt will panic on boot. 5. Transfer sysupgrade image 6. Flash with sysupgrade -n. Note that sysupgrade will write the image to rootfs partition that is not currently in use. Signed-off-by: Robert Marko --- package/boot/uboot-envtools/files/ipq806x | 3 + package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-edgecore_ecw5410.qca9984 | Bin 0 -> 24324 bytes .../ipq806x/base-files/etc/board.d/01_leds | 4 + .../ipq806x/base-files/etc/board.d/02_network | 5 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 10 + .../ipq806x/base-files/etc/init.d/bootcount | 3 + .../base-files/lib/upgrade/platform.sh | 11 + .../arm/boot/dts/qcom-ipq8068-ecw5410.dts | 400 ++++++++++++++++++ target/linux/ipq806x/image/Makefile | 12 + .../0069-arm-boot-add-dts-files.patch | 3 +- 11 files changed, 452 insertions(+), 1 deletion(-) create mode 100644 package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 create mode 100644 target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x index e2f2e611cd..6aae089ac4 100644 --- a/package/boot/uboot-envtools/files/ipq806x +++ b/package/boot/uboot-envtools/files/ipq806x @@ -31,6 +31,9 @@ ubootenv_mtdinfo () { } case "$board" in +edgecore,ecw5410) + ubootenv_add_uci_config "/dev/mtd11" "0x0" "0x10000" "0x10000" + ;; linksys,ea7500-v1 |\ linksys,ea8500) ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x20000" "0x20000" diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 0d1a737d59..a796910186 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -31,6 +31,7 @@ ALLWIFIBOARDS:= \ buffalo_wtr-m2133hp \ cellc_rtl30vw \ dlink_dap2610 \ + edgecore_ecw5410 \ engenius_eap2200 \ engenius_emd1 \ engenius_emr3500 \ @@ -105,6 +106,7 @@ $(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater $(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP)) $(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW)) $(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610)) +$(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410)) $(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200)) $(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1)) $(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500)) diff --git a/package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 b/package/firmware/ipq-wifi/board-edgecore_ecw5410.qca9984 new file mode 100644 index 0000000000000000000000000000000000000000..2c1992001d86268e0483b9e53ed4b563e224ada4 GIT binary patch literal 24324 zcmeHPeN+=y7JnH)J}sG$q9`3c1goeK0|h^#2wJq7)|7S8P(=c$7>lM6tOyq5L#PH# zk)SOLQb{PbK*6Pj7KMm{+M}HAIX$P{t+nl*ZU5Mw_MEnR+HQ}{?0YkrWC%pV*W$JNMrA-pycU-uvP6t6~?#Zd|)4eEovB4Y3KUL1tzqfTUW8Y5-zjNzLB3T$Q$K zero2f1!)<(R10>cFAt}Bse2Xbbktomf4@S#OR*QzO-Pm;3Ch`U8Q?PT|IdJt8qx?-$yCb& zRu}o9MFyajB?G|Nr;+IveG}PZkpVc!k^%S=)e9usOy^DCo9Oi|C6|)7|Da_6BFHMr zCWrio>2p(}**lp`CSNq$0}x9}DZLAsY05O^Q}Sx^oavm&aDoTics$J64gNrZiF&tI znv$;3e*DR2$mTP$6-N7z6vBd-@yjCP$N@5i^Z@Ok4l+X?pp~qGB@x;-kQEktt#*IX z#*NbW#emOuGaE0S8#*gEH~{v3`TC3BOs2=7MC*|9w{LD^&dw+euJADu`lrzTUS7^- z{~bG$5^3F?J3pFr0EFmN)Tr~x_e}4Z{%Ow9LUJM5PU-iN-hy=c8O zf{6Gb0$)Zf6D^a{9|F6khN4qH;WfHtRj<}Gu}kO}NxC^hQ`dg+ruFS&u*CW`8CJY~ zrKh3haPAhx%B#kfbDAP$s%*tTZ%e%eJp1z3vrtl05o1NE)5?1o+h0aaNbB zPLzwUUT$gDlql1n!{rveCQm7sMM4JybdbxVEDi&GEe2hYdW$@&r{D07Mx)#*i$$(F zje5I0X5eZ|qwa`$n|uj!IEF^(=&jKgl_+=1R(D)Nl49%H`Ep9kk$TZ_C@d!rT-^Oh-R-C|B=R zJl}K0V9*q*74ju0bMUG{vC`u3>E({bnu4OO%9x(3FmACrMG@cA+tON7QM6YngIC{z zSCf^LLwS`}JM3p;PszQm*vkxC&t-|74SO<|C3~4+>$xnkv%$%ZW&oqNu?Lwu_O3F> z<$>)Sy^_``X_$M;_i%B?3+Ey#i6UIp*{f=Mwmz(UW^Ut!jCa=5JXtzDyQTk7*RyZ? z7vt*su073?Qz0e3FBP2Mqz^ytpU2PWx|rRxp>|&BjQv%8$?vT&1ZV^YFZIWrc~ay1 zviHuK3mMH(y1*hlv$}I(ChhiRwh@?UJZvb8z-jeruL zY*lmI>!HQdvOE(@uWjm_SL=6lYSvrV_Iwak7jO*EuIyfK2&s@hbR*}z(UR&C(@4v9_?Z9%u zfs;M)^|Q-`Szf8vt}HthRER4*Q(GmqGYTHt{lI?k+{C#Ia2WtDuI`>wy>Xw%r}@o%V(^O@)kE(K zcOzFe4U%yv3Y--b6daW3;$}Ic9LCQv6%TWA!2ssuJjK-s zdSI?o&^DW^EBaD%b#Oi0kXmu}{AG5{y!wx< z9XbX&J)~&d#$a+L@J0NTs{nFa1qPTx_-*8GX?WGvDY5K!r2X zBWlRU0Mbjm2kX&wI{tds5Xeky)Y9=qo&zoe!^B?=x7XQ++Rd}FB4rZ!tKjn;hlkWXpOo% zB#Cs5aLJ4g>3^pfN!FOVoSaE#n|R(XaR1aM9*<`NXycQa2Wr!ttn*{$vYfY$S7siU zvF*a@Anyg)kO64M{tD$%P=clbda*)S@1f*IN`3{-TMzjxXn+hrJJya>fGWs{S}~;4 z04;VJ@?$(4G5}>*8Ro~sApbmsC^u^btsSEAwsUCE@iWp=IWOcP9>1ugk0jlap=rMf z0BjGyZL^!Ut%#!eVRPn~rP;y3obKVt0d>eR2a#EVpYQ#o8~vTlc|PbFAX~kJ&d%vz z^XbMubgp>{(wmT&b#+1-i;jsiQLS_{{KvJf{kpyO$=RVHlUeAKJNm4SKAn@wHg4XM zlAfW_R-XP#oxZWDwY~G=rM~MoM}C2IjyJL=*9XQLQ0JghK^b!rN}Yj926d zLa^Gj8kZ7MkyN@GM4BRT2_X?lq>DuhE*mP}-ZMrtbHr-*SVo{9{cQ1Afci-a) z&mo-hA@m*%6!sOYQULIn23trlMP7E{L-6`g+`ZR$;qGrx6JS+i#oe<)Q6k)Ui?P+g zziJo>xPGX+MPtR?2LhVmB?|A)m-CG3XXBS`C zXP3Ks554LMX{h$W)IgjYYu9z~8gBP?>#GZLk`ki2FB=*Q3zCv!V+Q(~8%~zKqYXwNpSm8cYXEYoUI9qyRTFma`F>i2#@UVHPja#N=k~A^cyKj zPUBKe=qfA0ZDaSF&|zD`(r#mQLr!5ra`=+|O9p*mVN&wq#RGi?L*Zd4QP`RjRl3T- z^SeinJCeRff~d=nWR@IB%)M;j$u;_(oHVM`Csjlj1n%}p$~zN(bneSDGK9&+4I3)v z9rD}dopees*M{f%XZXmE)&Kdm=)-}T!mZ_o=U-ctAFy}&_7hDnR7aKuWC_!ons!&O zI1-XIJ-w?f=gnue0egJ5^`B2X8C4jv&u{0kcNDctj?FqaP5Ew9PVJhb^K$%^leS=P z;4x)jtS4=7aO#GKkaBeE!`jISel1TildJWlZSaF#aH8`#oV1N;=@a5SkBWNdj@W|N zr-wnfdz2mucMkQjKSFE`EJOBRI zS6_aKfc{q8z5A~}e*fKf-$0!=e7+sdpB>*Sdw6|KJqn*Soq?$)rAm_h1?Axnc6 z#C5m~a2en-z-55T0GEMBI0Hj5@eJ(VZQRc6hmOI(?%l_2j0f!_EciQO-Hlwxc}Fn7 z6#q}Yz4h&_-jDzI=#P((PF6w}+WzL>zJScwqV|3w_@^F-2jT9I{C>;zmMg7eaQ6(h zpTXRtb|Ti%gLOf6=XpW~K<%maoJ##=z!2E|&l55FC}KLaPY&ZcYB!20Os31daQ6s< zP5oap(>aNF2y-x*_Z~Mkmx0O50K)ZS5ZAAI75?)+0l0p9czZ@anV5StHix^X&bmfh zak%@@W{&f_Z!_S?nXx^rJzIa@E^v$!<8b#7Wo3ck+koY5x`XjpBg5?5doK7Nj2+EG literal 0 HcmV?d00001 diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index f8b6c32358..ffefb9e01c 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -19,6 +19,10 @@ compex,wpq864) ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1" ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1" ;; +edgecore,ecw5410) + ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt" + ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt" + ;; nec,wg2600hp) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt" diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 529a8d9f39..0dbc49840a 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -22,6 +22,11 @@ tplink,vr2600v) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; +edgecore,ecw5410) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)" + ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)" + ;; qcom,ipq8064-ap161) ucidef_set_interface_lan "eth1 eth2" ucidef_add_switch "switch0" \ diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 8b4942dee1..f4572d038c 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -13,6 +13,9 @@ case "$FIRMWARE" in caldata_extract "ART" 0x1000 0x2f20 ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e) ;; + edgecore,ecw5410) + ath10kcal_extract "0:ART" 4096 12064 + ;; linksys,ea7500-v1 |\ linksys,ea8500) caldata_extract "art" 0x1000 0x2f20 @@ -77,6 +80,13 @@ case "$FIRMWARE" in ;; esac ;; +"ath10k/pre-cal-pci-0002:01:00.0.bin") + case $board in + edgecore,ecw5410) + ath10kcal_extract "0:ART" 20480 12064 + ;; + esac + ;; *) exit 1 ;; diff --git a/target/linux/ipq806x/base-files/etc/init.d/bootcount b/target/linux/ipq806x/base-files/etc/init.d/bootcount index 6e57c72e51..77965e647b 100755 --- a/target/linux/ipq806x/base-files/etc/init.d/bootcount +++ b/target/linux/ipq806x/base-files/etc/init.d/bootcount @@ -4,6 +4,9 @@ START=99 boot() { case $(board_name) in + edgecore,ecw5410) + fw_setenv bootcount 0 + ;; linksys,ea7500-v1 |\ linksys,ea8500) mtd resetbc s_env || true diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 560e64af3a..91cc4548f5 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -27,6 +27,17 @@ platform_do_upgrade() { zyxel,nbg6817) zyxel_do_upgrade "$1" ;; + edgecore,ecw5410) + part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" + if [ "$part" = "rootfs1" ]; then + fw_setenv active 2 || exit 1 + CI_UBIPART="rootfs2" + else + fw_setenv active 1 || exit 1 + CI_UBIPART="rootfs1" + fi + nand_do_upgrade "$1" + ;; linksys,ea7500-v1 |\ linksys,ea8500) platform_do_upgrade_linksys "$1" diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts new file mode 100644 index 0000000000..6d216bd85e --- /dev/null +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts @@ -0,0 +1,400 @@ +#include "qcom-ipq8064-v2.0.dtsi" + +#include +#include + +/ { + model = "Edgecore ECW5410"; + compatible = "edgecore,ecw5410", "qcom,ipq8064"; + + reserved-memory { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + nss@40000000 { + reg = <0x40000000 0x1000000>; + no-map; + }; + + smem: smem@41000000 { + reg = <0x41000000 0x200000>; + no-map; + }; + + wifi_dump@44000000 { + reg = <0x44000000 0x600000>; + no-map; + }; + + rsvd@41200000 { + reg = <0x41200000 0x300000>; + no-map; + }; + }; + + cpus { + idle-states { + CPU_SPC: spc { + status = "disabled"; + }; + }; + }; + + aliases { + serial0 = &gsbi4_serial; + serial1 = &gsbi1_serial; + mdio-gpio0 = &mdio0; + ethernet0 = &gmac3; + ethernet1 = &gmac2; + + led-boot = &power_green; + led-failsafe = &power_red; + led-running = &power_green; + led-upgrade = &power_green; + }; + + chosen { + bootargs-append = " console=ttyMSM0,115200n8 root=/dev/ubiblock0_1"; + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <&button_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <&qcom_pinmux 25 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&led_pins>; + pinctrl-names = "default"; + + power_green: power_green { + label = "ecw5410:green:power"; + gpios = <&qcom_pinmux 16 GPIO_ACTIVE_HIGH>; + }; + + wlan2g_green { + label = "ecw5410:green:wlan2g"; + gpios = <&qcom_pinmux 23 GPIO_ACTIVE_LOW>; + }; + + wlan2g_yellow { + label = "ecw5410:yellow:wlan2g"; + gpios = <&qcom_pinmux 24 GPIO_ACTIVE_LOW>; + }; + + wlan5g_green { + label = "ecw5410:green:wlan5g"; + gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>; + }; + + power_red: power_red { + label = "ecw5410:red:power"; + gpios = <&qcom_pinmux 28 GPIO_ACTIVE_LOW>; + }; + + wlan5g_yellow { + label = "ecw5410:yellow:wlan5g"; + gpios = <&qcom_pinmux 59 GPIO_ACTIVE_LOW>; + }; + }; +}; + + +&qcom_pinmux { + spi_pins: spi_pins { + mux { + pins = "gpio18", "gpio19"; + function = "gsbi5"; + drive-strength = <10>; + bias-pull-down; + }; + + clk { + pins = "gpio21"; + function = "gsbi5"; + drive-strength = <12>; + bias-pull-down; + }; + + cs { + pins = "gpio20"; + function = "gpio"; + drive-strength = <10>; + bias-pull-up; + }; + }; + + nand_pins: nand_pins { + disable { + pins = "gpio34", "gpio35", "gpio36", "gpio37", + "gpio38"; + function = "nand"; + drive-strength = <10>; + bias-disable; + }; + + pullups { + pins = "gpio39"; + function = "nand"; + drive-strength = <10>; + bias-pull-up; + }; + + hold { + pins = "gpio40", "gpio41", "gpio42", "gpio43", + "gpio44", "gpio45", "gpio46", "gpio47"; + function = "nand"; + drive-strength = <10>; + bias-bus-hold; + }; + }; + + mdio0_pins: mdio0_pins { + mux { + pins = "gpio0", "gpio1"; + function = "gpio"; + drive-strength = <8>; + bias-disable; + }; + }; + + led_pins: led_pins { + mux { + pins = "gpio16", "gpio23", "gpio24", "gpio26", + "gpio28", "gpio59"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + button_pins: button_pins { + mux { + pins = "gpio25"; + function = "gpio"; + drive-strength = <2>; + bias-pull-up; + }; + }; + + uart1_pins: uart1_pins { + mux { + pins = "gpio51", "gpio52", "gpio53", "gpio54"; + function = "gsbi1"; + drive-strength = <12>; + bias-none; + }; + }; +}; + +&gsbi1 { + qcom,mode = ; + status = "okay"; + + serial@12450000 { + status = "okay"; + + pinctrl-0 = <&uart1_pins>; + pinctrl-names = "default"; + }; +}; + +&gsbi4 { + qcom,mode = ; + status = "okay"; + + serial@16340000 { + status = "okay"; + }; + + /* + * The i2c device on gsbi4 should not be enabled. + * On ipq806x designs gsbi4 i2c is meant for exclusive + * RPM usage. Turning this on in kernel manifests as + * i2c failure for the RPM. + */ +}; + +&gsbi5 { + qcom,mode = ; + status = "okay"; + + spi4: spi@1a280000 { + status = "okay"; + spi-max-frequency = <50000000>; + + pinctrl-0 = <&spi_pins>; + pinctrl-names = "default"; + + cs-gpios = <&qcom_pinmux 20 GPIO_ACTIVE_HIGH>; + + m25p80@0 { + compatible = "jedec,spi-nor"; + #address-cells = <1>; + #size-cells = <1>; + spi-max-frequency = <50000000>; + reg = <0>; + + partitions { + compatible = "qcom,smem"; + }; + }; + }; +}; + +&hs_phy_0 { /* USB3 port 0 HS phy */ + status = "okay"; +}; + +&hs_phy_1 { /* USB3 port 1 HS phy */ + status = "okay"; +}; + +&ss_phy_0 { /* USB3 port 0 SS phy */ + status = "okay"; +}; + +&ss_phy_1 { /* USB3 port 1 SS phy */ + status = "okay"; +}; + +&usb3_0 { + status = "okay"; +}; + +&usb3_1 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; + + /delete-property/ pinctrl-0; + /delete-property/ pinctrl-names; + /delete-property/ perst-gpios; + + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi@1,0 { + compatible = "qcom,ath10k"; + status = "okay"; + reg = <0x00010000 0 0 0 0>; + qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L"; + }; + }; +}; + +&pcie2 { + status = "okay"; + + /delete-property/ pinctrl-0; + /delete-property/ pinctrl-names; + /delete-property/ perst-gpios; + + bridge@0,0 { + reg = <0x00000000 0 0 0 0>; + #address-cells = <3>; + #size-cells = <2>; + ranges; + + wifi@1,0 { + compatible = "qcom,ath10k"; + status = "okay"; + reg = <0x00010000 0 0 0 0>; + qcom,ath10k-calibration-variant = "Edgecore-ECW5410-L"; + }; + }; +}; + +&soc { + nand@1ac00000 { + status = "okay"; + + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + + nand@0 { + compatible = "qcom,nandcs"; + + reg = <0>; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + nand-ecc-step-size = <512>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + rootfs1@0 { + label = "rootfs1"; + reg = <0x0000000 0x4000000>; + }; + + rootfs2@4000000 { + label = "rootfs2"; + reg = <0x4000000 0x4000000>; + }; + }; + }; + }; + + mdio1: mdio { + compatible = "virtual,mdio-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + pinctrl-0 = <&mdio0_pins>; + pinctrl-names = "default"; + + gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH &qcom_pinmux 0 GPIO_ACTIVE_HIGH>; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; +}; + +&gmac2 { + status = "okay"; + + qcom,id = <2>; + mdiobus = <&mdio0>; + + phy-mode = "sgmii"; + phy-handle = <&phy1>; +}; + +&gmac3 { + status = "okay"; + + qcom,id = <3>; + mdiobus = <&mdio1>; + + phy-mode = "sgmii"; + phy-handle = <&phy0>; +}; + +&adm_dma { + status = "okay"; +}; diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index 5cc66daa21..3b86760a19 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -126,6 +126,18 @@ define Device/linksys_ea7500-v1 endef TARGET_DEVICES += linksys_ea7500-v1 +define Device/edgecore_ecw5410 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_TITLE := Edgecore ECW5410 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS := qcom-ipq8068-ecw5410 + DEVICE_DTS_CONFIG := config@v2.0-ap160 + DEVICE_PACKAGES := ath10k-firmware-qca9984-ct ipq-wifi-edgecore_ecw5410 +endef +TARGET_DEVICES += edgecore_ecw5410 + define Device/linksys_ea8500 $(call Device/LegacyImage) DEVICE_VENDOR := Linksys diff --git a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch index 8cdd198c29..7e15b87e39 100644 --- a/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch +++ b/target/linux/ipq806x/patches-5.4/0069-arm-boot-add-dts-files.patch @@ -10,7 +10,7 @@ Signed-off-by: John Crispin --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -843,6 +843,19 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -843,6 +843,20 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-ipq4019-ap.dk07.1-c1.dtb \ qcom-ipq4019-ap.dk07.1-c2.dtb \ qcom-ipq8064-ap148.dtb \ @@ -27,6 +27,7 @@ Signed-off-by: John Crispin + qcom-ipq8064-wxr-2533dhp.dtb \ + qcom-ipq8065-nbg6817.dtb \ + qcom-ipq8065-r7800.dtb \ ++ qcom-ipq8068-ecw5410.dtb \ qcom-msm8660-surf.dtb \ qcom-msm8960-cdp.dtb \ qcom-msm8974-fairphone-fp2.dtb \ From 4488b260a02e169d6902df44debbe9b3c8e001cc Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 7 Sep 2020 12:50:45 +0200 Subject: [PATCH 16/32] ipq40xx: add Edgecore ECW5211 support This patch adds support for the Edgecore ECW5211 indoor AP. Specification: - SoC: Qualcomm Atheros IPQ4018 ARMv7-A 4x Cortex A-7 - RAM: 256MB DDR3 - NOR Flash: 16MB SPI NOR - NAND Flash: 128MB MX35LFxGE4AB SPI-NAND - Ethernet: 2 x 1G via Q8075 PHY connected to ethernet adapter via PSGMII (802.3af POE IN on eth0) - USB: 1 x USB 3.0 SuperSpeed - WLAN: Built-in IPQ4018 (2x2 802.11bng, 2x2 802.11 acn) - CC2540 BLE connected to USB 2.0 port - Atmel AT97SC3205T I2C TPM Signed-off-by: Robert Marko --- package/boot/uboot-envtools/files/ipq40xx | 1 + package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-edgecore_ecw5211.qca4019 | Bin 0 -> 24324 bytes .../ipq40xx/base-files/etc/board.d/01_leds | 1 + .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../base-files/lib/upgrade/platform.sh | 1 + .../arm/boot/dts/qcom-ipq4018-ecw5211.dts | 325 ++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 12 + .../901-arm-boot-add-dts-files.patch | 9 +- 10 files changed, 351 insertions(+), 3 deletions(-) create mode 100644 package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019 create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index f427661cf7..76a3346110 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -32,6 +32,7 @@ ubootenv_mtdinfo () { case "$board" in alfa-network,ap120c-ac |\ +edgecore,ecw5211 |\ glinet,gl-b1300 |\ openmesh,a42 |\ openmesh,a62) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index a796910186..963cf2d7c4 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -31,6 +31,7 @@ ALLWIFIBOARDS:= \ buffalo_wtr-m2133hp \ cellc_rtl30vw \ dlink_dap2610 \ + edgecore_ecw5211 \ edgecore_ecw5410 \ engenius_eap2200 \ engenius_emd1 \ @@ -106,6 +107,7 @@ $(eval $(call generate-ipq-wifi-package,avm_fritzrepeater-1200,AVM FRITZRepeater $(eval $(call generate-ipq-wifi-package,buffalo_wtr-m2133hp,Buffalo WTR-M2133HP)) $(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW)) $(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610)) +$(eval $(call generate-ipq-wifi-package,edgecore_ecw5211,Edgecore ECW5211)) $(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410)) $(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200)) $(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1)) diff --git a/package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019 b/package/firmware/ipq-wifi/board-edgecore_ecw5211.qca4019 new file mode 100644 index 0000000000000000000000000000000000000000..340cfcc7a20cb88ed6fca7369b380a3d341f76ee GIT binary patch literal 24324 zcmeHPdr%We8gCH92Np~SuMj37JmW%y@Gv3@0mJ}vpom~V5fG7#vLf%7m+JSZ+M22e`Y5nBK@!<1i9wkfYDKQO;o z5wx#JQ4*vm*c42b@(<^g77)b{NnmAOsUq*w@=aR`4(#7|xO9KemblDtaY#sUu@!8C z58LCf`}&-f6C5WioG0Y zG@58SEn`phF~!0M;OXRgtwhjJVA~o>GiB?btKT_}F=BK8YGsPF#PFY>fB>OC81EbH z=&q>Qo)s}Vq;*(3+D}x=N=%eMhclv8gV5i9Vtg}{YM{(eW#VqeVIm&JON#*|<0D&G*2{wjdt#b| z)oz7PZq)W-ErB&$#lveyIujZKO5Jih2eLaiH1Nxu^1kXT?1(-YP~n>YY-ndoNG)H% z&VJfob1t<(ROY$w-au97FU|y2aSL1ecDF}<=3nVnaBrx-C;X^)iA&y<%Zl@|)1Op% z6x|)Fys+*Vuf!>LVWGrCOCw-ww{rCw2gJ$Q)!oCBM}On%bK*Pp=LEJxUV*KwtgWr# z#n{?<*)n)FUal3p-s8D3{AWkEiBTUPZ}{gc@bdB&cnJg5vS}QBl)3F2z_|NL)%P9|u(AQfa z;K2gh?%hxC-#bH%vJpm4dpm0zoBu(Z13X}Q{~vY!R4enhEg6LOBe40BV=aS3B6{-E ziw_|J0W=T_%H?Xcx!F)%dmLSRv#=RM1wj!+ib|0XGz2NBs6BS7sipn=R0Tw7<$+lW z3uTE|&shiu<%l?#BkG8_p|NPJDE4_Ql7uFSlCT&w29cp+R4fud7bB5qq$m;#MuQOv zstZDO$+)VEDJn`A6{Ai$KBhq8ggU);LOf6pkp~us#=VY1lF?*QG8T%4z79n;q8mjU zG3p=~Zpp4F=;wV)oVz7WszJl#J4ex9S&VDO{$FNmTMYN4%ot2L`V2}8O4A^~oEp;r zGr_zhQJR1NQ(zEa5MU5s5MU5s5Lm(pxQbm79&4+3E0W4uFJ6yCvsTao((>Cb-F$4g zr62vx%cu6Sl9mtF#}Yn-%+Sq5;NMfk%m(JGx~VG!rq-LUIOnNdYUw8p>g7HH)y# z(`og=nmucWfS51{rp|ooAv)UYh5a0)?Q39BJv^k+iL3^yN@DDJ(gz5Km`e1=E z4J~*CG}rCf*471Z1p+QH!$s3`P%c8D2X+U_Tx{4b_~qI={OxqPzn`zq$4u199ko_R ztQw%q2wAU z7TZX#f|Bc>n7EN%0W}}QX+0J{x(ntsSX_acvSyr;kyF^x@zrJZ$k;d2>5B^${b<w7gva}m2BC@VpnfTXY@#1Y75 zR#q4Bnc4<@oul)G@`z(5?_L~k67T-tJu53ny02~}S>VpS6e`YJ39b?V?f|SLc=v#0 zffLF^@!m0+cW*zLcRwq5`2akkd!ied%)2MqK5SZG5G zyO;fPA_Vj$#xZ*98aIbWusOF;9NXU ztMNQN=3+Aj2E)6jo-!ZkA2yeuYRVjnA>*FXNysR)=6!4I+?}fp+eJ)vKYTIq2}56+ zsr^^CRZVrcJWd|>W8o=~q`N)A3L|R6VTf#c_FxByjAus;#bA9xLG!4v!zeAMw7rr8-fUjbk|W=8C#p zwWlru_fy|fcHpJ5c!?M~wAUS?9e(%FUkF|etB%%X;0bsF?CWHG7M_l$tH+exc)4s# zfE(GvK|GrZ>B%S&(sfmBT^cUMrDG$?X8eFWNuH#>uk6GtWwHQ|u{)|S$&h$NNKZxs zU=P<-^-2XEi^q=Lgbqcd!wuC1yjUictQ)_tzNDxB5&-rW`;9B?hHw5LgVS#xz4?%u5yl^`)Ink+ps} zXHWmdw1$oKJ_=WPc}K!2;So;0eZr%@{mq-|ybrj_`!1$7tgjXnxn@7^$J^sS3#sB3 ze9@ahyuSc&HnoVjMp-TwTx$YcD2&e`{R zw$=)ZT+$q*4XVs$_+EqqYm!cPrv5Ul(oJqJyEU-)OUX%Iv2)Jj9;{xZaNpq&+t|IU zIk*}vT9Y(t;X|kwj`V7pU4!i-kadmLtYTUspn1P)zh4M zf?xkK2EOTX)hXfec*wh7yFnnOk`K&%ju6T6$IC=WBS7%tZ6Ggx*ZHeY=7Sec_cLGl zbbNc-{xLcCMBfbWo?Ppi?S|pq&lWkx&tefUWzBdxuDzk%Vh1?Kz$~A4Kl`iMN23gx H5%T{5!-kmb literal 0 HcmV?d00001 diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 0a128e8cbc..e9e0de9da9 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -62,6 +62,7 @@ zyxel,nbg6617) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2G" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5G" "phy1tpt" ;; +edgecore,ecw5211 |\ zyxel,wre6606) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt" diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 61d02a17bc..571479aaf2 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -38,6 +38,7 @@ ipq40xx_setup_interfaces() ;; asus,map-ac2200|\ cilab,meshpoint-one|\ + edgecore,ecw5211|\ openmesh,a42|\ openmesh,a62) ucidef_set_interfaces_lan_wan "eth1" "eth0" diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index 8df7990f2e..d85424142b 100644 --- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -93,6 +93,7 @@ case "$FIRMWARE" in cellc,rtl30vw |\ compex,wpj419 |\ compex,wpj428 |\ + edgecore,ecw5211 |\ engenius,eap1300 |\ engenius,eap2200 |\ openmesh,a42 |\ @@ -186,6 +187,7 @@ case "$FIRMWARE" in cellc,rtl30vw |\ compex,wpj419 |\ compex,wpj428 |\ + edgecore,ecw5211 |\ engenius,eap1300 |\ engenius,eap2200 |\ openmesh,a42 |\ diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index 5b89710a22..ae5a0a7c1b 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -66,6 +66,7 @@ platform_do_upgrade() { avm,fritzrepeater-3000 |\ buffalo,wtr-m2133hp |\ cilab,meshpoint-one |\ + edgecore,ecw5211 |\ engenius,eap2200 |\ mobipromo,cm520-79f |\ qxwlan,e2600ac-c2) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts new file mode 100644 index 0000000000..3f7e2ad6fd --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts @@ -0,0 +1,325 @@ +#include "qcom-ipq4019.dtsi" +#include +#include +#include + +/ { + model = "Edgecore ECW5211"; + compatible = "edgecore,ecw5211"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "ecw5211:yellow:power"; + gpios = <&tlmm 5 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "ecw5211:green:wlan2g"; + gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; + }; + + wlan5g { + label = "ecw5211:green:wlan5g"; + gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; + }; + }; + + soc { + rng@22000 { + status = "okay"; + }; + + mdio@90000 { + status = "okay"; + + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + counter@4a1000 { + compatible = "qcom,qca-gcnt"; + reg = <0x4a1000 0x4>; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + tcsr@194b000 { + status = "okay"; + + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + usb2: usb2@60f8800 { + status = "okay"; + }; + + usb3: usb3@8af8800 { + status = "okay"; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + }; + + edma@c080000 { + status = "okay"; + }; + }; +}; + +&tlmm { + mdio_pins: mdio_pinmux { + mux_mdio { + pins = "gpio53"; + function = "mdio"; + bias-pull-up; + }; + + mux_mdc { + pins = "gpio52"; + function = "mdc"; + bias-pull-up; + }; + }; + + serial_pins: serial_pinmux { + mux { + pins = "gpio60", "gpio61"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + spi0_pins: spi0_pinmux { + pin { + function = "blsp_spi0"; + pins = "gpio55", "gpio56", "gpio57"; + drive-strength = <2>; + bias-disable; + }; + + pin_cs { + function = "gpio"; + pins = "gpio54", "gpio4"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + i2c0_pins: i2c0_pinmux { + mux_i2c { + function = "blsp_i2c0"; + pins = "gpio58", "gpio59"; + drive-strength = <16>; + bias-disable; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_spi1 { + status = "okay"; + + pinctrl-0 = <&spi0_pins>; + pinctrl-names = "default"; + cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>, <&tlmm 4 GPIO_ACTIVE_HIGH>; + + flash@0 { + status = "okay"; + + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:SBL1"; + reg = <0x00000000 0x00040000>; + read-only; + }; + + partition@40000 { + label = "0:MIBIB"; + reg = <0x00040000 0x00020000>; + read-only; + }; + + partition@60000 { + label = "0:QSEE"; + reg = <0x00060000 0x00060000>; + read-only; + }; + + partition@c0000 { + label = "0:CDT"; + reg = <0x000c0000 0x00010000>; + read-only; + }; + + partition@d0000 { + label = "0:DDRPARAMS"; + reg = <0x000d0000 0x00010000>; + read-only; + }; + + partition@e0000 { + label = "0:APPSBLENV"; /* uboot env*/ + reg = <0x000e0000 0x00010000>; + read-only; + }; + + partition@f0000 { + label = "0:APPSBL"; /* uboot */ + reg = <0x000f0000 0x00080000>; + read-only; + }; + + partition@170000 { + label = "0:ART"; + reg = <0x00170000 0x00010000>; + read-only; + }; + }; + }; + + spi-nand@1 { + status = "okay"; + + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "rootfs"; + reg = <0x00000000 0x04000000>; + }; + }; + }; +}; + +&blsp1_i2c3 { + status = "okay"; + + pinctrl-0 = <&i2c0_pins>; + pinctrl-names = "default"; + + tpm@29 { + compatible = "atmel,at97sc3204t"; + reg = <0x29>; + }; +}; + +&blsp1_uart1 { + status = "okay"; + + pinctrl-0 = <&serial_pins>; + pinctrl-names = "default"; +}; + +&cryptobam { + status = "okay"; +}; + +&gmac0 { + qcom,poll_required = <1>; + qcom,poll_required_dynamic = <1>; + qcom,phy_mdio_addr = <4>; + vlan_tag = <2 0x20>; +}; + +&gmac1 { + qcom,poll_required = <1>; + qcom,poll_required_dynamic = <1>; + qcom,phy_mdio_addr = <3>; + vlan_tag = <1 0x10>; +}; + +&wifi0 { + status = "okay"; + + qcom,ath10k-calibration-variant = "Edgecore-ECW5211"; +}; + +&wifi1 { + status = "okay"; + + qcom,ath10k-calibration-variant = "Edgecore-ECW5211"; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 51e8bcc7e3..127af99ce5 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -344,6 +344,18 @@ define Device/dlink_dap-2610 endef TARGET_DEVICES += dlink_dap-2610 +define Device/edgecore_ecw5211 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_TITLE := Edgecore ECW5211 + BLOCKSIZE := 128k + PAGESIZE := 2048 + DEVICE_DTS_CONFIG := config@ap.dk01.1-c2 + DEVICE_DTS := qcom-ipq4018-ecw5211 + DEVICE_PACKAGES := ipq-wifi-edgecore_ecw5211 kmod-tpm-i2c-atmel kmod-usb-acm uboot-envtools +endef +TARGET_DEVICES += edgecore_ecw5211 + define Device/engenius_eap1300 $(call Device/FitImage) DEVICE_VENDOR := EnGenius diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index d281bb468d..ea45606c27 100644 --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -8,9 +8,11 @@ Signed-off-by: John Crispin arch/arm/boot/dts/Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -837,11 +837,50 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +Index: linux-5.4.63/arch/arm/boot/dts/Makefile +=================================================================== +--- linux-5.4.63.orig/arch/arm/boot/dts/Makefile ++++ linux-5.4.63/arch/arm/boot/dts/Makefile +@@ -837,11 +837,51 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -20,6 +22,7 @@ Signed-off-by: John Crispin + qcom-ipq4018-cs-w3-wd1200g-eup.dtb \ + qcom-ipq4018-ea6350v3.dtb \ + qcom-ipq4018-eap1300.dtb \ ++ qcom-ipq4018-ecw5211.dtb \ + qcom-ipq4018-emd1.dtb \ + qcom-ipq4018-emr3500.dtb \ + qcom-ipq4018-ens620ext.dtb \ From 0fbdb51f7643db5fa4423333a68f34c6952dba24 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 7 Sep 2020 13:08:41 +0200 Subject: [PATCH 17/32] ipq40xx: add Edgecore OAP-100 support flashing the unit * first update to latest edcore FW as per the PDF instructions * boot the initramfs - tftpboot 0x88000000 openwrt-ipq40xx-generic-edgecore_oap100-initramfs-fit-uImage.itb; bootm * inside the initramfs call the following commiands - ubiattach -p /dev/mtd0 - ubirmvol /dev/ubi0 -n0 - ubirmvol /dev/ubi0 -n1 - ubirmvol /dev/ubi0 -n2 * scp the sysupgrade image to the board and call - sysupgrade -n openwrt-ipq40xx-generic-edgecore_oap100-squashfs-nand-sysupgrade.bin Signed-off-by: John Crispin --- package/firmware/ipq-wifi/Makefile | 2 + .../ipq-wifi/board-edgecore_oap100.qca4019 | Bin 0 -> 24324 bytes .../ipq40xx/base-files/etc/board.d/01_leds | 4 + .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../base-files/lib/upgrade/platform.sh | 1 + .../arch/arm/boot/dts/qcom-ipq4019-oap100.dts | 339 ++++++++++++++++++ target/linux/ipq40xx/image/Makefile | 13 + .../100-GPIO-add-named-gpio-exports.patch | 165 +++++++++ .../901-arm-boot-add-dts-files.patch | 3 +- 10 files changed, 529 insertions(+), 1 deletion(-) create mode 100644 package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 create mode 100755 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts create mode 100644 target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 963cf2d7c4..387b23d556 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -33,6 +33,7 @@ ALLWIFIBOARDS:= \ dlink_dap2610 \ edgecore_ecw5211 \ edgecore_ecw5410 \ + edgecore_oap100 \ engenius_eap2200 \ engenius_emd1 \ engenius_emr3500 \ @@ -109,6 +110,7 @@ $(eval $(call generate-ipq-wifi-package,cellc_rtl30vw, Cell C RTL30VW)) $(eval $(call generate-ipq-wifi-package,dlink_dap2610,D-Link DAP-2610)) $(eval $(call generate-ipq-wifi-package,edgecore_ecw5211,Edgecore ECW5211)) $(eval $(call generate-ipq-wifi-package,edgecore_ecw5410,Edgecore ECW5410)) +$(eval $(call generate-ipq-wifi-package,edgecore_oap100,Edgecore OAP100)) $(eval $(call generate-ipq-wifi-package,engenius_eap2200,EnGenius EAP2200)) $(eval $(call generate-ipq-wifi-package,engenius_emd1,EnGenius EMD1)) $(eval $(call generate-ipq-wifi-package,engenius_emr3500,EnGenius EMR3500)) diff --git a/package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 b/package/firmware/ipq-wifi/board-edgecore_oap100.qca4019 new file mode 100644 index 0000000000000000000000000000000000000000..9f1b5c93b5ebc7561987aa86f138e86c00d954b6 GIT binary patch literal 24324 zcmeHPdr(tX8b5>p>f*u;0TJ*LLU;rrK%g2Vypi%qfubS-76AoGYUE{j7`kA`2Ze|T z)`B5|mO*(mMPw{KAQo$DXO!7L_K%(YqwUP@_K$UkcGa17W_NYZy~%|TLP;P@dE75K z_k8EO-#OtK`8;TX)zh`Kq8R5MC-QEvPtx6}dtFRRtBIg5xJ5_8vJ}bhxylh>;eP9vl<|+p~ae zFkpL(!0`hX7QnKe7Mh8*?bib=Kt2FlY_JjlbO7u_aE*#@^*3xb6Ke{9kdTm9FJ4&i z>DJ(vzg>tTk|k_liSkgtUaO`j@CFLpr!8r-UVU$(YzIy;Vn9qh71(QE#2ze0LZ8i} zmLBnJBT(Bi(=P*PUeL(Ub)nOAOHp(i8yhPtD@z>#U>qB%k>UvbbdwV->n0mVJ#iQp-Y9fo+nMl}u=oc^MDEKm6MVtROZGCi2gOzI}$oP>yl%vT

Lr@;^)g^v2cU0H)0|&IF;nZdjd(iO-*jid5$vA7dbKKpmzX5LeWd<0^RHaE#8#|`W4?|bGPh6<&bXjTBhjyv=~$keO{Jo zTMy@?kwsE&1?zFeL zZzE~6-Q3+s6m1hBAfvGD`p6^QEph2@T0Xyz&4ie(j}3eX$)THwz{`1JVgoDXuB9t1 z+PtxTi#D{n90a)~^3i7iz`RD@Gx|(F=LGos`@=ik40LsBFgQOyUvC)SD%D_k+W1zb zwz_8H{Ai*90vvu|HvkX}yde|F9VV7N08E&$yp5{1p=-vQ>dFhhH?!GG2k&M%drWv z;FoL9=r;@HKHgre-!f@d?lfz4n$=DKFQ0lp3@pfwUJq4*l8AhwZM1;y7t1>8nr1=Ms97p$@V(OomsV0{H@%$jj( zW?pg2<*R+FJL<0&($^O%v!kKErXy~s8^=vR2l21t5dkXT2n6vU^mQo0NBJDSAk=Kv z*R#EvqB(J$5R{g{O+Zp@~j);&+b7*UBZ1sl5AOqj>inUKSRRbYIho zv%npDfF;JeceH81;ejkBJDhh9NoWLKx;b08V!Zp?y8U4Kuk!BoooC96^X^e(#u+La z{=1E}r4@CC0T00F8{_Esqcc2tgS>m)j8{2$P!&%2*~uHoHh?$1cq@b+K5_-WewTzo^k`@ldB2TRy`19s<}iLX2? zU-RFI--u_zl>)P9hNc$DyVqQ0KA64O+<>Yv_fT{h_Zl6COoP^nZ?Uc0kCP8dhDDmx?olJk_YOM=Tbm^8D4GE8AoeVJweS5I< z@;b3l$XBW53h{}=y}r(P5ATU{G$E-cVMtSVRSM-PxkS8IeM@y+*#s-6s_x4>#Z`%k zzOL#qJ8ahaoAIXXNEFq3V{hTP#V8;RR0JS6!FaiVyN! zG!@w1*cjTBC*{SmRJil1yhfZZ41|Gn%A~>+9((GJ>WaKVoR-MKDts}?hA7=ucPcC8 zd9wJaF}Sl*mMcz%VP1n+M)Od(w@XWtXU|_iVljs)Tx@{$LMe3R0 z6OISB?!DVz*tVyh@t$MOmv?0YX$qfHP7>8E>Gkj?W)v-0WYwz1aR>|M1bCgf`Ym zdU40V@vBiy-Zk`s8=a!YNU7gZhm^jXrB}jFdsfi%uJjjl#x#3W((*3#iLUU^dR98* zo^Lt$eyEt4LyI06sO(BT?_2F$v|%R>IdBqzb%4NfpTYs3g*7V%@EC5)=h@>=;qdZe z!8d#Y2gB3DgXxh8R?Sm5=5yi++WjW8t=Z4-gP`4SHd`MC;3rKa0tOM7N4tNi=VmPF z!`yy)VQjSGqP%tw!27Yaf@@Ki?tW9x|aY&V4U@>Lkk+Cdh(` zhCKW&z3c`oB~Q-gIG3J6)pF^9MLgu~`-QQ}SN}N42=x)bc=1%oi_hw~`FJIG@%sIl zySxzJp0NLxoO`Tql6Q} +#include +#include + +/ { + model = "EdgeCore OAP-100"; + compatible = "edgecore,oap100"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + chosen { + bootargs-append = " root=/dev/ubiblock0_1"; + }; + + soc { + mdio@90000 { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + }; + + ess-psgmii@98000 { + status = "okay"; + }; + + tcsr@1949000 { + compatible = "qcom,tcsr"; + reg = <0x1949000 0x100>; + qcom,wifi_glb_cfg = ; + }; + + ess_tcsr@1953000 { + compatible = "qcom,tcsr"; + reg = <0x1953000 0x1000>; + qcom,ess-interface-select = ; + }; + + tcsr@1957000 { + compatible = "qcom,tcsr"; + reg = <0x1957000 0x100>; + qcom,wifi_noc_memtype_m0_m2 = ; + }; + + tcsr@194b000 { + /* select hostmode */ + compatible = "qcom,tcsr"; + reg = <0x194b000 0x100>; + qcom,usb-hsphy-mode-select = ; + status = "okay"; + }; + + usb2@60f8800 { + status = "okay"; + + dwc3@6000000 { + #address-cells = <1>; + #size-cells = <0>; + + usb2_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + }; + }; + + usb3@8af8800 { + status = "okay"; + + dwc3@8a00000 { + #address-cells = <1>; + #size-cells = <0>; + + usb3_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + usb3_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; + }; + + crypto@8e3a000 { + status = "okay"; + }; + + watchdog@b017000 { + status = "okay"; + }; + + ess-switch@c000000 { + status = "okay"; + switch_mac_mode = <0x0>; /* mac mode for RGMII RMII */ + switch_initvlas = <0x0007c 0x54>; /* port0 status */ + switch_lan_bmp = <0x10>; + }; + + edma@c080000 { + status = "okay"; + }; + }; + + key { + compatible = "gpio-keys"; + + button@1 { + label = "reset"; + linux,code = ; + gpios = <&tlmm 18 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system: led_system { + label = "oap100:green:system"; + gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>; + }; + + led_2g { + label = "oap100:blue:wlan2g"; + gpios = <&tlmm 34 GPIO_ACTIVE_HIGH>; + }; + + led_5g { + label = "oap100:blue:wlan5g"; + gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb { + gpio-export,name = "usb-power"; + gpio-export,output = <1>; + gpios = <&tlmm 44 GPIO_ACTIVE_HIGH>; + }; + + poe { + gpio-export,name = "poe-power"; + gpio-export,output = <0>; + gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&tlmm { + serial_0_pins: serial_pinmux { + mux { + pins = "gpio16", "gpio17"; + function = "blsp_uart0"; + bias-disable; + }; + }; + + spi_0_pins: spi_0_pinmux { + pinmux { + function = "blsp_spi0"; + pins = "gpio13", "gpio14", "gpio15"; + drive-strength = <12>; + bias-disable; + }; + + pinmux_cs { + function = "gpio"; + pins = "gpio12"; + drive-strength = <2>; + bias-disable; + output-high; + }; + }; + + nand_pins: nand_pins { + pullups { + pins = "gpio53", "gpio58", "gpio59"; + function = "qpic"; + bias-pull-up; + }; + + pulldowns { + pins = "gpio54", "gpio55", "gpio56", + "gpio57", "gpio60", "gpio61", + "gpio62", "gpio63", "gpio64", + "gpio65", "gpio66", "gpio67", + "gpio68", "gpio69"; + function = "qpic"; + bias-pull-down; + }; + }; + + mdio_pins: mdio_pinmux { + mux_1 { + pins = "gpio6"; + function = "mdio"; + bias-pull-up; + }; + mux_2 { + pins = "gpio7"; + function = "mdc"; + bias-pull-up; + }; + }; +}; + +&cryptobam { + status = "okay"; +}; + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + status = "okay"; + cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "gd25q256"; + spi-max-frequency = <24000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition0@0 { + label = "0:SBL1"; + reg = <0x00000000 0x00040000>; + read-only; + }; + partition1@40000 { + label = "0:MIBIB"; + reg = <0x00040000 0x00020000>; + read-only; + }; + partition2@60000 { + label = "0:QSEE"; + reg = <0x00060000 0x00060000>; + read-only; + }; + partition3@c0000 { + label = "0:CDT"; + reg = <0x000c0000 0x00010000>; + read-only; + }; + partition4@d0000 { + label = "0:DDRPARAMS"; + reg = <0x000d0000 0x00010000>; + read-only; + }; + partition5@e0000 { + label = "0:APPSBLENV"; + reg = <0x000e0000 0x00010000>; + read-only; + }; + partition6@f0000 { + label = "0:APPSBL"; + reg = <0x000f0000 0x00080000>; + read-only; + }; + partition7@170000 { + label = "0:ART"; + reg = <0x00170000 0x00010000>; + read-only; + }; + }; + }; +}; + +&nand { + pinctrl-0 = <&nand_pins>; + pinctrl-names = "default"; + status = "okay"; + + nand@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "rootfs"; + reg = <0x00000000 0x4000000>; + }; + }; + }; +}; + +&blsp_dma { + status = "okay"; +}; + +&blsp1_uart1 { + pinctrl-0 = <&serial_0_pins>; + pinctrl-names = "default"; + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "Edgecore OAP100"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "Edgecore OAP100"; +}; + +&usb3_ss_phy { + status = "okay"; +}; + +&usb3_hs_phy { + status = "okay"; +}; + +&usb2_hs_phy { + status = "okay"; +}; diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile index 127af99ce5..0f03e1f429 100644 --- a/target/linux/ipq40xx/image/Makefile +++ b/target/linux/ipq40xx/image/Makefile @@ -356,6 +356,19 @@ define Device/edgecore_ecw5211 endef TARGET_DEVICES += edgecore_ecw5211 +define Device/edgecore_oap100 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_TITLE := Edgecore OAP100 + BLOCKSIZE := 128k + PAGESIZE := 2048 + IMAGES := nand-sysupgrade.bin + DEVICE_DTS_CONFIG := config@ap.dk07.1-c1 + DEVICE_DTS := qcom-ipq4019-oap100 + DEVICE_PACKAGES := ipq-wifi-edgecore_oap100 kmod-usb-acm kmod-usb-net kmod-usb-net-cdc-qmi uqmi +endef +TARGET_DEVICES += edgecore_oap100 + define Device/engenius_eap1300 $(call Device/FitImage) DEVICE_VENDOR := EnGenius diff --git a/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch b/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch new file mode 100644 index 0000000000..61ed9ea784 --- /dev/null +++ b/target/linux/ipq40xx/patches-5.4/100-GPIO-add-named-gpio-exports.patch @@ -0,0 +1,165 @@ +From 4267880319bc1a2270d352e0ded6d6386242a7ef Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Tue, 12 Aug 2014 20:49:27 +0200 +Subject: [PATCH 24/53] GPIO: add named gpio exports + +Signed-off-by: John Crispin +--- + drivers/gpio/gpiolib-of.c | 68 +++++++++++++++++++++++++++++++++++++++++ + drivers/gpio/gpiolib-sysfs.c | 10 +++++- + include/asm-generic/gpio.h | 6 ++++ + include/linux/gpio/consumer.h | 8 +++++ + 4 files changed, 91 insertions(+), 1 deletion(-) + +--- a/drivers/gpio/gpiolib-of.c ++++ b/drivers/gpio/gpiolib-of.c +@@ -23,6 +23,8 @@ + #include + #include + #include ++#include ++#include + + #include "gpiolib.h" + +@@ -513,3 +515,68 @@ void of_gpiochip_remove(struct gpio_chip + gpiochip_remove_pin_ranges(chip); + of_node_put(chip->of_node); + } ++ ++static struct of_device_id gpio_export_ids[] = { ++ { .compatible = "gpio-export" }, ++ { /* sentinel */ } ++}; ++ ++static int of_gpio_export_probe(struct platform_device *pdev) ++{ ++ struct device_node *np = pdev->dev.of_node; ++ struct device_node *cnp; ++ u32 val; ++ int nb = 0; ++ ++ for_each_child_of_node(np, cnp) { ++ const char *name = NULL; ++ int gpio; ++ bool dmc; ++ int max_gpio = 1; ++ int i; ++ ++ of_property_read_string(cnp, "gpio-export,name", &name); ++ ++ if (!name) ++ max_gpio = of_gpio_count(cnp); ++ ++ for (i = 0; i < max_gpio; i++) { ++ unsigned flags = 0; ++ enum of_gpio_flags of_flags; ++ ++ gpio = of_get_gpio_flags(cnp, i, &of_flags); ++ if (!gpio_is_valid(gpio)) ++ return gpio; ++ ++ if (of_flags == OF_GPIO_ACTIVE_LOW) ++ flags |= GPIOF_ACTIVE_LOW; ++ ++ if (!of_property_read_u32(cnp, "gpio-export,output", &val)) ++ flags |= val ? GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; ++ else ++ flags |= GPIOF_IN; ++ ++ if (devm_gpio_request_one(&pdev->dev, gpio, flags, name ? name : of_node_full_name(np))) ++ continue; ++ ++ dmc = of_property_read_bool(cnp, "gpio-export,direction_may_change"); ++ gpio_export_with_name(gpio, dmc, name); ++ nb++; ++ } ++ } ++ ++ dev_info(&pdev->dev, "%d gpio(s) exported\n", nb); ++ ++ return 0; ++} ++ ++static struct platform_driver gpio_export_driver = { ++ .driver = { ++ .name = "gpio-export", ++ .owner = THIS_MODULE, ++ .of_match_table = of_match_ptr(gpio_export_ids), ++ }, ++ .probe = of_gpio_export_probe, ++}; ++ ++module_platform_driver(gpio_export_driver); +--- a/drivers/gpio/gpiolib-sysfs.c ++++ b/drivers/gpio/gpiolib-sysfs.c +@@ -553,7 +553,7 @@ static struct class gpio_class = { + * + * Returns zero on success, else an error. + */ +-int gpiod_export(struct gpio_desc *desc, bool direction_may_change) ++int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name) + { + struct gpio_chip *chip; + struct gpio_device *gdev; +@@ -615,6 +615,8 @@ int gpiod_export(struct gpio_desc *desc, + offset = gpio_chip_hwgpio(desc); + if (chip->names && chip->names[offset]) + ioname = chip->names[offset]; ++ if (name) ++ ioname = name; + + dev = device_create_with_groups(&gpio_class, &gdev->dev, + MKDEV(0, 0), data, gpio_groups, +@@ -636,6 +638,12 @@ err_unlock: + gpiod_dbg(desc, "%s: status %d\n", __func__, status); + return status; + } ++EXPORT_SYMBOL_GPL(__gpiod_export); ++ ++int gpiod_export(struct gpio_desc *desc, bool direction_may_change) ++{ ++ return __gpiod_export(desc, direction_may_change, NULL); ++} + EXPORT_SYMBOL_GPL(gpiod_export); + + static int match_export(struct device *dev, const void *desc) +--- a/include/asm-generic/gpio.h ++++ b/include/asm-generic/gpio.h +@@ -127,6 +127,12 @@ static inline int gpio_export(unsigned g + return gpiod_export(gpio_to_desc(gpio), direction_may_change); + } + ++int __gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name); ++static inline int gpio_export_with_name(unsigned gpio, bool direction_may_change, const char *name) ++{ ++ return __gpiod_export(gpio_to_desc(gpio), direction_may_change, name); ++} ++ + static inline int gpio_export_link(struct device *dev, const char *name, + unsigned gpio) + { +--- a/include/linux/gpio/consumer.h ++++ b/include/linux/gpio/consumer.h +@@ -451,6 +451,7 @@ struct gpio_desc *devm_fwnode_get_gpiod_ + + #if IS_ENABLED(CONFIG_GPIOLIB) && IS_ENABLED(CONFIG_GPIO_SYSFS) + ++int _gpiod_export(struct gpio_desc *desc, bool direction_may_change, const char *name); + int gpiod_export(struct gpio_desc *desc, bool direction_may_change); + int gpiod_export_link(struct device *dev, const char *name, + struct gpio_desc *desc); +@@ -458,6 +459,13 @@ void gpiod_unexport(struct gpio_desc *de + + #else /* CONFIG_GPIOLIB && CONFIG_GPIO_SYSFS */ + ++static inline int _gpiod_export(struct gpio_desc *desc, ++ bool direction_may_change, ++ const char *name) ++{ ++ return -ENOSYS; ++} ++ + static inline int gpiod_export(struct gpio_desc *desc, + bool direction_may_change) + { diff --git a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch index ea45606c27..e2dc45a39f 100644 --- a/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch +++ b/target/linux/ipq40xx/patches-5.4/901-arm-boot-add-dts-files.patch @@ -12,7 +12,7 @@ Index: linux-5.4.63/arch/arm/boot/dts/Makefile =================================================================== --- linux-5.4.63.orig/arch/arm/boot/dts/Makefile +++ linux-5.4.63/arch/arm/boot/dts/Makefile -@@ -837,11 +837,51 @@ dtb-$(CONFIG_ARCH_QCOM) += \ +@@ -837,11 +837,52 @@ dtb-$(CONFIG_ARCH_QCOM) += \ qcom-apq8074-dragonboard.dtb \ qcom-apq8084-ifc6540.dtb \ qcom-apq8084-mtp.dtb \ @@ -32,6 +32,7 @@ Index: linux-5.4.63/arch/arm/boot/dts/Makefile + qcom-ipq4018-jalapeno.dtb \ + qcom-ipq4018-meshpoint-one.dtb \ + qcom-ipq4018-nbg6617.dtb \ ++ qcom-ipq4019-oap100.dtb \ + qcom-ipq4018-rt-ac58u.dtb \ + qcom-ipq4018-wre6606.dtb \ qcom-ipq4019-ap.dk01.1-c1.dtb \ From 419f149e482641ddc520f80a7ab2038f7e2ebc8a Mon Sep 17 00:00:00 2001 From: Rui Salvaterra Date: Thu, 30 Jul 2020 13:49:18 +0100 Subject: [PATCH 18/32] zram-swap: default to lzo instead of lzo-rle compression On devices with small amounts of RAM, zram-swap fails to initialise due to the default compression algorithm (lzo-rle). Startup example on an AirGrid M2, with 32 MiB of RAM: root@airgrid:/etc/config# /etc/init.d/zram start zram_start: activating '/dev/zram0' for swapping (13 MegaBytes) zram_reset: enforcing defaults via /sys/block/zram0/reset sh: write error: Out of memory mkswap: image is too small swapon: /dev/zram0: Invalid argument root@airgrid:/etc/config# Fix this by defaulting to traditional lzo, which works fine and is always available. Signed-off-by: Rui Salvaterra --- package/system/zram-swap/files/zram.init | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/system/zram-swap/files/zram.init b/package/system/zram-swap/files/zram.init index 42c084855a..bfb9285600 100755 --- a/package/system/zram-swap/files/zram.init +++ b/package/system/zram-swap/files/zram.init @@ -85,8 +85,9 @@ zram_comp_algo() local dev="$1" local zram_comp_algo="$( uci -q get system.@system[0].zram_comp_algo )" - if [ -z "$zram_comp_algo" ] || [ ! -e /sys/block/$( basename $dev )/comp_algorithm ]; then - return 0 + if [ -z "$zram_comp_algo" ]; then + # lzo-rle fails on small RAM devices, default to lzo, which is always available + zram_comp_algo="lzo" fi if [ $(grep -c "$zram_comp_algo" /sys/block/$( basename $dev )/comp_algorithm) -ne 0 ]; then From a744c14dfa087bb00a5871a59b00028c94c4e00b Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 17 Sep 2020 12:33:45 +0200 Subject: [PATCH 19/32] ipq806x: sort entries in 02_network Apply alphabetic sorting like in the other files. Signed-off-by: Adrian Schmutzler --- target/linux/ipq806x/base-files/etc/board.d/02_network | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 0dbc49840a..3f9d96881d 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -27,11 +27,6 @@ edgecore,ecw5410) ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)" ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:ART" 0x0)" ;; -qcom,ipq8064-ap161) - ucidef_set_interface_lan "eth1 eth2" - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0" - ;; linksys,ea7500-v1) hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) ucidef_add_switch "switch0" \ @@ -55,6 +50,11 @@ tplink,c2600) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "6@eth1" "5:wan" "0@eth0" ;; +qcom,ipq8064-ap161) + ucidef_set_interface_lan "eth1 eth2" + ucidef_add_switch "switch0" \ + "0:lan" "1:lan" "2:lan" "3u@eth1" "6:wan" "4u@eth0" + ;; qcom,ipq8064-db149) ucidef_set_interface_lan "eth1 eth2 eth3" ucidef_add_switch "switch0" \ From 0b1cdb7eea1a2d53da2e97eaaa4ac27b518f8171 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 17 Sep 2020 12:46:19 +0200 Subject: [PATCH 20/32] treewide: remove empty default cases There is no apparent reason to have an empty default case. Signed-off-by: Adrian Schmutzler --- target/linux/apm821xx/base-files/etc/board.d/01_leds | 2 -- .../base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac | 2 -- target/linux/apm821xx/base-files/lib/preinit/79_move_config | 2 -- target/linux/apm821xx/base-files/lib/upgrade/platform.sh | 3 --- target/linux/ipq40xx/base-files/etc/board.d/01_leds | 2 -- .../base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh | 2 -- target/linux/ipq806x/base-files/etc/board.d/01_leds | 2 -- tools/missing-macros/Makefile | 2 +- tools/missing-macros/src/m4/mfx_limits.m4 | 2 -- 9 files changed, 1 insertion(+), 18 deletions(-) diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds index 57598c0ca9..8433490825 100755 --- a/target/linux/apm821xx/base-files/etc/board.d/01_leds +++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds @@ -44,8 +44,6 @@ netgear,wndr4700) ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx" ;; -*) - ;; esac board_config_flush diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index a78a1054f1..6c7748589c 100644 --- a/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -16,6 +16,4 @@ netgear,wndap620|\ netgear,wndap660) macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) > /sys${DEVPATH}/macaddress ;; -*) - ;; esac diff --git a/target/linux/apm821xx/base-files/lib/preinit/79_move_config b/target/linux/apm821xx/base-files/lib/preinit/79_move_config index 1796e9f5f4..7a301a9253 100644 --- a/target/linux/apm821xx/base-files/lib/preinit/79_move_config +++ b/target/linux/apm821xx/base-files/lib/preinit/79_move_config @@ -12,8 +12,6 @@ move_config() { [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / fi ;; - *) - ;; esac } diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh index cc095b36a1..cdcab6c3f6 100644 --- a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh @@ -43,8 +43,5 @@ platform_copy_config() { wd,mybooklive-duo) mbl_copy_config ;; - - *) - ;; esac } diff --git a/target/linux/ipq40xx/base-files/etc/board.d/01_leds b/target/linux/ipq40xx/base-files/etc/board.d/01_leds index 313722ffb0..e8e67af3a9 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/01_leds +++ b/target/linux/ipq40xx/base-files/etc/board.d/01_leds @@ -71,8 +71,6 @@ zyxel,wre6606) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy0tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy1tpt" ;; -*) - ;; esac board_config_flush diff --git a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh index 50c289df31..f94116de6e 100644 --- a/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh +++ b/target/linux/ipq40xx/base-files/lib/preinit/06_set_preinit_iface_ipq40xx.sh @@ -12,8 +12,6 @@ set_preinit_iface() { zyxel,nbg6617) ifname=eth0 ;; - *) - ;; esac } diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index ffefb9e01c..620fc12f41 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -53,8 +53,6 @@ tplink,vr2600v) zyxel,nbg6817) ucidef_set_led_netdev "wan" "WAN" "${boardname}:white:internet" "eth1" ;; -*) - ;; esac board_config_flush diff --git a/tools/missing-macros/Makefile b/tools/missing-macros/Makefile index 3d3ee4cbef..1e423621bd 100644 --- a/tools/missing-macros/Makefile +++ b/tools/missing-macros/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=missing-macros -PKG_RELEASE:=10 +PKG_RELEASE:=11 include $(INCLUDE_DIR)/host-build.mk diff --git a/tools/missing-macros/src/m4/mfx_limits.m4 b/tools/missing-macros/src/m4/mfx_limits.m4 index d63a14bb96..b4e3ceba8f 100644 --- a/tools/missing-macros/src/m4/mfx_limits.m4 +++ b/tools/missing-macros/src/m4/mfx_limits.m4 @@ -147,8 +147,6 @@ case $host_os in cygwin* | mingw* | pw32*) test "X$LIBS" != "X" && LIBS="$LIBS " LIBS="${LIBS}-lwinmm" ;; -*) - ;; esac fi ])# From 6e170ffb96ea1ec4c1160209b2c1b1c0274cdf55 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Thu, 17 Sep 2020 13:03:18 +0200 Subject: [PATCH 21/32] ipq806x: sort entries in lib/upgrade/platform.sh Apply alphabetic sorting like in the other files. Signed-off-by: Adrian Schmutzler --- target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 91cc4548f5..f61e8ee878 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -24,9 +24,6 @@ platform_do_upgrade() { qcom,ipq8064-ap161) nand_do_upgrade "$1" ;; - zyxel,nbg6817) - zyxel_do_upgrade "$1" - ;; edgecore,ecw5410) part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" if [ "$part" = "rootfs1" ]; then @@ -52,6 +49,9 @@ platform_do_upgrade() { MTD_CONFIG_ARGS="-s 0x200000" default_do_upgrade "$1" ;; + zyxel,nbg6817) + zyxel_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; From caf727767ab5c8f8d884ef458c74726a8e610d96 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 17 Sep 2020 12:09:23 +0200 Subject: [PATCH 22/32] mac80211: do not allow bigger VHT MPDUs than the hardware supports Signed-off-by: Felix Fietkau --- ...allow-bigger-VHT-MPDUs-than-the-hard.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch diff --git a/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch b/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch new file mode 100644 index 0000000000..a799d96250 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/331-mac80211-do-not-allow-bigger-VHT-MPDUs-than-the-hard.patch @@ -0,0 +1,34 @@ +From: Felix Fietkau +Date: Thu, 17 Sep 2020 12:07:19 +0200 +Subject: [PATCH] mac80211: do not allow bigger VHT MPDUs than the hardware + supports + +Limit maximum VHT MPDU size by local capability + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/vht.c ++++ b/net/mac80211/vht.c +@@ -168,10 +168,7 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru + /* take some capabilities as-is */ + cap_info = le32_to_cpu(vht_cap_ie->vht_cap_info); + vht_cap->cap = cap_info; +- vht_cap->cap &= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 | +- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 | +- IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454 | +- IEEE80211_VHT_CAP_RXLDPC | ++ vht_cap->cap &= IEEE80211_VHT_CAP_RXLDPC | + IEEE80211_VHT_CAP_VHT_TXOP_PS | + IEEE80211_VHT_CAP_HTC_VHT | + IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK | +@@ -180,6 +177,9 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru + IEEE80211_VHT_CAP_RX_ANTENNA_PATTERN | + IEEE80211_VHT_CAP_TX_ANTENNA_PATTERN; + ++ vht_cap->cap |= min_t(u32, cap_info & IEEE80211_VHT_CAP_MAX_MPDU_MASK, ++ own_cap.cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK); ++ + /* and some based on our own capabilities */ + switch (own_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) { + case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ: From b7da0d294465d5ab8d923f3b8265ece0a5847ac3 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 11 Sep 2020 18:32:05 +0200 Subject: [PATCH 23/32] ath79: add support for Ubiquiti UniFi AP Pro This adds support for the Ubiquiti UniFi AP Pro to the ath79 target. The device was previously supported on the now removed ar71xx target. SoC Atheros AR9344 WiFi Atheros AR9344 & Atheros AR9280 ETH Atheros AR8327 RAM 128M DDR2 FLASH 16M SPI-NOR Installation ------------ Follow the Ubiquiti TFTP recovery procedure for this device. 1. Hold down the reset button while connecting power for 10 seconds. 2. Transfer the factory image via TFTP to the AP (192.168.1.20) 3. Wait 2 minutes for the AP to write the firmware to flash. The device will automatically reboot to OpenWrt. Signed-off-by: David Bauer --- .../ath79/dts/ar9344_ubnt_unifi-ap-pro.dts | 158 ++++++++++++++++++ .../generic/base-files/etc/board.d/02_network | 4 + .../etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + target/linux/ath79/image/generic-ubnt.mk | 25 +++ 4 files changed, 188 insertions(+) create mode 100644 target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts diff --git a/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts new file mode 100644 index 0000000000..f8ffb6f0b9 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + model = "Ubiquiti UniFi AP Pro"; + compatible = "ubnt,unifi-ap-pro"; + + aliases { + led-boot = &led_white; + led-failsafe = &led_white; + led-running = &led_blue; + led-upgrade = &led_blue; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + led_white: led-white { + label = "ubnt:white:dome"; + gpios = <&gpio 12 GPIO_ACTIVE_HIGH>; + }; + + led_blue: led-blue { + label = "ubnt:blue:dome"; + gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&uart { + status = "okay"; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf60000>; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "kernel"; + reg = <0x0 0x300000>; + /* Can be resized w/o issues. + * U-Boot can load kernel from the + * entirety of the "firmware" partition space. + */ + }; + + partition@300000 { + label = "rootfs"; + reg = <0x300000 0xc60000>; + }; + }; + + partition@fb0000 { + label = "cfg"; + reg = <0xfb0000 0x40000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; + + wifi@0,0 { + compatible = "pci168c,0033"; + reg = <0 0 0 0 0>; + qca,no-eeprom; + }; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + + qca,ar8327-initvals = < + 0x4 0x7600000 /* PORT0 PAD MODE CTRL */ + 0x10 0x80000080 /* POWER_ON_STRAP */ + 0x7c 0x7e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x6000000 0x101 0x1616>; + + mtd-mac-address = <&art 0x0>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 40ea14fa9b..518ca6f91a 100755 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -371,6 +371,10 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1" "3:lan:2" ;; + ubnt,unifi-ap-pro) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" + ;; zbtlink,zbt-wd323|\ xiaomi,mi-router-4q) ucidef_set_interface_wan "eth1" diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 3983b1f8c0..88d43e25c4 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -98,6 +98,7 @@ case "$FIRMWARE" in tplink,tl-wdr4300-v1-il|\ tplink,tl-wdr4310-v1|\ tplink,tl-wdr4900-v2|\ + ubnt,unifi-ap-pro|\ winchannel,wb2000) caldata_extract "art" 0x5000 0x440 ;; diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index b945183776..6939edd25d 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -13,6 +13,14 @@ define Build/mkubntimage -k $(IMAGE_KERNEL) -r $@ -o $@ endef +define Build/mkubntimage2 + -$(STAGING_DIR_HOST)/bin/mkfwimage2 -f 0x9f000000 \ + -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \ + -p jffs2:0x50000:0xf60000:0:0:$@ \ + -o $@.new + @mv $@.new $@ +endef + # all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when # booting the image, the size doesn't matter. define Build/mkubntimage-split @@ -369,3 +377,20 @@ define Device/ubnt_unifiac-pro SUPPORTED_DEVICES += unifiac-pro endef TARGET_DEVICES += ubnt_unifiac-pro + +define Device/ubnt_unifi-ap-pro + SOC := ar9344 + DEVICE_VENDOR := Ubiquiti + DEVICE_MODEL := UniFi AP Pro + UBNT_TYPE := BZ + UBNT_CHIP := ar934x + KERNEL_SIZE := 3072k + IMAGE_SIZE := 15744k + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | jffs2 kernel0 + IMAGES := sysupgrade.bin factory.bin + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs |\ + pad-rootfs | append-metadata | check-size + IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2 + SUPPORTED_DEVICES += uap-pro +endef +TARGET_DEVICES += ubnt_unifi-ap-pro From 056945faa4dd611298979767978f4bb2a52cabc0 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Tue, 15 Sep 2020 11:19:14 +0200 Subject: [PATCH 24/32] ipq40xx: enable FRITZRepeater 3000 ports on switch The ethernet ports on the AVM FRITZRepeater 3000 are not separated between LAN and WAN in the stock firmware. OpenWrt currently abstracts port 4 as eth0 and port 5 as eth1, bridging them in the kernel. This patch adjusts the GMAC port bitmasks and default bitmask for ar40xx to bridge them on the switch, avoiding traffic on both ports to pass thru the CPU. Signed-off-by: David Bauer --- target/linux/ipq40xx/base-files/etc/board.d/02_network | 5 ++++- .../arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 5c1bdc51ce..2966fbf1fb 100755 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -61,7 +61,10 @@ ipq40xx_setup_interfaces() ucidef_add_switch "switch0" \ "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan" ;; - avm,fritzrepeater-3000|\ + avm,fritzrepeater-3000) + ucidef_add_switch "switch0" \ + "0u@eth0" "4:lan:1" "5:lan:2" + ;; compex,wpj419|\ compex,wpj428|\ engenius,eap2200) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts index 6914917eb3..6a132adade 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts @@ -58,12 +58,13 @@ ess-switch@c000000 { status = "okay"; - switch_lan_bmp = <0x10>; - switch_wan_bmp = <0x20>; + switch_lan_bmp = <0x30>; + switch_wan_bmp = <0x02>; }; edma@c080000 { status = "okay"; + qcom,num_gmac = <1>; }; }; @@ -209,6 +210,10 @@ }; }; +&gmac0 { + vlan_tag = <1 0x30>; +}; + &cryptobam { status = "okay"; }; From c2e75017a23f2bf6d017e940293b2a1f80d700be Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 17 Sep 2020 01:02:40 +0200 Subject: [PATCH 25/32] libjson-c: update to 0.15 Drop patches as they've been upstreamed: * 001-Fix-CVE-2020-12762.patch Refresh patches: * 000-libm.patch Add patch to avoid build failure due to missing docs in tarball. Signed-off-by: David Bauer --- package/libs/libjson-c/Makefile | 6 +- package/libs/libjson-c/patches/000-libm.patch | 9 +- .../patches/001-Fix-CVE-2020-12762.patch | 180 ------------------ .../patches/001-dont-build-docs.patch | 11 ++ 4 files changed, 22 insertions(+), 184 deletions(-) delete mode 100644 package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch create mode 100644 package/libs/libjson-c/patches/001-dont-build-docs.patch diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile index 84bd722f15..c8a514a147 100644 --- a/package/libs/libjson-c/Makefile +++ b/package/libs/libjson-c/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=json-c -PKG_VERSION:=0.14 -PKG_RELEASE:=2 +PKG_VERSION:=0.15 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/ -PKG_HASH:=99914e644a25201d82ccefa20430f7515c110923360f9ef46755527c02412afa +PKG_HASH:=99bca4f944b8ced8ae0bbc6310d6a3528ca715e69541793a1ef51f8c5b4b0878 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=MIT diff --git a/package/libs/libjson-c/patches/000-libm.patch b/package/libs/libjson-c/patches/000-libm.patch index 35ffec8724..c6ff5f4766 100644 --- a/package/libs/libjson-c/patches/000-libm.patch +++ b/package/libs/libjson-c/patches/000-libm.patch @@ -1,6 +1,6 @@ --- a/math_compat.h +++ b/math_compat.h -@@ -6,31 +6,9 @@ +@@ -6,38 +6,9 @@ * @brief Do not use, json-c internal, may be changed or removed at any time. */ @@ -10,6 +10,9 @@ -#ifdef HAVE_DECL__ISNAN -#include -#define isnan(x) _isnan(x) +-#else +-/* On platforms like AIX and "IBM i" we need to provide our own isnan */ +-#define isnan(x) ((x) != (x)) -#endif -#endif - @@ -17,6 +20,10 @@ -#ifdef HAVE_DECL__FINITE -#include -#define isinf(x) (!_finite(x)) +-#else +-#include +-/* On platforms like AIX and "IBM i" we need to provide our own isinf */ +-#define isinf(x) ((x) < -DBL_MAX || (x) > DBL_MAX) -#endif -#endif - diff --git a/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch b/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch deleted file mode 100644 index 3871d9992f..0000000000 --- a/package/libs/libjson-c/patches/001-Fix-CVE-2020-12762.patch +++ /dev/null @@ -1,180 +0,0 @@ -From 5d6fa331418d49f1bd488553fd1cfa9ab023fabb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= -Date: Thu, 14 May 2020 12:32:30 +0200 -Subject: [PATCH] Fix CVE-2020-12762. - -This commit is a squashed backport of the following commits -on the master branch: - - * 099016b7e8d70a6d5dd814e788bba08d33d48426 - * 77d935b7ae7871a1940cd827e850e6063044ec45 - * d07b91014986900a3a75f306d302e13e005e9d67 - * 519dfe1591d85432986f9762d41d1a883198c157 - * a59d5acfab4485d5133114df61785b1fc633e0c6 - * 26f080997d41cfdb17beab65e90c82217d0ac43b ---- - arraylist.c | 3 +++ - linkhash.c | 9 ++++++++- - printbuf.c | 18 ++++++++++++++++-- - tests/test4.c | 29 +++++++++++++++++++++++++++++ - tests/test4.expected | 1 + - 5 files changed, 57 insertions(+), 3 deletions(-) - ---- a/arraylist.c -+++ b/arraylist.c -@@ -136,6 +136,9 @@ int array_list_del_idx(struct array_list - { - size_t i, stop; - -+ /* Avoid overflow in calculation with large indices. */ -+ if (idx > SIZE_T_MAX - count) -+ return -1; - stop = idx + count; - if (idx >= arr->length || stop > arr->length) - return -1; ---- a/linkhash.c -+++ b/linkhash.c -@@ -12,6 +12,7 @@ - - #include "config.h" - -+#include - #include - #include - #include -@@ -499,6 +500,8 @@ struct lh_table *lh_table_new(int size, - int i; - struct lh_table *t; - -+ /* Allocate space for elements to avoid divisions by zero. */ -+ assert(size > 0); - t = (struct lh_table *)calloc(1, sizeof(struct lh_table)); - if (!t) - return NULL; -@@ -578,8 +581,12 @@ int lh_table_insert_w_hash(struct lh_tab - unsigned long n; - - if (t->count >= t->size * LH_LOAD_FACTOR) -- if (lh_table_resize(t, t->size * 2) != 0) -+ { -+ /* Avoid signed integer overflow with large tables. */ -+ int new_size = (t->size > INT_MAX / 2) ? INT_MAX : (t->size * 2); -+ if (t->size == INT_MAX || lh_table_resize(t, new_size) != 0) - return -1; -+ } - - n = h % t->size; - ---- a/printbuf.c -+++ b/printbuf.c -@@ -15,6 +15,7 @@ - - #include "config.h" - -+#include - #include - #include - #include -@@ -66,9 +67,16 @@ static int printbuf_extend(struct printb - if (p->size >= min_size) - return 0; - -- new_size = p->size * 2; -- if (new_size < min_size + 8) -+ /* Prevent signed integer overflows with large buffers. */ -+ if (min_size > INT_MAX - 8) -+ return -1; -+ if (p->size > INT_MAX / 2) - new_size = min_size + 8; -+ else { -+ new_size = p->size * 2; -+ if (new_size < min_size + 8) -+ new_size = min_size + 8; -+ } - #ifdef PRINTBUF_DEBUG - MC_DEBUG("printbuf_memappend: realloc " - "bpos=%d min_size=%d old_size=%d new_size=%d\n", -@@ -83,6 +91,9 @@ static int printbuf_extend(struct printb - - int printbuf_memappend(struct printbuf *p, const char *buf, int size) - { -+ /* Prevent signed integer overflows with large buffers. */ -+ if (size > INT_MAX - p->bpos - 1) -+ return -1; - if (p->size <= p->bpos + size + 1) - { - if (printbuf_extend(p, p->bpos + size + 1) < 0) -@@ -100,6 +111,9 @@ int printbuf_memset(struct printbuf *pb, - - if (offset == -1) - offset = pb->bpos; -+ /* Prevent signed integer overflows with large buffers. */ -+ if (len > INT_MAX - offset) -+ return -1; - size_needed = offset + len; - if (pb->size < size_needed) - { ---- a/tests/test4.c -+++ b/tests/test4.c -@@ -3,12 +3,15 @@ - */ - - #include "config.h" -+#include - #include -+#include - #include - - #include "json_inttypes.h" - #include "json_object.h" - #include "json_tokener.h" -+#include "snprintf_compat.h" - - void print_hex(const char *s) - { -@@ -24,6 +27,29 @@ void print_hex(const char *s) - putchar('\n'); - } - -+static void test_lot_of_adds(void); -+static void test_lot_of_adds() -+{ -+ int ii; -+ char key[50]; -+ json_object *jobj = json_object_new_object(); -+ assert(jobj != NULL); -+ for (ii = 0; ii < 500; ii++) -+ { -+ snprintf(key, sizeof(key), "k%d", ii); -+ json_object *iobj = json_object_new_int(ii); -+ assert(iobj != NULL); -+ if (json_object_object_add(jobj, key, iobj)) -+ { -+ fprintf(stderr, "FAILED to add object #%d\n", ii); -+ abort(); -+ } -+ } -+ printf("%s\n", json_object_to_json_string(jobj)); -+ assert(json_object_object_length(jobj) == 500); -+ json_object_put(jobj); -+} -+ - int main(void) - { - const char *input = "\"\\ud840\\udd26,\\ud840\\udd27,\\ud800\\udd26,\\ud800\\udd27\""; -@@ -52,5 +78,8 @@ int main(void) - retval = 1; - } - json_object_put(parse_result); -+ -+ test_lot_of_adds(); -+ - return retval; - } ---- a/tests/test4.expected -+++ b/tests/test4.expected -@@ -1,3 +1,4 @@ - input: "\ud840\udd26,\ud840\udd27,\ud800\udd26,\ud800\udd27" - JSON parse result is correct: 𠄦,𠄧,𐄦,𐄧 - PASS -+{ "k0": 0, "k1": 1, "k2": 2, "k3": 3, "k4": 4, "k5": 5, "k6": 6, "k7": 7, "k8": 8, "k9": 9, "k10": 10, "k11": 11, "k12": 12, "k13": 13, "k14": 14, "k15": 15, "k16": 16, "k17": 17, "k18": 18, "k19": 19, "k20": 20, "k21": 21, "k22": 22, "k23": 23, "k24": 24, "k25": 25, "k26": 26, "k27": 27, "k28": 28, "k29": 29, "k30": 30, "k31": 31, "k32": 32, "k33": 33, "k34": 34, "k35": 35, "k36": 36, "k37": 37, "k38": 38, "k39": 39, "k40": 40, "k41": 41, "k42": 42, "k43": 43, "k44": 44, "k45": 45, "k46": 46, "k47": 47, "k48": 48, "k49": 49, "k50": 50, "k51": 51, "k52": 52, "k53": 53, "k54": 54, "k55": 55, "k56": 56, "k57": 57, "k58": 58, "k59": 59, "k60": 60, "k61": 61, "k62": 62, "k63": 63, "k64": 64, "k65": 65, "k66": 66, "k67": 67, "k68": 68, "k69": 69, "k70": 70, "k71": 71, "k72": 72, "k73": 73, "k74": 74, "k75": 75, "k76": 76, "k77": 77, "k78": 78, "k79": 79, "k80": 80, "k81": 81, "k82": 82, "k83": 83, "k84": 84, "k85": 85, "k86": 86, "k87": 87, "k88": 88, "k89": 89, "k90": 90, "k91": 91, "k92": 92, "k93": 93, "k94": 94, "k95": 95, "k96": 96, "k97": 97, "k98": 98, "k99": 99, "k100": 100, "k101": 101, "k102": 102, "k103": 103, "k104": 104, "k105": 105, "k106": 106, "k107": 107, "k108": 108, "k109": 109, "k110": 110, "k111": 111, "k112": 112, "k113": 113, "k114": 114, "k115": 115, "k116": 116, "k117": 117, "k118": 118, "k119": 119, "k120": 120, "k121": 121, "k122": 122, "k123": 123, "k124": 124, "k125": 125, "k126": 126, "k127": 127, "k128": 128, "k129": 129, "k130": 130, "k131": 131, "k132": 132, "k133": 133, "k134": 134, "k135": 135, "k136": 136, "k137": 137, "k138": 138, "k139": 139, "k140": 140, "k141": 141, "k142": 142, "k143": 143, "k144": 144, "k145": 145, "k146": 146, "k147": 147, "k148": 148, "k149": 149, "k150": 150, "k151": 151, "k152": 152, "k153": 153, "k154": 154, "k155": 155, "k156": 156, "k157": 157, "k158": 158, "k159": 159, "k160": 160, "k161": 161, "k162": 162, "k163": 163, "k164": 164, "k165": 165, "k166": 166, "k167": 167, "k168": 168, "k169": 169, "k170": 170, "k171": 171, "k172": 172, "k173": 173, "k174": 174, "k175": 175, "k176": 176, "k177": 177, "k178": 178, "k179": 179, "k180": 180, "k181": 181, "k182": 182, "k183": 183, "k184": 184, "k185": 185, "k186": 186, "k187": 187, "k188": 188, "k189": 189, "k190": 190, "k191": 191, "k192": 192, "k193": 193, "k194": 194, "k195": 195, "k196": 196, "k197": 197, "k198": 198, "k199": 199, "k200": 200, "k201": 201, "k202": 202, "k203": 203, "k204": 204, "k205": 205, "k206": 206, "k207": 207, "k208": 208, "k209": 209, "k210": 210, "k211": 211, "k212": 212, "k213": 213, "k214": 214, "k215": 215, "k216": 216, "k217": 217, "k218": 218, "k219": 219, "k220": 220, "k221": 221, "k222": 222, "k223": 223, "k224": 224, "k225": 225, "k226": 226, "k227": 227, "k228": 228, "k229": 229, "k230": 230, "k231": 231, "k232": 232, "k233": 233, "k234": 234, "k235": 235, "k236": 236, "k237": 237, "k238": 238, "k239": 239, "k240": 240, "k241": 241, "k242": 242, "k243": 243, "k244": 244, "k245": 245, "k246": 246, "k247": 247, "k248": 248, "k249": 249, "k250": 250, "k251": 251, "k252": 252, "k253": 253, "k254": 254, "k255": 255, "k256": 256, "k257": 257, "k258": 258, "k259": 259, "k260": 260, "k261": 261, "k262": 262, "k263": 263, "k264": 264, "k265": 265, "k266": 266, "k267": 267, "k268": 268, "k269": 269, "k270": 270, "k271": 271, "k272": 272, "k273": 273, "k274": 274, "k275": 275, "k276": 276, "k277": 277, "k278": 278, "k279": 279, "k280": 280, "k281": 281, "k282": 282, "k283": 283, "k284": 284, "k285": 285, "k286": 286, "k287": 287, "k288": 288, "k289": 289, "k290": 290, "k291": 291, "k292": 292, "k293": 293, "k294": 294, "k295": 295, "k296": 296, "k297": 297, "k298": 298, "k299": 299, "k300": 300, "k301": 301, "k302": 302, "k303": 303, "k304": 304, "k305": 305, "k306": 306, "k307": 307, "k308": 308, "k309": 309, "k310": 310, "k311": 311, "k312": 312, "k313": 313, "k314": 314, "k315": 315, "k316": 316, "k317": 317, "k318": 318, "k319": 319, "k320": 320, "k321": 321, "k322": 322, "k323": 323, "k324": 324, "k325": 325, "k326": 326, "k327": 327, "k328": 328, "k329": 329, "k330": 330, "k331": 331, "k332": 332, "k333": 333, "k334": 334, "k335": 335, "k336": 336, "k337": 337, "k338": 338, "k339": 339, "k340": 340, "k341": 341, "k342": 342, "k343": 343, "k344": 344, "k345": 345, "k346": 346, "k347": 347, "k348": 348, "k349": 349, "k350": 350, "k351": 351, "k352": 352, "k353": 353, "k354": 354, "k355": 355, "k356": 356, "k357": 357, "k358": 358, "k359": 359, "k360": 360, "k361": 361, "k362": 362, "k363": 363, "k364": 364, "k365": 365, "k366": 366, "k367": 367, "k368": 368, "k369": 369, "k370": 370, "k371": 371, "k372": 372, "k373": 373, "k374": 374, "k375": 375, "k376": 376, "k377": 377, "k378": 378, "k379": 379, "k380": 380, "k381": 381, "k382": 382, "k383": 383, "k384": 384, "k385": 385, "k386": 386, "k387": 387, "k388": 388, "k389": 389, "k390": 390, "k391": 391, "k392": 392, "k393": 393, "k394": 394, "k395": 395, "k396": 396, "k397": 397, "k398": 398, "k399": 399, "k400": 400, "k401": 401, "k402": 402, "k403": 403, "k404": 404, "k405": 405, "k406": 406, "k407": 407, "k408": 408, "k409": 409, "k410": 410, "k411": 411, "k412": 412, "k413": 413, "k414": 414, "k415": 415, "k416": 416, "k417": 417, "k418": 418, "k419": 419, "k420": 420, "k421": 421, "k422": 422, "k423": 423, "k424": 424, "k425": 425, "k426": 426, "k427": 427, "k428": 428, "k429": 429, "k430": 430, "k431": 431, "k432": 432, "k433": 433, "k434": 434, "k435": 435, "k436": 436, "k437": 437, "k438": 438, "k439": 439, "k440": 440, "k441": 441, "k442": 442, "k443": 443, "k444": 444, "k445": 445, "k446": 446, "k447": 447, "k448": 448, "k449": 449, "k450": 450, "k451": 451, "k452": 452, "k453": 453, "k454": 454, "k455": 455, "k456": 456, "k457": 457, "k458": 458, "k459": 459, "k460": 460, "k461": 461, "k462": 462, "k463": 463, "k464": 464, "k465": 465, "k466": 466, "k467": 467, "k468": 468, "k469": 469, "k470": 470, "k471": 471, "k472": 472, "k473": 473, "k474": 474, "k475": 475, "k476": 476, "k477": 477, "k478": 478, "k479": 479, "k480": 480, "k481": 481, "k482": 482, "k483": 483, "k484": 484, "k485": 485, "k486": 486, "k487": 487, "k488": 488, "k489": 489, "k490": 490, "k491": 491, "k492": 492, "k493": 493, "k494": 494, "k495": 495, "k496": 496, "k497": 497, "k498": 498, "k499": 499 } diff --git a/package/libs/libjson-c/patches/001-dont-build-docs.patch b/package/libs/libjson-c/patches/001-dont-build-docs.patch new file mode 100644 index 0000000000..1aa0da4f59 --- /dev/null +++ b/package/libs/libjson-c/patches/001-dont-build-docs.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -401,8 +401,6 @@ set(JSON_C_SOURCES + include_directories(${PROJECT_SOURCE_DIR}) + include_directories(${PROJECT_BINARY_DIR}) + +-add_subdirectory(doc) +- + # uninstall + add_custom_target(uninstall + COMMAND cat ${PROJECT_BINARY_DIR}/install_manifest.txt | xargs rm From 520074e57ef3eacf85ab58995d1bb39b6c8c7180 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Thu, 17 Sep 2020 01:23:38 +0200 Subject: [PATCH 26/32] usbutils: update USB IDs to the latest version Update from 0.321 to 0.339 Signed-off-by: David Bauer --- package/utils/usbutils/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/utils/usbutils/Makefile b/package/utils/usbutils/Makefile index 0a427a53e5..4e32e27a06 100644 --- a/package/utils/usbutils/Makefile +++ b/package/utils/usbutils/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbutils PKG_VERSION:=007 -PKG_RELEASE:=10 +PKG_RELEASE:=11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/usb/usbutils @@ -32,13 +32,13 @@ define Package/usbutils URL:=http://www.linux-usb.org/ endef -USB_IDS_VER:=0.321 +USB_IDS_VER:=0.339 USB_IDS_FILE:=usb.ids.$(USB_IDS_VER) define Download/usb_ids FILE:=$(USB_IDS_FILE) URL_FILE:=usb.ids URL:=@GITHUB/vcrhonek/hwdata/v$(USB_IDS_VER) - HASH:=00aa21766bb078186d2bc2cca9a2ae910aa2b787a810e97019b1b3f94c9453f2 + HASH:=5ab6b663d3119217aa4117e95063c9b82646107344f2ae1d22248c6c29389fd7 endef $(eval $(call Download,usb_ids)) From 4fb58813f94ac6cc8167138e23a92189fe50b258 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 17 Sep 2020 19:14:13 +0200 Subject: [PATCH 27/32] mediatek: fix hardware flow offload Add support for dealing with DSA ports Signed-off-by: Felix Fietkau --- ...-support-hardware-flow-table-offload.patch | 78 +++++++++++++++++++ .../mediatek/patches-5.4/0999-hnat.patch | 18 ++++- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch diff --git a/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch new file mode 100644 index 0000000000..392a37b345 --- /dev/null +++ b/target/linux/generic/pending-5.4/647-net-dsa-support-hardware-flow-table-offload.patch @@ -0,0 +1,78 @@ +From: Felix Fietkau +Date: Thu, 17 Sep 2020 18:41:23 +0200 +Subject: [PATCH] net: dsa: support hardware flow table offload + +Look up the master device and the port id + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/netfilter/nf_flow_table.h ++++ b/include/net/netfilter/nf_flow_table.h +@@ -90,6 +90,7 @@ struct flow_offload { + #define FLOW_OFFLOAD_PATH_ETHERNET BIT(0) + #define FLOW_OFFLOAD_PATH_VLAN BIT(1) + #define FLOW_OFFLOAD_PATH_PPPOE BIT(2) ++#define FLOW_OFFLOAD_PATH_DSA BIT(3) + + struct flow_offload_hw_path { + struct net_device *dev; +@@ -100,6 +101,7 @@ struct flow_offload_hw_path { + u16 vlan_proto; + u16 vlan_id; + u16 pppoe_sid; ++ u16 dsa_port; + }; + + #define NF_FLOW_TIMEOUT (30 * HZ) +--- a/net/dsa/slave.c ++++ b/net/dsa/slave.c +@@ -19,6 +19,10 @@ + #include + #include + #include ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++#include ++#include ++#endif + + #include "dsa_priv.h" + +@@ -1221,6 +1225,27 @@ static struct devlink_port *dsa_slave_ge + return dp->ds->devlink ? &dp->devlink_port : NULL; + } + ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++static int dsa_flow_offload_check(struct flow_offload_hw_path *path) ++{ ++ struct net_device *dev = path->dev; ++ struct dsa_port *dp; ++ ++ if (!(path->flags & FLOW_OFFLOAD_PATH_ETHERNET)) ++ return -EINVAL; ++ ++ dp = dsa_slave_to_port(dev); ++ path->dsa_port = dp->index; ++ path->dev = dsa_slave_to_master(dev); ++ path->flags |= FLOW_OFFLOAD_PATH_DSA; ++ ++ if (path->dev->netdev_ops->ndo_flow_offload_check) ++ return path->dev->netdev_ops->ndo_flow_offload_check(path); ++ ++ return 0; ++} ++#endif /* CONFIG_NF_FLOW_TABLE */ ++ + static const struct net_device_ops dsa_slave_netdev_ops = { + .ndo_open = dsa_slave_open, + .ndo_stop = dsa_slave_close, +@@ -1245,6 +1270,9 @@ static const struct net_device_ops dsa_s + .ndo_vlan_rx_add_vid = dsa_slave_vlan_rx_add_vid, + .ndo_vlan_rx_kill_vid = dsa_slave_vlan_rx_kill_vid, + .ndo_get_devlink_port = dsa_slave_get_devlink_port, ++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE) ++ .ndo_flow_offload_check = dsa_flow_offload_check, ++#endif + }; + + static struct device_type dsa_type = { diff --git a/target/linux/mediatek/patches-5.4/0999-hnat.patch b/target/linux/mediatek/patches-5.4/0999-hnat.patch index 685c741043..f86c882eb2 100644 --- a/target/linux/mediatek/patches-5.4/0999-hnat.patch +++ b/target/linux/mediatek/patches-5.4/0999-hnat.patch @@ -321,7 +321,7 @@ #endif /* MTK_ETH_H */ --- /dev/null +++ b/drivers/net/ethernet/mediatek/mtk_offload.c -@@ -0,0 +1,593 @@ +@@ -0,0 +1,609 @@ +/* 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; version 2 of the License @@ -430,6 +430,22 @@ + } + } + ++ if (dest->flags & FLOW_OFFLOAD_PATH_DSA) { ++ entry->bfib1.vlan_layer = 1; ++ ++ entry->ipv4_hnapt.bfib1.vpm = 0; ++ entry->ipv4_hnapt.etype = BIT(dest->dsa_port); ++ ++ if (dest->flags & FLOW_OFFLOAD_PATH_VLAN) { ++ if (dest->vlan_proto != htons(ETH_P_8021Q)) ++ return -EINVAL; ++ ++ entry->ipv4_hnapt.etype |= BIT(8); ++ } else { ++ entry->ipv4_hnapt.vlan1 = 0; ++ } ++ } ++ + return 0; +} + From 9f0d8826800eef8018720b76b0f4e56fb59b7448 Mon Sep 17 00:00:00 2001 From: Vladimir Vid Date: Mon, 14 Sep 2020 17:24:24 +0200 Subject: [PATCH 28/32] mvebu: image: add check for fdt_add_r and kernel_addr_r variables fdt_addr and kernel_addr variables are getting obsolete in the mainline u-boot in favor of fdt_addr_r and kernel_addr_r. By checking if the new variables exist, we can make sure that devices with newer version of u-boot will work while not breaking support for the existing ones. Signed-off-by: Vladimir Vid Acked-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/generic-arm64.bootscript | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/linux/mvebu/image/generic-arm64.bootscript b/target/linux/mvebu/image/generic-arm64.bootscript index bb78948253..c7688fd73f 100644 --- a/target/linux/mvebu/image/generic-arm64.bootscript +++ b/target/linux/mvebu/image/generic-arm64.bootscript @@ -10,6 +10,14 @@ elif mmc dev 1; then setenv mmcdev 1 fi +if test -n "${fdt_addr_r}"; then + setenv fdt_addr ${fdt_addr_r} +fi + +if test -n "${kernel_addr_r}"; then + setenv kernel_addr ${kernel_addr_r} +fi + load mmc ${mmcdev}:1 ${fdt_addr} @DTB@.dtb load mmc ${mmcdev}:1 ${kernel_addr} Image From a594a5a33067b1d44d77777d78e63e6b08d485ab Mon Sep 17 00:00:00 2001 From: Martin Schiller Date: Tue, 15 Sep 2020 08:24:22 +0200 Subject: [PATCH 29/32] lantiq: use uniform "u-boot-env" mtd label This is the most popular choice in the linux kernel tree. Within OpenWrt, this change will establish consistency with ath79 and ramips targets. Signed-off-by: Martin Schiller [extend commit message, include netgear_dm200, update base-files] Signed-off-by: Adrian Schmutzler --- package/boot/uboot-envtools/files/lantiq | 2 +- target/linux/lantiq/ase/base-files/etc/board.d/02_network | 2 +- .../mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts | 2 +- .../mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi | 2 +- .../arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts | 2 +- .../boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts | 2 +- .../mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts | 2 +- .../arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts | 2 +- .../arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts | 2 +- .../mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts | 2 +- .../mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts | 2 +- .../mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi | 2 +- .../mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts | 2 +- .../mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts | 2 +- .../mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts | 2 +- .../mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts | 2 +- .../mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi | 2 +- .../files-5.4/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts | 2 +- .../arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts | 2 +- .../boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts | 2 +- .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts | 2 +- .../mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts | 2 +- .../arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts | 2 +- .../arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts | 2 +- .../mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts | 2 +- .../mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts | 2 +- .../mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi | 2 +- .../mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts | 2 +- .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts | 2 +- .../mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts | 2 +- .../mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts | 2 +- .../arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts | 2 +- .../linux/lantiq/xrx200/base-files/etc/board.d/02_network | 8 ++++---- .../linux/lantiq/xway/base-files/etc/board.d/02_network | 2 +- .../base-files/etc/hotplug.d/firmware/12-ath9k-eeprom | 4 ++-- 81 files changed, 85 insertions(+), 85 deletions(-) diff --git a/package/boot/uboot-envtools/files/lantiq b/package/boot/uboot-envtools/files/lantiq index f4541a559b..87dfac8b30 100644 --- a/package/boot/uboot-envtools/files/lantiq +++ b/package/boot/uboot-envtools/files/lantiq @@ -26,7 +26,7 @@ zyxel,p-2812hnu-f1) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x2000" "0x20000" "1" ;; buffalo,wbmr-300hpd) - idx="$(find_mtd_index ubootconfig)" + idx="$(find_mtd_index u-boot-env)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x2000" "0x1000" "2" ;; diff --git a/target/linux/lantiq/ase/base-files/etc/board.d/02_network b/target/linux/lantiq/ase/base-files/etc/board.d/02_network index 0bda3e4763..deddba2408 100755 --- a/target/linux/lantiq/ase/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/ase/base-files/etc/board.d/02_network @@ -37,7 +37,7 @@ lantiq_setup_macs() case "$board" in allnet,all0333cj) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ;; esac diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts index c5dd1600f4..8bb3e3cbd8 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts @@ -96,7 +96,7 @@ }; partition@3ff200 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x3ff200 0xc00>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts index 044ae2b417..9c1ebf42f0 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts @@ -148,7 +148,7 @@ read-only; }; partition@64000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x64000 0x004000>; }; ath9k_cal: partition@68000 { diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts index 5419215dc6..98ce11c250 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts @@ -162,7 +162,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi index a3dbbbdfad..64fae44e7f 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi @@ -158,7 +158,7 @@ partition@10000 { reg = <0x10000 0x10000>; - label = "uboot-env"; + label = "u-boot-env"; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts index 9b640e0327..95df8ed048 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts @@ -148,7 +148,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 267788319c..81ce539930 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -144,7 +144,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts index 19a44d5f6d..89a7adcd6c 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts @@ -178,7 +178,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi index dcae06d894..39e02d072c 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi @@ -145,7 +145,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; /* 64 KB */ read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts index 8e5301ddc9..42eb12c80b 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts @@ -155,7 +155,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts index b59477cb19..02ec8705af 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts @@ -167,7 +167,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts index cceb42164e..b1c1b8be8e 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts @@ -116,7 +116,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts index eecff4bb0b..096180ac9d 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts @@ -185,7 +185,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index 9e4216033b..854648ddc3 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -123,7 +123,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index 063be778d4..b48559d3cd 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -140,7 +140,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index b5e8845576..3f4112318d 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -172,7 +172,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts index 34b541af92..79019b635b 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts @@ -167,7 +167,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index d673c9b204..c074976155 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -109,7 +109,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 5db5f314d9..a3cb132019 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -179,7 +179,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index ec90a2bef9..60fd8bb918 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -192,7 +192,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts index 67b0f9631f..f40d278411 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts @@ -62,7 +62,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x20000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts index 40886feec4..9f2d8ec336 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts @@ -154,7 +154,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x10000>; /* 64KB */ }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts index 1afc74900e..cba2d7eb84 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts @@ -49,7 +49,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; /* 64 KB */ }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts index 0072f7e2b1..4a023d1e3f 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts @@ -77,7 +77,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts index 2107da5435..d2f5c8c16a 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts @@ -27,7 +27,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x40000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts index 56d0fe0bc3..5e4084f24e 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts @@ -28,7 +28,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x40000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi index b35f70b646..f741ea2b7b 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi @@ -24,7 +24,7 @@ partition@40000 { reg = <0x40000 0x80000>; - label = "uboot_env"; + label = "u-boot-env"; }; partition@c0000 { diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts index 3d10f582b0..b9be5d55d2 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts @@ -136,7 +136,7 @@ }; partition@30000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index d6c521cfe7..8a4a694c40 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -203,7 +203,7 @@ }; partition@60000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x60000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts index e074147d66..ba1a01e36f 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts @@ -136,7 +136,7 @@ }; partition@7f0000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x7f0000 0x10000>; }; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts index 613ff3782c..bbe3b0ed47 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts @@ -17,7 +17,7 @@ }; partition@60000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x60000 0x20000>; /* 128 KiB */ read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts index 2121fbf41d..e9606e19a2 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts @@ -16,7 +16,7 @@ read-only; }; partition@60000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x60000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts index f6a2d9f6a7..a506b7dd13 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts @@ -242,7 +242,7 @@ read-only; }; partition@a0000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0xa0000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts index 4631ad4ffe..61be0ca2ef 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts @@ -281,7 +281,7 @@ partition@ff0000 { reg = <0xff0000 0x2000>; - label = "ubootconfig"; + label = "u-boot-env"; }; partition@ff3000 { diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts index 585521459b..7a7ab1cd43 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts @@ -33,7 +33,7 @@ }; partition@100000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x100000 0x40000>; /* 256 KB */ }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts index c204c5e093..004ce6f000 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts @@ -24,7 +24,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts index cdba656e49..d6dd5edfe4 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts @@ -160,7 +160,7 @@ partition@7f0000 { reg = <0x7f0000 0x2000>; - label = "ubootconfig"; + label = "u-boot-env"; read-only; }; diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts index 4d7aac325b..fc19468f77 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts @@ -43,7 +43,7 @@ reg = <0x00000 0x40000>; }; partition@40000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; }; partition@60000 { diff --git a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts index 7da1533809..46a8137857 100644 --- a/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts +++ b/target/linux/lantiq/files-4.19/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts @@ -35,7 +35,7 @@ read-only; }; partition@50000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x50000 0x10000>; }; partition@60000 { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts index c5dd1600f4..8bb3e3cbd8 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/amazonse_allnet_all0333cj.dts @@ -96,7 +96,7 @@ }; partition@3ff200 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x3ff200 0xc00>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts index 044ae2b417..9c1ebf42f0 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_bt_homehub-v3a.dts @@ -148,7 +148,7 @@ read-only; }; partition@64000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x64000 0x004000>; }; ath9k_cal: partition@68000 { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts index 5419215dc6..98ce11c250 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts @@ -162,7 +162,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi index a3dbbbdfad..64fae44e7f 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_netgear_dgn3500.dtsi @@ -158,7 +158,7 @@ partition@10000 { reg = <0x10000 0x10000>; - label = "uboot-env"; + label = "u-boot-env"; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts index 9b640e0327..95df8ed048 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts @@ -148,7 +148,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts index 267788319c..81ce539930 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/ar9_zyxel_p-2601hn.dts @@ -144,7 +144,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts index 19a44d5f6d..89a7adcd6c 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4510pw.dts @@ -178,7 +178,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi index 3ed49e4a62..48fe88fea8 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi @@ -145,7 +145,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; /* 64 KB */ read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts index 8e5301ddc9..42eb12c80b 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts @@ -155,7 +155,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts index b59477cb19..02ec8705af 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts @@ -167,7 +167,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts index fb240b2ed8..ac0af44a90 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts @@ -116,7 +116,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts index eecff4bb0b..096180ac9d 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts @@ -185,7 +185,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts index 9e4216033b..854648ddc3 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts @@ -123,7 +123,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts index 063be778d4..b48559d3cd 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts @@ -140,7 +140,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts index 5afc157036..e0e47681bf 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts @@ -172,7 +172,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts index 34b541af92..79019b635b 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts @@ -167,7 +167,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index 437fecec9d..fd92ed49c9 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -109,7 +109,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts index 5db5f314d9..a3cb132019 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts @@ -179,7 +179,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts index ec90a2bef9..60fd8bb918 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts @@ -192,7 +192,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts index 67b0f9631f..f40d278411 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_audiocodes_mp-252.dts @@ -62,7 +62,7 @@ }; partition@20000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x20000 0x20000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts index 40886feec4..9f2d8ec336 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_bt_homehub-v2b.dts @@ -154,7 +154,7 @@ }; partition@40000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x10000>; /* 64KB */ }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts index 1afc74900e..cba2d7eb84 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_lantiq_easy50712.dts @@ -49,7 +49,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; /* 64 KB */ }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts index 0072f7e2b1..4a023d1e3f 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/danube_siemens_gigaset-sx76x.dts @@ -77,7 +77,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts index 13f9f82b1a..06f5110bce 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nand.dts @@ -26,7 +26,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x40000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts index 56d0fe0bc3..5e4084f24e 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_lantiq_easy98000-nor.dts @@ -28,7 +28,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x40000 0x40000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi index 688b7da44c..2ed15a8dd2 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/falcon_sflash-16m.dtsi @@ -23,7 +23,7 @@ partition@40000 { reg = <0x40000 0x80000>; - label = "uboot_env"; + label = "u-boot-env"; }; partition@c0000 { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts index 3d10f582b0..b9be5d55d2 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_alphanetworks_asl56026.dts @@ -136,7 +136,7 @@ }; partition@30000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x30000 0x10000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts index 7938184719..d9cdf22349 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts @@ -203,7 +203,7 @@ }; partition@60000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x60000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts index e074147d66..ba1a01e36f 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vg3503j.dts @@ -136,7 +136,7 @@ }; partition@7f0000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x7f0000 0x10000>; }; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts index 613ff3782c..bbe3b0ed47 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22-nor.dts @@ -17,7 +17,7 @@ }; partition@60000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x60000 0x20000>; /* 128 KiB */ read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts index 2121fbf41d..e9606e19a2 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519-nor.dts @@ -16,7 +16,7 @@ read-only; }; partition@60000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x60000 0x10000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts index f6a2d9f6a7..a506b7dd13 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts @@ -242,7 +242,7 @@ read-only; }; partition@a0000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0xa0000 0x20000>; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts index 7709a86e55..410992d518 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_buffalo_wbmr-300hpd.dts @@ -281,7 +281,7 @@ partition@ff0000 { reg = <0xff0000 0x2000>; - label = "ubootconfig"; + label = "u-boot-env"; }; partition@ff3000 { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts index 585521459b..7a7ab1cd43 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nand.dts @@ -33,7 +33,7 @@ }; partition@100000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x100000 0x40000>; /* 256 KB */ }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts index c204c5e093..004ce6f000 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_lantiq_easy80920-nor.dts @@ -24,7 +24,7 @@ }; partition@10000 { - label = "uboot_env"; + label = "u-boot-env"; reg = <0x10000 0x10000>; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts index cdba656e49..d6dd5edfe4 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_netgear_dm200.dts @@ -160,7 +160,7 @@ partition@7f0000 { reg = <0x7f0000 0x2000>; - label = "ubootconfig"; + label = "u-boot-env"; read-only; }; diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts index 4d7aac325b..fc19468f77 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f1.dts @@ -43,7 +43,7 @@ reg = <0x00000 0x40000>; }; partition@40000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x40000 0x20000>; }; partition@60000 { diff --git a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts index 7da1533809..46a8137857 100644 --- a/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts +++ b/target/linux/lantiq/files-5.4/arch/mips/boot/dts/lantiq/vr9_zyxel_p-2812hnu-f3.dts @@ -35,7 +35,7 @@ read-only; }; partition@50000 { - label = "uboot-env"; + label = "u-boot-env"; reg = <0x50000 0x10000>; }; partition@60000 { diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network index 5331288253..07bcdf9f84 100755 --- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network @@ -101,8 +101,8 @@ lantiq_setup_macs() case "$board" in alphanetworks,asl56026) - lan_mac=$(mtd_get_mac_ascii uboot_env ethaddr) - wan_mac=$(mtd_get_mac_ascii uboot_env wanmac) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) + wan_mac=$(mtd_get_mac_ascii u-boot-env wanmac) ;; arcadyan,arv7519rw22) wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 0x16)" 1) @@ -112,7 +112,7 @@ lantiq_setup_macs() lantiq,easy80920-nor|\ zyxel,p-2812hnu-f1|\ zyxel,p-2812hnu-f3) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ;; arcadyan,vgv7510kw22-brn|\ @@ -145,7 +145,7 @@ lantiq_setup_macs() wan_mac=$(macaddr_add "$lan_mac" 1) ;; buffalo,wbmr-300hpd) - lan_mac=$(mtd_get_mac_ascii ubootconfig ethaddr) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac="$lan_mac" ;; netgear,dm200) diff --git a/target/linux/lantiq/xway/base-files/etc/board.d/02_network b/target/linux/lantiq/xway/base-files/etc/board.d/02_network index 54ace3989c..9813b62c1b 100755 --- a/target/linux/lantiq/xway/base-files/etc/board.d/02_network +++ b/target/linux/lantiq/xway/base-files/etc/board.d/02_network @@ -90,7 +90,7 @@ lantiq_setup_macs() bt,homehub-v3a|\ netgear,dgn3500|\ netgear,dgn3500b) - lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr) + lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(macaddr_add "$lan_mac" 1) ;; arcadyan,arv7506pw11) diff --git a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom index 1f12da8553..9aea4eed64 100644 --- a/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom +++ b/target/linux/lantiq/xway/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom @@ -39,11 +39,11 @@ case "$FIRMWARE" in ;; bt,homehub-v3a) caldata_extract_swap "art-copy" 0x0 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot_env ethaddr) +2) 0x10c + ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) 0x10c ;; netgear,dgn3500|netgear,dgn3500b) caldata_extract "calibration" 0xf000 0x1000 - ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii uboot-env ethaddr) +2) 0x20c + ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2) 0x20c ;; avm,fritz7312|avm,fritz7320) caldata_extract "urlader" 0x985 0x1000 From e6b42386bac5678bcd7b71f041253cb759d55bd3 Mon Sep 17 00:00:00 2001 From: Roger Pueyo Centelles Date: Mon, 31 Aug 2020 15:15:15 +0200 Subject: [PATCH 30/32] ath79/mikrotik: fix soft_config location for SXT 5n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The soft_config partition for these devices lays between 0xe000 and 0xf000 (as correctly detected by the RouterBoard platform driver), before the bootloader2 partition which starts at 0x10000. This commit correctly sorts the partitions, fixing the parsing error. Fixes: FS#3314 Signed-off-by: Roger Pueyo Centelles Reviewed-by: Thibaut VARÈNE --- .../ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi index 100976e2c8..12152777a6 100644 --- a/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi +++ b/target/linux/ath79/dts/ar9344_mikrotik_routerboard-sxt-5n.dtsi @@ -122,13 +122,13 @@ read-only; }; - partition@10000 { - label = "bootloader2"; - reg = <0x10000 0x0>; - read-only; + soft_config { }; - soft_config { + partition@10000 { + label = "bootloader2"; + reg = <0x10000 0x10000>; + read-only; }; }; }; From c57b907f86f42f6192070b7459cee223f689f5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 18 Sep 2020 08:13:35 +0200 Subject: [PATCH 31/32] uhttpd: update to the latest master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 47c34bd ubus: add ACL support for "subscribe" request Signed-off-by: Rafał Miłecki --- package/network/services/uhttpd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile index 697ffc10b2..174c46b8f0 100644 --- a/package/network/services/uhttpd/Makefile +++ b/package/network/services/uhttpd/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git -PKG_SOURCE_DATE:=2020-09-15 -PKG_SOURCE_VERSION:=11723570af9cb7bd87842e79c85ee99530be9902 -PKG_MIRROR_HASH:=39aa6d700689419db8e8f9bf59a4b9c9539c3ee636e0befebf38476bc883cc18 +PKG_SOURCE_DATE:=2020-09-18 +PKG_SOURCE_VERSION:=47c34bd6ad49cae408b8d7c150c6f9f324aaddf5 +PKG_MIRROR_HASH:=31ee0eca69577380842588abc442526c23b2c20df13e79738843b8b417f99d17 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=ISC From 14247c82c0c64bbbf0ce32bfa43de609a0b3c6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 18 Sep 2020 08:18:53 +0200 Subject: [PATCH 32/32] rpcd: update to the latest master MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 3fea655 rc: support init.d scripts with START=0 Signed-off-by: Rafał Miłecki --- package/system/rpcd/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile index f81abc3277..051e4c5edd 100644 --- a/package/system/rpcd/Makefile +++ b/package/system/rpcd/Makefile @@ -12,10 +12,10 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git -PKG_SOURCE_DATE:=2020-09-10 -PKG_SOURCE_VERSION:=646daa0bec742e4c0af010ca85eda9021d95e4cf +PKG_SOURCE_DATE:=2020-09-18 +PKG_SOURCE_VERSION:=3fea6559817a22de1b8375b9b1f3d818e6534591 PKG_MAINTAINER:=Jo-Philipp Wich -PKG_MIRROR_HASH:=7c1770b0f959e1e2602411ccd1bf7201f658d949ae35ad511d731ed7afbd6ce4 +PKG_MIRROR_HASH:=d9284a23017c4393f210afb5bdc7f6d9e0b3ef46cc6e2cc2b2bcaa0199c942af PKG_LICENSE:=ISC PKG_LICENSE_FILES:=