]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
econet: update patches for 6.18
authorAhmed Naseef <naseefkm@gmail.com>
Thu, 11 Jun 2026 14:19:40 +0000 (18:19 +0400)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Tue, 16 Jun 2026 09:19:35 +0000 (11:19 +0200)
Fix patch compatibility for kernel 6.18 on econet and refresh with
`make target/linux/refresh V=s`. The shared airoha clk/spi/uart and the
econet-local timer, nand and phy patches are rebased onto the 6.18
upstream code.

Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23755
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
16 files changed:
target/linux/econet/patches-6.18/018-v6.19rc1-dt-bindings-clock-airoha-Add-reset-support-to-EN7523.patch
target/linux/econet/patches-6.18/100-econet-add-en7528-soc.patch
target/linux/econet/patches-6.18/101-econet-timer-add-en7528-support.patch
target/linux/econet/patches-6.18/300-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
target/linux/econet/patches-6.18/301-spi-Airoha-adapt-to-support-en75-mips.patch
target/linux/econet/patches-6.18/303-spi-airoha-snfi-enable-for-econet.patch
target/linux/econet/patches-6.18/310-usb-enable-econet-usb.patch
target/linux/econet/patches-6.18/320-gpio-en7523-enable-for-econet-mips.patch
target/linux/econet/patches-6.18/886-uart-add-en7523-support.patch
target/linux/econet/patches-6.18/887-uart-airoha-add-econet-support.patch
target/linux/econet/patches-6.18/901-nand-enable-en75-bbt.patch
target/linux/econet/patches-6.18/902-snand-mtk-bmt-support.patch
target/linux/econet/patches-6.18/911-clk-airoha-add-econet-en751221-clock-reset-support-t.patch
target/linux/econet/patches-6.18/912-pcie-add-en7528-pcie-and-phy-support.patch
target/linux/econet/patches-6.18/913-pcie-fix-bogus-prefetch-window.patch
target/linux/econet/patches-6.18/914-phy-add-en7528-usb-phy-driver.patch

index ef56753c9bd87fcf33ca28ff65af086506bb701f..cf8041c111bb2485dcf6a154fe2f5bd3d65681c9 100644 (file)
@@ -17,15 +17,15 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
 --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
 +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
 @@ -64,8 +64,6 @@ allOf:
-             - description: scu base address
-             - description: misc scu base address
+         reg:
+           minItems: 2
  
 -        '#reset-cells': false
 -
    - if:
        properties:
          compatible:
-@@ -89,6 +87,7 @@ examples:
+@@ -85,6 +83,7 @@ examples:
        reg = <0x1fa20000 0x400>,
              <0x1fb00000 0x1000>;
        #clock-cells = <1>;
index f11c6d329dcc0c85fc725fee4914b912c31421e1..edff2c57a6923d8bf5c1dfa8063337d078f2cab8 100644 (file)
@@ -14,7 +14,7 @@ This adds boot support for the EN7528 SoC family:
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -391,13 +391,13 @@ config MACH_DECSTATION
+@@ -392,13 +392,13 @@ config MACH_DECSTATION
  config ECONET
        bool "EcoNet MIPS family"
        select BOOT_RAW
index 3d8641459141474e4c708a65b03b09c63fa2eee7..f0d6ec59a6185c1974e031807a6bf76fcfbd0ee6 100644 (file)
@@ -120,7 +120,7 @@ Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
        for_each_possible_cpu(i) {
                struct clock_event_device *cd = &per_cpu(econet_timer_pcpu, i);
  
--              cd->rating              = 310,
+-              cd->rating              = 310;
 -              cd->features            = CLOCK_EVT_FEAT_ONESHOT |
 -                                        CLOCK_EVT_FEAT_C3STOP |
 -                                        CLOCK_EVT_FEAT_PERCPU;
index d3f3054fe758bf1bb3276e98f862bbd0ec693fb0..a312ff0ad61d22a2ddbd7eea4d1522b36abf0afa 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -370,6 +370,12 @@ config SPI_DLN2
+@@ -404,6 +404,12 @@ config SPI_DLN2
         This driver can also be built as a module.  If so, the module
         will be called spi-dln2.
  
@@ -15,7 +15,7 @@
        depends on ARCH_EP93XX || COMPILE_TEST
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
-@@ -52,6 +52,7 @@ obj-$(CONFIG_SPI_DW_BT1)             += spi-dw-bt1.
+@@ -56,6 +56,7 @@ obj-$(CONFIG_SPI_DW_BT1)             += spi-dw-bt1.
  obj-$(CONFIG_SPI_DW_MMIO)             += spi-dw-mmio.o
  obj-$(CONFIG_SPI_DW_PCI)              += spi-dw-pci.o
  obj-$(CONFIG_SPI_EP93XX)              += spi-ep93xx.o
 +      struct spi_controller *ctrl;
 +      int err;
 +
-+      ctrl = devm_spi_alloc_master(&pdev->dev, 0);
++      ctrl = devm_spi_alloc_host(&pdev->dev, 0);
 +      if (!ctrl) {
 +              dev_err(&pdev->dev, "Error allocating SPI controller\n");
 +              return -ENOMEM;
index 888df7552e8633c079384500aa6571875ebe7397..12d511466a5828952e3f492958a4e1bf4dd19871 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
 ---
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -372,7 +372,7 @@ config SPI_DLN2
+@@ -406,7 +406,7 @@ config SPI_DLN2
  
  config SPI_AIROHA_EN7523
        bool "Airoha EN7523 SPI controller support"
index 8556633d01c6cbd88fc0a88ee5acd26b394dc3a7..ec80c11804e428d704bc3657df4df74572dac7c5 100644 (file)
@@ -10,7 +10,7 @@ performance compared to the manual mode spi-en7523 driver.
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -59,7 +59,7 @@ comment "SPI Master Controller Drivers"
+@@ -62,7 +62,7 @@ comment "SPI Master Controller Drivers"
  
  config SPI_AIROHA_SNFI
        tristate "Airoha SPI NAND Flash Interface"
index a550bbfae5ccc313734ab8f5f38539ae436b8551..a81f957cebd2815e36df84beac838897d7dc0250 100644 (file)
@@ -1,6 +1,6 @@
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -391,6 +391,7 @@ config MACH_DECSTATION
+@@ -392,6 +392,7 @@ config MACH_DECSTATION
  config ECONET
        bool "EcoNet MIPS family"
        select BOOT_RAW
index 09e86ff5c9f5f459482472e0652082bb1a63442c..307b5c0b79da104b288547294004aa2ba61875de 100644 (file)
@@ -6,7 +6,7 @@ MIPS SoC. Allow building the driver when ECONET is selected.
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -271,7 +271,7 @@ config GPIO_EM
+@@ -293,7 +293,7 @@ config GPIO_EM
  
  config GPIO_EN7523
        tristate "Airoha GPIO support"
index 486208f71ad2effc5cf2e5c7fbc7fd19dae315b3..f143e33695ff478dcb9d6edd8f40d9c115c9dea3 100644 (file)
@@ -97,7 +97,7 @@
 +EXPORT_SYMBOL_GPL(en7523_set_uart_baud_rate);
 --- a/drivers/tty/serial/8250/8250_of.c
 +++ b/drivers/tty/serial/8250/8250_of.c
-@@ -341,6 +341,7 @@ static const struct of_device_id of_plat
+@@ -353,6 +353,7 @@ static const struct of_device_id of_plat
        { .compatible = "ti,da830-uart", .data = (void *)PORT_DA830, },
        { .compatible = "nuvoton,wpcm450-uart", .data = (void *)PORT_NPCM, },
        { .compatible = "nuvoton,npcm750-uart", .data = (void *)PORT_NPCM, },
  MODULE_DEVICE_TABLE(of, of_platform_serial_table);
 --- a/drivers/tty/serial/8250/8250_port.c
 +++ b/drivers/tty/serial/8250/8250_port.c
-@@ -319,6 +319,14 @@ static const struct serial8250_config ua
+@@ -311,6 +311,14 @@ static const struct serial8250_config ua
                .rxtrig_bytes   = {1, 8, 16, 30},
                .flags          = UART_CAP_FIFO | UART_CAP_AFE,
        },
  };
  
  /* Uart divisor latch read */
