From e5dea9e37f1953d0cc4b846a530ff4247bf08ee0 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 24 Jul 2023 13:17:44 +0200 Subject: [PATCH 01/25] ramips: mt7621: disable highmem support and remove highmem offset patch On MT7621 it was observed, that enabling highmem support causes a significant performance drop, as documented in: https://github.com/openwrt/openwrt/issues/13151 By adjusting the highmem start offset, we avoid leaving any RAM unaddressable, even on devices with 512 MB Fixes: https://github.com/openwrt/openwrt/issues/13151 Signed-off-by: Felix Fietkau (cherry picked from commit cd2b74e01e8d5f5b80b82db1cb204c13ed99dd58) --- target/linux/ramips/mt7621/config-5.15 | 3 --- .../120-highmem-start-offset.patch | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 target/linux/ramips/patches-5.15/120-highmem-start-offset.patch diff --git a/target/linux/ramips/mt7621/config-5.15 b/target/linux/ramips/mt7621/config-5.15 index b366dac723..05e4c1ce87 100644 --- a/target/linux/ramips/mt7621/config-5.15 +++ b/target/linux/ramips/mt7621/config-5.15 @@ -7,7 +7,6 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_AT803X_PHY=y CONFIG_BLK_MQ_PCI=y CONFIG_BOARD_SCACHE=y -CONFIG_BOUNCE=y CONFIG_CEVT_R4K=y CONFIG_CLKSRC_MIPS_GIC=y CONFIG_CLK_MT7621=y @@ -91,7 +90,6 @@ CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y -CONFIG_HIGHMEM=y CONFIG_I2C=y CONFIG_I2C_ALGOBIT=y CONFIG_I2C_BOARDINFO=y @@ -106,7 +104,6 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y -CONFIG_KMAP_LOCAL=y CONFIG_LED_TRIGGER_PHY=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y diff --git a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch new file mode 100644 index 0000000000..629c7bfa5c --- /dev/null +++ b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch @@ -0,0 +1,19 @@ +From: Felix Fietkau +Date: Mon Jul 24 13:29:13 CEST 2023 +Subject: [PATCH] mips: ralink: increase highmem start + +Increase highmem start address in order to support devices with 512 MB memory +and MT7621 SoC + +Signed-off-by: Felix Fietkau +--- +--- a/arch/mips/include/asm/mach-ralink/spaces.h ++++ b/arch/mips/include/asm/mach-ralink/spaces.h +@@ -5,6 +5,7 @@ + #define PCI_IOBASE _AC(0xa0000000, UL) + #define PCI_IOSIZE SZ_16M + #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) ++#define HIGHMEM_START _AC(0x24000000, UL) + + #include + #endif From 339e71cbd3f86e5901f600a6bb32c9d2613f3793 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 24 Jul 2023 14:43:03 +0200 Subject: [PATCH 02/25] kernel: drop mips highmem offset start overrides The maximum offset that can be supported is 0x20000000 Do not override it to to something bigger than that on MT7621, as that could cause issues based on the fixed memory mappings. This makes the last 64 MB RAM unusable on MT7621 devices with 512 MB but avoids incurring a heavy performance hit Fixes: cd2b74e01e8d ("ramips: mt7621: disable highmem support and remove highmem offset patch") Signed-off-by: Felix Fietkau (cherry picked from commit a110de8152df46a1e2adf7010ba75fb3b1236cd8) --- .../307-mips_highmem_offset.patch | 19 ------------------- .../120-highmem-start-offset.patch | 19 ------------------- 2 files changed, 38 deletions(-) delete mode 100644 target/linux/generic/pending-5.15/307-mips_highmem_offset.patch delete mode 100644 target/linux/ramips/patches-5.15/120-highmem-start-offset.patch diff --git a/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch b/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch deleted file mode 100644 index 0529b0c5c8..0000000000 --- a/target/linux/generic/pending-5.15/307-mips_highmem_offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Subject: kernel: adjust mips highmem offset to avoid the need for -mlong-calls on systems with >256M RAM - -Signed-off-by: Felix Fietkau ---- - arch/mips/include/asm/mach-generic/spaces.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/arch/mips/include/asm/mach-generic/spaces.h -+++ b/arch/mips/include/asm/mach-generic/spaces.h -@@ -46,7 +46,7 @@ - * Memory above this physical address will be considered highmem. - */ - #ifndef HIGHMEM_START --#define HIGHMEM_START _AC(0x20000000, UL) -+#define HIGHMEM_START _AC(0x10000000, UL) - #endif - - #endif /* CONFIG_32BIT */ diff --git a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch b/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch deleted file mode 100644 index 629c7bfa5c..0000000000 --- a/target/linux/ramips/patches-5.15/120-highmem-start-offset.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Mon Jul 24 13:29:13 CEST 2023 -Subject: [PATCH] mips: ralink: increase highmem start - -Increase highmem start address in order to support devices with 512 MB memory -and MT7621 SoC - -Signed-off-by: Felix Fietkau ---- ---- a/arch/mips/include/asm/mach-ralink/spaces.h -+++ b/arch/mips/include/asm/mach-ralink/spaces.h -@@ -5,6 +5,7 @@ - #define PCI_IOBASE _AC(0xa0000000, UL) - #define PCI_IOSIZE SZ_16M - #define IO_SPACE_LIMIT (PCI_IOSIZE - 1) -+#define HIGHMEM_START _AC(0x24000000, UL) - - #include - #endif From dc370ad19adaedfaca2f14c3bb3aea0af28f625c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 14 Jul 2023 11:20:30 +0200 Subject: [PATCH 03/25] mt76: update to the latest version bb3937d5c3e0 wifi: mt76: mt7915: remove VHT160 capability on MT7915 Signed-off-by: Felix Fietkau (cherry picked from commit 063641f8cf7990731919b950c1bf9eb15d1e74c9) --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 0dfe7600df..2ab6d6d6eb 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-07-04 -PKG_SOURCE_VERSION:=f704e4f83c6fd21fb39046fa328efb51bee6383b -PKG_MIRROR_HASH:=651d2963a0d624943601dcad971e4942401274af81d39913c6d3d91be2f8d8b1 +PKG_SOURCE_DATE:=2023-07-14 +PKG_SOURCE_VERSION:=bb3937d5c3e0b13c0d08747ec0fc9726fb4fd870 +PKG_MIRROR_HASH:=498d9cfdafe06572d0668d49e89f1014715100fa59c4f89b8495cd869c8c9b0b PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 4d880318b0a0e26a5173c301f8d2108ea6070d7b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 Jul 2023 11:20:58 +0200 Subject: [PATCH 04/25] mt76: update to the latest version 53edfc7aaa34 wifi: mt76: mt7603: fix beacon interval after disabling a single vif 7ef4dd12d982 wifi: mt76: mt7603: fix tx filter/flush function 152608a40aa7 wifi: mt76: mt7615: do not advertise 5 GHz on first phy of MT7615D (DBDC) cacac3902a63 wifi: mt76: split get_of_eeprom in subfunction cd3dfe392769 wifi: mt76: add support for providing eeprom in nvmem cells Signed-off-by: Felix Fietkau (cherry picked from commit 4395236a100b558d96d0e836ddc76df19b33ddfb) --- package/kernel/mt76/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 2ab6d6d6eb..42d0e6a070 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2023-07-14 -PKG_SOURCE_VERSION:=bb3937d5c3e0b13c0d08747ec0fc9726fb4fd870 -PKG_MIRROR_HASH:=498d9cfdafe06572d0668d49e89f1014715100fa59c4f89b8495cd869c8c9b0b +PKG_SOURCE_DATE:=2023-07-26 +PKG_SOURCE_VERSION:=cd3dfe39276905307cc028ac8edf2c06963cda23 +PKG_MIRROR_HASH:=413d2d0faa81d834ba13cb9e503e1e3a61e3e071014da6b525a123e5da053f90 PKG_MAINTAINER:=Felix Fietkau PKG_USE_NINJA:=0 From 65c1f418e3add2d32b036696530dffddaba64d72 Mon Sep 17 00:00:00 2001 From: Felix Baumann Date: Fri, 21 Jul 2023 22:32:46 +0000 Subject: [PATCH 05/25] kernel: update patches for mediatek filogic Fix complaint from actions Check Kernel patches (mediatek, filogic) https://github.com/openwrt/openwrt/actions/runs/5569719763/job/15081672586?pr=13072 Signed-off-by: Felix Baumann --- ...5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch b/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch index 26ebcb6733..85e6b03a59 100644 --- a/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch +++ b/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch @@ -42,7 +42,7 @@ Signed-off-by: David S. Miller L: linux-i2c@vger.kernel.org --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig -@@ -293,6 +293,18 @@ config MEDIATEK_GE_PHY +@@ -292,6 +292,18 @@ config MEDIATEK_GE_PHY help Supports the MediaTek Gigabit Ethernet PHYs. From 9d15baee6b435318576b0c0978d82959f7eb64cc Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 21 May 2023 23:02:17 +0200 Subject: [PATCH 06/25] lantiq: add patches headers This commit adds headers to the patches, so they can be applied with the git am command. Signed-off-by: Aleksander Jan Bajkowski (cherry picked from commit 5d51079fd064a86119c6f44920e737cf5e25d3a0) --- .../patches-5.15/0101-find_active_root.patch | 10 ++++ .../0151-lantiq-ifxmips_pcie-use-of.patch | 34 +++++++---- .../lantiq/patches-5.15/0152-lantiq-VPE.patch | 57 ++++++++++++------- .../0154-lantiq-pci-bar11mask-fix.patch | 10 ++++ .../patches-5.15/0155-lantiq-VPE-nosmp.patch | 10 ++++ .../0160-owrt-lantiq-multiple-flash.patch | 10 ++++ ...-cmdset-0001-disable-buffered-writes.patch | 10 ++++ ...add-gphy-clk-src-device-tree-binding.patch | 10 ++++ .../0701-NET-lantiq-etop-of-mido.patch | 10 ++++ 9 files changed, 129 insertions(+), 32 deletions(-) diff --git a/target/linux/lantiq/patches-5.15/0101-find_active_root.patch b/target/linux/lantiq/patches-5.15/0101-find_active_root.patch index 925ac9dbba..14dc83f1f7 100644 --- a/target/linux/lantiq/patches-5.15/0101-find_active_root.patch +++ b/target/linux/lantiq/patches-5.15/0101-find_active_root.patch @@ -1,3 +1,13 @@ +From 2c82524000cca691c89c9fda251b55ef04eabcb6 Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Mon, 2 May 2016 18:50:00 +0000 +Subject: [PATCH] find active root + +Signed-off-by: Mathias Kresin +--- + drivers/mtd/parsers/ofpart_core.c | 49 ++++++++++++++++++++++++++++++- + 1 file changed, 48 insertions(+), 1 deletion(-) + --- a/drivers/mtd/parsers/ofpart_core.c +++ b/drivers/mtd/parsers/ofpart_core.c @@ -38,6 +38,38 @@ static bool node_has_compatible(struct d diff --git a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch index 10633199e6..0b99b91bd9 100644 --- a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch +++ b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch @@ -1,3 +1,26 @@ +From 1d1885f4a7abd7272f47b835b03d8662fb981d19 Mon Sep 17 00:00:00 2001 +From: Eddi De Pieri +Date: Tue, 14 Oct 2014 11:04:00 +0000 +Subject: [PATCH] MIPS: lantiq: ifxmips_pcie: use of + +Signed-off-by: Eddi De Pieri +--- + arch/mips/pci/Makefile | 2 +- + arch/mips/pci/ifxmips_pcie.c | 151 +++++++++++++++++++++++++++---- + arch/mips/pci/ifxmips_pcie_vr9.h | 105 --------------------- + 3 files changed, 133 insertions(+), 125 deletions(-) + +--- a/arch/mips/pci/Makefile ++++ b/arch/mips/pci/Makefile +@@ -43,7 +43,7 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o + obj-$(CONFIG_SOC_MT7620) += pci-mt7620.o + obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o + obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o +-obj-$(CONFIG_PCIE_LANTIQ) += ifxmips_pcie_phy.o ifxmips_pcie.o fixup-lantiq-pcie.o ++obj-$(CONFIG_PCIE_LANTIQ) += ifxmips_pcie.o fixup-lantiq-pcie.o + obj-$(CONFIG_PCIE_LANTIQ_MSI) += pcie-lantiq-msi.o + obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o + obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o --- a/arch/mips/pci/ifxmips_pcie.c +++ b/arch/mips/pci/ifxmips_pcie.c @@ -16,8 +16,15 @@ @@ -374,14 +397,3 @@ static inline void pcie_core_pmu_setup(int pcie_port) { struct clk *clk; ---- a/arch/mips/pci/Makefile -+++ b/arch/mips/pci/Makefile -@@ -43,7 +43,7 @@ obj-$(CONFIG_PCI_LANTIQ) += pci-lantiq.o - obj-$(CONFIG_SOC_MT7620) += pci-mt7620.o - obj-$(CONFIG_SOC_RT288X) += pci-rt2880.o - obj-$(CONFIG_SOC_RT3883) += pci-rt3883.o --obj-$(CONFIG_PCIE_LANTIQ) += ifxmips_pcie_phy.o ifxmips_pcie.o fixup-lantiq-pcie.o -+obj-$(CONFIG_PCIE_LANTIQ) += ifxmips_pcie.o fixup-lantiq-pcie.o - obj-$(CONFIG_PCIE_LANTIQ_MSI) += pcie-lantiq-msi.o - obj-$(CONFIG_TANBAC_TB0219) += fixup-tb0219.o - obj-$(CONFIG_TANBAC_TB0226) += fixup-tb0226.o diff --git a/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch index 6758d4a0f2..6776d35ece 100644 --- a/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch +++ b/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch @@ -1,3 +1,18 @@ +From 4d48a3d1ef6f8d036bd926e3c1f70b56fcc679b2 Mon Sep 17 00:00:00 2001 +From: Stefan Koch +Date: Thu, 20 Oct 2016 21:32:00 +0200 +Subject: [PATCH] lantiq: vpe + +Signed-off-by: Stefan Koch +--- + arch/mips/Kconfig | 6 ++++ + arch/mips/include/asm/mipsmtregs.h | 5 ++++ + arch/mips/include/asm/vpe.h | 9 ++++++ + arch/mips/kernel/vpe-mt.c | 47 ++++++++++++++++++++++++++++++ + arch/mips/kernel/vpe.c | 35 ++++++++++++++++++++++ + arch/mips/lantiq/prom.c | 4 +++ + 6 files changed, 106 insertions(+) + --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig @@ -2430,6 +2430,12 @@ config MIPS_VPE_LOADER @@ -13,6 +28,27 @@ config MIPS_VPE_LOADER_CMP bool default "y" +--- a/arch/mips/include/asm/mipsmtregs.h ++++ b/arch/mips/include/asm/mipsmtregs.h +@@ -32,6 +32,9 @@ + #define read_c0_vpeconf1() __read_32bit_c0_register($1, 3) + #define write_c0_vpeconf1(val) __write_32bit_c0_register($1, 3, val) + ++#define read_c0_vpeopt() __read_32bit_c0_register($1, 7) ++#define write_c0_vpeopt(val) __write_32bit_c0_register($1, 7, val) ++ + #define read_c0_tcstatus() __read_32bit_c0_register($2, 1) + #define write_c0_tcstatus(val) __write_32bit_c0_register($2, 1, val) + +@@ -378,6 +381,8 @@ do { \ + #define write_vpe_c0_vpeconf0(val) mttc0(1, 2, val) + #define read_vpe_c0_vpeconf1() mftc0(1, 3) + #define write_vpe_c0_vpeconf1(val) mttc0(1, 3, val) ++#define read_vpe_c0_vpeopt() mftc0(1, 7) ++#define write_vpe_c0_vpeopt(val) mttc0(1, 7, val) + #define read_vpe_c0_count() mftc0(9, 0) + #define write_vpe_c0_count(val) mttc0(9, 0, val) + #define read_vpe_c0_status() mftc0(12, 0) --- a/arch/mips/include/asm/vpe.h +++ b/arch/mips/include/asm/vpe.h @@ -124,4 +124,13 @@ void cleanup_tc(struct tc *tc); @@ -157,24 +193,3 @@ int ltq_soc_type(void) { ---- a/arch/mips/include/asm/mipsmtregs.h -+++ b/arch/mips/include/asm/mipsmtregs.h -@@ -32,6 +32,9 @@ - #define read_c0_vpeconf1() __read_32bit_c0_register($1, 3) - #define write_c0_vpeconf1(val) __write_32bit_c0_register($1, 3, val) - -+#define read_c0_vpeopt() __read_32bit_c0_register($1, 7) -+#define write_c0_vpeopt(val) __write_32bit_c0_register($1, 7, val) -+ - #define read_c0_tcstatus() __read_32bit_c0_register($2, 1) - #define write_c0_tcstatus(val) __write_32bit_c0_register($2, 1, val) - -@@ -378,6 +381,8 @@ do { \ - #define write_vpe_c0_vpeconf0(val) mttc0(1, 2, val) - #define read_vpe_c0_vpeconf1() mftc0(1, 3) - #define write_vpe_c0_vpeconf1(val) mttc0(1, 3, val) -+#define read_vpe_c0_vpeopt() mftc0(1, 7) -+#define write_vpe_c0_vpeopt(val) mttc0(1, 7, val) - #define read_vpe_c0_count() mftc0(9, 0) - #define write_vpe_c0_count(val) mttc0(9, 0, val) - #define read_vpe_c0_status() mftc0(12, 0) diff --git a/target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch b/target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch index d6556d115d..9214f786d7 100644 --- a/target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch +++ b/target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch @@ -1,3 +1,13 @@ +From 3c92a781de062064e36b867c0ab22f9aba48f3d3 Mon Sep 17 00:00:00 2001 +From: Eddi De Pieri +Date: Tue, 8 Nov 2016 17:38:00 +0100 +Subject: [PATCH] lantiq: pci: bar11mask fix + +Signed-off-by: Eddi De Pieri +--- + arch/mips/pci/pci-lantiq.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + --- a/arch/mips/pci/pci-lantiq.c +++ b/arch/mips/pci/pci-lantiq.c @@ -59,6 +59,8 @@ diff --git a/target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch b/target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch index 898c2d4821..6562dc8bda 100644 --- a/target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch +++ b/target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch @@ -1,3 +1,13 @@ +From 07ce9e9bc4dcd5ac4728e587901112eef95bbe7b Mon Sep 17 00:00:00 2001 +From: Stefan Koch +Date: Mon, 13 Mar 2017 23:42:00 +0100 +Subject: [PATCH] lantiq: vpe nosmp + +Signed-off-by: Stefan Koch +--- + arch/mips/kernel/vpe-mt.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + --- a/arch/mips/kernel/vpe-mt.c +++ b/arch/mips/kernel/vpe-mt.c @@ -132,7 +132,10 @@ int vpe_run(struct vpe *v) diff --git a/target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch index 796220b2bc..a83325c094 100644 --- a/target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch +++ b/target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch @@ -1,3 +1,13 @@ +From ebaae1cd68cd79c7eee67c9c5c0fa45809e84525 Mon Sep 17 00:00:00 2001 +From: Maikel Bloemendal +Date: Fri, 14 Nov 2014 17:06:00 +0000 +Subject: [PATCH] owrt: lantiq: multiple flash + +Signed-off-by: Maikel Bloemendal +--- + drivers/mtd/maps/lantiq-flash.c | 168 +++++++++++++++++++++----------- + 1 file changed, 109 insertions(+), 59 deletions(-) + --- a/drivers/mtd/maps/lantiq-flash.c +++ b/drivers/mtd/maps/lantiq-flash.c @@ -17,6 +17,7 @@ diff --git a/target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch b/target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch index d153c521d3..f62d167078 100644 --- a/target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch +++ b/target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch @@ -1,3 +1,13 @@ +From 5e93c85ac3e5626d1aa7e7f9c0a008b2a4224f04 Mon Sep 17 00:00:00 2001 +From: Matti Laakso +Date: Sat, 14 Feb 2015 20:48:00 +0000 +Subject: [PATCH] MTD: cfi_cmdset_0001: disable buffered writes + +Signed-off-by: Matti Laakso +--- + drivers/mtd/chips/cfi_cmdset_0001.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -39,7 +39,7 @@ diff --git a/target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch index 92c4b56493..6dacba56d5 100644 --- a/target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch +++ b/target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch @@ -1,3 +1,13 @@ +From 5502ef9d40ab20b2ac683660d1565a7c4968bcc8 Mon Sep 17 00:00:00 2001 +From: Mathias Kresin +Date: Mon, 2 May 2016 18:50:00 +0000 +Subject: [PATCH] xrx200: add gphy clk src device tree binding + +Signed-off-by: Mathias Kresin +--- + arch/mips/lantiq/xway/sysctrl.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + --- a/arch/mips/lantiq/xway/sysctrl.c +++ b/arch/mips/lantiq/xway/sysctrl.c @@ -440,6 +440,20 @@ static void clkdev_add_clkout(void) diff --git a/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch index 2cc541ae3c..7e49b47e02 100644 --- a/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch +++ b/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch @@ -1,3 +1,13 @@ +From 870ed9cae083ff8a60a739ef7e74c5a1800533be Mon Sep 17 00:00:00 2001 +From: Johann Neuhauser +Date: Thu, 17 May 2018 19:12:35 +0200 +Subject: [PATCH] net: lantiq_etop: of mdio + +Signed-off-by: Johann Neuhauser +--- + drivers/net/ethernet/lantiq_etop.c | 555 +++++++++++++++++++++++++----------- + 1 file changed, 389 insertions(+), 166 deletions(-) + --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c @@ -30,6 +30,7 @@ From 3ac300c753df4352ea67654313641d6e7a7af6c8 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Thu, 22 Jun 2023 00:32:32 +0800 Subject: [PATCH 07/25] ramips: backport upstream mt762x PCIe driver error log fixes These patches silence some mt762x PCIe driver error messeges by removing the useless debugging codes and replacing incorrectly used 'dev_err()' with 'dev_info()': PCI: mt7621: Use dev_info() to log PCIe card detection [1] mips: pci-mt7620: do not print NFTS register value as error log [2] mips: pci-mt7620: use dev_info() to log PCIe device detection result [3] Patch [1] has already been merged into the Linux 6.3 branch. Patches [2] and [3] have been merged into the "mips-next" tree, and they will be part of the upcoming Linux 6.5. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.4-rc7&id=50233e105a0332ec0f3bc83180c416e6b200471e [2] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=9f9a035e6156a57d9da062b26d2a48d031744a1e [3] https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=89ec9bbe60b61cc6ae3eddd6d4f43e128f8a88de Signed-off-by: Shiji Yang (cherry picked from commit 4e74777fa8111a2bdf63164a4920a42917faec28) --- ...do-not-print-NFTS-register-value-as-.patch | 32 +++++++++++++++ ...use-dev_info-to-log-PCIe-device-dete.patch | 39 +++++++++++++++++++ ...-dev_info-to-log-PCIe-card-detection.patch | 31 +++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 target/linux/ramips/patches-5.15/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch create mode 100644 target/linux/ramips/patches-5.15/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch create mode 100644 target/linux/ramips/patches-5.15/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch diff --git a/target/linux/ramips/patches-5.15/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch b/target/linux/ramips/patches-5.15/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch new file mode 100644 index 0000000000..704e861b82 --- /dev/null +++ b/target/linux/ramips/patches-5.15/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch @@ -0,0 +1,32 @@ +From 9f9a035e6156a57d9da062b26d2a48d031744a1e Mon Sep 17 00:00:00 2001 +From: Shiji Yang +Date: Tue, 20 Jun 2023 18:43:22 +0800 +Subject: [PATCH 1/2] mips: pci-mt7620: do not print NFTS register value as + error log + +These codes are used to read NFTS_TIMEOUT_DELAY register value and +write it into kernel log after writing the register. they are only +used for debugging during driver development, so there is no need +to keep them now. + +Tested on MT7628AN router Motorola MWR03. + +Signed-off-by: Shiji Yang +Reviewed-by: Sergio Paracuellos +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/pci/pci-mt7620.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/arch/mips/pci/pci-mt7620.c ++++ b/arch/mips/pci/pci-mt7620.c +@@ -274,9 +274,6 @@ static int mt7628_pci_hw_init(struct pla + val |= 0x50 << 8; + pci_config_write(NULL, 0, 0x70c, 4, val); + +- pci_config_read(NULL, 0, 0x70c, 4, &val); +- dev_err(&pdev->dev, "Port 0 N_FTS = %x\n", (unsigned int) val); +- + return 0; + } + diff --git a/target/linux/ramips/patches-5.15/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch b/target/linux/ramips/patches-5.15/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch new file mode 100644 index 0000000000..5898a110ea --- /dev/null +++ b/target/linux/ramips/patches-5.15/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch @@ -0,0 +1,39 @@ +From 89ec9bbe60b61cc6ae3eddd6d4f43e128f8a88de Mon Sep 17 00:00:00 2001 +From: Shiji Yang +Date: Tue, 20 Jun 2023 18:43:23 +0800 +Subject: [PATCH 2/2] mips: pci-mt7620: use dev_info() to log PCIe device + detection result + +Usually, We only need to print the error log when there is a PCIe card but +initialization fails. Whether the driver finds the PCIe card or not is the +expected behavior. So it's better to log these information with dev_info(). + +Tested on MT7628AN router Motorola MWR03. + +Signed-off-by: Shiji Yang +Reviewed-by: Sergio Paracuellos +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/pci/pci-mt7620.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/mips/pci/pci-mt7620.c ++++ b/arch/mips/pci/pci-mt7620.c +@@ -331,7 +331,7 @@ static int mt7620_pci_probe(struct platf + rt_sysc_m32(RALINK_PCIE0_CLK_EN, 0, RALINK_CLKCFG1); + if (ralink_soc == MT762X_SOC_MT7620A) + rt_sysc_m32(LC_CKDRVPD, PDRV_SW_SET, PPLL_DRV); +- dev_err(&pdev->dev, "PCIE0 no card, disable it(RST&CLK)\n"); ++ dev_info(&pdev->dev, "PCIE0 no card, disable it(RST&CLK)\n"); + return -1; + } + +@@ -374,7 +374,7 @@ int pcibios_map_irq(const struct pci_dev + dev->bus->number, slot); + return 0; + } +- dev_err(&dev->dev, "card - bus=0x%x, slot = 0x%x irq=%d\n", ++ dev_info(&dev->dev, "card - bus=0x%x, slot = 0x%x irq=%d\n", + dev->bus->number, slot, irq); + + /* configure the cache line size to 0x14 */ diff --git a/target/linux/ramips/patches-5.15/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch b/target/linux/ramips/patches-5.15/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch new file mode 100644 index 0000000000..94519b9c01 --- /dev/null +++ b/target/linux/ramips/patches-5.15/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch @@ -0,0 +1,31 @@ +From 50233e105a0332ec0f3bc83180c416e6b200471e Mon Sep 17 00:00:00 2001 +From: Sergio Paracuellos +Date: Fri, 24 Mar 2023 08:37:33 +0100 +Subject: PCI: mt7621: Use dev_info() to log PCIe card detection + +When there is no card plugged on a PCIe port a log reporting that +the port will be disabled is flagged as an error (dev_err()). + +Since this is not an error at all, change the log level by using +dev_info() instead. + +Link: https://lore.kernel.org/r/20230324073733.1596231-1-sergio.paracuellos@gmail.com +Signed-off-by: Sergio Paracuellos +Signed-off-by: Lorenzo Pieralisi +--- + drivers/pci/controller/pcie-mt7621.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/pci/controller/pcie-mt7621.c ++++ b/drivers/pci/controller/pcie-mt7621.c +@@ -383,8 +383,8 @@ static int mt7621_pcie_init_ports(struct + u32 slot = port->slot; + + if (!mt7621_pcie_port_is_linkup(port)) { +- dev_err(dev, "pcie%d no card, disable it (RST & CLK)\n", +- slot); ++ dev_info(dev, "pcie%d no card, disable it (RST & CLK)\n", ++ slot); + mt7621_control_assert(port); + port->enabled = false; + num_disabled++; From ead5860c569cfdf577408953ce7e3e0092d8866a Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Fri, 23 Jun 2023 02:05:21 +0800 Subject: [PATCH 08/25] ramips: do not print error log when mdio bus is disabled The mdio bus is used to control externel switch. In most cases, they are disabled, which is the normal behavior. Treating this as an error makes no sense, so we need to change the notification level from error to info. Fixes: a2acdf960704 ("ramips: mt7620: remove useless GMAC nodes") Signed-off-by: Shiji Yang (cherry picked from commit 285f0668f4058a935389985eb80353c8a5adbc7d) --- target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c index a6448443c0..7e896644f8 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c @@ -257,7 +257,7 @@ err_free_bus: err_put_node: of_node_put(mii_np); err_no_bus: - dev_err(priv->dev, "%s disabled", "mdio-bus"); + dev_info(priv->dev, "%s disabled", "mdio-bus"); priv->mii_bus = NULL; return err; } From 8d6a9051cda56fb78d5f9e1b5653de94a249656c Mon Sep 17 00:00:00 2001 From: David Bauer Date: Wed, 5 Jul 2023 01:35:02 +0200 Subject: [PATCH 09/25] mac80211: partly revert force-mac80211 loss detection This patch will only force mac80211 loss detection upon ath10k by masking the driver-specific loss-detection bit. Ref: commit ed816f6ba8b5 ("mac80211: always use mac80211 loss detection") Signed-off-by: David Bauer (cherry picked from commit d9070f8d23621931c4869980f6e5ae17abbe3e58) [felix.bau@gmx.de: replace path 6.2 with 5.15, refresh patches] Signed-off-by: Felix Baumann --- ...k-always-use-mac80211-loss-detection.patch | 28 +++++++++++++++ ...k-always-use-mac80211-loss-detection.patch | 28 +++++++++++++++ ...1-always-use-mac80211-loss-detection.patch | 36 ------------------- 3 files changed, 56 insertions(+), 36 deletions(-) create mode 100644 package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch create mode 100644 package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch delete mode 100644 package/kernel/mac80211/patches/subsys/340-mac80211-always-use-mac80211-loss-detection.patch diff --git a/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch new file mode 100644 index 0000000000..ec6270c34c --- /dev/null +++ b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch @@ -0,0 +1,28 @@ +From f7d6edafe4358e3880a26775cfde4cd5c71ba063 Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Wed, 5 Jul 2023 01:30:29 +0200 +Subject: [PATCH] ath10k: always use mac80211 loss detection + +ath10k does not report excessive loss in case of broken block-ack +sessions. The loss is communicated to the host-os, but ath10k does not +trigger a low-ack events by itself. + +The mac80211 framework for loss detection however detects this +circumstance well in case of ath10k. So use it regardless of ath10k's +own loss detection mechanism. + +Signed-off-by: David Bauer +--- + ath10k-5.15/mac.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/ath10k-5.15/mac.c ++++ b/ath10k-5.15/mac.c +@@ -11246,7 +11246,6 @@ int ath10k_mac_register(struct ath10k *a + ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); + ieee80211_hw_set(ar->hw, QUEUE_CONTROL); + ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); +- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK); + + if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) + ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL); diff --git a/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch b/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch new file mode 100644 index 0000000000..f025fea63b --- /dev/null +++ b/package/kernel/mac80211/patches/ath10k/988-ath10k-always-use-mac80211-loss-detection.patch @@ -0,0 +1,28 @@ +From f7d6edafe4358e3880a26775cfde4cd5c71ba063 Mon Sep 17 00:00:00 2001 +From: David Bauer +Date: Wed, 5 Jul 2023 01:30:29 +0200 +Subject: [PATCH] ath10k: always use mac80211 loss detection + +ath10k does not report excessive loss in case of broken block-ack +sessions. The loss is communicated to the host-os, but ath10k does not +trigger a low-ack events by itself. + +The mac80211 framework for loss detection however detects this +circumstance well in case of ath10k. So use it regardless of ath10k's +own loss detection mechanism. + +Signed-off-by: David Bauer +--- + drivers/net/wireless/ath/ath10k/mac.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a + ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); + ieee80211_hw_set(ar->hw, QUEUE_CONTROL); + ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); +- ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK); + + if (!test_bit(ATH10K_FLAG_RAW_MODE, &ar->dev_flags)) + ieee80211_hw_set(ar->hw, SW_CRYPTO_CONTROL); diff --git a/package/kernel/mac80211/patches/subsys/340-mac80211-always-use-mac80211-loss-detection.patch b/package/kernel/mac80211/patches/subsys/340-mac80211-always-use-mac80211-loss-detection.patch deleted file mode 100644 index e084773fd9..0000000000 --- a/package/kernel/mac80211/patches/subsys/340-mac80211-always-use-mac80211-loss-detection.patch +++ /dev/null @@ -1,36 +0,0 @@ -From cdf461888f900c3a149b10a04d72b4a590ecdec3 Mon Sep 17 00:00:00 2001 -From: David Bauer -Date: Tue, 16 May 2023 23:11:32 +0200 -Subject: [PATCH] mac80211: always use mac80211 loss detection - -ath10k does not report excessive loss in case of broken block-ack -sessions. The loss is communicated to the host-os, but ath10k does not -trigger a low-ack events by itself. - -The mac80211 framework for loss detection however detects this -circumstance well in case of ath10k. So use it regardless of ath10k's -own loss detection mechanism. - -Patching this in mac80211 does allow this hack to be used with any -flavor of ath10k/ath11k. - -Signed-off-by: David Bauer ---- - net/mac80211/status.c | 6 ------ - 1 file changed, 6 deletions(-) - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -794,12 +794,6 @@ static void ieee80211_lost_packet(struct - unsigned long pkt_time = STA_LOST_PKT_TIME; - unsigned int pkt_thr = STA_LOST_PKT_THRESHOLD; - -- /* If driver relies on its own algorithm for station kickout, skip -- * mac80211 packet loss mechanism. -- */ -- if (ieee80211_hw_check(&sta->local->hw, REPORTS_LOW_ACK)) -- return; -- - /* This packet was aggregated but doesn't carry status info */ - if ((info->flags & IEEE80211_TX_CTL_AMPDU) && - !(info->flags & IEEE80211_TX_STAT_AMPDU)) From 2b889aa71a1a3974979cff8c4357f1d64f79e3df Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Sat, 12 Mar 2022 14:39:18 +0100 Subject: [PATCH 10/25] uqmi: support split-APN IPv4 and IPv6 dual-stack Add two new "v6apn" and "v6profile" properties, to support split-APN dual-stack onfiguration. This extends the existing ipv4v6 PDP type, allowing simultaneous connection to two distinct APNs, one for IPv4 and one for IPv6. The parameters override existing 'apn' and 'profile' respectively, if set, but only for IPv6 part of the connection. If unset, they default to their original values, constituting a standard IPv4v6 setup. If a different APN is set for IPv6, a corresponding profile MUST also be configured, with a different ID, than the IPv4 profile, for example, profile 2. Both APNs must match ones configured through QMI or through 'AT+CGDCONT' command. Example configuration in UCI: config interface 'wan' option proto 'qmi' option device '/dev/cdc-wdm0' option autoconnect '1' option pdptype 'ipv4v6' option apn 'internet' option v6apn 'internetipv6' option profile '1' option v6profile '2' Corresponding profile configuration: AT+CGDCONT? +CGDCONT: 1,"IP","internet","0.0.0.0",0,0,0,0 +CGDCONT: 2,"IPV6","internetipv6","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",0,0,0,0 Signed-off-by: Lech Perczak (cherry picked from commit 48e8bf1b8f3d2750f215765f583c847ff02deca2) --- .../utils/uqmi/files/lib/netifd/proto/qmi.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index c271cb8660..fd90d581e1 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -11,6 +11,7 @@ proto_qmi_init_config() { no_device=1 proto_config_add_string "device:device" proto_config_add_string apn + proto_config_add_string v6apn proto_config_add_string auth proto_config_add_string username proto_config_add_string password @@ -19,6 +20,7 @@ proto_qmi_init_config() { proto_config_add_string modes proto_config_add_string pdptype proto_config_add_int profile + proto_config_add_int v6profile proto_config_add_boolean dhcp proto_config_add_boolean dhcpv6 proto_config_add_boolean autoconnect @@ -31,14 +33,14 @@ proto_qmi_init_config() { proto_qmi_setup() { local interface="$1" local dataformat connstat plmn_mode mcc mnc - local device apn auth username password pincode delay modes pdptype - local profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS + local device apn v6apn auth username password pincode delay modes pdptype + local profile v6profile dhcp dhcpv6 autoconnect plmn timeout mtu $PROTO_DEFAULT_OPTIONS local ip4table ip6table local cid_4 pdh_4 cid_6 pdh_6 local ip_6 ip_prefix_length gateway_6 dns1_6 dns2_6 - json_get_vars device apn auth username password pincode delay modes - json_get_vars pdptype profile dhcp dhcpv6 autoconnect plmn ip4table + json_get_vars device apn v6apn auth username password pincode delay modes + json_get_vars pdptype profile v6profile dhcp dhcpv6 autoconnect plmn ip4table json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS [ "$timeout" = "" ] && timeout="10" @@ -309,10 +311,13 @@ proto_qmi_setup() { uqmi -s -d "$device" --set-client-id wds,"$cid_6" --set-ip-family ipv6 > /dev/null 2>&1 + : "${v6apn:=${apn}}" + : "${v6profile:=${profile}}" + pdh_6=$(uqmi -s -d "$device" --set-client-id wds,"$cid_6" \ --start-network \ - ${apn:+--apn $apn} \ - ${profile:+--profile $profile} \ + ${v6apn:+--apn $v6apn} \ + ${v6profile:+--profile $v6profile} \ ${auth:+--auth-type $auth} \ ${username:+--username $username} \ ${password:+--password $password} \ From e54e5bc415ceea61391a22cf0bfe88181690ce3e Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Sat, 12 Mar 2022 17:57:44 +0100 Subject: [PATCH 11/25] uqmi: do not start 464xlat for dual-stack configurations If dual-stack configuration is in use, and dhcpv6 option is set, do not start 464xlat sub-interface for dhcpv6 sub-interace , as the configuration already provides IPv4 connectivty, be it through single or dual APN configuration. Signed-off-by: Lech Perczak (cherry picked from commit a9237c1af9c2eee0a49d96f2588be85d24489f20) --- package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh index fd90d581e1..6c5104bccd 100755 --- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh +++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh @@ -388,6 +388,7 @@ proto_qmi_setup() { json_init json_add_string name "${interface}_6" json_add_string ifname "@$interface" + [ "$pdptype" = "ipv4v6" ] && json_add_string iface_464xlat "0" json_add_string proto "dhcpv6" [ -n "$ip6table" ] && json_add_string ip6table "$ip6table" proto_add_dynamic_defaults From 68a4c60b5cb3ec48d74a40fb403417ef1606893d Mon Sep 17 00:00:00 2001 From: Mathew McBride Date: Tue, 6 Jun 2023 06:24:11 +0000 Subject: [PATCH 12/25] layerscape: armv8_64b: add Traverse Ten64 NAND variant The Ten64 board[1] is based around NXP's Layerscape LS1088A SoC. It is capable of booting both standard Linux distributions from disk devices, using EFI, and booting OpenWrt from NAND. See the online manual for more information, including the flash layout[2]. This patchset adds support for generating Ten64 images for NAND boot. For disk boot, one can use the EFI support that was recently added to the armvirt target. We previously supported NAND users by building inside our armvirt/EFI target[3], but this approach is not suitable for OpenWrt upstream. Users who used our supplied NAND images will be able to upgrade to this via sysupgrade. Signed-off-by: Mathew McBride [1] - https://www.traverse.com.au/hardware/ten64 [2] - https://ten64doc.traverse.com.au/hardware/flash/ [3] - Example: https://gitlab.com/traversetech/ls1088firmware/openwrt/-/commit/285e4360e1604eb466880d245d48efd9962143a5 (cherry picked from commit af0546da3440dba24217949527e503820350ff05) --- package/boot/uboot-envtools/files/layerscape | 3 ++ target/linux/layerscape/armv8_64b/config-5.15 | 3 +- .../layerscape/base-files/etc/board.d/01_led | 4 +++ .../base-files/etc/board.d/02_network | 4 +++ .../base-files/etc/board.d/03_gpio_switches | 8 +++++ .../base-files/lib/upgrade/platform.sh | 27 ++++++++++++++++ target/linux/layerscape/image/Makefile | 13 ++++++++ target/linux/layerscape/image/armv8_64b.mk | 32 +++++++++++++++++++ 8 files changed, 93 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/files/layerscape b/package/boot/uboot-envtools/files/layerscape index b11587d876..bc7dcf24f9 100644 --- a/package/boot/uboot-envtools/files/layerscape +++ b/package/boot/uboot-envtools/files/layerscape @@ -16,6 +16,9 @@ case "$board" in traverse,ls1043s) ubootenv_add_uci_config "/dev/mtd1" "0x40000" "0x2000" "0x20000" ;; + traverse,ten64) + ubootenv_add_uci_config "/dev/mtd3" "0x0000" "0x80000" "0x80000" + ;; esac config_load ubootenv diff --git a/target/linux/layerscape/armv8_64b/config-5.15 b/target/linux/layerscape/armv8_64b/config-5.15 index 69edc7a3f0..0e8ab0c253 100644 --- a/target/linux/layerscape/armv8_64b/config-5.15 +++ b/target/linux/layerscape/armv8_64b/config-5.15 @@ -508,6 +508,7 @@ CONFIG_MTD_NAND_ECC_SW_HAMMING=y CONFIG_MTD_NAND_FSL_IFC=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_RAW_NAND=y +CONFIG_MTD_SPI_NAND=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPLIT_FIRMWARE=y @@ -515,7 +516,7 @@ CONFIG_MTD_SPLIT_FIT_FW=y CONFIG_MTD_SST25L=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 -# CONFIG_MTD_UBI_BLOCK is not set +CONFIG_MTD_UBI_BLOCK=y CONFIG_MTD_UBI_WL_THRESHOLD=4096 CONFIG_MULTIPLEXER=y CONFIG_MUTEX_SPIN_ON_OWNER=y diff --git a/target/linux/layerscape/base-files/etc/board.d/01_led b/target/linux/layerscape/base-files/etc/board.d/01_led index 7fddfa0824..a21c21980a 100644 --- a/target/linux/layerscape/base-files/etc/board.d/01_led +++ b/target/linux/layerscape/base-files/etc/board.d/01_led @@ -17,6 +17,10 @@ traverse,ls1043s) ucidef_set_led_netdev "xgact" "10G Activity" "ls1043s:yellow:10gact" "eth6" ucidef_set_led_netdev "xglink" "10G Link" "ls1043s:green:10glink" "eth6" ;; +traverse,ten64) + ucidef_set_led_netdev "sfp1" "SFP 1" "ten64:green:sfp1:down" "eth8" "link tx rx" + ucidef_set_led_netdev "sfp2" "SFP 2" "ten64:green:sfp2:up" "eth9" "link tx rx" + ;; esac board_config_flush diff --git a/target/linux/layerscape/base-files/etc/board.d/02_network b/target/linux/layerscape/base-files/etc/board.d/02_network index 172172c12c..7bc5f9b502 100644 --- a/target/linux/layerscape/base-files/etc/board.d/02_network +++ b/target/linux/layerscape/base-files/etc/board.d/02_network @@ -17,6 +17,10 @@ case "$(board_name)" in ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth6" ucidef_set_interface_wan "eth4" ;; + traverse,ten64) + ucidef_set_interface_lan "eth0 eth1 eth2 eth3" + ucidef_set_interface_wan "eth6" + ;; esac board_config_flush diff --git a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches index df3b759916..5e0e24ef28 100644 --- a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches @@ -20,6 +20,14 @@ traverse,ls1043s) ucidef_add_gpio_switch "lte_disable" "LTE Airplane Mode" "394" ucidef_add_gpio_switch "lte_power" "LTE Power" "395" ;; +traverse,ten64) + ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376" + ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377" + ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "378" + ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "379" + ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "369" + ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "373" + ;; esac board_config_flush diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index e88dfdf145..c63cf05e5c 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -49,6 +49,26 @@ platform_do_upgrade_traverse_nandubi() { nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys) } + +platform_do_upgrade_traverse_slotubi() { + part="$(awk -F 'ubi.mtd=' '{printf $2}' /proc/cmdline | sed -e 's/ .*$//')" + echo "Active boot slot: ${part}" + new_active_sys="b" + + if [ ! -z "${part}" ]; then + if [ "${part}" = "ubia" ]; then + CI_UBIPART="ubib" + else + CI_UBIPART="ubia" + new_active_sys="a" + fi + fi + echo "Updating UBI part ${CI_UBIPART}" + fw_setenv "openwrt_active_sys" "${new_active_sys}" + nand_do_upgrade "$1" + return $? +} + platform_copy_config_sdboot() { local diskdev partdev parttype=ext4 @@ -90,6 +110,10 @@ platform_check_image() { nand_do_platform_check "traverse-ls1043" $1 return $? ;; + traverse,ten64) + nand_do_platform_check "ten64-mtd" $1 + return $? + ;; fsl,ls1012a-frdm | \ fsl,ls1012a-frwy-sdboot | \ fsl,ls1012a-rdb | \ @@ -130,6 +154,9 @@ platform_do_upgrade() { traverse,ls1043s) platform_do_upgrade_traverse_nandubi "$1" ;; + traverse,ten64) + platform_do_upgrade_traverse_slotubi "${1}" + ;; fsl,ls1012a-frdm | \ fsl,ls1012a-rdb | \ fsl,ls1021a-twr | \ diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 52dc532c34..1463a3eaea 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -64,6 +64,19 @@ define Build/traverse-fit @mv -f $@.new $@ endef +define Build/traverse-fit-ls1088 + ./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \ + -v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \ + -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ + -C gzip -c 1 -c 2 \ + -d $(DTS_DIR)/freescale/fsl-ls1088a-ten64.dtb \ + -D "TEN64" -n "ten64" -a $(FDT_LOADADDR) -c 1 \ + -d $(DTS_DIR)/freescale/fsl-ls1088a-rdb.dtb \ + -D "LS1088ARDB" -n "ls1088ardb" -a $(FDT_LOADADDR) -c 2 + PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new + @mv -f $@.new $@ +endef + define Device/fix-sysupgrade DEVICE_COMPAT_VERSION := 2.0 DEVICE_COMPAT_MESSAGE := DTB was added to sysupgrade. Image format is different. \ diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index f5a6a055fb..0016e3bde8 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -451,3 +451,35 @@ define Device/traverse_ls1043 SUPPORTED_DEVICES := traverse,ls1043s traverse,ls1043v endef TARGET_DEVICES += traverse_ls1043 + +define Device/traverse_ten64_mtd + DEVICE_VENDOR := Traverse + DEVICE_MODEL := Ten64 (NAND boot) + DEVICE_NAME := ten64-mtd + DEVICE_PACKAGES += \ + uboot-envtools \ + kmod-rtc-rx8025 \ + kmod-sfp \ + kmod-i2c-mux-pca954x \ + restool + DEVICE_DESCRIPTION = \ + Generate images for booting from NAND/ubifs on Traverse Ten64 (LS1088A) \ + family boards. For disk (NVMe/USB/SD) boot, use the armvirt target instead. + FILESYSTEMS := squashfs + KERNEL_LOADADDR := 0x80000000 + KERNEL_ENTRY_POINT := 0x80000000 + FDT_LOADADDR := 0x90000000 + KERNEL_SUFFIX := -kernel.itb + DEVICE_DTS := freescale/fsl-ls1088a-ten64 + IMAGES := nand.ubi sysupgrade.bin + KERNEL := kernel-bin | gzip | traverse-fit-ls1088 gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + IMAGE/nand.ubi := append-ubi + KERNEL_IN_UBI := 1 + BLOCKSIZE := 128KiB + PAGESIZE := 2048 + MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 600 + SUPPORTED_DEVICES = traverse,ten64 +endef +TARGET_DEVICES += traverse_ten64_mtd + From cef98caf6e8d3c466ab303d376324304bbe6c365 Mon Sep 17 00:00:00 2001 From: Mathew McBride Date: Tue, 27 Jun 2023 04:20:50 +0000 Subject: [PATCH 13/25] layerscape: remove Traverse LS1043 boards The Traverse LS1043 boards were not publicly released, all the production has been going to OEM customers who do not use the image format defined in the OpenWrt tree. Only a few samples were circulated outside Traverse and our OEM customers. The public release (then called Five64) of this series was cancelled in favour of our LS1088A based design (Ten64). It is best to remove these boards to avoid wasting OpenWrt project and contributor resources. Signed-off-by: Mathew McBride (cherry picked from commit 8e7ba6fbae80838c2219ee38307af9c883606c2c) --- package/boot/uboot-envtools/files/layerscape | 4 - .../layerscape/base-files/etc/board.d/01_led | 8 - .../base-files/etc/board.d/02_network | 8 - .../base-files/etc/board.d/03_gpio_switches | 11 - .../lib/preinit/05_layerscape_reorder_eth | 26 -- .../base-files/lib/upgrade/platform.sh | 26 -- .../boot/dts/freescale/traverse-ls1043s.dts | 332 ------------------ .../boot/dts/freescale/traverse-ls1043v.dts | 253 ------------- target/linux/layerscape/image/Makefile | 13 - target/linux/layerscape/image/armv8_64b.mk | 32 -- ...0-add-DTS-for-Traverse-LS1043-Boards.patch | 26 -- 11 files changed, 739 deletions(-) delete mode 100644 target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth delete mode 100644 target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts delete mode 100644 target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts delete mode 100644 target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch diff --git a/package/boot/uboot-envtools/files/layerscape b/package/boot/uboot-envtools/files/layerscape index bc7dcf24f9..acc5a073ad 100644 --- a/package/boot/uboot-envtools/files/layerscape +++ b/package/boot/uboot-envtools/files/layerscape @@ -12,10 +12,6 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in - traverse,ls1043v|\ - traverse,ls1043s) - ubootenv_add_uci_config "/dev/mtd1" "0x40000" "0x2000" "0x20000" - ;; traverse,ten64) ubootenv_add_uci_config "/dev/mtd3" "0x0000" "0x80000" "0x80000" ;; diff --git a/target/linux/layerscape/base-files/etc/board.d/01_led b/target/linux/layerscape/base-files/etc/board.d/01_led index a21c21980a..8a0e5c4b95 100644 --- a/target/linux/layerscape/base-files/etc/board.d/01_led +++ b/target/linux/layerscape/base-files/etc/board.d/01_led @@ -9,14 +9,6 @@ board_config_update board=$(board_name) case "$board" in -traverse,ls1043v) - ucidef_set_led_netdev "wan" "WAN LED" "ls1043v:yellow:wan" "eth4" - ;; -traverse,ls1043s) - ucidef_set_led_netdev "wan" "WAN LED" "ls1043s:yellow:wan" "eth4" - ucidef_set_led_netdev "xgact" "10G Activity" "ls1043s:yellow:10gact" "eth6" - ucidef_set_led_netdev "xglink" "10G Link" "ls1043s:green:10glink" "eth6" - ;; traverse,ten64) ucidef_set_led_netdev "sfp1" "SFP 1" "ten64:green:sfp1:down" "eth8" "link tx rx" ucidef_set_led_netdev "sfp2" "SFP 2" "ten64:green:sfp2:up" "eth9" "link tx rx" diff --git a/target/linux/layerscape/base-files/etc/board.d/02_network b/target/linux/layerscape/base-files/etc/board.d/02_network index 7bc5f9b502..0a42323801 100644 --- a/target/linux/layerscape/base-files/etc/board.d/02_network +++ b/target/linux/layerscape/base-files/etc/board.d/02_network @@ -9,14 +9,6 @@ case "$(board_name)" in fsl,ls1028a-rdb-sdboot) ucidef_set_interfaces_lan_wan "swp0 swp1 swp2 swp3" "eth0" ;; - traverse,ls1043v) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3" - ucidef_set_interface_wan "eth4" - ;; - traverse,ls1043s) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth6" - ucidef_set_interface_wan "eth4" - ;; traverse,ten64) ucidef_set_interface_lan "eth0 eth1 eth2 eth3" ucidef_set_interface_wan "eth6" diff --git a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches index 5e0e24ef28..46e54b960d 100644 --- a/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/layerscape/base-files/etc/board.d/03_gpio_switches @@ -9,17 +9,6 @@ board_config_update board=$(board_name) case "$board" in -traverse,ls1043v) - ucidef_add_gpio_switch "lte_reset" "LTE Reset" "377" - ucidef_add_gpio_switch "lte_disable" "LTE Airplane mode" "378" - ;; -traverse,ls1043s) - ucidef_add_gpio_switch "tensfp_txdisable" "SFP+ TX Disable" "378" - ucidef_add_gpio_switch "gigsfp_txdisable" "SFP TX Disable" "381" - ucidef_add_gpio_switch "lte_reset" "LTE Reset" "502" - ucidef_add_gpio_switch "lte_disable" "LTE Airplane Mode" "394" - ucidef_add_gpio_switch "lte_power" "LTE Power" "395" - ;; traverse,ten64) ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376" ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377" diff --git a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth b/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth deleted file mode 100644 index c6b741a5ce..0000000000 --- a/target/linux/layerscape/base-files/lib/preinit/05_layerscape_reorder_eth +++ /dev/null @@ -1,26 +0,0 @@ -reorder_layerscape_interfaces() { - if [ ! -f /tmp/sysinfo/board_name ]; then - echo "No board name found, not doing reorder_layerscape_interfaces" - return 0 - fi - - board=$(cat /tmp/sysinfo/board_name) - case "$board" in - traverse,ls1043v|\ - traverse,ls1043s) - - # Reorder ethernet interfaces to match the physical order - ip link set eth2 name fm1-mac3 - ip link set eth4 name eth2 - ip link set eth3 name fm1-mac4 - ip link set eth5 name eth3 - ip link set fm1-mac3 name eth4 - ip link set fm1-mac4 name eth5 - ;; - default) - echo "Unknown board $board" - ;; - esac -} - -boot_hook_add preinit_main reorder_layerscape_interfaces diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index c63cf05e5c..0b5d14b579 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -31,23 +31,6 @@ platform_do_upgrade_sdboot() { echo "Writing rootfs..." tar xf $tar_file ${board_dir}/root -O | dd of=/dev/mmcblk0p2 bs=512k > /dev/null 2>&1 -} -platform_do_upgrade_traverse_nandubi() { - bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}') - newbootsys=2 - if [ "$bootsys" -eq "2" ]; then - newbootsys=1 - fi - - # If nand_do_upgrade succeeds, we don't have an opportunity to add any actions of - # our own, so do it here and set back on failure - echo "Setting bootsys to #${newbootsys}" - fw_setenv bootsys $newbootsys - CI_UBIPART="nandubi" - CI_KERNPART="kernel${newbootsys}" - CI_ROOTPART="rootfs${newbootsys}" - nand_do_upgrade "$1" || (echo "Upgrade failed, setting bootsys ${bootsys}" && fw_setenv bootsys $bootsys) - } platform_do_upgrade_traverse_slotubi() { @@ -105,11 +88,6 @@ platform_check_image() { local board=$(board_name) case "$board" in - traverse,ls1043v | \ - traverse,ls1043s) - nand_do_platform_check "traverse-ls1043" $1 - return $? - ;; traverse,ten64) nand_do_platform_check "ten64-mtd" $1 return $? @@ -150,10 +128,6 @@ platform_do_upgrade() { touch /var/lock/fw_printenv.lock case "$board" in - traverse,ls1043v | \ - traverse,ls1043s) - platform_do_upgrade_traverse_nandubi "$1" - ;; traverse,ten64) platform_do_upgrade_traverse_slotubi "${1}" ;; diff --git a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts b/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts deleted file mode 100644 index 81044aab3a..0000000000 --- a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043s.dts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Device Tree Include file for Traverse LS1043S board. - * - * Copyright 2014-2015, Freescale Semiconductor - * Copyright 2017-2018, Traverse Technologies - * - * This file is dual-licensed: you can use it either under the terms - * of the GPLv2 or the X11 license, at your option. Note that this dual - * licensing only applies to this file, and not this project as a - * whole. - * - * a) This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Or, alternatively, - * - * b) Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/dts-v1/; -#include "fsl-ls1043a.dtsi" -#include -#include - -/ { - model = "Traverse LS1043S"; - compatible = "traverse,ls1043s"; - - aliases { - crypto = &crypto; - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - ethernet2 = &EMAC2; - ethernet3 = &EMAC3; - ethernet4 = &EMAC4; - ethernet5 = &EMAC5; - }; - - leds { - compatible = "gpio-leds"; - gpio0 { - label = "ls1043s:green:user0"; - gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>; - }; - gpio1 { - label = "ls1043s:green:user1"; - gpios = <&gpio1 24 GPIO_ACTIVE_HIGH>; - }; - /* LED D17 */ - gpio2 { - label = "ls1043s:green:wan"; - gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; - }; - gpio3 { - label = "ls1043s:yellow:wan"; - gpios = <&gpio1 27 GPIO_ACTIVE_LOW>; - }; - /* LED D18 */ - gpio4 { - label = "ls1043s:green:mgmt"; - gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; - }; - gpio5 { - label = "ls1043s:yellow:mgmt"; - gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; - }; - /* LED D6 */ - gpio6 { - label = "ls1043s:green:user2"; - gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; - }; - - /* SFP+ LEDs - these are for chassis - * with lightpipes only - */ - teng_act { - label = "ls1043s:yellow:10gact"; - gpios = <&gpio4 0 GPIO_ACTIVE_LOW>; - }; - - teng_link { - label = "ls1043s:green:10glink"; - gpios = <&gpio4 1 GPIO_ACTIVE_LOW>; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <1000>; - /* This button may not be loaded on all boards */ - button@0 { - label = "Front button"; - linux,code = ; - gpios = <&gpio1 25 GPIO_ACTIVE_LOW>; - }; - /* This is wired to header S3 */ - button@1 { - label = "Rear button"; - linux,code = ; - gpios = <&gpio1 30 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&esdhc { - mmc-hs200-1_8v; - sd-uhs-sdr104; - sd-uhs-sdr50; - sd-uhs-sdr25; - sd-uhs-sdr12; -}; - -&i2c0 { - status = "okay"; - rtc@6f { - compatible = "intersil,isl1208"; - reg = <0x6f>; - }; - - sfp_pca9534: pca9534@24 { - compatible = "ti,tca9534", "nxp,pca9534"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x24>; - gpio-base = <100>; - }; - - controller@50 { - compatible = "traverse,controller"; - reg = <0x50>; - }; - - ds125df111@18 { - compatible = "ti,ds125df111"; - reg = <0x18>; - }; - - emc1704@4c { - compatible = "microchip,emc1704"; - reg = <0x4c>; - }; - - pac1934@16 { - compatible = "microchip,pac1934"; - reg = <0x16>; - /* Monitoring 3.3V, 5V, Vin/12V (voltage only), Vbat/RTC (voltage only) */ - shunt-resistors = <4000 12000 0 0>; - }; - - pmic@8 { - compatible = "freescale,mc34vr500"; - reg = <0x08>; - }; -}; - -/* I2C Bus for SFP EEPROM and control - * These are multiplexed so - * they don't collide when loaded - */ -&i2c3 { - status = "okay"; - i2c-switch@70 { - compatible = "nxp,pca9540"; - #address-cells = <1>; - #size-cells = <0>; - reg = <0x70>; - - gigsfp_i2c: i2c@0 { - #address-cells = <1>; - #size-cells = <0>; - reg = <0>; - }; - tensfp_i2c: i2c@1 { - #address-cells = <1>; - #size-cells = <0>; - reg = <1>; - }; - }; -}; - -&ifc { - status = "okay"; - #address-cells = <2>; - #size-cells = <1>; - /* Only NAND flash is used on this board */ - ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>; - - nand@1,0 { - compatible = "fsl,ifc-nand"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0x0 0x0 0x10000>; - }; -}; - -&duart0 { - status = "okay"; -}; - -&duart1 { - status = "okay"; -}; - -#include "fsl-ls1043-post.dtsi" - -&fman0 { - EMAC0: ethernet@e0000 { - phy-handle = <&qsgmii_phy1>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 01]; - }; - - EMAC1: ethernet@e2000 { - phy-handle = <&qsgmii_phy2>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 02]; - }; - - EMAC2: ethernet@e8000 { - phy-handle = <&qsgmii_phy3>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 03]; - }; - - EMAC3: ethernet@ea000 { - phy-handle = <&qsgmii_phy4>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 04]; - }; - - /* SFP via AR8031 - * We treat this as a fixed-link as the - * AR8031 is hard-configured into - * 1000BASE-X mode - * Should MII control be desired, remove - * fixed-link and add - * phy-handle = <&rgmii_phy1>; - */ - EMAC4: ethernet@e4000 { - phy-connection-type = "rgmii"; - local-mac-address = [0A 00 00 00 00 05]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* Connection to Expansion (M.2) slot - * Future WAN (i.e xDSL) plugin - */ - EMAC5: ethernet@e6000 { - phy-connection-type = "rgmii-id"; - local-mac-address = [00 00 00 00 00 06]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* 10G SFP+ interface - * This can also run at 1.25 and 2.5G with - * the appropriate SerDes protocol setting in RCW - */ - TENSFP: ethernet@f0000 { - status = "okay"; - phy-connection-type = "xgmii"; - fixed-link { - speed = <10000>; - full-duplex; - }; - }; - - mdio@fc000 { - rgmii_phy1: ethernet-phy@2 { - reg = <0x2>; - }; - qsgmii_phy1: ethernet-phy@4 { - reg = <0x4>; - }; - qsgmii_phy2: ethernet-phy@5 { - reg = <0x5>; - }; - qsgmii_phy3: ethernet-phy@6 { - reg = <0x6>; - }; - qsgmii_phy4: ethernet-phy@7 { - reg = <0x7>; - }; - }; -}; - -/* No QUICC engine functions on this board - - * pins are used for other functions (GPIO, I2C etc.) - */ -&uqe { - status = "disabled"; -}; - -/* LS1043S does not use the QorIQ AHCI - * controller. - */ -&sata { - status = "disabled"; -}; diff --git a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts b/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts deleted file mode 100644 index 936875101f..0000000000 --- a/target/linux/layerscape/files/arch/arm64/boot/dts/freescale/traverse-ls1043v.dts +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Device Tree Include file for Traverse LS1043V board. - * - * Copyright 2014-2015, Freescale Semiconductor - * Copyright 2017, Traverse Technologies - * - * This file is dual-licensed: you can use it either under the terms - * of the GPLv2 or the X11 license, at your option. Note that this dual - * licensing only applies to this file, and not this project as a - * whole. - * - * a) This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * Or, alternatively, - * - * b) Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/dts-v1/; -#include "fsl-ls1043a.dtsi" -#include -#include - -/ { - model = "Traverse LS1043V"; - compatible = "traverse,ls1043v"; - - aliases { - crypto = &crypto; - ethernet0 = &EMAC0; - ethernet1 = &EMAC1; - ethernet2 = &EMAC2; - ethernet3 = &EMAC3; - ethernet4 = &EMAC4; - ethernet5 = &EMAC5; - pca9555 = &pca9555; - }; - - leds { - compatible = "gpio-leds"; - gpio0 { - label = "ls1043v:green:user0"; - gpios = <&pca9555 0 GPIO_ACTIVE_LOW>; - }; - gpio1 { - label = "ls1043v:yellow:user0"; - gpios = <&pca9555 1 GPIO_ACTIVE_LOW>; - }; - gpio2 { - label = "ls1043v:green:user1"; - gpios = <&pca9555 2 GPIO_ACTIVE_LOW>; - }; - gpio3 { - label = "ls1043v:yellow:user1"; - gpios = <&pca9555 3 GPIO_ACTIVE_LOW>; - }; - gpio4 { - label = "ls1043v:green:user2"; - gpios = <&pca9555 4 GPIO_ACTIVE_HIGH>; - }; - gpio5 { - label = "ls1043v:yellow:wlan"; - gpios = <&pca9555 5 GPIO_ACTIVE_HIGH>; - }; - gpio6 { - label = "ls1043v:yellow:wan"; - gpios = <&pca9555 6 GPIO_ACTIVE_HIGH>; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <1000>; - button@0 { - label = "Front button"; - linux,code = ; - gpios = <&pca9555 14 GPIO_ACTIVE_LOW>; - }; - button@1 { - label = "Rear button"; - linux,code = ; - gpios = <&pca9555 15 GPIO_ACTIVE_LOW>; - }; - }; -}; - -&i2c0 { - status = "okay"; - rtc@6f { - compatible = "intersil,isl1208"; - reg = <0x6f>; - }; - - pca9555: pca9555@20 { - compatible = "nxp,pca9555"; - gpio-controller; - #gpio-cells = <2>; - reg = <0x20>; - gpio-base = <0>; - }; - - /* CPU core temp sensor and VDD (1.0V) sensor */ - ltc2990@4c { - compatible = "lltc,ltc2990"; - reg = <0x4C>; - lltc,meas-mode = <4 3>; - }; - - /* 3.3V and 5V monitor (may not be loaded on some SKUs) */ - ltc2990@4f { - compatible = "lltc,ltc2990"; - reg = <0x4F>; - lltc,meas-mode = <6 3>; - }; -}; - -&ifc { - status = "okay"; - #address-cells = <2>; - #size-cells = <1>; - /* Only NAND flash is used on this board */ - ranges = <0x0 0x0 0x0 0x7e800000 0x00010000>; - - nand@1,0 { - compatible = "fsl,ifc-nand"; - #address-cells = <1>; - #size-cells = <1>; - reg = <0x0 0x0 0x10000>; - }; -}; - -&duart0 { - status = "okay"; -}; - -&duart1 { - status = "okay"; -}; - -#include "fsl-ls1043-post.dtsi" - -&fman0 { - EMAC0: ethernet@e0000 { - phy-handle = <&qsgmii_phy1>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 01]; - }; - - EMAC1: ethernet@e2000 { - phy-handle = <&qsgmii_phy2>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 02]; - }; - - EMAC2: ethernet@e8000 { - phy-handle = <&qsgmii_phy3>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 03]; - }; - - EMAC3: ethernet@ea000 { - phy-handle = <&qsgmii_phy4>; - phy-connection-type = "qsgmii"; - local-mac-address = [0A 00 00 00 00 04]; - }; - EMAC4: ethernet@e4000 { - phy-handle = <&rgmii_phy1>; - phy-connection-type = "rgmii"; - local-mac-address = [0A 00 00 00 00 05]; - }; - - /* Connection to VDSL SoC */ - EMAC5: ethernet@e6000 { - phy-connection-type = "rgmii-id"; - local-mac-address = [00 00 00 00 00 06]; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - - /* 10G XFI interface - not in use on this platform */ - TENSFP: ethernet@f0000 { - status = "disabled"; - - phy-connection-type = "sgmii"; - fixed-link { - /* NB: speed = 1000 and sgmii allows forward compatibility - * with both 1G and 10G, the same is not true - * in the reverse. - */ - speed = <1000>; - full-duplex; - }; - }; - - mdio@fc000 { - rgmii_phy1: ethernet-phy@3 { - reg = <0x3>; - }; - qsgmii_phy1: ethernet-phy@4 { - reg = <0x4>; - }; - qsgmii_phy2: ethernet-phy@5 { - reg = <0x5>; - }; - qsgmii_phy3: ethernet-phy@6 { - reg = <0x6>; - }; - qsgmii_phy4: ethernet-phy@7 { - reg = <0x7>; - }; - }; -}; - -/* No QUICC engine functions on this board */ -&uqe { - status = "disabled"; -}; - -/* No SATA/AHCI on this board */ -&sata { - status = "disabled"; -}; diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index 1463a3eaea..dfbda85b36 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -51,19 +51,6 @@ define Build/ls-append-sdhead dd if=$(STAGING_DIR_IMAGE)/$(1)-sdcard-head.img >> $@ endef -define Build/traverse-fit - ./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \ - -v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \ - -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ - -C gzip -c 1 -c 2 \ - -d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043s.dtb \ - -D "Traverse_LS1043S" -n "ls1043s" -a $(FDT_LOADADDR) -c 1 \ - -d $(DEVICE_DTS_DIR)/freescale/traverse-ls1043v.dtb \ - -D "Traverse_LS1043V" -n "ls1043v" -a $(FDT_LOADADDR) -c 2 - PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new - @mv -f $@.new $@ -endef - define Build/traverse-fit-ls1088 ./mkits-multiple-config.sh -o $@.its -A $(LINUX_KARCH) \ -v $(LINUX_VERSION) -k $@ -a $(KERNEL_LOADADDR) \ diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 0016e3bde8..259bacee31 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -420,38 +420,6 @@ define Device/fsl_lx2160a-rdb-sdboot endef TARGET_DEVICES += fsl_lx2160a-rdb-sdboot -define Device/traverse_ls1043 - DEVICE_VENDOR := Traverse - DEVICE_MODEL := LS1043 Boards - KERNEL_NAME := Image - KERNEL_SUFFIX := -kernel.itb - KERNEL_INSTALL := 1 - FDT_LOADADDR = 0x90000000 - FILESYSTEMS := ubifs - MKUBIFS_OPTS := -m 1 -e 262016 -c 128 - DEVICE_PACKAGES += \ - layerscape-fman \ - uboot-envtools \ - kmod-i2c-mux-pca954x \ - kmod-hwmon-core \ - kmod-gpio-pca953x kmod-input-gpio-keys-polled \ - kmod-rtc-isl1208 - DEVICE_DESCRIPTION = \ - Build images for Traverse LS1043 boards. This generates a single image \ - capable of booting on any of the boards in this family. - DEVICE_DTS = freescale/traverse-ls1043s - DEVICE_DTS_DIR = $(LINUX_DIR)/arch/arm64/boot/dts - DEVICE_DTS_CONFIG = ls1043s - KERNEL := kernel-bin | gzip | traverse-fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb - IMAGES = root sysupgrade.bin - IMAGE/root = append-rootfs - IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata - MKUBIFS_OPTS := -m 2048 -e 124KiB -c 4096 - SUPPORTED_DEVICES := traverse,ls1043s traverse,ls1043v -endef -TARGET_DEVICES += traverse_ls1043 - define Device/traverse_ten64_mtd DEVICE_VENDOR := Traverse DEVICE_MODEL := Ten64 (NAND boot) diff --git a/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch b/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch deleted file mode 100644 index 110afedefd..0000000000 --- a/target/linux/layerscape/patches-5.15/300-add-DTS-for-Traverse-LS1043-Boards.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 5b35aae22b4ca2400e49561c9267aa01346f91d4 Mon Sep 17 00:00:00 2001 -From: Mathew McBride -Date: Tue, 17 Apr 2018 10:01:03 +1000 -Subject: [PATCH] add DTS for Traverse LS1043 Boards - -Signed-off-by: Mathew McBride -[rebase] -Signed-off-by: Yangbo Lu ---- - arch/arm64/boot/dts/freescale/Makefile | 3 +++ - arch/arm64/boot/dts/freescale/traverse-ls1043s.dts | 29 ++++++++++++++++++++++ - arch/arm64/boot/dts/freescale/traverse-ls1043v.dts | 29 ++++++++++++++++++++++ - 3 files changed, 61 insertions(+) - ---- a/arch/arm64/boot/dts/freescale/Makefile -+++ b/arch/arm64/boot/dts/freescale/Makefile -@@ -31,6 +31,9 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2 - dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb - dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2162a-qds.dtb - -+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043v.dtb -+dtb-$(CONFIG_ARCH_LAYERSCAPE) += traverse-ls1043s.dtb -+ - dtb-$(CONFIG_ARCH_MXC) += imx8mm-beacon-kit.dtb - dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb - dtb-$(CONFIG_ARCH_MXC) += imx8mm-ddr4-evk.dtb From 6a89cfa418ee746a590e7c6d746e7317dd58e830 Mon Sep 17 00:00:00 2001 From: Mathew McBride Date: Tue, 27 Jun 2023 06:37:28 +0000 Subject: [PATCH 14/25] layerscape: base-files: remove redundant RAMFS_COPY_* additions All the tools (e.g fw_setenv, ubiupdatevol) and config (fw_env.config) needed for sysupgrade are already included in /lib/upgrade/stage2 Signed-off-by: Mathew McBride (cherry picked from commit 094c37708ace9040e294c5aa7be34bc9e7a8dcc1) --- target/linux/layerscape/base-files/lib/upgrade/platform.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index 0b5d14b579..8ad9df4a13 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -3,8 +3,8 @@ # Copyright 2020 NXP # -RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo" -RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock" +RAMFS_COPY_BIN="" +RAMFS_COPY_DATA="" REQUIRE_IMAGE_METADATA=1 From 21f0ab503c57d72a49d0e889d384f724b38ea406 Mon Sep 17 00:00:00 2001 From: Mathew McBride Date: Fri, 21 Jul 2023 01:38:30 +0000 Subject: [PATCH 15/25] kernel: move NXP DPAA2 SFP patches to generic patches These are used by both the armsr (EFI boot) and layerscape targets for phylink-controlled SFP support on NXP DPAA2 platforms (LS1088,LS2088,LX2160). This is in place of commit a7bd96c98f8f ("layerscape: add patches for SFP support on DPAA2 platforms") in the main branch. armsr in main started at kernel 6.1 so there is not an equivalent 5.15 commit to cherry pick. Signed-off-by: Mathew McBride --- ...-v5.16-net-dpaa2-mac-add-support-for-more-10G-modes.patch} | 0 .../726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch} | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename target/linux/{armsr/patches-5.15/702-net-dpaa2-mac-add-support-for-more-10G-modes.patch => generic/backport-5.15/792-v5.16-net-dpaa2-mac-add-support-for-more-10G-modes.patch} (100%) rename target/linux/{armsr/patches-5.15/701-dpaa2-eth-do-not-hold-rtnl_lock.patch => generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch} (95%) diff --git a/target/linux/armsr/patches-5.15/702-net-dpaa2-mac-add-support-for-more-10G-modes.patch b/target/linux/generic/backport-5.15/792-v5.16-net-dpaa2-mac-add-support-for-more-10G-modes.patch similarity index 100% rename from target/linux/armsr/patches-5.15/702-net-dpaa2-mac-add-support-for-more-10G-modes.patch rename to target/linux/generic/backport-5.15/792-v5.16-net-dpaa2-mac-add-support-for-more-10G-modes.patch diff --git a/target/linux/armsr/patches-5.15/701-dpaa2-eth-do-not-hold-rtnl_lock.patch b/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch similarity index 95% rename from target/linux/armsr/patches-5.15/701-dpaa2-eth-do-not-hold-rtnl_lock.patch rename to target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch index 447266fa14..c7d16e5c4c 100644 --- a/target/linux/armsr/patches-5.15/701-dpaa2-eth-do-not-hold-rtnl_lock.patch +++ b/target/linux/generic/hack-5.15/726-net-eth-dpaa2-eth-do-not-hold-rtnl_lock.patch @@ -52,7 +52,7 @@ Signed-off-by: Russell King dpaa2_eth_dl_traps_unregister(priv); --- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c +++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c -@@ -351,7 +351,9 @@ int dpaa2_mac_connect(struct dpaa2_mac * +@@ -357,7 +357,9 @@ int dpaa2_mac_connect(struct dpaa2_mac * if (mac->pcs) phylink_set_pcs(mac->phylink, &mac->pcs->pcs); @@ -62,7 +62,7 @@ Signed-off-by: Russell King if (err) { netdev_err(net_dev, "phylink_fwnode_phy_connect() = %d\n", err); goto err_phylink_destroy; -@@ -372,7 +374,9 @@ void dpaa2_mac_disconnect(struct dpaa2_m +@@ -378,7 +380,9 @@ void dpaa2_mac_disconnect(struct dpaa2_m if (!mac->phylink) return; From 23953cfa5afa2e8cd9e1c1475d065cb954d8ceb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kwiatek?= Date: Wed, 12 Jul 2023 21:39:39 +0200 Subject: [PATCH 16/25] ath11k-firmware: update to stable WLAN.HK.2.9.0.1-01837 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changelog from quic: Bug fixes, stability improvements from previous releases are present. There are no backward comatibility issues with this release. Tested-by: Michał Kwiatek # Xiaomi AX3600 Signed-off-by: Michał Kwiatek [ improve commit description ] Signed-off-by: Christian Marangi (cherry picked from commit 1c56801dd2e696cac7da45912b5e3ea1165549d5) --- package/firmware/ath11k-firmware/Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/firmware/ath11k-firmware/Makefile b/package/firmware/ath11k-firmware/Makefile index fc7968a957..7acc233b6f 100644 --- a/package/firmware/ath11k-firmware/Makefile +++ b/package/firmware/ath11k-firmware/Makefile @@ -8,9 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ath11k-firmware -PKG_SOURCE_DATE:=2023-03-31 -PKG_SOURCE_VERSION:=a039049a9349722fa5c74185452ab04644a0d351 -PKG_MIRROR_HASH:=ed401e3f6e91d70565b3396139193f7e815f410db93700697205ac8ed1b828c5 +PKG_SOURCE_DATE:=2023-07-06 +PKG_SOURCE_VERSION:=69f6b7346b64784188dba791a9cfb614eefa441f +PKG_MIRROR_HASH:=0f0203f755cb6713f6a1f41397dcd0f1a24e5cdbe75258af961343b927ebb3e9 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git @@ -60,14 +60,14 @@ $(eval $(call Download,qcn9074-board)) define Package/ath11k-firmware-ipq8074/install $(INSTALL_DIR) $(1)/lib/firmware/IPQ8074 $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/ath11k-firmware/IPQ8074/hw2.0/testing/2.9.0.1/WLAN.HK.2.9.0.1-01385-QCAHKSWPL_SILICONZ-1/* \ + $(PKG_BUILD_DIR)/ath11k-firmware/IPQ8074/hw2.0/2.9.0.1/WLAN.HK.2.9.0.1-01837-QCAHKSWPL_SILICONZ-1/* \ $(1)/lib/firmware/IPQ8074/ endef define Package/ath11k-firmware-qcn9074/install $(INSTALL_DIR) $(1)/lib/firmware/ath11k/QCN9074/hw1.0 $(INSTALL_DATA) \ - $(PKG_BUILD_DIR)/ath11k-firmware/QCN9074/hw1.0/testing/2.9.0.1/WLAN.HK.2.9.0.1-01385-QCAHKSWPL_SILICONZ-1/* \ + $(PKG_BUILD_DIR)/ath11k-firmware/QCN9074/hw1.0/2.9.0.1/WLAN.HK.2.9.0.1-01837-QCAHKSWPL_SILICONZ-1/* \ $(1)/lib/firmware/ath11k/QCN9074/hw1.0/ $(INSTALL_BIN) \ $(DL_DIR)/$(QCN9074_BOARD_FILE) $(1)/lib/firmware/ath11k/QCN9074/hw1.0/board-2.bin From ee910d1e67c5ebba3bc2c136c8c6b5358a8c17b5 Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Mon, 10 Jul 2023 07:56:05 +0200 Subject: [PATCH 17/25] dropbear: add ed25519 for failsafe key At least Fedora and RHEL 9 set RSAMinSize=2048, so when trying to use failsafe, we get 'Bad server host key: Invalid key length' To workaround the issue, we can use: ssh -o RSAMinSize=1024 ... Generating 2048 bits RSA is extremely slow, so add ed25519. We keep RSA 1024 to be as compatible as possible. Signed-off-by: Etienne Champetier (cherry picked from commit 6ac61dead99ff6b9df00c29b7a858772449718b2) --- package/network/services/dropbear/files/dropbear.failsafe | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/network/services/dropbear/files/dropbear.failsafe b/package/network/services/dropbear/files/dropbear.failsafe index a98ede459a..97bd12d58a 100755 --- a/package/network/services/dropbear/files/dropbear.failsafe +++ b/package/network/services/dropbear/files/dropbear.failsafe @@ -1,8 +1,9 @@ #!/bin/sh failsafe_dropbear () { - dropbearkey -t rsa -s 1024 -f /tmp/dropbear_failsafe_host_key - dropbear -r /tmp/dropbear_failsafe_host_key <> /dev/null 2>&1 + dropbearkey -t rsa -s 1024 -f /tmp/dropbear_rsa_failsafe_host_key + dropbearkey -t ed25519 -f /tmp/dropbear_ed25519_failsafe_host_key + dropbear -r /tmp/dropbear_rsa_failsafe_host_key -r /tmp/dropbear_ed25519_failsafe_host_key <> /dev/null 2>&1 } boot_hook_add failsafe failsafe_dropbear From 1face854a2fd8c79fc568877068cf9c608a6360e Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 6 May 2023 16:51:18 +0200 Subject: [PATCH 18/25] ipq40xx: move Teltonika RUT STM32 IO to specific DTS Prepare to re-use the DTS for the RUTX50. Signed-off-by: David Bauer (cherry picked from commit dbc4be142e206e681ac53afa3fd1e4018e7843b7) --- .../arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi | 37 ------------------- .../arch/arm/boot/dts/qcom-ipq4018-rutx10.dts | 37 +++++++++++++++++++ 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi index 230b62a94e..df9425b12a 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi @@ -44,43 +44,6 @@ linux,code = ; }; }; - - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - gpio_out { - gpio-export,name = "gpio_out"; - gpio-export,output = <0>; - gpio-export,direction_may_change = <0>; - gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>; - }; - - gpio_in { - gpio-export,name = "gpio_in"; - gpio-export,input = <0>; - gpio-export,direction_may_change = <0>; - gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>; - }; - }; - }; -}; - -&blsp1_i2c3 { - status = "okay"; - pinctrl-0 = <&i2c_0_pins>; - pinctrl-names = "default"; - clock-frequency = <400000>; - - stm32_io: stm32@74 { - compatible = "tlt,stm32v1"; - #gpio-cells = <2>; - #interrupt-cells = <2>; - gpio-controller; - interrupt-controller; - interrupt-parent = <&tlmm>; - interrupts = <5 2>; - reg = <0x74>; }; }; diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts index 31d14aa6ae..8fc976a11b 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts @@ -22,6 +22,43 @@ linux,default-trigger = "phy1tpt"; }; }; + + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_out { + gpio-export,name = "gpio_out"; + gpio-export,output = <0>; + gpio-export,direction_may_change = <0>; + gpios = <&stm32_io 23 GPIO_ACTIVE_HIGH>; + }; + + gpio_in { + gpio-export,name = "gpio_in"; + gpio-export,input = <0>; + gpio-export,direction_may_change = <0>; + gpios = <&stm32_io 24 GPIO_ACTIVE_LOW>; + }; + }; + }; +}; + +&blsp1_i2c3 { + status = "okay"; + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + clock-frequency = <400000>; + + stm32_io: stm32@74 { + compatible = "tlt,stm32v1"; + #gpio-cells = <2>; + #interrupt-cells = <2>; + gpio-controller; + interrupt-controller; + interrupt-parent = <&tlmm>; + interrupts = <5 2>; + reg = <0x74>; }; }; From 897d55bcdf864f4d40cf50396b963ca240bbc1fc Mon Sep 17 00:00:00 2001 From: David Bauer Date: Sat, 6 May 2023 16:57:18 +0200 Subject: [PATCH 19/25] ipq40xx: add support for Teltonika RUTX50 Hardware -------- CPU: Qualcomm IPQ4018 RAM: 256M Flash: 16MB SPI-NOR (W25Q128) 128MB SPI-NAND (XTX) WiFi: 2T2R (2GHz 802.11n ; 5 GHz 802.11ac) ETH: 4x LAN ; 1x WAN (Gigabit) CELL: Quectel RG501Q 3G/4G/5G UART: Available on the goldfinger connector (Pinout silkscreened) 115200 8N1 3V3 - Only connect RX / TX / GND Installation ------------ 1. Enable SSH in the Teltonika UI (System --> Administration --> Access Control) 2. Check from which partition set the device is currently running from. $ cat /proc/boot_info/rootfs/primaryboot In case this output reads 0, install a Software update from Teltonika first. After upgrade completion, check this file now reads 1 before continuing. 2. Transfer the OpenWrt factory image to the device using scp. Use the same password (user root!) as used for the Web-UI. $ scp -O openwrt-factory.bin root@192.168.1.1:/tmp 3. Connect to the device using ssh as the root user. 4. Install OpenWrt by writing the factory image to flash. $ ubiformat /dev/mtd16 -y -f /tmp/openwrt-factory.bin 5. Instruct the bootloaer to boot from the first partition set. $ echo 0 > /proc/boot_info/rootfs/primaryboot $ cat /proc/boot_info/getbinary_bootconfig > /tmp/bootconfig.bin $ cat /proc/boot_info/getbinary_bootconfig1 > /tmp/bootconfig1.bin $ mtd write /tmp/bootconfig.bin /dev/mtd2 $ mtd write /tmp/bootconfig1.bin /dev/mtd3 6. Reboot the device. $ reboot Signed-off-by: David Bauer (cherry picked from commit 844bb4bfad84cc6267f9b138d1f63b07ed3b77d0) --- .../ipq40xx/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 6 +- .../base-files/lib/upgrade/platform.sh | 1 + .../arch/arm/boot/dts/qcom-ipq4018-rutx50.dts | 181 ++++++++++++++++++ target/linux/ipq40xx/image/generic.mk | 16 ++ 5 files changed, 203 insertions(+), 2 deletions(-) create mode 100644 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts 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 1a74fb792c..c297566dd8 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -24,6 +24,7 @@ ipq40xx_setup_interfaces() p2w,r619ac-64m|\ p2w,r619ac-128m|\ pakedge,wr-1|\ + teltonika,rutx50|\ zyxel,nbg6617) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; 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 7f41bdcfcc..c8cf297e81 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 @@ -131,7 +131,8 @@ case "$FIRMWARE" in caldata_extract "0:ART" 0x1000 0x2f20 ath10k_patch_mac $(macaddr_add $(get_mac_label) 2) ;; - teltonika,rutx10) + teltonika,rutx10|\ + teltonika,rutx50) caldata_extract "0:ART" 0x1000 0x2f20 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 2) ;; @@ -227,7 +228,8 @@ case "$FIRMWARE" in caldata_extract "0:ART" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(get_mac_label) 4) ;; - teltonika,rutx10) + teltonika,rutx10|\ + teltonika,rutx50) caldata_extract "0:ART" 0x5000 0x2f20 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary "0:CONFIG" 0x0) 3) ;; diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh index e6e99b9d21..8807f844e5 100644 --- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh @@ -207,6 +207,7 @@ platform_do_upgrade() { sony_emmc_do_upgrade "$1" ;; teltonika,rutx10 |\ + teltonika,rutx50 |\ zte,mf18a |\ zte,mf286d |\ zte,mf287plus |\ diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts new file mode 100644 index 0000000000..ea2102f7d6 --- /dev/null +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts @@ -0,0 +1,181 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qcom-ipq4018-rutx.dtsi" + +/ { + model = "Teltonika RUTX50"; + compatible = "teltonika,rutx50"; + + aliases { + led-boot = &led_rssi0; + led-failsafe = &led_rssi0; + led-running = &led_rssi0; + led-upgrade = &led_rssi0; + label-mac-device = &gmac; + }; + + soc { + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + gpio_modem_reset { + gpio-export,name = "modem_reset"; + gpio-export,output = <0>; + gpios = <&shift_io 8 GPIO_ACTIVE_HIGH>; + }; + + gpio_modem_power { + gpio-export,name = "modem_power"; + gpio-export,output = <0>; + gpios = <&shift_io 9 GPIO_ACTIVE_HIGH>; + }; + + gpio_out_1 { + gpio-export,name = "sim-select"; + /* 0 = SIM1 ; 1 = SIM2 */ + gpio-export,output = <0>; + gpios = <&shift_io 10 GPIO_ACTIVE_HIGH>; + }; + + gpio_in_1 { + gpio-export,name = "sim-detect"; + gpio-export,input = <0>; + gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led-0 { + label = "green:sim1"; + gpios = <&shift_io 14 GPIO_ACTIVE_HIGH>; + }; + + led-1 { + label = "green:sim2"; + gpios = <&shift_io 15 GPIO_ACTIVE_HIGH>; + }; + + led-2 { + label = "green:eth"; + gpios = <&shift_io 6 GPIO_ACTIVE_HIGH>; + }; + + led-3 { + label = "green:wifi"; + gpios = <&shift_io 7 GPIO_ACTIVE_HIGH>; + }; + + led-4 { + label = "green:3g"; + gpios = <&shift_io 5 GPIO_ACTIVE_HIGH>; + }; + + led-5 { + label = "green:4g"; + gpios = <&shift_io 4 GPIO_ACTIVE_HIGH>; + }; + + led-6 { + label = "green:5g"; + gpios = <&shift_io 3 GPIO_ACTIVE_HIGH>; + }; + + led_rssi0: led-7 { + label = "green:rssi0"; + gpios = <&shift_io 0 GPIO_ACTIVE_HIGH>; + }; + + led-8 { + label = "green:rssi1"; + gpios = <&shift_io 1 GPIO_ACTIVE_HIGH>; + }; + + led-9 { + label = "green:rssi2"; + gpios = <&shift_io 2 GPIO_ACTIVE_HIGH>; + }; + + led-10 { + label = "green:wifi2g"; + gpios = <&shift_io 12 GPIO_ACTIVE_HIGH>; + }; + + led-11 { + label = "green:wifi5g"; + gpios = <&shift_io 13 GPIO_ACTIVE_HIGH>; + }; + }; + + spi-gpio { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + gpio-sck = <&tlmm 1 GPIO_ACTIVE_HIGH>; + gpio-mosi = <&tlmm 3 GPIO_ACTIVE_HIGH>; + cs-gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>; + num-chipselects = <1>; + + shift_io: shift_io@0 { + compatible = "fairchild,74hc595"; + reg = <0>; + gpio-controller; + #gpio-cells = <2>; + /* Attn: This is specific to RUTX50 in Teltonika GPL */ + registers-number = <2>; + spi-max-frequency = <10000000>; + }; + }; + }; +}; + +&wifi0 { + status = "okay"; + qcom,ath10k-calibration-variant = "Teltonika-RUTX10"; +}; + +&wifi1 { + status = "okay"; + qcom,ath10k-calibration-variant = "Teltonika-RUTX10"; +}; + +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport1 { + status = "okay"; + + label = "lan1"; +}; + +&swport2 { + status = "okay"; + + label = "lan2"; +}; + +&swport3 { + status = "okay"; + + label = "lan3"; +}; + +&swport4 { + status = "okay"; + + label = "lan4"; +}; + +&swport5 { + status = "okay"; + + label = "wan"; +}; diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index f15463ae8c..a9dd2aa091 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -1076,6 +1076,22 @@ endef # Missing DSA Setup #TARGET_DEVICES += teltonika_rutx10 +define Device/teltonika_rutx50 + $(call Device/FitImage) + $(call Device/UbiFit) + DEVICE_VENDOR := Teltonika + DEVICE_MODEL := RUTX50 + SOC := qcom-ipq4018 + DEVICE_DTS_CONFIG := config@5 + KERNEL_INSTALL := 1 + BLOCKSIZE := 128k + PAGESIZE := 2048 + FILESYSTEMS := squashfs + IMAGE/factory.ubi := append-ubi + DEVICE_PACKAGES := ipq-wifi-teltonika_rutx kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi +endef +TARGET_DEVICES += teltonika_rutx50 + define Device/tel_x1pro $(call Device/FitImage) DEVICE_VENDOR := Telco From 5ded0a3975f8757f23d542dae370bca59e4b4525 Mon Sep 17 00:00:00 2001 From: David Bauer Date: Fri, 9 Jun 2023 14:12:47 +0200 Subject: [PATCH 20/25] scripts: use sep-char for hash nodes U-Boot with enabled secure-boot will not boot images with the @-character used for hash node-names. Use the existing separation character configurable for each device. Signed-off-by: David Bauer (cherry picked from commit 2b133ab19cd5d741f3191f917c607667943f5f58) --- scripts/mkits.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/mkits.sh b/scripts/mkits.sh index bd6cddabf4..46ab5ee023 100755 --- a/scripts/mkits.sh +++ b/scripts/mkits.sh @@ -103,10 +103,10 @@ if [ -n "${DTB}" ]; then ${DTADDR:+load = <${DTADDR}>;} arch = \"${ARCH}\"; compression = \"none\"; - hash@1 { + hash${REFERENCE_CHAR}1 { algo = \"crc32\"; }; - hash@2 { + hash${REFERENCE_CHAR}2 { algo = \"${HASH}\"; }; }; @@ -123,10 +123,10 @@ if [ -n "${INITRD}" ]; then type = \"ramdisk\"; arch = \"${ARCH}\"; os = \"linux\"; - hash@1 { + hash${REFERENCE_CHAR}1 { algo = \"crc32\"; }; - hash@2 { + hash${REFERENCE_CHAR}2 { algo = \"${HASH}\"; }; }; @@ -145,10 +145,10 @@ if [ -n "${ROOTFS}" ]; then type = \"filesystem\"; arch = \"${ARCH}\"; compression = \"none\"; - hash@1 { + hash${REFERENCE_CHAR}1 { algo = \"crc32\"; }; - hash@2 { + hash${REFERENCE_CHAR}2 { algo = \"${HASH}\"; }; }; @@ -174,10 +174,10 @@ OVCONFIGS="" type = \"flat_dt\"; arch = \"${ARCH}\"; compression = \"none\"; - hash@1 { + hash${REFERENCE_CHAR}1 { algo = \"crc32\"; }; - hash@2 { + hash${REFERENCE_CHAR}2 { algo = \"${HASH}\"; }; }; @@ -209,10 +209,10 @@ DATA="/dts-v1/; compression = \"${COMPRESS}\"; load = <${LOAD_ADDR}>; entry = <${ENTRY_ADDR}>; - hash@1 { + hash${REFERENCE_CHAR}1 { algo = \"crc32\"; }; - hash@2 { + hash${REFERENCE_CHAR}2 { algo = \"$HASH\"; }; }; From 77b8ce64fa77ae6d79e9374658e114a4b1709a97 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 27 Jul 2023 11:27:46 +0200 Subject: [PATCH 21/25] libnl-tiny: update to latest Git HEAD 8667347 build: allow passing SOVERSION value for dynamic library Also adjust packaging of the library to only ship the SOVERSION suffixed library object, to allow for concurrent installation of ABI-incompible versions in the future. Fixes: #13082 Signed-off-by: Jo-Philipp Wich (cherry picked from commit 4af0a72a65d7c92ed4e7c2455090f695f424903d) --- package/libs/libnl-tiny/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile index 048c3e7939..4bdd7c1c39 100644 --- a/package/libs/libnl-tiny/Makefile +++ b/package/libs/libnl-tiny/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git -PKG_SOURCE_DATE:=2023-07-01 -PKG_SOURCE_VERSION:=d433990c00e804593f253cc709b8fe901492b530 -PKG_MIRROR_HASH:=fffb2782c7ed2ebabc7d57e5513f52ac53d1828014bc9a8ea131f50eab093086 +PKG_SOURCE_DATE:=2023-07-27 +PKG_SOURCE_VERSION:=bc92a280186f9becc53c0f17e4e43cfbdeec7e7b +PKG_MIRROR_HASH:=57c5ac75fdb4413e98e525bee7de419fc6cce5f23389581dafd9ffe22321224d CMAKE_INSTALL:=1 PKG_LICENSE:=LGPL-2.1 @@ -27,7 +27,7 @@ define Package/libnl-tiny SECTION:=libs CATEGORY:=Libraries TITLE:=netlink socket library - ABI_VERSION:=$(PKG_SOURCE_DATE) + ABI_VERSION:=1 endef define Package/libnl-tiny/description @@ -37,13 +37,13 @@ endef define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib/pkgconfig $(1)/usr/include/libnl-tiny $(CP) $(PKG_INSTALL_DIR)/usr/include/libnl-tiny/* $(1)/usr/include/libnl-tiny - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so* $(1)/usr/lib/ $(INSTALL_DATA) $(PKG_BUILD_DIR)/libnl-tiny.pc $(1)/usr/lib/pkgconfig endef define Package/libnl-tiny/install $(INSTALL_DIR) $(1)/usr/lib - $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnl-tiny.so.* $(1)/usr/lib/ endef $(eval $(call BuildPackage,libnl-tiny)) From 680a4c7e12381309e21f13b04e0114a4b25c85bc Mon Sep 17 00:00:00 2001 From: Alexander Friese Date: Wed, 12 Jul 2023 16:46:01 +0200 Subject: [PATCH 22/25] ipq4019: fix support for AVM FRITZ!Repeater 3000 new versions of the device have NAND with 8bit ECC which was not yet supported before. This change removes ECC restrictions. Signed-off-by: Alexander Friese (cherry picked from commit 6b11f0ec83ceb9747dcbb0ffca0882b90da46b59) --- .../arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts | 3 +++ 1 file changed, 3 insertions(+) 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 8d88bc1521..41dec72542 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 @@ -121,6 +121,9 @@ status = "okay"; nand@0 { + /delete-property/ nand-ecc-strength; + /delete-property/ nand-ecc-step-size; + partitions { compatible = "fixed-partitions"; #address-cells = <1>; From 3bac348387b6aab8a906c752980b853fb9d85df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sun, 23 Jul 2023 22:41:18 +0200 Subject: [PATCH 23/25] bcm53xx: add BCM53573 Ethernet fix sent upstream for v6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that DSA-based b53 driver never worked with BCM53573 SoCs and BCM53125. In case of swconfig-based b53 this fixes a regression. Switching bgmac from using mdiobus_register() to of_mdiobus_register() resulted in MDIO device (BCM53125) having of_node set (see of_mdiobus_register_phy()). That made downstream b53 driver read invalid data from DT and broke Ethernet support. Signed-off-by: Rafał Miłecki (cherry picked from commit 79fd3e62b4910731c13692b2daa2083e0f95c023) --- ...M53573-Fix-Tenda-AC9-switch-CPU-port.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch diff --git a/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch new file mode 100644 index 0000000000..7a35dcad81 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -0,0 +1,28 @@ +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 19:48:13 +0200 +Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Primary Ethernet interface is connected to the port 8 (not 5). + +Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") +Signed-off-by: Rafał Miłecki +--- + arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -135,8 +135,8 @@ + label = "lan4"; + }; + +- port@5 { +- reg = <5>; ++ port@8 { ++ reg = <8>; + label = "cpu"; + ethernet = <&gmac0>; + }; From e0c4da1ff0c00f2c4d78025523c38ea6395175d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Sat, 29 Jul 2023 17:02:28 +0200 Subject: [PATCH 24/25] bcm53xx: backport more DT changes queued for v6.6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those sort out BCM53573 Ethernet info finally. Signed-off-by: Rafał Miłecki (cherry picked from commit ca8868a51127f6081a524d47eab937b90af0bf05) --- ...Fix-Ethernet-info-for-Luxul-devices.patch} | 5 +- ...M-dts-bcm5301x-Add-SEAMA-compatibles.patch | 36 +++++++ ...53573-Fix-Tenda-AC9-switch-CPU-port.patch} | 7 +- ...-Describe-BCM53125-switch-ports-in-t.patch | 97 +++++++++++++++++++ ...-BCM53573-Add-BCM53125-switch-port-5.patch | 36 +++++++ ...M53573-Add-Ethernet-interfaces-links.patch | 73 ++++++++++++++ ...-Disable-second-Ethernet-on-Luxul-de.patch | 39 ++++++++ ...-BCM5301X-Describe-partition-formats.patch | 25 ----- 8 files changed, 290 insertions(+), 28 deletions(-) rename target/linux/bcm53xx/patches-5.15/{130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch => 037-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch} (88%) create mode 100644 target/linux/bcm53xx/patches-5.15/037-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch rename target/linux/bcm53xx/patches-5.15/{131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch => 037-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch} (69%) create mode 100644 target/linux/bcm53xx/patches-5.15/037-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch create mode 100644 target/linux/bcm53xx/patches-5.15/037-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch create mode 100644 target/linux/bcm53xx/patches-5.15/037-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch create mode 100644 target/linux/bcm53xx/patches-5.15/037-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch delete mode 100644 target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch diff --git a/target/linux/bcm53xx/patches-5.15/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch similarity index 88% rename from target/linux/bcm53xx/patches-5.15/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch rename to target/linux/bcm53xx/patches-5.15/037-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch index 381a8c3894..07dd9296b6 100644 --- a/target/linux/bcm53xx/patches-5.15/130-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0009-ARM-dts-BCM53573-Fix-Ethernet-info-for-Luxul-devices.patch @@ -1,5 +1,6 @@ +From 44ad8207806973f4e4f7d870fff36cc01f494250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 13 Jul 2023 13:05:44 +0200 +Date: Thu, 13 Jul 2023 13:11:45 +0200 Subject: [PATCH] ARM: dts: BCM53573: Fix Ethernet info for Luxul devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -27,6 +28,8 @@ to work properly. Fixes: 9fb90ae6cae7 ("ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch") Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230713111145.14864-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli --- .../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 13 +++++++++++++ .../boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 13 +++++++++++++ diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch new file mode 100644 index 0000000000..f23873e111 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0010-ARM-dts-bcm5301x-Add-SEAMA-compatibles.patch @@ -0,0 +1,36 @@ +From 72ec77d74d28be7359ef77971cdee38b60af9e49 Mon Sep 17 00:00:00 2001 +From: Linus Walleij +Date: Thu, 13 Jul 2023 00:16:42 +0200 +Subject: [PATCH] ARM: dts: bcm5301x: Add SEAMA compatibles + +This adds SEAMA compatibles to the firmware partition of these +two D-Link devices. + +Signed-off-by: Linus Walleij +Link: https://lore.kernel.org/r/20230713-seama-partitions-v4-2-69e577453d40@linaro.org +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-885l.dts | 1 + + arch/arm/boot/dts/broadcom/bcm47094-dlink-dir-890l.dts | 1 + + 2 files changed, 2 insertions(+) + +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts +@@ -33,6 +33,7 @@ + #size-cells = <1>; + + partition@0 { ++ compatible = "seama"; + label = "firmware"; + reg = <0x00000000 0x08000000>; + }; +--- a/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts ++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-890l.dts +@@ -149,6 +149,7 @@ + * partitions: this device uses SEAMA. + */ + firmware@0 { ++ compatible = "seama"; + label = "firmware"; + reg = <0x00000000 0x08000000>; + }; diff --git a/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch similarity index 69% rename from target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch rename to target/linux/bcm53xx/patches-5.15/037-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch index 7a35dcad81..d5cb817e8e 100644 --- a/target/linux/bcm53xx/patches-5.15/131-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch @@ -1,6 +1,7 @@ +From 7141209db9c335ab261a17933809a3e660ebdc12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Sun, 23 Jul 2023 19:48:13 +0200 -Subject: [PATCH 1/3] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port +Date: Sun, 23 Jul 2023 21:54:14 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Fix Tenda AC9 switch CPU port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -9,6 +10,8 @@ Primary Ethernet interface is connected to the port 8 (not 5). Fixes: 64612828628c ("ARM: dts: BCM53573: Add Tenda AC9 switch ports") Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli --- arch/arm/boot/dts/broadcom/bcm47189-tenda-ac9.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch new file mode 100644 index 0000000000..ab27495078 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0012-ARM-dts-BCM53573-Describe-BCM53125-switch-ports-in-t.patch @@ -0,0 +1,97 @@ +From 8d6b61ecad2f1c939813c5c4517d53e04672dc48 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 21:54:15 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Describe BCM53125 switch ports in the + main DTS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM53125 always has 5 ports with GPHYs (for LAN/WAN ports) and 2 IMP +ports. It seems the best place to describe that in the main .dtsi. +Device specific bits can go to device .dts files. This will help +avoiding some code duplication. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-2-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm47189-tenda-ac9.dts | 7 ----- + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 26 ++++++++++++++++++- + 2 files changed, 25 insertions(+), 8 deletions(-) + +--- a/arch/arm/boot/dts/bcm47189-tenda-ac9.dts ++++ b/arch/arm/boot/dts/bcm47189-tenda-ac9.dts +@@ -111,34 +111,27 @@ + + ports { + port@0 { +- reg = <0>; + label = "wan"; + }; + + port@1 { +- reg = <1>; + label = "lan1"; + }; + + port@2 { +- reg = <2>; + label = "lan2"; + }; + + port@3 { +- reg = <3>; + label = "lan3"; + }; + + port@4 { +- reg = <4>; + label = "lan4"; + }; + + port@8 { +- reg = <8>; + label = "cpu"; +- ethernet = <&gmac0>; + }; + }; + }; +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -192,10 +192,34 @@ + + status = "disabled"; + +- /* ports are defined in board DTS */ + ports { + #address-cells = <1>; + #size-cells = <0>; ++ ++ port@0 { ++ reg = <0>; ++ }; ++ ++ port@1 { ++ reg = <1>; ++ }; ++ ++ port@2 { ++ reg = <2>; ++ }; ++ ++ port@3 { ++ reg = <3>; ++ }; ++ ++ port@4 { ++ reg = <4>; ++ }; ++ ++ port@8 { ++ reg = <8>; ++ ethernet = <&gmac0>; ++ }; + }; + }; + }; diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch new file mode 100644 index 0000000000..cc9e86ac75 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0013-ARM-dts-BCM53573-Add-BCM53125-switch-port-5.patch @@ -0,0 +1,36 @@ +From d95b1caeea194962220db1778ce7fe71cdba788b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Sun, 23 Jul 2023 21:54:16 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Add BCM53125 switch port 5 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's connected to the extra Ethernet interface. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230723195416.7831-3-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -216,6 +216,16 @@ + reg = <4>; + }; + ++ port@5 { ++ reg = <5>; ++ ethernet = <&gmac1>; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; ++ + port@8 { + reg = <8>; + ethernet = <&gmac0>; diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch new file mode 100644 index 0000000000..f97d4edd75 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0014-ARM-dts-BCM53573-Add-Ethernet-interfaces-links.patch @@ -0,0 +1,73 @@ +From e0ae343a2c1b782a346d9b844ea65e1d49c428b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jul 2023 12:12:27 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Add Ethernet interfaces links +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +BCM53573 has 2 Ethernet interfaces each connected to one of switch ports +in the default design. They both use fixed links. + +An exception are Luxul XAP devices that have switch replaced by a single +PHY. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230724101227.5420-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + .../boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 2 ++ + .../arm/boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 2 ++ + arch/arm/boot/dts/broadcom/bcm53573.dtsi | 12 ++++++++++++ + 3 files changed, 16 insertions(+) + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -50,6 +50,8 @@ + phy-mode = "rgmii"; + phy-handle = <&bcm54210e>; + ++ /delete-node/ fixed-link; ++ + mdio { + /delete-node/ switch@1e; + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -86,6 +86,8 @@ + phy-mode = "rgmii"; + phy-handle = <&bcm54210e>; + ++ /delete-node/ fixed-link; ++ + mdio { + /delete-node/ switch@1e; + +--- a/arch/arm/boot/dts/bcm53573.dtsi ++++ b/arch/arm/boot/dts/bcm53573.dtsi +@@ -181,6 +181,12 @@ + + gmac0: ethernet@5000 { + reg = <0x5000 0x1000>; ++ phy-mode = "internal"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + + mdio { + #address-cells = <1>; +@@ -237,6 +243,12 @@ + + gmac1: ethernet@b000 { + reg = <0xb000 0x1000>; ++ phy-mode = "internal"; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; + }; + + pmu@12000 { diff --git a/target/linux/bcm53xx/patches-5.15/037-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch b/target/linux/bcm53xx/patches-5.15/037-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch new file mode 100644 index 0000000000..166f602452 --- /dev/null +++ b/target/linux/bcm53xx/patches-5.15/037-v6.6-0015-ARM-dts-BCM53573-Disable-second-Ethernet-on-Luxul-de.patch @@ -0,0 +1,39 @@ +From d8835601e3c306fda78f8736f1aef688e99e892d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Mon, 24 Jul 2023 12:11:59 +0200 +Subject: [PATCH] ARM: dts: BCM53573: Disable second Ethernet on Luxul devices +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +XAP-810 and XAP-1440 both have a single Ethernet port and BCM54210E PHY. +Their second Ethernet interface is not connected to anything. + +Signed-off-by: Rafał Miłecki +Link: https://lore.kernel.org/r/20230724101159.5289-1-zajec5@gmail.com +Signed-off-by: Florian Fainelli +--- + arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-1440.dts | 4 ++++ + arch/arm/boot/dts/broadcom/bcm47189-luxul-xap-810.dts | 4 ++++ + 2 files changed, 8 insertions(+) + +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts +@@ -60,3 +60,7 @@ + }; + }; + }; ++ ++&gmac1 { ++ status = "disabled"; ++}; +--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts ++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts +@@ -96,3 +96,7 @@ + }; + }; + }; ++ ++&gmac1 { ++ status = "disabled"; ++}; diff --git a/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch b/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch deleted file mode 100644 index f2861177dd..0000000000 --- a/target/linux/bcm53xx/patches-5.15/321-ARM-dts-BCM5301X-Describe-partition-formats.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Thu, 22 Nov 2018 09:21:49 +0100 -Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It's needed by OpenWrt for custom partitioning. - -Signed-off-by: Rafał Miłecki ---- - arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 + - 1 file changed, 1 insertion(+) - ---- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -+++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts -@@ -35,6 +35,7 @@ - partition@0 { - label = "firmware"; - reg = <0x00000000 0x08000000>; -+ compatible = "seama"; - }; - }; - }; From 017827e2057a1f3ec27ea92d89cb0b86a9f893d1 Mon Sep 17 00:00:00 2001 From: Oli Ze Date: Thu, 27 Jul 2023 07:23:12 +0200 Subject: [PATCH 25/25] uboot-mvebu: update to version 2023.07.02 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since 2021.07 multiple bugs were introduced that made it impossible to create a bootable target for mvebu. Those issues should be now fixed since 2023.07-rc1. References: #11661 Signed-off-by: Oli Ze Reviewed-by: Robert Marko Tested-by: Andre Heider # espressobin-v3-v5-1gb-2cs Signed-off-by: Petr Štetiar [facelift] (cherry picked from commit ba7d6dddc7d20222c1703b173ef50befefb3fb52) --- package/boot/uboot-mvebu/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index e3f1582f23..e6120959f6 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2023.01 +PKG_VERSION:=2023.07.02 PKG_RELEASE:=1 -PKG_HASH:=69423bad380f89a0916636e89e6dcbd2e4512d584308d922d1039d1e4331950f +PKG_HASH:=6b6a48581c14abb0f95bd87c1af4d740922406d7b801002a9f94727fdde021d5 include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk