ramips: 6.12: manually rebuilding patches
authorMieczyslaw Nalewaj <namiltd@yahoo.com>
Fri, 30 May 2025 05:56:30 +0000 (07:56 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Wed, 11 Jun 2025 12:12:26 +0000 (14:12 +0200)
Manually rebuilding patches:
 - 001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch
 - 311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
 - 314-MIPS-add-bootargs-override-property.patch
 - 405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
 - 810-uvc-add-iPassion-iP2970-support.patch
 - 821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
 - 825-i2c-MIPS-adds-ralink-I2C-driver.patch
 - 845-pwm-add-mediatek-support.patch
 - 860-ramips-add-eip93-driver.patch

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18654
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ramips/patches-6.12/001-v6.13-clocksource-drivers-ralink-Add-Ralink-System-Tick-Co.patch
target/linux/ramips/patches-6.12/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
target/linux/ramips/patches-6.12/314-MIPS-add-bootargs-override-property.patch
target/linux/ramips/patches-6.12/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
target/linux/ramips/patches-6.12/810-uvc-add-iPassion-iP2970-support.patch
target/linux/ramips/patches-6.12/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
target/linux/ramips/patches-6.12/825-i2c-MIPS-adds-ralink-I2C-driver.patch
target/linux/ramips/patches-6.12/845-pwm-add-mediatek-support.patch
target/linux/ramips/patches-6.12/860-ramips-add-eip93-driver.patch

index de3438427d787c85b394fc6a4fcdfae439eebd61..754308d5e8f14f6bb7df8897a2e885f85f99f7e7 100644 (file)
@@ -208,9 +208,9 @@ Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
 -TIMER_OF_DECLARE(systick, "ralink,cevt-systick", ralink_systick_init);
 --- a/drivers/clocksource/Kconfig
 +++ b/drivers/clocksource/Kconfig
-@@ -733,4 +733,13 @@ config GOLDFISH_TIMER
-       help
-         Support for the timer/counter of goldfish-rtc
+@@ -754,4 +754,13 @@ config EP93XX_TIMER
+         Enables support for the Cirrus Logic timer block
+         EP93XX.
  
 +config RALINK_TIMER
 +      bool "Ralink System Tick Counter"
@@ -224,10 +224,10 @@ Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  endmenu
 --- a/drivers/clocksource/Makefile
 +++ b/drivers/clocksource/Makefile
-@@ -89,3 +89,4 @@ obj-$(CONFIG_MSC313E_TIMER)          += timer-ms
- obj-$(CONFIG_GOLDFISH_TIMER)          += timer-goldfish.o
+@@ -91,3 +91,4 @@ obj-$(CONFIG_GOLDFISH_TIMER)         += timer-g
  obj-$(CONFIG_GXP_TIMER)                       += timer-gxp.o
  obj-$(CONFIG_CLKSRC_LOONGSON1_PWM)    += timer-loongson1-pwm.o
+ obj-$(CONFIG_EP93XX_TIMER)            += timer-ep93xx.o
 +obj-$(CONFIG_RALINK_TIMER)            += timer-ralink.o
 --- /dev/null
 +++ b/drivers/clocksource/timer-ralink.c
index 3162d669e1dd49f6db913959fc69df07710bf12e..53fca67c53a51324eb509a6c1cea8636cb531ae2 100644 (file)
@@ -96,10 +96,10 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  }
 --- a/drivers/clocksource/Kconfig
 +++ b/drivers/clocksource/Kconfig
-@@ -732,10 +732,15 @@ config GOLDFISH_TIMER
-       depends on RTC_DRV_GOLDFISH
+@@ -753,10 +753,15 @@ config EP93XX_TIMER
        help
-         Support for the timer/counter of goldfish-rtc
+         Enables support for the Cirrus Logic timer block
+         EP93XX.
 + 
 +config CEVT_SYSTICK_QUIRK
 +      bool
index ac3f3b7aba6436e286c94d9ca5f725474f2c026c..fa03d3a14b95ffb4624f76a0378721ae2febd1d3 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -564,8 +564,28 @@ static int __init bootcmdline_scan_chose
+@@ -556,8 +556,28 @@ static int __init bootcmdline_scan_chose
  
  #endif /* CONFIG_OF_EARLY_FLATTREE */
  