-@@ -2841,6 +2849,12 @@ serial8250_do_set_termios(struct uart_po
-       serial8250_set_divisor(port, baud, quot, frac);
+@@ -2782,6 +2790,11 @@ serial8250_do_set_termios(struct uart_po
+               serial8250_set_ier(port, termios);
+               serial8250_set_efr(port, termios);
+               serial8250_set_divisor(port, baud, quot, frac);
 +#ifdef CONFIG_SERIAL_8250_AIROHA
-+      /* Airoha SoCs have custom registers for baud rate settings */
-+      if (port->type == PORT_AIROHA)
-+              en7523_set_uart_baud_rate(port, baud);
++              /* Airoha SoCs have custom registers for baud rate settings */
++              if (port->type == PORT_AIROHA)
++                      en7523_set_uart_baud_rate(port, baud);
 +#endif
-+
-       /*
-        * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR
-        * is written without DLAB set, this mode will be disabled.
+               serial8250_set_fcr(port, termios);
+               serial8250_set_mctrl(port, port->mctrl);
+       }
 --- a/drivers/tty/serial/8250/Kconfig
 +++ b/drivers/tty/serial/8250/Kconfig
-@@ -355,6 +355,16 @@ config SERIAL_8250_ACORN
+@@ -356,6 +356,16 @@ config SERIAL_8250_ACORN
          system, say Y to this option.  The driver can handle 1, 2, or 3 port
          cards.  If unsure, say N.
  
                               unsigned int quot);
  int fsl8250_handle_irq(struct uart_port *port);
 +int en7523_set_uart_baud_rate(struct uart_port *port, unsigned int baud);
+ void serial8250_handle_irq_locked(struct uart_port *port, unsigned int iir);
  int serial8250_handle_irq(struct uart_port *port, unsigned int iir);
  u16 serial8250_rx_chars(struct uart_8250_port *up, u16 lsr);
- void serial8250_read_char(struct uart_8250_port *up, u16 lsr);
index b25d02e9690784a661f7e1f987126108151dd3f1..560b020ab65535dfc13605c5a9f9df03355f05e0 100644 (file)
@@ -7,7 +7,7 @@ the Airoha UART driver for EcoNet platforms.
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/drivers/tty/serial/8250/Kconfig
 +++ b/drivers/tty/serial/8250/Kconfig
-@@ -357,7 +357,7 @@ config SERIAL_8250_ACORN
+@@ -358,7 +358,7 @@ config SERIAL_8250_ACORN
  
  config SERIAL_8250_AIROHA
        tristate "Airoha UART support"
index 91e184bd96a506366c130295ebc5df8f195b44be..569e37d736033b377d92784259e7b51e4e33b780 100644 (file)
@@ -14,9 +14,9 @@ Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
  obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o
 -obj-$(CONFIG_MTD_NAND_MTK_BMT)        += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o
 +obj-$(CONFIG_MTD_NAND_MTK_BMT)        += mtk_bmt.o mtk_bmt_v2.o mtk_bmt_bbt.o mtk_bmt_nmbm.o en75_bmt.o
+ obj-$(CONFIG_MTD_NAND_ECC_REALTEK) += ecc-realtek.o
  obj-$(CONFIG_SPI_QPIC_SNAND) += qpic_common.o
  obj-$(CONFIG_MTD_NAND_QCOM) += qpic_common.o
- obj-y += onenand/
 --- a/drivers/mtd/nand/mtk_bmt.h
 +++ b/drivers/mtd/nand/mtk_bmt.h
 @@ -77,6 +77,7 @@ extern struct bmt_desc bmtd;
index 2dc81292ec4b52ef6500617d8884a9106719777a..804542b9f5e3b0513a33b2e0a998732966b6b8a2 100644 (file)
@@ -6,9 +6,9 @@
  #include <linux/spi/spi-mem.h>
 +#include <linux/mtd/mtk_bmt.h>
  
static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
+ int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
  {
-@@ -1604,6 +1605,7 @@ static int spinand_probe(struct spi_mem
+@@ -1718,6 +1719,7 @@ static int spinand_probe(struct spi_mem
        if (ret)
                return ret;
  
@@ -16,7 +16,7 @@
        ret = mtd_device_register(mtd, NULL, 0);
        if (ret)
                goto err_spinand_cleanup;
-@@ -1611,6 +1613,7 @@ static int spinand_probe(struct spi_mem
+@@ -1725,6 +1727,7 @@ static int spinand_probe(struct spi_mem
        return 0;
  
  err_spinand_cleanup:
@@ -24,7 +24,7 @@
        spinand_cleanup(spinand);
  
        return ret;
-@@ -1629,6 +1632,7 @@ static int spinand_remove(struct spi_mem
+@@ -1743,6 +1746,7 @@ static int spinand_remove(struct spi_mem
        if (ret)
                return ret;
  
index 021043a13d25fa9cf4f9e3fc4cdec725778af705..61fd157b5ce201b24955b0f27c6f17daf806561f 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
 
 --- a/drivers/clk/Kconfig
 +++ b/drivers/clk/Kconfig
-@@ -210,13 +210,13 @@ config COMMON_CLK_CS2000_CP
+@@ -218,13 +218,13 @@ config COMMON_CLK_CS2000_CP
          If you say yes here you get support for the CS2000 clock multiplier.
  
  config COMMON_CLK_EN7523
index ee8d1bdab9d36d45f4bb114fd8cedc8c6b86ad13..0a320436cf74342be35520498edc7bed009d4216 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/pci/controller/Kconfig
 +++ b/drivers/pci/controller/Kconfig
-@@ -187,7 +187,7 @@ config PCI_MVEBU
+@@ -193,7 +193,7 @@ config PCI_MVEBU
  
  config PCIE_MEDIATEK
        tristate "MediaTek PCIe controller"
@@ -8,7 +8,7 @@
 +      depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
        depends on OF
        depends on PCI_MSI
-       help
+       select IRQ_MSI_LIB
 --- a/arch/mips/econet/Kconfig
 +++ b/arch/mips/econet/Kconfig
 @@ -14,7 +14,9 @@ choice
@@ -35,7 +35,7 @@
                select SYS_SUPPORTS_HIGHMEM
 --- a/drivers/pci/controller/pcie-mediatek.c
 +++ b/drivers/pci/controller/pcie-mediatek.c
-@@ -76,6 +76,7 @@
+@@ -77,6 +77,7 @@
  
  #define PCIE_CONF_VEND_ID     0x100
  #define PCIE_CONF_DEVICE_ID   0x102
@@ -43,7 +43,7 @@
  #define PCIE_CONF_CLASS_ID    0x106
  
  #define PCIE_INT_MASK         0x420
-@@ -88,6 +89,11 @@
+@@ -89,6 +90,11 @@
  #define MSI_MASK              BIT(23)
  #define MTK_MSI_IRQS_NUM      32
  
@@ -55,7 +55,7 @@
  #define PCIE_AHB_TRANS_BASE0_L        0x438
  #define PCIE_AHB_TRANS_BASE0_H        0x43c
  #define AHB2PCIE_SIZE(x)      ((x) & GENMASK(4, 0))
-@@ -750,6 +756,86 @@ static int mtk_pcie_startup_port_v2(stru
+@@ -746,6 +752,86 @@ static int mtk_pcie_startup_port_v2(stru
        return 0;
  }
  
  static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
                                      unsigned int devfn, int where)
  {
-@@ -1116,6 +1202,20 @@ static int mtk_pcie_probe(struct platfor
+@@ -1107,6 +1193,20 @@ static int mtk_pcie_probe(struct platfor
        if (err)
                goto put_resources;
  
        return 0;
  
  put_resources:
-@@ -1225,12 +1325,19 @@ static const struct mtk_pcie_soc mtk_pci
+@@ -1216,12 +1316,19 @@ static const struct mtk_pcie_soc mtk_pci
        .setup_irq = mtk_pcie_setup_irq,
  };
  
  MODULE_DEVICE_TABLE(of, mtk_pcie_ids);
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
-@@ -82,6 +82,17 @@ config PHY_AIROHA_PCIE
-         This driver create the basic PHY instance and provides initialize
-         callback for PCIe GEN3 port.
+@@ -123,6 +123,17 @@ config PHY_NXP_PTN3222
+         schemes. It supports all three USB 2.0 data rates: Low Speed, Full
+         Speed and High Speed.
  
 +config PHY_EN7528_PCIE
 +      tristate "EcoNet EN7528 PCIe PHY Driver"
  source "drivers/phy/broadcom/Kconfig"
 --- a/drivers/phy/Makefile
 +++ b/drivers/phy/Makefile
-@@ -11,6 +11,7 @@ obj-$(CONFIG_PHY_XGENE)                      += phy-xgene.o
- obj-$(CONFIG_PHY_PISTACHIO_USB)               += phy-pistachio-usb.o
+@@ -14,6 +14,7 @@ obj-$(CONFIG_PHY_PISTACHIO_USB)              += phy-
+ obj-$(CONFIG_PHY_SNPS_EUSB2)          += phy-snps-eusb2.o
  obj-$(CONFIG_USB_LGM_PHY)             += phy-lgm-usb.o
  obj-$(CONFIG_PHY_AIROHA_PCIE)         += phy-airoha-pcie.o
 +obj-$(CONFIG_PHY_EN7528_PCIE)         += phy-en7528-pcie.o
- obj-y                                 += allwinner/   \
+ obj-$(CONFIG_PHY_NXP_PTN3222)         += phy-nxp-ptn3222.o
+ obj-$(CONFIG_GENERIC_PHY)             += allwinner/   \
                                           amlogic/     \
-                                          broadcom/    \
 --- /dev/null
 +++ b/drivers/phy/phy-en7528-pcie.c
 @@ -0,0 +1,155 @@
index 872843549d13a72447e85ad6d0e439872598169a..306db192f08246c7cebe814ca5fbf0b494afed07 100644 (file)
@@ -16,7 +16,7 @@ Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/drivers/pci/probe.c
 +++ b/drivers/pci/probe.c
-@@ -349,6 +349,9 @@ static void pci_read_bridge_io(struct pc
+@@ -396,6 +396,9 @@ static void pci_read_bridge_io(struct pc
        unsigned long io_mask, io_granularity, base, limit;
        struct pci_bus_region region;
  
@@ -26,7 +26,7 @@ Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
        io_mask = PCI_IO_RANGE_MASK;
        io_granularity = 0x1000;
        if (dev->io_window_1k) {
-@@ -410,6 +413,9 @@ static void pci_read_bridge_mmio_pref(st
+@@ -466,6 +469,9 @@ static void pci_read_bridge_mmio_pref(st
        pci_bus_addr_t base, limit;
        struct pci_bus_region region;
  
index 308703c630ab4708c6b131dbcb23de4d6b534f3e..0d3f4506f4d2d7865d2d107a2b7f1cd24854d9fe 100644 (file)
@@ -9,7 +9,7 @@ and the Airoha AN7581 USB PHY driver by Christian Marangi.
 Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
-@@ -93,6 +93,17 @@ config PHY_EN7528_PCIE
+@@ -134,6 +134,17 @@ config PHY_EN7528_PCIE
          This driver provides PHY initialization for the two PCIe ports
          on EN7528 SoC.
  
@@ -29,14 +29,14 @@ Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
  source "drivers/phy/broadcom/Kconfig"
 --- a/drivers/phy/Makefile
 +++ b/drivers/phy/Makefile
-@@ -12,6 +12,7 @@ obj-$(CONFIG_PHY_PISTACHIO_USB)              += phy-
+@@ -15,6 +15,7 @@ obj-$(CONFIG_PHY_SNPS_EUSB2)         += phy-snp
  obj-$(CONFIG_USB_LGM_PHY)             += phy-lgm-usb.o
  obj-$(CONFIG_PHY_AIROHA_PCIE)         += phy-airoha-pcie.o
  obj-$(CONFIG_PHY_EN7528_PCIE)         += phy-en7528-pcie.o
 +obj-$(CONFIG_PHY_EN7528_USB)          += phy-en7528-usb.o
- obj-y                                 += allwinner/   \
+ obj-$(CONFIG_PHY_NXP_PTN3222)         += phy-nxp-ptn3222.o
+ obj-$(CONFIG_GENERIC_PHY)             += allwinner/   \
                                           amlogic/     \
-                                          broadcom/    \
 --- /dev/null
 +++ b/drivers/phy/phy-en7528-usb.c
 @@ -0,0 +1,316 @@