From 86e3016896f43fdcd1ee34a8aafe92b2dab9367e Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 18 Jan 2024 16:25:34 +0100 Subject: [PATCH 01/22] busybox: enable sha hash for /etc/shadow It appears `md5` is no longer state of the art. Let's switch it to something slightly newer to increase security. Suggested-by: abnoeh Signed-off-by: Paul Spooren --- package/utils/busybox/Config-defaults.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index b3c3f9a0b2..5ae8dd5622 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1333,7 +1333,7 @@ config BUSYBOX_DEFAULT_USE_BB_CRYPT default n config BUSYBOX_DEFAULT_USE_BB_CRYPT_SHA bool - default n + default y config BUSYBOX_DEFAULT_ADD_SHELL bool default n From 10180295b817abb3efdc9db3fb4bb62d585fad7a Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Fri, 19 Jan 2024 11:49:27 +0100 Subject: [PATCH 02/22] busybox: switch to sha256 for passwd Right now sha256 is considered more secure than md5, use it to harden against password decryption. Signed-off-by: Paul Spooren --- package/utils/busybox/Config-defaults.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index 5ae8dd5622..515bea3d1d 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -1366,7 +1366,7 @@ config BUSYBOX_DEFAULT_CHPASSWD default n config BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO string - default "md5" + default "sha256" config BUSYBOX_DEFAULT_CRYPTPW bool default n From f1a447bdb5f25a61402f513e68a216a1ae8c7c97 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sat, 20 Jan 2024 00:08:42 +0100 Subject: [PATCH 03/22] uboot-bcm53xx: bump to 2024.01 Bump the U-Boot version used for BCM53xx to the 2024.01 version that includes all the needed patches upstream, so we can get rid of those in the process. Signed-off-by: Linus Walleij --- package/boot/uboot-bcm53xx/Makefile | 4 +- ...0001-nand-brcmnand-add-iproc-support.patch | 199 ------ ...nand_base-Handle-algorithm-selection.patch | 80 --- ...t-device-tree-for-Broadcom-Northstar.patch | 659 ------------------ ...port-for-the-Broadcom-Northstar-SoCs.patch | 66 -- ...ard-Add-new-Broadcom-Northstar-board.patch | 372 ---------- 6 files changed, 2 insertions(+), 1378 deletions(-) delete mode 100644 package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch delete mode 100644 package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch delete mode 100644 package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch delete mode 100644 package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch delete mode 100644 package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch diff --git a/package/boot/uboot-bcm53xx/Makefile b/package/boot/uboot-bcm53xx/Makefile index ab80b9608a..f1c026e25b 100644 --- a/package/boot/uboot-bcm53xx/Makefile +++ b/package/boot/uboot-bcm53xx/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=2023.04 -PKG_HASH:=e31cac91545ff41b71cec5d8c22afd695645cd6e2a442ccdacacd60534069341 +PKG_VERSION:=2024.01 +PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 PKG_RELEASE:=$(AUTORELEASE) include $(INCLUDE_DIR)/u-boot.mk diff --git a/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch b/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch deleted file mode 100644 index fe6f4d944a..0000000000 --- a/package/boot/uboot-bcm53xx/patches/0001-nand-brcmnand-add-iproc-support.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 854dc4b790ce1291326d52b8405ebe771bff2edd Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Wed, 8 Mar 2023 22:42:31 +0100 -Subject: [PATCH 1/5] nand: brcmnand: add iproc support - -Add support for the iproc Broadcom NAND controller, -used in Northstar SoCs for example. Based on the Linux -driver. - -Cc: Philippe Reynes -Cc: Dario Binacchi -Reviewed-by: Michael Trimarchi -Signed-off-by: Linus Walleij -Acked-by: William Zhang -Link: https://lore.kernel.org/all/20230308214231.378013-1-linus.walleij@linaro.org/ -Signed-off-by: Dario Binacchi ---- - drivers/mtd/nand/raw/Kconfig | 7 + - drivers/mtd/nand/raw/brcmnand/Makefile | 1 + - drivers/mtd/nand/raw/brcmnand/iproc_nand.c | 148 +++++++++++++++++++++ - 3 files changed, 156 insertions(+) - create mode 100644 drivers/mtd/nand/raw/brcmnand/iproc_nand.c - ---- a/drivers/mtd/nand/raw/Kconfig -+++ b/drivers/mtd/nand/raw/Kconfig -@@ -156,6 +156,13 @@ config NAND_BRCMNAND_63158 - help - Enable support for broadcom nand driver on bcm63158. - -+config NAND_BRCMNAND_IPROC -+ bool "Support Broadcom NAND controller on the iproc family" -+ depends on NAND_BRCMNAND -+ help -+ Enable support for broadcom nand driver on the Broadcom -+ iproc family such as Northstar (BCM5301x, BCM4708...) -+ - config NAND_DAVINCI - bool "Support TI Davinci NAND controller" - select SYS_NAND_SELF_INIT if TARGET_DA850EVM ---- a/drivers/mtd/nand/raw/brcmnand/Makefile -+++ b/drivers/mtd/nand/raw/brcmnand/Makefile -@@ -6,5 +6,6 @@ obj-$(CONFIG_NAND_BRCMNAND_6753) += bcm6 - obj-$(CONFIG_NAND_BRCMNAND_68360) += bcm68360_nand.o - obj-$(CONFIG_NAND_BRCMNAND_6838) += bcm6838_nand.o - obj-$(CONFIG_NAND_BRCMNAND_6858) += bcm6858_nand.o -+obj-$(CONFIG_NAND_BRCMNAND_IPROC) += iproc_nand.o - obj-$(CONFIG_NAND_BRCMNAND) += brcmnand.o - obj-$(CONFIG_NAND_BRCMNAND) += brcmnand_compat.o ---- /dev/null -+++ b/drivers/mtd/nand/raw/brcmnand/iproc_nand.c -@@ -0,0 +1,148 @@ -+// SPDX-License-Identifier: GPL-2.0 -+/* -+ * Code borrowed from the Linux driver -+ * Copyright (C) 2015 Broadcom Corporation -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "brcmnand.h" -+ -+struct iproc_nand_soc { -+ struct brcmnand_soc soc; -+ void __iomem *idm_base; -+ void __iomem *ext_base; -+}; -+ -+#define IPROC_NAND_CTLR_READY_OFFSET 0x10 -+#define IPROC_NAND_CTLR_READY BIT(0) -+ -+#define IPROC_NAND_IO_CTRL_OFFSET 0x00 -+#define IPROC_NAND_APB_LE_MODE BIT(24) -+#define IPROC_NAND_INT_CTRL_READ_ENABLE BIT(6) -+ -+static bool iproc_nand_intc_ack(struct brcmnand_soc *soc) -+{ -+ struct iproc_nand_soc *priv = -+ container_of(soc, struct iproc_nand_soc, soc); -+ void __iomem *mmio = priv->ext_base + IPROC_NAND_CTLR_READY_OFFSET; -+ u32 val = brcmnand_readl(mmio); -+ -+ if (val & IPROC_NAND_CTLR_READY) { -+ brcmnand_writel(IPROC_NAND_CTLR_READY, mmio); -+ return true; -+ } -+ -+ return false; -+} -+ -+static void iproc_nand_intc_set(struct brcmnand_soc *soc, bool en) -+{ -+ struct iproc_nand_soc *priv = -+ container_of(soc, struct iproc_nand_soc, soc); -+ void __iomem *mmio = priv->idm_base + IPROC_NAND_IO_CTRL_OFFSET; -+ u32 val = brcmnand_readl(mmio); -+ -+ if (en) -+ val |= IPROC_NAND_INT_CTRL_READ_ENABLE; -+ else -+ val &= ~IPROC_NAND_INT_CTRL_READ_ENABLE; -+ -+ brcmnand_writel(val, mmio); -+} -+ -+static void iproc_nand_apb_access(struct brcmnand_soc *soc, bool prepare, -+ bool is_param) -+{ -+ struct iproc_nand_soc *priv = -+ container_of(soc, struct iproc_nand_soc, soc); -+ void __iomem *mmio = priv->idm_base + IPROC_NAND_IO_CTRL_OFFSET; -+ u32 val; -+ -+ val = brcmnand_readl(mmio); -+ -+ /* -+ * In the case of BE or when dealing with NAND data, always configure -+ * the APB bus to LE mode before accessing the FIFO and back to BE mode -+ * after the access is done -+ */ -+ if (IS_ENABLED(CONFIG_SYS_BIG_ENDIAN) || !is_param) { -+ if (prepare) -+ val |= IPROC_NAND_APB_LE_MODE; -+ else -+ val &= ~IPROC_NAND_APB_LE_MODE; -+ } else { /* when in LE accessing the parameter page, keep APB in BE */ -+ val &= ~IPROC_NAND_APB_LE_MODE; -+ } -+ -+ brcmnand_writel(val, mmio); -+} -+ -+static int iproc_nand_probe(struct udevice *dev) -+{ -+ struct udevice *pdev = dev; -+ struct iproc_nand_soc *priv = dev_get_priv(dev); -+ struct brcmnand_soc *soc; -+ struct resource res; -+ int ret; -+ -+ soc = &priv->soc; -+ -+ ret = dev_read_resource_byname(pdev, "iproc-idm", &res); -+ if (ret) -+ return ret; -+ -+ priv->idm_base = devm_ioremap(dev, res.start, resource_size(&res)); -+ if (IS_ERR(priv->idm_base)) -+ return PTR_ERR(priv->idm_base); -+ -+ ret = dev_read_resource_byname(pdev, "iproc-ext", &res); -+ if (ret) -+ return ret; -+ -+ priv->ext_base = devm_ioremap(dev, res.start, resource_size(&res)); -+ if (IS_ERR(priv->ext_base)) -+ return PTR_ERR(priv->ext_base); -+ -+ soc->ctlrdy_ack = iproc_nand_intc_ack; -+ soc->ctlrdy_set_enabled = iproc_nand_intc_set; -+ soc->prepare_data_bus = iproc_nand_apb_access; -+ -+ return brcmnand_probe(pdev, soc); -+} -+ -+static const struct udevice_id iproc_nand_dt_ids[] = { -+ { -+ .compatible = "brcm,nand-iproc", -+ }, -+ { /* sentinel */ } -+}; -+ -+U_BOOT_DRIVER(iproc_nand) = { -+ .name = "iproc-nand", -+ .id = UCLASS_MTD, -+ .of_match = iproc_nand_dt_ids, -+ .probe = iproc_nand_probe, -+ .priv_auto = sizeof(struct iproc_nand_soc), -+}; -+ -+void board_nand_init(void) -+{ -+ struct udevice *dev; -+ int ret; -+ -+ ret = uclass_get_device_by_driver(UCLASS_MTD, -+ DM_DRIVER_GET(iproc_nand), &dev); -+ if (ret && ret != -ENODEV) -+ pr_err("Failed to initialize %s. (error %d)\n", dev->name, -+ ret); -+} diff --git a/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch b/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch deleted file mode 100644 index eb2a5ec703..0000000000 --- a/package/boot/uboot-bcm53xx/patches/0002-mtd-rawnand-nand_base-Handle-algorithm-selection.patch +++ /dev/null @@ -1,80 +0,0 @@ -From d75483f8892f3a0dfb8f5aa4147e72c02c8b034c Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Fri, 7 Apr 2023 15:40:05 +0200 -Subject: [PATCH 2/5] mtd: rawnand: nand_base: Handle algorithm selection - -For BRCMNAND with 1-bit BCH ECC (BCH-1) such as used on the -D-Link DIR-885L and DIR-890L routers, we need to explicitly -select the ECC like this in the device tree: - - nand-ecc-algo = "bch"; - nand-ecc-strength = <1>; - nand-ecc-step-size = <512>; - -This is handled by the Linux kernel but U-Boot core does -not respect this. Fix it up by parsing the algorithm and -preserve the behaviour using this property to select -software BCH as far as possible. - -Reviewed-by: Michael Trimarchi -Acked-by: William Zhang -Signed-off-by: Linus Walleij -Tested-by: Tom Rini [am335x_evm] -Link: https://lore.kernel.org/all/20230407134008.1939717-3-linus.walleij@linaro.org/ -Signed-off-by: Dario Binacchi ---- - drivers/mtd/nand/raw/nand_base.c | 29 +++++++++++++++++++++++++---- - 1 file changed, 25 insertions(+), 4 deletions(-) - ---- a/drivers/mtd/nand/raw/nand_base.c -+++ b/drivers/mtd/nand/raw/nand_base.c -@@ -4487,6 +4487,7 @@ EXPORT_SYMBOL(nand_detect); - static int nand_dt_init(struct mtd_info *mtd, struct nand_chip *chip, ofnode node) - { - int ret, ecc_mode = -1, ecc_strength, ecc_step; -+ int ecc_algo = NAND_ECC_UNKNOWN; - const char *str; - - ret = ofnode_read_s32_default(node, "nand-bus-width", -1); -@@ -4512,10 +4513,22 @@ static int nand_dt_init(struct mtd_info - ecc_mode = NAND_ECC_SOFT_BCH; - } - -- if (ecc_mode == NAND_ECC_SOFT) { -- str = ofnode_read_string(node, "nand-ecc-algo"); -- if (str && !strcmp(str, "bch")) -- ecc_mode = NAND_ECC_SOFT_BCH; -+ str = ofnode_read_string(node, "nand-ecc-algo"); -+ if (str) { -+ /* -+ * If we are in NAND_ECC_SOFT mode, just alter the -+ * soft mode to BCH here. No change of algorithm. -+ */ -+ if (ecc_mode == NAND_ECC_SOFT) { -+ if (!strcmp(str, "bch")) -+ ecc_mode = NAND_ECC_SOFT_BCH; -+ } else { -+ if (!strcmp(str, "bch")) { -+ ecc_algo = NAND_ECC_BCH; -+ } else if (!strcmp(str, "hamming")) { -+ ecc_algo = NAND_ECC_HAMMING; -+ } -+ } - } - - ecc_strength = ofnode_read_s32_default(node, -@@ -4529,6 +4542,14 @@ static int nand_dt_init(struct mtd_info - return -EINVAL; - } - -+ /* -+ * Chip drivers may have assigned default algorithms here, -+ * onlt override it if we have found something explicitly -+ * specified in the device tree. -+ */ -+ if (ecc_algo != NAND_ECC_UNKNOWN) -+ chip->ecc.algo = ecc_algo; -+ - if (ecc_mode >= 0) - chip->ecc.mode = ecc_mode; - diff --git a/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch b/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch deleted file mode 100644 index 6a4eef77f8..0000000000 --- a/package/boot/uboot-bcm53xx/patches/0003-arm-dts-Import-device-tree-for-Broadcom-Northstar.patch +++ /dev/null @@ -1,659 +0,0 @@ -From 3d6098a662b7ff5b80c4b75c54fcd1b2baf9f150 Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Mon, 24 Apr 2023 09:38:28 +0200 -Subject: [PATCH 3/5] arm: dts: Import device tree for Broadcom Northstar -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This brings in the main SoC device tree used by the -Broadcom Northstar chipset, i.e. BCM4709x and BCM5301x. -This is taken from the v6.3 Linux kernel. - -Cc: Rafał Miłecki -Signed-off-by: Linus Walleij ---- - arch/arm/dts/bcm5301x.dtsi | 581 ++++++++++++++++++++++++++++ - include/dt-bindings/clock/bcm-nsp.h | 51 +++ - 2 files changed, 632 insertions(+) - create mode 100644 arch/arm/dts/bcm5301x.dtsi - create mode 100644 include/dt-bindings/clock/bcm-nsp.h - ---- /dev/null -+++ b/arch/arm/dts/bcm5301x.dtsi -@@ -0,0 +1,581 @@ -+/* -+ * Broadcom BCM470X / BCM5301X ARM platform code. -+ * Generic DTS part for all BCM53010, BCM53011, BCM53012, BCM53014, BCM53015, -+ * BCM53016, BCM53017, BCM53018, BCM4707, BCM4708 and BCM4709 SoCs -+ * -+ * Copyright 2013-2014 Hauke Mehrtens -+ * -+ * Licensed under the GNU/GPL. See COPYING for details. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+/ { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ interrupt-parent = <&gic>; -+ -+ chipcommon-a-bus@18000000 { -+ compatible = "simple-bus"; -+ ranges = <0x00000000 0x18000000 0x00001000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ uart0: serial@300 { -+ compatible = "ns16550"; -+ reg = <0x0300 0x100>; -+ interrupts = ; -+ clocks = <&iprocslow>; -+ status = "disabled"; -+ }; -+ -+ uart1: serial@400 { -+ compatible = "ns16550"; -+ reg = <0x0400 0x100>; -+ interrupts = ; -+ clocks = <&iprocslow>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinmux_uart1>; -+ status = "disabled"; -+ }; -+ }; -+ -+ mpcore-bus@19000000 { -+ compatible = "simple-bus"; -+ ranges = <0x00000000 0x19000000 0x00023000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ a9pll: arm_clk@0 { -+ #clock-cells = <0>; -+ compatible = "brcm,nsp-armpll"; -+ clocks = <&osc>; -+ reg = <0x00000 0x1000>; -+ }; -+ -+ scu@20000 { -+ compatible = "arm,cortex-a9-scu"; -+ reg = <0x20000 0x100>; -+ }; -+ -+ timer@20200 { -+ compatible = "arm,cortex-a9-global-timer"; -+ reg = <0x20200 0x100>; -+ interrupts = ; -+ clocks = <&periph_clk>; -+ }; -+ -+ timer@20600 { -+ compatible = "arm,cortex-a9-twd-timer"; -+ reg = <0x20600 0x20>; -+ interrupts = ; -+ clocks = <&periph_clk>; -+ }; -+ -+ watchdog@20620 { -+ compatible = "arm,cortex-a9-twd-wdt"; -+ reg = <0x20620 0x20>; -+ interrupts = ; -+ clocks = <&periph_clk>; -+ }; -+ -+ gic: interrupt-controller@21000 { -+ compatible = "arm,cortex-a9-gic"; -+ #interrupt-cells = <3>; -+ #address-cells = <0>; -+ interrupt-controller; -+ reg = <0x21000 0x1000>, -+ <0x20100 0x100>; -+ }; -+ -+ L2: cache-controller@22000 { -+ compatible = "arm,pl310-cache"; -+ reg = <0x22000 0x1000>; -+ cache-unified; -+ arm,shared-override; -+ prefetch-data = <1>; -+ prefetch-instr = <1>; -+ cache-level = <2>; -+ }; -+ }; -+ -+ pmu { -+ compatible = "arm,cortex-a9-pmu"; -+ interrupts = -+ , -+ ; -+ }; -+ -+ clocks { -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ osc: oscillator { -+ #clock-cells = <0>; -+ compatible = "fixed-clock"; -+ clock-frequency = <25000000>; -+ }; -+ -+ iprocmed: iprocmed { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>; -+ clock-div = <2>; -+ clock-mult = <1>; -+ }; -+ -+ iprocslow: iprocslow { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clocks = <&genpll BCM_NSP_GENPLL_IPROCFAST_CLK>; -+ clock-div = <4>; -+ clock-mult = <1>; -+ }; -+ -+ periph_clk: periph_clk { -+ #clock-cells = <0>; -+ compatible = "fixed-factor-clock"; -+ clocks = <&a9pll>; -+ clock-div = <2>; -+ clock-mult = <1>; -+ }; -+ }; -+ -+ axi@18000000 { -+ compatible = "brcm,bus-axi"; -+ reg = <0x18000000 0x1000>; -+ ranges = <0x00000000 0x18000000 0x00100000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ #interrupt-cells = <1>; -+ interrupt-map-mask = <0x000fffff 0xffff>; -+ interrupt-map = -+ /* ChipCommon */ -+ <0x00000000 0 &gic GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* Switch Register Access Block */ -+ <0x00007000 0 &gic GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 1 &gic GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 2 &gic GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 3 &gic GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 4 &gic GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 5 &gic GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 6 &gic GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 7 &gic GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 8 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 9 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 10 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 11 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00007000 12 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* PCIe Controller 0 */ -+ <0x00012000 0 &gic GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00012000 1 &gic GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00012000 2 &gic GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00012000 3 &gic GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00012000 4 &gic GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00012000 5 &gic GIC_SPI 131 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* PCIe Controller 1 */ -+ <0x00013000 0 &gic GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00013000 1 &gic GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00013000 2 &gic GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00013000 3 &gic GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00013000 4 &gic GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00013000 5 &gic GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* PCIe Controller 2 */ -+ <0x00014000 0 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00014000 1 &gic GIC_SPI 138 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00014000 2 &gic GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00014000 3 &gic GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00014000 4 &gic GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00014000 5 &gic GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* USB 2.0 Controller */ -+ <0x00021000 0 &gic GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* USB 3.0 Controller */ -+ <0x00023000 0 &gic GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* Ethernet Controller 0 */ -+ <0x00024000 0 &gic GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* Ethernet Controller 1 */ -+ <0x00025000 0 &gic GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* Ethernet Controller 2 */ -+ <0x00026000 0 &gic GIC_SPI 149 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* Ethernet Controller 3 */ -+ <0x00027000 0 &gic GIC_SPI 150 IRQ_TYPE_LEVEL_HIGH>, -+ -+ /* NAND Controller */ -+ <0x00028000 0 &gic GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 1 &gic GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 2 &gic GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 3 &gic GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 4 &gic GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 5 &gic GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 6 &gic GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>, -+ <0x00028000 7 &gic GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; -+ -+ chipcommon: chipcommon@0 { -+ reg = <0x00000000 0x1000>; -+ -+ gpio-controller; -+ #gpio-cells = <2>; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ }; -+ -+ pcie0: pcie@12000 { -+ reg = <0x00012000 0x1000>; -+ }; -+ -+ pcie1: pcie@13000 { -+ reg = <0x00013000 0x1000>; -+ }; -+ -+ pcie2: pcie@14000 { -+ reg = <0x00014000 0x1000>; -+ }; -+ -+ usb2: usb2@21000 { -+ reg = <0x00021000 0x1000>; -+ -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ interrupt-parent = <&gic>; -+ -+ ehci: usb@21000 { -+ #usb-cells = <0>; -+ -+ compatible = "generic-ehci"; -+ reg = <0x00021000 0x1000>; -+ interrupts = ; -+ phys = <&usb2_phy>; -+ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ ehci_port1: port@1 { -+ reg = <1>; -+ #trigger-source-cells = <0>; -+ }; -+ -+ ehci_port2: port@2 { -+ reg = <2>; -+ #trigger-source-cells = <0>; -+ }; -+ }; -+ -+ ohci: usb@22000 { -+ #usb-cells = <0>; -+ -+ compatible = "generic-ohci"; -+ reg = <0x00022000 0x1000>; -+ interrupts = ; -+ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ ohci_port1: port@1 { -+ reg = <1>; -+ #trigger-source-cells = <0>; -+ }; -+ -+ ohci_port2: port@2 { -+ reg = <2>; -+ #trigger-source-cells = <0>; -+ }; -+ }; -+ }; -+ -+ usb3: usb3@23000 { -+ reg = <0x00023000 0x1000>; -+ -+ #address-cells = <1>; -+ #size-cells = <1>; -+ ranges; -+ -+ interrupt-parent = <&gic>; -+ -+ xhci: usb@23000 { -+ #usb-cells = <0>; -+ -+ compatible = "generic-xhci"; -+ reg = <0x00023000 0x1000>; -+ interrupts = ; -+ phys = <&usb3_phy>; -+ phy-names = "usb"; -+ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ xhci_port1: port@1 { -+ reg = <1>; -+ #trigger-source-cells = <0>; -+ }; -+ }; -+ }; -+ -+ gmac0: ethernet@24000 { -+ reg = <0x24000 0x800>; -+ }; -+ -+ gmac1: ethernet@25000 { -+ reg = <0x25000 0x800>; -+ }; -+ -+ gmac2: ethernet@26000 { -+ reg = <0x26000 0x800>; -+ }; -+ -+ gmac3: ethernet@27000 { -+ reg = <0x27000 0x800>; -+ }; -+ }; -+ -+ pwm: pwm@18002000 { -+ compatible = "brcm,iproc-pwm"; -+ reg = <0x18002000 0x28>; -+ clocks = <&osc>; -+ #pwm-cells = <3>; -+ status = "disabled"; -+ }; -+ -+ mdio: mdio@18003000 { -+ compatible = "brcm,iproc-mdio"; -+ reg = <0x18003000 0x8>; -+ #size-cells = <0>; -+ #address-cells = <1>; -+ }; -+ -+ mdio-mux@18003000 { -+ compatible = "mdio-mux-mmioreg", "mdio-mux"; -+ mdio-parent-bus = <&mdio>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ reg = <0x18003000 0x4>; -+ mux-mask = <0x200>; -+ -+ mdio@0 { -+ reg = <0x0>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ usb3_phy: usb3-phy@10 { -+ compatible = "brcm,ns-ax-usb3-phy"; -+ reg = <0x10>; -+ usb3-dmp-syscon = <&usb3_dmp>; -+ #phy-cells = <0>; -+ status = "disabled"; -+ }; -+ }; -+ }; -+ -+ usb3_dmp: syscon@18105000 { -+ reg = <0x18105000 0x1000>; -+ }; -+ -+ uart2: serial@18008000 { -+ compatible = "ns16550a"; -+ reg = <0x18008000 0x20>; -+ clocks = <&iprocslow>; -+ interrupts = ; -+ reg-shift = <2>; -+ status = "disabled"; -+ }; -+ -+ i2c0: i2c@18009000 { -+ compatible = "brcm,iproc-i2c"; -+ reg = <0x18009000 0x50>; -+ interrupts = ; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ clock-frequency = <100000>; -+ status = "disabled"; -+ }; -+ -+ dmu-bus@1800c000 { -+ compatible = "simple-bus"; -+ ranges = <0 0x1800c000 0x1000>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ cru-bus@100 { -+ compatible = "brcm,ns-cru", "simple-mfd"; -+ reg = <0x100 0x1a4>; -+ ranges; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ lcpll0: clock-controller@100 { -+ #clock-cells = <1>; -+ compatible = "brcm,nsp-lcpll0"; -+ reg = <0x100 0x14>; -+ clocks = <&osc>; -+ clock-output-names = "lcpll0", "pcie_phy", -+ "sdio", "ddr_phy"; -+ }; -+ -+ genpll: clock-controller@140 { -+ #clock-cells = <1>; -+ compatible = "brcm,nsp-genpll"; -+ reg = <0x140 0x24>; -+ clocks = <&osc>; -+ clock-output-names = "genpll", "phy", -+ "ethernetclk", -+ "usbclk", "iprocfast", -+ "sata1", "sata2"; -+ }; -+ -+ usb2_phy: phy@164 { -+ compatible = "brcm,ns-usb2-phy"; -+ reg = <0x164 0x4>; -+ brcm,syscon-clkset = <&cru_clkset>; -+ clocks = <&genpll BCM_NSP_GENPLL_USB_PHY_REF_CLK>; -+ clock-names = "phy-ref-clk"; -+ #phy-cells = <0>; -+ }; -+ -+ cru_clkset: syscon@180 { -+ compatible = "brcm,cru-clkset", "syscon"; -+ reg = <0x180 0x4>; -+ }; -+ -+ pinctrl: pinctrl@1c0 { -+ compatible = "brcm,bcm4708-pinmux"; -+ reg = <0x1c0 0x24>; -+ reg-names = "cru_gpio_control"; -+ -+ spi-pins { -+ groups = "spi_grp"; -+ function = "spi"; -+ }; -+ -+ pinmux_i2c: i2c-pins { -+ groups = "i2c_grp"; -+ function = "i2c"; -+ }; -+ -+ pinmux_pwm: pwm-pins { -+ groups = "pwm0_grp", "pwm1_grp", -+ "pwm2_grp", "pwm3_grp"; -+ function = "pwm"; -+ }; -+ -+ pinmux_uart1: uart1-pins { -+ groups = "uart1_grp"; -+ function = "uart1"; -+ }; -+ }; -+ -+ thermal: thermal@2c0 { -+ compatible = "brcm,ns-thermal"; -+ reg = <0x2c0 0x10>; -+ #thermal-sensor-cells = <0>; -+ }; -+ }; -+ }; -+ -+ srab: ethernet-switch@18007000 { -+ compatible = "brcm,bcm53011-srab", "brcm,bcm5301x-srab"; -+ reg = <0x18007000 0x1000>; -+ -+ status = "disabled"; -+ -+ /* ports are defined in board DTS */ -+ ports { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ }; -+ }; -+ -+ rng: rng@18004000 { -+ compatible = "brcm,bcm5301x-rng"; -+ reg = <0x18004000 0x14>; -+ }; -+ -+ nand_controller: nand-controller@18028000 { -+ compatible = "brcm,nand-iproc", "brcm,brcmnand-v6.1", "brcm,brcmnand"; -+ reg = <0x18028000 0x600>, <0x1811a408 0x600>, <0x18028f00 0x20>; -+ reg-names = "nand", "iproc-idm", "iproc-ext"; -+ interrupts = ; -+ -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ brcm,nand-has-wp; -+ }; -+ -+ spi@18029200 { -+ compatible = "brcm,spi-nsp-qspi", "brcm,spi-bcm-qspi"; -+ reg = <0x18029200 0x184>, -+ <0x18029000 0x124>, -+ <0x1811b408 0x004>, -+ <0x180293a0 0x01c>; -+ reg-names = "mspi", "bspi", "intr_regs", "intr_status_reg"; -+ interrupts = , -+ , -+ , -+ , -+ , -+ , -+ ; -+ interrupt-names = "mspi_done", -+ "mspi_halted", -+ "spi_lr_fullness_reached", -+ "spi_lr_session_aborted", -+ "spi_lr_impatient", -+ "spi_lr_session_done", -+ "spi_lr_overread"; -+ clocks = <&iprocmed>; -+ clock-names = "iprocmed"; -+ num-cs = <2>; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ spi_nor: flash@0 { -+ compatible = "jedec,spi-nor"; -+ reg = <0>; -+ spi-max-frequency = <20000000>; -+ status = "disabled"; -+ -+ partitions { -+ compatible = "brcm,bcm947xx-cfe-partitions"; -+ }; -+ }; -+ }; -+ -+ thermal-zones { -+ cpu_thermal: cpu-thermal { -+ polling-delay-passive = <0>; -+ polling-delay = <1000>; -+ coefficients = <(-556) 418000>; -+ thermal-sensors = <&thermal>; -+ -+ trips { -+ cpu-crit { -+ temperature = <125000>; -+ hysteresis = <0>; -+ type = "critical"; -+ }; -+ }; -+ -+ cooling-maps { -+ }; -+ }; -+ }; -+}; ---- /dev/null -+++ b/include/dt-bindings/clock/bcm-nsp.h -@@ -0,0 +1,51 @@ -+/* -+ * BSD LICENSE -+ * -+ * Copyright(c) 2015 Broadcom Corporation. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * * Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * * Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * * Neither the name of Broadcom Corporation nor the names of its -+ * contributors may be used to endorse or promote products derived -+ * from this software without specific prior written permission. -+ * -+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -+ */ -+ -+#ifndef _CLOCK_BCM_NSP_H -+#define _CLOCK_BCM_NSP_H -+ -+/* GENPLL clock channel ID */ -+#define BCM_NSP_GENPLL 0 -+#define BCM_NSP_GENPLL_PHY_CLK 1 -+#define BCM_NSP_GENPLL_ENET_SW_CLK 2 -+#define BCM_NSP_GENPLL_USB_PHY_REF_CLK 3 -+#define BCM_NSP_GENPLL_IPROCFAST_CLK 4 -+#define BCM_NSP_GENPLL_SATA1_CLK 5 -+#define BCM_NSP_GENPLL_SATA2_CLK 6 -+ -+/* LCPLL0 clock channel ID */ -+#define BCM_NSP_LCPLL0 0 -+#define BCM_NSP_LCPLL0_PCIE_PHY_REF_CLK 1 -+#define BCM_NSP_LCPLL0_SDIO_CLK 2 -+#define BCM_NSP_LCPLL0_DDR_PHY_CLK 3 -+ -+#endif /* _CLOCK_BCM_NSP_H */ diff --git a/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch b/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch deleted file mode 100644 index 92eaa46e51..0000000000 --- a/package/boot/uboot-bcm53xx/patches/0004-arm-Add-support-for-the-Broadcom-Northstar-SoCs.patch +++ /dev/null @@ -1,66 +0,0 @@ -From b81ea0a64b01ae42e8b41d2a8b9a3fabffe97489 Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Mon, 24 Apr 2023 09:38:29 +0200 -Subject: [PATCH 4/5] arm: Add support for the Broadcom Northstar SoCs -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The original Northstar is an ARM SoC series that comprise -BCM4709x and BCM5301x and uses a dual-core Cortex A9, the -global timer and a few other things. - -This series should not be confused with North Star Plus -(NSP) which is partly supported by U-Boot already. - -The SoC is well supported by the Linux kernel and OpenWrt -as it is used in many routers. - -Since we currently don't need any chip-specific quirks -and can get the system up from just the device tree, a -mach-* directory doesn't even need to be added, just -some small Kconfig fragments. - -Cc: Rafał Miłecki -Signed-off-by: Linus Walleij ---- - arch/arm/Kconfig | 21 ++++++++++++++++++++- - 1 file changed, 20 insertions(+), 1 deletion(-) - ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -357,7 +357,7 @@ config SYS_ARM_ARCH - - choice - prompt "Select the ARM data write cache policy" -- default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || RZA1 -+ default SYS_ARM_CACHE_WRITETHROUGH if TARGET_BCMCYGNUS || TARGET_BCMNS || RZA1 - default SYS_ARM_CACHE_WRITEBACK - - config SYS_ARM_CACHE_WRITEBACK -@@ -670,6 +670,25 @@ config TARGET_BCMCYGNUS - imply HASH_VERIFY - imply NETDEVICES - -+config TARGET_BCMNS -+ bool "Support Broadcom Northstar" -+ select CPU_V7A -+ select DM -+ select DM_GPIO -+ select DM_SERIAL -+ select OF_CONTROL -+ select TIMER -+ select SYS_NS16550 -+ select ARM_GLOBAL_TIMER -+ imply SYS_THUMB_BUILD -+ imply MTD_RAW_NAND -+ imply NAND_BRCMNAND -+ imply NAND_BRCMNAND_IPROC -+ help -+ Support for Broadcom Northstar SoCs. NS is a dual-core 32-bit -+ ARMv7 Cortex-A9 SoC family including BCM4708, BCM47094, -+ BCM5301x etc. -+ - config TARGET_BCMNS2 - bool "Support Broadcom Northstar2" - select ARM64 diff --git a/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch b/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch deleted file mode 100644 index 158718133d..0000000000 --- a/package/boot/uboot-bcm53xx/patches/0005-board-Add-new-Broadcom-Northstar-board.patch +++ /dev/null @@ -1,372 +0,0 @@ -From 652a6fa45b6c9d52dd9685fc12ad662e54a9092e Mon Sep 17 00:00:00 2001 -From: Linus Walleij -Date: Mon, 24 Apr 2023 09:38:30 +0200 -Subject: [PATCH 5/5] board: Add new Broadcom Northstar board -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This adds a simple Northstar "BRCMNS" board to be used with -the BCM4708x and BCM5301x chips. - -The main intention is to use this with the D-Link DIR-890L -and DIR-885L routers for loading the kernel into RAM from -NAND memory using the BCH-1 ECC and using the separately -submitted SEAMA load command, so we are currently not adding -support for things such as networking. - -The DTS file is a multiplatform NorthStar board, designed to -be usable with several NorthStar designs by avoiding any -particulars not related to the operation of U-Boot. - -If other board need other ECC for example, they need to -create a separate DTS file and augment the code, but I don't -know if any other users will turn up. - -Cc: Rafał Miłecki -Signed-off-by: Linus Walleij ---- - arch/arm/Kconfig | 1 + - arch/arm/dts/Makefile | 2 ++ - arch/arm/dts/ns-board.dts | 57 ++++++++++++++++++++++++++++++ - board/broadcom/bcmns/Kconfig | 12 +++++++ - board/broadcom/bcmns/MAINTAINERS | 6 ++++ - board/broadcom/bcmns/Makefile | 2 ++ - board/broadcom/bcmns/ns.c | 60 ++++++++++++++++++++++++++++++++ - configs/bcmns_defconfig | 41 ++++++++++++++++++++++ - doc/board/broadcom/index.rst | 1 + - doc/board/broadcom/northstar.rst | 44 +++++++++++++++++++++++ - include/configs/bcmns.h | 49 ++++++++++++++++++++++++++ - 11 files changed, 275 insertions(+) - create mode 100644 arch/arm/dts/ns-board.dts - create mode 100644 board/broadcom/bcmns/Kconfig - create mode 100644 board/broadcom/bcmns/MAINTAINERS - create mode 100644 board/broadcom/bcmns/Makefile - create mode 100644 board/broadcom/bcmns/ns.c - create mode 100644 configs/bcmns_defconfig - create mode 100644 doc/board/broadcom/northstar.rst - create mode 100644 include/configs/bcmns.h - ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -2286,6 +2286,7 @@ source "board/Marvell/octeontx2/Kconfig" - source "board/armltd/vexpress/Kconfig" - source "board/armltd/vexpress64/Kconfig" - source "board/cortina/presidio-asic/Kconfig" -+source "board/broadcom/bcmns/Kconfig" - source "board/broadcom/bcmns3/Kconfig" - source "board/cavium/thunderx/Kconfig" - source "board/eets/pdu001/Kconfig" ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -1185,6 +1185,8 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ - bcm2837-rpi-cm3-io3.dtb \ - bcm2711-rpi-4-b.dtb - -+dtb-$(CONFIG_TARGET_BCMNS) += ns-board.dtb -+ - dtb-$(CONFIG_TARGET_BCMNS3) += ns3-board.dtb - - dtb-$(CONFIG_ARCH_BCMSTB) += bcm7xxx.dtb ---- /dev/null -+++ b/arch/arm/dts/ns-board.dts -@@ -0,0 +1,57 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+ -+/dts-v1/; -+ -+#include "bcm5301x.dtsi" -+ -+/ { -+ /* -+ * The Northstar does not have a proper fallback compatible, but -+ * these basic chips will suffice. -+ */ -+ model = "Northstar model"; -+ compatible = "brcm,bcm47094", "brcm,bcm4708"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ interrupt-parent = <&gic>; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x00000000 0x08000000>, -+ <0x88000000 0x08000000>; -+ }; -+ -+ aliases { -+ serial0 = &uart0; -+ }; -+ -+ chosen { -+ stdout-path = "serial0:115200n8"; -+ }; -+ -+ nand-controller@18028000 { -+ nandcs: nand@0 { -+ compatible = "brcm,nandcs"; -+ reg = <0>; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ -+ /* -+ * Same as using the bcm5301x-nand-cs0-bch1.dtsi -+ * include from the Linux kernel. -+ */ -+ nand-ecc-algo = "bch"; -+ nand-ecc-strength = <1>; -+ nand-ecc-step-size = <512>; -+ -+ partitions { -+ compatible = "brcm,bcm947xx-cfe-partitions"; -+ }; -+ }; -+ }; -+}; -+ -+&uart0 { -+ clock-frequency = <125000000>; -+ status = "okay"; -+}; ---- /dev/null -+++ b/board/broadcom/bcmns/Kconfig -@@ -0,0 +1,12 @@ -+if TARGET_BCMNS -+ -+config SYS_BOARD -+ default "bcmns" -+ -+config SYS_VENDOR -+ default "broadcom" -+ -+config SYS_CONFIG_NAME -+ default "bcmns" -+ -+endif ---- /dev/null -+++ b/board/broadcom/bcmns/MAINTAINERS -@@ -0,0 +1,6 @@ -+BCMNS BOARD -+M: Linus Walleij -+S: Maintained -+F: board/broadcom/bcmnsp/ -+F: configs/bcmnsp_defconfig -+F: include/configs/bcmnsp.h ---- /dev/null -+++ b/board/broadcom/bcmns/Makefile -@@ -0,0 +1,2 @@ -+# SPDX-License-Identifier: GPL-2.0-or-later -+obj-y := ns.o ---- /dev/null -+++ b/board/broadcom/bcmns/ns.c -@@ -0,0 +1,60 @@ -+// SPDX-License-Identifier: GPL-2.0+ -+/* -+ * Broadcom Northstar generic board set-up code -+ * Copyright (C) 2023 Linus Walleij -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+DECLARE_GLOBAL_DATA_PTR; -+ -+int dram_init(void) -+{ -+ return fdtdec_setup_mem_size_base(); -+} -+ -+int dram_init_banksize(void) -+{ -+ return fdtdec_setup_memory_banksize(); -+} -+ -+int board_late_init(void) -+{ -+ /* LEDs etc can be initialized here */ -+ return 0; -+} -+ -+int board_init(void) -+{ -+ return 0; -+} -+ -+void reset_cpu(void) -+{ -+} -+ -+int print_cpuinfo(void) -+{ -+ printf("BCMNS Northstar SoC\n"); -+ return 0; -+} -+ -+int misc_init_r(void) -+{ -+ return 0; -+} -+ -+int ft_board_setup(void *fdt, struct bd_info *bd) -+{ -+ printf("Northstar board setup: DTB at 0x%08lx\n", (ulong)fdt); -+ return 0; -+} -+ ---- /dev/null -+++ b/configs/bcmns_defconfig -@@ -0,0 +1,41 @@ -+CONFIG_ARM=y -+CONFIG_TARGET_BCMNS=y -+CONFIG_TEXT_BASE=0x00008000 -+CONFIG_SYS_MALLOC_LEN=0x2000000 -+CONFIG_SYS_MALLOC_F_LEN=0x8000 -+CONFIG_NR_DRAM_BANKS=2 -+CONFIG_DEFAULT_DEVICE_TREE="ns-board" -+CONFIG_IDENT_STRING="Broadcom Northstar" -+CONFIG_SYS_LOAD_ADDR=0x00008000 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x00100000 -+# CONFIG_BOOTSTD is not set -+CONFIG_AUTOBOOT_KEYED=y -+CONFIG_AUTOBOOT_PROMPT="Boot Northstar system in %d seconds\n" -+CONFIG_BOOTDELAY=1 -+CONFIG_USE_BOOTCOMMAND=y -+CONFIG_BOOTCOMMAND="run bootcmd_dlink_dir8xxl" -+CONFIG_SYS_PROMPT="northstar> " -+CONFIG_ENV_VARS_UBOOT_CONFIG=y -+CONFIG_OF_BOARD_SETUP=y -+CONFIG_OF_STDOUT_VIA_ALIAS=y -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_HUSH_PARSER=y -+CONFIG_SYS_MAXARGS=64 -+CONFIG_CMD_SEAMA=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_CACHE=y -+CONFIG_OF_EMBED=y -+CONFIG_USE_HOSTNAME=y -+CONFIG_HOSTNAME="NS" -+CONFIG_CLK=y -+CONFIG_MTD=y -+CONFIG_DM_MTD=y -+CONFIG_MTD_RAW_NAND=y -+CONFIG_NAND_BRCMNAND=y -+CONFIG_SYS_NAND_ONFI_DETECTION=y -+CONFIG_CMD_NAND=y -+CONFIG_DM_SERIAL=y -+CONFIG_SYS_NS16550=y -+# CONFIG_NET is not set -+# CONFIG_EFI_LOADER is not set ---- a/doc/board/broadcom/index.rst -+++ b/doc/board/broadcom/index.rst -@@ -9,3 +9,4 @@ Broadcom - - bcm7xxx - raspberrypi -+ northstar ---- /dev/null -+++ b/doc/board/broadcom/northstar.rst -@@ -0,0 +1,44 @@ -+.. SPDX-License-Identifier: GPL-2.0+ -+.. Copyright (C) 2023 Linus Walleij -+ -+Broadcom Northstar Boards -+========================= -+ -+This document describes how to use U-Boot on the Broadcom Northstar -+boards, comprised of the Cortex A9 ARM-based BCM470x and BCM5301x SoCs. These -+were introduced in 2012-2013 and some of them are also called StrataGX. -+ -+Northstar is part of the iProc SoC family. -+ -+A good overview of these boards can be found in Jon Mason's presentation -+"Enabling New Hardware in U-Boot" where the difference between Northstar -+and Northstar Plus and Northstar 2 (Aarch64) is addressed. -+ -+The ROM in the Northstar SoC will typically look into NOR flash memory -+for a boot loader, and the way this works is undocumented. It should be -+possible to execute U-Boot as the first binary from the NOR flash but -+this usage path is unexplored. Please add information if you know more. -+ -+D-Link Boards -+------------- -+ -+When we use U-Boot with D-Link routers, the NOR flash has a boot loader -+and web server that can re-flash the bigger NAND flash memory for object -+code in the SEAMA format, so on these platforms U-Boot is converted into -+a SEAMA binary and installed in the SoC using the flash tool resident in -+the NOR flash. Details can be found in the OpenWrt project codebase. -+ -+Configure -+--------- -+ -+.. code-block:: console -+ -+ $ make CROSS_COMPILE=${CROSS_COMPILE} bcmns_defconfig -+ -+Build -+----- -+ -+.. code-block:: console -+ -+ $ make CROSS_COMPILE=${CROSS_COMPILE} -+ $ ${CROSS_COMPILE}strip u-boot ---- /dev/null -+++ b/include/configs/bcmns.h -@@ -0,0 +1,49 @@ -+/* SPDX-License-Identifier: GPL-2.0+ */ -+ -+#ifndef __BCM_NS_H -+#define __BCM_NS_H -+ -+#include -+ -+/* Physical Memory Map */ -+#define V2M_BASE 0x00000000 -+#define PHYS_SDRAM_1 V2M_BASE -+ -+#define CFG_SYS_SDRAM_BASE PHYS_SDRAM_1 -+ -+/* Called "periph_clk" in Linux, used by the global timer */ -+#define CFG_SYS_HZ_CLOCK 500000000 -+ -+/* Called "iprocslow" in Linux */ -+#define CFG_SYS_NS16550_CLK 125000000 -+ -+/* console configuration */ -+#define CONSOLE_ARGS "console_args=console=ttyS0,115200n8\0" -+#define MAX_CPUS "max_cpus=maxcpus=2\0" -+#define EXTRA_ARGS "extra_args=earlycon=uart8250,mmio32,0x18000300\0" -+ -+#define BASE_ARGS "${console_args} ${extra_args} ${pcie_args}" \ -+ " ${max_cpus} ${log_level} ${reserved_mem}" -+#define SETBOOTARGS "setbootargs=setenv bootargs " BASE_ARGS "\0" -+ -+#define KERNEL_LOADADDR_CFG \ -+ "loadaddr=0x01000000\0" \ -+ "dtb_loadaddr=0x02000000\0" -+ -+/* -+ * Hardcoded for the only boards we support, if you add more -+ * boards, add a more clever bootcmd! -+ */ -+#define NS_BOOTCMD "bootcmd_dlink_dir8xxl=seama 0x00fe0000; go 0x01000000" -+ -+#define ARCH_ENV_SETTINGS \ -+ CONSOLE_ARGS \ -+ MAX_CPUS \ -+ EXTRA_ARGS \ -+ KERNEL_LOADADDR_CFG \ -+ NS_BOOTCMD -+ -+#define CFG_EXTRA_ENV_SETTINGS \ -+ ARCH_ENV_SETTINGS -+ -+#endif /* __BCM_NS_H */ From 7b5aeef6dbfae724fa4bef4edee49be389fd4a5e Mon Sep 17 00:00:00 2001 From: Samuele Longhi Date: Wed, 20 Dec 2023 19:27:15 +0100 Subject: [PATCH 04/22] ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam M5 (XW), Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) Add support for Ubiquiti LiteBeam M5 (XW). The device was previously supported in ar71xx. See commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0988235dd277b9a832bbc4b2a100ac6e821f577 Add ALTX_MODEL for Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) in generic-ubnt.mk This models are identical (firmware-wise) to the already supported Ubiquiti Nanostation Loco M (XW) Add also Ubiquiti NanoBeam M5 to ALTX_MODEL of Ubiquiti Nanostation Loco M (XW) since it's another clone. Tested on: - Ubiquiti LiteBeam M5 (XW) - Ubiquiti PowerBeam M5 (XW) This also modify target/ath79/dts/ar9342_ubnt_xw.dtsi to use nvmem for calibration data Checked that the caldata size in the eeprom partition are actually 0x440 on: - Ubiquiti PowerBeam M5 (XW) - Ubiquiti Nanostation M5 (XW) - Ubiquiti LiteBeam M5 (XW) - Ubiquiti AirGrid M5 HP (XW) Signed-off-by: Samuele Longhi --- .../ath79/dts/ar9342_ubnt_bullet-m-xw.dts | 2 +- .../ath79/dts/ar9342_ubnt_litebeam-m5-xw.dts | 59 +++++++++++++++++++ .../ath79/dts/ar9342_ubnt_nanobeam-m5-xw.dts | 24 -------- .../dts/ar9342_ubnt_nanostation-loco-m-xw.dts | 2 +- .../dts/ar9342_ubnt_nanostation-m-xw.dts | 2 +- .../ath79/dts/ar9342_ubnt_powerbeam-m2-xw.dts | 2 +- .../ath79/dts/ar9342_ubnt_powerbeam-m5-xw.dts | 2 +- target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 39 ++---------- .../ath79/dts/ar9342_ubnt_xw_rssileds.dtsi | 43 ++++++++++++++ .../generic/base-files/etc/board.d/01_leds | 3 +- .../generic/base-files/etc/board.d/02_network | 1 + target/linux/ath79/image/generic-ubnt.mk | 29 +++++---- 12 files changed, 135 insertions(+), 73 deletions(-) create mode 100644 target/linux/ath79/dts/ar9342_ubnt_litebeam-m5-xw.dts delete mode 100644 target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5-xw.dts create mode 100644 target/linux/ath79/dts/ar9342_ubnt_xw_rssileds.dtsi diff --git a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts index c448ac4e61..8c7d1dc918 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9342_ubnt_xw.dtsi" +#include "ar9342_ubnt_xw_rssileds.dtsi" / { compatible = "ubnt,bullet-m-xw", "ubnt,xw", "qca,ar9342"; diff --git a/target/linux/ath79/dts/ar9342_ubnt_litebeam-m5-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_litebeam-m5-xw.dts new file mode 100644 index 0000000000..bc01bdffb5 --- /dev/null +++ b/target/linux/ath79/dts/ar9342_ubnt_litebeam-m5-xw.dts @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9342_ubnt_xw.dtsi" + +#include +#include +#include + +/ { + compatible = "ubnt,litebeam-m5-xw", "qca,ar9342"; + model = "Ubiquiti LiteBeam M5 (XW)"; + + aliases { + led-boot = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + led-failsafe = &led_status; + label-mac-device = &wmac; + }; + + leds { + compatible = "gpio-leds"; + + led-lan { + color = ; + function = LED_FUNCTION_LAN; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led-wlan { + color = ; + function = LED_FUNCTION_WLAN; + linux,default-trigger = "phy0tpt"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_status: led-power { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + phy-mode = "mii"; + reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy1>; +}; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5-xw.dts deleted file mode 100644 index 9b9b217f24..0000000000 --- a/target/linux/ath79/dts/ar9342_ubnt_nanobeam-m5-xw.dts +++ /dev/null @@ -1,24 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -#include "ar9342_ubnt_xw.dtsi" - -/ { - compatible = "ubnt,nanobeam-m5-xw", "ubnt,xw", "qca,ar9342"; - model = "Ubiquiti NanoBeam M5 (XW)"; -}; - -&mdio0 { - status = "okay"; - - phy1: ethernet-phy@1 { - reg = <1>; - phy-mode = "mii"; - reset-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - }; -}; - -ð0 { - status = "okay"; - - phy-handle = <&phy1>; -}; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts index c71cf11dd2..ba3ad5a8d0 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-loco-m-xw.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9342_ubnt_xw.dtsi" +#include "ar9342_ubnt_xw_rssileds.dtsi" / { compatible = "ubnt,nanostation-loco-m-xw", "ubnt,xw", "qca,ar9342"; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts index e359297661..fb02bb188a 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-m-xw.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9342_ubnt_xw.dtsi" +#include "ar9342_ubnt_xw_rssileds.dtsi" / { compatible = "ubnt,nanostation-m-xw", "ubnt,xw", "qca,ar9342"; diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m2-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m2-xw.dts index 762a17b177..11bd71ca3d 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m2-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m2-xw.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9342_ubnt_xw.dtsi" +#include "ar9342_ubnt_xw_rssileds.dtsi" / { compatible = "ubnt,powerbeam-m2-xw", "ubnt,xw", "qca,ar9342"; diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m5-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m5-xw.dts index 978a05fed6..7199d184e9 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m5-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m5-xw.dts @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include "ar9342_ubnt_xw.dtsi" +#include "ar9342_ubnt_xw_rssileds.dtsi" / { compatible = "ubnt,powerbeam-m5-xw", "ubnt,xw", "qca,ar9342"; diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 899f167748..cd39410be5 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -9,38 +9,6 @@ compatible = "ubnt,xw", "qca,ar9342"; model = "Ubiquiti Networks XW board"; - aliases { - led-boot = &led_link4; - led-running = &led_link4; - led-upgrade = &led_link4; - led-failsafe = &led_link4; - label-mac-device = &wmac; - }; - - leds { - compatible = "gpio-leds"; - - link1 { - label = "red:link1"; - gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - }; - - link2 { - label = "orange:link2"; - gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - }; - - link3 { - label = "green:link3"; - gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - }; - - led_link4: link4 { - label = "green:link4"; - gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - }; - }; - keys { compatible = "gpio-keys"; @@ -107,6 +75,10 @@ macaddr_art_0: macaddr@0 { reg = <0x0 0x6>; }; + + calibration_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; }; }; }; @@ -116,7 +88,8 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&calibration_art_1000>; + nvmem-cell-names = "calibration"; }; ð0 { diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw_rssileds.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw_rssileds.dtsi new file mode 100644 index 0000000000..d54dbeba38 --- /dev/null +++ b/target/linux/ath79/dts/ar9342_ubnt_xw_rssileds.dtsi @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9342_ubnt_xw.dtsi" + +#include +#include + +/ { + compatible = "ubnt,xw", "qca,ar9342"; + model = "Ubiquiti Networks XW board"; + + aliases { + led-boot = &led_link4; + led-running = &led_link4; + led-upgrade = &led_link4; + led-failsafe = &led_link4; + label-mac-device = &wmac; + }; + + leds { + compatible = "gpio-leds"; + + link1 { + label = "red:link1"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + link2 { + label = "orange:link2"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + link3 { + label = "green:link3"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_link4: link4 { + label = "green:link4"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; +}; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index ae6e3c4d30..525224bec9 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -27,7 +27,8 @@ pcs,cap324|\ tplink,cpe605-v1|\ tplink,cpe610-v1|\ tplink,cpe610-v2|\ -tplink,tl-wa1201-v2) +tplink,tl-wa1201-v2|\ +ubnt,litebeam-m5-xw) ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" ;; tplink,tl-wdr6500-v2) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 70bfd95f9e..01747acae0 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -105,6 +105,7 @@ ath79_setup_interfaces() ubnt,bullet-m-xw|\ ubnt,lap-120|\ ubnt,litebeam-ac-gen2|\ + ubnt,litebeam-m5-xw|\ ubnt,nanobeam-ac|\ ubnt,nanobeam-ac-xc|\ ubnt,nanostation-ac-loco|\ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 68cef7d14b..179de961be 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -62,6 +62,14 @@ define Device/ubnt_litebeam-ac-gen2 endef TARGET_DEVICES += ubnt_litebeam-ac-gen2 +define Device/ubnt_litebeam-m5-xw + $(Device/ubnt-xw) + DEVICE_MODEL := LiteBeam M5 + SUPPORTED_DEVICES += lbe-m5 + DEVICE_PACKAGES := -kmod-usb2 +endef +TARGET_DEVICES += ubnt_litebeam-m5-xw + define Device/ubnt_nanobeam-ac $(Device/ubnt-wa) DEVICE_MODEL := NanoBeam AC @@ -87,14 +95,6 @@ define Device/ubnt_nanobeam-ac-xc endef TARGET_DEVICES += ubnt_nanobeam-ac-xc -define Device/ubnt_nanobeam-m5-xw - $(Device/ubnt-xw) - DEVICE_MODEL := NanoBeam M5 - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += loco-m-xw -endef -TARGET_DEVICES += ubnt_nanobeam-m5-xw - define Device/ubnt_nanostation-ac $(Device/ubnt-wa) DEVICE_MODEL := Nanostation AC @@ -112,8 +112,17 @@ TARGET_DEVICES += ubnt_nanostation-ac-loco define Device/ubnt_nanostation-loco-m-xw $(Device/ubnt-xw) DEVICE_MODEL := Nanostation Loco M - DEVICE_PACKAGES += rssileds - SUPPORTED_DEVICES += loco-m-xw + DEVICE_PACKAGES += rssileds -kmod-usb2 + DEVICE_ALT0_VENDOR := Ubiquiti + DEVICE_ALT0_MODEL := AirGrid M5 HP + DEVICE_ALT0_VARIANT := XW + DEVICE_ALT1_VENDOR := Ubiquiti + DEVICE_ALT1_MODEL := PowerBeam M5 300 + DEVICE_ALT1_VARIANT := XW + DEVICE_ALT2_VENDOR := Ubiquiti + DEVICE_ALT2_MODEL := NanoBeam M5 + DEVICE_ALT2_VARIANT := XW + SUPPORTED_DEVICES += loco-m-xw nanostation-m-xw ubnt,nanobeam-m5-xw endef TARGET_DEVICES += ubnt_nanostation-loco-m-xw From 1fc729a2ac401337bd38bc84bb5a321eef6ea5d1 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sat, 20 Jan 2024 08:03:12 -0500 Subject: [PATCH 05/22] kernel: bump 6.1 to 6.1.74 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.74 No patches needed a rebase/only updated source hash. Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia --- include/kernel-6.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/kernel-6.1 b/include/kernel-6.1 index fde32f3ca3..87c6bf5097 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .73 -LINUX_KERNEL_HASH-6.1.73 = 6cad48706bf1cde342613dca2a2cd6dd4f79f88f9e4d356263564e4b2a5d7e87 +LINUX_VERSION-6.1 = .74 +LINUX_KERNEL_HASH-6.1.74 = b7fbd1d79faed2ce3570ef79dc1223e4e19c868b86326b14a435db56ebbb2022 From d531c344792f60e8f9e7132494e7016a1baedee2 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 10 Jan 2024 17:10:13 +0800 Subject: [PATCH 06/22] arm-trusted-firmware-rockchip: Update to 2.10 Runtime tested on Orange Pi R1 Plus LTS (RK3328) and NanoPi R4S (RK3399). Changelog: https://trustedfirmware-a.readthedocs.io/en/v2.10/change-log.html Signed-off-by: Tianling Shen --- package/boot/arm-trusted-firmware-rockchip/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/boot/arm-trusted-firmware-rockchip/Makefile b/package/boot/arm-trusted-firmware-rockchip/Makefile index aaae4ce392..6fbcbef0a8 100644 --- a/package/boot/arm-trusted-firmware-rockchip/Makefile +++ b/package/boot/arm-trusted-firmware-rockchip/Makefile @@ -7,10 +7,10 @@ include $(TOPDIR)/rules.mk -PKG_VERSION:=2.9 +PKG_VERSION:=2.10 PKG_RELEASE:=1 -PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b +PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201 PKG_MAINTAINER:=Tobias Maedel From 7939df9587b9627f3032ad070e8b43afee8c840f Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 10 Jan 2024 17:12:46 +0800 Subject: [PATCH 07/22] uboot-rockchip: Update to 2024.01 Runtime tested on Orange Pi R1 Plus LTS and NanoPi R4S. Removed upstreamed patches: - 100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch - 101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch - 103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch - 104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch Refreshed remaining patches. Signed-off-by: Tianling Shen --- package/boot/uboot-rockchip/Makefile | 4 +- ...28-Add-support-for-Orange-Pi-R1-Plus.patch | 594 ------------ ...Add-support-for-Orange-Pi-R1-Plus-LT.patch | 257 ----- ...Add-support-for-FriendlyARM-NanoPi-R.patch | 917 ------------------ ...Add-support-for-FriendlyARM-NanoPi-R.patch | 269 ----- ...105-nanopc-t4-fix-memory-unstability.patch | 2 - 6 files changed, 2 insertions(+), 2041 deletions(-) delete mode 100644 package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch delete mode 100644 package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch delete mode 100644 package/boot/uboot-rockchip/patches/103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch delete mode 100644 package/boot/uboot-rockchip/patches/104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 1dad3c1e1c..71eac09d98 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2023.07.02 +PKG_VERSION:=2024.01 PKG_RELEASE:=1 -PKG_HASH:=6b6a48581c14abb0f95bd87c1af4d740922406d7b801002a9f94727fdde021d5 +PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3 PKG_MAINTAINER:=Tobias Maedel diff --git a/package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch b/package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch deleted file mode 100644 index 487e6afda8..0000000000 --- a/package/boot/uboot-rockchip/patches/100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch +++ /dev/null @@ -1,594 +0,0 @@ -From 89afb631d965292aaf433806d8224b53d9e74036 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Sat, 20 May 2023 18:50:38 +0800 -Subject: [PATCH] rockchip: rk3328: Add support for Orange Pi R1 Plus - -Orange Pi R1 Plus is a Rockchip RK3328 based SBC by Xunlong. - -This device is similar to the NanoPi R2S, and has a 16MB -SPI NOR (mx25l12805d). The reset button is changed to -directly reset the power supply, another detail is that -both network ports have independent MAC addresses. - -The device tree and description are taken from kernel v6.3-rc1. - -Reviewed-by: Kever Yang -Signed-off-by: Tianling Shen ---- - arch/arm/dts/Makefile | 1 + - .../dts/rk3328-orangepi-r1-plus-u-boot.dtsi | 46 +++ - arch/arm/dts/rk3328-orangepi-r1-plus.dts | 373 ++++++++++++++++++ - board/rockchip/evb_rk3328/MAINTAINERS | 6 + - configs/orangepi-r1-plus-rk3328_defconfig | 114 ++++++ - 5 files changed, 540 insertions(+) - create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi - create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus.dts - create mode 100644 configs/orangepi-r1-plus-rk3328_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -125,6 +125,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3328) += \ - rk3328-evb.dtb \ - rk3328-nanopi-r2c.dtb \ - rk3328-nanopi-r2s.dtb \ -+ rk3328-orangepi-r1-plus.dtb \ - rk3328-roc-cc.dtb \ - rk3328-rock64.dtb \ - rk3328-rock-pi-e.dtb ---- /dev/null -+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi -@@ -0,0 +1,46 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* -+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd -+ * (C) Copyright 2020 David Bauer -+ */ -+ -+#include "rk3328-u-boot.dtsi" -+#include "rk3328-sdram-ddr4-666.dtsi" -+/ { -+ chosen { -+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; -+ }; -+}; -+ -+&gpio0 { -+ bootph-pre-ram; -+}; -+ -+&pinctrl { -+ bootph-pre-ram; -+}; -+ -+&sdmmc0m1_pin { -+ bootph-pre-ram; -+}; -+ -+&pcfg_pull_up_4ma { -+ bootph-pre-ram; -+}; -+ -+/* Need this and all the pinctrl/gpio stuff above to set pinmux */ -+&vcc_sd { -+ bootph-pre-ram; -+}; -+ -+&gmac2io { -+ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ snps,reset-delays-us = <0 10000 50000>; -+}; -+ -+&spi0 { -+ spi_flash: spiflash@0 { -+ bootph-all; -+ }; -+}; ---- /dev/null -+++ b/arch/arm/dts/rk3328-orangepi-r1-plus.dts -@@ -0,0 +1,373 @@ -+// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -+/* -+ * Based on rk3328-nanopi-r2s.dts, which is: -+ * Copyright (c) 2020 David Bauer -+ */ -+ -+/dts-v1/; -+ -+#include -+#include -+#include "rk3328.dtsi" -+ -+/ { -+ model = "Xunlong Orange Pi R1 Plus"; -+ compatible = "xunlong,orangepi-r1-plus", "rockchip,rk3328"; -+ -+ aliases { -+ ethernet1 = &rtl8153; -+ mmc0 = &sdmmc; -+ }; -+ -+ chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+ -+ gmac_clk: gmac-clock { -+ compatible = "fixed-clock"; -+ clock-frequency = <125000000>; -+ clock-output-names = "gmac_clkin"; -+ #clock-cells = <0>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>; -+ pinctrl-names = "default"; -+ -+ led-0 { -+ function = LED_FUNCTION_LAN; -+ color = ; -+ gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-1 { -+ function = LED_FUNCTION_STATUS; -+ color = ; -+ gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ led-2 { -+ function = LED_FUNCTION_WAN; -+ color = ; -+ gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+ -+ vcc_sd: sdmmc-regulator { -+ compatible = "regulator-fixed"; -+ gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_LOW>; -+ pinctrl-0 = <&sdmmc0m1_pin>; -+ pinctrl-names = "default"; -+ regulator-name = "vcc_sd"; -+ regulator-boot-on; -+ vin-supply = <&vcc_io>; -+ }; -+ -+ vcc_sys: vcc-sys-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc_sys"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ }; -+ -+ vdd_5v_lan: vdd-5v-lan-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; -+ pinctrl-0 = <&lan_vdd_pin>; -+ pinctrl-names = "default"; -+ regulator-name = "vdd_5v_lan"; -+ regulator-always-on; -+ regulator-boot-on; -+ vin-supply = <&vcc_sys>; -+ }; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vdd_arm>; -+}; -+ -+&cpu1 { -+ cpu-supply = <&vdd_arm>; -+}; -+ -+&cpu2 { -+ cpu-supply = <&vdd_arm>; -+}; -+ -+&cpu3 { -+ cpu-supply = <&vdd_arm>; -+}; -+ -+&display_subsystem { -+ status = "disabled"; -+}; -+ -+&gmac2io { -+ assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; -+ assigned-clock-parents = <&gmac_clk>, <&gmac_clk>; -+ clock_in_out = "input"; -+ phy-handle = <&rtl8211e>; -+ phy-mode = "rgmii"; -+ phy-supply = <&vcc_io>; -+ pinctrl-0 = <&rgmiim1_pins>; -+ pinctrl-names = "default"; -+ snps,aal; -+ rx_delay = <0x18>; -+ tx_delay = <0x24>; -+ status = "okay"; -+ -+ mdio { -+ compatible = "snps,dwmac-mdio"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ rtl8211e: ethernet-phy@1 { -+ reg = <1>; -+ pinctrl-0 = <ð_phy_reset_pin>; -+ pinctrl-names = "default"; -+ reset-assert-us = <10000>; -+ reset-deassert-us = <50000>; -+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; -+ -+&i2c1 { -+ status = "okay"; -+ -+ rk805: pmic@18 { -+ compatible = "rockchip,rk805"; -+ reg = <0x18>; -+ interrupt-parent = <&gpio1>; -+ interrupts = <24 IRQ_TYPE_LEVEL_LOW>; -+ #clock-cells = <1>; -+ clock-output-names = "xin32k", "rk805-clkout2"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ pinctrl-0 = <&pmic_int_l>; -+ pinctrl-names = "default"; -+ rockchip,system-power-controller; -+ wakeup-source; -+ -+ vcc1-supply = <&vcc_sys>; -+ vcc2-supply = <&vcc_sys>; -+ vcc3-supply = <&vcc_sys>; -+ vcc4-supply = <&vcc_sys>; -+ vcc5-supply = <&vcc_io>; -+ vcc6-supply = <&vcc_sys>; -+ -+ regulators { -+ vdd_log: DCDC_REG1 { -+ regulator-name = "vdd_log"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1450000>; -+ regulator-ramp-delay = <12500>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1000000>; -+ }; -+ }; -+ -+ vdd_arm: DCDC_REG2 { -+ regulator-name = "vdd_arm"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <712500>; -+ regulator-max-microvolt = <1450000>; -+ regulator-ramp-delay = <12500>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <950000>; -+ }; -+ }; -+ -+ vcc_ddr: DCDC_REG3 { -+ regulator-name = "vcc_ddr"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ vcc_io: DCDC_REG4 { -+ regulator-name = "vcc_io"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3300000>; -+ }; -+ }; -+ -+ vcc_18: LDO_REG1 { -+ regulator-name = "vcc_18"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcc18_emmc: LDO_REG2 { -+ regulator-name = "vcc18_emmc"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vdd_10: LDO_REG3 { -+ regulator-name = "vdd_10"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1000000>; -+ regulator-max-microvolt = <1000000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1000000>; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+&io_domains { -+ pmuio-supply = <&vcc_io>; -+ vccio1-supply = <&vcc_io>; -+ vccio2-supply = <&vcc18_emmc>; -+ vccio3-supply = <&vcc_io>; -+ vccio4-supply = <&vcc_io>; -+ vccio5-supply = <&vcc_io>; -+ vccio6-supply = <&vcc_io>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ gmac2io { -+ eth_phy_reset_pin: eth-phy-reset-pin { -+ rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>; -+ }; -+ }; -+ -+ leds { -+ lan_led_pin: lan-led-pin { -+ rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ sys_led_pin: sys-led-pin { -+ rockchip,pins = <3 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ wan_led_pin: wan-led-pin { -+ rockchip,pins = <2 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ lan { -+ lan_vdd_pin: lan-vdd-pin { -+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ pmic { -+ pmic_int_l: pmic-int-l { -+ rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+}; -+ -+&pwm2 { -+ status = "okay"; -+}; -+ -+&sdmmc { -+ bus-width = <4>; -+ cap-sd-highspeed; -+ disable-wp; -+ pinctrl-0 = <&sdmmc0_clk>, <&sdmmc0_cmd>, <&sdmmc0_dectn>, <&sdmmc0_bus4>; -+ pinctrl-names = "default"; -+ vmmc-supply = <&vcc_sd>; -+ status = "okay"; -+}; -+ -+&spi0 { -+ status = "okay"; -+ -+ flash@0 { -+ compatible = "jedec,spi-nor"; -+ reg = <0>; -+ spi-max-frequency = <50000000>; -+ }; -+}; -+ -+&tsadc { -+ rockchip,hw-tshut-mode = <0>; -+ rockchip,hw-tshut-polarity = <0>; -+ status = "okay"; -+}; -+ -+&u2phy { -+ status = "okay"; -+}; -+ -+&u2phy_host { -+ status = "okay"; -+}; -+ -+&u2phy_otg { -+ status = "okay"; -+}; -+ -+&uart2 { -+ status = "okay"; -+}; -+ -+&usb20_otg { -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ -+&usbdrd3 { -+ dr_mode = "host"; -+ status = "okay"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ /* Second port is for USB 3.0 */ -+ rtl8153: device@2 { -+ compatible = "usbbda,8153"; -+ reg = <2>; -+ }; -+}; -+ -+&usb_host0_ehci { -+ status = "okay"; -+}; -+ -+&usb_host0_ohci { -+ status = "okay"; -+}; ---- a/board/rockchip/evb_rk3328/MAINTAINERS -+++ b/board/rockchip/evb_rk3328/MAINTAINERS -@@ -18,6 +18,12 @@ F: configs/nanopi-r2s-rk3328_defcon - F: arch/arm/dts/rk3328-nanopi-r2s-u-boot.dtsi - F: arch/arm/dts/rk3328-nanopi-r2s.dts - -+ORANGEPI-R1-PLUS-RK3328 -+M: Tianling Shen -+S: Maintained -+F: configs/orangepi-r1-plus-rk3328_defconfig -+F: arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi -+ - ROC-RK3328-CC - M: Loic Devulder - M: Chen-Yu Tsai ---- /dev/null -+++ b/configs/orangepi-r1-plus-rk3328_defconfig -@@ -0,0 +1,114 @@ -+CONFIG_ARM=y -+CONFIG_SKIP_LOWLEVEL_INIT=y -+CONFIG_COUNTER_FREQUENCY=24000000 -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_TEXT_BASE=0x00200000 -+CONFIG_SPL_GPIO=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 -+CONFIG_ENV_OFFSET=0x3F8000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus" -+CONFIG_DM_RESET=y -+CONFIG_ROCKCHIP_RK3328=y -+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y -+CONFIG_TPL_LIBCOMMON_SUPPORT=y -+CONFIG_TPL_LIBGENERIC_SUPPORT=y -+CONFIG_SPL_DRIVERS_MISC=y -+CONFIG_SPL_STACK_R_ADDR=0x600000 -+CONFIG_SPL_STACK=0x400000 -+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 -+CONFIG_DEBUG_UART_BASE=0xFF130000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0x800800 -+CONFIG_DEBUG_UART=y -+# CONFIG_ANDROID_BOOT_IMAGE is not set -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus.dtb" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_MISC_INIT_R=y -+CONFIG_SPL_MAX_SIZE=0x40000 -+CONFIG_SPL_PAD_TO=0x7f8000 -+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -+CONFIG_SPL_BSS_START_ADDR=0x2000000 -+CONFIG_SPL_BSS_MAX_SIZE=0x2000 -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_I2C=y -+CONFIG_SPL_POWER=y -+CONFIG_SPL_ATF=y -+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y -+CONFIG_TPL_SYS_MALLOC_SIMPLE=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_TIME=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_TPL_OF_CONTROL=y -+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_TPL_OF_PLATDATA=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_SYS_MMC_ENV_DEV=1 -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_TPL_DM=y -+CONFIG_REGMAP=y -+CONFIG_SPL_REGMAP=y -+CONFIG_TPL_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_SYSCON=y -+CONFIG_TPL_SYSCON=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_FASTBOOT_BUF_ADDR=0x800800 -+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_SF_DEFAULT_SPEED=20000000 -+CONFIG_SPI_FLASH_GIGADEVICE=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PINCTRL=y -+CONFIG_SPL_PINCTRL=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_SPL_PMIC_RK8XX=y -+CONFIG_SPL_DM_REGULATOR=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_TPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYS_NS16550_MEM32=y -+CONFIG_ROCKCHIP_SPI=y -+CONFIG_SYSINFO=y -+CONFIG_SYSRESET=y -+# CONFIG_TPL_SYSRESET is not set -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_XHCI_DWC3=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_OHCI_HCD=y -+CONFIG_USB_OHCI_GENERIC=y -+CONFIG_USB_DWC2=y -+CONFIG_USB_DWC3=y -+# CONFIG_USB_DWC3_GADGET is not set -+CONFIG_USB_GADGET=y -+CONFIG_USB_GADGET_DWC2_OTG=y -+CONFIG_SPL_TINY_MEMSET=y -+CONFIG_TPL_TINY_MEMSET=y -+CONFIG_ERRNO_STR=y diff --git a/package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch b/package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch deleted file mode 100644 index 56d36c74dc..0000000000 --- a/package/boot/uboot-rockchip/patches/101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch +++ /dev/null @@ -1,257 +0,0 @@ -From 408fd4570c0f1e6b1fe3722998394651144f2a29 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Sat, 20 May 2023 18:52:14 +0800 -Subject: [PATCH] rockchip: rk3328: Add support for Orange Pi R1 Plus LTS - -The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with -the on-board NIC chip changed from rtl8211e to yt8531c, and RAM type -changed from DDR4 to LPDDR3. - -The device tree is taken from kernel v6.4-rc1. - -Signed-off-by: Tianling Shen ---- - arch/arm/dts/Makefile | 1 + - .../rk3328-orangepi-r1-plus-lts-u-boot.dtsi | 46 +++++++ - arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts | 40 ++++++ - board/rockchip/evb_rk3328/MAINTAINERS | 6 + - configs/orangepi-r1-plus-lts-rk3328_defconfig | 114 ++++++++++++++++++ - 5 files changed, 207 insertions(+) - create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi - create mode 100644 arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts - create mode 100644 configs/orangepi-r1-plus-lts-rk3328_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -126,6 +126,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3328) += \ - rk3328-nanopi-r2c.dtb \ - rk3328-nanopi-r2s.dtb \ - rk3328-orangepi-r1-plus.dtb \ -+ rk3328-orangepi-r1-plus-lts.dtb \ - rk3328-roc-cc.dtb \ - rk3328-rock64.dtb \ - rk3328-rock-pi-e.dtb ---- /dev/null -+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi -@@ -0,0 +1,46 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later -+/* -+ * (C) Copyright 2018-2019 Rockchip Electronics Co., Ltd -+ * (C) Copyright 2020 David Bauer -+ */ -+ -+#include "rk3328-u-boot.dtsi" -+#include "rk3328-sdram-lpddr3-666.dtsi" -+/ { -+ chosen { -+ u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc; -+ }; -+}; -+ -+&gpio0 { -+ bootph-pre-ram; -+}; -+ -+&pinctrl { -+ bootph-pre-ram; -+}; -+ -+&sdmmc0m1_pin { -+ bootph-pre-ram; -+}; -+ -+&pcfg_pull_up_4ma { -+ bootph-pre-ram; -+}; -+ -+/* Need this and all the pinctrl/gpio stuff above to set pinmux */ -+&vcc_sd { -+ bootph-pre-ram; -+}; -+ -+&gmac2io { -+ snps,reset-gpio = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ snps,reset-delays-us = <0 10000 50000>; -+}; -+ -+&spi0 { -+ spi_flash: spiflash@0 { -+ bootph-all; -+ }; -+}; ---- /dev/null -+++ b/arch/arm/dts/rk3328-orangepi-r1-plus-lts.dts -@@ -0,0 +1,40 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2016 Xunlong Software. Co., Ltd. -+ * (http://www.orangepi.org) -+ * -+ * Copyright (c) 2021-2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include "rk3328-orangepi-r1-plus.dts" -+ -+/ { -+ model = "Xunlong Orange Pi R1 Plus LTS"; -+ compatible = "xunlong,orangepi-r1-plus-lts", "rockchip,rk3328"; -+}; -+ -+&gmac2io { -+ phy-handle = <&yt8531c>; -+ tx_delay = <0x19>; -+ rx_delay = <0x05>; -+ -+ mdio { -+ /delete-node/ ethernet-phy@1; -+ -+ yt8531c: ethernet-phy@0 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <0>; -+ -+ motorcomm,clk-out-frequency-hz = <125000000>; -+ motorcomm,keep-pll-enabled; -+ motorcomm,auto-sleep-disabled; -+ -+ pinctrl-0 = <ð_phy_reset_pin>; -+ pinctrl-names = "default"; -+ reset-assert-us = <15000>; -+ reset-deassert-us = <50000>; -+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+}; ---- a/board/rockchip/evb_rk3328/MAINTAINERS -+++ b/board/rockchip/evb_rk3328/MAINTAINERS -@@ -24,6 +24,12 @@ S: Maintained - F: configs/orangepi-r1-plus-rk3328_defconfig - F: arch/arm/dts/rk3328-orangepi-r1-plus-u-boot.dtsi - -+ORANGEPI-R1-PLUS-LTS-RK3328 -+M: Tianling Shen -+S: Maintained -+F: configs/orangepi-r1-plus-lts-rk3328_defconfig -+F: arch/arm/dts/rk3328-orangepi-r1-plus-lts-u-boot.dtsi -+ - ROC-RK3328-CC - M: Loic Devulder - M: Chen-Yu Tsai ---- /dev/null -+++ b/configs/orangepi-r1-plus-lts-rk3328_defconfig -@@ -0,0 +1,114 @@ -+CONFIG_ARM=y -+CONFIG_SKIP_LOWLEVEL_INIT=y -+CONFIG_COUNTER_FREQUENCY=24000000 -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_TEXT_BASE=0x00200000 -+CONFIG_SPL_GPIO=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000 -+CONFIG_ENV_OFFSET=0x3F8000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3328-orangepi-r1-plus-lts" -+CONFIG_DM_RESET=y -+CONFIG_ROCKCHIP_RK3328=y -+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y -+CONFIG_TPL_LIBCOMMON_SUPPORT=y -+CONFIG_TPL_LIBGENERIC_SUPPORT=y -+CONFIG_SPL_DRIVERS_MISC=y -+CONFIG_SPL_STACK_R_ADDR=0x600000 -+CONFIG_SPL_STACK=0x400000 -+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800 -+CONFIG_DEBUG_UART_BASE=0xFF130000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0x800800 -+CONFIG_DEBUG_UART=y -+# CONFIG_ANDROID_BOOT_IMAGE is not set -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-orangepi-r1-plus-lts.dtb" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_MISC_INIT_R=y -+CONFIG_SPL_MAX_SIZE=0x40000 -+CONFIG_SPL_PAD_TO=0x7f8000 -+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -+CONFIG_SPL_BSS_START_ADDR=0x2000000 -+CONFIG_SPL_BSS_MAX_SIZE=0x2000 -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_I2C=y -+CONFIG_SPL_POWER=y -+CONFIG_SPL_ATF=y -+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y -+CONFIG_TPL_SYS_MALLOC_SIMPLE=y -+CONFIG_CMD_BOOTZ=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+# CONFIG_CMD_SETEXPR is not set -+CONFIG_CMD_TIME=y -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_TPL_OF_CONTROL=y -+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_TPL_OF_PLATDATA=y -+CONFIG_ENV_IS_IN_MMC=y -+CONFIG_SYS_RELOC_GD_ENV_ADDR=y -+CONFIG_SYS_MMC_ENV_DEV=1 -+CONFIG_NET_RANDOM_ETHADDR=y -+CONFIG_TPL_DM=y -+CONFIG_REGMAP=y -+CONFIG_SPL_REGMAP=y -+CONFIG_TPL_REGMAP=y -+CONFIG_SYSCON=y -+CONFIG_SPL_SYSCON=y -+CONFIG_TPL_SYSCON=y -+CONFIG_CLK=y -+CONFIG_SPL_CLK=y -+CONFIG_FASTBOOT_BUF_ADDR=0x800800 -+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_SF_DEFAULT_SPEED=20000000 -+CONFIG_SPI_FLASH_GIGADEVICE=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PINCTRL=y -+CONFIG_SPL_PINCTRL=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_SPL_PMIC_RK8XX=y -+CONFIG_SPL_DM_REGULATOR=y -+CONFIG_REGULATOR_PWM=y -+CONFIG_DM_REGULATOR_FIXED=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_RAM=y -+CONFIG_SPL_RAM=y -+CONFIG_TPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYS_NS16550_MEM32=y -+CONFIG_ROCKCHIP_SPI=y -+CONFIG_SYSINFO=y -+CONFIG_SYSRESET=y -+# CONFIG_TPL_SYSRESET is not set -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_XHCI_DWC3=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_OHCI_HCD=y -+CONFIG_USB_OHCI_GENERIC=y -+CONFIG_USB_DWC2=y -+CONFIG_USB_DWC3=y -+# CONFIG_USB_DWC3_GADGET is not set -+CONFIG_USB_GADGET=y -+CONFIG_USB_GADGET_DWC2_OTG=y -+CONFIG_SPL_TINY_MEMSET=y -+CONFIG_TPL_TINY_MEMSET=y -+CONFIG_ERRNO_STR=y diff --git a/package/boot/uboot-rockchip/patches/103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch b/package/boot/uboot-rockchip/patches/103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch deleted file mode 100644 index 09cafb3227..0000000000 --- a/package/boot/uboot-rockchip/patches/103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch +++ /dev/null @@ -1,917 +0,0 @@ -From c84214aab0e4c5b2f619dd89655f27b3ae40e82b Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Tue, 30 May 2023 15:00:33 +0800 -Subject: [PATCH] rockchip: rk3568: Add support for FriendlyARM NanoPi R5S - -FriendlyARM NanoPi R5S is an open-sourced mini IoT gateway device. - -Board Specifications -- Rockchip RK3568 -- 2 or 4GB LPDDR4X -- 8GB or 16GB eMMC, SD card slot -- GbE LAN (Native) -- 2x 2.5G LAN (PCIe) -- M.2 Connector -- HDMI 2.0, MIPI DSI/CSI -- 2xUSB 3.0 Host -- USB Type C PD, 5V/9V/12V -- GPIO: 12-pin 0.5mm FPC connector - -The device tree is taken from kernel v6.4-rc1. - -Reviewed-by: Kever Yang -Signed-off-by: Tianling Shen ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 31 ++ - arch/arm/dts/rk3568-nanopi-r5s.dts | 136 +++++ - arch/arm/dts/rk3568-nanopi-r5s.dtsi | 590 +++++++++++++++++++++ - board/rockchip/evb_rk3568/MAINTAINERS | 8 + - configs/nanopi-r5s-rk3568_defconfig | 85 +++ - 6 files changed, 851 insertions(+) - create mode 100644 arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi - create mode 100644 arch/arm/dts/rk3568-nanopi-r5s.dts - create mode 100644 arch/arm/dts/rk3568-nanopi-r5s.dtsi - create mode 100644 configs/nanopi-r5s-rk3568_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ - rk3566-anbernic-rgxx3.dtb \ - rk3566-radxa-cm3-io.dtb \ - rk3568-evb.dtb \ -+ rk3568-nanopi-r5s.dtb \ - rk3568-rock-3a.dtb - - dtb-$(CONFIG_ROCKCHIP_RK3588) += \ ---- /dev/null -+++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi -@@ -0,0 +1,31 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd. -+ * (http://www.friendlyelec.com) -+ * -+ * Copyright (c) 2023 Tianling Shen -+ */ -+ -+#include "rk356x-u-boot.dtsi" -+ -+/ { -+ chosen { -+ stdout-path = &uart2; -+ u-boot,spl-boot-order = "same-as-spl", &sdmmc0, &sdhci; -+ }; -+}; -+ -+&sdhci { -+ cap-mmc-highspeed; -+ mmc-ddr-1_8v; -+ mmc-hs200-1_8v; -+ mmc-hs400-1_8v; -+ mmc-hs400-enhanced-strobe; -+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>; -+}; -+ -+&uart2 { -+ clock-frequency = <24000000>; -+ bootph-all; -+ status = "okay"; -+}; ---- /dev/null -+++ b/arch/arm/dts/rk3568-nanopi-r5s.dts -@@ -0,0 +1,136 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd. -+ * (http://www.friendlyelec.com) -+ * -+ * Copyright (c) 2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include "rk3568-nanopi-r5s.dtsi" -+ -+/ { -+ model = "FriendlyElec NanoPi R5S"; -+ compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568"; -+ -+ aliases { -+ ethernet0 = &gmac0; -+ }; -+ -+ gpio-leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lan1_led_pin>, <&lan2_led_pin>, <&power_led_pin>, <&wan_led_pin>; -+ -+ led-lan1 { -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <1>; -+ gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-lan2 { -+ color = ; -+ function = LED_FUNCTION_LAN; -+ function-enumerator = <2>; -+ gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ power_led: led-power { -+ color = ; -+ function = LED_FUNCTION_POWER; -+ linux,default-trigger = "heartbeat"; -+ gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-wan { -+ color = ; -+ function = LED_FUNCTION_WAN; -+ gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+}; -+ -+&gmac0 { -+ assigned-clocks = <&cru SCLK_GMAC0_RX_TX>, <&cru SCLK_GMAC0>; -+ assigned-clock-parents = <&cru SCLK_GMAC0_RGMII_SPEED>, <&cru CLK_MAC0_2TOP>; -+ assigned-clock-rates = <0>, <125000000>; -+ clock_in_out = "output"; -+ phy-handle = <&rgmii_phy0>; -+ phy-mode = "rgmii"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&gmac0_miim -+ &gmac0_tx_bus2 -+ &gmac0_rx_bus2 -+ &gmac0_rgmii_clk -+ &gmac0_rgmii_bus>; -+ snps,reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>; -+ snps,reset-active-low; -+ /* Reset time is 15ms, 50ms for rtl8211f */ -+ snps,reset-delays-us = <0 15000 50000>; -+ tx_delay = <0x3c>; -+ rx_delay = <0x2f>; -+ status = "okay"; -+}; -+ -+&mdio0 { -+ rgmii_phy0: ethernet-phy@1 { -+ compatible = "ethernet-phy-ieee802.3-c22"; -+ reg = <1>; -+ pinctrl-0 = <ð_phy0_reset_pin>; -+ pinctrl-names = "default"; -+ }; -+}; -+ -+&pcie2x1 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ -+&pcie30phy { -+ data-lanes = <1 2>; -+ status = "okay"; -+}; -+ -+&pcie3x1 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pcie3x2 { -+ num-lanes = <1>; -+ num-ib-windows = <8>; -+ num-ob-windows = <8>; -+ reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ gmac0 { -+ eth_phy0_reset_pin: eth-phy0-reset-pin { -+ rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ gpio-leds { -+ lan1_led_pin: lan1-led-pin { -+ rockchip,pins = <3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ lan2_led_pin: lan2-led-pin { -+ rockchip,pins = <3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ power_led_pin: power-led-pin { -+ rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ wan_led_pin: wan-led-pin { -+ rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; ---- /dev/null -+++ b/arch/arm/dts/rk3568-nanopi-r5s.dtsi -@@ -0,0 +1,590 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd. -+ * (http://www.friendlyelec.com) -+ * -+ * Copyright (c) 2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include -+#include -+#include -+#include -+#include -+#include "rk3568.dtsi" -+ -+/ { -+ aliases { -+ mmc0 = &sdmmc0; -+ mmc1 = &sdhci; -+ }; -+ -+ chosen: chosen { -+ stdout-path = "serial2:1500000n8"; -+ }; -+ -+ hdmi-con { -+ compatible = "hdmi-connector"; -+ type = "a"; -+ -+ port { -+ hdmi_con_in: endpoint { -+ remote-endpoint = <&hdmi_out_con>; -+ }; -+ }; -+ }; -+ -+ vdd_usbc: vdd-usbc-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vdd_usbc"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ }; -+ -+ vcc3v3_sys: vcc3v3-sys-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_sys"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ vin-supply = <&vdd_usbc>; -+ }; -+ -+ vcc5v0_sys: vcc5v0-sys-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc5v0_sys"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vdd_usbc>; -+ }; -+ -+ vcc3v3_pcie: vcc3v3-pcie-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc3v3_pcie"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ enable-active-high; -+ gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>; -+ startup-delay-us = <200000>; -+ vin-supply = <&vcc5v0_sys>; -+ }; -+ -+ vcc5v0_usb: vcc5v0-usb-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "vcc5v0_usb"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vdd_usbc>; -+ }; -+ -+ vcc5v0_usb_host: vcc5v0-usb-host-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vcc5v0_usb_host_en>; -+ regulator-name = "vcc5v0_usb_host"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc5v0_usb>; -+ }; -+ -+ vcc5v0_usb_otg: vcc5v0-usb-otg-regulator { -+ compatible = "regulator-fixed"; -+ enable-active-high; -+ gpio = <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&vcc5v0_usb_otg_en>; -+ regulator-name = "vcc5v0_usb_otg"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; -+ vin-supply = <&vcc5v0_usb>; -+ }; -+ -+ pcie30_avdd0v9: pcie30-avdd0v9-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "pcie30_avdd0v9"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <900000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+ -+ pcie30_avdd1v8: pcie30-avdd1v8-regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "pcie30_avdd1v8"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ vin-supply = <&vcc3v3_sys>; -+ }; -+}; -+ -+&combphy0 { -+ status = "okay"; -+}; -+ -+&combphy1 { -+ status = "okay"; -+}; -+ -+&combphy2 { -+ status = "okay"; -+}; -+ -+&cpu0 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu1 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu2 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&cpu3 { -+ cpu-supply = <&vdd_cpu>; -+}; -+ -+&gpu { -+ mali-supply = <&vdd_gpu>; -+ status = "okay"; -+}; -+ -+&hdmi { -+ avdd-0v9-supply = <&vdda0v9_image>; -+ avdd-1v8-supply = <&vcca1v8_image>; -+ status = "okay"; -+}; -+ -+&hdmi_in { -+ hdmi_in_vp0: endpoint { -+ remote-endpoint = <&vp0_out_hdmi>; -+ }; -+}; -+ -+&hdmi_out { -+ hdmi_out_con: endpoint { -+ remote-endpoint = <&hdmi_con_in>; -+ }; -+}; -+ -+&hdmi_sound { -+ status = "okay"; -+}; -+ -+&i2c0 { -+ status = "okay"; -+ -+ vdd_cpu: regulator@1c { -+ compatible = "tcs,tcs4525"; -+ reg = <0x1c>; -+ fcs,suspend-voltage-selector = <1>; -+ regulator-name = "vdd_cpu"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <800000>; -+ regulator-max-microvolt = <1150000>; -+ regulator-ramp-delay = <2300>; -+ vin-supply = <&vcc5v0_sys>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ rk809: pmic@20 { -+ compatible = "rockchip,rk809"; -+ reg = <0x20>; -+ interrupt-parent = <&gpio0>; -+ interrupts = ; -+ #clock-cells = <1>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pmic_int>; -+ rockchip,system-power-controller; -+ vcc1-supply = <&vcc3v3_sys>; -+ vcc2-supply = <&vcc3v3_sys>; -+ vcc3-supply = <&vcc3v3_sys>; -+ vcc4-supply = <&vcc3v3_sys>; -+ vcc5-supply = <&vcc3v3_sys>; -+ vcc6-supply = <&vcc3v3_sys>; -+ vcc7-supply = <&vcc3v3_sys>; -+ vcc8-supply = <&vcc3v3_sys>; -+ vcc9-supply = <&vcc3v3_sys>; -+ wakeup-source; -+ -+ regulators { -+ vdd_logic: DCDC_REG1 { -+ regulator-name = "vdd_logic"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-init-microvolt = <900000>; -+ regulator-initial-mode = <0x2>; -+ regulator-min-microvolt = <500000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <6001>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdd_gpu: DCDC_REG2 { -+ regulator-name = "vdd_gpu"; -+ regulator-always-on; -+ regulator-init-microvolt = <900000>; -+ regulator-initial-mode = <0x2>; -+ regulator-min-microvolt = <500000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <6001>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_ddr: DCDC_REG3 { -+ regulator-name = "vcc_ddr"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-initial-mode = <0x2>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ }; -+ }; -+ -+ vdd_npu: DCDC_REG4 { -+ regulator-name = "vdd_npu"; -+ regulator-init-microvolt = <900000>; -+ regulator-initial-mode = <0x2>; -+ regulator-min-microvolt = <500000>; -+ regulator-max-microvolt = <1350000>; -+ regulator-ramp-delay = <6001>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_1v8: DCDC_REG5 { -+ regulator-name = "vcc_1v8"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdda0v9_image: LDO_REG1 { -+ regulator-name = "vdda0v9_image"; -+ regulator-min-microvolt = <950000>; -+ regulator-max-microvolt = <950000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdda_0v9: LDO_REG2 { -+ regulator-name = "vdda_0v9"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <900000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vdda0v9_pmu: LDO_REG3 { -+ regulator-name = "vdda0v9_pmu"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <900000>; -+ regulator-max-microvolt = <900000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <900000>; -+ }; -+ }; -+ -+ vccio_acodec: LDO_REG4 { -+ regulator-name = "vccio_acodec"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vccio_sd: LDO_REG5 { -+ regulator-name = "vccio_sd"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <3300000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc3v3_pmu: LDO_REG6 { -+ regulator-name = "vcc3v3_pmu"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <3300000>; -+ }; -+ }; -+ -+ vcca_1v8: LDO_REG7 { -+ regulator-name = "vcca_1v8"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcca1v8_pmu: LDO_REG8 { -+ regulator-name = "vcca1v8_pmu"; -+ regulator-always-on; -+ regulator-boot-on; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-on-in-suspend; -+ regulator-suspend-microvolt = <1800000>; -+ }; -+ }; -+ -+ vcca1v8_image: LDO_REG9 { -+ regulator-name = "vcca1v8_image"; -+ regulator-min-microvolt = <1800000>; -+ regulator-max-microvolt = <1800000>; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc_3v3: SWITCH_REG1 { -+ regulator-name = "vcc_3v3"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ -+ vcc3v3_sd: SWITCH_REG2 { -+ regulator-name = "vcc3v3_sd"; -+ regulator-always-on; -+ regulator-boot-on; -+ -+ regulator-state-mem { -+ regulator-off-in-suspend; -+ }; -+ }; -+ }; -+ -+ }; -+}; -+ -+&i2c5 { -+ status = "okay"; -+ -+ hym8563: rtc@51 { -+ compatible = "haoyu,hym8563"; -+ reg = <0x51>; -+ interrupt-parent = <&gpio0>; -+ interrupts = ; -+ #clock-cells = <0>; -+ clock-output-names = "rtcic_32kout"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&hym8563_int>; -+ wakeup-source; -+ }; -+}; -+ -+&i2s0_8ch { -+ status = "okay"; -+}; -+ -+&pcie30phy { -+ data-lanes = <1 2>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ hym8563 { -+ hym8563_int: hym8563-int { -+ rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ pmic { -+ pmic_int: pmic-int { -+ rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ usb { -+ vcc5v0_usb_host_en: vcc5v0-usb-host-en { -+ rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ vcc5v0_usb_otg_en: vcc5v0-usb-otg-en { -+ rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+}; -+ -+&pmu_io_domains { -+ pmuio1-supply = <&vcc3v3_pmu>; -+ pmuio2-supply = <&vcc3v3_pmu>; -+ vccio1-supply = <&vccio_acodec>; -+ vccio3-supply = <&vccio_sd>; -+ vccio4-supply = <&vcc_1v8>; -+ vccio5-supply = <&vcc_3v3>; -+ vccio6-supply = <&vcc_1v8>; -+ vccio7-supply = <&vcc_3v3>; -+ status = "okay"; -+}; -+ -+&saradc { -+ vref-supply = <&vcca_1v8>; -+ status = "okay"; -+}; -+ -+&sdhci { -+ bus-width = <8>; -+ max-frequency = <200000000>; -+ non-removable; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd>; -+ status = "okay"; -+}; -+ -+&sdmmc0 { -+ max-frequency = <150000000>; -+ no-sdio; -+ no-mmc; -+ bus-width = <4>; -+ cap-mmc-highspeed; -+ cap-sd-highspeed; -+ disable-wp; -+ vmmc-supply = <&vcc3v3_sd>; -+ vqmmc-supply = <&vccio_sd>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>; -+ status = "okay"; -+}; -+ -+&tsadc { -+ rockchip,hw-tshut-mode = <1>; -+ rockchip,hw-tshut-polarity = <0>; -+ status = "okay"; -+}; -+ -+&uart2 { -+ status = "okay"; -+}; -+ -+&usb_host0_ehci { -+ status = "okay"; -+}; -+ -+&usb_host0_ohci { -+ status = "okay"; -+}; -+ -+&usb_host0_xhci { -+ extcon = <&usb2phy0>; -+ dr_mode = "host"; -+ status = "okay"; -+}; -+ -+&usb_host1_ehci { -+ status = "okay"; -+}; -+ -+&usb_host1_ohci { -+ status = "okay"; -+}; -+ -+&usb_host1_xhci { -+ status = "okay"; -+}; -+ -+&usb2phy0 { -+ status = "okay"; -+}; -+ -+&usb2phy0_host { -+ phy-supply = <&vcc5v0_usb_host>; -+ status = "okay"; -+}; -+ -+&usb2phy0_otg { -+ status = "okay"; -+}; -+ -+&usb2phy1 { -+ status = "okay"; -+}; -+ -+&usb2phy1_host { -+ phy-supply = <&vcc5v0_usb_otg>; -+ status = "okay"; -+}; -+ -+&usb2phy1_otg { -+ status = "okay"; -+}; -+ -+&vop { -+ assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>; -+ assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>; -+ status = "okay"; -+}; -+ -+&vop_mmu { -+ status = "okay"; -+}; -+ -+&vp0 { -+ vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { -+ reg = ; -+ remote-endpoint = <&hdmi_in_vp0>; -+ }; -+}; ---- a/board/rockchip/evb_rk3568/MAINTAINERS -+++ b/board/rockchip/evb_rk3568/MAINTAINERS -@@ -7,6 +7,14 @@ F: configs/evb-rk3568_defconfig - F: arch/arm/dts/rk3568-evb-boot.dtsi - F: arch/arm/dts/rk3568-evb.dts - -+NANOPI-R5S -+M: Tianling Shen -+S: Maintained -+F: configs/nanopi-r5s-rk3568_defconfig -+F: arch/arm/dts/rk3568-nanopi-r5s.dts -+F: arch/arm/dts/rk3568-nanopi-r5s.dtsi -+F: arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi -+ - RADXA-CM3 - M: Jagan Teki - S: Maintained ---- /dev/null -+++ b/configs/nanopi-r5s-rk3568_defconfig -@@ -0,0 +1,85 @@ -+CONFIG_ARM=y -+CONFIG_SKIP_LOWLEVEL_INIT=y -+CONFIG_COUNTER_FREQUENCY=24000000 -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_TEXT_BASE=0x00a00000 -+CONFIG_SPL_LIBCOMMON_SUPPORT=y -+CONFIG_SPL_LIBGENERIC_SUPPORT=y -+CONFIG_NR_DRAM_BANKS=2 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3568-nanopi-r5s" -+CONFIG_ROCKCHIP_RK3568=y -+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y -+CONFIG_SPL_SERIAL=y -+CONFIG_SPL_STACK_R_ADDR=0x600000 -+CONFIG_TARGET_EVB_RK3568=y -+CONFIG_SPL_STACK=0x400000 -+CONFIG_DEBUG_UART_BASE=0xFE660000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0xc00800 -+CONFIG_DEBUG_UART=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-nanopi-r5s.dtb" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_SPL_MAX_SIZE=0x40000 -+CONFIG_SPL_PAD_TO=0x7f8000 -+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -+CONFIG_SPL_BSS_START_ADDR=0x4000000 -+CONFIG_SPL_BSS_MAX_SIZE=0x4000 -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_ATF=y -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_I2C=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+CONFIG_CMD_PMIC=y -+CONFIG_CMD_REGULATOR=y -+# CONFIG_SPL_DOS_PARTITION is not set -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_OF_LIVE=y -+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_SPL_DM_WARN=y -+CONFIG_SPL_REGMAP=y -+CONFIG_SPL_SYSCON=y -+CONFIG_SPL_CLK=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MISC=y -+CONFIG_SUPPORT_EMMC_RPMB=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_SDMA=y -+CONFIG_MMC_SDHCI_ROCKCHIP=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PHY_ROCKCHIP_INNO_USB2=y -+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y -+CONFIG_POWER_DOMAIN=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_SPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYS_NS16550_MEM32=y -+CONFIG_SYSRESET=y -+CONFIG_SYSRESET_PSCI=y -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_XHCI_DWC3=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_OHCI_HCD=y -+CONFIG_USB_OHCI_GENERIC=y -+CONFIG_USB_DWC3=y -+CONFIG_ERRNO_STR=y diff --git a/package/boot/uboot-rockchip/patches/104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch b/package/boot/uboot-rockchip/patches/104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch deleted file mode 100644 index d1a5197e7d..0000000000 --- a/package/boot/uboot-rockchip/patches/104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch +++ /dev/null @@ -1,269 +0,0 @@ -From 41538742491c46100f570680c02fbdd0d2b6b880 Mon Sep 17 00:00:00 2001 -From: Tianling Shen -Date: Tue, 30 May 2023 15:00:33 +0800 -Subject: [PATCH] rockchip: rk3568: Add support for FriendlyARM NanoPi R5C - -FriendlyARM NanoPi R5C is an open-sourced mini IoT gateway device. - -Specification: -- Rockchip RK3568 -- 1/4GB LPDDR4X RAM -- 8/32GB eMMC -- SD card slot -- M.2 Connector -- 2x USB 3.0 Port -- 2x 2500 Base-T (PCIe, r8125) -- HDMI 2.0 -- MIPI DSI/CSI -- USB Type C 5V - -The device tree is taken from kernel v6.4-rc1. - -Reviewed-by: Kever Yang -Signed-off-by: Tianling Shen ---- - arch/arm/dts/Makefile | 1 + - arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi | 3 + - arch/arm/dts/rk3568-nanopi-r5c.dts | 112 +++++++++++++++++++++ - board/rockchip/evb_rk3568/MAINTAINERS | 7 ++ - configs/nanopi-r5c-rk3568_defconfig | 85 ++++++++++++++++ - 5 files changed, 208 insertions(+) - create mode 100644 arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi - create mode 100644 arch/arm/dts/rk3568-nanopi-r5c.dts - create mode 100644 configs/nanopi-r5c-rk3568_defconfig - ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -171,6 +171,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3568) += \ - rk3566-anbernic-rgxx3.dtb \ - rk3566-radxa-cm3-io.dtb \ - rk3568-evb.dtb \ -+ rk3568-nanopi-r5c.dtb \ - rk3568-nanopi-r5s.dtb \ - rk3568-rock-3a.dtb - ---- /dev/null -+++ b/arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi -@@ -0,0 +1,3 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+ -+#include "rk3568-nanopi-r5s-u-boot.dtsi" ---- /dev/null -+++ b/arch/arm/dts/rk3568-nanopi-r5c.dts -@@ -0,0 +1,112 @@ -+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -+/* -+ * Copyright (c) 2022 FriendlyElec Computer Tech. Co., Ltd. -+ * (http://www.friendlyelec.com) -+ * -+ * Copyright (c) 2023 Tianling Shen -+ */ -+ -+/dts-v1/; -+#include "rk3568-nanopi-r5s.dtsi" -+ -+/ { -+ model = "FriendlyElec NanoPi R5C"; -+ compatible = "friendlyarm,nanopi-r5c", "rockchip,rk3568"; -+ -+ gpio-keys { -+ compatible = "gpio-keys"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&reset_button_pin>; -+ -+ button-reset { -+ debounce-interval = <50>; -+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>; -+ label = "reset"; -+ linux,code = ; -+ }; -+ }; -+ -+ gpio-leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&lan_led_pin>, <&power_led_pin>, <&wan_led_pin>, <&wlan_led_pin>; -+ -+ led-lan { -+ color = ; -+ function = LED_FUNCTION_LAN; -+ gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ power_led: led-power { -+ color = ; -+ function = LED_FUNCTION_POWER; -+ linux,default-trigger = "heartbeat"; -+ gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-wan { -+ color = ; -+ function = LED_FUNCTION_WAN; -+ gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>; -+ }; -+ -+ led-wlan { -+ color = ; -+ function = LED_FUNCTION_WLAN; -+ gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; -+ }; -+ }; -+}; -+ -+&pcie2x1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pcie20_reset_pin>; -+ reset-gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>; -+ status = "okay"; -+}; -+ -+&pcie3x1 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pcie3x2 { -+ num-lanes = <1>; -+ reset-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; -+ vpcie3v3-supply = <&vcc3v3_pcie>; -+ status = "okay"; -+}; -+ -+&pinctrl { -+ gpio-leds { -+ lan_led_pin: lan-led-pin { -+ rockchip,pins = <3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ power_led_pin: power-led-pin { -+ rockchip,pins = <3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ wan_led_pin: wan-led-pin { -+ rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ -+ wlan_led_pin: wlan-led-pin { -+ rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; -+ }; -+ -+ pcie { -+ pcie20_reset_pin: pcie20-reset-pin { -+ rockchip,pins = <2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+ -+ rockchip-key { -+ reset_button_pin: reset-button-pin { -+ rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; -+ }; -+ }; -+}; ---- a/board/rockchip/evb_rk3568/MAINTAINERS -+++ b/board/rockchip/evb_rk3568/MAINTAINERS -@@ -7,6 +7,13 @@ F: configs/evb-rk3568_defconfig - F: arch/arm/dts/rk3568-evb-boot.dtsi - F: arch/arm/dts/rk3568-evb.dts - -+NANOPI-R5C -+M: Tianling Shen -+S: Maintained -+F: configs/nanopi-r5c-rk3568_defconfig -+F: arch/arm/dts/rk3568-nanopi-r5c.dts -+F: arch/arm/dts/rk3568-nanopi-r5c-u-boot.dtsi -+ - NANOPI-R5S - M: Tianling Shen - S: Maintained ---- /dev/null -+++ b/configs/nanopi-r5c-rk3568_defconfig -@@ -0,0 +1,85 @@ -+CONFIG_ARM=y -+CONFIG_SKIP_LOWLEVEL_INIT=y -+CONFIG_COUNTER_FREQUENCY=24000000 -+CONFIG_ARCH_ROCKCHIP=y -+CONFIG_TEXT_BASE=0x00a00000 -+CONFIG_SPL_LIBCOMMON_SUPPORT=y -+CONFIG_SPL_LIBGENERIC_SUPPORT=y -+CONFIG_NR_DRAM_BANKS=2 -+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc00000 -+CONFIG_DEFAULT_DEVICE_TREE="rk3568-nanopi-r5c" -+CONFIG_ROCKCHIP_RK3568=y -+CONFIG_SPL_ROCKCHIP_COMMON_BOARD=y -+CONFIG_SPL_SERIAL=y -+CONFIG_SPL_STACK_R_ADDR=0x600000 -+CONFIG_TARGET_EVB_RK3568=y -+CONFIG_SPL_STACK=0x400000 -+CONFIG_DEBUG_UART_BASE=0xFE660000 -+CONFIG_DEBUG_UART_CLOCK=24000000 -+CONFIG_SYS_LOAD_ADDR=0xc00800 -+CONFIG_DEBUG_UART=y -+CONFIG_FIT=y -+CONFIG_FIT_VERBOSE=y -+CONFIG_SPL_LOAD_FIT=y -+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3568-nanopi-r5c.dtb" -+# CONFIG_DISPLAY_CPUINFO is not set -+CONFIG_DISPLAY_BOARDINFO_LATE=y -+CONFIG_SPL_MAX_SIZE=0x40000 -+CONFIG_SPL_PAD_TO=0x7f8000 -+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -+CONFIG_SPL_BSS_START_ADDR=0x4000000 -+CONFIG_SPL_BSS_MAX_SIZE=0x4000 -+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set -+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set -+CONFIG_SPL_STACK_R=y -+CONFIG_SPL_ATF=y -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_GPT=y -+CONFIG_CMD_I2C=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+CONFIG_CMD_PMIC=y -+CONFIG_CMD_REGULATOR=y -+# CONFIG_SPL_DOS_PARTITION is not set -+CONFIG_SPL_OF_CONTROL=y -+CONFIG_OF_LIVE=y -+CONFIG_OF_SPL_REMOVE_PROPS="pinctrl-0 pinctrl-names clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" -+CONFIG_SPL_DM_WARN=y -+CONFIG_SPL_REGMAP=y -+CONFIG_SPL_SYSCON=y -+CONFIG_SPL_CLK=y -+CONFIG_ROCKCHIP_GPIO=y -+CONFIG_SYS_I2C_ROCKCHIP=y -+CONFIG_MISC=y -+CONFIG_SUPPORT_EMMC_RPMB=y -+CONFIG_MMC_DW=y -+CONFIG_MMC_DW_ROCKCHIP=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_SDMA=y -+CONFIG_MMC_SDHCI_ROCKCHIP=y -+CONFIG_ETH_DESIGNWARE=y -+CONFIG_GMAC_ROCKCHIP=y -+CONFIG_PHY_ROCKCHIP_INNO_USB2=y -+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y -+CONFIG_POWER_DOMAIN=y -+CONFIG_DM_PMIC=y -+CONFIG_PMIC_RK8XX=y -+CONFIG_SPL_DM_REGULATOR_FIXED=y -+CONFIG_REGULATOR_RK8XX=y -+CONFIG_PWM_ROCKCHIP=y -+CONFIG_SPL_RAM=y -+CONFIG_BAUDRATE=1500000 -+CONFIG_DEBUG_UART_SHIFT=2 -+CONFIG_SYS_NS16550_MEM32=y -+CONFIG_SYSRESET=y -+CONFIG_SYSRESET_PSCI=y -+CONFIG_USB=y -+CONFIG_USB_XHCI_HCD=y -+CONFIG_USB_XHCI_DWC3=y -+CONFIG_USB_EHCI_HCD=y -+CONFIG_USB_EHCI_GENERIC=y -+CONFIG_USB_OHCI_HCD=y -+CONFIG_USB_OHCI_GENERIC=y -+CONFIG_USB_DWC3=y -+CONFIG_ERRNO_STR=y diff --git a/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch b/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch index 7d2161ae42..b467f48f72 100644 --- a/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch +++ b/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch @@ -12,8 +12,6 @@ Signed-off-by: Lu jicong arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi -index 17201bcf41..8b6c9059ab 100644 --- a/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi +++ b/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi @@ -4,4 +4,4 @@ From 09bc806229345819788712b575a168ff63152297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 21 Jan 2024 13:39:33 +0100 Subject: [PATCH 08/22] bcm27xx: drop unneeded github workflow and readme patches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These patches can be dropped since we don't care about RPi's Github CI and READMEs. Signed-off-by: Álvaro Fernández Rojas --- ...950-0149-Update-issue-templates-2736.patch | 47 --- ...e-GitHubs-issue-form-for-bug-reports.patch | 163 --------- ...github-Add-Github-Workflow-for-KUnit.patch | 74 ---- ...orkflows-Add-dtoverlaycheck-workflow.patch | 62 ---- ...s-Create-workflow-to-CI-kernel-build.patch | 285 --------------- ...E.md-with-CI-kernel-build-status-tag.patch | 50 --- ...ws-Set-warnings-as-errors-for-builds.patch | 63 ---- ...lows-Correct-kernel-builds-artifacts.patch | 147 -------- ...b-workflows-Switch-to-a-matrix-build.patch | 333 ------------------ ...md-Replace-6.0-build-status-with-6.2.patch | 27 -- ...rkflows-Retain-artifacts-for-90-days.patch | 18 - ...-love-checkpatch-so-add-it-to-the-CI.patch | 46 --- 12 files changed, 1315 deletions(-) delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0149-Update-issue-templates-2736.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0368-Use-GitHubs-issue-form-for-bug-reports.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0506-.github-Add-Github-Workflow-for-KUnit.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0507-.github-workflows-Add-dtoverlaycheck-workflow.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0509-README-Add-README.md-with-CI-kernel-build-status-tag.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0538-.github-workflows-Set-warnings-as-errors-for-builds.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0540-.github-workflows-Correct-kernel-builds-artifacts.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0547-.github-workflows-Switch-to-a-matrix-build.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0555-README.md-Replace-6.0-build-status-with-6.2.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0556-.github-workflows-Retain-artifacts-for-90-days.patch delete mode 100644 target/linux/bcm27xx/patches-6.1/950-0583-workflows-We-all-love-checkpatch-so-add-it-to-the-CI.patch diff --git a/target/linux/bcm27xx/patches-6.1/950-0149-Update-issue-templates-2736.patch b/target/linux/bcm27xx/patches-6.1/950-0149-Update-issue-templates-2736.patch deleted file mode 100644 index c394b48981..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0149-Update-issue-templates-2736.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f1457e83cd211ef7c8c90e9a69d044366621c83f Mon Sep 17 00:00:00 2001 -From: James Hughes -Date: Fri, 2 Nov 2018 11:55:49 +0000 -Subject: [PATCH] Update issue templates (#2736) - ---- - .github/ISSUE_TEMPLATE/bug_report.md | 34 ++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md - ---- /dev/null -+++ b/.github/ISSUE_TEMPLATE/bug_report.md -@@ -0,0 +1,34 @@ -+--- -+name: Bug report -+about: Create a report to help us fix your issue -+ -+--- -+ -+**Is this the right place for my bug report?** -+This repository contains the Linux kernel used on the Raspberry Pi. If you believe that the issue you are seeing is kernel-related, this is the right place. If not, we have other repositories for the GPU firmware at [github.com/raspberrypi/firmware](https://github.com/raspberrypi/firmware) and Raspberry Pi userland applications at [github.com/raspberrypi/userland](https://github.com/raspberrypi/userland). If you have problems with the Raspbian distribution packages, report them in the [github.com/RPi-Distro/repo](https://github.com/RPi-Distro/repo). If you simply have a question, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) are the best place to ask it. -+ -+**Describe the bug** -+Add a clear and concise description of what you think the bug is. -+ -+**To reproduce** -+List the steps required to reproduce the issue. -+ -+**Expected behaviour** -+Add a clear and concise description of what you expected to happen. -+ -+**Actual behaviour** -+Add a clear and concise description of what actually happened. -+ -+**System** -+ Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions: -+ -+* Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW -+* Which OS and version (`cat /etc/rpi-issue`)? -+* Which firmware version (`vcgencmd version`)? -+* Which kernel version (`uname -a`)? -+ -+**Logs** -+If applicable, add the relevant output from `dmesg` or similar. -+ -+**Additional context** -+Add any other relevant context for the problem. diff --git a/target/linux/bcm27xx/patches-6.1/950-0368-Use-GitHubs-issue-form-for-bug-reports.patch b/target/linux/bcm27xx/patches-6.1/950-0368-Use-GitHubs-issue-form-for-bug-reports.patch deleted file mode 100644 index 7d08793af6..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0368-Use-GitHubs-issue-form-for-bug-reports.patch +++ /dev/null @@ -1,163 +0,0 @@ -From b9bf4e573a1e07ef999636cdb61f393df61cc447 Mon Sep 17 00:00:00 2001 -From: Andreas Blaesius -Date: Wed, 5 Jan 2022 20:38:39 +0100 -Subject: [PATCH] Use GitHubs issue form for bug reports - -Use GitHubs issue form for bug reports. - -- modern look -- user don't need to mess with given markdown parts while filling the issue template - -Setup config.yml for general questions and problems with the Raspbian distribution packages. ---- - .github/ISSUE_TEMPLATE/bug_report.md | 34 ---------- - .github/ISSUE_TEMPLATE/bug_report.yml | 91 +++++++++++++++++++++++++++ - .github/ISSUE_TEMPLATE/config.yml | 9 +++ - 3 files changed, 100 insertions(+), 34 deletions(-) - delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md - create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml - create mode 100644 .github/ISSUE_TEMPLATE/config.yml - ---- a/.github/ISSUE_TEMPLATE/bug_report.md -+++ /dev/null -@@ -1,34 +0,0 @@ ----- --name: Bug report --about: Create a report to help us fix your issue -- ----- -- --**Is this the right place for my bug report?** --This repository contains the Linux kernel used on the Raspberry Pi. If you believe that the issue you are seeing is kernel-related, this is the right place. If not, we have other repositories for the GPU firmware at [github.com/raspberrypi/firmware](https://github.com/raspberrypi/firmware) and Raspberry Pi userland applications at [github.com/raspberrypi/userland](https://github.com/raspberrypi/userland). If you have problems with the Raspbian distribution packages, report them in the [github.com/RPi-Distro/repo](https://github.com/RPi-Distro/repo). If you simply have a question, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) are the best place to ask it. -- --**Describe the bug** --Add a clear and concise description of what you think the bug is. -- --**To reproduce** --List the steps required to reproduce the issue. -- --**Expected behaviour** --Add a clear and concise description of what you expected to happen. -- --**Actual behaviour** --Add a clear and concise description of what actually happened. -- --**System** -- Copy and paste the results of the raspinfo command in to this section. Alternatively, copy and paste a pastebin link, or add answers to the following questions: -- --* Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW --* Which OS and version (`cat /etc/rpi-issue`)? --* Which firmware version (`vcgencmd version`)? --* Which kernel version (`uname -a`)? -- --**Logs** --If applicable, add the relevant output from `dmesg` or similar. -- --**Additional context** --Add any other relevant context for the problem. ---- /dev/null -+++ b/.github/ISSUE_TEMPLATE/bug_report.yml -@@ -0,0 +1,91 @@ -+name: "Bug report" -+description: Create a report to help us fix your issue -+body: -+- type: markdown -+ attributes: -+ value: | -+ **Is this the right place for my bug report?** -+ This repository contains the Linux kernel used on the Raspberry Pi. -+ If you believe that the issue you are seeing is kernel-related, this is the right place. -+ If not, we have other repositories for the GPU firmware at [github.com/raspberrypi/firmware](https://github.com/raspberrypi/firmware) and Raspberry Pi userland applications at [github.com/raspberrypi/userland](https://github.com/raspberrypi/userland). -+ -+ If you have problems with the Raspbian distribution packages, report them in the [github.com/RPi-Distro/repo](https://github.com/RPi-Distro/repo). -+ If you simply have a question, then [the Raspberry Pi forums](https://www.raspberrypi.org/forums) are the best place to ask it. -+ -+- type: textarea -+ id: description -+ attributes: -+ label: Describe the bug -+ description: | -+ Add a clear and concise description of what you think the bug is. -+ validations: -+ required: true -+ -+- type: textarea -+ id: reproduce -+ attributes: -+ label: Steps to reproduce the behaviour -+ description: | -+ List the steps required to reproduce the issue. -+ validations: -+ required: true -+ -+- type: dropdown -+ id: model -+ attributes: -+ label: Device (s) -+ description: On which device you are facing the bug? -+ multiple: true -+ options: -+ - Raspberry Pi Zero -+ - Raspberry Pi Zero W / WH -+ - Raspberry Pi Zero 2 W -+ - Raspberry Pi 1 Mod. A -+ - Raspberry Pi 1 Mod. A+ -+ - Raspberry Pi 1 Mod. B -+ - Raspberry Pi 1 Mod. B+ -+ - Raspberry Pi 2 Mod. B -+ - Raspberry Pi 2 Mod. B v1.2 -+ - Raspberry Pi 3 Mod. A+ -+ - Raspberry Pi 3 Mod. B -+ - Raspberry Pi 3 Mod. B+ -+ - Raspberry Pi 4 Mod. B -+ - Raspberry Pi 400 -+ - Raspberry Pi CM1 -+ - Raspberry Pi CM3 -+ - Raspberry Pi CM3 Lite -+ - Raspberry Pi CM3+ -+ - Raspberry Pi CM3+ Lite -+ - Raspberry Pi CM4 -+ - Raspberry Pi CM4 Lite -+ - Other -+ validations: -+ required: true -+ -+- type: textarea -+ id: system -+ attributes: -+ label: System -+ description: | -+ Copy and paste the results of the raspinfo command in to this section. -+ Alternatively, copy and paste a pastebin link, or add answers to the following questions: -+ * Which OS and version (`cat /etc/rpi-issue`)? -+ * Which firmware version (`vcgencmd version`)? -+ * Which kernel version (`uname -a`)? -+ validations: -+ required: true -+ -+- type: textarea -+ id: logs -+ attributes: -+ label: Logs -+ description: | -+ If applicable, add the relevant output from `dmesg` or similar. -+ -+- type: textarea -+ id: additional -+ attributes: -+ label: Additional context -+ description: | -+ Add any other relevant context for the problem. -+ ---- /dev/null -+++ b/.github/ISSUE_TEMPLATE/config.yml -@@ -0,0 +1,9 @@ -+blank_issues_enabled: false -+contact_links: -+ - name: "⛔ Question" -+ url: https://www.raspberrypi.org/forums -+ about: "Please do not use GitHub for asking questions. If you simply have a question, then the Raspberry Pi forums are the best place to ask it. Thanks in advance for helping us keep the issue tracker clean!" -+ - name: "⛔ Problems with the Raspbian distribution packages" -+ url: https://github.com/RPi-Distro/repo -+ about: "If you have problems with the Raspbian distribution packages, please report them in the github.com/RPi-Distro/repo." -+ diff --git a/target/linux/bcm27xx/patches-6.1/950-0506-.github-Add-Github-Workflow-for-KUnit.patch b/target/linux/bcm27xx/patches-6.1/950-0506-.github-Add-Github-Workflow-for-KUnit.patch deleted file mode 100644 index bb3c3f160a..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0506-.github-Add-Github-Workflow-for-KUnit.patch +++ /dev/null @@ -1,74 +0,0 @@ -From d172f330087422b8f33ad5e0f60f903820e7b321 Mon Sep 17 00:00:00 2001 -From: Maxime Ripard -Date: Thu, 8 Dec 2022 13:17:42 +0100 -Subject: [PATCH] .github: Add Github Workflow for KUnit - -Now that we have some KUnit coverage, let's add a github actions file to -run them on each push or pull request. - -Signed-off-by: Maxime Ripard ---- - .github/workflows/kunit.yml | 57 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 57 insertions(+) - create mode 100644 .github/workflows/kunit.yml - ---- /dev/null -+++ b/.github/workflows/kunit.yml -@@ -0,0 +1,57 @@ -+name: KUnit Tests -+ -+on: -+ pull_request: -+ branches: [ "rpi-*"] -+ -+ push: -+ branches: [ "rpi-*"] -+ -+jobs: -+ core: -+ name: Generic DRM/KMS Unit Tests -+ runs-on: ubuntu-latest -+ -+ steps: -+ - uses: actions/checkout@v3 -+ -+ - name: Run Generic DRM Tests -+ run: | -+ ./tools/testing/kunit/kunit.py run \ -+ --kunitconfig=drivers/gpu/drm/tests -+ -+ vc4-arm: -+ name: VC4 Unit Tests on ARM -+ runs-on: ubuntu-latest -+ -+ steps: -+ - uses: actions/checkout@v3 -+ -+ - name: Install Dependencies -+ run: | -+ sudo apt-get update -+ sudo apt-get install -y gcc-arm-linux-gnueabihf qemu-system-arm -+ -+ - name: Run VC4 Tests -+ run: | -+ ./tools/testing/kunit/kunit.py run \ -+ --kunitconfig=drivers/gpu/drm/vc4/tests \ -+ --cross_compile=arm-linux-gnueabihf- --arch=arm -+ -+ vc4-arm64: -+ name: VC4 Unit Tests on ARM64 -+ runs-on: ubuntu-latest -+ -+ steps: -+ - uses: actions/checkout@v3 -+ -+ - name: Install Dependencies -+ run: | -+ sudo apt-get update -+ sudo apt-get install -y gcc-aarch64-linux-gnu qemu-system-arm -+ -+ - name: Run VC4 Tests -+ run: | -+ ./tools/testing/kunit/kunit.py run \ -+ --kunitconfig=drivers/gpu/drm/vc4/tests \ -+ --cross_compile=aarch64-linux-gnu- --arch=arm64 diff --git a/target/linux/bcm27xx/patches-6.1/950-0507-.github-workflows-Add-dtoverlaycheck-workflow.patch b/target/linux/bcm27xx/patches-6.1/950-0507-.github-workflows-Add-dtoverlaycheck-workflow.patch deleted file mode 100644 index 92a7b7edf4..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0507-.github-workflows-Add-dtoverlaycheck-workflow.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 4aec59014afc64d912502d70194a8823b0a6150a Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Tue, 6 Dec 2022 18:11:58 +0000 -Subject: [PATCH] .github/workflows: Add dtoverlaycheck workflow - -Signed-off-by: Dave Stevenson ---- - .github/workflows/dtoverlaycheck.yml | 48 ++++++++++++++++++++++++++++ - 1 file changed, 48 insertions(+) - create mode 100644 .github/workflows/dtoverlaycheck.yml - ---- /dev/null -+++ b/.github/workflows/dtoverlaycheck.yml -@@ -0,0 +1,48 @@ -+name: Pi dtoverlay checks -+ -+on: -+ pull_request: -+ paths-ignore: -+ - '.github/**' -+ branches: [ "rpi-*" ] -+ push: -+ paths-ignore: -+ - '.github/**' -+ branches: [ "rpi-*" ] -+ workflow_dispatch: -+ -+env: -+ UTILS_DIR: "${{github.workspace}}/utils" -+ -+jobs: -+ dtoverlaycheck: -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Install toolchain -+ run: | -+ sudo apt update -+ sudo apt-get install gcc-arm-linux-gnueabihf libfdt-dev device-tree-compiler -+ timeout-minutes: 10 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: overlaycheck -+ run: | -+ git clone https://github.com/raspberrypi/utils ${{env.UTILS_DIR}} -+ cd ${{env.UTILS_DIR}} -+ pwd -+ mkdir build -+ cd build -+ pwd -+ cmake .. -+ make -j4 -+ sudo make install -+ cd ${{github.workspace}} -+ pwd -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- bcm2711_defconfig -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- dtbs -+ ${{env.UTILS_DIR}}/overlaycheck/overlaycheck diff --git a/target/linux/bcm27xx/patches-6.1/950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch b/target/linux/bcm27xx/patches-6.1/950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch deleted file mode 100644 index 101f6dafca..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0508-.github-workflows-Create-workflow-to-CI-kernel-build.patch +++ /dev/null @@ -1,285 +0,0 @@ -From baa2e8235af7143148d8799c5caed2a2eefd9107 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 11 Nov 2022 17:09:32 +0000 -Subject: [PATCH] .github/workflows: Create workflow to CI kernel - builds - -Builds the bcmrpi, bcm2709, bcm2711, and bcm2835 32 bit kernels, -and defconfig and bcm2711 64bit kernels, saving the artifacts for -7 days. - -Signed-off-by: Dave Stevenson ---- - .github/workflows/kernel-build.yml | 266 +++++++++++++++++++++++++++++ - 1 file changed, 266 insertions(+) - create mode 100644 .github/workflows/kernel-build.yml - ---- /dev/null -+++ b/.github/workflows/kernel-build.yml -@@ -0,0 +1,266 @@ -+name: Pi kernel build tests -+ -+on: -+ pull_request: -+ paths-ignore: -+ - '.github/**' -+ branches: [ "rpi-*" ] -+ push: -+ paths-ignore: -+ - '.github/**' -+ branches: [ "rpi-*" ] -+ workflow_dispatch: -+ -+env: -+ NUM_JOBS: 3 -+ -+jobs: -+ build-bcm2835: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-arm-linux-gnueabihf -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/Image ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: bcm2835_build -+ path: bcm2835_build.tar -+ retention-days: 7 -+ -+ build-arm64: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-aarch64-linux-gnu -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: arm64_build -+ path: arm64_build.tar -+ retention-days: 7 -+ -+ build-bcmrpi: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-arm-linux-gnueabihf -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: bcmrpi_build -+ path: bcmrpi_build.tar -+ retention-days: 7 -+ -+ build-bcm2709: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-arm-linux-gnueabihf -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig -+ make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: bcm2709_build -+ path: bcm2709_build.tar -+ retention-days: 7 -+ -+ build-bcm2711: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-arm-linux-gnueabihf -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: bcm2711_build -+ path: bcm2711_build.tar -+ retention-days: 7 -+ -+ build-bcm2711-arm64: -+ -+ runs-on: ubuntu-latest -+ -+ steps: -+ - name: Update install -+ run: -+ sudo apt-get update -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-arm-linux-gnueabihf -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Install toolchain -+ run: -+ sudo apt-get install gcc-aarch64-linux-gnu -+ timeout-minutes: 5 -+ -+ - uses: actions/checkout@v3 -+ with: -+ fetch-depth: 1 -+ clean: true -+ -+ - name: Build kernel -+ run: | -+ mkdir ${{github.workspace}}/build -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -+ cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/ -+ -+ - name: Tar build -+ run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install . -+ -+ - name: Upload results -+ uses: actions/upload-artifact@v3 -+ with: -+ name: bcm2711_arm64_build -+ path: bcm2711_arm64_build.tar -+ retention-days: 7 diff --git a/target/linux/bcm27xx/patches-6.1/950-0509-README-Add-README.md-with-CI-kernel-build-status-tag.patch b/target/linux/bcm27xx/patches-6.1/950-0509-README-Add-README.md-with-CI-kernel-build-status-tag.patch deleted file mode 100644 index 610efdc8a7..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0509-README-Add-README.md-with-CI-kernel-build-status-tag.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 81eebfa296eb1454cde3bf1cbd919f8b9eb6cf64 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Mon, 14 Nov 2022 17:14:15 +0000 -Subject: [PATCH] README: Add README.md with CI kernel build status - tags - -This is a copy of README with the tags added. - -You can not delete the file README as then checkpatch complains -you aren't in a kernel tree. - -Signed-off-by: Dave Stevenson ---- - README.md | 30 ++++++++++++++++++++++++++++++ - 1 file changed, 30 insertions(+) - create mode 100644 README.md - ---- /dev/null -+++ b/README.md -@@ -0,0 +1,30 @@ -+Linux kernel -+============ -+ -+There are several guides for kernel developers and users. These guides can -+be rendered in a number of formats, like HTML and PDF. Please read -+Documentation/admin-guide/README.rst first. -+ -+In order to build the documentation, use ``make htmldocs`` or -+``make pdfdocs``. The formatted documentation can also be read online at: -+ -+ https://www.kernel.org/doc/html/latest/ -+ -+There are various text files in the Documentation/ subdirectory, -+several of them using the Restructured Text markup notation. -+ -+Please read the Documentation/process/changes.rst file, as it contains the -+requirements for building and running the kernel, and information about -+the problems which may result by upgrading your kernel. -+ -+Build status for rpi-5.15.y: -+[![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-5.15.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) -+[![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-5.15.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) -+ -+Build status for rpi-6.0.y: -+[![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-6.0.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) -+[![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-6.0.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) -+ -+Build status for rpi-6.1.y: -+[![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-6.1.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) -+[![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-6.1.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) diff --git a/target/linux/bcm27xx/patches-6.1/950-0538-.github-workflows-Set-warnings-as-errors-for-builds.patch b/target/linux/bcm27xx/patches-6.1/950-0538-.github-workflows-Set-warnings-as-errors-for-builds.patch deleted file mode 100644 index f880a637c1..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0538-.github-workflows-Set-warnings-as-errors-for-builds.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0a1c5c32cfe570a688a09c90ab16052fcb258342 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Fri, 13 Jan 2023 14:32:45 +0000 -Subject: [PATCH] .github/workflows: Set warnings-as-errors for builds - -To avoid code with build warnings being introduced into the tree, force -CONFIG_WERROR=y in the build workflow. - -Signed-off-by: Phil Elwell ---- - .github/workflows/kernel-build.yml | 6 ++++++ - 1 file changed, 6 insertions(+) - ---- a/.github/workflows/kernel-build.yml -+++ b/.github/workflows/kernel-build.yml -@@ -38,6 +38,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -@@ -78,6 +79,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -@@ -118,6 +120,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -@@ -158,6 +161,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -@@ -198,6 +202,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -@@ -248,6 +253,7 @@ jobs: - run: | - mkdir ${{github.workspace}}/build - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig -+ scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs - mkdir -p ${{github.workspace}}/install/boot - make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install diff --git a/target/linux/bcm27xx/patches-6.1/950-0540-.github-workflows-Correct-kernel-builds-artifacts.patch b/target/linux/bcm27xx/patches-6.1/950-0540-.github-workflows-Correct-kernel-builds-artifacts.patch deleted file mode 100644 index 359efd5c85..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0540-.github-workflows-Correct-kernel-builds-artifacts.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 3e32a992acb7248183a3eb1d92503ac2d2eb2617 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 18 Jan 2023 09:34:31 +0000 -Subject: [PATCH] .github/workflows: Correct kernel builds artifacts - -Modify the kernel build workflow to create artifacts with the correct -names and structure, both as an example of what we expect and in case -anyone wants to use the output. - -Signed-off-by: Phil Elwell ---- - .github/workflows/kernel-build.yml | 76 ++++++++++++++++-------------- - 1 file changed, 41 insertions(+), 35 deletions(-) - ---- a/.github/workflows/kernel-build.yml -+++ b/.github/workflows/kernel-build.yml -@@ -37,14 +37,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays - make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/Image ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel.img - - - name: Tar build - run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install . -@@ -78,14 +79,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm64/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/kernel8.img - - - name: Tar build - run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install . -@@ -119,14 +121,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcmrpi_defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -- make ARCH=arm KERNEL=kernel CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel.img - - - name: Tar build - run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install . -@@ -160,14 +163,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -- make ARCH=arm KERNEL=kernel7 CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel7.img - - - name: Tar build - run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install . -@@ -201,14 +205,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -- make ARCH=arm KERNEL=kernel7l CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays -+ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel7l.img - - - name: Tar build - run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install . -@@ -252,14 +257,15 @@ jobs: - - name: Build kernel - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -- mkdir -p ${{github.workspace}}/install/boot -- make ARCH=arm64 KERNEL=kernel8 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -+ mkdir -p ${{github.workspace}}/install/boot/overlays -+ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install - cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -- cp -r ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/arm64/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/kernel8.img - - - name: Tar build - run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install . diff --git a/target/linux/bcm27xx/patches-6.1/950-0547-.github-workflows-Switch-to-a-matrix-build.patch b/target/linux/bcm27xx/patches-6.1/950-0547-.github-workflows-Switch-to-a-matrix-build.patch deleted file mode 100644 index 51f32be5a0..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0547-.github-workflows-Switch-to-a-matrix-build.patch +++ /dev/null @@ -1,333 +0,0 @@ -From 3ca614742a496b66a9b92ce6be05ff555fdfc2c2 Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Mon, 23 Jan 2023 16:50:51 +0000 -Subject: [PATCH] .github/workflows: Switch to a matrix build - -Remove the per-build duplication by putting build parameters in a -matrix. - -Signed-off-by: Phil Elwell ---- - .github/workflows/kernel-build.yml | 293 ++++++----------------------- - 1 file changed, 59 insertions(+), 234 deletions(-) - ---- a/.github/workflows/kernel-build.yml -+++ b/.github/workflows/kernel-build.yml -@@ -15,177 +15,40 @@ env: - NUM_JOBS: 3 - - jobs: -- build-bcm2835: -- -- runs-on: ubuntu-latest -- -- steps: -- - name: Update install -- run: -- sudo apt-get update -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-arm-linux-gnueabihf -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -- -- - name: Build kernel -- run: | -- mkdir ${{github.workspace}}/build -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2835_defconfig -- scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel.img -- -- - name: Tar build -- run: tar -cvf bcm2835_build.tar -C ${{github.workspace}}/install . -- -- - name: Upload results -- uses: actions/upload-artifact@v3 -- with: -- name: bcm2835_build -- path: bcm2835_build.tar -- retention-days: 7 -- -- build-arm64: -- -- runs-on: ubuntu-latest -- -- steps: -- - name: Update install -- run: -- sudo apt-get update -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-aarch64-linux-gnu -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -- -- - name: Build kernel -- run: | -- mkdir ${{github.workspace}}/build -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build defconfig -- scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -- mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm64/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/kernel8.img -- -- - name: Tar build -- run: tar -cvf arm64_build.tar -C ${{github.workspace}}/install . -- -- - name: Upload results -- uses: actions/upload-artifact@v3 -- with: -- name: arm64_build -- path: arm64_build.tar -- retention-days: 7 -- -- build-bcmrpi: -- -- runs-on: ubuntu-latest -- -- steps: -- - name: Update install -- run: -- sudo apt-get update -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-arm-linux-gnueabihf -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -- -- - name: Build kernel -- run: | -- mkdir ${{github.workspace}}/build -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcmrpi_defconfig -- scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel.img -- -- - name: Tar build -- run: tar -cvf bcmrpi_build.tar -C ${{github.workspace}}/install . -- -- - name: Upload results -- uses: actions/upload-artifact@v3 -- with: -- name: bcmrpi_build -- path: bcmrpi_build.tar -- retention-days: 7 -- -- build-bcm2709: -- -+ build: - runs-on: ubuntu-latest -+ strategy: -+ matrix: -+ include: -+ - name: bcm2835 -+ arch: arm -+ defconfig: bcm2835_defconfig -+ kernel: kernel - -- steps: -- - name: Update install -- run: -- sudo apt-get update -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-arm-linux-gnueabihf -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -+ - name: arm64 -+ arch: arm64 -+ defconfig: defconfig -+ kernel: kernel8 - -- - name: Build kernel -- run: | -- mkdir ${{github.workspace}}/build -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2709_defconfig -- scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel7.img -+ - name: bcmrpi -+ arch: arm -+ defconfig: bcmrpi_defconfig -+ kernel: kernel - -- - name: Tar build -- run: tar -cvf bcm2709_build.tar -C ${{github.workspace}}/install . -+ - name: bcm2709 -+ arch: arm -+ defconfig: bcm2709_defconfig -+ kernel: kernel7 - -- - name: Upload results -- uses: actions/upload-artifact@v3 -- with: -- name: bcm2709_build -- path: bcm2709_build.tar -- retention-days: 7 -- -- build-bcm2711: -+ - name: bcm2711 -+ arch: arm -+ defconfig: bcm2711_defconfig -+ kernel: kernel7l - -- runs-on: ubuntu-latest -+ - name: bcm2711_arm64 -+ arch: arm64 -+ defconfig: bcm2711_defconfig -+ kernel: kernel8 - - steps: - - name: Update install -@@ -194,59 +57,11 @@ jobs: - - - name: Install toolchain - run: -- sudo apt-get install gcc-arm-linux-gnueabihf -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -- -- - name: Build kernel -- run: | -- mkdir ${{github.workspace}}/build -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build bcm2711_defconfig -- scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} zImage modules dtbs -- mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm/boot/dts/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm/boot/zImage ${{github.workspace}}/install/boot/kernel7l.img -- -- - name: Tar build -- run: tar -cvf bcm2711_build.tar -C ${{github.workspace}}/install . -- -- - name: Upload results -- uses: actions/upload-artifact@v3 -- with: -- name: bcm2711_build -- path: bcm2711_build.tar -- retention-days: 7 -- -- build-bcm2711-arm64: -- -- runs-on: ubuntu-latest -- -- steps: -- - name: Update install -- run: -- sudo apt-get update -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-arm-linux-gnueabihf -- timeout-minutes: 5 -- -- - uses: actions/checkout@v3 -- with: -- fetch-depth: 1 -- clean: true -- -- - name: Install toolchain -- run: -- sudo apt-get install gcc-aarch64-linux-gnu -+ if [[ "${{matrix.arch}}" == "arm64" ]]; then -+ sudo apt-get install gcc-aarch64-linux-gnu; -+ else -+ sudo apt-get install gcc-arm-linux-gnueabihf; -+ fi - timeout-minutes: 5 - - - uses: actions/checkout@v3 -@@ -254,25 +69,35 @@ jobs: - fetch-depth: 1 - clean: true - -- - name: Build kernel -+ - name: Build kernel ${{matrix.name}} - run: | - mkdir ${{github.workspace}}/build -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build bcm2711_defconfig -+ export ARCH=${{matrix.arch}} -+ if [[ "$ARCH" == "arm64" ]]; then -+ export CROSS_COMPILE=aarch64-linux-gnu- -+ export DTS_SUBDIR=broadcom -+ export IMAGE=Image.gz -+ else -+ export CROSS_COMPILE=arm-linux-gnueabihf- -+ export DTS_SUBDIR= -+ export IMAGE=zImage -+ fi -+ make O=${{github.workspace}}/build ${{matrix.defconfig}} - scripts/config --file ${{github.workspace}}/build/.config --set-val CONFIG_WERROR y -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} Image.gz modules dtbs -+ make O=${{github.workspace}}/build -j ${{env.NUM_JOBS}} $IMAGE modules dtbs - mkdir -p ${{github.workspace}}/install/boot/overlays -- make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -- cp ${{github.workspace}}/build/arch/arm64/boot/dts/broadcom/*.dtb ${{github.workspace}}/install/boot/ -- cp ${{github.workspace}}/build/arch/arm64/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/arch/arm64/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -- cp ${{github.workspace}}/build/arch/arm64/boot/Image.gz ${{github.workspace}}/install/boot/kernel8.img -+ make O=${{github.workspace}}/build INSTALL_MOD_PATH=${{github.workspace}}/install modules_install -+ cp ${{github.workspace}}/build/arch/${ARCH}/boot/dts/${DTS_SUBDIR}/*.dtb ${{github.workspace}}/install/boot/ -+ cp ${{github.workspace}}/build/arch/${ARCH}/boot/dts/overlays/*.dtb* ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/arch/${ARCH}/boot/dts/overlays/README ${{github.workspace}}/install/boot/overlays/ -+ cp ${{github.workspace}}/build/arch/${ARCH}/boot/$IMAGE ${{github.workspace}}/install/boot/${{matrix.kernel}}.img - - - name: Tar build -- run: tar -cvf bcm2711_arm64_build.tar -C ${{github.workspace}}/install . -+ run: tar -cvf ${{matrix.name}}_build.tar -C ${{github.workspace}}/install . - - - name: Upload results - uses: actions/upload-artifact@v3 - with: -- name: bcm2711_arm64_build -- path: bcm2711_arm64_build.tar -+ name: ${{matrix.name}}_build -+ path: ${{matrix.name}}_build.tar - retention-days: 7 diff --git a/target/linux/bcm27xx/patches-6.1/950-0555-README.md-Replace-6.0-build-status-with-6.2.patch b/target/linux/bcm27xx/patches-6.1/950-0555-README.md-Replace-6.0-build-status-with-6.2.patch deleted file mode 100644 index 889ae948a8..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0555-README.md-Replace-6.0-build-status-with-6.2.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1cc246c143210efe249978419b094b03bf2137e0 Mon Sep 17 00:00:00 2001 -From: Phil Elwell <8911409+pelwell@users.noreply.github.com> -Date: Wed, 25 Jan 2023 10:19:52 +0000 -Subject: [PATCH] README.md: Replace 6.0 build status with 6.2 - -6.0 is EOL and 6.2 is heading towards release, so update the build status display accordingly. ---- - README.md | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/README.md -+++ b/README.md -@@ -21,10 +21,10 @@ Build status for rpi-5.15.y: - [![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-5.15.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) - [![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-5.15.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) - --Build status for rpi-6.0.y: --[![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-6.0.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) --[![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-6.0.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) -- - Build status for rpi-6.1.y: - [![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-6.1.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) - [![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-6.1.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) -+ -+Build status for rpi-6.2.y: -+[![Pi kernel build tests](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml/badge.svg?branch=rpi-6.2.y)](https://github.com/raspberrypi/linux/actions/workflows/kernel-build.yml) -+[![dtoverlaycheck](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml/badge.svg?branch=rpi-6.2.y)](https://github.com/raspberrypi/linux/actions/workflows/dtoverlaycheck.yml) diff --git a/target/linux/bcm27xx/patches-6.1/950-0556-.github-workflows-Retain-artifacts-for-90-days.patch b/target/linux/bcm27xx/patches-6.1/950-0556-.github-workflows-Retain-artifacts-for-90-days.patch deleted file mode 100644 index abc61e8b68..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0556-.github-workflows-Retain-artifacts-for-90-days.patch +++ /dev/null @@ -1,18 +0,0 @@ -From 05a9a53de8785c82332081a5f44cc34dc9fa5f0c Mon Sep 17 00:00:00 2001 -From: Phil Elwell -Date: Wed, 25 Jan 2023 15:01:43 +0000 -Subject: [PATCH] .github/workflows: Retain artifacts for 90 days - -Signed-off-by: Phil Elwell ---- - .github/workflows/kernel-build.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/.github/workflows/kernel-build.yml -+++ b/.github/workflows/kernel-build.yml -@@ -100,4 +100,4 @@ jobs: - with: - name: ${{matrix.name}}_build - path: ${{matrix.name}}_build.tar -- retention-days: 7 -+ retention-days: 90 diff --git a/target/linux/bcm27xx/patches-6.1/950-0583-workflows-We-all-love-checkpatch-so-add-it-to-the-CI.patch b/target/linux/bcm27xx/patches-6.1/950-0583-workflows-We-all-love-checkpatch-so-add-it-to-the-CI.patch deleted file mode 100644 index 109ae27c40..0000000000 --- a/target/linux/bcm27xx/patches-6.1/950-0583-workflows-We-all-love-checkpatch-so-add-it-to-the-CI.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 6c110195b1f9b4e39676065d5973ecf603746862 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Wed, 8 Mar 2023 15:28:19 +0000 -Subject: [PATCH] workflows: We all love checkpatch, so add it to the - CI workflows - -This is currently running on defaults, so the --strict desired -for media drivers and similar won't be observed. That may be -possible to add later. - -Signed-off-by: Dave Stevenson ---- - .github/workflows/checkpatch.yml | 18 ++++++++++++++++++ - .github/workflows/ci_checkpatch.conf | 4 ++++ - 2 files changed, 22 insertions(+) - create mode 100644 .github/workflows/checkpatch.yml - create mode 100644 .github/workflows/ci_checkpatch.conf - ---- /dev/null -+++ b/.github/workflows/checkpatch.yml -@@ -0,0 +1,18 @@ -+name: Advisory checkpatch review -+on: [pull_request] -+ -+jobs: -+ review: -+ name: checkpatch review -+ runs-on: ubuntu-latest -+ steps: -+ - name: 'Calculate PR commits + 1' -+ run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> $GITHUB_ENV -+ - uses: actions/checkout@v3 -+ with: -+ ref: ${{ github.event.pull_request.head.sha }} -+ fetch-depth: ${{ env.PR_FETCH_DEPTH }} -+ - name: Copy checkpatch.conf -+ run: cp ${{github.workspace}}/.github/workflows/ci_checkpatch.conf ${{github.workspace}}/.checkpatch.conf -+ - name: Run checkpatch review -+ uses: webispy/checkpatch-action@v9 ---- /dev/null -+++ b/.github/workflows/ci_checkpatch.conf -@@ -0,0 +1,4 @@ -+--no-tree -+--ignore FILE_PATH_CHANGES -+--ignore GIT_COMMIT_ID -+--ignore SPDX_LICENSE_TAG From 797d46c34d90eddce7acd369d70347dfae545065 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 21 Jan 2024 22:07:31 +0100 Subject: [PATCH 09/22] generic: 6.1: move stmmac backport fix patches to generic Move stmmac backport fix patches from ipq806x to generic backport directory as they got merged upstream and they fix wide performance regression. This will eventually cause performance increase on any user of the stmmac driver. Generic patch automatically refreshed with make target/linux/refresh. Signed-off-by: Christian Marangi --- ...-introduce-napi_is_scheduled-helper.patch} | 39 ++++++++++++++----- ...t-stmmac-improve-TX-timer-arm-logic.patch} | 9 +++-- ...-move-TX-timer-arm-after-DMA-enable.patch} | 31 +++++++++------ ...c-increase-TX-coalesce-timer-to-5ms.patch} | 7 ++-- ...ive-renaming-when-an-interface-is-up.patch | 6 +-- .../721-net-add-packet-mangeling.patch | 8 ++-- ...T-skip-GRO-for-foreign-MAC-addresses.patch | 2 +- ...0211_ptr-even-with-no-CFG82111-suppo.patch | 2 +- ...ional-threading-for-backlog-processi.patch | 4 +- 9 files changed, 68 insertions(+), 40 deletions(-) rename target/linux/{ipq806x/patches-6.1/700-01-net-introduce-napi_is_scheduled-helper.patch => generic/backport-6.1/770-net-introduce-napi_is_scheduled-helper.patch} (62%) rename target/linux/{ipq806x/patches-6.1/700-03-net-stmmac-improve-TX-timer-arm-logic.patch => generic/backport-6.1/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch} (91%) rename target/linux/{ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch => generic/backport-6.1/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch} (71%) rename target/linux/{ipq806x/patches-6.1/700-04-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch => generic/backport-6.1/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch} (86%) diff --git a/target/linux/ipq806x/patches-6.1/700-01-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.1/770-net-introduce-napi_is_scheduled-helper.patch similarity index 62% rename from target/linux/ipq806x/patches-6.1/700-01-net-introduce-napi_is_scheduled-helper.patch rename to target/linux/generic/backport-6.1/770-net-introduce-napi_is_scheduled-helper.patch index f59c461f65..789b93e9f9 100644 --- a/target/linux/ipq806x/patches-6.1/700-01-net-introduce-napi_is_scheduled-helper.patch +++ b/target/linux/generic/backport-6.1/770-net-introduce-napi_is_scheduled-helper.patch @@ -1,7 +1,7 @@ -From b5532bdc6d09e6e789417f0c7a0b665b57b0e7be Mon Sep 17 00:00:00 2001 +From 7f3eb2174512fe6c9c0f062e96eccb0d3cc6d5cd Mon Sep 17 00:00:00 2001 From: Christian Marangi -Date: Mon, 18 Sep 2023 14:21:56 +0200 -Subject: [PATCH 1/4] net: introduce napi_is_scheduled helper +Date: Wed, 18 Oct 2023 14:35:47 +0200 +Subject: [PATCH] net: introduce napi_is_scheduled helper We currently have napi_if_scheduled_mark_missed that can be used to check if napi is scheduled but that does more thing than simply checking @@ -15,12 +15,13 @@ Update any driver and code that implement a similar check and instead use this new helper. Signed-off-by: Christian Marangi +Signed-off-by: Paolo Abeni --- - drivers/net/ethernet/chelsio/cxgb3/sge.c | 8 -------- - drivers/net/wireless/realtek/rtw89/core.c | 2 +- - include/linux/netdevice.h | 5 +++++ - net/core/dev.c | 2 +- - 4 files changed, 7 insertions(+), 10 deletions(-) + drivers/net/ethernet/chelsio/cxgb3/sge.c | 8 -------- + drivers/net/wireless/realtek/rtw89/core.c | 2 +- + include/linux/netdevice.h | 23 +++++++++++++++++++++++ + net/core/dev.c | 2 +- + 4 files changed, 25 insertions(+), 10 deletions(-) --- a/drivers/net/ethernet/chelsio/cxgb3/sge.c +++ b/drivers/net/ethernet/chelsio/cxgb3/sge.c @@ -52,10 +53,28 @@ Signed-off-by: Christian Marangi rtw89_core_hw_to_sband_rate(rx_status); --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -468,6 +468,11 @@ static inline bool napi_prefer_busy_poll +@@ -468,6 +468,29 @@ static inline bool napi_prefer_busy_poll return test_bit(NAPI_STATE_PREFER_BUSY_POLL, &n->state); } ++/** ++ * napi_is_scheduled - test if NAPI is scheduled ++ * @n: NAPI context ++ * ++ * This check is "best-effort". With no locking implemented, ++ * a NAPI can be scheduled or terminate right after this check ++ * and produce not precise results. ++ * ++ * NAPI_STATE_SCHED is an internal state, napi_is_scheduled ++ * should not be used normally and napi_schedule should be ++ * used instead. ++ * ++ * Use only if the driver really needs to check if a NAPI ++ * is scheduled for example in the context of delayed timer ++ * that can be skipped if a NAPI is already scheduled. ++ * ++ * Return True if NAPI is scheduled, False otherwise. ++ */ +static inline bool napi_is_scheduled(struct napi_struct *n) +{ + return test_bit(NAPI_STATE_SCHED, &n->state); @@ -66,7 +85,7 @@ Signed-off-by: Christian Marangi /** --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6594,7 +6594,7 @@ static int __napi_poll(struct napi_struc +@@ -6533,7 +6533,7 @@ static int __napi_poll(struct napi_struc * accidentally calling ->poll() when NAPI is not scheduled. */ work = 0; diff --git a/target/linux/ipq806x/patches-6.1/700-03-net-stmmac-improve-TX-timer-arm-logic.patch b/target/linux/generic/backport-6.1/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch similarity index 91% rename from target/linux/ipq806x/patches-6.1/700-03-net-stmmac-improve-TX-timer-arm-logic.patch rename to target/linux/generic/backport-6.1/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch index 21c7ff1777..07c087260c 100644 --- a/target/linux/ipq806x/patches-6.1/700-03-net-stmmac-improve-TX-timer-arm-logic.patch +++ b/target/linux/generic/backport-6.1/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch @@ -1,7 +1,7 @@ -From cd40cd8b1ca4a6f531c6c3fd78b306e5014f9c04 Mon Sep 17 00:00:00 2001 +From 2d1a42cf7f77cda54dbbee18d00b1200e7bc22aa Mon Sep 17 00:00:00 2001 From: Christian Marangi -Date: Mon, 18 Sep 2023 14:39:01 +0200 -Subject: [PATCH 3/4] net: stmmac: improve TX timer arm logic +Date: Wed, 18 Oct 2023 14:35:48 +0200 +Subject: [PATCH 1/3] net: stmmac: improve TX timer arm logic There is currently a problem with the TX timer getting armed multiple unnecessary times causing big performance regression on some device that @@ -39,13 +39,14 @@ With the following new logic the original performance are restored while keeping using the hrtimer. Signed-off-by: Christian Marangi +Signed-off-by: Paolo Abeni --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -2976,13 +2976,25 @@ static void stmmac_tx_timer_arm(struct s +@@ -2975,13 +2975,25 @@ static void stmmac_tx_timer_arm(struct s { struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue]; u32 tx_coal_timer = priv->tx_coal_timer[queue]; diff --git a/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch b/target/linux/generic/backport-6.1/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch similarity index 71% rename from target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch rename to target/linux/generic/backport-6.1/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch index 6df071c9b8..d1e04e9069 100644 --- a/target/linux/ipq806x/patches-6.1/700-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch +++ b/target/linux/generic/backport-6.1/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch @@ -1,7 +1,7 @@ -From fb04db35447d1e8ff557c8e57139164cecab7de5 Mon Sep 17 00:00:00 2001 +From a594166387fe08e6f5a32130c400249a35b298f9 Mon Sep 17 00:00:00 2001 From: Christian Marangi -Date: Wed, 27 Sep 2023 15:38:31 +0200 -Subject: [PATCH 2/4] net: stmmac: move TX timer arm after DMA enable +Date: Wed, 18 Oct 2023 14:35:49 +0200 +Subject: [PATCH 2/3] net: stmmac: move TX timer arm after DMA enable Move TX timer arm call after DMA interrupt is enabled again. @@ -11,15 +11,21 @@ we permit to correctly skip if a DMA interrupt has been fired and a napi has been scheduled again. Signed-off-by: Christian Marangi +Signed-off-by: Paolo Abeni --- - .../net/ethernet/stmicro/stmmac/stmmac_main.c | 19 +++++++++++++++---- - 1 file changed, 15 insertions(+), 4 deletions(-) + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -2530,7 +2530,8 @@ static void stmmac_bump_dma_threshold(st +@@ -2528,9 +2528,13 @@ static void stmmac_bump_dma_threshold(st + * @priv: driver private structure + * @budget: napi budget limiting this functions packet handling * @queue: TX queue index ++ * @pending_packets: signal to arm the TX coal timer * Description: it reclaims the transmit resources after transmission completes. ++ * If some packets still needs to be handled, due to TX coalesce, set ++ * pending_packets to true to make NAPI arm the TX coal timer. */ -static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue) +static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue, @@ -27,7 +33,7 @@ Signed-off-by: Christian Marangi { struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue]; unsigned int bytes_compl = 0, pkts_compl = 0; -@@ -2693,7 +2694,7 @@ static int stmmac_tx_clean(struct stmmac +@@ -2693,7 +2697,7 @@ static int stmmac_tx_clean(struct stmmac /* We still have pending packets, let's call for a new scheduling */ if (tx_q->dirty_tx != tx_q->cur_tx) @@ -36,7 +42,7 @@ Signed-off-by: Christian Marangi __netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue)); -@@ -5473,12 +5474,13 @@ static int stmmac_napi_poll_tx(struct na +@@ -5485,12 +5489,13 @@ static int stmmac_napi_poll_tx(struct na struct stmmac_channel *ch = container_of(napi, struct stmmac_channel, tx_napi); struct stmmac_priv *priv = ch->priv_data; @@ -51,7 +57,7 @@ Signed-off-by: Christian Marangi work_done = min(work_done, budget); if (work_done < budget && napi_complete_done(napi, work_done)) { -@@ -5489,6 +5491,10 @@ static int stmmac_napi_poll_tx(struct na +@@ -5501,6 +5506,10 @@ static int stmmac_napi_poll_tx(struct na spin_unlock_irqrestore(&ch->lock, flags); } @@ -62,11 +68,12 @@ Signed-off-by: Christian Marangi return work_done; } -@@ -5498,11 +5504,12 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5509,12 +5518,13 @@ static int stmmac_napi_poll_rxtx(struct + struct stmmac_channel *ch = container_of(napi, struct stmmac_channel, rxtx_napi); struct stmmac_priv *priv = ch->priv_data; - int rx_done, tx_done, rxtx_done; + bool tx_pending_packets = false; + int rx_done, tx_done, rxtx_done; u32 chan = ch->index; priv->xstats.napi_poll++; @@ -76,7 +83,7 @@ Signed-off-by: Christian Marangi tx_done = min(tx_done, budget); rx_done = stmmac_rx_zc(priv, budget, chan); -@@ -5527,6 +5534,10 @@ static int stmmac_napi_poll_rxtx(struct +@@ -5539,6 +5549,10 @@ static int stmmac_napi_poll_rxtx(struct spin_unlock_irqrestore(&ch->lock, flags); } diff --git a/target/linux/ipq806x/patches-6.1/700-04-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch b/target/linux/generic/backport-6.1/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch similarity index 86% rename from target/linux/ipq806x/patches-6.1/700-04-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch rename to target/linux/generic/backport-6.1/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch index 3f97702097..cc8cbf5a16 100644 --- a/target/linux/ipq806x/patches-6.1/700-04-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch +++ b/target/linux/generic/backport-6.1/771-v6.7-03-net-stmmac-increase-TX-coalesce-timer-to-5ms.patch @@ -1,7 +1,7 @@ -From 95281ab33fbaa1e974bceb20cfb0f5c92934f2b3 Mon Sep 17 00:00:00 2001 +From 039550960a2235cfe2dfaa773df9f98f8da31a0c Mon Sep 17 00:00:00 2001 From: Christian Marangi -Date: Mon, 18 Sep 2023 15:11:13 +0200 -Subject: [PATCH 4/4] net: stmmac: increase TX coalesce timer to 5ms +Date: Wed, 18 Oct 2023 14:35:50 +0200 +Subject: [PATCH 3/3] net: stmmac: increase TX coalesce timer to 5ms Commit 8fce33317023 ("net: stmmac: Rework coalesce timer and fix multi-queue races") decreased the TX coalesce timer from 40ms to 1ms. @@ -20,6 +20,7 @@ much interrupt to be generated and permitting good performance for internet oriented devices. Signed-off-by: Christian Marangi +Signed-off-by: Paolo Abeni --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/backport-6.1/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch b/target/linux/generic/backport-6.1/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch index a9e3c71d54..c4141eee93 100644 --- a/target/linux/generic/backport-6.1/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch +++ b/target/linux/generic/backport-6.1/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch @@ -46,7 +46,7 @@ Signed-off-by: David S. Miller --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1668,7 +1668,6 @@ struct net_device_ops { +@@ -1691,7 +1691,6 @@ struct net_device_ops { * @IFF_FAILOVER: device is a failover master device * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device @@ -54,7 +54,7 @@ Signed-off-by: David S. Miller * @IFF_TX_SKB_NO_LINEAR: device/driver is capable of xmitting frames with * skb_headlen(skb) == 0 (data starts from frag0) * @IFF_CHANGE_PROTO_DOWN: device supports setting carrier via IFLA_PROTO_DOWN -@@ -1704,7 +1703,7 @@ enum netdev_priv_flags { +@@ -1727,7 +1726,7 @@ enum netdev_priv_flags { IFF_FAILOVER = 1<<27, IFF_FAILOVER_SLAVE = 1<<28, IFF_L3MDEV_RX_HANDLER = 1<<29, @@ -63,7 +63,7 @@ Signed-off-by: David S. Miller IFF_TX_SKB_NO_LINEAR = BIT_ULL(31), IFF_CHANGE_PROTO_DOWN = BIT_ULL(32), }; -@@ -1739,7 +1738,6 @@ enum netdev_priv_flags { +@@ -1762,7 +1761,6 @@ enum netdev_priv_flags { #define IFF_FAILOVER IFF_FAILOVER #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER diff --git a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch index 40aeb5da6f..b0be9dfdcb 100644 --- a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch +++ b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch @@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -1707,6 +1707,7 @@ enum netdev_priv_flags { +@@ -1730,6 +1730,7 @@ enum netdev_priv_flags { /* was IFF_LIVE_RENAME_OK */ IFF_TX_SKB_NO_LINEAR = BIT_ULL(31), IFF_CHANGE_PROTO_DOWN = BIT_ULL(32), @@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau }; #define IFF_802_1Q_VLAN IFF_802_1Q_VLAN -@@ -1740,6 +1741,7 @@ enum netdev_priv_flags { +@@ -1763,6 +1764,7 @@ enum netdev_priv_flags { #define IFF_FAILOVER_SLAVE IFF_FAILOVER_SLAVE #define IFF_L3MDEV_RX_HANDLER IFF_L3MDEV_RX_HANDLER #define IFF_TX_SKB_NO_LINEAR IFF_TX_SKB_NO_LINEAR @@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau /* Specifies the type of the struct net_device::ml_priv pointer */ enum netdev_ml_priv_type { -@@ -2108,6 +2110,11 @@ struct net_device { +@@ -2131,6 +2133,11 @@ struct net_device { const struct tlsdev_ops *tlsdev_ops; #endif @@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau const struct header_ops *header_ops; unsigned char operstate; -@@ -2183,6 +2190,10 @@ struct net_device { +@@ -2206,6 +2213,10 @@ struct net_device { struct mctp_dev __rcu *mctp_ptr; #endif diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch index 8763b92c02..11850c0418 100644 --- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch +++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch @@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2134,6 +2134,8 @@ struct net_device { +@@ -2157,6 +2157,8 @@ struct net_device { struct netdev_hw_addr_list mc; struct netdev_hw_addr_list dev_addrs; diff --git a/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch b/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch index df422e3a08..a7a4bafbb6 100644 --- a/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch +++ b/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch @@ -17,7 +17,7 @@ Signed-off-by: Christian Marangi --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -2169,7 +2169,7 @@ struct net_device { +@@ -2192,7 +2192,7 @@ struct net_device { #if IS_ENABLED(CONFIG_AX25) void *ax25_ptr; #endif diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch index baaf850fe4..944e4d1869 100644 --- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch +++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -520,6 +520,7 @@ static inline bool napi_complete(struct +@@ -543,6 +543,7 @@ static inline bool napi_complete(struct } int dev_set_threaded(struct net_device *dev, bool threaded); @@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau /** * napi_disable - prevent NAPI from scheduling -@@ -3129,6 +3130,7 @@ struct softnet_data { +@@ -3152,6 +3153,7 @@ struct softnet_data { unsigned int processed; unsigned int time_squeeze; unsigned int received_rps; From cf43e523c2ee79c4b2bfb3e74fb7083c05d9ea5d Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 21 Jan 2024 22:38:11 +0100 Subject: [PATCH 10/22] ipq806x: renumber backport patches starting from 000 Renumber backport patches starting from 000 to tidy things up. Also fix patch name format for the mmc backport patch. Refresh patches affected by this renumber change. Signed-off-by: Christian Marangi --- ...01-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch} | 0 ...-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch} | 0 ...-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch} | 0 ...-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch} | 0 ...-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch} | 0 ...-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch} | 0 ...-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch} | 0 ...2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch} | 2 +- ...2-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch | 2 +- .../115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch | 2 +- 10 files changed, 3 insertions(+), 3 deletions(-) rename target/linux/ipq806x/patches-6.1/{120-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch => 001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch => 002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch => 002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch => 002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch => 002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch => 002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch} (100%) rename target/linux/ipq806x/patches-6.1/{121-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch => 002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch} (100%) rename target/linux/ipq806x/patches-6.1/{131-6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch => 003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch} (98%) diff --git a/target/linux/ipq806x/patches-6.1/120-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch b/target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/120-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch rename to target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch diff --git a/target/linux/ipq806x/patches-6.1/121-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch similarity index 100% rename from target/linux/ipq806x/patches-6.1/121-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch rename to target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch diff --git a/target/linux/ipq806x/patches-6.1/131-6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch b/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch similarity index 98% rename from target/linux/ipq806x/patches-6.1/131-6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch rename to target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch index e542421085..7e65f4cdff 100644 --- a/target/linux/ipq806x/patches-6.1/131-6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch +++ b/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch @@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20221024233817.27410-1-ansuelsmth@gmail.com --- a/arch/arm/boot/dts/qcom-ipq8064.dtsi +++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi -@@ -932,7 +932,6 @@ +@@ -756,7 +756,6 @@ non-removable; cap-sd-highspeed; cap-mmc-highspeed; diff --git a/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch b/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch index 3a6c281793..45f05dd423 100644 --- a/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch +++ b/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch @@ -31,7 +31,7 @@ Signed-off-by: Christian Marangi }; opp_table_l2: opp_table_l2 { -@@ -1410,6 +1400,16 @@ +@@ -1409,6 +1399,16 @@ #reset-cells = <1>; }; diff --git a/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch b/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch index a324b6facf..24e0ecf619 100644 --- a/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch +++ b/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch @@ -32,7 +32,7 @@ Signed-off-by: Christian Marangi thermal-zones { sensor0-thermal { polling-delay-passive = <0>; -@@ -1410,6 +1422,13 @@ +@@ -1409,6 +1421,13 @@ operating-points-v2 = <&opp_table_l2>; }; From dac2f07c230af4e8082c15c9be3bbe9a4c1835b7 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Sun, 21 Jan 2024 22:42:54 +0100 Subject: [PATCH 11/22] ipq806x: replace tsens patch with upstream version Replace tsens patch with upstream version. Signed-off-by: Christian Marangi --- ...com-tsens-Init-debugfs-only-with-su.patch} | 21 ++++---- ...qcom-tsens-Fix-wrong-version-id-dbg_.patch | 29 ++++++++++ ...qcom-tsens-Rework-debugfs-file-struc.patch | 54 +++++++++++++++++++ ...tsens-simplify-debugfs-init-function.patch | 54 ------------------- 4 files changed, 94 insertions(+), 64 deletions(-) rename target/linux/ipq806x/patches-6.1/{110-01-thermal-qcom-tsens-init-debugfs-only-with-successful.patch => 004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch} (52%) create mode 100644 target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch create mode 100644 target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch delete mode 100644 target/linux/ipq806x/patches-6.1/110-02-thermal-qcom-tsens-simplify-debugfs-init-function.patch diff --git a/target/linux/ipq806x/patches-6.1/110-01-thermal-qcom-tsens-init-debugfs-only-with-successful.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch similarity index 52% rename from target/linux/ipq806x/patches-6.1/110-01-thermal-qcom-tsens-init-debugfs-only-with-successful.patch rename to target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch index c9b20a0222..76df0f5681 100644 --- a/target/linux/ipq806x/patches-6.1/110-01-thermal-qcom-tsens-init-debugfs-only-with-successful.patch +++ b/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch @@ -1,18 +1,20 @@ -From 8f32d48a309246a80bdca505968085a484d54408 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Mon, 19 Apr 2021 03:01:53 +0200 -Subject: [thermal-next PATCH v2 1/2] thermal: qcom: tsens: init debugfs only with +From de48d8766afcd97d147699aaff78a338081c9973 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Sat, 22 Oct 2022 14:56:55 +0200 +Subject: [PATCH 1/3] thermal/drivers/qcom/tsens: Init debugfs only with successful probe -calibrate and tsens_register can fail or PROBE_DEFER. This will cause a +Calibrate and tsens_register can fail or PROBE_DEFER. This will cause a double or a wrong init of the debugfs information. Init debugfs only with successful probe fixing warning about directory already present. -Signed-off-by: Ansuel Smith +Signed-off-by: Christian Marangi Acked-by: Thara Gopinath +Link: https://lore.kernel.org/r/20221022125657.22530-2-ansuelsmth@gmail.com +Signed-off-by: Daniel Lezcano --- - drivers/thermal/qcom/tsens.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) + drivers/thermal/qcom/tsens.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -25,13 +27,12 @@ Acked-by: Thara Gopinath err_put_device: put_device(&op->dev); return ret; -@@ -1156,7 +1154,12 @@ static int tsens_probe(struct platform_d +@@ -1156,7 +1154,11 @@ static int tsens_probe(struct platform_d } } - return tsens_register(priv); + ret = tsens_register(priv); -+ + if (!ret) + tsens_debug_init(pdev); + diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch new file mode 100644 index 0000000000..10f1e36b58 --- /dev/null +++ b/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch @@ -0,0 +1,29 @@ +From c7e077e921fa94e0c06c8d14af6c0504c8a5f4bd Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Sat, 22 Oct 2022 14:56:56 +0200 +Subject: [PATCH 2/3] thermal/drivers/qcom/tsens: Fix wrong version id + dbg_version_show + +For VER_0 the version was incorrectly reported as 0.1.0. + +Fix that and correctly report the major version for this old tsens +revision. + +Signed-off-by: Christian Marangi +Link: https://lore.kernel.org/r/20221022125657.22530-3-ansuelsmth@gmail.com +Signed-off-by: Daniel Lezcano +--- + drivers/thermal/qcom/tsens.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/thermal/qcom/tsens.c ++++ b/drivers/thermal/qcom/tsens.c +@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f + return ret; + seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver); + } else { +- seq_puts(s, "0.1.0\n"); ++ seq_printf(s, "0.%d.0\n", priv->feat->ver_major); + } + + return 0; diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch new file mode 100644 index 0000000000..63cce7974b --- /dev/null +++ b/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch @@ -0,0 +1,54 @@ +From 89992d95ed1046338c7866ef7bbe6de543a2af91 Mon Sep 17 00:00:00 2001 +From: Christian Marangi +Date: Sat, 22 Oct 2022 14:56:57 +0200 +Subject: [PATCH 3/3] thermal/drivers/qcom/tsens: Rework debugfs file structure + +The current tsens debugfs structure is composed by: +- a tsens dir in debugfs with a version file +- a directory for each tsens istance with sensors file to dump all the + sensors value. + +This works on the assumption that we have the same version for each +istance but this assumption seems fragile and with more than one tsens +istance results in the version file not tracking each of them. + +A better approach is to just create a subdirectory for each tsens +istance and put there version and sensors debugfs file. + +Using this new implementation results in less code since debugfs entry +are created only on successful tsens probe. + +Signed-off-by: Christian Marangi +Link: https://lore.kernel.org/r/20221022125657.22530-4-ansuelsmth@gmail.com +Signed-off-by: Daniel Lezcano +--- + drivers/thermal/qcom/tsens.c | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +--- a/drivers/thermal/qcom/tsens.c ++++ b/drivers/thermal/qcom/tsens.c +@@ -704,21 +704,14 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors); + static void tsens_debug_init(struct platform_device *pdev) + { + struct tsens_priv *priv = platform_get_drvdata(pdev); +- struct dentry *root, *file; + +- root = debugfs_lookup("tsens", NULL); +- if (!root) ++ priv->debug_root = debugfs_lookup("tsens", NULL); ++ if (!priv->debug_root) + priv->debug_root = debugfs_create_dir("tsens", NULL); +- else +- priv->debug_root = root; +- +- file = debugfs_lookup("version", priv->debug_root); +- if (!file) +- debugfs_create_file("version", 0444, priv->debug_root, +- pdev, &dbg_version_fops); + + /* A directory for each instance of the TSENS IP */ + priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root); ++ debugfs_create_file("version", 0444, priv->debug, pdev, &dbg_version_fops); + debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops); + } + #else diff --git a/target/linux/ipq806x/patches-6.1/110-02-thermal-qcom-tsens-simplify-debugfs-init-function.patch b/target/linux/ipq806x/patches-6.1/110-02-thermal-qcom-tsens-simplify-debugfs-init-function.patch deleted file mode 100644 index 0fbc4bd8ca..0000000000 --- a/target/linux/ipq806x/patches-6.1/110-02-thermal-qcom-tsens-simplify-debugfs-init-function.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 4204f22060f7a5d42c6ccb4d4c25a6a875571099 Mon Sep 17 00:00:00 2001 -From: Ansuel Smith -Date: Mon, 19 Apr 2021 03:08:37 +0200 -Subject: [thermal-next PATCH v2 2/2] thermal: qcom: tsens: simplify debugfs init - function - -Simplify debugfs init function. -- Add check for existing dev directory. -- Fix wrong version in dbg_version_show (with version 0.0.0, 0.1.0 was - incorrectly reported) - -Signed-off-by: Ansuel Smith -Reviewed-by: Thara Gopinath ---- - drivers/thermal/qcom/tsens.c | 16 +++++++--------- - 1 file changed, 7 insertions(+), 9 deletions(-) - ---- a/drivers/thermal/qcom/tsens.c -+++ b/drivers/thermal/qcom/tsens.c -@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f - return ret; - seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver); - } else { -- seq_puts(s, "0.1.0\n"); -+ seq_printf(s, "0.%d.0\n", priv->feat->ver_major); - } - - return 0; -@@ -704,21 +704,17 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors); - static void tsens_debug_init(struct platform_device *pdev) - { - struct tsens_priv *priv = platform_get_drvdata(pdev); -- struct dentry *root, *file; - -- root = debugfs_lookup("tsens", NULL); -- if (!root) -+ priv->debug_root = debugfs_lookup("tsens", NULL); -+ if (!priv->debug_root) - priv->debug_root = debugfs_create_dir("tsens", NULL); -- else -- priv->debug_root = root; - -- file = debugfs_lookup("version", priv->debug_root); -- if (!file) -+ if (!debugfs_lookup("version", priv->debug_root)) - debugfs_create_file("version", 0444, priv->debug_root, - pdev, &dbg_version_fops); - - /* A directory for each instance of the TSENS IP */ -- priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root); -+ priv->debug = debugfs_lookup(dev_name(&pdev->dev), priv->debug_root); - debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops); - } - #else From 4d2a82a73c79aea41f14feaaeea319a965041f63 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 22 Jan 2024 01:28:52 +0100 Subject: [PATCH 12/22] ubox: update to Git HEAD (2024-01-22) b2f6da671f7c kmodloader: Fix NULL pointer dereferences error 202d7c05029a kmodloader: fix memory leak in print_modinfo 6cf7d837ee7e kmodloader: fix TOCTOU problem with scan_builtin_modules Signed-off-by: Christian Marangi --- package/system/ubox/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index 42987f536b..317055453f 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git -PKG_SOURCE_DATE:=2024-01-15 -PKG_SOURCE_VERSION:=c006dccecb6f1cf694c9fb9efc6727cbd2ab9ae4 -PKG_MIRROR_HASH:=7919d8d6f06fa50342eec805902d17c61d1224d9d35c392d3c5c36fc782a5c75 +PKG_SOURCE_DATE:=2024-01-22 +PKG_SOURCE_VERSION:=6cf7d837ee7e392ee047aee4f45132f4176b7493 +PKG_MIRROR_HASH:=de63c19f095459dcd08c97f8391b8c735708453da8f31080935ce02c1b1f054a CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From b66a340837388a159b97c46efb45664f8ec42865 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Mon, 22 Jan 2024 01:46:43 +0100 Subject: [PATCH 13/22] fstools: update to Git HEAD (2024-01-22) 2171f6261556 libfstools: force mkfs when formatting overlay 08cd7083cac4 libfstools: fit: improve fit_volume_find string handling Signed-off-by: Christian Marangi --- package/system/fstools/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index 87281a0076..717e59f836 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -12,9 +12,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git -PKG_MIRROR_HASH:=964c3bf2b1d16369380bad1098ab0a1b996f714bb448322bd82ba80aa9acd03f -PKG_SOURCE_DATE:=2024-01-15 -PKG_SOURCE_VERSION:=325d63d67006c5526ab9b0fbc62329da48aa93af +PKG_MIRROR_HASH:=32e39891455b602e9deb367c9ce2d099dc72353fad0bf0433307416925f7b393 +PKG_SOURCE_DATE:=2024-01-22 +PKG_SOURCE_VERSION:=08cd7083cac4bddf88459efa0881ee52858e7d0a CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 From fd46680966e9b9bc282b665282e2e6a22a27c26e Mon Sep 17 00:00:00 2001 From: Tomasz Maciej Nowak Date: Wed, 10 Jan 2024 16:59:48 +0100 Subject: [PATCH 14/22] ramips: mt76x8: enable small_flash feature Some of devices in this target have only 8 MiB space and are closing to borders of usable space. Particularly, TP-Link RE305 v1 already suffers from this issue[1], where with current partition layout, on release images, there's not enough space for overlay. So activate small_flash feature, which will remove some userspace hardening but will gain almost 1 MiB additional flash memory space. Here is small size comparison of similar device (RE365 v1) with default config + LuCI: kernel rootfs sysupgrade current: 2305728 3635044 5964584 small_flash: 1713571 3320132 5047080 1. https://github.com/openwrt/openwrt/issues/14215 Suggested-by: Sander Vanheule Signed-off-by: Tomasz Maciej Nowak --- target/linux/ramips/mt76x8/target.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ramips/mt76x8/target.mk b/target/linux/ramips/mt76x8/target.mk index 862736cb2f..cfc2655cac 100644 --- a/target/linux/ramips/mt76x8/target.mk +++ b/target/linux/ramips/mt76x8/target.mk @@ -4,7 +4,7 @@ SUBTARGET:=mt76x8 BOARDNAME:=MT76x8 based boards -FEATURES+=usb ramdisk +FEATURES+=usb ramdisk small_flash CPU_TYPE:=24kc DEFAULT_PACKAGES += kmod-mt7603 wpad-basic-mbedtls swconfig From 7ad6e8c312d0f46b8c4aca86aee15aaad46f1191 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 22 Jan 2024 13:00:41 +0100 Subject: [PATCH 15/22] scripts/rstrip.sh: ignore /lib/firmware On some platforms, some firmware files might look like executables. These need to be ignored in order to avoid messing them up. Signed-off-by: Felix Fietkau --- scripts/rstrip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index e47960a941..2aa7e96fda 100755 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -20,7 +20,7 @@ TARGETS=$* exit 1 } -find $TARGETS -type f -a -exec file {} \; | \ +find $TARGETS -not -path \*/lib/firmware/\* -a -type f -a -exec file {} \; | \ sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.*/\1:\2/p' | \ ( IFS=":" From ad25cfb6b8a282e47344fba59f42af61e115a8df Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Tue, 9 Jan 2024 11:21:11 +0100 Subject: [PATCH 16/22] qualcommax: add SMP affinity script By default Linux will default to most IRQ-s being mapped to core 0 which during high loads will completely swamp the core 0, so lets add the widely used script that has been floating around forums for a long time to try and optimize the IRQ mapping a bit. Signed-off-by: Robert Marko --- .../base-files/etc/init.d/smp_affinity | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity new file mode 100755 index 0000000000..05d13fff63 --- /dev/null +++ b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity @@ -0,0 +1,36 @@ +#!/bin/sh /etc/rc.common + +START=93 + +enable_affinity_ipq807x() { + set_affinity() { + irq=$(awk "/$1/{ print substr(\$1, 1, length(\$1)-1); exit }" /proc/interrupts) + [ -n "$irq" ] && echo $2 > /proc/irq/$irq/smp_affinity + } + + # assign 4 rx interrupts to each core + set_affinity 'reo2host-destination-ring1' 1 + set_affinity 'reo2host-destination-ring2' 2 + set_affinity 'reo2host-destination-ring3' 4 + set_affinity 'reo2host-destination-ring4' 8 + + # assign 3 tcl completions to last 3 CPUs + set_affinity 'wbm2host-tx-completions-ring1' 2 + set_affinity 'wbm2host-tx-completions-ring2' 4 + set_affinity 'wbm2host-tx-completions-ring3' 8 + + # assign 3 ppdu mac interrupts to last 3 cores + set_affinity 'ppdu-end-interrupts-mac1' 2 + set_affinity 'ppdu-end-interrupts-mac2' 4 + set_affinity 'ppdu-end-interrupts-mac3' 8 + + # assign lan/wan to core 4 + set_affinity 'edma_txcmpl' 8 + set_affinity 'edma_rxfill' 8 + set_affinity 'edma_rxdesc' 8 + set_affinity 'edma_misc' 8 +} + +boot() { + enable_affinity_ipq807x +} From 65fb97b4507bcff3f98739975e9cc7df53137b12 Mon Sep 17 00:00:00 2001 From: Aleksander Jan Bajkowski Date: Sun, 21 Jan 2024 19:02:33 +0100 Subject: [PATCH 17/22] lantiq: fix boot isues on danube boards Enabling SMP on Danube[1] is incompatible with a patch that adds support for interrupt handling on all cores on other platforms[2]. This patch fixes the mentioned issue. 1. 084c20f6c54180f2dc6b3efc1c5ba9b62afbaf26 ("lantiq: xway: kernel: enable SMP support ") 2. fbd33d61648ae8982fbada7ad3b6d8222b367ab5 ("lantiq: enable interrupts on second VPEs") Fixes: #13934 Fixes: #14283 Signed-off-by: Aleksander Jan Bajkowski --- ...egister-smp_ops-on-non-smp-platforms.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 target/linux/lantiq/patches-5.15/0321-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch diff --git a/target/linux/lantiq/patches-5.15/0321-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch b/target/linux/lantiq/patches-5.15/0321-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch new file mode 100644 index 0000000000..78043545b0 --- /dev/null +++ b/target/linux/lantiq/patches-5.15/0321-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch @@ -0,0 +1,33 @@ +From 6e8d8b183accefae42c62f1bd495a405ce454c7d Mon Sep 17 00:00:00 2001 +From: Aleksander Jan Bajkowski +Date: Sun, 21 Jan 2024 18:36:23 +0100 +Subject: [PATCH] MIPS: lantiq: register smp_ops on non-smp platforms + +Lantiq uses a common kernel config for devices with 24Kc and 34Kc cores. +The changes made previously to add support for interrupts on all cores +work on 24Kc platforms with SMP disabled and 34Kc platforms with SMP +enabled. This patch fixes boot issues on Danube (single core 24Kc) with +SMP enabled. + +Fixes: 730320fd770d ("MIPS: lantiq: enable all hardware interrupts on second VPE") +Signed-off-by: Aleksander Jan Bajkowski +--- + arch/mips/lantiq/prom.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +--- a/arch/mips/lantiq/prom.c ++++ b/arch/mips/lantiq/prom.c +@@ -123,10 +123,9 @@ void __init prom_init(void) + prom_init_cmdline(); + + #if defined(CONFIG_MIPS_MT_SMP) +- if (cpu_has_mipsmt) { +- lantiq_smp_ops = vsmp_smp_ops; ++ lantiq_smp_ops = vsmp_smp_ops; ++ if (cpu_has_mipsmt) + lantiq_smp_ops.init_secondary = lantiq_init_secondary; +- register_smp_ops(&lantiq_smp_ops); +- } ++ register_smp_ops(&lantiq_smp_ops); + #endif + } From 33f15dd6d41873b02eb8895b8886763659f1390c Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 23 Jan 2024 09:07:16 +0100 Subject: [PATCH 18/22] jsonfilter: update to Git HEAD (2024-01-23) 013b75ab0598 jsonfilter: drop legacy json-c support 594cfa86469c main: fix spurious premature parse aborts in array mode Fixes: https://bugs.openwrt.org/?task_id=3683 Fixes: https://github.com/openwrt/openwrt/issues/8703 Fixes: https://github.com/openwrt/openwrt/issues/11649 Fixes: https://github.com/openwrt/openwrt/issues/12344 Signed-off-by: Jo-Philipp Wich --- package/utils/jsonfilter/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/utils/jsonfilter/Makefile b/package/utils/jsonfilter/Makefile index 56f96d52b5..fda66bbfb4 100644 --- a/package/utils/jsonfilter/Makefile +++ b/package/utils/jsonfilter/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/jsonpath.git -PKG_SOURCE_DATE:=2018-02-04 -PKG_SOURCE_VERSION:=c7e938d6582a436dddc938539e72dd1320625c54 -PKG_MIRROR_HASH:=0601b4d7aa5ee096e99388a57cb0701673ab58fccd6ed2984a2abbd4f846e045 +PKG_SOURCE_DATE:=2024-01-23 +PKG_SOURCE_VERSION:=594cfa86469c005972ba750614f5b3f1af84d0f6 +PKG_MIRROR_HASH:=70d2e0870b746920af4569631218c38c1dddfee4f5d029ec8ea0a67999bdafcd CMAKE_INSTALL:=1 PKG_MAINTAINER:=Jo-Philipp Wich From 039f8a124133b24a413d747bbee7bb0bee679961 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 23 Jan 2024 09:19:35 +0100 Subject: [PATCH 19/22] wireguard-tools: avoid redundant jsonfilter calls Use a single jsonfilter expression to yield the list of logical wireguard interface names in shell compatible notation. Supersedes: #12344 Signed-off-by: Jo-Philipp Wich --- package/network/utils/wireguard-tools/Makefile | 2 +- package/network/utils/wireguard-tools/files/wireguard_watchdog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package/network/utils/wireguard-tools/Makefile b/package/network/utils/wireguard-tools/Makefile index 5b1fab057d..e2a86c97d8 100644 --- a/package/network/utils/wireguard-tools/Makefile +++ b/package/network/utils/wireguard-tools/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wireguard-tools PKG_VERSION:=1.0.20210914 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=wireguard-tools-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://git.zx2c4.com/wireguard-tools/snapshot/ diff --git a/package/network/utils/wireguard-tools/files/wireguard_watchdog b/package/network/utils/wireguard-tools/files/wireguard_watchdog index 0126f699bb..fc90f4a25b 100644 --- a/package/network/utils/wireguard-tools/files/wireguard_watchdog +++ b/package/network/utils/wireguard-tools/files/wireguard_watchdog @@ -59,7 +59,7 @@ check_peer_activity() { } # query ubus for all active wireguard interfaces -wg_ifaces=$(ubus -S call network.interface dump | jsonfilter -e '@.interface[@.up=true]' | jsonfilter -a -e '@[@.proto="wireguard"].interface' | tr "\n" " ") +eval $(ubus -S call network.interface dump | jsonfilter -e 'wg_ifaces=@.interface[@.up=true && @.proto="wireguard"].interface') # check every peer in every active wireguard interface config_load network From c527073b38bed10479ed258f964a2948d78c6624 Mon Sep 17 00:00:00 2001 From: Nikolay Martynov Date: Sun, 21 Jan 2024 16:51:16 -0500 Subject: [PATCH 20/22] ath79: fix mac address on eap2x5-1port devices Commit e816591e226a ("ath79: qca: convert to nvmem-layout") mistakenly switched the source of the mac address from the 'info' to 'art' partition. This patch updates all devices that share same 'parent' device tree file and was tested to fix the problem for eap225-outdoor-v3 - device that I actually own. Fixes: e816591e226a ("ath79: qca: convert to nvmem-layout") Signed-off-by: Nikolay Martynov [amend commit message] Signed-off-by: Sander Vanheule --- .../ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts | 6 ------ .../ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts | 6 ------ target/linux/ath79/dts/qca9563_tplink_eap225-v1.dts | 6 ------ target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts | 6 ------ target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts | 6 ------ target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts | 6 ------ .../linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi | 12 ++++++++++++ 7 files changed, 12 insertions(+), 36 deletions(-) diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts index 9c1e82bf98..c3f1a130eb 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v1.dts @@ -35,12 +35,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - precalibration_ath10k: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts index 73700b626f..1fac6082cf 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-outdoor-v3.dts @@ -35,12 +35,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - precalibration_ath10k: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v1.dts index 1e100b31a7..9d06a49626 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v1.dts @@ -56,12 +56,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - calibration_ath10k: calibration@5000 { reg = <0x5000 0x844>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts index 32fba98051..5139bc7670 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v3.dts @@ -35,12 +35,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - precalibration_ath10k: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts b/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts index 1c48775cdf..6e7ba5fede 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap225-v4.dts @@ -35,12 +35,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - precalibration_ath10k: pre-calibration@5000 { reg = <0x5000 0x2f20>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts index e7f21fafa5..af133813e7 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts +++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v1.dts @@ -49,12 +49,6 @@ #address-cells = <1>; #size-cells = <1>; - macaddr_info_8: macaddr@8 { - compatible = "mac-base"; - reg = <0x8 0x6>; - #nvmem-cell-cells = <1>; - }; - calibration_ath10k: calibration@5000 { reg = <0x5000 0x844>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi index 9e0b97fcbf..3b36049d5e 100644 --- a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi @@ -55,6 +55,18 @@ label = "info"; reg = <0x030000 0x010000>; read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + compatible = "mac-base"; + reg = <0x8 0x6>; + #nvmem-cell-cells = <1>; + }; + }; }; partition@40000 { From 135e10762077d96a976c0b00311ce95e77082a5d Mon Sep 17 00:00:00 2001 From: Michel Thill Date: Sun, 7 Jan 2024 19:39:30 +0100 Subject: [PATCH 21/22] realtek: d-link dgs-1210-10p improve sfp support The current dts file of dgs-1210-10p doesn't support link states for the sfp ports (they are always up). This patch tries to give better support for this and was run tested on dgs-1210-10p. It was heavily inspired from Paul Fertser, RaylynnKnight and the author of dgs-1210-10mp-f.dts https://forum.openwrt.org/t/dlink-dgs-1210-10p-with-glc-t-co-sfp/170928 Signed-off-by: Michel Thill --- .../dts-5.15/rtl8382_d-link_dgs-1210-10p.dts | 56 ++++++++++++++++++- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-10p.dts b/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-10p.dts index 16934ede3b..1aef88afd4 100644 --- a/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-10p.dts +++ b/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-10p.dts @@ -7,6 +7,42 @@ compatible = "d-link,dgs-1210-10p", "realtek,rtl838x-soc"; model = "D-Link DGS-1210-10P"; + /* i2c of the left SFP cage: port 9 */ + i2c0: i2c-gpio-0 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp0: sfp-p9 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>; + }; + + /* i2c of the right SFP cage: port 10 */ + i2c1: i2c-gpio-1 { + compatible = "i2c-gpio"; + sda-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us = <2>; + #address-cells = <1>; + #size-cells = <0>; + }; + + sfp1: sfp-p10 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -86,8 +122,24 @@ SWITCH_PORT(13, 6, internal) SWITCH_PORT(14, 7, internal) SWITCH_PORT(15, 8, internal) - SWITCH_SFP_PORT(24, 9, rgmii-id) - SWITCH_SFP_PORT(26, 10, rgmii-id) + + port@24 { + reg = <24>; + label = "lan9"; + phy-handle = <&phy24>; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp0>; + }; + + port@26 { + reg = <26>; + label = "lan10"; + phy-handle = <&phy26>; + phy-mode = "1000base-x"; + managed = "in-band-status"; + sfp = <&sfp1>; + }; port@28 { ethernet = <ðernet0>; From 1b7e62b20b1735fcdc498a35e005afcd775abcf4 Mon Sep 17 00:00:00 2001 From: Chuanhong Guo Date: Tue, 23 Jan 2024 19:20:47 +0800 Subject: [PATCH 22/22] mediatek: drop NMBM layout for Xiaomi WR30U This reverts commit dcdcfc15115a1038e90f21f5aa41726d9c7e2fe5. This is a firmware for third-party u-boot mod, which should not be carried here by us. Signed-off-by: Chuanhong Guo --- .../uboot-envtools/files/mediatek_filogic | 1 - ...7981b-xiaomi-mi-router-wr30u-112m-nmbm.dts | 22 ------------------- .../filogic/base-files/etc/board.d/01_leds | 1 - .../filogic/base-files/etc/board.d/02_network | 2 -- target/linux/mediatek/image/filogic.mk | 17 -------------- 5 files changed, 43 deletions(-) delete mode 100644 target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u-112m-nmbm.dts diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index cae761b4f9..4c483ca614 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -101,7 +101,6 @@ ubnt,unifi-6-plus) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000" ;; xiaomi,mi-router-ax3000t|\ -xiaomi,mi-router-wr30u-112m-nmbm|\ xiaomi,mi-router-wr30u-stock|\ xiaomi,redmi-router-ax6000-stock) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000" diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u-112m-nmbm.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u-112m-nmbm.dts deleted file mode 100644 index 7244cdfd61..0000000000 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u-112m-nmbm.dts +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT - -/dts-v1/; -#include "mt7981b-xiaomi-mi-router-wr30u.dtsi" - -/ { - model = "Xiaomi Mi Router WR30U (112M UBI with NMBM-Enabled layout)"; - compatible = "xiaomi,mi-router-wr30u-112m-nmbm", "mediatek,mt7981"; -}; - -&spi_nand { - mediatek,nmbm; - mediatek,bmt-max-ratio = <1>; - mediatek,bmt-max-reserved-blocks = <64>; -}; - -&partitions { - partition@600000 { - label = "ubi"; - reg = <0x600000 0x7000000>; - }; -}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index 51654ae87f..b9fac1bebf 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -33,7 +33,6 @@ routerich,ax3000) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx" ucidef_set_led_netdev "wan-off" "wan-off" "red:wan" "wan" "link" ;; -xiaomi,mi-router-wr30u-112m-nmbm|\ xiaomi,mi-router-wr30u-stock|\ xiaomi,mi-router-wr30u-ubootmod) ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 47e7be971e..a198fb98c9 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -76,7 +76,6 @@ mediatek_setup_interfaces() ;; xiaomi,mi-router-ax3000t|\ xiaomi,mi-router-ax3000t-ubootmod|\ - xiaomi,mi-router-wr30u-112m-nmbm|\ xiaomi,mi-router-wr30u-stock|\ xiaomi,mi-router-wr30u-ubootmod|\ xiaomi,redmi-router-ax6000-stock|\ @@ -164,7 +163,6 @@ mediatek_setup_macs() ;; xiaomi,mi-router-ax3000t|\ xiaomi,mi-router-ax3000t-ubootmod|\ - xiaomi,mi-router-wr30u-112m-nmbm|\ xiaomi,mi-router-wr30u-stock|\ xiaomi,mi-router-wr30u-ubootmod|\ xiaomi,redmi-router-ax6000-stock|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index 8a8879ca32..c64a46fe24 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -799,23 +799,6 @@ endif endef TARGET_DEVICES += xiaomi_mi-router-ax3000t-ubootmod -define Device/xiaomi_mi-router-wr30u-112m-nmbm - DEVICE_VENDOR := Xiaomi - DEVICE_MODEL := Mi Router WR30U (112M UBI with NMBM-Enabled layout) - DEVICE_DTS := mt7981b-xiaomi-mi-router-wr30u-112m-nmbm - DEVICE_DTS_DIR := ../dts - UBINIZE_OPTS := -E 5 - BLOCKSIZE := 128k - PAGESIZE := 2048 - DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware -ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) - ARTIFACTS := initramfs-factory.ubi - ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-kernel.bin | ubinize-kernel -endif - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -endef -TARGET_DEVICES += xiaomi_mi-router-wr30u-112m-nmbm - define Device/xiaomi_mi-router-wr30u-stock DEVICE_VENDOR := Xiaomi DEVICE_MODEL := Mi Router WR30U (stock layout)