@@ -33,7 +33,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 +
 +      p = of_get_flat_dt_prop(node, "bootargs-override", &l);
 +      if (p != NULL && l > 0) {
-+              strlcpy(boot_command_line, p, COMMAND_LINE_SIZE);
++              strscpy(boot_command_line, p, COMMAND_LINE_SIZE);
 +              *dt_bootargs = true;
 +      }
 +
@@ -46,7 +46,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
        bool dt_bootargs = false;
  
        /*
-@@ -579,6 +599,14 @@ static void __init bootcmdline_init(void
+@@ -571,6 +591,14 @@ static void __init bootcmdline_init(void
        }
  
        /*
index 0e68aa590712bab9c232b86692ab80e8a44d875a..2d780878be72b06f07b74026dd97987bbb6369ab 100644 (file)
@@ -26,12 +26,12 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
  spi-nor-objs                  := core.o sfdp.o swp.o otp.o sysfs.o
  spi-nor-objs                  += atmel.o
 +spi-nor-objs                  += bohong.o
- spi-nor-objs                  += catalyst.o
  spi-nor-objs                  += eon.o
  spi-nor-objs                  += esmt.o
+ spi-nor-objs                  += everspin.o
 --- /dev/null
 +++ b/drivers/mtd/spi-nor/bohong.c
-@@ -0,0 +1,21 @@
+@@ -0,0 +1,25 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2005, Intec Automation Inc.
@@ -44,8 +44,12 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 +
 +static const struct flash_info bohong_parts[] = {
 +      /* BoHong Microelectronics */
-+      { "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256)
-+              NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
++      {
++              .id = SNOR_ID(0x68, 0x40, 0x18),
++              .name = "bh25q128s",
++              .size = SZ_16M,
++              .no_sfdp_flags = SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
++      },
 +};
 +
 +const struct spi_nor_manufacturer spi_nor_bohong = {
@@ -55,21 +59,21 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 +};
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2001,6 +2001,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
+@@ -1966,6 +1966,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
  
  static const struct spi_nor_manufacturer *manufacturers[] = {
        &spi_nor_atmel,
 +      &spi_nor_bohong,
-       &spi_nor_catalyst,
        &spi_nor_eon,
        &spi_nor_esmt,
+       &spi_nor_everspin,
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
-@@ -631,6 +631,7 @@ struct sfdp {
+@@ -580,6 +580,7 @@ struct sfdp {
  
  /* Manufacturer drivers. */
  extern const struct spi_nor_manufacturer spi_nor_atmel;
 +extern const struct spi_nor_manufacturer spi_nor_bohong;
- extern const struct spi_nor_manufacturer spi_nor_catalyst;
  extern const struct spi_nor_manufacturer spi_nor_eon;
  extern const struct spi_nor_manufacturer spi_nor_esmt;
+ extern const struct spi_nor_manufacturer spi_nor_everspin;
index 01ecb16aeb196a95cb8b43250eb3772b2110c283..75fd1368299da7a3d03697e524b81d67bada6567 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/media/usb/uvc/uvc_driver.c
 +++ b/drivers/media/usb/uvc/uvc_driver.c
-@@ -3296,6 +3296,18 @@ static const struct usb_device_id uvc_id
+@@ -3174,6 +3174,18 @@ static const struct usb_device_id uvc_id
          .bInterfaceSubClass   = 1,
          .bInterfaceProtocol   = 0,
          .driver_info          = UVC_INFO_META(V4L2_META_FMT_D4XX) },
@@ -55,7 +55,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 @@ -19,6 +19,11 @@
  #include <linux/wait.h>
  #include <linux/atomic.h>
- #include <asm/unaligned.h>
+ #include <linux/unaligned.h>
 +#include <linux/skbuff.h>
 +#include <linux/kobject.h>
 +#include <linux/netlink.h>
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
  #include <media/jpeg.h>
  #include <media/v4l2-common.h>
-@@ -1321,9 +1326,149 @@ static void uvc_video_decode_data(struct
+@@ -1344,9 +1349,149 @@ static void uvc_video_decode_data(struct
        uvc_urb->async_operations++;
  }
  
@@ -214,7 +214,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        /* Mark the buffer as done if the EOF marker is set. */
        if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
                uvc_dbg(stream->dev, FRAME, "Frame complete (EOF found)\n");
-@@ -1905,6 +2050,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1928,6 +2073,8 @@ static int uvc_init_video_isoc(struct uv
        if (npackets == 0)
                return -ENOMEM;
  
@@ -234,7 +234,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  
  /* Format flags */
  #define UVC_FMT_FLAG_COMPRESSED               0x00000001
-@@ -591,6 +593,7 @@ struct uvc_device {
+@@ -596,6 +598,7 @@ struct uvc_device {
  
        struct input_dev *input;
        char input_phys[64];
index 91746b741c1261c48b745d5b16e84b5e8380c774..ab33f8cb21ed0351fdee79cf20c404e47c13005c 100644 (file)
@@ -16,7 +16,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -904,6 +904,12 @@ config SPI_QCOM_GENI
+@@ -932,6 +932,12 @@ config SPI_QCOM_GENI
          This driver can also be built as a module.  If so, the module
          will be called spi-geni-qcom.
  
@@ -31,7 +31,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
        depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
-@@ -118,6 +118,7 @@ obj-$(CONFIG_SPI_RB4XX)                    += spi-rb4xx.o
+@@ -122,6 +122,7 @@ obj-$(CONFIG_SPI_RB4XX)                    += spi-rb4xx.o
  obj-$(CONFIG_MACH_REALTEK_RTL)                += spi-realtek-rtl.o
  obj-$(CONFIG_SPI_RPCIF)                       += spi-rpc-if.o
  obj-$(CONFIG_SPI_RSPI)                        += spi-rspi.o
@@ -168,7 +168,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +              SPI_CS_HIGH)
 +
 +struct rt2880_spi {
-+      struct spi_master       *master;
++      struct spi_controller   *master;
 +      void __iomem            *base;
 +      u32                     speed;
 +      u16                     wait_loops;
@@ -178,7 +178,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +
 +static inline struct rt2880_spi *spidev_to_rt2880_spi(struct spi_device *spi)
 +{
-+      return spi_master_get_devdata(spi->master);
++      return spi_controller_get_devdata(spi->controller);
 +}
 +
 +static inline u32 rt2880_spi_read(struct rt2880_spi *rs, u32 reg)
@@ -235,7 +235,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +      return prescale;
 +}
 +
-+static u32 get_arbiter_offset(struct spi_master *master)
++static u32 get_arbiter_offset(struct spi_controller *master)
 +{
 +      u32 offset;
 +
@@ -269,9 +269,9 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +      return -ETIMEDOUT;
 +}
 +
-+static void rt2880_dump_reg(struct spi_master *master)
++static void rt2880_dump_reg(struct spi_controller *master)
 +{
-+      struct rt2880_spi *rs = spi_master_get_devdata(master);
++      struct rt2880_spi *rs = spi_controller_get_devdata(master);
 +
 +      dev_dbg(&master->dev, "stat: %08x, cfg: %08x, ctl: %08x, " \
 +                      "data: %08x, arb: %08x\n",
@@ -282,10 +282,10 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +                      rt2880_spi_read(rs, get_arbiter_offset(master)));
 +}
 +
-+static int rt2880_spi_transfer_one(struct spi_master *master,
++static int rt2880_spi_transfer_one(struct spi_controller *master,
 +              struct spi_device *spi, struct spi_transfer *xfer)
 +{
-+      struct rt2880_spi *rs = spi_master_get_devdata(master);
++      struct rt2880_spi *rs = spi_controller_get_devdata(master);
 +      unsigned len;
 +      const u8 *tx = xfer->tx_buf;
 +      u8 *rx = xfer->rx_buf;
@@ -332,8 +332,8 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +
 +static int rt2880_spi_setup(struct spi_device *spi)
 +{
-+      struct spi_master *master = spi->master;
-+      struct rt2880_spi *rs = spi_master_get_devdata(master);
++      struct spi_controller *master = spi->controller;
++      struct rt2880_spi *rs = spi_controller_get_devdata(master);
 +      u32 reg, old_reg, arbit_off;
 +
 +      if ((spi->max_speed_hz > master->max_speed_hz) ||
@@ -391,10 +391,10 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +      return 0;
 +}
 +
-+static int rt2880_spi_prepare_message(struct spi_master *master,
++static int rt2880_spi_prepare_message(struct spi_controller *master,
 +              struct spi_message *msg)
 +{
-+      struct rt2880_spi *rs = spi_master_get_devdata(master);
++      struct rt2880_spi *rs = spi_controller_get_devdata(master);
 +      struct spi_device *spi = msg->spi;
 +      u32 reg;
 +
@@ -450,7 +450,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +static int rt2880_spi_probe(struct platform_device *pdev)
 +{
 +      struct device *dev = &pdev->dev;
-+      struct spi_master *master;
++      struct spi_controller *master;
 +      struct rt2880_spi *rs;
 +      void __iomem *base;
 +      struct clk *clk;
@@ -475,13 +475,13 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +      master->bits_per_word_mask = SPI_BPW_MASK(8);
 +      master->min_speed_hz = clk_get_rate(clk) / 128;
 +      master->max_speed_hz = clk_get_rate(clk) / 2;
-+      master->flags = SPI_MASTER_HALF_DUPLEX;
++      master->flags = SPI_CONTROLLER_HALF_DUPLEX;
 +      master->setup = rt2880_spi_setup;
 +      master->prepare_message = rt2880_spi_prepare_message;
 +      master->set_cs = rt2880_spi_set_cs;
 +      master->transfer_one = rt2880_spi_transfer_one,
 +
-+      rs = spi_master_get_devdata(master);
++      rs = spi_controller_get_devdata(master);
 +      rs->master = master;
 +      rs->base = base;
 +      rs->clk = clk;
@@ -490,7 +490,7 @@ Acked-by: John Crispin <blogic@openwrt.org>
 +      if (ret)
 +              return ret;
 +
-+      return devm_spi_register_master(dev, master);
++      return devm_spi_register_controller(dev, master);
 +}
 +
 +MODULE_ALIAS("platform:" DRIVER_NAME);
index 9755eeb777dc5bf8a45354f78d7cae0ffe83206d..cc70a0459661e6c47a644fdd927915907e90a138 100644 (file)
@@ -45,7 +45,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +};
 --- a/drivers/i2c/busses/Kconfig
 +++ b/drivers/i2c/busses/Kconfig
-@@ -1023,6 +1023,11 @@ config I2C_RK3X
+@@ -1061,6 +1061,11 @@ config I2C_RK3X
          This driver can also be built as a module. If so, the module will
          be called i2c-rk3x.
  
@@ -59,7 +59,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        depends on ARCH_RENESAS || COMPILE_TEST
 --- a/drivers/i2c/busses/Makefile
 +++ b/drivers/i2c/busses/Makefile
-@@ -96,6 +96,7 @@ obj-$(CONFIG_I2C_PCA_PLATFORM)       += i2c-pc
+@@ -98,6 +98,7 @@ obj-$(CONFIG_I2C_PCA_PLATFORM)       += i2c-pc
  obj-$(CONFIG_I2C_PNX)         += i2c-pnx.o
  obj-$(CONFIG_I2C_PXA)         += i2c-pxa.o
  obj-$(CONFIG_I2C_PXA_PCI)     += i2c-pxa-pci.o
@@ -436,13 +436,13 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +              i2c->cur_clk = 100000;
 +
 +      adap = &i2c->adap;
-+      adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
++      adap->class = I2C_CLASS_HWMON;
 +      adap->algo = &rt_i2c_algo;
 +      adap->retries = 3;
 +      adap->dev.parent = dev;
 +      i2c_set_adapdata(adap, i2c);
 +      adap->dev.of_node = pdev->dev.of_node;
-+      strlcpy(adap->name, dev_name(dev), sizeof(adap->name));
++      strscpy(adap->name, dev_name(dev), sizeof(adap->name));
 +      adap->quirks = &rt_i2c_quirks;
 +
 +      restart = rt_i2c_init(i2c);
index 57e87e978c8452ed6694e611aa7a1b4980dcfc66..1aa3a26e972fee86faccf45e1a72155cae9555f5 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 
 --- a/drivers/pwm/Kconfig
 +++ b/drivers/pwm/Kconfig
-@@ -415,6 +415,15 @@ config PWM_MICROCHIP_CORE
+@@ -452,6 +452,15 @@ config PWM_MICROCHIP_CORE
          To compile this driver as a module, choose M here: the module
          will be called pwm-microchip-core.
  
@@ -31,7 +31,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
        depends on ARCH_MXS || COMPILE_TEST
 --- a/drivers/pwm/Makefile
 +++ b/drivers/pwm/Makefile
-@@ -35,6 +35,7 @@ obj-$(CONFIG_PWM_LPSS_PCI)   += pwm-lpss-p
+@@ -38,6 +38,7 @@ obj-$(CONFIG_PWM_LPSS_PCI)   += pwm-lpss-p
  obj-$(CONFIG_PWM_LPSS_PLATFORM)       += pwm-lpss-platform.o
  obj-$(CONFIG_PWM_MESON)               += pwm-meson.o
  obj-$(CONFIG_PWM_MEDIATEK)    += pwm-mediatek.o
@@ -41,7 +41,7 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
  obj-$(CONFIG_PWM_MXS)         += pwm-mxs.o
 --- /dev/null
 +++ b/drivers/pwm/pwm-mediatek-ramips.c
-@@ -0,0 +1,185 @@
+@@ -0,0 +1,183 @@
 +/*
 + * Mediatek Pulse Width Modulator driver
 + *
@@ -172,7 +172,6 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +
 +static const struct pwm_ops mtk_pwm_ops = {
 +      .apply = mtk_pwm_apply,
-+      .owner = THIS_MODULE,
 +};
 +
 +static int mtk_pwm_probe(struct platform_device *pdev)
@@ -187,9 +186,8 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
 +      if (IS_ERR(pc->mmio_base))
 +              return PTR_ERR(pc->mmio_base);
 +
-+      pc->chip.dev = &pdev->dev;
++      pc->chip.dev = pdev->dev;
 +      pc->chip.ops = &mtk_pwm_ops;
-+      pc->chip.base = -1;
 +      pc->chip.npwm = NUM_PWM;
 +
 +      platform_set_drvdata(pdev, pc);
index 2307b42bdead6d724b9af2ca6d5dc30d2425dea9..f41063845fbc1c301d6c1b3fb07a1dd09b16de50 100644 (file)
 +#endif /* _EIP93_DES_H_ */
 --- /dev/null
 +++ b/drivers/crypto/mtk-eip93/eip93-main.c
-@@ -0,0 +1,463 @@
+@@ -0,0 +1,464 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2019 - 2021
 +#include <linux/dma-mapping.h>
 +#include <linux/interrupt.h>
 +#include <linux/module.h>
++#include <linux/of.h>
 +#include <linux/of_device.h>
 +#include <linux/platform_device.h>
 +#include <linux/spinlock.h>
 +#endif
 --- a/drivers/crypto/Kconfig
 +++ b/drivers/crypto/Kconfig
-@@ -797,4 +797,6 @@ config CRYPTO_DEV_SA2UL
+@@ -852,4 +852,6 @@ config CRYPTO_DEV_SA2UL
  source "drivers/crypto/aspeed/Kconfig"
  source "drivers/crypto/starfive/Kconfig"
  
  endif # CRYPTO_HW
 --- a/drivers/crypto/Makefile
 +++ b/drivers/crypto/Makefile
-@@ -51,3 +51,4 @@ obj-y += hisilicon/
+@@ -52,3 +52,4 @@ obj-y += hisilicon/
  obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
  obj-y += intel/
  obj-y += starfive/