From lede-commits at lists.infradead.org  Wed May  1 03:14:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 06:14:20 -0400
Subject: [openwrt/openwrt]  zynq: set default kernel version to 6.1
In-Reply-To: <171455846042.3618400.12863131921838226659@git-01.infra.openwrt.org>
References: <171455846042.3618400.12863131921838226659@git-01.infra.openwrt.org>
Message-ID: <mailman.32586.1714558466.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ea723164262933b3a2c7ae413f1c66ec02e9db1a

commit ea723164262933b3a2c7ae413f1c66ec02e9db1a
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed May 1 10:24:49 2024 +0200

    zynq: set default kernel version to 6.1
    
    Set default kernel version to 6.1, facilitating simpler testing across
    a broader user base.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile
index 7e4ff32881..90e49df878 100644
--- a/target/linux/zynq/Makefile
+++ b/target/linux/zynq/Makefile
@@ -18,8 +18,7 @@ define Target/Description
 	Build firmware image for Zynq 7000 SoC devices.
 endef
 
-KERNEL_PATCHVER:=5.15
-KERNEL_TESTING_PATCHVER:=6.1
+KERNEL_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Wed May  1 03:14:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 06:14:21 -0400
Subject: [openwrt/openwrt]  zynq: 5.15: remove files
In-Reply-To: <171455846042.3618400.12863131921838226659@git-01.infra.openwrt.org>
References: <171455846042.3618400.12863131921838226659@git-01.infra.openwrt.org>
Message-ID: <mailman.32587.1714558467.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d06bcbe5bffc9aea68c518ea672f4e799a6e9b26

commit d06bcbe5bffc9aea68c518ea672f4e799a6e9b26
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed May 1 10:26:41 2024 +0200

    zynq: 5.15: remove files
    
    Remove files related to the old 5.15 kernel version as they are no
    longer required.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/config-5.15 | 552 ------------------------------------------
 1 file changed, 552 deletions(-)

diff --git a/target/linux/zynq/config-5.15 b/target/linux/zynq/config-5.15
deleted file mode 100644
index d1d7392440..0000000000
--- a/target/linux/zynq/config-5.15
+++ /dev/null
@@ -1,552 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-# CONFIG_ALTERA_FREEZE_BRIDGE is not set
-# CONFIG_ALTERA_PR_IP_CORE is not set
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_V6_V7=y
-CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_NR_GPIO=1024
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_VEXPRESS=y
-CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
-# CONFIG_ARCH_VEXPRESS_SPC is not set
-CONFIG_ARCH_ZYNQ=y
-CONFIG_ARM=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_ERRATA_643719=y
-CONFIG_ARM_ERRATA_720789=y
-CONFIG_ARM_ERRATA_754322=y
-CONFIG_ARM_ERRATA_754327=y
-CONFIG_ARM_ERRATA_764369=y
-CONFIG_ARM_ERRATA_775420=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_GLOBAL_TIMER=y
-CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=2
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-CONFIG_ARM_PATCH_IDIV=y
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-# CONFIG_ARM_PL172_MPMC is not set
-# CONFIG_ARM_SMMU is not set
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_TIMER_SP804=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ARM_VIRT_EXT=y
-CONFIG_ARM_ZYNQ_CPUIDLE=y
-CONFIG_ATAGS=y
-CONFIG_AUTO_ZRELADDR=y
-# CONFIG_AXI_DMAC is not set
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_MQ_PCI=y
-CONFIG_BLK_PM=y
-CONFIG_BOUNCE=y
-CONFIG_CACHE_L2X0=y
-CONFIG_CADENCE_TTC_TIMER=y
-CONFIG_CADENCE_WATCHDOG=y
-CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLKSRC_VERSATILE=y
-CONFIG_CLK_SP810=y
-CONFIG_CLK_VEXPRESS_OSC=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-# CONFIG_CMA_SYSFS is not set
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_SI570=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONNECTOR=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CONTIG_ALLOC=y
-CONFIG_COREDUMP=y
-# CONFIG_CPUFREQ_DT is not set
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ATTR_SET=y
-CONFIG_CPU_FREQ_GOV_COMMON=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SPECTRE=y
-CONFIG_CPU_THERMAL=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_V7=y
-CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
-CONFIG_CROSS_MEMORY_ATTACH=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DMADEVICES=y
-CONFIG_DMA_CMA=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DRM=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DTC=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_E1000E=y
-CONFIG_EDAC=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_LEGACY_SYSFS=y
-CONFIG_EDAC_SUPPORT=y
-# CONFIG_EDAC_SYNOPSYS is not set
-CONFIG_EEPROM_AT24=y
-CONFIG_EEPROM_AT25=y
-CONFIG_ELF_CORE=y
-CONFIG_EXT4_FS=y
-CONFIG_EXTCON=y
-CONFIG_F2FS_FS=y
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-# CONFIG_FB_XILINX is not set
-CONFIG_FHANDLE=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FPGA=y
-CONFIG_FPGA_BRIDGE=y
-# CONFIG_FPGA_DFL is not set
-# CONFIG_FPGA_MGR_ALTERA_CVP is not set
-# CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set
-# CONFIG_FPGA_MGR_ICE40_SPI is not set
-# CONFIG_FPGA_MGR_MACHXO2_SPI is not set
-# CONFIG_FPGA_MGR_XILINX_SPI is not set
-CONFIG_FPGA_MGR_ZYNQ_FPGA=y
-CONFIG_FPGA_REGION=y
-CONFIG_FREEZER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_CACHE=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_VDSO_32=y
-CONFIG_GLOB=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_GPIO_ZYNQ=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDEN_BRANCH_PREDICTOR=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAVE_SMP=y
-CONFIG_HDMI=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
-CONFIG_HID_MICROSOFT=y
-CONFIG_HIGHMEM=y
-CONFIG_HIGHPTE=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HWMON=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HZ_FIXED=0
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CADENCE=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_I2C_MUX=y
-CONFIG_I2C_MUX_PCA954x=y
-CONFIG_ICST=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_TRIGGER=y
-CONFIG_IIO_TRIGGERED_BUFFER=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_MOUSE=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_SPARSEKMAP=y
-# CONFIG_IOMMU_DEBUGFS is not set
-# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
-# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
-CONFIG_IOMMU_SUPPORT=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-# CONFIG_ISDN is not set
-CONFIG_JBD2=y
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_KCMP=y
-CONFIG_KERNEL_GZIP=y
-# CONFIG_KERNEL_XZ is not set
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_GPIO=y
-CONFIG_KEYBOARD_GPIO_POLLED=y
-CONFIG_KMAP_LOCAL=y
-CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_TRIGGER_BACKLIGHT=y
-CONFIG_LEDS_TRIGGER_CAMERA=y
-CONFIG_LEDS_TRIGGER_CPU=y
-CONFIG_LEDS_TRIGGER_GPIO=y
-CONFIG_LEDS_TRIGGER_ONESHOT=y
-CONFIG_LEDS_TRIGGER_TRANSIENT=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_MACB=y
-# CONFIG_MACB_PCI is not set
-CONFIG_MACB_USE_HWSTAMP=y
-CONFIG_MARVELL_PHY=y
-CONFIG_MDIO_BITBANG=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-# CONFIG_MDIO_GPIO is not set
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY=y
-CONFIG_MEMORY_ISOLATION=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MFD_VEXPRESS_SYSREG=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_CQHCI=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_OF_ARASAN=y
-# CONFIG_MMC_SDHCI_PCI is not set
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-# CONFIG_MODULE_STRIPPED is not set
-# CONFIG_MOUSE_BCM5974 is not set
-# CONFIG_MOUSE_CYAPA is not set
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_BYD=y
-CONFIG_MOUSE_PS2_CYPRESS=y
-# CONFIG_MOUSE_PS2_ELANTECH is not set
-CONFIG_MOUSE_PS2_FOCALTECH=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SMBUS=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_MTD_CFI_INTELEXT is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
-CONFIG_MTD_SPLIT_FIRMWARE=y
-# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEON=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-# CONFIG_NET_VENDOR_CIRRUS is not set
-# CONFIG_NET_VENDOR_FARADAY is not set
-# CONFIG_NET_VENDOR_MARVELL is not set
-# CONFIG_NET_VENDOR_MICREL is not set
-# CONFIG_NET_VENDOR_MICROCHIP is not set
-# CONFIG_NET_VENDOR_NATSEMI is not set
-# CONFIG_NET_VENDOR_SEEQ is not set
-# CONFIG_NET_VENDOR_SMSC is not set
-# CONFIG_NET_VENDOR_STMICRO is not set
-# CONFIG_NET_VENDOR_VIA is not set
-CONFIG_NLS=y
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_NO_HZ=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NO_IOPORT_MAP=y
-CONFIG_NR_CPUS=4
-CONFIG_NVMEM=y
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-# CONFIG_OF_FPGA_REGION is not set
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_OUTER_CACHE=y
-CONFIG_OUTER_CACHE_SYNC=y
-CONFIG_PADATA=y
-CONFIG_PAGE_OFFSET=0xC0000000
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_PCI=y
-CONFIG_PCIE_XILINX=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PINCTRL=y
-# CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PINCTRL_ZYNQ=y
-CONFIG_PL310_ERRATA_588369=y
-CONFIG_PL310_ERRATA_727915=y
-CONFIG_PL310_ERRATA_753970=y
-CONFIG_PL310_ERRATA_769419=y
-CONFIG_PL330_DMA=y
-# CONFIG_PL353_SMC is not set
-CONFIG_PLAT_VERSATILE=y
-CONFIG_PM=y
-CONFIG_PMBUS=y
-CONFIG_PM_CLK=y
-CONFIG_PM_SLEEP=y
-CONFIG_PM_SLEEP_SMP=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_VEXPRESS=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-CONFIG_PROC_EVENTS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_R8169=y
-CONFIG_RAS=y
-CONFIG_RATIONAL=y
-CONFIG_REALTEK_PHY=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-# CONFIG_REGULATOR_VEXPRESS is not set
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RESET_ZYNQ=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_PCF8563=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RTC_MC146818_LIB=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-# CONFIG_SCHED_CORE is not set
-CONFIG_SCHED_MC=y
-CONFIG_SCHED_SMT=y
-CONFIG_SENSORS_PMBUS=y
-CONFIG_SENSORS_UCD9000=y
-CONFIG_SENSORS_UCD9200=y
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_XILINX_PS_UART=y
-CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
-CONFIG_SERIO=y
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SMP=y
-CONFIG_SMP_ON_UP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SOC_BUS=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_CADENCE=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SPI_XILINX=y
-CONFIG_SPI_ZYNQ_QSPI=y
-CONFIG_SRAM=y
-CONFIG_SRAM_EXEC=y
-CONFIG_SRCU=y
-# CONFIG_STRIP_ASM_SYMS is not set
-CONFIG_SUSPEND=y
-CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWPHY=y
-CONFIG_SWP_EMULATE=y
-CONFIG_SYNC_FILE=y
-CONFIG_SYSFS_SYSCALL=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-# CONFIG_TEXTSEARCH is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
-CONFIG_THERMAL_GOV_STEP_WISE=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_OF=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_UIO=y
-# CONFIG_UIO_AEC is not set
-# CONFIG_UIO_CIF is not set
-# CONFIG_UIO_DMEM_GENIRQ is not set
-# CONFIG_UIO_MF624 is not set
-# CONFIG_UIO_NETX is not set
-# CONFIG_UIO_PCI_GENERIC is not set
-CONFIG_UIO_PDRV_GENIRQ=y
-# CONFIG_UIO_PRUSS is not set
-# CONFIG_UIO_SERCOS3 is not set
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USB=y
-CONFIG_USB_CHIPIDEA=y
-CONFIG_USB_CHIPIDEA_HOST=y
-CONFIG_USB_CHIPIDEA_UDC=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-# CONFIG_USB_EHCI_TT_NEWSCHED is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_GADGET_XILINX=y
-CONFIG_USB_HID=y
-CONFIG_USB_NET_DRIVERS=y
-CONFIG_USB_OTG=y
-CONFIG_USB_OTG_FSM=y
-CONFIG_USB_PHY=y
-CONFIG_USB_ROLE_SWITCH=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_ULPI=y
-CONFIG_USB_ULPI_BUS=y
-CONFIG_USB_ULPI_VIEWPORT=y
-CONFIG_USE_OF=y
-CONFIG_VEXPRESS_CONFIG=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-CONFIG_VGA_ARB=y
-CONFIG_VGA_ARB_MAX_GPUS=16
-CONFIG_VITESSE_PHY=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_CONSOLE_SLEEP=y
-# CONFIG_VT_HW_CONSOLE_BINDING is not set
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
-CONFIG_XILINX_EMACLITE=y
-# CONFIG_XILINX_INTC is not set
-# CONFIG_XILINX_PR_DECOUPLER is not set
-CONFIG_XILINX_WATCHDOG=y
-CONFIG_XILINX_XADC=y
-CONFIG_XPS=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_ARMTHUMB=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_XZ_DEC_IA64=y
-CONFIG_XZ_DEC_POWERPC=y
-CONFIG_XZ_DEC_SPARC=y
-CONFIG_XZ_DEC_X86=y
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y



From lede-commits at lists.infradead.org  Wed May  1 05:51:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 08:51:58 -0400
Subject: [openwrt/openwrt]  ramips: mt7621-dts: remove incorrect ethphy4 node
 for WAVLINK WL-WN573HX1
In-Reply-To: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
References: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
Message-ID: <mailman.32711.1714567928.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7c9cd43ea28e5a36ef6e92284d3b7fb629eba9f5

commit 7c9cd43ea28e5a36ef6e92284d3b7fb629eba9f5
Author: Ar?n? ?NAL <arinc.unal at arinc9.com>
AuthorDate: Sun Apr 28 22:10:16 2024 +0300

    ramips: mt7621-dts: remove incorrect ethphy4 node for WAVLINK WL-WN573HX1
    
    The ethernet-phy at 4 node doesn't exist for WAVLINK WL-WN573HX1. Remove it
    and the duplicate gmac0 node.
    
    Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
---
 target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts
index 05d8e4a5ae..7080dad145 100644
--- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts
+++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn573hx1.dts
@@ -47,12 +47,6 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
-};
-
 &pcie {
 	status = "okay";
 };
@@ -119,17 +113,6 @@
 	};
 };
 
-&gmac0 {
-	nvmem-cells = <&macaddr_factory_3fff4>;
-	nvmem-cell-names = "mac-address";
-};
-
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
-};
-
 &switch0 {
 	ports {
 		port at 3 {



From lede-commits at lists.infradead.org  Wed May  1 05:51:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 08:51:57 -0400
Subject: [openwrt/openwrt]  ramips: mt7621-dts: do not modify ethernet node
 for MeiG SLT866
In-Reply-To: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
References: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
Message-ID: <mailman.32712.1714567929.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/007414aa7002d1f5e5a8ab473995a8e80f579476

commit 007414aa7002d1f5e5a8ab473995a8e80f579476
Author: Ar?n? ?NAL <arinc.unal at arinc9.com>
AuthorDate: Sun Apr 28 22:09:53 2024 +0300

    ramips: mt7621-dts: do not modify ethernet node for MeiG SLT866
    
    Currently, the pinctrl-0 property on the ethernet node is modified to
    exclude the rgmii1 and rgmii2 pin groups to be claimed with rgmii1 and
    rgmii2 functions, respectively. Remove the modification of this property as
    we need these pin groups to be claimed with the said functions for this
    device.
    
    Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
---
 target/linux/ramips/dts/mt7621_meig_slt866.dts | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_meig_slt866.dts b/target/linux/ramips/dts/mt7621_meig_slt866.dts
index d364a91794..7c7d5e43c4 100644
--- a/target/linux/ramips/dts/mt7621_meig_slt866.dts
+++ b/target/linux/ramips/dts/mt7621_meig_slt866.dts
@@ -185,11 +185,6 @@
 	};
 };
 
-&ethernet {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio_pins>;
-};
-
 &gmac0 {
 	nvmem-cells = <&macaddr_custom_40 0>;
 	nvmem-cell-names = "mac-address";



From lede-commits at lists.infradead.org  Wed May  1 05:51:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 08:51:59 -0400
Subject: [openwrt/openwrt]  generic: 6.1,
 6.6: mt7530: import pending PHY muxing detection patch
In-Reply-To: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
References: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
Message-ID: <mailman.32713.1714567929.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/622131671198b6f02f1fd45dd0514a65873e2569

commit 622131671198b6f02f1fd45dd0514a65873e2569
Author: Ar?n? ?NAL <arinc.unal at arinc9.com>
AuthorDate: Wed May 1 06:33:51 2024 +0300

    generic: 6.1, 6.6: mt7530: import pending PHY muxing detection patch
    
    net: dsa: mt7530: detect PHY muxing when PHY is defined on switch MDIO bus
    
    Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
---
 ...ng-when-PHY-is-defined-on-switch-MDIO-bus.patch | 136 +++++++++++++++++++++
 ...ng-when-PHY-is-defined-on-switch-MDIO-bus.patch | 136 +++++++++++++++++++++
 2 files changed, 272 insertions(+)

diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
new file mode 100644
index 0000000000..5db834e23f
--- /dev/null
+++ b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
@@ -0,0 +1,136 @@
+From patchwork Tue Apr 30 05:01:33 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+X-Patchwork-Id: 13648264
+X-Patchwork-Delegate: kuba at kernel.org
+Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
+ [10.30.226.201])
+	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
+	(No client certificate requested)
+	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+Authentication-Results: smtp.subspace.kernel.org;
+ arc=none smtp.client-ip=10.30.226.201
+ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
+	t=1714453299; cv=none;
+ b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
+ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
+	s=arc-20240116; t=1714453299; c=relaxed/simple;
+	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
+	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
+ b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
+ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
+ dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
+ header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
+Authentication-Results: smtp.subspace.kernel.org;
+	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
+ header.b="LTwGL2cB"
+Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
+	s=k20201202; t=1714453299;
+	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
+	h=From:Date:Subject:To:Cc:Reply-To:From;
+	b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
+	 FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
+	 jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
+	 yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
+	 QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
+	 aa8XczXBSlBVw==
+Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
+ (localhost.localdomain [127.0.0.1])
+	by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+Date: Tue, 30 Apr 2024 08:01:33 +0300
+Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
+ is defined on switch MDIO bus
+Precedence: bulk
+X-Mailing-List: netdev at vger.kernel.org
+List-Id: <netdev.vger.kernel.org>
+List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
+List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
+MIME-Version: 1.0
+Message-Id: 
+ <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com>
+X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
+ e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
+ O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
+ ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
+To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
+ Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
+ Florian Fainelli <f.fainelli at gmail.com>,
+ Vladimir Oltean <olteanv at gmail.com>,
+ "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
+ Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
+ Matthias Brugger <matthias.bgg at gmail.com>,
+ AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Cc: Bartel Eerdekens <bartel.eerdekens at constell8.be>,
+  mithat.guner at xeront.com, erkin.bozoglu at xeront.com, netdev at vger.kernel.org,
+  linux-kernel at vger.kernel.org, linux-arm-kernel at lists.infradead.org,
+  linux-mediatek at lists.infradead.org,
+ =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+X-Mailer: b4 0.13.0
+X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
+ i=arinc.unal at arinc9.com; s=arinc9-PC; h=from:subject:message-id;
+ bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
+ b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
+ lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
+X-Developer-Key: i=arinc.unal at arinc9.com; a=ed25519;
+ pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
+X-Endpoint-Received: by B4 Relay for arinc.unal at arinc9.com/arinc9-PC with
+ auth_id=158
+X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+Reply-To: arinc.unal at arinc9.com
+X-Patchwork-Delegate: kuba at kernel.org
+
+From: Ar?n? ?NAL <arinc.unal at arinc9.com>
+
+Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
+direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
+bus the switch listens on. The PHY muxing feature makes use of this.
+
+This is problematic as the PHY may be attached before the switch is
+initialised, in which case, the PHY will fail to be attached.
+
+Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
+of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
+the switch on the device tree. Extend the check to detect PHY muxing when
+the PHY is defined on the MDIO bus of the switch on the device tree.
+
+When the PHY is described this way, the switch will be initialised first,
+then the switch MDIO bus will be registered. Only after these steps, the
+PHY will be attached.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+Changes in v2:
+- Address the terminology on the patch log.
+- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155 at arinc9.com
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+
+---
+base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
+change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
+
+Best regards,
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2488,7 +2488,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			if (!phy_node)
+ 				continue;
+ 
+-			if (phy_node->parent == priv->dev->of_node->parent) {
++			if (phy_node->parent == priv->dev->of_node->parent ||
++			    phy_node->parent->parent == priv->dev->of_node) {
+ 				ret = of_get_phy_mode(mac_np, &interface);
+ 				if (ret && ret != -ENODEV) {
+ 					of_node_put(mac_np);
diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
new file mode 100644
index 0000000000..f181be933a
--- /dev/null
+++ b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
@@ -0,0 +1,136 @@
+From patchwork Tue Apr 30 05:01:33 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+X-Patchwork-Id: 13648264
+X-Patchwork-Delegate: kuba at kernel.org
+Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
+ [10.30.226.201])
+	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
+	(No client certificate requested)
+	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+Authentication-Results: smtp.subspace.kernel.org;
+ arc=none smtp.client-ip=10.30.226.201
+ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
+	t=1714453299; cv=none;
+ b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
+ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
+	s=arc-20240116; t=1714453299; c=relaxed/simple;
+	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
+	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
+ b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
+ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
+ dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
+ header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
+Authentication-Results: smtp.subspace.kernel.org;
+	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
+ header.b="LTwGL2cB"
+Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
+	s=k20201202; t=1714453299;
+	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
+	h=From:Date:Subject:To:Cc:Reply-To:From;
+	b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
+	 FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
+	 jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
+	 yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
+	 QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
+	 aa8XczXBSlBVw==
+Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
+ (localhost.localdomain [127.0.0.1])
+	by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
+	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
+From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+Date: Tue, 30 Apr 2024 08:01:33 +0300
+Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
+ is defined on switch MDIO bus
+Precedence: bulk
+X-Mailing-List: netdev at vger.kernel.org
+List-Id: <netdev.vger.kernel.org>
+List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
+List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
+MIME-Version: 1.0
+Message-Id: 
+ <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com>
+X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
+ e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
+ O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
+ ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
+To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
+ Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
+ Florian Fainelli <f.fainelli at gmail.com>,
+ Vladimir Oltean <olteanv at gmail.com>,
+ "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
+ Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
+ Matthias Brugger <matthias.bgg at gmail.com>,
+ AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Cc: Bartel Eerdekens <bartel.eerdekens at constell8.be>,
+  mithat.guner at xeront.com, erkin.bozoglu at xeront.com, netdev at vger.kernel.org,
+  linux-kernel at vger.kernel.org, linux-arm-kernel at lists.infradead.org,
+  linux-mediatek at lists.infradead.org,
+ =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+X-Mailer: b4 0.13.0
+X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
+ i=arinc.unal at arinc9.com; s=arinc9-PC; h=from:subject:message-id;
+ bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
+ b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
+ lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
+X-Developer-Key: i=arinc.unal at arinc9.com; a=ed25519;
+ pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
+X-Endpoint-Received: by B4 Relay for arinc.unal at arinc9.com/arinc9-PC with
+ auth_id=158
+X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+Reply-To: arinc.unal at arinc9.com
+X-Patchwork-Delegate: kuba at kernel.org
+
+From: Ar?n? ?NAL <arinc.unal at arinc9.com>
+
+Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
+direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
+bus the switch listens on. The PHY muxing feature makes use of this.
+
+This is problematic as the PHY may be attached before the switch is
+initialised, in which case, the PHY will fail to be attached.
+
+Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
+of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
+the switch on the device tree. Extend the check to detect PHY muxing when
+the PHY is defined on the MDIO bus of the switch on the device tree.
+
+When the PHY is described this way, the switch will be initialised first,
+then the switch MDIO bus will be registered. Only after these steps, the
+PHY will be attached.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+Changes in v2:
+- Address the terminology on the patch log.
+- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155 at arinc9.com
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+
+---
+base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
+change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
+
+Best regards,
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2483,7 +2483,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			if (!phy_node)
+ 				continue;
+ 
+-			if (phy_node->parent == priv->dev->of_node->parent) {
++			if (phy_node->parent == priv->dev->of_node->parent ||
++			    phy_node->parent->parent == priv->dev->of_node) {
+ 				ret = of_get_phy_mode(mac_np, &interface);
+ 				if (ret && ret != -ENODEV) {
+ 					of_node_put(mac_np);



From lede-commits at lists.infradead.org  Wed May  1 05:52:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 08:52:00 -0400
Subject: [openwrt/openwrt]  ramips: mt7621-dts: describe switch PHYs and
 adjust PHY muxing
In-Reply-To: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
References: <171456791711.250216.7455512761366487777@git-01.infra.openwrt.org>
Message-ID: <mailman.32714.1714567933.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ea6125c501e3adc81227cc69fb9e28eec69f2b8

commit 3ea6125c501e3adc81227cc69fb9e28eec69f2b8
Author: Ar?n? ?NAL <arinc.unal at arinc9.com>
AuthorDate: Sun Apr 28 22:52:51 2024 +0300

    ramips: mt7621-dts: describe switch PHYs and adjust PHY muxing
    
    Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
    direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
    bus the switch listens on. The PHY muxing feature makes use of this.
    
    This is problematic as the PHY may be attached before the switch is
    initialised, in which case, the PHY will fail to be attached.
    
    Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
    of switch MDIO bus") on mainline Linux, we can describe the switch PHYs on
    the MDIO bus of the switch on the device tree.
    
    When the PHY is described this way, the switch will be initialised first,
    then the switch MDIO bus will be registered. Only after these steps, the
    PHY will be attached.
    
    Describe the switch PHYs on mt7621.dtsi and remove defining the switch PHY
    on the SoC's mdio bus node. When the PHY muxing is in use, the interrupts
    for the muxed PHY won't work, therefore delete the "interrupts" property on
    the devices where the PHY muxing feature is in use.
    
    Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
---
 target/linux/ramips/dts/mt7621.dtsi                | 35 ++++++++++++++++++++++
 target/linux/ramips/dts/mt7621_adslr_g7.dts        |  6 ++--
 target/linux/ramips/dts/mt7621_afoundry_ew1200.dts |  6 ++--
 .../ramips/dts/mt7621_alfa-network_ax1800rm.dts    |  6 ++--
 .../dts/mt7621_ampedwireless_ally-r1900k.dts       |  6 ++--
 .../ramips/dts/mt7621_arcadyan_we420223-99.dts     |  6 ++--
 .../linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi |  6 ++--
 target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi  |  6 ++--
 .../linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi  |  6 ++--
 target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_asus_rt-ax54.dts    |  6 ++--
 target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts |  6 ++--
 .../ramips/dts/mt7621_beeline_smartbox-giga.dts    |  6 ++--
 .../dts/mt7621_beeline_smartbox-turbo-plus.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_belkin_rt1800.dts   |  6 ++--
 .../ramips/dts/mt7621_buffalo_wsr-1166dhp.dts      |  6 ++--
 .../ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts     |  6 ++--
 .../linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts |  6 ++--
 target/linux/ramips/dts/mt7621_cudy_m1800.dts      |  6 ++--
 target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts  |  6 ++--
 .../linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi  |  6 ++--
 target/linux/ramips/dts/mt7621_cudy_wr2100.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_cudy_x6.dtsi        |  6 ++--
 .../ramips/dts/mt7621_dlink_covr-x1860-a1.dts      |  6 ++--
 .../linux/ramips/dts/mt7621_dlink_dir-853-a1.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_dlink_dir-853-a3.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_dlink_dir-853-r1.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi  |  6 ++--
 .../linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi |  6 ++--
 target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi   |  6 ++--
 .../ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts   |  6 ++--
 .../ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi     |  6 ++--
 target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi  |  6 ++--
 target/linux/ramips/dts/mt7621_etisalat_s3.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts |  6 ++--
 .../linux/ramips/dts/mt7621_glinet_gl-mt1300.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi     |  6 ++--
 .../linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi |  6 ++--
 .../ramips/dts/mt7621_hilink_hlk-7621a-evb.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_huasifei_ws1208v2.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_humax_e10.dts       |  6 ++--
 .../linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts |  6 ++--
 .../ramips/dts/mt7621_iodata_wn-deax1800gr.dts     |  6 ++--
 .../linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts |  6 ++--
 .../linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts  |  6 ++--
 .../linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi   |  6 ++--
 .../linux/ramips/dts/mt7621_iodata_wnpr2600g.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_iptime_a3002mesh.dts   |  6 ++--
 .../ramips/dts/mt7621_iptime_a3004ns-dual.dts      |  6 ++--
 target/linux/ramips/dts/mt7621_iptime_a3004t.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi  |  6 ++--
 target/linux/ramips/dts/mt7621_iptime_a8004t.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_iptime_ax2004m.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_iptime_t5004.dts    |  6 ++--
 target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_jcg_q20.dts         |  6 ++--
 target/linux/ramips/dts/mt7621_jcg_y2.dts          |  6 ++--
 .../linux/ramips/dts/mt7621_keenetic_kn-3010.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_lenovo_newifi-d1.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_linksys_e5600.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_linksys_e7350.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_linksys_ea6350-v4.dts  | 12 ++++----
 target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi |  6 ++--
 target/linux/ramips/dts/mt7621_linksys_re6500.dts  |  6 ++--
 .../ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts  |  6 ++--
 .../dts/mt7621_mediatek_mt7621-eval-board.dts      |  6 ++--
 target/linux/ramips/dts/mt7621_meig_slt866.dts     |  6 ++--
 .../linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts  |  6 ++--
 .../dts/mt7621_mikrotik_routerboard-750gr3.dts     |  6 ++--
 .../dts/mt7621_mikrotik_routerboard-m33g.dts       |  6 ++--
 .../ramips/dts/mt7621_netgear_sercomm_ayx.dtsi     |  6 ++--
 .../ramips/dts/mt7621_netgear_sercomm_bzv.dtsi     |  6 ++--
 .../ramips/dts/mt7621_netgear_sercomm_chj.dtsi     |  6 ++--
 target/linux/ramips/dts/mt7621_netgear_wac104.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_netgear_wax202.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_netis_wf2881.dts    |  6 ++--
 target/linux/ramips/dts/mt7621_oraybox_x3a.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_phicomm_k2p.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_planex_vr500.dts    |  6 ++--
 .../ramips/dts/mt7621_raisecom_msg1500-x-00.dts    |  6 ++--
 .../ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts  |  6 ++--
 .../ramips/dts/mt7621_rostelecom_rt-fe-1a.dts      |  6 ++--
 .../ramips/dts/mt7621_samknows_whitebox-v8.dts     |  6 ++--
 .../ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi   |  6 ++--
 target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts |  6 ++--
 .../ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts     |  6 ++--
 .../ramips/dts/mt7621_storylink_sap-g3200u3.dts    |  6 ++--
 .../linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts |  6 ++--
 target/linux/ramips/dts/mt7621_totolink_a7000r.dts |  6 ++--
 target/linux/ramips/dts/mt7621_totolink_x5000r.dts |  6 ++--
 .../ramips/dts/mt7621_tplink_archer-ax23-v1.dts    |  6 ++--
 .../ramips/dts/mt7621_tplink_archer-c6u-v1.dts     |  6 ++--
 .../ramips/dts/mt7621_tplink_eap235-wall-v1.dts    |  6 ++--
 .../ramips/dts/mt7621_tplink_eap615-wall-v1.dts    |  6 ++--
 .../ramips/dts/mt7621_tplink_ec330-g5u-v1.dts      |  6 ++--
 target/linux/ramips/dts/mt7621_tplink_er605-v2.dts |  7 ++---
 target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts |  6 ++--
 .../linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts |  7 ++---
 .../linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts  |  6 ++--
 target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_unielec_u7621-01.dtsi  |  6 ++--
 .../linux/ramips/dts/mt7621_unielec_u7621-06.dtsi  |  6 ++--
 .../ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts   |  6 ++--
 .../ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts |  6 ++--
 .../dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi      |  6 ++--
 .../ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi |  6 ++--
 .../ramips/dts/mt7621_xiaomi_router-ac2100.dtsi    |  6 ++--
 target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts    |  6 ++--
 target/linux/ramips/dts/mt7621_youhua_wr1200js.dts |  6 ++--
 target/linux/ramips/dts/mt7621_youku_yk-l2.dts     |  6 ++--
 target/linux/ramips/dts/mt7621_yuncore_ax820.dts   |  6 ++--
 target/linux/ramips/dts/mt7621_yuncore_fap640.dts  |  7 ++---
 target/linux/ramips/dts/mt7621_yuncore_g720.dts    |  6 ++--
 .../linux/ramips/dts/mt7621_z-router_zr-2660.dts   |  6 ++--
 .../linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts |  6 ++--
 .../linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts |  6 ++--
 .../ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi  |  6 ++--
 .../ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi      |  6 ++--
 .../ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi      |  6 ++--
 target/linux/ramips/dts/mt7621_zyxel_wsm20.dts     |  6 ++--
 125 files changed, 286 insertions(+), 502 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
index 086719a43d..54fe13123d 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -474,6 +474,36 @@
 				#interrupt-cells = <1>;
 				interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
 
+				mdio {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					ethphy0: ethernet-phy at 0 {
+						reg = <0>;
+						interrupts = <0>;
+					};
+
+					ethphy1: ethernet-phy at 1 {
+						reg = <1>;
+						interrupts = <1>;
+					};
+
+					ethphy2: ethernet-phy at 2 {
+						reg = <2>;
+						interrupts = <2>;
+					};
+
+					ethphy3: ethernet-phy at 3 {
+						reg = <3>;
+						interrupts = <3>;
+					};
+
+					ethphy4: ethernet-phy at 4 {
+						reg = <4>;
+						interrupts = <4>;
+					};
+				};
+
 				ports {
 					#address-cells = <1>;
 					#size-cells = <0>;
@@ -482,30 +512,35 @@
 						status = "disabled";
 						reg = <0>;
 						label = "lan0";
+						phy-handle = <&ethphy0>;
 					};
 
 					port at 1 {
 						status = "disabled";
 						reg = <1>;
 						label = "lan1";
+						phy-handle = <&ethphy1>;
 					};
 
 					port at 2 {
 						status = "disabled";
 						reg = <2>;
 						label = "lan2";
+						phy-handle = <&ethphy2>;
 					};
 
 					port at 3 {
 						status = "disabled";
 						reg = <3>;
 						label = "lan3";
+						phy-handle = <&ethphy3>;
 					};
 
 					port at 4 {
 						status = "disabled";
 						reg = <4>;
 						label = "lan4";
+						phy-handle = <&ethphy4>;
 					};
 
 					port at 6 {
diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts
index 6ca9eccd2d..2dea282bf5 100644
--- a/target/linux/ramips/dts/mt7621_adslr_g7.dts
+++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts
@@ -136,10 +136,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
index 4f942f1602..f2f5719af2 100644
--- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
+++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
@@ -155,10 +155,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts
index 85fda96ce5..c0e208d33d 100644
--- a/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts
+++ b/target/linux/ramips/dts/mt7621_alfa-network_ax1800rm.dts
@@ -176,10 +176,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
index 07e0d23788..6280a643a9 100644
--- a/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
+++ b/target/linux/ramips/dts/mt7621_ampedwireless_ally-r1900k.dts
@@ -13,10 +13,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
index 48506907eb..4a5194c363 100644
--- a/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
+++ b/target/linux/ramips/dts/mt7621_arcadyan_we420223-99.dts
@@ -203,10 +203,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &pcie {
diff --git a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
index 78627b2157..ec9da152ce 100644
--- a/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
+++ b/target/linux/ramips/dts/mt7621_arcadyan_wg4xx223.dtsi
@@ -185,10 +185,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
index edfdc9b173..2f03082688 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
@@ -111,10 +111,8 @@
 	status = "okay";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &gmac0 {
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
index 4915f8125e..d5b46b14ee 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u-v1.dts
@@ -170,10 +170,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
index 5bccddec0b..bee8afdc90 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
+++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
@@ -166,10 +166,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
index faf58e0187..76645987b2 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ax53u.dts
@@ -183,10 +183,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts
index 7bb375cb29..972b3d5bd8 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ax54.dts
@@ -157,10 +157,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
index b18bd113da..d73dfe9421 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
@@ -182,10 +182,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
index 12ff04ed28..e2fa019d07 100644
--- a/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
+++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-giga.dts
@@ -216,10 +216,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
index 84ec15b872..56080ff917 100644
--- a/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
+++ b/target/linux/ramips/dts/mt7621_beeline_smartbox-turbo-plus.dts
@@ -209,10 +209,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts
index 25fc335c56..be519abf6e 100644
--- a/target/linux/ramips/dts/mt7621_belkin_rt1800.dts
+++ b/target/linux/ramips/dts/mt7621_belkin_rt1800.dts
@@ -162,10 +162,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
index c065997ea1..7b1cc64b50 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts
@@ -174,10 +174,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
index 66b47d2fa0..fa90fba3d5 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
@@ -199,10 +199,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
index e3b165c640..00b2165836 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
@@ -208,10 +208,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_cudy_m1800.dts b/target/linux/ramips/dts/mt7621_cudy_m1800.dts
index 12f5ce3ec9..1aa5821006 100644
--- a/target/linux/ramips/dts/mt7621_cudy_m1800.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_m1800.dts
@@ -66,10 +66,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &pcie {
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
index 9d5701a7cc..265b48143e 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v1.dts
@@ -193,10 +193,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi
index 55da73dcda..da62648bc9 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi
+++ b/target/linux/ramips/dts/mt7621_cudy_wr1300-v2v3.dtsi
@@ -153,10 +153,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
index 5b21cff130..8278551267 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
@@ -208,10 +208,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi
index 81a34e9302..0542640f13 100644
--- a/target/linux/ramips/dts/mt7621_cudy_x6.dtsi
+++ b/target/linux/ramips/dts/mt7621_cudy_x6.dtsi
@@ -116,10 +116,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts
index 90a5c196fc..cf924cffb6 100644
--- a/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_covr-x1860-a1.dts
@@ -184,10 +184,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts
index 7e5809ed3a..7bc3a3f186 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a1.dts
@@ -187,10 +187,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
index 434a6d9f1a..9d47674959 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
@@ -203,10 +203,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
index a3753f37d4..25d2768d23 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
@@ -120,10 +120,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
index 8939e523fe..589669c36a 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
@@ -144,10 +144,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
index 11d673dc87..0f5b4f0d90 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-8xx.dtsi
@@ -110,10 +110,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
index 57652fb278..d5adb8728c 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
@@ -188,10 +188,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
index d7309dbdfe..8e7652cac7 100644
--- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
+++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
@@ -151,10 +151,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
index bbc135ad83..503ec40b50 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
@@ -85,10 +85,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi
index 418b0cfa9a..cdb94dcdc1 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-2533ghbk.dtsi
@@ -124,10 +124,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
index dae247f4ce..4b61b9faf2 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs.dtsi
@@ -94,10 +94,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_etisalat_s3.dts b/target/linux/ramips/dts/mt7621_etisalat_s3.dts
index 2fb3aedaff..60452a63f4 100644
--- a/target/linux/ramips/dts/mt7621_etisalat_s3.dts
+++ b/target/linux/ramips/dts/mt7621_etisalat_s3.dts
@@ -209,10 +209,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
index 9030c051f1..a017baa1ba 100644
--- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
+++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
@@ -144,10 +144,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
index 849074111b..e4b254ebce 100644
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
@@ -145,10 +145,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
index 7ef7201faf..2710aa6f3e 100644
--- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
@@ -116,10 +116,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi
index 88148c6759..1520aaf5b1 100644
--- a/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi
+++ b/target/linux/ramips/dts/mt7621_h3c_tx180x.dtsi
@@ -58,10 +58,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &nand {
diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
index 53c5912397..dd7b72707e 100644
--- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
+++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
@@ -73,10 +73,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &nand {
diff --git a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
index cae9f717b1..195a12b7d1 100644
--- a/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
+++ b/target/linux/ramips/dts/mt7621_hilink_hlk-7621a-evb.dts
@@ -77,10 +77,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
index 1bf6640137..5a8f32d723 100644
--- a/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
+++ b/target/linux/ramips/dts/mt7621_hiwifi_hc5962.dts
@@ -153,10 +153,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
index a7610070de..e764139451 100644
--- a/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
+++ b/target/linux/ramips/dts/mt7621_huasifei_ws1208v2.dts
@@ -169,10 +169,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_humax_e10.dts b/target/linux/ramips/dts/mt7621_humax_e10.dts
index dfa91ad43a..39eac32d53 100644
--- a/target/linux/ramips/dts/mt7621_humax_e10.dts
+++ b/target/linux/ramips/dts/mt7621_humax_e10.dts
@@ -169,10 +169,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
index 4f84302417..9e64077e0c 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
@@ -174,10 +174,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts
index 4543f45a9f..86d8a93da6 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-deax1800gr.dts
@@ -186,10 +186,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
index 9de7297405..bcb7e57678 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
@@ -170,10 +170,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
index b055afc3ad..519c52065b 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
@@ -160,10 +160,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
index b3063a333e..07187d8bfe 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
@@ -161,10 +161,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
index 790668cc41..e322e4efdb 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
@@ -153,10 +153,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
index e8c7f12d01..bfb6207199 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a3002mesh.dts
@@ -130,10 +130,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
index 6990d31e39..7c46635fb5 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a3004ns-dual.dts
@@ -134,10 +134,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts
index a96e89b3f3..7b2465c14f 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a3004t.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a3004t.dts
@@ -135,10 +135,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
index 848891056a..6bfdffefb7 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
+++ b/target/linux/ramips/dts/mt7621_iptime_a6004ns-m.dtsi
@@ -152,10 +152,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
index 249904da6a..7f28d7af3f 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
@@ -138,10 +138,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
index 88067a4fa5..8263c062dd 100644
--- a/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_ax2004m.dts
@@ -148,10 +148,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iptime_t5004.dts b/target/linux/ramips/dts/mt7621_iptime_t5004.dts
index f7a5e8ca17..4a7f9aaaa1 100644
--- a/target/linux/ramips/dts/mt7621_iptime_t5004.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_t5004.dts
@@ -91,10 +91,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
index 05980caa6f..548ab7ba59 100644
--- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -168,10 +168,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts
index 49f51ded7f..a8892ac8b1 100644
--- a/target/linux/ramips/dts/mt7621_jcg_q20.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts
@@ -180,10 +180,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts
index 54141cc2a2..5012bc3d62 100644
--- a/target/linux/ramips/dts/mt7621_jcg_y2.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts
@@ -121,10 +121,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts
index 35d09832f2..6ee20c29c5 100644
--- a/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts
+++ b/target/linux/ramips/dts/mt7621_keenetic_kn-3010.dts
@@ -201,10 +201,8 @@
 	};
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &gmac0 {
diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
index 0323769990..3b6026f377 100644
--- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
+++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
@@ -179,10 +179,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_linksys_e5600.dts b/target/linux/ramips/dts/mt7621_linksys_e5600.dts
index a059fd0698..08fcbbc515 100644
--- a/target/linux/ramips/dts/mt7621_linksys_e5600.dts
+++ b/target/linux/ramips/dts/mt7621_linksys_e5600.dts
@@ -175,10 +175,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_linksys_e7350.dts b/target/linux/ramips/dts/mt7621_linksys_e7350.dts
index 77c123720f..db7387ddec 100644
--- a/target/linux/ramips/dts/mt7621_linksys_e7350.dts
+++ b/target/linux/ramips/dts/mt7621_linksys_e7350.dts
@@ -156,10 +156,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
index 35a90ea070..83c86ee11d 100644
--- a/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
+++ b/target/linux/ramips/dts/mt7621_linksys_ea6350-v4.dts
@@ -16,14 +16,12 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethernet-phy at 0 {
-		status = "disabled";
-	};
+&ethphy0 {
+	interrupts = <0>;
+};
 
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
index 5804f21591..70cf425b2c 100644
--- a/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
+++ b/target/linux/ramips/dts/mt7621_linksys_ea7xxx.dtsi
@@ -203,10 +203,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
index d269899980..3c026a41a5 100644
--- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts
+++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
@@ -148,10 +148,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
index aaa75b0573..c6fa3622ef 100644
--- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
+++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
@@ -138,10 +138,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
index 2da7f983a9..ecce30330b 100644
--- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
+++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts
@@ -45,10 +45,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_meig_slt866.dts b/target/linux/ramips/dts/mt7621_meig_slt866.dts
index 7c7d5e43c4..d4e040649e 100644
--- a/target/linux/ramips/dts/mt7621_meig_slt866.dts
+++ b/target/linux/ramips/dts/mt7621_meig_slt866.dts
@@ -199,10 +199,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
index fb14bd7829..145b0eeb40 100644
--- a/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
+++ b/target/linux/ramips/dts/mt7621_mercusys_mr70x-v1.dts
@@ -145,10 +145,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
index aad8a6776d..faa4e53f09 100644
--- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
@@ -42,10 +42,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
index 223d03b9fd..11171d9535 100644
--- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m33g.dts
@@ -96,10 +96,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
index 6e225c0825..f8dc6ebdbf 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
@@ -118,10 +118,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
index 61c3ec3761..c125bcc4e3 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
@@ -184,10 +184,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
index 13ce338588..273bb9469c 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -115,10 +115,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
index 9c706530d4..01583e8887 100644
--- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
@@ -170,10 +170,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netgear_wax202.dts b/target/linux/ramips/dts/mt7621_netgear_wax202.dts
index bf580de6b8..226c461543 100644
--- a/target/linux/ramips/dts/mt7621_netgear_wax202.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_wax202.dts
@@ -244,10 +244,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
index 58d2c70655..0baf9d6483 100644
--- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts
+++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
@@ -162,10 +162,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts
index 7b33efd6e6..b9bccf0f28 100644
--- a/target/linux/ramips/dts/mt7621_oraybox_x3a.dts
+++ b/target/linux/ramips/dts/mt7621_oraybox_x3a.dts
@@ -156,10 +156,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
index 6a733698d2..92c76d4206 100644
--- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
+++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
@@ -146,10 +146,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts
index 4d281670ef..df12331e24 100644
--- a/target/linux/ramips/dts/mt7621_planex_vr500.dts
+++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts
@@ -104,10 +104,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
index 98a2ffad5f..f4d893a366 100644
--- a/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
+++ b/target/linux/ramips/dts/mt7621_raisecom_msg1500-x-00.dts
@@ -163,10 +163,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
index b3aaffeafe..b567b14f8e 100644
--- a/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
+++ b/target/linux/ramips/dts/mt7621_renkforce_ws-wn530hp3-a.dts
@@ -140,10 +140,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts b/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts
index 8afe5f5485..1c2cb42fa0 100644
--- a/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts
+++ b/target/linux/ramips/dts/mt7621_rostelecom_rt-fe-1a.dts
@@ -228,10 +228,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
index 5afed4c695..b5818a7e60 100644
--- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
+++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
@@ -146,10 +146,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
index fd952cbc93..b13b621d2f 100644
--- a/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
+++ b/target/linux/ramips/dts/mt7621_sercomm_dxx_nand_256m.dtsi
@@ -208,10 +208,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
index 6ea2c199e3..b287056bf1 100644
--- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
+++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me1.dts
@@ -90,10 +90,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &pcie {
diff --git a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts
index 3b474819e1..cd0e7465ff 100644
--- a/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts
+++ b/target/linux/ramips/dts/mt7621_snr_snr-cpe-me2-lite.dts
@@ -112,10 +112,8 @@
 	status = "okay";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &gmac0 {
diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
index 3448db5f03..4497531aee 100644
--- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
+++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
@@ -154,10 +154,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
index d1310ad954..42e39c3152 100644
--- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
+++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
@@ -125,10 +125,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
index 8c0062973d..e4937c55c5 100644
--- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
+++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
@@ -135,10 +135,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
index 24606904e1..e2d706c5db 100644
--- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
+++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
@@ -130,10 +130,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts
index 71ef4bc6b6..ac03545eca 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-ax23-v1.dts
@@ -181,10 +181,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
index e9879128a3..b1a3e3e1bc 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
@@ -206,10 +206,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
index d814cba261..bc56b82cd1 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
@@ -189,10 +189,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
index 2aea6bbbc0..2694b3890f 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts
@@ -182,10 +182,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
index 6203308515..02560669d5 100644
--- a/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_ec330-g5u-v1.dts
@@ -283,10 +283,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
index 33070ef6ca..b71b7ad914 100644
--- a/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_er605-v2.dts
@@ -155,11 +155,8 @@
 	};
 };
 
-
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &state_default {
diff --git a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts
index c501727ca8..d6f9a368e4 100644
--- a/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_ex220-v1.dts
@@ -219,10 +219,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
index db460b43b2..234202ba87 100644
--- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
@@ -198,13 +198,10 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
-
 &switch0 {
 	ports {
 		port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
index 4665f04f02..80467c88e9 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dts
@@ -14,10 +14,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts
index 0d6d500222..f2fb48cac2 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_usw-flex.dts
@@ -73,10 +73,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
index b193aed103..77c06545e8 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
@@ -64,10 +64,8 @@
 	phy-handle = <&ethphy0>;
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
index 42f6cea2d3..79deb7559d 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
@@ -81,10 +81,8 @@
 	phy-handle = <&ethphy4>;
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts
index f9e37bee6e..78bc0ba4b0 100644
--- a/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts
+++ b/target/linux/ramips/dts/mt7621_wavlink_ws-wn572hp3-4g.dts
@@ -166,10 +166,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
index f0c7646b26..96054135ae 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
@@ -224,10 +224,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
index 1dfded14b1..3b377fca7c 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
@@ -85,10 +85,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
index 61359e8b21..2d2bf3d699 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
@@ -47,10 +47,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi
index ef637278af..598fafe871 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-cr660x.dtsi
@@ -173,10 +173,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
index 468f9456bf..e0950e7c64 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
+++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
@@ -45,10 +45,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
index f1227552e8..e04afc81ba 100644
--- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
+++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
@@ -111,10 +111,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
index c47e34a5d6..6475c142e7 100644
--- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
+++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
@@ -165,10 +165,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
index 9f4e8cf1ce..9d2491f634 100644
--- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
+++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
@@ -175,10 +175,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
index 0cdad1bfe5..316c180098 100644
--- a/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
+++ b/target/linux/ramips/dts/mt7621_yuncore_ax820.dts
@@ -174,10 +174,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
index 2cc3435a89..536b45e03f 100644
--- a/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
+++ b/target/linux/ramips/dts/mt7621_yuncore_fap640.dts
@@ -189,13 +189,10 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
-
 &switch0 {
 	gpio-controller;
 	#gpio-cells = <2>;
diff --git a/target/linux/ramips/dts/mt7621_yuncore_g720.dts b/target/linux/ramips/dts/mt7621_yuncore_g720.dts
index 4b88064b49..2170bc83ec 100644
--- a/target/linux/ramips/dts/mt7621_yuncore_g720.dts
+++ b/target/linux/ramips/dts/mt7621_yuncore_g720.dts
@@ -137,10 +137,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts b/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts
index 34b151be75..3acc1529e5 100644
--- a/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts
+++ b/target/linux/ramips/dts/mt7621_z-router_zr-2660.dts
@@ -93,10 +93,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &nand {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
index e15c676c8a..7dfe9a7699 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
@@ -109,10 +109,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
index dfa49a2bc5..31a4e4482a 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
@@ -133,10 +133,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
index bbf121036c..c3712fea7b 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602-v04.dtsi
@@ -187,10 +187,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
index b0182ee896..dcad7b26d2 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi
@@ -186,10 +186,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi
index 321274bb15..fc8a91e398 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1608.dtsi
@@ -156,10 +156,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy4: ethernet-phy at 4 {
-		reg = <4>;
-	};
+&ethphy4 {
+	/delete-property/ interrupts;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
index b82a8669b3..6bf65a0218 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
@@ -193,10 +193,8 @@
 	nvmem-cell-names = "mac-address";
 };
 
-&mdio {
-	ethphy0: ethernet-phy at 0 {
-		reg = <0>;
-	};
+&ethphy0 {
+	/delete-property/ interrupts;
 };
 
 &pcie {



From lede-commits at lists.infradead.org  Wed May  1 06:46:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 09:46:11 -0400
Subject: [openwrt/openwrt]  gengetopt: backport patch fixing support for c++17
In-Reply-To: <171457117157.557632.15732520099521088828@git-01.infra.openwrt.org>
References: <171457117157.557632.15732520099521088828@git-01.infra.openwrt.org>
Message-ID: <mailman.32791.1714571180.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3

commit a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 1 15:42:57 2024 +0200

    gengetopt: backport patch fixing support for c++17
    
    Backport patch fixing support for c++17 that got merged upstream in
    gengetopt.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...-gm_utils.cpp-Call-clear-instead-of-empty.patch | 25 ++++++++++++++++
 .../002-gm_utils.h-Drop-std-unary_function.patch   | 33 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch
new file mode 100644
index 0000000000..6aa3f549da
--- /dev/null
+++ b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch
@@ -0,0 +1,25 @@
+From bfba6445a778007f40af5cbfbe725e12c0fcafc6 Mon Sep 17 00:00:00 2001
+From: Tomas Volf <~@wolfsden.cz>
+Date: Tue, 5 Mar 2024 22:25:20 +0100
+Subject: [PATCH] gm_utils.cpp: Call clear instead of empty.
+
+Since the intention seem to be to erase the next word, I believe calling empty
+was a mistake and it should have been clear.  Empty does nothing in this
+context.
+
+* src/gm_utils.cpp (wrap_cstr): Call clear.
+---
+ src/gm_utils.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/gm_utils.cpp
++++ b/src/gm_utils.cpp
+@@ -311,7 +311,7 @@ void wrap_cstr(string& wrapped, unsigned
+             // trim leading spaces
+             std::size_t pos = next_word.find_first_not_of(' ');
+             if( pos == std::string::npos )
+-                next_word.empty();
++                next_word.clear();
+             else if( pos )
+                 next_word.erase( 0, pos );
+ 
diff --git a/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch
new file mode 100644
index 0000000000..ce997f4505
--- /dev/null
+++ b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch
@@ -0,0 +1,33 @@
+From a3d0a0419a35bef9b80a6a12432ab30e2d1e0f5a Mon Sep 17 00:00:00 2001
+From: Tomas Volf <~@wolfsden.cz>
+Date: Tue, 5 Mar 2024 22:27:42 +0100
+Subject: [PATCH] gm_utils.h: Drop std::unary_function.
+
+I am not sure what it does, it is deprecated/removed (depending on C++ version)
+and the advice seems to be that is just is not necessary.  So just remove it.
+
+* src/gm_utils.h (print_f, pair_print_f): Drop std::unary_function.
+---
+ src/gm_utils.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/gm_utils.h
++++ b/src/gm_utils.h
+@@ -117,7 +117,7 @@ bool string_contains(const char *s, cons
+  * Function object to print something into a stream (to be used with for_each)
+  */
+ template<class T>
+-struct print_f : public std::unary_function<T, void>
++struct print_f
+ {
+     print_f(std::ostream& out, const string &s = ", ") : os(out), sep(s) {}
+     void operator() (T x) { os << x << sep; }
+@@ -129,7 +129,7 @@ struct print_f : public std::unary_funct
+  * Function object to print a pair into two streams (to be used with for_each)
+  */
+ template<class T>
+-struct pair_print_f : public std::unary_function<T, void>
++struct pair_print_f
+ {
+     pair_print_f(std::ostream& out1, std::ostream& out2, const string &s = ", ") :
+         os1(out1), os2(out2), sep(s) {}



From lede-commits at lists.infradead.org  Wed May  1 06:47:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 09:47:05 -0400
Subject: [openwrt/openwrt]  gengetopt: backport patch fixing support for c++17
In-Reply-To: <171457122549.562380.8445826854363652974@git-01.infra.openwrt.org>
References: <171457122549.562380.8445826854363652974@git-01.infra.openwrt.org>
Message-ID: <mailman.32792.1714571229.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/eda76b336b6b6719434fd7cc314ba51fa18eda5c

commit eda76b336b6b6719434fd7cc314ba51fa18eda5c
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 1 15:42:57 2024 +0200

    gengetopt: backport patch fixing support for c++17
    
    Backport patch fixing support for c++17 that got merged upstream in
    gengetopt.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3)
---
 ...-gm_utils.cpp-Call-clear-instead-of-empty.patch | 25 ++++++++++++++++
 .../002-gm_utils.h-Drop-std-unary_function.patch   | 33 ++++++++++++++++++++++
 2 files changed, 58 insertions(+)

diff --git a/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch
new file mode 100644
index 0000000000..6aa3f549da
--- /dev/null
+++ b/tools/gengetopt/patches/001-gm_utils.cpp-Call-clear-instead-of-empty.patch
@@ -0,0 +1,25 @@
+From bfba6445a778007f40af5cbfbe725e12c0fcafc6 Mon Sep 17 00:00:00 2001
+From: Tomas Volf <~@wolfsden.cz>
+Date: Tue, 5 Mar 2024 22:25:20 +0100
+Subject: [PATCH] gm_utils.cpp: Call clear instead of empty.
+
+Since the intention seem to be to erase the next word, I believe calling empty
+was a mistake and it should have been clear.  Empty does nothing in this
+context.
+
+* src/gm_utils.cpp (wrap_cstr): Call clear.
+---
+ src/gm_utils.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/gm_utils.cpp
++++ b/src/gm_utils.cpp
+@@ -311,7 +311,7 @@ void wrap_cstr(string& wrapped, unsigned
+             // trim leading spaces
+             std::size_t pos = next_word.find_first_not_of(' ');
+             if( pos == std::string::npos )
+-                next_word.empty();
++                next_word.clear();
+             else if( pos )
+                 next_word.erase( 0, pos );
+ 
diff --git a/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch
new file mode 100644
index 0000000000..ce997f4505
--- /dev/null
+++ b/tools/gengetopt/patches/002-gm_utils.h-Drop-std-unary_function.patch
@@ -0,0 +1,33 @@
+From a3d0a0419a35bef9b80a6a12432ab30e2d1e0f5a Mon Sep 17 00:00:00 2001
+From: Tomas Volf <~@wolfsden.cz>
+Date: Tue, 5 Mar 2024 22:27:42 +0100
+Subject: [PATCH] gm_utils.h: Drop std::unary_function.
+
+I am not sure what it does, it is deprecated/removed (depending on C++ version)
+and the advice seems to be that is just is not necessary.  So just remove it.
+
+* src/gm_utils.h (print_f, pair_print_f): Drop std::unary_function.
+---
+ src/gm_utils.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/src/gm_utils.h
++++ b/src/gm_utils.h
+@@ -117,7 +117,7 @@ bool string_contains(const char *s, cons
+  * Function object to print something into a stream (to be used with for_each)
+  */
+ template<class T>
+-struct print_f : public std::unary_function<T, void>
++struct print_f
+ {
+     print_f(std::ostream& out, const string &s = ", ") : os(out), sep(s) {}
+     void operator() (T x) { os << x << sep; }
+@@ -129,7 +129,7 @@ struct print_f : public std::unary_funct
+  * Function object to print a pair into two streams (to be used with for_each)
+  */
+ template<class T>
+-struct pair_print_f : public std::unary_function<T, void>
++struct pair_print_f
+ {
+     pair_print_f(std::ostream& out1, std::ostream& out2, const string &s = ", ") :
+         os1(out1), os2(out2), sep(s) {}



From lede-commits at lists.infradead.org  Wed May  1 10:01:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 13:01:15 -0400
Subject: [openwrt/openwrt]  hostapd: fix a null pointer dereference in
 wpa_supplicant on teardown
In-Reply-To: <171458287547.1632091.13943478010847825591@git-01.infra.openwrt.org>
References: <171458287547.1632091.13943478010847825591@git-01.infra.openwrt.org>
Message-ID: <mailman.32852.1714582889.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/52a5f4491c642fcb524494800ce64c5040901b86

commit 52a5f4491c642fcb524494800ce64c5040901b86
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed May 1 18:57:00 2024 +0200

    hostapd: fix a null pointer dereference in wpa_supplicant on teardown
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...ssing-null-pointer-check-in-hostapd_free_ha.patch | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch
new file mode 100644
index 0000000000..85d5127f60
--- /dev/null
+++ b/package/network/services/hostapd/patches/052-AP-add-missing-null-pointer-check-in-hostapd_free_ha.patch
@@ -0,0 +1,20 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 1 May 2024 18:55:24 +0200
+Subject: [PATCH] AP: add missing null pointer check in hostapd_free_hapd_data
+
+When called from wpa_supplicant, iface->interfaces can be NULL
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -502,7 +502,7 @@ void hostapd_free_hapd_data(struct hosta
+ 		struct hapd_interfaces *ifaces = hapd->iface->interfaces;
+ 		size_t i;
+ 
+-		for (i = 0; i < ifaces->count; i++) {
++		for (i = 0; ifaces && i < ifaces->count; i++) {
+ 			struct hostapd_iface *iface = ifaces->iface[i];
+ 			size_t j;
+ 



From lede-commits at lists.infradead.org  Wed May  1 10:01:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 13:01:16 -0400
Subject: [openwrt/openwrt]  ucode: fix ubus defer when running from within
 eloop (integrated with uloop)
In-Reply-To: <171458287547.1632091.13943478010847825591@git-01.infra.openwrt.org>
References: <171458287547.1632091.13943478010847825591@git-01.infra.openwrt.org>
Message-ID: <mailman.32853.1714582889.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b6f1e2e5b08eccf23b28c80690d14a3ac6cd08e2

commit b6f1e2e5b08eccf23b28c80690d14a3ac6cd08e2
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed May 1 19:00:10 2024 +0200

    ucode: fix ubus defer when running from within eloop (integrated with uloop)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ..._ubus_have_uloop-for-eloop-uloop-combinat.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
new file mode 100644
index 0000000000..a1659be3c8
--- /dev/null
+++ b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
@@ -0,0 +1,26 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 1 May 2024 18:40:19 +0200
+Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination
+
+When uloop has been integrated with eloop (in hostapd/wpa_supplicant),
+uloop_cancelling will return false, since uloop_run is not being called.
+This leads to ubus.defer() calling uloop_run in a context where it can
+prevent the other event loop from running.
+
+Fix this by detecting event loop integration via uloop_fd_set_cb being set
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/lib/ubus.c
++++ b/lib/ubus.c
+@@ -665,6 +665,9 @@ uc_ubus_have_uloop(void)
+ 	bool prev = uloop_cancelled;
+ 	bool active;
+ 
++	if (uloop_fd_set_cb)
++		return true;
++
+ 	uloop_cancelled = true;
+ 	active = uloop_cancelling();
+ 	uloop_cancelled = prev;



From lede-commits at lists.infradead.org  Wed May  1 10:11:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 13:11:58 -0400
Subject: [openwrt/openwrt]  bpf-headers: fix use of netlink.h header
In-Reply-To: <171458351812.1693379.2658560679253494617@git-01.infra.openwrt.org>
References: <171458351812.1693379.2658560679253494617@git-01.infra.openwrt.org>
Message-ID: <mailman.32862.1714583523.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dfcc0ff5d2bf6eb7c6ad7621c61c896e69ff8103

commit dfcc0ff5d2bf6eb7c6ad7621c61c896e69ff8103
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Jan 18 20:44:56 2023 +0100

    bpf-headers: fix use of netlink.h header
    
    netlink.h header have NL_SET_ERR_MSG_MOD that is tied to kmods. We don't
    need kmods on bpf tools and this cause compilation error if the header
    is included. Fix it by dropping NL_SET_ERR_MSG_MOD.
    
    Link: https://github.com/openwrt/openwrt/pull/11825
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...nk-drop-NL_SET_ERR_MSG-for-kernel-modules.patch | 30 +++++++++++++++
 ...fload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch | 44 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch b/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch
new file mode 100644
index 0000000000..5771b32954
--- /dev/null
+++ b/package/kernel/bpf-headers/patches/101-linux-netlink-drop-NL_SET_ERR_MSG-for-kernel-modules.patch
@@ -0,0 +1,30 @@
+From 7ed95633bff19950069c348b94c9c13164a57a2a Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 18 Jan 2023 20:20:39 +0100
+Subject: [PATCH] linux/netlink: drop NL_SET_ERR_MSG for kernel modules
+
+We don't need NL_SET_ERR_MSG_MOD for bpf modules and we can drop it to
+solve missing KBUILD_MODNAME define.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ include/linux/netlink.h | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/include/linux/netlink.h b/include/linux/netlink.h
+index 61b1c7f..93561fb 100644
+--- a/include/linux/netlink.h
++++ b/include/linux/netlink.h
+@@ -98,9 +98,6 @@ struct netlink_ext_ack {
+ 		__extack->_msg = __msg;			\
+ } while (0)
+ 
+-#define NL_SET_ERR_MSG_MOD(extack, msg)			\
+-	NL_SET_ERR_MSG((extack), KBUILD_MODNAME ": " msg)
+-
+ #define NL_SET_BAD_ATTR_POLICY(extack, attr, pol) do {	\
+ 	if ((extack)) {					\
+ 		(extack)->bad_attr = (attr);		\
+-- 
+2.38.1
+
diff --git a/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch b/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch
new file mode 100644
index 0000000000..4dec16874e
--- /dev/null
+++ b/package/kernel/bpf-headers/patches/102-net-flow_offload-use-NL_SET_ERR_MSG-instead-of-NL_SE.patch
@@ -0,0 +1,44 @@
+From 6e7cd9c0abffea55e39a4160949bc6fba972d161 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 19 Jan 2023 13:37:46 +0100
+Subject: [PATCH] net/flow_offload: use NL_SET_ERR_MSG instead of
+ NL_SET_ERR_MSG_MOD
+
+Use NL_SET_ERR_MSG instead of NL_SET_ERR_MSG_MOD for bpf modules as
+kernel modules are not supported.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ include/net/flow_offload.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
+index 7a2b022..f17c485 100644
+--- a/include/net/flow_offload.h
++++ b/include/net/flow_offload.h
+@@ -321,7 +321,7 @@ flow_action_mixed_hw_stats_check(const struct flow_action *action,
+ 
+ 	flow_action_for_each(i, action_entry, action) {
+ 		if (i && action_entry->hw_stats != last_hw_stats) {
+-			NL_SET_ERR_MSG_MOD(extack, "Mixing HW stats types for actions is not supported");
++			NL_SET_ERR_MSG(extack, "Mixing HW stats types for actions is not supported");
+ 			return false;
+ 		}
+ 		last_hw_stats = action_entry->hw_stats;
+@@ -356,11 +356,11 @@ __flow_action_hw_stats_check(const struct flow_action *action,
+ 
+ 	if (!check_allow_bit &&
+ 	    ~action_entry->hw_stats & FLOW_ACTION_HW_STATS_ANY) {
+-		NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
++		NL_SET_ERR_MSG(extack, "Driver supports only default HW stats type \"any\"");
+ 		return false;
+ 	} else if (check_allow_bit &&
+ 		   !(action_entry->hw_stats & BIT(allow_bit))) {
+-		NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
++		NL_SET_ERR_MSG(extack, "Driver does not support selected HW stats type");
+ 		return false;
+ 	}
+ 	return true;
+-- 
+2.38.1
+



From lede-commits at lists.infradead.org  Wed May  1 10:11:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 13:11:59 -0400
Subject: [openwrt/openwrt]  xdp-tools: fix compilation wrongly using host
 header
In-Reply-To: <171458351812.1693379.2658560679253494617@git-01.infra.openwrt.org>
References: <171458351812.1693379.2658560679253494617@git-01.infra.openwrt.org>
Message-ID: <mailman.32863.1714583523.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5acc4f919c28ee8ea20c98856e1e824168cf2270

commit 5acc4f919c28ee8ea20c98856e1e824168cf2270
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Jan 18 20:50:58 2023 +0100

    xdp-tools: fix compilation wrongly using host header
    
    Currently it's needed to have gcc-multilib on the host to correctly
    compile xdp-tools. This is wrong and means that we are using host header
    to compile a tool.
    
    By some searching in how the makefile works it was discovered that
    BPF_CFLAGS were not used and required to be appended to config.mk
    
    Only one single header was added but we should include each BPF_CFLAGS
    from bpf.mk. To make this some patching to bpf-header were required and
    some patches to xdp-tools were required.
    Also it's needed to pass the correct target to BPF_CFLAGS.
    
    With the following changes xdp-tools can correctly compile with each
    header from bpf-headers and should not use any host header.
    
    Co-Developed-by: Andre Heider <a.heider at gmail.com>
    Signed-off-by: Andre Heider <a.heider at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/11825
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/utils/xdp-tools/Makefile           | 11 +++--
 .../patches/010-configure-respect-LDFLAGS.patch    |  6 +--
 ...__noinline__-reserved-attribute-for-XDP-d.patch | 49 +++++++++++++++++++
 ...ders-xdp-drop-vlan_hdr-as-already-defined.patch | 31 ++++++++++++
 ...d-missing-perf_event-include-for-bpf-and-.patch | 34 +++++++++++++
 ...bxdp-fix-compilation-on-multiarch-systems.patch | 30 ++++++++++++
 ...-allow-overwriting-W-flags-via-BPF_CFLAGS.patch | 49 +++++++++++++++++++
 ...LAGS-to-allow-overwriting-llc-s-march-arg.patch | 55 ++++++++++++++++++++++
 8 files changed, 259 insertions(+), 6 deletions(-)

diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile
index dba775e4ea..8484ca758b 100644
--- a/package/network/utils/xdp-tools/Makefile
+++ b/package/network/utils/xdp-tools/Makefile
@@ -85,8 +85,13 @@ CONFIGURE_VARS += \
 	CFLAGS="$(TARGET_CFLAGS)" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
 	CLANG="$(CLANG)" \
-	BPF_TARGET="$(BPF_TARGET)" \
-	LLC="$(LLVM_LLC)"
+	BPF_TARGET="$(BPF_ARCH)-linux-gnu" \
+	LLC="$(LLVM_LLC)" \
+	BPF_LDFLAGS="-march=$(BPF_TARGET) -mcpu=v3"
+
+ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
+	MAKE_FLAGS+=V=1
+endif
 
 MAKE_VARS += \
 	PREFIX=/usr \
@@ -94,7 +99,7 @@ MAKE_VARS += \
 
 define Build/Configure
 	$(call Build/Configure/Default)
-	echo "BPF_CFLAGS += -I$(BPF_HEADERS_DIR)/tools/lib -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk
+	echo "BPF_CFLAGS += $(BPF_CFLAGS) -Wno-error -fno-stack-protector" >> $(PKG_BUILD_DIR)/config.mk
 endef
 
 define Build/InstallDev
diff --git a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
index e2fbfa57dc..77728a6ee7 100644
--- a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
+++ b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
+@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
      return 0;
  }
  EOF
@@ -9,7 +9,7 @@
      if [ "$?" -eq "0" ]; then
          echo "HAVE_PCAP:=y" >>$CONFIG
          [ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
-@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
+@@ -224,7 +224,7 @@ int main(int argc, char **argv) {
      return 0;
  }
  EOF
@@ -18,7 +18,7 @@
      if [ "$?" -eq "0" ]; then
          echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
          echo "yes"
-@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
+@@ -291,7 +291,7 @@ int main(int argc, char **argv) {
  }
  EOF
  
diff --git a/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch
new file mode 100644
index 0000000000..1a157df32c
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/020-libxdp-Use-__noinline__-reserved-attribute-for-XDP-d.patch
@@ -0,0 +1,49 @@
+From 1f160c287c14b4300c4248752e20da5981c9763e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 18 Jan 2023 19:00:54 +0100
+Subject: [PATCH] libxdp: Use __noinline__ reserved attribute for XDP
+ dispatcher
+
+The use of noinline is wrong as noline is not a reserved attribute and
+with gcc12 this became an error. Use the reserved __noinline__ attribute
+to fix compilation error.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+[a.heider: adapt lib/libxdp/protocol.org too]
+Signed-off-by: Andre Heider <a.heider at gmail.com>
+---
+ lib/libxdp/protocol.org        | 2 +-
+ lib/libxdp/xdp-dispatcher.c.in | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/lib/libxdp/protocol.org
++++ b/lib/libxdp/protocol.org
+@@ -54,7 +54,7 @@ static volatile const struct xdp_dispatc
+ /* The volatile return value prevents the compiler from assuming it knows the
+  * return value and optimising based on that.
+  */
+-__attribute__ ((noinline))
++__attribute__ ((__noinline__))
+ int prog0(struct xdp_md *ctx) {
+         volatile int ret = XDP_DISPATCHER_RETVAL;
+ 
+--- a/lib/libxdp/xdp-dispatcher.c.in
++++ b/lib/libxdp/xdp-dispatcher.c.in
+@@ -30,7 +30,7 @@ static volatile const struct xdp_dispatc
+  * return value and optimising based on that.
+  */
+ forloop(`i', `0', NUM_PROGS,
+-`__attribute__ ((noinline))
++`__attribute__ ((__noinline__))
+ int format(`prog%d', i)(struct xdp_md *ctx) {
+         volatile int ret = XDP_DISPATCHER_RETVAL;
+ 
+@@ -40,7 +40,7 @@ int format(`prog%d', i)(struct xdp_md *c
+ }
+ ')
+ 
+-__attribute__ ((noinline))
++__attribute__ ((__noinline__))
+ int compat_test(struct xdp_md *ctx) {
+         volatile int ret = XDP_DISPATCHER_RETVAL;
+ 
diff --git a/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch b/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch
new file mode 100644
index 0000000000..d508e489ea
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/021-headers-xdp-drop-vlan_hdr-as-already-defined.patch
@@ -0,0 +1,31 @@
+From bc2a11227b5bed29d33926d5ff7e707228db9e87 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 18 Jan 2023 20:07:58 +0100
+Subject: [PATCH] headers: xdp: drop vlan_hdr as already defined
+
+Drop vlan_hdr as already defined by bpf headers.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ headers/xdp/parsing_helpers.h | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+--- a/headers/xdp/parsing_helpers.h
++++ b/headers/xdp/parsing_helpers.h
+@@ -33,16 +33,6 @@ struct hdr_cursor {
+ };
+ 
+ /*
+- *	struct vlan_hdr - vlan header
+- *	@h_vlan_TCI: priority and VLAN ID
+- *	@h_vlan_encapsulated_proto: packet type ID or len
+- */
+-struct vlan_hdr {
+-	__be16	h_vlan_TCI;
+-	__be16	h_vlan_encapsulated_proto;
+-};
+-
+-/*
+  * Struct icmphdr_common represents the common part of the icmphdr and icmp6hdr
+  * structures.
+  */
diff --git a/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch b/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch
new file mode 100644
index 0000000000..edeb403281
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/022-xdp-dump-add-missing-perf_event-include-for-bpf-and-.patch
@@ -0,0 +1,34 @@
+From 0388d7447de027e0d2369d6b8a9c58ea0f8f027c Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 18 Jan 2023 20:37:12 +0100
+Subject: [PATCH] xdp-dump: add missing perf_event include for bpf and xdp
+
+Add missing perf_event include needed for struct perf_event_header for
+bpf and xdp.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ xdp-dump/xdpdump_bpf.c | 1 +
+ xdp-dump/xdpdump_xdp.c | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/xdp-dump/xdpdump_bpf.c
++++ b/xdp-dump/xdpdump_bpf.c
+@@ -4,6 +4,7 @@
+  * Include files
+  *****************************************************************************/
+ #include <stdbool.h>
++#include <linux/perf_event.h>
+ #include <linux/bpf.h>
+ #include <bpf/bpf_helpers.h>
+ #include <bpf/bpf_trace_helpers.h>
+--- a/xdp-dump/xdpdump_xdp.c
++++ b/xdp-dump/xdpdump_xdp.c
+@@ -4,6 +4,7 @@
+  * Include files
+  *****************************************************************************/
+ #include <stdbool.h>
++#include <linux/perf_event.h>
+ #include <linux/bpf.h>
+ #include <bpf/bpf_helpers.h>
+ #include <bpf/bpf_trace_helpers.h>
diff --git a/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch
new file mode 100644
index 0000000000..cc60ebf611
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/023-libxdp-fix-compilation-on-multiarch-systems.patch
@@ -0,0 +1,30 @@
+From cb1ef3322671a67e2050a3eee18b49cdb4ed4bed Mon Sep 17 00:00:00 2001
+From: Andre Heider <a.heider at gmail.com>
+Date: Wed, 18 Jan 2023 20:54:41 +0100
+Subject: [PATCH] libxdp: fix compilation on multiarch systems
+
+Multiarch systems require an additional include path, which is covered
+by ARCH_INCLUDES here. Just as lib/util, add it to BPF_CFLAGS.
+
+Fixes compilation on debian:
+
+In file included from xdp-dispatcher.c:3:
+In file included from ../../headers/linux/bpf.h:11:
+/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
+
+Signed-off-by: Andre Heider <a.heider at gmail.com>
+---
+ lib/libxdp/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -30,7 +30,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
+ TEMPLATED_SOURCES := xdp-dispatcher.c
+ 
+ CFLAGS += -I$(HEADER_DIR)
+-BPF_CFLAGS += -I$(HEADER_DIR)
++BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES)
+ 
+ 
+ ifndef BUILD_STATIC_ONLY
diff --git a/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch
new file mode 100644
index 0000000000..16835eae37
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/024-lib-allow-overwriting-W-flags-via-BPF_CFLAGS.patch
@@ -0,0 +1,49 @@
+From e2d8eae9477f6ba41ab75ad77202f235e34c04f7 Mon Sep 17 00:00:00 2001
+From: Andre Heider <a.heider at gmail.com>
+Date: Wed, 18 Jan 2023 22:30:23 +0100
+Subject: [PATCH] lib: allow overwriting -W* flags via BPF_CFLAGS
+
+The bpf header file situation is a mess, and the default warning
+compiler flags may not be suitable everywhere, especially with -Werror
+in the mix.
+
+Move BPF_CFLAGS further down, so these can be overwritten by builders.
+
+Signed-off-by: Andre Heider <a.heider at gmail.com>
+---
+ lib/common.mk       | 2 +-
+ lib/libxdp/Makefile | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/lib/common.mk
++++ b/lib/common.mk
+@@ -108,12 +108,12 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
+ 	$(QUIET_CLANG)$(CLANG) -S \
+ 	    -target $(BPF_TARGET) \
+ 	    -D __BPF_TRACING__ \
+-	    $(BPF_CFLAGS) \
+ 	    -Wall \
+ 	    -Wno-unused-value \
+ 	    -Wno-pointer-sign \
+ 	    -Wno-compare-distinct-pointer-types \
+ 	    -Werror \
++	    $(BPF_CFLAGS) \
+ 	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ 	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -139,12 +139,12 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
+ 	$(QUIET_CLANG)$(CLANG) -S \
+ 	    -target $(BPF_TARGET) \
+ 	    -D __BPF_TRACING__ \
+-	    $(BPF_CFLAGS) \
+ 	    -Wall \
+ 	    -Wno-unused-value \
+ 	    -Wno-pointer-sign \
+ 	    -Wno-compare-distinct-pointer-types \
+ 	    -Werror \
++	    $(BPF_CFLAGS) \
+ 	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+ 	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
+ 
diff --git a/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch
new file mode 100644
index 0000000000..d375e1db0c
--- /dev/null
+++ b/package/network/utils/xdp-tools/patches/025-Add-BPF_LDFLAGS-to-allow-overwriting-llc-s-march-arg.patch
@@ -0,0 +1,55 @@
+From 7b00d4a90af1d7bff50833ffe1216cf59592353a Mon Sep 17 00:00:00 2001
+From: Andre Heider <a.heider at gmail.com>
+Date: Wed, 18 Jan 2023 22:42:28 +0100
+Subject: [PATCH] Add BPF_LDFLAGS to allow overwriting llc's -march argument
+
+The argument to clang's -target isn't necessarily the same as to
+llc's -march.
+
+Analogue to BPF_CFLAGS, introduce BPF_LDFLAGS to allow e.g.:
+BPF_TARGET="mipsel-linux-gnu" BPF_LDFLAGS="-march=bpfel -mcpu=v3"
+
+Signed-off-by: Andre Heider <a.heider at gmail.com>
+---
+ configure           | 2 ++
+ lib/common.mk       | 2 +-
+ lib/libxdp/Makefile | 2 +-
+ 3 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/configure
++++ b/configure
+@@ -17,10 +17,12 @@ check_opts()
+     : ${DYNAMIC_LIBXDP:=0}
+     : ${MAX_DISPATCHER_ACTIONS:=10}
+     : ${BPF_TARGET:=bpf}
++    : ${BPF_LDFLAGS:=-march=$(BPF_TARGET)}
+     echo "PRODUCTION:=${PRODUCTION}" >>$CONFIG
+     echo "DYNAMIC_LIBXDP:=${DYNAMIC_LIBXDP}" >>$CONFIG
+     echo "MAX_DISPATCHER_ACTIONS:=${MAX_DISPATCHER_ACTIONS}" >>$CONFIG
+     echo "BPF_TARGET:=${BPF_TARGET}" >>$CONFIG
++    echo "BPF_LDFLAGS:=${BPF_LDFLAGS}" >>$CONFIG
+ }
+ 
+ find_tool()
+--- a/lib/common.mk
++++ b/lib/common.mk
+@@ -115,7 +115,7 @@ $(XDP_OBJ): %.o: %.c $(KERN_USER_H) $(EX
+ 	    -Werror \
+ 	    $(BPF_CFLAGS) \
+ 	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+-	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
++	$(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+ .PHONY: man
+ ifeq ($(EMACS),)
+--- a/lib/libxdp/Makefile
++++ b/lib/libxdp/Makefile
+@@ -146,7 +146,7 @@ $(XDP_OBJS): %.o: %.c $(BPF_HEADERS) $(L
+ 	    -Werror \
+ 	    $(BPF_CFLAGS) \
+ 	    -O2 -emit-llvm -c -g -o ${@:.o=.ll} $<
+-	$(QUIET_LLC)$(LLC) -march=$(BPF_TARGET) -filetype=obj -o $@ ${@:.o=.ll}
++	$(QUIET_LLC)$(LLC) $(BPF_LDFLAGS) -filetype=obj -o $@ ${@:.o=.ll}
+ 
+ .PHONY: man
+ ifeq ($(EMACS),)



From lede-commits at lists.infradead.org  Wed May  1 11:23:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 01 May 2024 14:23:55 -0400
Subject: [openwrt/openwrt]  bcm27xx: correct cmdline.txt consoles for procd
In-Reply-To: <171458783516.2103091.12623700020672958810@git-01.infra.openwrt.org>
References: <171458783516.2103091.12623700020672958810@git-01.infra.openwrt.org>
Message-ID: <mailman.32877.1714587841.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6a05d849e1f8e9b3a879cdf4113afd88ebc0678a

commit 6a05d849e1f8e9b3a879cdf4113afd88ebc0678a
Author: Elbert Mai <code at elbertmai.com>
AuthorDate: Mon Apr 29 14:05:27 2024 -0700

    bcm27xx: correct cmdline.txt consoles for procd
    
    Commit [ca8c30208d5e][1] updates procd to handle muliple "console=" on the
    kernel command line. This affects Raspberry Pi builds because cmdline.txt
    specifies a UART console and a virtual console on HDMI, in that order.
    
    When procd finds multiple consoles on the command line, it attempts to
    open /dev/console. Linux uses the [last console][2] for /dev/console, so
    procd opens the virtual console on Raspberry Pi. This completely disables
    the UART console and causes [strange behavior][3] on the virtual console.
    Prior to ca8c30208d5e, procd would always open the first console, which is
    the UART console.
    
    The simplest fix without reverting ca8c30208d5e is to swap the order of
    console options in cmdline.txt. By putting the UART console last, procd
    handles the serial console correctly as before.
    
    [1]: https://git.openwrt.org/?p=project/procd.git;a=commit;h=ca8c30208d5e1aaa2c0e3f732c4c9944735e9850
    [2]: https://www.kernel.org/doc/html/latest/admin-guide/serial-console.html
    [3]: https://forum.openwrt.org/t/rasberry-pi-4-model-b-keyboards-gone-wild/195594
    
    Signed-off-by: Elbert Mai <code at elbertmai.com>
---
 target/linux/bcm27xx/image/cmdline.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/bcm27xx/image/cmdline.txt b/target/linux/bcm27xx/image/cmdline.txt
index 41f76f10af..bdd1e59a09 100644
--- a/target/linux/bcm27xx/image/cmdline.txt
+++ b/target/linux/bcm27xx/image/cmdline.txt
@@ -1 +1 @@
-console=serial0,115200 console=tty1 root=@ROOT@ rootfstype=squashfs,ext4 rootwait
+console=tty1 console=serial0,115200 root=@ROOT@ rootfstype=squashfs,ext4 rootwait



From lede-commits at lists.infradead.org  Thu May  2 06:59:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 02 May 2024 09:59:13 -0400
Subject: [openwrt/openwrt]  mediatek: increase size of the sdcard image to 512
 MiB
In-Reply-To: <171465835368.2087320.2851100949378224859@git-01.infra.openwrt.org>
References: <171465835368.2087320.2851100949378224859@git-01.infra.openwrt.org>
Message-ID: <mailman.33091.1714658365.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/918d81a3eac01be2309a54435e06f0a9d6c6f812

commit 918d81a3eac01be2309a54435e06f0a9d6c6f812
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 30 22:21:16 2024 +0100

    mediatek: increase size of the sdcard image to 512 MiB
    
    Increasing the size of the rootfs_data filesystem has become a ever
    repeating discussion and seems to be the most important thing for
    users of the MediaTek-based BananaPi boards.
    
    Using the whole remaining size of a microSD or the eMMC for rootfs_data
    doesn't make sense for many reasons, but neither does the current
    default of 104 MiB for the 'rootfs' partition size.
    
    Increase the 'rootfs' partition size to 448 MiB which will result in
    the sdcard image being exactly 512 MiB. Finding a microSD card smaller
    than 512 MiB and still working could anyway be difficult in 2024.
    
    That will allow users to install even bloatware written in Go or other
    space-hungry languages while still leaving most of the space unallocated
    for additional partitions or volumes to be used for persistent user
    data.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 config/Config-images.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/Config-images.in b/config/Config-images.in
index 6f2f926432..5222065b04 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -300,6 +300,7 @@ menu "Target Images"
 	config TARGET_ROOTFS_PARTSIZE
 		int "Root filesystem partition size (in MiB)"
 		depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
+		default 448 if TARGET_mediatek
 		default 104
 		help
 		  Select the root filesystem partition size.



From lede-commits at lists.infradead.org  Thu May  2 13:09:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 02 May 2024 16:09:23 -0400
Subject: [openwrt/openwrt]  ipq40xx: fritzrepeater-1200: fix MDIO and PHY
 probing
In-Reply-To: <171468056336.3291414.8841906376048142258@git-01.infra.openwrt.org>
References: <171468056336.3291414.8841906376048142258@git-01.infra.openwrt.org>
Message-ID: <mailman.33171.1714680568.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ecb3859cc92d2e670847934c74255a4453915beb

commit ecb3859cc92d2e670847934c74255a4453915beb
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu May 2 11:37:34 2024 +0200

    ipq40xx: fritzrepeater-1200: fix MDIO and PHY probing
    
    AVM FRITZ!Repeater 1200 does not use QCA807x PHY at all and thus it
    disables all of the individual PHY nodes, however this is not enough
    anymore since the conversion to PHY package.
    
    Now its now enough to disable the PHY-s in the package alone, but the PHY
    package node itself must also be disabled.
    
    Fixes: 1b931c33a28e ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
    Fixes: #15355
    Link: https://github.com/openwrt/openwrt/pull/15365
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts   | 24 +++++++++++++---------
 ...com-ipq4019-add-QCA8075-PHY-Package-nodes.patch |  2 +-
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
index 7d683cdf65..10f21a5947 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
@@ -23,16 +23,6 @@
 			status = "okay";
 		};
 
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-
-			ethphy: ethernet-phy at 0 {
-				reg = <0x0>;
-			};
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -255,6 +245,16 @@
 	qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+
+	ethphy: ethernet-phy at 0 {
+		reg = <0x0>;
+	};
+};
+
 &gmac {
 	status = "okay";
 };
@@ -273,6 +273,10 @@
 	phy-mode = "rgmii-id";
 };
 
+&qca807x {
+	status = "disabled";
+};
+
 &ethphy1 {
 	status = "disabled";
 };
diff --git a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
index 6a37cc1f5e..50c8e64534 100644
--- a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
+++ b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
@@ -21,7 +21,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  			status = "disabled";
  
 -			ethphy0: ethernet-phy at 0 {
-+			ethernet-phy-package at 0 {
++			qca807x: ethernet-phy-package at 0 {
 +				#address-cells = <1>;
 +				#size-cells = <0>;
 +				compatible = "qcom,qca8075-package";



From lede-commits at lists.infradead.org  Fri May  3 02:10:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 05:10:15 -0400
Subject: [openwrt/openwrt]  opensbi: bump to 1.4
In-Reply-To: <171472741589.1336021.7295298364243333363@git-01.infra.openwrt.org>
References: <171472741589.1336021.7295298364243333363@git-01.infra.openwrt.org>
Message-ID: <mailman.33279.1714727425.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/095efad4fec27bcf94cf39b469f35a55784b32ad

commit 095efad4fec27bcf94cf39b469f35a55784b32ad
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Mon Apr 29 13:09:01 2024 +0000

    opensbi: bump to 1.4
    
    Upgrade the OpenSBI firmware used by RISC-V CPUs to 1.4.
    
    Runtime-tested:
     - d1 (Lichee RV)
     - sifiveu (SiFive Unleashed)
    
    Updates since last release:
    
    1.4:
    Synopsys DesignWare APB GPIO driver
    Zicntr and Zihpm support
    Console print improvements
    Smepmp support
    Simple FDT based syscon regmap driver
    Syscon based reboot and poweroff driver
    Non-contiguous hpm counters
    Smcntrpmf support
    Full sparse hartid support
    IPI improvements
    RFENCE improvements
    Zkr support
    Andes custom PMU support
    
    1.3.1:
    ACLINT driver fix for disabled CPUs
    SBI PMU fix for out-of-bound access
    Designware GPIO driver
    
    1.3:
    Allow platform to influence cold boot HART selection
    Starfive JH7110 platform support
    Split RX and RW firmware regions
    Advertise non-retentive suspend for allwinner D1 platform
    Byteorder/endianness conversion macros
    SBI debug console extension (Experimental)
    Configure the PMA regions for RZ/Five platform
    SBI system suspend extension (Experimental)
    SBI PMU platform firmware events (Experimental)
    SBI CPPC extension (Experimental)
    Optimized remote TLB flushes
    Simple heap for boot time memory allocations
    Bring back no-map DT property for reserved memory nodes
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 package/boot/opensbi/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/boot/opensbi/Makefile b/package/boot/opensbi/Makefile
index 99a4631630..b2ef27dd71 100644
--- a/package/boot/opensbi/Makefile
+++ b/package/boot/opensbi/Makefile
@@ -6,13 +6,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=opensbi
-PKG_RELEASE:=1.2
+PKG_RELEASE:=1.4
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/riscv/opensbi
-PKG_SOURCE_DATE:=2022-12-24
-PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8
-PKG_MIRROR_HASH:=5939a3225cb37c1dde0b5b9f28f9980c0712533676774ae244d6d84bb09a1439
+PKG_SOURCE_DATE:=2023-12-24
+PKG_SOURCE_VERSION:=a2b255b88918715173942f2c5e1f97ac9e90c877
+PKG_MIRROR_HASH:=a81d7b3622feba80b2a45fe0d38600be73cfbee64a0426be82a71545c10c54d3
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 



From lede-commits at lists.infradead.org  Fri May  3 05:54:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 08:54:18 -0400
Subject: [openwrt/openwrt]  sunxi: switch default to 6.6
In-Reply-To: <171474085858.2031566.4362820113759704908@git-01.infra.openwrt.org>
References: <171474085858.2031566.4362820113759704908@git-01.infra.openwrt.org>
Message-ID: <mailman.33327.1714740863.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e8c7b8a38894abadf50547fdfda1bb0d05af56c9

commit e8c7b8a38894abadf50547fdfda1bb0d05af56c9
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri May 3 10:23:09 2024 +0200

    sunxi: switch default to 6.6
    
    Switch the default kernel to 6.6.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index 3982b763fb..d91e5c5a3e 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -10,8 +10,7 @@ BOARDNAME:=Allwinner ARM SoCs
 FEATURES:=usb ext4 display rootfs-part rtc squashfs
 SUBTARGETS:=cortexa8 cortexa7 cortexa53
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 KERNELNAME:=zImage dtbs
 



From lede-commits at lists.infradead.org  Fri May  3 05:54:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 08:54:19 -0400
Subject: [openwrt/openwrt]  sunxi: drop 6.1 support
In-Reply-To: <171474085858.2031566.4362820113759704908@git-01.infra.openwrt.org>
References: <171474085858.2031566.4362820113759704908@git-01.infra.openwrt.org>
Message-ID: <mailman.33328.1714740867.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/af87e5e9c1900c7a62119a9e33327a24f509b936

commit af87e5e9c1900c7a62119a9e33327a24f509b936
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri May 3 10:24:29 2024 +0200

    sunxi: drop 6.1 support
    
    Now that 6.6 is the default, remove the 6.1 config and the hack that
    was required for the arm32 DTS dir change.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/config-6.1                      | 524 ---------------------
 target/linux/sunxi/cortexa53/config-6.1            | 109 -----
 target/linux/sunxi/cortexa7/config-6.1             |  26 -
 target/linux/sunxi/cortexa8/config-6.1             |  12 -
 target/linux/sunxi/image/Makefile                  |   2 -
 ...t-bindings-usb-Add-H616-compatible-string.patch |  38 --
 ...-Add-special-clock-for-Allwinner-H616-PHY.patch |  79 ----
 ....2-arm64-dts-allwinner-h616-Add-USB-nodes.patch | 188 --------
 ...winner-h616-OrangePi-Zero-2-Add-USB-nodes.patch |  81 ----
 ...-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch | 305 ------------
 ...-allwinner-h616-Add-OrangePi-Zero-3-board.patch | 140 ------
 ...-allwinner-h616-update-emac-for-Orange-Pi.patch |  57 ---
 ...ts-allwinner-h616-Add-SID-controller-node.patch |  31 --
 ...xi-sram-export-register-0-for-THS-on-H616.patch |  98 ----
 ...sun8i-Add-D1-T113s-THS-controller-support.patch |  47 --
 ...s-sun8i-Explain-unknown-H6-register-value.patch |  79 ----
 ...-sun8i-Extend-H6-calibration-to-support-4.patch |  74 ---
 ...ivers-sun8i-Add-SRAM-register-access-code.patch | 126 -----
 ...sun8i-Add-support-for-H616-THS-controller.patch |  50 --
 ...un8i-Dont-fail-probe-due-to-zone-registra.patch |  68 ---
 ...lwinner-h616-Add-thermal-sensor-and-zones.patch | 138 ------
 ...-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch |  30 --
 ...01-orangepi_pc2_usb_otg_to_host_key_power.patch |  20 -
 ...nner-a64-sopine-Add-Sopine-flash-partitio.patch |  46 --
 .../410-sunxi-add-bananapi-p2-zero.patch           | 292 ------------
 ...llwinner-a64-olinuxino-add-status-LED-ali.patch |  32 --
 ...ts-allwinner-nanopi-r1s-h5-add-status-LED.patch |  35 --
 ...42-arm64-dts-orangepi-one-plus-enable-PWM.patch |  10 -
 ...50-arm64-dts-enable-wifi-on-pine64-boards.patch |  72 ---
 29 files changed, 2809 deletions(-)

diff --git a/target/linux/sunxi/config-6.1 b/target/linux/sunxi/config-6.1
deleted file mode 100644
index a76834c13a..0000000000
--- a/target/linux/sunxi/config-6.1
+++ /dev/null
@@ -1,524 +0,0 @@
-# CONFIG_AHCI_SUNXI is not set
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_FORCE_MAX_ORDER=11
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_V6_V7=y
-CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_NR_GPIO=416
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUNXI=y
-CONFIG_ARCH_SUNXI_MC_SMP=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM=y
-CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y
-CONFIG_ARM_APPENDED_DTB=y
-CONFIG_ARM_ARCH_TIMER=y
-CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_ARM_CCI=y
-CONFIG_ARM_CCI400_COMMON=y
-CONFIG_ARM_CCI400_PORT_CTRL=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_ERRATA_643719=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-CONFIG_ARM_LPAE=y
-CONFIG_ARM_PATCH_IDIV=y
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_PSCI=y
-CONFIG_ARM_PSCI_FW=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ARM_VIRT_EXT=y
-CONFIG_ATA=y
-CONFIG_ATAGS=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_AXP20X_POWER=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_PWM=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_PM=y
-CONFIG_BOUNCE=y
-CONFIG_CACHE_L2X0=y
-CONFIG_CAN=y
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLK_SUNXI=y
-CONFIG_CLK_SUNXI_CLOCKS=y
-CONFIG_CLK_SUNXI_PRCM_SUN6I=y
-CONFIG_CLK_SUNXI_PRCM_SUN8I=y
-CONFIG_CLK_SUNXI_PRCM_SUN9I=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_CONNECTOR=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_COREDUMP=y
-CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-CONFIG_CPUFREQ_DT=y
-CONFIG_CPUFREQ_DT_PLATDEV=y
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_ATTR_SET=y
-CONFIG_CPU_FREQ_GOV_COMMON=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SPECTRE=y
-CONFIG_CPU_THERMAL=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_V7=y
-CONFIG_CRC16=y
-CONFIG_CRC_T10DIF=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CRCT10DIF=y
-CONFIG_CRYPTO_CRCT10DIF_ARM_CE=y
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_DEV_ALLWINNER=y
-CONFIG_CRYPTO_DEV_SUN4I_SS=y
-# CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG is not set
-CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y
-# CONFIG_CRYPTO_DEV_SUN8I_CE is not set
-# CONFIG_CRYPTO_DEV_SUN8I_SS is not set
-CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_LIB_DES=y
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DEBUG_MEMORY_INIT=y
-CONFIG_DMADEVICES=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
-CONFIG_DMA_SUN4I=y
-CONFIG_DMA_SUN6I=y
-CONFIG_DMA_VIRTUAL_CHANNELS=y
-CONFIG_DNOTIFY=y
-CONFIG_DTC=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_DVB_CORE=y
-CONFIG_DWMAC_GENERIC=y
-# CONFIG_DWMAC_SUN8I is not set
-CONFIG_DWMAC_SUNXI=y
-CONFIG_DYNAMIC_DEBUG=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_ELF_CORE=y
-CONFIG_EXT4_FS=y
-CONFIG_EXTCON=y
-CONFIG_F2FS_FS=y
-CONFIG_FAT_FS=y
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_FOREIGN_ENDIAN=y
-CONFIG_FB_LITTLE_ENDIAN=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_SIMPLE=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-CONFIG_FRAME_WARN=2048
-CONFIG_FREEZER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_CACHE=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PHY=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_VDSO_32=y
-CONFIG_GLOB=y
-CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDEN_BRANCH_PREDICTOR=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HAVE_SMP=y
-CONFIG_HIGHMEM=y
-CONFIG_HIGHPTE=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HWMON=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_TIMERIOMEM=y
-CONFIG_HZ_FIXED=0
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_I2C_MV64XXX=y
-CONFIG_I2C_SUN6I_P2WI=y
-CONFIG_IIO=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_INPUT_AXP20X_PEK=y
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_KALLSYMS=y
-CONFIG_KEYBOARD_SUN4I_LRADC=y
-CONFIG_KMAP_LOCAL=y
-CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
-CONFIG_KSM=y
-CONFIG_LCD_CLASS_DEVICE=y
-CONFIG_LCD_PLATFORM=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_LOGO=y
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_LOGO_LINUX_MONO=y
-CONFIG_LOGO_LINUX_VGA16=y
-CONFIG_MACH_SUN4I=y
-CONFIG_MACH_SUN5I=y
-CONFIG_MACH_SUN6I=y
-CONFIG_MACH_SUN7I=y
-CONFIG_MACH_SUN8I=y
-CONFIG_MACH_SUN9I=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MDIO_SUN4I=y
-CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
-CONFIG_MEDIA_ATTACH=y
-CONFIG_MEDIA_CAMERA_SUPPORT=y
-CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
-CONFIG_MEDIA_PLATFORM_SUPPORT=y
-CONFIG_MEDIA_RADIO_SUPPORT=y
-CONFIG_MEDIA_SDR_SUPPORT=y
-CONFIG_MEDIA_SUPPORT=y
-CONFIG_MEDIA_TEST_SUPPORT=y
-CONFIG_MEDIA_TUNER=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_AXP20X=y
-CONFIG_MFD_AXP20X_I2C=y
-CONFIG_MFD_AXP20X_RSB=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_SUN6I_PRCM=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_SUNXI=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPLIT_FIT_FW=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEON=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NET_VENDOR_ALLWINNER=y
-CONFIG_NLS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NO_HZ=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NR_CPUS=8
-CONFIG_NVMEM=y
-CONFIG_NVMEM_SUNXI_SID=y
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_OUTER_CACHE=y
-CONFIG_OUTER_CACHE_SYNC=y
-CONFIG_PADATA=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PAGE_POOL=y
-CONFIG_PCS_XPCS=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=3
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PHY_SUN4I_USB=y
-# CONFIG_PHY_SUN50I_USB3 is not set
-# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
-CONFIG_PHY_SUN9I_USB=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_AXP209=y
-# CONFIG_PINCTRL_SUN20I_D1 is not set
-CONFIG_PINCTRL_SUN4I_A10=y
-# CONFIG_PINCTRL_SUN50I_A100 is not set
-# CONFIG_PINCTRL_SUN50I_A100_R is not set
-# CONFIG_PINCTRL_SUN50I_A64 is not set
-# CONFIG_PINCTRL_SUN50I_A64_R is not set
-# CONFIG_PINCTRL_SUN50I_H5 is not set
-# CONFIG_PINCTRL_SUN50I_H6 is not set
-# CONFIG_PINCTRL_SUN50I_H616 is not set
-# CONFIG_PINCTRL_SUN50I_H616_R is not set
-# CONFIG_PINCTRL_SUN50I_H6_R is not set
-CONFIG_PINCTRL_SUN5I=y
-CONFIG_PINCTRL_SUN6I_A31=y
-CONFIG_PINCTRL_SUN6I_A31_R=y
-CONFIG_PINCTRL_SUN8I_A23=y
-CONFIG_PINCTRL_SUN8I_A23_R=y
-CONFIG_PINCTRL_SUN8I_A33=y
-CONFIG_PINCTRL_SUN8I_A83T=y
-CONFIG_PINCTRL_SUN8I_A83T_R=y
-CONFIG_PINCTRL_SUN8I_H3=y
-CONFIG_PINCTRL_SUN8I_H3_R=y
-CONFIG_PINCTRL_SUN8I_V3S=y
-CONFIG_PINCTRL_SUN9I_A80=y
-CONFIG_PINCTRL_SUN9I_A80_R=y
-CONFIG_PINCTRL_SUNXI=y
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_OPP=y
-CONFIG_PM_SLEEP=y
-CONFIG_PM_SLEEP_SMP=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-CONFIG_PRINTK_TIME=y
-CONFIG_PROC_EVENTS=y
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_SUN4I=y
-CONFIG_PWM_SYSFS=y
-CONFIG_RATIONAL=y
-CONFIG_REALTEK_PHY=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_IRQ=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGMAP_SPI=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_AXP20X=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_GPIO=y
-CONFIG_REGULATOR_SY8106A=y
-CONFIG_RELAY=y
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RESET_SIMPLE=y
-CONFIG_RESET_SUNXI=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-CONFIG_SATA_HOST=y
-CONFIG_SATA_PMP=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SDIO_UART=y
-CONFIG_SECURITYFS=y
-CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
-CONFIG_SERIAL_8250_DW=y
-CONFIG_SERIAL_8250_DWLIB=y
-CONFIG_SERIAL_8250_FSL=y
-CONFIG_SERIAL_8250_NR_UARTS=8
-CONFIG_SERIAL_8250_RUNTIME_UARTS=8
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIO=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SG_POOL=y
-CONFIG_SMP=y
-CONFIG_SMP_ON_UP=y
-CONFIG_SND=y
-CONFIG_SND_COMPRESS_OFFLOAD=y
-CONFIG_SND_JACK=y
-CONFIG_SND_JACK_INPUT_DEV=y
-CONFIG_SND_PCM=y
-CONFIG_SND_SIMPLE_CARD=y
-CONFIG_SND_SIMPLE_CARD_UTILS=y
-CONFIG_SND_SOC=y
-CONFIG_SND_SOC_I2C_AND_SPI=y
-# CONFIG_SND_SUN4I_I2S is not set
-# CONFIG_SND_SUN4I_SPDIF is not set
-# CONFIG_SND_SUN50I_DMIC is not set
-# CONFIG_SND_SUN8I_CODEC is not set
-# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SOUND=y
-CONFIG_SOUND_OSS_CORE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SPI_SUN4I=y
-CONFIG_SPI_SUN6I=y
-CONFIG_SRCU=y
-CONFIG_STMMAC_ETH=y
-CONFIG_STMMAC_PLATFORM=y
-CONFIG_SUN4I_A10_CCU=y
-# CONFIG_SUN4I_EMAC is not set
-CONFIG_SUN4I_TIMER=y
-CONFIG_SUN5I_CCU=y
-CONFIG_SUN5I_HSTIMER=y
-CONFIG_SUN6I_A31_CCU=y
-# CONFIG_SUN6I_RTC_CCU is not set
-CONFIG_SUN8I_A23_CCU=y
-CONFIG_SUN8I_A33_CCU=y
-CONFIG_SUN8I_A83T_CCU=y
-CONFIG_SUN8I_DE2_CCU=y
-CONFIG_SUN8I_H3_CCU=y
-CONFIG_SUN8I_R40_CCU=y
-CONFIG_SUN8I_R_CCU=y
-CONFIG_SUN8I_THERMAL=y
-CONFIG_SUN8I_V3S_CCU=y
-CONFIG_SUN9I_A80_CCU=y
-CONFIG_SUNXI_CCU=y
-CONFIG_SUNXI_MBUS=y
-CONFIG_SUNXI_RSB=y
-CONFIG_SUNXI_SRAM=y
-CONFIG_SUNXI_WATCHDOG=y
-CONFIG_SUSPEND=y
-CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWIOTLB=y
-CONFIG_SWPHY=y
-CONFIG_SWP_EMULATE=y
-CONFIG_SYSFS_SYSCALL=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_THERMAL=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
-CONFIG_THERMAL_GOV_STEP_WISE=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_OF=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_TOUCHSCREEN_SUN4I=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USB=y
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_DWC2_HOST=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_HCD_PLATFORM=y
-CONFIG_USB_GADGET=y
-CONFIG_USB_NET_DRIVERS=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_PLATFORM=y
-CONFIG_USB_ROLE_SWITCH=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USERIO=y
-CONFIG_USE_OF=y
-CONFIG_VFAT_FS=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-CONFIG_VHOST=y
-CONFIG_VHOST_IOTLB=y
-CONFIG_VHOST_NET=y
-# CONFIG_VIDEO_SUN4I_CSI is not set
-# CONFIG_VIDEO_SUN6I_CSI is not set
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_CONSOLE_SLEEP=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XPS=y
-CONFIG_XXHASH=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZBOOT_ROM_BSS=0
-CONFIG_ZBOOT_ROM_TEXT=0
diff --git a/target/linux/sunxi/cortexa53/config-6.1 b/target/linux/sunxi/cortexa53/config-6.1
deleted file mode 100644
index 55bcd4e8e5..0000000000
--- a/target/linux/sunxi/cortexa53/config-6.1
+++ /dev/null
@@ -1,109 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=24
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ARM64=y
-CONFIG_ARM64_4K_PAGES=y
-CONFIG_ARM64_CRYPTO=y
-CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_ERRATUM_2051678=y
-CONFIG_ARM64_ERRATUM_2077057=y
-CONFIG_ARM64_ERRATUM_2658417=y
-CONFIG_ARM64_ERRATUM_2054223=y
-CONFIG_ARM64_ERRATUM_2067961=y
-CONFIG_ARM64_PAGE_SHIFT=12
-CONFIG_ARM64_PA_BITS=48
-CONFIG_ARM64_PA_BITS_48=y
-CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_VA_BITS=39
-CONFIG_ARM64_VA_BITS_39=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
-CONFIG_ARM_GIC_V3=y
-CONFIG_ARM_GIC_V3_ITS=y
-CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_CE=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
-CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
-CONFIG_CRYPTO_BLAKE2S=y
-CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
-CONFIG_CRYPTO_CRYPTD=y
-CONFIG_CRYPTO_GHASH_ARM64_CE=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_SHA1_ARM64_CE=y
-CONFIG_CRYPTO_SIMD=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DWMAC_SUN8I=y
-CONFIG_EEPROM_AT24=y
-CONFIG_FRAME_POINTER=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-CONFIG_MDIO_BUS_MUX=y
-CONFIG_MICREL_PHY=y
-# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set
-CONFIG_MODULES_USE_ELF_RELA=y
-CONFIG_MOTORCOMM_PHY=y
-CONFIG_MUSB_PIO_ONLY=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_NO_IOPORT_MAP=y
-CONFIG_PARTITION_PERCPU=y
-CONFIG_PHY_SUN50I_USB3=y
-CONFIG_PINCTRL_SUN50I_A100=y
-CONFIG_PINCTRL_SUN50I_A100_R=y
-CONFIG_PINCTRL_SUN50I_A64=y
-CONFIG_PINCTRL_SUN50I_A64_R=y
-CONFIG_PINCTRL_SUN50I_H5=y
-CONFIG_PINCTRL_SUN50I_H6=y
-CONFIG_PINCTRL_SUN50I_H6_R=y
-CONFIG_PINCTRL_SUN50I_H616=y
-CONFIG_PINCTRL_SUN50I_H616_R=y
-# CONFIG_PREEMPT_DYNAMIC is not set
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
-# CONFIG_SCHED_CLUSTER is not set
-# CONFIG_SHADOW_CALL_STACK is not set
-# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
-CONFIG_SOUND_OSS_CORE_PRECLAIM=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SUN50I_A100_CCU=y
-CONFIG_SUN50I_A100_R_CCU=y
-CONFIG_SUN50I_A64_CCU=y
-CONFIG_SUN50I_DE2_BUS=y
-CONFIG_SUN50I_ERRATUM_UNKNOWN1=y
-CONFIG_SUN50I_H616_CCU=y
-CONFIG_SUN50I_H6_CCU=y
-CONFIG_SUN50I_H6_R_CCU=y
-# CONFIG_SUN6I_RTC_CCU is not set
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_UNMAP_KERNEL_AT_EL0=y
-CONFIG_USB_MUSB_DUAL_ROLE=y
-CONFIG_USB_MUSB_HDRC=y
-CONFIG_USB_MUSB_SUNXI=y
-CONFIG_USB_PHY=y
-CONFIG_VMAP_STACK=y
-CONFIG_ZONE_DMA32=y
-CONFIG_SURFACE_PLATFORMS=y
-# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set
-# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
-# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
-# CONFIG_PAGE_TABLE_CHECK is not set
-CONFIG_RANDOMIZE_KSTACK_OFFSET=y
-# CONFIG_ARCH_NXP is not set
diff --git a/target/linux/sunxi/cortexa7/config-6.1 b/target/linux/sunxi/cortexa7/config-6.1
deleted file mode 100644
index eaa6b037be..0000000000
--- a/target/linux/sunxi/cortexa7/config-6.1
+++ /dev/null
@@ -1,26 +0,0 @@
-CONFIG_B53=y
-CONFIG_B53_MDIO_DRIVER=y
-CONFIG_CRYPTO_BLAKE2S_ARM=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_DWMAC_SUN8I=y
-CONFIG_GRO_CELLS=y
-# CONFIG_HARDEN_BRANCH_HISTORY is not set
-# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
-# CONFIG_MACH_SUN4I is not set
-# CONFIG_MACH_SUN5I is not set
-CONFIG_MDIO_BUS_MUX=y
-CONFIG_MICREL_PHY=y
-CONFIG_MUSB_PIO_ONLY=y
-CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_TAG_BRCM=y
-CONFIG_NET_DSA_TAG_BRCM_COMMON=y
-CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
-CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
-CONFIG_NET_SWITCHDEV=y
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_RTC_DRV_SUN6I=y
-CONFIG_USB_MUSB_DUAL_ROLE=y
-CONFIG_USB_MUSB_HDRC=y
-CONFIG_USB_MUSB_SUNXI=y
-CONFIG_USB_PHY=y
diff --git a/target/linux/sunxi/cortexa8/config-6.1 b/target/linux/sunxi/cortexa8/config-6.1
deleted file mode 100644
index b893b3142e..0000000000
--- a/target/linux/sunxi/cortexa8/config-6.1
+++ /dev/null
@@ -1,12 +0,0 @@
-# CONFIG_ARM_LPAE is not set
-CONFIG_CRYPTO_BLAKE2S_ARM=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-# CONFIG_MACH_SUN6I is not set
-# CONFIG_MACH_SUN7I is not set
-# CONFIG_MACH_SUN8I is not set
-# CONFIG_MACH_SUN9I is not set
-CONFIG_PGTABLE_LEVELS=2
-# CONFIG_PHY_SUN9I_USB is not set
-# CONFIG_SPI_SUN6I is not set
-# CONFIG_SUN8I_A83T_CCU is not set
-# CONFIG_SUN8I_THERMAL is not set
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index fc1359d173..ee36df598a 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -34,9 +34,7 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
-ifdef CONFIG_LINUX_6_6
   SUNXI_DTS_DIR :=allwinner/
-endif
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
diff --git a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch b/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
deleted file mode 100644
index c24d479534..0000000000
--- a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 28a1a6474c5053bae01bd29946b4d5ede539176b Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:52 +0000
-Subject: [PATCH] dt-bindings: usb: Add H616 compatible string
-
-The Allwinner H616 contains four fully OHCI/EHCI compatible USB host
-controllers, so just add their compatible strings to the list of
-generic OHCI/EHCI controllers.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20221031111358.3387297-2-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 +
- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
-+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
-@@ -30,6 +30,7 @@ properties:
-               - allwinner,sun4i-a10-ehci
-               - allwinner,sun50i-a64-ehci
-               - allwinner,sun50i-h6-ehci
-+              - allwinner,sun50i-h616-ehci
-               - allwinner,sun5i-a13-ehci
-               - allwinner,sun6i-a31-ehci
-               - allwinner,sun7i-a20-ehci
---- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
-+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
-@@ -20,6 +20,7 @@ properties:
-               - allwinner,sun4i-a10-ohci
-               - allwinner,sun50i-a64-ohci
-               - allwinner,sun50i-h6-ohci
-+              - allwinner,sun50i-h616-ohci
-               - allwinner,sun5i-a13-ohci
-               - allwinner,sun6i-a31-ohci
-               - allwinner,sun7i-a20-ohci
diff --git a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch b/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
deleted file mode 100644
index 5739172ceb..0000000000
--- a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 6964affe65066651eca21e97247d3b7cac5153dc Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:53 +0000
-Subject: [PATCH] dt-bindings: phy: Add special clock for Allwinner H616 PHY
-
-The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves
-some resources from port 2's PHY and HCI IP. In particular the PMU clock
-for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL
-register of port 2. To allow each USB port to be controlled
-independently of port 2, we need a handle to that particular PMU clock
-in the *PHY* node, as the HCI and PHY part might be handled by separate
-drivers.
-
-Add that clock to the requirements of the H616 PHY binding, so that a
-PHY driver can apply the quirk in isolation, without requiring help from
-port 2's HCI driver.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Rob Herring <robh at kernel.org>
-Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara at arm.com
-Signed-off-by: Vinod Koul <vkoul at kernel.org>
----
- .../phy/allwinner,sun8i-h3-usb-phy.yaml       | 26 +++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
---- a/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
-+++ b/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
-@@ -36,18 +36,22 @@ properties:
-       - const: pmu3
- 
-   clocks:
-+    minItems: 4
-     items:
-       - description: USB OTG PHY bus clock
-       - description: USB Host 0 PHY bus clock
-       - description: USB Host 1 PHY bus clock
-       - description: USB Host 2 PHY bus clock
-+      - description: PMU clock for host port 2
- 
-   clock-names:
-+    minItems: 4
-     items:
-       - const: usb0_phy
-       - const: usb1_phy
-       - const: usb2_phy
-       - const: usb3_phy
-+      - const: pmu2_clk
- 
-   resets:
-     items:
-@@ -96,6 +100,28 @@ required:
-   - resets
-   - reset-names
- 
-+allOf:
-+  - if:
-+      properties:
-+        compatible:
-+          contains:
-+            enum:
-+              - allwinner,sun50i-h616-usb-phy
-+    then:
-+      properties:
-+        clocks:
-+          minItems: 5
-+
-+        clock-names:
-+          minItems: 5
-+    else:
-+      properties:
-+        clocks:
-+          maxItems: 4
-+
-+        clock-names:
-+          maxItems: 4
-+
- additionalProperties: false
- 
- examples:
diff --git a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
deleted file mode 100644
index 6dc1cf2f36..0000000000
--- a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From f40cf244c3feb4e1a442f8029b691add2c65b3ab Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:56 +0000
-Subject: [PATCH] arm64: dts: allwinner: h616: Add USB nodes
-
-Add the nodes for the MUSB and the four USB host controllers to the SoC
-.dtsi, along with the PHY node needed to bind all of them together.
-
-EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires
-some quirks (handled in the driver).
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
- 1 file changed, 160 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-@@ -504,6 +504,166 @@
- 			};
- 		};
- 
-+		usbotg: usb at 5100000 {
-+			compatible = "allwinner,sun50i-h616-musb",
-+				     "allwinner,sun8i-h3-musb";
-+			reg = <0x05100000 0x0400>;
-+			clocks = <&ccu CLK_BUS_OTG>;
-+			resets = <&ccu RST_BUS_OTG>;
-+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
-+			interrupt-names = "mc";
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			extcon = <&usbphy 0>;
-+			status = "disabled";
-+		};
-+
-+		usbphy: phy at 5100400 {
-+			compatible = "allwinner,sun50i-h616-usb-phy";
-+			reg = <0x05100400 0x24>,
-+			      <0x05101800 0x14>,
-+			      <0x05200800 0x14>,
-+			      <0x05310800 0x14>,
-+			      <0x05311800 0x14>;
-+			reg-names = "phy_ctrl",
-+				    "pmu0",
-+				    "pmu1",
-+				    "pmu2",
-+				    "pmu3";
-+			clocks = <&ccu CLK_USB_PHY0>,
-+				 <&ccu CLK_USB_PHY1>,
-+				 <&ccu CLK_USB_PHY2>,
-+				 <&ccu CLK_USB_PHY3>,
-+				 <&ccu CLK_BUS_EHCI2>;
-+			clock-names = "usb0_phy",
-+				      "usb1_phy",
-+				      "usb2_phy",
-+				      "usb3_phy",
-+				      "pmu2_clk";
-+			resets = <&ccu RST_USB_PHY0>,
-+				 <&ccu RST_USB_PHY1>,
-+				 <&ccu RST_USB_PHY2>,
-+				 <&ccu RST_USB_PHY3>;
-+			reset-names = "usb0_reset",
-+				      "usb1_reset",
-+				      "usb2_reset",
-+				      "usb3_reset";
-+			status = "disabled";
-+			#phy-cells = <1>;
-+		};
-+
-+		ehci0: usb at 5101000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05101000 0x100>;
-+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI0>,
-+				 <&ccu CLK_BUS_EHCI0>,
-+				 <&ccu CLK_USB_OHCI0>;
-+			resets = <&ccu RST_BUS_OHCI0>,
-+				 <&ccu RST_BUS_EHCI0>;
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci0: usb at 5101400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05101400 0x100>;
-+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI0>,
-+				 <&ccu CLK_USB_OHCI0>;
-+			resets = <&ccu RST_BUS_OHCI0>;
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci1: usb at 5200000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05200000 0x100>;
-+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI1>,
-+				 <&ccu CLK_BUS_EHCI1>,
-+				 <&ccu CLK_USB_OHCI1>;
-+			resets = <&ccu RST_BUS_OHCI1>,
-+				 <&ccu RST_BUS_EHCI1>;
-+			phys = <&usbphy 1>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci1: usb at 5200400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05200400 0x100>;
-+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI1>,
-+				 <&ccu CLK_USB_OHCI1>;
-+			resets = <&ccu RST_BUS_OHCI1>;
-+			phys = <&usbphy 1>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci2: usb at 5310000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05310000 0x100>;
-+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI2>,
-+				 <&ccu CLK_BUS_EHCI2>,
-+				 <&ccu CLK_USB_OHCI2>;
-+			resets = <&ccu RST_BUS_OHCI2>,
-+				 <&ccu RST_BUS_EHCI2>;
-+			phys = <&usbphy 2>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci2: usb at 5310400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05310400 0x100>;
-+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI2>,
-+				 <&ccu CLK_USB_OHCI2>;
-+			resets = <&ccu RST_BUS_OHCI2>;
-+			phys = <&usbphy 2>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci3: usb at 5311000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05311000 0x100>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI3>,
-+				 <&ccu CLK_BUS_EHCI3>,
-+				 <&ccu CLK_USB_OHCI3>;
-+			resets = <&ccu RST_BUS_OHCI3>,
-+				 <&ccu RST_BUS_EHCI3>;
-+			phys = <&usbphy 3>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci3: usb at 5311400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05311400 0x100>;
-+			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI3>,
-+				 <&ccu CLK_USB_OHCI3>;
-+			resets = <&ccu RST_BUS_OHCI3>;
-+			phys = <&usbphy 3>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
- 		rtc: rtc at 7000000 {
- 			compatible = "allwinner,sun50i-h616-rtc";
- 			reg = <0x07000000 0x400>;
diff --git a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
deleted file mode 100644
index a544e482f3..0000000000
--- a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From db5f028309ede13767e2ba356c1975ac37a4fd6c Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:57 +0000
-Subject: [PATCH] arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes
-
-The OrangePi Zero 2 has one USB-A host port, VBUS is provided by
-a GPIO controlled regulator.
-The USB-C port is meant to power the board, but is also connected to
-the USB 0 port, which we configure as an MUSB peripheral.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20221031111358.3387297-7-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../allwinner/sun50i-h616-orangepi-zero2.dts  | 41 +++++++++++++++++++
- 1 file changed, 41 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -49,8 +49,24 @@
- 		regulator-max-microvolt = <5000000>;
- 		regulator-always-on;
- 	};
-+
-+	reg_usb1_vbus: regulator-usb1-vbus {
-+		compatible = "regulator-fixed";
-+		regulator-name = "usb1-vbus";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&reg_vcc5v>;
-+		enable-active-high;
-+		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
-+	};
-+};
-+
-+&ehci1 {
-+	status = "okay";
- };
- 
-+/* USB 2 & 3 are on headers only. */
-+
- &emac0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&ext_rgmii_pins>;
-@@ -76,6 +92,10 @@
- 	status = "okay";
- };
- 
-+&ohci1 {
-+	status = "okay";
-+};
-+
- &r_rsb {
- 	status = "okay";
- 
-@@ -211,3 +231,24 @@
- 	pinctrl-0 = <&uart0_ph_pins>;
- 	status = "okay";
- };
-+
-+&usbotg {
-+	/*
-+	 * PHY0 pins are connected to a USB-C socket, but a role switch
-+	 * is not implemented: both CC pins are pulled to GND.
-+	 * The VBUS pins power the device, so a fixed peripheral mode
-+	 * is the best choice.
-+	 * The board can be powered via GPIOs, in this case port0 *can*
-+	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
-+	 * then provided by the GPIOs. Any user of this setup would
-+	 * need to adjust the DT accordingly: dr_mode set to "host",
-+	 * enabling OHCI0 and EHCI0.
-+	 */
-+	dr_mode = "peripheral";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	status = "okay";
-+};
diff --git a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch b/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
deleted file mode 100644
index 0747e6a8e0..0000000000
--- a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
+++ /dev/null
@@ -1,305 +0,0 @@
-From 322bf103204b8f786547acbeed85569254e7088f Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Fri, 4 Aug 2023 18:08:54 +0100
-Subject: [PATCH] arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT
-
-The Orange Pi Zero 2 got a successor (Zero 3), which shares quite some
-DT nodes with the Zero 2, but comes with a different PMIC.
-
-Move the common parts (except the PMIC) into a new shared file, and
-include that from the existing board .dts file.
-
-No functional change, the generated DTB is the same, except for some
-phandle numbering differences.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20230804170856.1237202-2-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../allwinner/sun50i-h616-orangepi-zero.dtsi  | 134 ++++++++++++++++++
- .../allwinner/sun50i-h616-orangepi-zero2.dts  | 119 +---------------
- 2 files changed, 135 insertions(+), 118 deletions(-)
- create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-
---- /dev/null
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-@@ -0,0 +1,134 @@
-+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
-+/*
-+ * Copyright (C) 2020 Arm Ltd.
-+ *
-+ * DT nodes common between Orange Pi Zero 2 and Orange Pi Zero 3.
-+ * Excludes PMIC nodes and properties, since they are different between the two.
-+ */
-+
-+#include "sun50i-h616.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/interrupt-controller/arm-gic.h>
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	aliases {
-+		ethernet0 = &emac0;
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-0 {
-+			function = LED_FUNCTION_POWER;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
-+			default-state = "on";
-+		};
-+
-+		led-1 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
-+		};
-+	};
-+
-+	reg_vcc5v: vcc5v {
-+		/* board wide 5V supply directly from the USB-C socket */
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc-5v";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		regulator-always-on;
-+	};
-+
-+	reg_usb1_vbus: regulator-usb1-vbus {
-+		compatible = "regulator-fixed";
-+		regulator-name = "usb1-vbus";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&reg_vcc5v>;
-+		enable-active-high;
-+		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
-+	};
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+/* USB 2 & 3 are on headers only. */
-+
-+&emac0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ext_rgmii_pins>;
-+	phy-mode = "rgmii";
-+	phy-handle = <&ext_rgmii_phy>;
-+	allwinner,rx-delay-ps = <3100>;
-+	allwinner,tx-delay-ps = <700>;
-+	status = "okay";
-+};
-+
-+&mdio0 {
-+	ext_rgmii_phy: ethernet-phy at 1 {
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <1>;
-+	};
-+};
-+
-+&mmc0 {
-+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
-+	bus-width = <4>;
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+&spi0  {
-+	status = "okay";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
-+
-+	flash at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		compatible = "jedec,spi-nor";
-+		reg = <0>;
-+		spi-max-frequency = <40000000>;
-+	};
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_ph_pins>;
-+	status = "okay";
-+};
-+
-+&usbotg {
-+	/*
-+	 * PHY0 pins are connected to a USB-C socket, but a role switch
-+	 * is not implemented: both CC pins are pulled to GND.
-+	 * The VBUS pins power the device, so a fixed peripheral mode
-+	 * is the best choice.
-+	 * The board can be powered via GPIOs, in this case port0 *can*
-+	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
-+	 * then provided by the GPIOs. Any user of this setup would
-+	 * need to adjust the DT accordingly: dr_mode set to "host",
-+	 * enabling OHCI0 and EHCI0.
-+	 */
-+	dr_mode = "peripheral";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -5,95 +5,19 @@
- 
- /dts-v1/;
- 
--#include "sun50i-h616.dtsi"
--
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/interrupt-controller/arm-gic.h>
--#include <dt-bindings/leds/common.h>
-+#include "sun50i-h616-orangepi-zero.dtsi"
- 
- / {
- 	model = "OrangePi Zero2";
- 	compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
--
--	aliases {
--		ethernet0 = &emac0;
--		serial0 = &uart0;
--	};
--
--	chosen {
--		stdout-path = "serial0:115200n8";
--	};
--
--	leds {
--		compatible = "gpio-leds";
--
--		led-0 {
--			function = LED_FUNCTION_POWER;
--			color = <LED_COLOR_ID_RED>;
--			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
--			default-state = "on";
--		};
--
--		led-1 {
--			function = LED_FUNCTION_STATUS;
--			color = <LED_COLOR_ID_GREEN>;
--			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
--		};
--	};
--
--	reg_vcc5v: vcc5v {
--		/* board wide 5V supply directly from the USB-C socket */
--		compatible = "regulator-fixed";
--		regulator-name = "vcc-5v";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		regulator-always-on;
--	};
--
--	reg_usb1_vbus: regulator-usb1-vbus {
--		compatible = "regulator-fixed";
--		regulator-name = "usb1-vbus";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		vin-supply = <&reg_vcc5v>;
--		enable-active-high;
--		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
--	};
--};
--
--&ehci1 {
--	status = "okay";
- };
- 
--/* USB 2 & 3 are on headers only. */
--
- &emac0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&ext_rgmii_pins>;
--	phy-mode = "rgmii";
--	phy-handle = <&ext_rgmii_phy>;
- 	phy-supply = <&reg_dcdce>;
--	allwinner,rx-delay-ps = <3100>;
--	allwinner,tx-delay-ps = <700>;
--	status = "okay";
--};
--
--&mdio0 {
--	ext_rgmii_phy: ethernet-phy at 1 {
--		compatible = "ethernet-phy-ieee802.3-c22";
--		reg = <1>;
--	};
- };
- 
- &mmc0 {
- 	vmmc-supply = <&reg_dcdce>;
--	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
--	bus-width = <4>;
--	status = "okay";
--};
--
--&ohci1 {
--	status = "okay";
- };
- 
- &r_rsb {
-@@ -211,44 +135,3 @@
- 	vcc-ph-supply = <&reg_aldo1>;
- 	vcc-pi-supply = <&reg_aldo1>;
- };
--
--&spi0  {
--	status = "okay";
--	pinctrl-names = "default";
--	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
--
--	flash at 0 {
--		#address-cells = <1>;
--		#size-cells = <1>;
--		compatible = "jedec,spi-nor";
--		reg = <0>;
--		spi-max-frequency = <40000000>;
--	};
--};
--
--&uart0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&uart0_ph_pins>;
--	status = "okay";
--};
--
--&usbotg {
--	/*
--	 * PHY0 pins are connected to a USB-C socket, but a role switch
--	 * is not implemented: both CC pins are pulled to GND.
--	 * The VBUS pins power the device, so a fixed peripheral mode
--	 * is the best choice.
--	 * The board can be powered via GPIOs, in this case port0 *can*
--	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
--	 * then provided by the GPIOs. Any user of this setup would
--	 * need to adjust the DT accordingly: dr_mode set to "host",
--	 * enabling OHCI0 and EHCI0.
--	 */
--	dr_mode = "peripheral";
--	status = "okay";
--};
--
--&usbphy {
--	usb1_vbus-supply = <&reg_usb1_vbus>;
--	status = "okay";
--};
diff --git a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch b/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
deleted file mode 100644
index 4081a82d52..0000000000
--- a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From f1b3ddb3ecc2eec1f912383e01156c226daacfab Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Fri, 4 Aug 2023 18:08:56 +0100
-Subject: [PATCH] arm64: dts: allwinner: h616: Add OrangePi Zero 3 board
- support
-
-The OrangePi Zero 3 is a development board based on the Allwinner H618 SoC,
-which seems to be just an H616 with more L2 cache. The board itself is a
-slightly updated version of the Orange Pi Zero 2. It features:
-- Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU
-- 1/1.5/2/4 GiB LPDDR4 DRAM SKUs (only up to 1GB on the Zero2)
-- AXP313a PMIC (more capable AXP305 on the Zero2)
-- Raspberry-Pi-1 compatible GPIO header
-- extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports
-- 1 USB 2.0 host port
-- 1 USB 2.0 type C port (power supply + OTG)
-- MicroSD slot
-- on-board 16MiB bootable SPI NOR flash (only 2MB on the Zero2)
-- 1Gbps Ethernet port (via Motorcomm YT8531 PHY) (RTL8211 on the Zero2)
-- micro-HDMI port
-- (yet) unsupported Allwinner WiFi/BT chip
-
-Add the devicetree file describing the currently supported features,
-namely LEDs, SD card, PMIC, SPI flash, USB. Ethernet seems unstable at
-the moment, though the basic functionality works.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20230804170856.1237202-4-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- arch/arm64/boot/dts/allwinner/Makefile        |  1 +
- .../allwinner/sun50i-h618-orangepi-zero3.dts  | 94 +++++++++++++++++++
- 2 files changed, 95 insertions(+)
- create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-
---- a/arch/arm64/boot/dts/allwinner/Makefile
-+++ b/arch/arm64/boot/dts/allwinner/Makefile
-@@ -40,3 +40,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-ta
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
-+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-@@ -0,0 +1,94 @@
-+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
-+/*
-+ * Copyright (C) 2023 Arm Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "sun50i-h616-orangepi-zero.dtsi"
-+
-+/ {
-+	model = "OrangePi Zero3";
-+	compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
-+};
-+
-+&emac0 {
-+	phy-supply = <&reg_dldo1>;
-+};
-+
-+&ext_rgmii_phy {
-+	motorcomm,clk-out-frequency-hz = <125000000>;
-+};
-+
-+&mmc0 {
-+	/*
-+	 * The schematic shows the card detect pin wired up to PF6, via an
-+	 * inverter, but it just doesn't work.
-+	 */
-+	broken-cd;
-+	vmmc-supply = <&reg_dldo1>;
-+};
-+
-+&r_i2c {
-+	status = "okay";
-+
-+	axp313: pmic at 36 {
-+		compatible = "x-powers,axp313a";
-+		reg = <0x36>;
-+		#interrupt-cells = <1>;
-+		interrupt-controller;
-+		interrupt-parent = <&pio>;
-+		interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>;	/* PC9 */
-+
-+		vin1-supply = <&reg_vcc5v>;
-+		vin2-supply = <&reg_vcc5v>;
-+		vin3-supply = <&reg_vcc5v>;
-+
-+		regulators {
-+			/* Supplies VCC-PLL, so needs to be always on. */
-+			reg_aldo1: aldo1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-name = "vcc1v8";
-+			};
-+
-+			/* Supplies VCC-IO, so needs to be always on. */
-+			reg_dldo1: dldo1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-name = "vcc3v3";
-+			};
-+
-+			reg_dcdc1: dcdc1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <810000>;
-+				regulator-max-microvolt = <990000>;
-+				regulator-name = "vdd-gpu-sys";
-+			};
-+
-+			reg_dcdc2: dcdc2 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <810000>;
-+				regulator-max-microvolt = <1100000>;
-+				regulator-name = "vdd-cpu";
-+			};
-+
-+			reg_dcdc3: dcdc3 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1100000>;
-+				regulator-max-microvolt = <1100000>;
-+				regulator-name = "vdd-dram";
-+			};
-+		};
-+	};
-+};
-+
-+&pio {
-+	vcc-pc-supply = <&reg_dldo1>;
-+	vcc-pf-supply = <&reg_dldo1>;
-+	vcc-pg-supply = <&reg_aldo1>;
-+	vcc-ph-supply = <&reg_dldo1>;
-+	vcc-pi-supply = <&reg_dldo1>;
-+};
diff --git a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch b/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
deleted file mode 100644
index a492eed551..0000000000
--- a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From b9622937d95809ef89904583191571a9fa326402 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sun, 29 Oct 2023 15:40:09 +0800
-Subject: [PATCH] arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
-
-The current emac setting is not suitable for Orange Pi Zero 3,
-move it back to Orange Pi Zero 2 DT. Also update phy mode and
-delay values for emac on Orange Pi Zero 3.
-With these changes, Ethernet now looks stable.
-
-Fixes: 322bf103204b ("arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT")
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20231029074009.7820-2-amadeus at jmu.edu.cn
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 3 ---
- arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 3 +++
- arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 2 ++
- 3 files changed, 5 insertions(+), 3 deletions(-)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-@@ -68,10 +68,7 @@
- &emac0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&ext_rgmii_pins>;
--	phy-mode = "rgmii";
- 	phy-handle = <&ext_rgmii_phy>;
--	allwinner,rx-delay-ps = <3100>;
--	allwinner,tx-delay-ps = <700>;
- 	status = "okay";
- };
- 
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -13,6 +13,9 @@
- };
- 
- &emac0 {
-+	allwinner,rx-delay-ps = <3100>;
-+	allwinner,tx-delay-ps = <700>;
-+	phy-mode = "rgmii";
- 	phy-supply = <&reg_dcdce>;
- };
- 
---- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-@@ -13,6 +13,8 @@
- };
- 
- &emac0 {
-+	allwinner,tx-delay-ps = <700>;
-+	phy-mode = "rgmii-rxid";
- 	phy-supply = <&reg_dldo1>;
- };
- 
diff --git a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch b/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
deleted file mode 100644
index ce8add18ab..0000000000
--- a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 951992797378a2177946400438f4d23c9fceae5b Mon Sep 17 00:00:00 2001
-From: Martin Botka <martin.botka at somainline.org>
-Date: Tue, 12 Sep 2023 14:25:13 +0200
-Subject: [PATCH] arm64: dts: allwinner: h616: Add SID controller node
-
-Add node for the H616 SID controller
-
-Signed-off-by: Martin Botka <martin.botka at somainline.org>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20230912-sid-h616-v3-2-ee18e1c5bbb5 at somainline.org
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-@@ -133,6 +133,13 @@
- 			#reset-cells = <1>;
- 		};
- 
-+		sid: efuse at 3006000 {
-+			compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";
-+			reg = <0x03006000 0x1000>;
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+		};
-+
- 		watchdog: watchdog at 30090a0 {
- 			compatible = "allwinner,sun50i-h616-wdt",
- 				     "allwinner,sun6i-a31-wdt";
diff --git a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch b/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
deleted file mode 100644
index 3453e2aa53..0000000000
--- a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 898d96c5464b69af44f6407c5de81ebc349d574b Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 19 Feb 2024 15:36:33 +0000
-Subject: [PATCH] soc: sunxi: sram: export register 0 for THS on H616
-
-The Allwinner H616 SoC contains a mysterious bit at register offset 0x0
-in the SRAM control block. If bit 16 is set (the reset value), the
-temperature readings of the THS are way off, leading to reports about
-200C, at normal ambient temperatures. Clearing this bits brings the
-reported values down to the expected values.
-The BSP code clears this bit in firmware (U-Boot), and has an explicit
-comment about this, but offers no real explanation.
-
-Experiments in U-Boot show that register 0x0 has no effect on the SRAM C
-visibility: all tested bit settings still allow full read and write
-access by the CPU to the whole of SRAM C. Only bit 24 of the register at
-offset 0x4 makes all of SRAM C inaccessible by the CPU. So modelling
-the THS switch functionality as an SRAM region would not reflect reality.
-
-Since we should not rely on firmware settings, allow other code (the THS
-driver) to access this register, by exporting it through the already
-existing regmap. This mimics what we already do for the LDO control and
-the EMAC register.
-
-To avoid concurrent accesses to the same register at the same time, by
-the SRAM switch code and the regmap code, use the same lock to protect
-the access. The regmap subsystem allows to use an existing lock, so we
-just need to hook in there.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
----
- drivers/soc/sunxi/sunxi_sram.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
---- a/drivers/soc/sunxi/sunxi_sram.c
-+++ b/drivers/soc/sunxi/sunxi_sram.c
-@@ -284,6 +284,7 @@ EXPORT_SYMBOL(sunxi_sram_release);
- struct sunxi_sramc_variant {
- 	int num_emac_clocks;
- 	bool has_ldo_ctrl;
-+	bool has_ths_offset;
- };
- 
- static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = {
-@@ -305,8 +306,10 @@ static const struct sunxi_sramc_variant
- 
- static const struct sunxi_sramc_variant sun50i_h616_sramc_variant = {
- 	.num_emac_clocks = 2,
-+	.has_ths_offset = true,
- };
- 
-+#define SUNXI_SRAM_THS_OFFSET_REG	0x0
- #define SUNXI_SRAM_EMAC_CLOCK_REG	0x30
- #define SUNXI_SYS_LDO_CTRL_REG		0x150
- 
-@@ -315,6 +318,8 @@ static bool sunxi_sram_regmap_accessible
- {
- 	const struct sunxi_sramc_variant *variant = dev_get_drvdata(dev);
- 
-+	if (reg == SUNXI_SRAM_THS_OFFSET_REG && variant->has_ths_offset)
-+		return true;
- 	if (reg >= SUNXI_SRAM_EMAC_CLOCK_REG &&
- 	    reg <  SUNXI_SRAM_EMAC_CLOCK_REG + variant->num_emac_clocks * 4)
- 		return true;
-@@ -324,6 +329,20 @@ static bool sunxi_sram_regmap_accessible
- 	return false;
- }
- 
-+static void sunxi_sram_lock(void *_lock)
-+{
-+	spinlock_t *lock = _lock;
-+
-+	spin_lock(lock);
-+}
-+
-+static void sunxi_sram_unlock(void *_lock)
-+{
-+	spinlock_t *lock = _lock;
-+
-+	spin_unlock(lock);
-+}
-+
- static struct regmap_config sunxi_sram_regmap_config = {
- 	.reg_bits       = 32,
- 	.val_bits       = 32,
-@@ -333,6 +352,9 @@ static struct regmap_config sunxi_sram_r
- 	/* other devices have no business accessing other registers */
- 	.readable_reg	= sunxi_sram_regmap_accessible_reg,
- 	.writeable_reg	= sunxi_sram_regmap_accessible_reg,
-+	.lock		= sunxi_sram_lock,
-+	.unlock		= sunxi_sram_unlock,
-+	.lock_arg	= &sram_lock,
- };
- 
- static int __init sunxi_sram_probe(struct platform_device *pdev)
diff --git a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch b/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
deleted file mode 100644
index 8b19989118..0000000000
--- a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From ebbf19e36d021f253425344b4d4b987f3b7d9be5 Mon Sep 17 00:00:00 2001
-From: Maxim Kiselev <bigunclemax at gmail.com>
-Date: Mon, 18 Dec 2023 00:06:23 +0300
-Subject: [PATCH] thermal/drivers/sun8i: Add D1/T113s THS controller support
-
-This patch adds a thermal sensor controller support for the D1/T113s,
-which is similar to the one on H6, but with only one sensor and
-different scale and offset values.
-
-Signed-off-by: Maxim Kiselev <bigunclemax at gmail.com>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Reviewed-by: Andre Przywara <andre.przywara at arm.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax at gmail.com
----
- drivers/thermal/sun8i_thermal.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -610,6 +610,18 @@ static const struct ths_thermal_chip sun
- 	.calc_temp = sun8i_ths_calc_temp,
- };
- 
-+static const struct ths_thermal_chip sun20i_d1_ths = {
-+	.sensor_num = 1,
-+	.has_bus_clk_reset = true,
-+	.offset = 188552,
-+	.scale = 673,
-+	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
-+	.calibrate = sun50i_h6_ths_calibrate,
-+	.init = sun50i_h6_thermal_init,
-+	.irq_ack = sun50i_h6_irq_ack,
-+	.calc_temp = sun8i_ths_calc_temp,
-+};
-+
- static const struct of_device_id of_ths_match[] = {
- 	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
- 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
-@@ -618,6 +630,7 @@ static const struct of_device_id of_ths_
- 	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
- 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
- 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
-+	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
- 	{ /* sentinel */ },
- };
- MODULE_DEVICE_TABLE(of, of_ths_match);
diff --git a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch b/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
deleted file mode 100644
index b8138a3870..0000000000
--- a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 14f118aa50fe7c7c7330f56d007ecacca487cea8 Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 19 Feb 2024 15:36:35 +0000
-Subject: [PATCH] thermal/drivers/sun8i: Explain unknown H6 register value
-
-So far we were ORing in some "unknown" value into the THS control
-register on the Allwinner H6. This part of the register is not explained
-in the H6 manual, but the H616 manual details those bits, and on closer
-inspection the THS IP blocks in both SoCs seem very close:
-- The BSP code for both SoCs writes the same values into THS_CTRL.
-- The reset values of at least the first three registers are the same.
-
-Replace the "unknown" value with its proper meaning: "acquire time",
-most probably the sample part of the sample & hold circuit of the ADC,
-according to its explanation in the H616 manual.
-
-No functional change, just a macro rename and adjustment.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240219153639.179814-4-andre.przywara at arm.com
----
- drivers/thermal/sun8i_thermal.c | 29 ++++++++++++++++-------------
- 1 file changed, 16 insertions(+), 13 deletions(-)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -50,7 +50,8 @@
- #define SUN8I_THS_CTRL2_T_ACQ1(x)		((GENMASK(15, 0) & (x)) << 16)
- #define SUN8I_THS_DATA_IRQ_STS(x)		BIT(x + 8)
- 
--#define SUN50I_THS_CTRL0_T_ACQ(x)		((GENMASK(15, 0) & (x)) << 16)
-+#define SUN50I_THS_CTRL0_T_ACQ(x)		(GENMASK(15, 0) & ((x) - 1))
-+#define SUN50I_THS_CTRL0_T_SAMPLE_PER(x)	((GENMASK(15, 0) & ((x) - 1)) << 16)
- #define SUN50I_THS_FILTER_EN			BIT(2)
- #define SUN50I_THS_FILTER_TYPE(x)		(GENMASK(1, 0) & (x))
- #define SUN50I_H6_THS_PC_TEMP_PERIOD(x)		((GENMASK(19, 0) & (x)) << 12)
-@@ -410,25 +411,27 @@ static int sun8i_h3_thermal_init(struct
- 	return 0;
- }
- 
--/*
-- * Without this undocumented value, the returned temperatures would
-- * be higher than real ones by about 20C.
-- */
--#define SUN50I_H6_CTRL0_UNK 0x0000002f
--
- static int sun50i_h6_thermal_init(struct ths_device *tmdev)
- {
- 	int val;
- 
- 	/*
--	 * T_acq = 20us
--	 * clkin = 24MHz
--	 *
--	 * x = T_acq * clkin - 1
--	 *   = 479
-+	 * The manual recommends an overall sample frequency of 50 KHz (20us,
-+	 * 480 cycles at 24 MHz), which provides plenty of time for both the
-+	 * acquisition time (>24 cycles) and the actual conversion time
-+	 * (>14 cycles).
-+	 * The lower half of the CTRL register holds the "acquire time", in
-+	 * clock cycles, which the manual recommends to be 2us:
-+	 * 24MHz * 2us = 48 cycles.
-+	 * The high half of THS_CTRL encodes the sample frequency, in clock
-+	 * cycles: 24MHz * 20us = 480 cycles.
-+	 * This is explained in the H616 manual, but apparently wrongly
-+	 * described in the H6 manual, although the BSP code does the same
-+	 * for both SoCs.
- 	 */
- 	regmap_write(tmdev->regmap, SUN50I_THS_CTRL0,
--		     SUN50I_H6_CTRL0_UNK | SUN50I_THS_CTRL0_T_ACQ(479));
-+		     SUN50I_THS_CTRL0_T_ACQ(48) |
-+		     SUN50I_THS_CTRL0_T_SAMPLE_PER(480));
- 	/* average over 4 samples */
- 	regmap_write(tmdev->regmap, SUN50I_H6_THS_MFC,
- 		     SUN50I_THS_FILTER_EN |
diff --git a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch b/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
deleted file mode 100644
index 3d01a507fa..0000000000
--- a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 6c04a419a4c5fb18edefc44dd676fb95c7f6c55d Mon Sep 17 00:00:00 2001
-From: Maksim Kiselev <bigunclemax at gmail.com>
-Date: Mon, 19 Feb 2024 15:36:36 +0000
-Subject: [PATCH] thermal/drivers/sun8i: Extend H6 calibration to support 4
- sensors
-
-The H616 SoC resembles the H6 thermal sensor controller, with a few
-changes like four sensors.
-
-Extend sun50i_h6_ths_calibrate() function to support calibration of
-these sensors.
-
-Co-developed-by: Martin Botka <martin.botka at somainline.org>
-Signed-off-by: Martin Botka <martin.botka at somainline.org>
-Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>
-Reviewed-by: Andre Przywara <andre.przywara at arm.com>
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240219153639.179814-5-andre.przywara at arm.com
----
- drivers/thermal/sun8i_thermal.c | 28 ++++++++++++++++++++--------
- 1 file changed, 20 insertions(+), 8 deletions(-)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -224,16 +224,21 @@ static int sun50i_h6_ths_calibrate(struc
- 	struct device *dev = tmdev->dev;
- 	int i, ft_temp;
- 
--	if (!caldata[0] || callen < 2 + 2 * tmdev->chip->sensor_num)
-+	if (!caldata[0])
- 		return -EINVAL;
- 
- 	/*
- 	 * efuse layout:
- 	 *
--	 *	0   11  16	 32
--	 *	+-------+-------+-------+
--	 *	|temp|  |sensor0|sensor1|
--	 *	+-------+-------+-------+
-+	 * 0      11  16     27   32     43   48    57
-+	 * +----------+-----------+-----------+-----------+
-+	 * |  temp |  |sensor0|   |sensor1|   |sensor2|   |
-+	 * +----------+-----------+-----------+-----------+
-+	 *                      ^           ^           ^
-+	 *                      |           |           |
-+	 *                      |           |           sensor3[11:8]
-+	 *                      |           sensor3[7:4]
-+	 *                      sensor3[3:0]
- 	 *
- 	 * The calibration data on the H6 is the ambient temperature and
- 	 * sensor values that are filled during the factory test stage.
-@@ -246,9 +251,16 @@ static int sun50i_h6_ths_calibrate(struc
- 	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
- 
- 	for (i = 0; i < tmdev->chip->sensor_num; i++) {
--		int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
--		int cdata, offset;
--		int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
-+		int sensor_reg, sensor_temp, cdata, offset;
-+
-+		if (i == 3)
-+			sensor_reg = (caldata[1] >> 12)
-+				     | ((caldata[2] >> 12) << 4)
-+				     | ((caldata[3] >> 12) << 8);
-+		else
-+			sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
-+
-+		sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
- 
- 		/*
- 		 * Calibration data is CALIBRATE_DEFAULT - (calculated
diff --git a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch b/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
deleted file mode 100644
index 6db1e32cfb..0000000000
--- a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From f8b54d1120b81ed57bed96cc8e814ba08886d1e5 Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 19 Feb 2024 15:36:37 +0000
-Subject: [PATCH] thermal/drivers/sun8i: Add SRAM register access code
-
-The Allwinner H616 SoC needs to clear a bit in one register in the SRAM
-controller, to report reasonable temperature values. On reset, bit 16 in
-register 0x3000000 is set, which leads to the driver reporting
-temperatures around 200C. Clearing this bit brings the values down to the
-expected range. The BSP code does a one-time write in U-Boot, with a
-comment just mentioning the effect on the THS, but offering no further
-explanation.
-
-To not rely on firmware to set things up for us, add code that queries
-the SRAM controller device via a DT phandle link, then clear just this
-single bit.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240219153639.179814-6-andre.przywara at arm.com
----
- drivers/thermal/sun8i_thermal.c | 51 +++++++++++++++++++++++++++++++++
- 1 file changed, 51 insertions(+)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -15,6 +15,7 @@
- #include <linux/module.h>
- #include <linux/nvmem-consumer.h>
- #include <linux/of_device.h>
-+#include <linux/of_platform.h>
- #include <linux/platform_device.h>
- #include <linux/regmap.h>
- #include <linux/reset.h>
-@@ -68,6 +69,7 @@ struct tsensor {
- struct ths_thermal_chip {
- 	bool            has_mod_clk;
- 	bool            has_bus_clk_reset;
-+	bool		needs_sram;
- 	int		sensor_num;
- 	int		offset;
- 	int		scale;
-@@ -85,12 +87,16 @@ struct ths_device {
- 	const struct ths_thermal_chip		*chip;
- 	struct device				*dev;
- 	struct regmap				*regmap;
-+	struct regmap_field			*sram_regmap_field;
- 	struct reset_control			*reset;
- 	struct clk				*bus_clk;
- 	struct clk                              *mod_clk;
- 	struct tsensor				sensor[MAX_SENSOR_NUM];
- };
- 
-+/* The H616 needs to have a bit 16 in the SRAM control register cleared. */
-+static const struct reg_field sun8i_ths_sram_reg_field = REG_FIELD(0x0, 16, 16);
-+
- /* Temp Unit: millidegree Celsius */
- static int sun8i_ths_calc_temp(struct ths_device *tmdev,
- 			       int id, int reg)
-@@ -337,6 +343,34 @@ static void sun8i_ths_reset_control_asse
- 	reset_control_assert(data);
- }
- 
-+static struct regmap *sun8i_ths_get_sram_regmap(struct device_node *node)
-+{
-+	struct device_node *sram_node;
-+	struct platform_device *sram_pdev;
-+	struct regmap *regmap = NULL;
-+
-+	sram_node = of_parse_phandle(node, "allwinner,sram", 0);
-+	if (!sram_node)
-+		return ERR_PTR(-ENODEV);
-+
-+	sram_pdev = of_find_device_by_node(sram_node);
-+	if (!sram_pdev) {
-+		/* platform device might not be probed yet */
-+		regmap = ERR_PTR(-EPROBE_DEFER);
-+		goto out_put_node;
-+	}
-+
-+	/* If no regmap is found then the other device driver is at fault */
-+	regmap = dev_get_regmap(&sram_pdev->dev, NULL);
-+	if (!regmap)
-+		regmap = ERR_PTR(-EINVAL);
-+
-+	platform_device_put(sram_pdev);
-+out_put_node:
-+	of_node_put(sram_node);
-+	return regmap;
-+}
-+
- static int sun8i_ths_resource_init(struct ths_device *tmdev)
- {
- 	struct device *dev = tmdev->dev;
-@@ -381,6 +415,19 @@ static int sun8i_ths_resource_init(struc
- 	if (ret)
- 		return ret;
- 
-+	if (tmdev->chip->needs_sram) {
-+		struct regmap *regmap;
-+
-+		regmap = sun8i_ths_get_sram_regmap(dev->of_node);
-+		if (IS_ERR(regmap))
-+			return PTR_ERR(regmap);
-+		tmdev->sram_regmap_field = devm_regmap_field_alloc(dev,
-+						      regmap,
-+						      sun8i_ths_sram_reg_field);
-+		if (IS_ERR(tmdev->sram_regmap_field))
-+			return PTR_ERR(tmdev->sram_regmap_field);
-+	}
-+
- 	ret = sun8i_ths_calibrate(tmdev);
- 	if (ret)
- 		return ret;
-@@ -427,6 +474,10 @@ static int sun50i_h6_thermal_init(struct
- {
- 	int val;
- 
-+	/* The H616 needs to have a bit in the SRAM control register cleared. */
-+	if (tmdev->sram_regmap_field)
-+		regmap_field_write(tmdev->sram_regmap_field, 0);
-+
- 	/*
- 	 * The manual recommends an overall sample frequency of 50 KHz (20us,
- 	 * 480 cycles at 24 MHz), which provides plenty of time for both the
diff --git a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch b/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
deleted file mode 100644
index e743d344c6..0000000000
--- a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From e7dbfa19572a1440a2e67ef70f94ff204849a0a8 Mon Sep 17 00:00:00 2001
-From: Martin Botka <martin.botka at somainline.org>
-Date: Mon, 19 Feb 2024 15:36:38 +0000
-Subject: [PATCH] thermal/drivers/sun8i: Add support for H616 THS controller
-
-Add support for the thermal sensor found in H616 SoCs, is the same as
-the H6 thermal sensor controller, but with four sensors.
-Also the registers readings are wrong, unless a bit in the first SYS_CFG
-register cleared, so set exercise the SRAM regmap to take care of that.
-
-Signed-off-by: Martin Botka <martin.botka at somainline.org>
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240219153639.179814-7-andre.przywara at arm.com
----
- drivers/thermal/sun8i_thermal.c | 15 +++++++++++++++
- 1 file changed, 15 insertions(+)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -688,6 +688,20 @@ static const struct ths_thermal_chip sun
- 	.calc_temp = sun8i_ths_calc_temp,
- };
- 
-+static const struct ths_thermal_chip sun50i_h616_ths = {
-+	.sensor_num = 4,
-+	.has_bus_clk_reset = true,
-+	.needs_sram = true,
-+	.ft_deviation = 8000,
-+	.offset = 263655,
-+	.scale = 810,
-+	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
-+	.calibrate = sun50i_h6_ths_calibrate,
-+	.init = sun50i_h6_thermal_init,
-+	.irq_ack = sun50i_h6_irq_ack,
-+	.calc_temp = sun8i_ths_calc_temp,
-+};
-+
- static const struct of_device_id of_ths_match[] = {
- 	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
- 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
-@@ -697,6 +711,7 @@ static const struct of_device_id of_ths_
- 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
- 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
- 	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
-+	{ .compatible = "allwinner,sun50i-h616-ths", .data = &sun50i_h616_ths },
- 	{ /* sentinel */ },
- };
- MODULE_DEVICE_TABLE(of, of_ths_match);
diff --git a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch b/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
deleted file mode 100644
index 384bf55084..0000000000
--- a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 9ac53d5532cc4bb595bbee86ccba2172ccc336c3 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie at kernel.org>
-Date: Tue, 23 Jan 2024 23:33:07 +0000
-Subject: [PATCH] thermal/drivers/sun8i: Don't fail probe due to zone
- registration failure
-
-Currently the sun8i thermal driver will fail to probe if any of the
-thermal zones it is registering fails to register with the thermal core.
-Since we currently do not define any trip points for the GPU thermal
-zones on at least A64 or H5 this means that we have no thermal support
-on these platforms:
-
-[    1.698703] thermal_sys: Failed to find 'trips' node
-[    1.698707] thermal_sys: Failed to find trip points for thermal-sensor id=1
-
-even though the main CPU thermal zone on both SoCs is fully configured.
-This does not seem ideal, while we may not be able to use all the zones
-it seems better to have those zones which are usable be operational.
-Instead just carry on registering zones if we get any non-deferral
-error, allowing use of those zones which are usable.
-
-This means that we also need to update the interrupt handler to not
-attempt to notify the core for events on zones which we have not
-registered, I didn't see an ability to mask individual interrupts and
-I would expect that interrupts would still be indicated in the ISR even
-if they were masked.
-
-Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Signed-off-by: Mark Brown <broonie at kernel.org>
-Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
-Link: https://lore.kernel.org/r/20240123-thermal-sun8i-registration-v3-1-3e5771b1bbdd at kernel.org
----
- drivers/thermal/sun8i_thermal.c | 16 ++++++++++++++--
- 1 file changed, 14 insertions(+), 2 deletions(-)
-
---- a/drivers/thermal/sun8i_thermal.c
-+++ b/drivers/thermal/sun8i_thermal.c
-@@ -197,6 +197,9 @@ static irqreturn_t sun8i_irq_thread(int
- 	int i;
- 
- 	for_each_set_bit(i, &irq_bitmap, tmdev->chip->sensor_num) {
-+		/* We allow some zones to not register. */
-+		if (IS_ERR(tmdev->sensor[i].tzd))
-+			continue;
- 		thermal_zone_device_update(tmdev->sensor[i].tzd,
- 					   THERMAL_EVENT_UNSPECIFIED);
- 	}
-@@ -531,8 +534,17 @@ static int sun8i_ths_register(struct ths
- 						      i,
- 						      &tmdev->sensor[i],
- 						      &ths_ops);
--		if (IS_ERR(tmdev->sensor[i].tzd))
--			return PTR_ERR(tmdev->sensor[i].tzd);
-+
-+		/*
-+		 * If an individual zone fails to register for reasons
-+		 * other than probe deferral (eg, a bad DT) then carry
-+		 * on, other zones might register successfully.
-+		 */
-+		if (IS_ERR(tmdev->sensor[i].tzd)) {
-+			if (PTR_ERR(tmdev->sensor[i].tzd) == -EPROBE_DEFER)
-+				return PTR_ERR(tmdev->sensor[i].tzd);
-+			continue;
-+		}
- 
- 		if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd))
- 			dev_warn(tmdev->dev,
diff --git a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch b/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
deleted file mode 100644
index cd6542bf14..0000000000
--- a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From f4318af40544b8e7ff5a6b667ede60e6cf808262 Mon Sep 17 00:00:00 2001
-From: Martin Botka <martin.botka at somainline.org>
-Date: Mon, 19 Feb 2024 15:36:39 +0000
-Subject: [PATCH] arm64: dts: allwinner: h616: Add thermal sensor and zones
-
-There are four thermal sensors:
-- CPU
-- GPU
-- VE
-- DRAM
-
-Add the thermal sensor configuration and the thermal zones.
-
-Signed-off-by: Martin Botka <martin.botka at somainline.org>
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20240219153639.179814-8-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 88 +++++++++++++++++++
- 1 file changed, 88 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-@@ -9,6 +9,7 @@
- #include <dt-bindings/clock/sun6i-rtc.h>
- #include <dt-bindings/reset/sun50i-h616-ccu.h>
- #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
-+#include <dt-bindings/thermal/thermal.h>
- 
- / {
- 	interrupt-parent = <&gic>;
-@@ -138,6 +139,10 @@
- 			reg = <0x03006000 0x1000>;
- 			#address-cells = <1>;
- 			#size-cells = <1>;
-+
-+			ths_calibration: thermal-sensor-calibration at 14 {
-+				reg = <0x14 0x8>;
-+			};
- 		};
- 
- 		watchdog: watchdog at 30090a0 {
-@@ -511,6 +516,19 @@
- 			};
- 		};
- 
-+		ths: thermal-sensor at 5070400 {
-+			compatible = "allwinner,sun50i-h616-ths";
-+			reg = <0x05070400 0x400>;
-+			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_THS>;
-+			clock-names = "bus";
-+			resets = <&ccu RST_BUS_THS>;
-+			nvmem-cells = <&ths_calibration>;
-+			nvmem-cell-names = "calibration";
-+			allwinner,sram = <&syscon>;
-+			#thermal-sensor-cells = <1>;
-+		};
-+
- 		usbotg: usb at 5100000 {
- 			compatible = "allwinner,sun50i-h616-musb",
- 				     "allwinner,sun8i-h3-musb";
-@@ -755,4 +773,74 @@
- 			#size-cells = <0>;
- 		};
- 	};
-+
-+	thermal-zones {
-+		cpu-thermal {
-+			polling-delay-passive = <500>;
-+			polling-delay = <1000>;
-+			thermal-sensors = <&ths 2>;
-+			sustainable-power = <1000>;
-+
-+			trips {
-+				cpu_threshold: cpu-trip-0 {
-+					temperature = <60000>;
-+					type = "passive";
-+					hysteresis = <0>;
-+				};
-+				cpu_target: cpu-trip-1 {
-+					temperature = <70000>;
-+					type = "passive";
-+					hysteresis = <0>;
-+				};
-+				cpu_critical: cpu-trip-2 {
-+					temperature = <110000>;
-+					type = "critical";
-+					hysteresis = <0>;
-+				};
-+			};
-+		};
-+
-+		gpu-thermal {
-+			polling-delay-passive = <500>;
-+			polling-delay = <1000>;
-+			thermal-sensors = <&ths 0>;
-+			sustainable-power = <1100>;
-+
-+			trips {
-+				gpu_temp_critical: gpu-trip-0 {
-+					temperature = <110000>;
-+					type = "critical";
-+					hysteresis = <0>;
-+				};
-+			};
-+		};
-+
-+		ve-thermal {
-+			polling-delay-passive = <0>;
-+			polling-delay = <0>;
-+			thermal-sensors = <&ths 1>;
-+
-+			trips {
-+				ve_temp_critical: ve-trip-0 {
-+					temperature = <110000>;
-+					type = "critical";
-+					hysteresis = <0>;
-+				};
-+			};
-+		};
-+
-+		ddr-thermal {
-+			polling-delay-passive = <0>;
-+			polling-delay = <0>;
-+			thermal-sensors = <&ths 3>;
-+
-+			trips {
-+				ddr_temp_critical: ddr-trip-0 {
-+					temperature = <110000>;
-+					type = "critical";
-+					hysteresis = <0>;
-+				};
-+			};
-+		};
-+	};
- };
diff --git a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch b/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
deleted file mode 100644
index 30c98aa737..0000000000
--- a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From a896bc1d79e3c00f0aacfe225499d811775616f3 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sun, 10 Oct 2021 21:50:17 +0800
-Subject: [PATCH] arm64: allwinner: add OF node for USB eth on NanoPi R1S H5
-
-This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
-NanoPi R1S H5. Add the correct value for the RTL8153 LED configuration
-register to match the blink behavior of the other port on the device.
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
----
- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
-@@ -116,6 +116,13 @@
- 
- &ehci1 {
- 	status = "okay";
-+
-+	usb-eth at 1 {
-+		compatible = "realtek,rtl8153";
-+		reg = <1>;
-+
-+		realtek,led-data = <0x78>;
-+	};
- };
- 
- &ehci2 {
diff --git a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch b/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch
deleted file mode 100644
index 2c5ccd7d96..0000000000
--- a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
-@@ -59,7 +59,7 @@
- 
- 		key-sw4 {
- 			label = "sw4";
--			linux,code = <BTN_0>;
-+			linux,code = <KEY_POWER>;
- 			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
- 			wakeup-source;
- 		};
-@@ -220,7 +220,7 @@
- };
- 
- &usb_otg {
--	dr_mode = "otg";
-+	dr_mode = "host";
- 	status = "okay";
- };
- 
diff --git a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch b/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
deleted file mode 100644
index a8dfcd9dbc..0000000000
--- a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 7d87d3dafc4b1ea5659eb71ee6c5fd5308490d1f Mon Sep 17 00:00:00 2001
-From: Oskari Lemmela <oskari at lemmela.net>
-Date: Mon, 31 Dec 2018 07:44:49 +0200
-Subject: [PATCH] arm64: allwinner: a64-sopine: Add Sopine flash partitions.
-
-First 896kB to u-boot. Enough space for SPL, u-boot and ATF.
-Next 128kB to u-boot environment and rest to firmware.
-
-Firmware partition is compatible FIT image dynamic splitting.
-
-Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
----
- .../boot/dts/allwinner/sun50i-a64-sopine.dtsi | 22 +++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
-@@ -58,6 +58,28 @@
- 		compatible = "jedec,spi-nor";
- 		reg = <0>;
- 		spi-max-frequency = <40000000>;
-+
-+		partitions {
-+			compatible = "fixed-partitions";
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			partition at 0 {
-+				label = "u-boot";
-+				reg = <0x000000 0x0E0000>;
-+			};
-+
-+			partition at e0000 {
-+				label = "u-boot-env";
-+				reg = <0x0E0000 0x020000>;
-+			};
-+
-+			partition at 100000 {
-+				compatible = "denx,fit";
-+				label = "firmware";
-+				reg = <0x100000 0xF00000>;
-+			};
-+		};
- 	};
- };
- 
diff --git a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch b/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch
deleted file mode 100644
index 5b8dd170c5..0000000000
--- a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch
+++ /dev/null
@@ -1,292 +0,0 @@
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -1352,6 +1352,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
- 	sun8i-a83t-cubietruck-plus.dtb \
- 	sun8i-a83t-tbs-a711.dtb \
- 	sun8i-h2-plus-bananapi-m2-zero.dtb \
-+	sun8i-h2-plus-bananapi-p2-zero.dtb \
- 	sun8i-h2-plus-libretech-all-h3-cc.dtb \
- 	sun8i-h2-plus-orangepi-r1.dtb \
- 	sun8i-h2-plus-orangepi-zero.dtb \
---- /dev/null
-+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-p2-zero.dts
-@@ -0,0 +1,279 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (C) 2023 Zoltan HERPAI <wigyori at uid0.hu>
-+ *
-+ * Based on sun8i-h2-plus-bananapi-m2-zero.dts, which is:
-+ *   Copyright (C) 2017 Icenowy Zheng <icenowy at aosc.io>
-+ */
-+
-+/dts-v1/;
-+#include "sun8i-h3.dtsi"
-+#include "sunxi-common-regulators.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+
-+/ {
-+	model = "Banana Pi BPI-P2-Zero";
-+	compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus";
-+
-+	aliases {
-+		serial0 = &uart0;
-+		serial1 = &uart1;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	connector {
-+		compatible = "hdmi-connector";
-+		type = "c";
-+
-+		port {
-+			hdmi_con_in: endpoint {
-+				remote-endpoint = <&hdmi_out_con>;
-+			};
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		pwr_led {
-+			label = "bananapi-p2-zero:red:pwr";
-+			gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
-+			default-state = "on";
-+		};
-+	};
-+
-+	gpio_keys {
-+		compatible = "gpio-keys";
-+
-+		sw4 {
-+			label = "power";
-+			linux,code = <BTN_0>;
-+			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+
-+	reg_vdd_cpux: vdd-cpux-regulator {
-+		compatible = "regulator-gpio";
-+		regulator-name = "vdd-cpux";
-+		regulator-type = "voltage";
-+		regulator-boot-on;
-+		regulator-always-on;
-+		regulator-min-microvolt = <1100000>;
-+		regulator-max-microvolt = <1300000>;
-+		regulator-ramp-delay = <50>; /* 4ms */
-+
-+		gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
-+		enable-active-high;
-+		gpios-states = <0x1>;
-+		states = <1100000 0>, <1300000 1>;
-+	};
-+
-+	reg_vcc_dram: vcc-dram {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc-dram";
-+		regulator-min-microvolt = <1500000>;
-+		regulator-max-microvolt = <1500000>;
-+		regulator-always-on;
-+		regulator-boot-on;
-+		enable-active-high;
-+		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
-+		vin-supply = <&reg_vcc5v0>;
-+	};
-+
-+	reg_vcc1v2: vcc1v2 {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc1v2";
-+		regulator-min-microvolt = <1200000>;
-+		regulator-max-microvolt = <1200000>;
-+		regulator-always-on;
-+		regulator-boot-on;
-+		enable-active-high;
-+		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
-+		vin-supply = <&reg_vcc5v0>;
-+	};
-+
-+	poweroff {
-+		compatible = "regulator-poweroff";
-+		cpu-supply = <&reg_vcc1v2>;
-+	};
-+
-+	wifi_pwrseq: wifi_pwrseq {
-+		compatible = "mmc-pwrseq-simple";
-+		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
-+		clocks = <&rtc 1>;
-+		clock-names = "ext_clock";
-+	};
-+};
-+
-+&cpu0 {
-+	cpu-supply = <&reg_vdd_cpux>;
-+};
-+
-+&de {
-+	status = "okay";
-+};
-+
-+&ehci0 {
-+	status = "okay";
-+};
-+
-+&emac {
-+	phy-handle = <&int_mii_phy>;
-+	phy-mode = "mii";
-+	allwinner,leds-active-low;
-+	status = "okay";
-+};
-+
-+&hdmi {
-+	status = "okay";
-+};
-+
-+&hdmi_out {
-+	hdmi_out_con: endpoint {
-+		remote-endpoint = <&hdmi_con_in>;
-+	};
-+};
-+
-+&mmc0 {
-+	vmmc-supply = <&reg_vcc3v3>;
-+	bus-width = <4>;
-+	/*
-+	 * On the production batch of this board the card detect GPIO is
-+	 * high active (card inserted), although on the early samples it's
-+	 * low active.
-+	 */
-+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
-+	status = "okay";
-+};
-+
-+&mmc1 {
-+	vmmc-supply = <&reg_vcc3v3>;
-+	vqmmc-supply = <&reg_vcc3v3>;
-+	mmc-pwrseq = <&wifi_pwrseq>;
-+	bus-width = <4>;
-+	non-removable;
-+	status = "okay";
-+
-+	brcmf: wifi at 1 {
-+		reg = <1>;
-+		compatible = "brcm,bcm4329-fmac";
-+		interrupt-parent = <&pio>;
-+		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
-+		interrupt-names = "host-wake";
-+	};
-+};
-+
-+&ohci0 {
-+	status = "okay";
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_pa_pins>;
-+	status = "okay";
-+};
-+
-+&uart1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
-+	uart-has-rtscts;
-+	status = "okay";
-+
-+	bluetooth {
-+		compatible = "brcm,bcm43438-bt";
-+		max-speed = <1500000>;
-+		clocks = <&rtc 1>;
-+		clock-names = "lpo";
-+		vbat-supply = <&reg_vcc3v3>;
-+		vddio-supply = <&reg_vcc3v3>;
-+		device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
-+		host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
-+		shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
-+	};
-+
-+};
-+
-+&pio {
-+	gpio-line-names =
-+		/* PA */
-+		"CON2-P13", "CON2-P11", "CON2-P22", "CON2-P15",
-+			"CON3-P03", "CON3-P02", "CON2-P07", "CON2-P29",
-+		"CON2-P31", "CON2-P33", "CON2-P35", "CON2-P05",
-+			"CON2-P03", "CON2-P08", "CON2-P10", "CON2-P16",
-+		"CON2-P12", "CON2-P37", "CON2-P28", "CON2-P27",
-+			"CON2-P40", "CON2-P38", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PB */
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PC */
-+		"CON2-P19", "CON2-P21", "CON2-P23", "CON2-P24",
-+			"CON2-P18", "", "", "CON2-P26",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PD */
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "CSI-PWR-EN", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PE */
-+		"CN3-P17", "CN3-P13", "CN3-P09", "CN3-P07",
-+			"CN3-P19", "CN3-P21", "CN3-P22", "CN3-P20",
-+		"CN3-P18", "CN3-P16", "CN3-P14", "CN3-P12",
-+			"CN3-P05", "CN3-P03", "CN3-P06", "CN3-P08",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PF */
-+		"SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3",
-+			"SDC0-D2", "SDC0-DET", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+
-+		/* PG */
-+		"WL-SDIO-CLK", "WL-SDIO-CMD", "WL-SDIO-D0", "WL-SDIO-D1",
-+			"WL-SDIO-D2", "WL-SDIO-D3", "BT-UART-TX", "BT-UART-RX",
-+		"BT-UART-RTS", "BT-UART-CTS", "WL-WAKE-AP", "BT-WAKE-AP",
-+			"BT-RST-N", "AP-WAKE-BT", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "";
-+};
-+
-+&r_pio {
-+	gpio-line-names =
-+		/* PL */
-+		"", "CPUX-SET", "CON2-P32", "POWER-KEY", "CON2-P36",
-+			"VCC-IO-EN", "USB0-ID", "WL-PWR-EN",
-+		"PWR-STB", "PWR-DRAM", "PWR-LED", "IR-RX", "", "", "", "",
-+		"", "", "", "", "", "", "", "",
-+		"", "", "", "", "", "", "", "";
-+};
-+
-+&usb_otg {
-+	dr_mode = "otg";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
-+	/*
-+	 * There're two micro-USB connectors, one is power-only and another is
-+	 * OTG. The Vbus of these two connectors are connected together, so
-+	 * the external USB device will be powered just by the power input
-+	 * from the power-only USB port.
-+	 */
-+	status = "okay";
-+};
diff --git a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch b/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
deleted file mode 100644
index 68ec333e37..0000000000
--- a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz at true.cz>
-Date: Thu, 26 Mar 2020 10:09:19 +0100
-Subject: [PATCH] arm64: dts: allwinner: a64: olinuxino: add status LED aliases
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Petr ?tetiar <ynezz at true.cz>
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
-@@ -15,6 +15,10 @@
- 	aliases {
- 		ethernet0 = &emac;
- 		serial0 = &uart0;
-+		led-boot = &led_user;
-+		led-failsafe = &led_user;
-+		led-running = &led_user;
-+		led-upgrade = &led_user;
- 	};
- 
- 	chosen {
-@@ -35,7 +39,7 @@
- 	leds {
- 		compatible = "gpio-leds";
- 
--		led-0 {
-+		led_user: led-0 {
- 			label = "a64-olinuxino:red:user";
- 			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
- 		};
diff --git a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch b/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
deleted file mode 100644
index 8670d06109..0000000000
--- a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1845163a052efac124f00656eb72f38947630a42 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sun, 10 Oct 2021 21:50:18 +0800
-Subject: [PATCH] arm64: dts: allwinner: NanoPi R1S H5: add status LED aliases
-
-Use the SYS LED on the casing for showing system status.
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
----
- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
-@@ -23,6 +23,11 @@
- 		ethernet0 = &emac;
- 		ethernet1 = &rtl8189etv;
- 		serial0 = &uart0;
-+
-+		led-boot = &led_sys;
-+		led-failsafe = &led_sys;
-+		led-running = &led_sys;
-+		led-upgrade = &led_sys;
- 	};
- 
- 	chosen {
-@@ -38,7 +43,7 @@
- 			gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
- 		};
- 
--		led-1 {
-+		led_sys: led-1 {
- 			function = LED_FUNCTION_STATUS;
- 			color = <LED_COLOR_ID_RED>;
- 			gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
diff --git a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch b/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
deleted file mode 100644
index 76a73ee1f0..0000000000
--- a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
-@@ -41,3 +41,7 @@
- 		reg = <1>;
- 	};
- };
-+
-+&pwm {
-+	status = "okay";
-+};
diff --git a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch b/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch
deleted file mode 100644
index 3876852c2b..0000000000
--- a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
-@@ -42,6 +42,11 @@
- 		regulator-min-microvolt = <1800000>;
- 		regulator-max-microvolt = <1800000>;
- 	};
-+
-+	wifi_pwrseq: wifi_pwrseq {
-+		compatible = "mmc-pwrseq-simple";
-+		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
-+	};
- };
- 
- &ac_power_supply {
-@@ -102,6 +107,21 @@
- 		reg = <1>;
- 	};
- };
-+
-+&mmc1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc1_pins>;
-+	vmmc-supply = <&reg_dldo4>;
-+	vqmmc-supply = <&reg_eldo1>;
-+	mmc-pwrseq = <&wifi_pwrseq>;
-+	bus-width = <4>;
-+	non-removable;
-+	status = "okay";
-+
-+	rtl8723cs: wifi at 1 {
-+		reg = <1>;
-+	};
-+};
- 
- &mmc2 {
- 	pinctrl-names = "default";
---- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
-@@ -35,6 +35,11 @@
- 			};
- 		};
- 	};
-+
-+	wifi_pwrseq: wifi_pwrseq {
-+		compatible = "mmc-pwrseq-simple";
-+		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
-+	};
- };
- 
- &codec {
-@@ -124,6 +129,21 @@
- 	status = "okay";
- };
- 
-+&mmc1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&mmc1_pins>;
-+	vmmc-supply = <&reg_dldo4>;
-+	vqmmc-supply = <&reg_eldo1>;
-+	mmc-pwrseq = <&wifi_pwrseq>;
-+	bus-width = <4>;
-+	non-removable;
-+	status = "okay";
-+
-+	rtl8723cs: wifi at 1 {
-+		reg = <1>;
-+	};
-+};
-+
- &ohci0 {
- 	status = "okay";
- };



From lede-commits at lists.infradead.org  Fri May  3 05:56:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 08:56:48 -0400
Subject: [openwrt/openwrt]  bpf: fix broken inclusion of system include
In-Reply-To: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
References: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
Message-ID: <mailman.33331.1714741010.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fc221b065a94dbd9c11218a777a86c1bcdc69ee5

commit fc221b065a94dbd9c11218a777a86c1bcdc69ee5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri May 3 14:49:58 2024 +0200

    bpf: fix broken inclusion of system include
    
    Commit d82c5884c616 ("treewide: make use of new toolchain define")
    changed $(TOOLCHAIN_DIR)/include to the new variable
    $(TOOLCHAIN_INC_DIRS) that now can contain multiple entry.
    
    Because of this only the first include in $(TOOLCHAIN_INC_DIRS) was
    actually included with -isystem, making the other producing warning with
    ignored inputs.
    
    Fix this by parsing each entry in $(TOOLCHAIN_INC_DIRS) and adding the
    -isystem prefix to correctly include them in the BPF_KERNEL_INCLUDE.
    
    Fixes: d82c5884c616 ("treewide: make use of new toolchain define")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/bpf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/bpf.mk b/include/bpf.mk
index a3357f0e29..9abc660123 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -33,7 +33,7 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
 BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
 
 BPF_KERNEL_INCLUDE := \
-	-nostdinc -isystem $(TOOLCHAIN_INC_DIRS) \
+	-nostdinc $(patsubst %,-isystem %,$(TOOLCHAIN_INC_DIRS)) \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
 	-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \



From lede-commits at lists.infradead.org  Fri May  3 05:56:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 08:56:47 -0400
Subject: [openwrt/openwrt]  xdp-tools: fix wrong matching for OPENWRT_VERBOSE
In-Reply-To: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
References: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
Message-ID: <mailman.33332.1714741012.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/23de46c913912cf8695328e966bc47cc57a6e09f

commit 23de46c913912cf8695328e966bc47cc57a6e09f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri May 3 14:46:33 2024 +0200

    xdp-tools: fix wrong matching for OPENWRT_VERBOSE
    
    To enable verbose log for xdp-tools compilation, we check for "c" in
    the OPENWRT_VERBOSE, but verbose.mk supports only "w" and "s" for V=1
    and V=99.
    
    Fix the wrong matching and correctly enable verbose output matching for
    "s".
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/utils/xdp-tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile
index 8484ca758b..8a839954e9 100644
--- a/package/network/utils/xdp-tools/Makefile
+++ b/package/network/utils/xdp-tools/Makefile
@@ -89,7 +89,7 @@ CONFIGURE_VARS += \
 	LLC="$(LLVM_LLC)" \
 	BPF_LDFLAGS="-march=$(BPF_TARGET) -mcpu=v3"
 
-ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
+ifneq ($(findstring s,$(OPENWRT_VERBOSE)),)
 	MAKE_FLAGS+=V=1
 endif
 



From lede-commits at lists.infradead.org  Fri May  3 05:56:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 08:56:46 -0400
Subject: [openwrt/openwrt]  xdp-tools: refresh patches
In-Reply-To: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
References: <171474100692.2038841.339647591961803484@git-01.infra.openwrt.org>
Message-ID: <mailman.33333.1714741014.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0d436fc8b10fe5d902034cf60885696da7ee0002

commit 0d436fc8b10fe5d902034cf60885696da7ee0002
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri May 3 14:32:36 2024 +0200

    xdp-tools: refresh patches
    
    Refresh xdp-tools patches with make package/xdp-tools/refresh
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
index 77728a6ee7..e2fbfa57dc 100644
--- a/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
+++ b/package/network/utils/xdp-tools/patches/010-configure-respect-LDFLAGS.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -176,7 +176,7 @@ int main(int argc, char **argv) {
+@@ -174,7 +174,7 @@ int main(int argc, char **argv) {
      return 0;
  }
  EOF
@@ -9,7 +9,7 @@
      if [ "$?" -eq "0" ]; then
          echo "HAVE_PCAP:=y" >>$CONFIG
          [ -n "$LIBPCAP_CFLAGS" ] && echo 'CFLAGS += ' $LIBPCAP_CFLAGS >> $CONFIG
-@@ -224,7 +224,7 @@ int main(int argc, char **argv) {
+@@ -222,7 +222,7 @@ int main(int argc, char **argv) {
      return 0;
  }
  EOF
@@ -18,7 +18,7 @@
      if [ "$?" -eq "0" ]; then
          echo "HAVE_FEATURES+=${config_var}" >>"$CONFIG"
          echo "yes"
-@@ -291,7 +291,7 @@ int main(int argc, char **argv) {
+@@ -289,7 +289,7 @@ int main(int argc, char **argv) {
  }
  EOF
  



From lede-commits at lists.infradead.org  Fri May  3 09:45:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 12:45:55 -0400
Subject: [openwrt/openwrt]  mediatek: backport mt7622 dts fix for mt7531
 switch id to 6.1
In-Reply-To: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
References: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
Message-ID: <mailman.33424.1714754762.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3fe239fcf8d0ea91b947af25fd28a6133aba93c6

commit 3fe239fcf8d0ea91b947af25fd28a6133aba93c6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri May 3 18:19:20 2024 +0200

    mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1
    
    Fixes: ac8bfe316b81 ("generic: 6.1, 6.6: mt7530: import accepted patches")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../181-mt7622_fix_dts_mt7531_reg.patch            | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch b/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch
new file mode 100644
index 0000000000..3d2c2c1dec
--- /dev/null
+++ b/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch
@@ -0,0 +1,28 @@
+--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
++++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+@@ -152,9 +152,9 @@
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+ 
+-		switch at 0 {
++		switch at 1f {
+ 			compatible = "mediatek,mt7531";
+-			reg = <0>;
++			reg = <31>;
+ 			interrupt-controller;
+ 			#interrupt-cells = <1>;
+ 			interrupt-parent = <&pio>;
+--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
++++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+@@ -117,9 +117,9 @@
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+ 
+-		switch at 0 {
++		switch at 1f {
+ 			compatible = "mediatek,mt7531";
+-			reg = <0>;
++			reg = <31>;
+ 			reset-gpios = <&pio 54 0>;
+ 
+ 			ports {



From lede-commits at lists.infradead.org  Fri May  3 09:45:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 12:45:57 -0400
Subject: [openwrt/openwrt]  kernel: add missing check for TCP GRO
In-Reply-To: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
References: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
Message-ID: <mailman.33425.1714754764.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a5a941a997c46b125cb76dca7565a688bb2ad899

commit a5a941a997c46b125cb76dca7565a688bb2ad899
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri May 3 18:44:57 2024 +0200

    kernel: add missing check for TCP GRO
    
    Need to check if the skb data buffer is linear up to (and including) the TCP
    header.
    
    Fixes: https://github.com/openwrt/openwrt/issues/15359
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch       | 9 +++++----
 .../pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch       | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
index 841c0de3e1..f52233fe90 100644
--- a/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
+++ b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
@@ -318,7 +318,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	flush = NAPI_GRO_CB(p)->flush;
  	flush |= (__force int)(flags & TCP_FLAG_CWR);
  	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
-@@ -268,6 +350,18 @@ found:
+@@ -268,6 +350,19 @@ found:
  	flush |= p->decrypted ^ skb->decrypted;
  #endif
  
@@ -326,6 +326,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +		flush |= (__force int)(flags ^ tcp_flag_word(th2));
 +		flush |= skb->ip_summed != p->ip_summed;
 +		flush |= skb->csum_level != p->csum_level;
++		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
 +		flush |= NAPI_GRO_CB(p)->count >= 64;
 +
 +		if (flush || skb_gro_receive_list(p, skb))
@@ -337,7 +338,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flush || skb_gro_receive(p, skb)) {
  		mss = 1;
  		goto out_check_final;
-@@ -289,7 +383,6 @@ out_check_final:
+@@ -289,7 +384,6 @@ out_check_final:
  	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
  		pp = p;
  
@@ -345,7 +346,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	NAPI_GRO_CB(skb)->flush |= (flush != 0);
  
  	return pp;
-@@ -315,18 +408,58 @@ int tcp_gro_complete(struct sk_buff *skb
+@@ -315,18 +409,58 @@ int tcp_gro_complete(struct sk_buff *skb
  }
  EXPORT_SYMBOL(tcp_gro_complete);
  
@@ -409,7 +410,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
-@@ -334,6 +467,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+@@ -334,6 +468,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
  	const struct iphdr *iph = ip_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  
diff --git a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
index 7af7d8830c..cd77626677 100644
--- a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
+++ b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
@@ -269,7 +269,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	flush = NAPI_GRO_CB(p)->flush;
  	flush |= (__force int)(flags & TCP_FLAG_CWR);
  	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
-@@ -269,6 +351,18 @@ found:
+@@ -269,6 +351,19 @@ found:
  	flush |= p->decrypted ^ skb->decrypted;
  #endif
  
@@ -277,6 +277,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +		flush |= (__force int)(flags ^ tcp_flag_word(th2));
 +		flush |= skb->ip_summed != p->ip_summed;
 +		flush |= skb->csum_level != p->csum_level;
++		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
 +		flush |= NAPI_GRO_CB(p)->count >= 64;
 +
 +		if (flush || skb_gro_receive_list(p, skb))
@@ -288,7 +289,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flush || skb_gro_receive(p, skb)) {
  		mss = 1;
  		goto out_check_final;
-@@ -290,7 +384,6 @@ out_check_final:
+@@ -290,7 +385,6 @@ out_check_final:
  	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
  		pp = p;
  
@@ -296,7 +297,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	NAPI_GRO_CB(skb)->flush |= (flush != 0);
  
  	return pp;
-@@ -314,18 +407,58 @@ void tcp_gro_complete(struct sk_buff *sk
+@@ -314,18 +408,58 @@ void tcp_gro_complete(struct sk_buff *sk
  }
  EXPORT_SYMBOL(tcp_gro_complete);
  
@@ -360,7 +361,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
-@@ -333,6 +466,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+@@ -333,6 +467,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
  	const struct iphdr *iph = ip_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  



From lede-commits at lists.infradead.org  Fri May  3 09:45:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 12:45:56 -0400
Subject: [openwrt/openwrt]  kernel: backport upstream GRO fixes
In-Reply-To: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
References: <171475475576.2853505.16949569468752162792@git-01.infra.openwrt.org>
Message-ID: <mailman.33426.1714754765.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2f5398588a7cda749e7fcda1763d316ef75bb18f

commit 2f5398588a7cda749e7fcda1763d316ef75bb18f
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri May 3 18:19:56 2024 +0200

    kernel: backport upstream GRO fixes
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...se-ipv6-ext-headers-without-frag0-invalid.patch | 107 +++++++++++++
 ...dd-flush-check-in-udp_gro_receive_segment.patch |  48 ++++++
 ...se-ipv6-ext-headers-without-frag0-invalid.patch | 107 +++++++++++++
 ...-udp-bad-offset-in-socket-lookup-by-addin.patch | 178 +++++++++++++++++++++
 ...dd-flush-check-in-udp_gro_receive_segment.patch |  48 ++++++
 .../680-net-add-TCP-fraglist-GRO-support.patch     |   2 +-
 6 files changed, 489 insertions(+), 1 deletion(-)

diff --git a/target/linux/generic/backport-6.1/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch b/target/linux/generic/backport-6.1/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
new file mode 100644
index 0000000000..6dbec3c752
--- /dev/null
+++ b/target/linux/generic/backport-6.1/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
@@ -0,0 +1,107 @@
+From: Richard Gobert <richardbgobert at gmail.com>
+Date: Wed, 3 Jan 2024 15:44:21 +0100
+Subject: [PATCH] net: gro: parse ipv6 ext headers without frag0 invalidation
+
+The existing code always pulls the IPv6 header and sets the transport
+offset initially. Then optionally again pulls any extension headers in
+ipv6_gso_pull_exthdrs and sets the transport offset again on return from
+that call. skb->data is set at the start of the first extension header
+before calling ipv6_gso_pull_exthdrs, and must disable the frag0
+optimization because that function uses pskb_may_pull/pskb_pull instead of
+skb_gro_ helpers. It sets the GRO offset to the TCP header with
+skb_gro_pull and sets the transport header. Then returns skb->data to its
+position before this block.
+
+This commit introduces a new helper function - ipv6_gro_pull_exthdrs -
+which is used in ipv6_gro_receive to pull ipv6 ext headers instead of
+ipv6_gso_pull_exthdrs. Thus, there is no modification of skb->data, all
+operations use skb_gro_* helpers, and the frag0 fast path can be taken for
+IPv6 packets with ext headers.
+
+Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
+Reviewed-by: Willem de Bruijn <willemb at google.com>
+Reviewed-by: David Ahern <dsahern at kernel.org>
+Reviewed-by: Eric Dumazet <edumazet at google.com>
+Link: https://lore.kernel.org/r/504130f6-b56c-4dcc-882c-97942c59f5b7 at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -36,6 +36,40 @@
+ 		INDIRECT_CALL_L4(cb, f2, f1, head, skb);	\
+ })
+ 
++static int ipv6_gro_pull_exthdrs(struct sk_buff *skb, int off, int proto)
++{
++	const struct net_offload *ops = NULL;
++	struct ipv6_opt_hdr *opth;
++
++	for (;;) {
++		int len;
++
++		ops = rcu_dereference(inet6_offloads[proto]);
++
++		if (unlikely(!ops))
++			break;
++
++		if (!(ops->flags & INET6_PROTO_GSO_EXTHDR))
++			break;
++
++		opth = skb_gro_header(skb, off + sizeof(*opth), off);
++		if (unlikely(!opth))
++			break;
++
++		len = ipv6_optlen(opth);
++
++		opth = skb_gro_header(skb, off + len, off);
++		if (unlikely(!opth))
++			break;
++		proto = opth->nexthdr;
++
++		off += len;
++	}
++
++	skb_gro_pull(skb, off - skb_network_offset(skb));
++	return proto;
++}
++
+ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
+ {
+ 	const struct net_offload *ops = NULL;
+@@ -224,28 +258,25 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+ 		goto out;
+ 
+ 	skb_set_network_header(skb, off);
+-	skb_gro_pull(skb, sizeof(*iph));
+-	skb_set_transport_header(skb, skb_gro_offset(skb));
+ 
+-	flush += ntohs(iph->payload_len) != skb_gro_len(skb);
++	flush += ntohs(iph->payload_len) != skb->len - hlen;
+ 
+ 	proto = iph->nexthdr;
+ 	ops = rcu_dereference(inet6_offloads[proto]);
+ 	if (!ops || !ops->callbacks.gro_receive) {
+-		pskb_pull(skb, skb_gro_offset(skb));
+-		skb_gro_frag0_invalidate(skb);
+-		proto = ipv6_gso_pull_exthdrs(skb, proto);
+-		skb_gro_pull(skb, -skb_transport_offset(skb));
+-		skb_reset_transport_header(skb);
+-		__skb_push(skb, skb_gro_offset(skb));
++		proto = ipv6_gro_pull_exthdrs(skb, hlen, proto);
+ 
+ 		ops = rcu_dereference(inet6_offloads[proto]);
+ 		if (!ops || !ops->callbacks.gro_receive)
+ 			goto out;
+ 
+-		iph = ipv6_hdr(skb);
++		iph = skb_gro_network_header(skb);
++	} else {
++		skb_gro_pull(skb, sizeof(*iph));
+ 	}
+ 
++	skb_set_transport_header(skb, skb_gro_offset(skb));
++
+ 	NAPI_GRO_CB(skb)->proto = proto;
+ 
+ 	flush--;
diff --git a/target/linux/generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch b/target/linux/generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
new file mode 100644
index 0000000000..55dac85df8
--- /dev/null
+++ b/target/linux/generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
@@ -0,0 +1,48 @@
+From: Richard Gobert <richardbgobert at gmail.com>
+Date: Tue, 30 Apr 2024 16:35:55 +0200
+Subject: [PATCH] net: gro: add flush check in udp_gro_receive_segment
+
+GRO-GSO path is supposed to be transparent and as such L3 flush checks are
+relevant to all UDP flows merging in GRO. This patch uses the same logic
+and code from tcp_gro_receive, terminating merge if flush is non zero.
+
+Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.")
+Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
+Reviewed-by: Willem de Bruijn <willemb at google.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -463,6 +463,7 @@ static struct sk_buff *udp_gro_receive_s
+ 	struct sk_buff *p;
+ 	unsigned int ulen;
+ 	int ret = 0;
++	int flush;
+ 
+ 	/* requires non zero csum, for symmetry with GSO */
+ 	if (!uh->check) {
+@@ -496,13 +497,22 @@ static struct sk_buff *udp_gro_receive_s
+ 			return p;
+ 		}
+ 
++		flush = NAPI_GRO_CB(p)->flush;
++
++		if (NAPI_GRO_CB(p)->flush_id != 1 ||
++		    NAPI_GRO_CB(p)->count != 1 ||
++		    !NAPI_GRO_CB(p)->is_atomic)
++			flush |= NAPI_GRO_CB(p)->flush_id;
++		else
++			NAPI_GRO_CB(p)->is_atomic = false;
++
+ 		/* Terminate the flow on len mismatch or if it grow "too much".
+ 		 * Under small packet flood GRO count could elsewhere grow a lot
+ 		 * leading to excessive truesize values.
+ 		 * On len mismatch merge the first packet shorter than gso_size,
+ 		 * otherwise complete the GRO packet.
+ 		 */
+-		if (ulen > ntohs(uh2->len)) {
++		if (ulen > ntohs(uh2->len) || flush) {
+ 			pp = p;
+ 		} else {
+ 			if (NAPI_GRO_CB(skb)->is_flist) {
diff --git a/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch b/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
new file mode 100644
index 0000000000..d0fed02005
--- /dev/null
+++ b/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
@@ -0,0 +1,107 @@
+From: Richard Gobert <richardbgobert at gmail.com>
+Date: Wed, 3 Jan 2024 15:44:21 +0100
+Subject: [PATCH] net: gro: parse ipv6 ext headers without frag0 invalidation
+
+The existing code always pulls the IPv6 header and sets the transport
+offset initially. Then optionally again pulls any extension headers in
+ipv6_gso_pull_exthdrs and sets the transport offset again on return from
+that call. skb->data is set at the start of the first extension header
+before calling ipv6_gso_pull_exthdrs, and must disable the frag0
+optimization because that function uses pskb_may_pull/pskb_pull instead of
+skb_gro_ helpers. It sets the GRO offset to the TCP header with
+skb_gro_pull and sets the transport header. Then returns skb->data to its
+position before this block.
+
+This commit introduces a new helper function - ipv6_gro_pull_exthdrs -
+which is used in ipv6_gro_receive to pull ipv6 ext headers instead of
+ipv6_gso_pull_exthdrs. Thus, there is no modification of skb->data, all
+operations use skb_gro_* helpers, and the frag0 fast path can be taken for
+IPv6 packets with ext headers.
+
+Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
+Reviewed-by: Willem de Bruijn <willemb at google.com>
+Reviewed-by: David Ahern <dsahern at kernel.org>
+Reviewed-by: Eric Dumazet <edumazet at google.com>
+Link: https://lore.kernel.org/r/504130f6-b56c-4dcc-882c-97942c59f5b7 at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -37,6 +37,40 @@
+ 		INDIRECT_CALL_L4(cb, f2, f1, head, skb);	\
+ })
+ 
++static int ipv6_gro_pull_exthdrs(struct sk_buff *skb, int off, int proto)
++{
++	const struct net_offload *ops = NULL;
++	struct ipv6_opt_hdr *opth;
++
++	for (;;) {
++		int len;
++
++		ops = rcu_dereference(inet6_offloads[proto]);
++
++		if (unlikely(!ops))
++			break;
++
++		if (!(ops->flags & INET6_PROTO_GSO_EXTHDR))
++			break;
++
++		opth = skb_gro_header(skb, off + sizeof(*opth), off);
++		if (unlikely(!opth))
++			break;
++
++		len = ipv6_optlen(opth);
++
++		opth = skb_gro_header(skb, off + len, off);
++		if (unlikely(!opth))
++			break;
++		proto = opth->nexthdr;
++
++		off += len;
++	}
++
++	skb_gro_pull(skb, off - skb_network_offset(skb));
++	return proto;
++}
++
+ static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
+ {
+ 	const struct net_offload *ops = NULL;
+@@ -206,28 +240,25 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+ 		goto out;
+ 
+ 	skb_set_network_header(skb, off);
+-	skb_gro_pull(skb, sizeof(*iph));
+-	skb_set_transport_header(skb, skb_gro_offset(skb));
+ 
+-	flush += ntohs(iph->payload_len) != skb_gro_len(skb);
++	flush += ntohs(iph->payload_len) != skb->len - hlen;
+ 
+ 	proto = iph->nexthdr;
+ 	ops = rcu_dereference(inet6_offloads[proto]);
+ 	if (!ops || !ops->callbacks.gro_receive) {
+-		pskb_pull(skb, skb_gro_offset(skb));
+-		skb_gro_frag0_invalidate(skb);
+-		proto = ipv6_gso_pull_exthdrs(skb, proto);
+-		skb_gro_pull(skb, -skb_transport_offset(skb));
+-		skb_reset_transport_header(skb);
+-		__skb_push(skb, skb_gro_offset(skb));
++		proto = ipv6_gro_pull_exthdrs(skb, hlen, proto);
+ 
+ 		ops = rcu_dereference(inet6_offloads[proto]);
+ 		if (!ops || !ops->callbacks.gro_receive)
+ 			goto out;
+ 
+-		iph = ipv6_hdr(skb);
++		iph = skb_gro_network_header(skb);
++	} else {
++		skb_gro_pull(skb, sizeof(*iph));
+ 	}
+ 
++	skb_set_transport_header(skb, skb_gro_offset(skb));
++
+ 	NAPI_GRO_CB(skb)->proto = proto;
+ 
+ 	flush--;
diff --git a/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch b/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch
new file mode 100644
index 0000000000..c5d8497dee
--- /dev/null
+++ b/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch
@@ -0,0 +1,178 @@
+From: Richard Gobert <richardbgobert at gmail.com>
+Date: Tue, 30 Apr 2024 16:35:54 +0200
+Subject: [PATCH] net: gro: fix udp bad offset in socket lookup by adding
+ {inner_}network_offset to napi_gro_cb
+
+Commits a602456 ("udp: Add GRO functions to UDP socket") and 57c67ff ("udp:
+additional GRO support") introduce incorrect usage of {ip,ipv6}_hdr in the
+complete phase of gro. The functions always return skb->network_header,
+which in the case of encapsulated packets at the gro complete phase, is
+always set to the innermost L3 of the packet. That means that calling
+{ip,ipv6}_hdr for skbs which completed the GRO receive phase (both in
+gro_list and *_gro_complete) when parsing an encapsulated packet's _outer_
+L3/L4 may return an unexpected value.
+
+This incorrect usage leads to a bug in GRO's UDP socket lookup.
+udp{4,6}_lib_lookup_skb functions use ip_hdr/ipv6_hdr respectively. These
+*_hdr functions return network_header which will point to the innermost L3,
+resulting in the wrong offset being used in __udp{4,6}_lib_lookup with
+encapsulated packets.
+
+This patch adds network_offset and inner_network_offset to napi_gro_cb, and
+makes sure both are set correctly.
+
+To fix the issue, network_offsets union is used inside napi_gro_cb, in
+which both the outer and the inner network offsets are saved.
+
+Reproduction example:
+
+Endpoint configuration example (fou + local address bind)
+
+    # ip fou add port 6666 ipproto 4
+    # ip link add name tun1 type ipip remote 2.2.2.1 local 2.2.2.2 encap fou encap-dport 5555 encap-sport 6666 mode ipip
+    # ip link set tun1 up
+    # ip a add 1.1.1.2/24 dev tun1
+
+Netperf TCP_STREAM result on net-next before patch is applied:
+
+net-next main, GRO enabled:
+    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
+    Recv   Send    Send
+    Socket Socket  Message  Elapsed
+    Size   Size    Size     Time     Throughput
+    bytes  bytes   bytes    secs.    10^6bits/sec
+
+    131072  16384  16384    5.28        2.37
+
+net-next main, GRO disabled:
+    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
+    Recv   Send    Send
+    Socket Socket  Message  Elapsed
+    Size   Size    Size     Time     Throughput
+    bytes  bytes   bytes    secs.    10^6bits/sec
+
+    131072  16384  16384    5.01     2745.06
+
+patch applied, GRO enabled:
+    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
+    Recv   Send    Send
+    Socket Socket  Message  Elapsed
+    Size   Size    Size     Time     Throughput
+    bytes  bytes   bytes    secs.    10^6bits/sec
+
+    131072  16384  16384    5.01     2877.38
+
+Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
+Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
+Reviewed-by: Eric Dumazet <edumazet at google.com>
+Reviewed-by: Willem de Bruijn <willemb at google.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/include/net/gro.h
++++ b/include/net/gro.h
+@@ -86,6 +86,15 @@ struct napi_gro_cb {
+ 
+ 	/* used to support CHECKSUM_COMPLETE for tunneling protocols */
+ 	__wsum	csum;
++
++	/* L3 offsets */
++	union {
++		struct {
++			u16 network_offset;
++			u16 inner_network_offset;
++		};
++		u16 network_offsets[2];
++	};
+ };
+ 
+ #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
+--- a/net/8021q/vlan_core.c
++++ b/net/8021q/vlan_core.c
+@@ -478,6 +478,8 @@ static struct sk_buff *vlan_gro_receive(
+ 	if (unlikely(!vhdr))
+ 		goto out;
+ 
++	NAPI_GRO_CB(skb)->network_offsets[NAPI_GRO_CB(skb)->encap_mark] = hlen;
++
+ 	type = vhdr->h_vlan_encapsulated_proto;
+ 
+ 	ptype = gro_find_receive_by_type(type);
+--- a/net/core/gro.c
++++ b/net/core/gro.c
+@@ -373,6 +373,7 @@ static inline void skb_gro_reset_offset(
+ 	const struct skb_shared_info *pinfo = skb_shinfo(skb);
+ 	const skb_frag_t *frag0 = &pinfo->frags[0];
+ 
++	NAPI_GRO_CB(skb)->network_offset = 0;
+ 	NAPI_GRO_CB(skb)->data_offset = 0;
+ 	NAPI_GRO_CB(skb)->frag0 = NULL;
+ 	NAPI_GRO_CB(skb)->frag0_len = 0;
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1571,6 +1571,7 @@ struct sk_buff *inet_gro_receive(struct
+ 	/* The above will be needed by the transport layer if there is one
+ 	 * immediately following this IP hdr.
+ 	 */
++	NAPI_GRO_CB(skb)->inner_network_offset = off;
+ 
+ 	/* Note : No need to call skb_gro_postpull_rcsum() here,
+ 	 * as we already checked checksum over ipv4 header was 0
+--- a/net/ipv4/udp.c
++++ b/net/ipv4/udp.c
+@@ -534,7 +534,8 @@ static inline struct sock *__udp4_lib_lo
+ struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb,
+ 				 __be16 sport, __be16 dport)
+ {
+-	const struct iphdr *iph = ip_hdr(skb);
++	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
++	const struct iphdr *iph = (struct iphdr *)(skb->data + offset);
+ 	struct net *net = dev_net(skb->dev);
+ 	int iif, sdif;
+ 
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -718,7 +718,8 @@ EXPORT_SYMBOL(udp_gro_complete);
+ 
+ INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+-	const struct iphdr *iph = ip_hdr(skb);
++	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
++	const struct iphdr *iph = (struct iphdr *)(skb->data + offset);
+ 	struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
+ 
+ 	/* do fraglist only if there is no outer UDP encap (or we already processed it) */
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -240,6 +240,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+ 		goto out;
+ 
+ 	skb_set_network_header(skb, off);
++	NAPI_GRO_CB(skb)->inner_network_offset = off;
+ 
+ 	flush += ntohs(iph->payload_len) != skb->len - hlen;
+ 
+--- a/net/ipv6/udp.c
++++ b/net/ipv6/udp.c
+@@ -275,7 +275,8 @@ static struct sock *__udp6_lib_lookup_sk
+ struct sock *udp6_lib_lookup_skb(const struct sk_buff *skb,
+ 				 __be16 sport, __be16 dport)
+ {
+-	const struct ipv6hdr *iph = ipv6_hdr(skb);
++	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
++	const struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + offset);
+ 	struct net *net = dev_net(skb->dev);
+ 	int iif, sdif;
+ 
+--- a/net/ipv6/udp_offload.c
++++ b/net/ipv6/udp_offload.c
+@@ -164,7 +164,8 @@ flush:
+ 
+ INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+-	const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
++	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
++	const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + offset);
+ 	struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
+ 
+ 	/* do fraglist only if there is no outer UDP encap (or we already processed it) */
diff --git a/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch b/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
new file mode 100644
index 0000000000..72b76dd938
--- /dev/null
+++ b/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
@@ -0,0 +1,48 @@
+From: Richard Gobert <richardbgobert at gmail.com>
+Date: Tue, 30 Apr 2024 16:35:55 +0200
+Subject: [PATCH] net: gro: add flush check in udp_gro_receive_segment
+
+GRO-GSO path is supposed to be transparent and as such L3 flush checks are
+relevant to all UDP flows merging in GRO. This patch uses the same logic
+and code from tcp_gro_receive, terminating merge if flush is non zero.
+
+Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.")
+Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
+Reviewed-by: Willem de Bruijn <willemb at google.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -471,6 +471,7 @@ static struct sk_buff *udp_gro_receive_s
+ 	struct sk_buff *p;
+ 	unsigned int ulen;
+ 	int ret = 0;
++	int flush;
+ 
+ 	/* requires non zero csum, for symmetry with GSO */
+ 	if (!uh->check) {
+@@ -504,13 +505,22 @@ static struct sk_buff *udp_gro_receive_s
+ 			return p;
+ 		}
+ 
++		flush = NAPI_GRO_CB(p)->flush;
++
++		if (NAPI_GRO_CB(p)->flush_id != 1 ||
++		    NAPI_GRO_CB(p)->count != 1 ||
++		    !NAPI_GRO_CB(p)->is_atomic)
++			flush |= NAPI_GRO_CB(p)->flush_id;
++		else
++			NAPI_GRO_CB(p)->is_atomic = false;
++
+ 		/* Terminate the flow on len mismatch or if it grow "too much".
+ 		 * Under small packet flood GRO count could elsewhere grow a lot
+ 		 * leading to excessive truesize values.
+ 		 * On len mismatch merge the first packet shorter than gso_size,
+ 		 * otherwise complete the GRO packet.
+ 		 */
+-		if (ulen > ntohs(uh2->len)) {
++		if (ulen > ntohs(uh2->len) || flush) {
+ 			pp = p;
+ 		} else {
+ 			if (NAPI_GRO_CB(skb)->is_flist) {
diff --git a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
index 6205901707..7af7d8830c 100644
--- a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
+++ b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
@@ -21,7 +21,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/net/gro.h
 +++ b/include/net/gro.h
-@@ -430,6 +430,7 @@ static inline __wsum ip6_gro_compute_pse
+@@ -439,6 +439,7 @@ static inline __wsum ip6_gro_compute_pse
  }
  
  int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb);



From lede-commits at lists.infradead.org  Fri May  3 15:02:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 18:02:53 -0400
Subject: [openwrt/openwrt]  mediatek: remove macros for previous kernel
 versions
In-Reply-To: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
References: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
Message-ID: <mailman.33488.1714773776.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2201d55257150b5509dcb55f515450ac0e5287f8

commit 2201d55257150b5509dcb55f515450ac0e5287f8
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri May 3 21:33:41 2024 +0100

    mediatek: remove macros for previous kernel versions
    
    Remove unnecessary 'if' macros for previous kernel versions.
    After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
    are unnecessary.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../linux/mediatek/files/drivers/leds/leds-smartrg-system.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
index 7736905704..5e1e3a3542 100644
--- a/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
+++ b/target/linux/mediatek/files/drivers/leds/leds-smartrg-system.c
@@ -7,7 +7,6 @@
 #include <linux/module.h>
 #include <linux/mutex.h>
 #include <linux/of.h>
-#include <linux/version.h>
 
 /**
  * Driver for SmartRG RGBW LED microcontroller.
@@ -160,11 +159,7 @@ srg_led_init_led(struct srg_led_ctrl *sysled_ctrl, struct device_node *np)
 
 static int
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
-srg_led_probe(struct i2c_client *client, const struct i2c_device_id *id)
-#else
 srg_led_probe(struct i2c_client *client)
-#endif
 {
 	struct device_node *np = client->dev.of_node, *child;
 	struct srg_led_ctrl *sysled_ctrl;
@@ -198,21 +193,13 @@ static void srg_led_disable(struct i2c_client *client)
 		srg_led_i2c_write(sysled_ctrl, i, 0);
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,16,0)
 static void
-#else
-static int
-#endif
 srg_led_remove(struct i2c_client *client)
 {
 	struct srg_led_ctrl *sysled_ctrl = i2c_get_clientdata(client);
 
 	srg_led_disable(client);
 	mutex_destroy(&sysled_ctrl->lock);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0)
-	return 0;
-#endif
 }
 
 static const struct i2c_device_id srg_led_id[] = {



From lede-commits at lists.infradead.org  Fri May  3 15:02:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 18:02:51 -0400
Subject: [openwrt/openwrt]  generic: 6.6: fix and simplify blkdevparts=
 cmdline parsing
In-Reply-To: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
References: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
Message-ID: <mailman.33489.1714773776.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fb2475e6bd5dc8cc5cd50c8941d75d9932a15579

commit fb2475e6bd5dc8cc5cd50c8941d75d9932a15579
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri May 3 21:27:37 2024 +0100

    generic: 6.6: fix and simplify blkdevparts= cmdline parsing
    
    Import pending patch to fix the cmdline parsing of the "blkdevparts="
    parameter which has been broken somewhen between Linux 6.1 and Linux 6.6.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...-and-simplify-blkdevparts-cmdline-parsing.patch | 217 +++++++++++++++++++++
 1 file changed, 217 insertions(+)

diff --git a/target/linux/generic/pending-6.6/195-block-fix-and-simplify-blkdevparts-cmdline-parsing.patch b/target/linux/generic/pending-6.6/195-block-fix-and-simplify-blkdevparts-cmdline-parsing.patch
new file mode 100644
index 0000000000..d504a74fde
--- /dev/null
+++ b/target/linux/generic/pending-6.6/195-block-fix-and-simplify-blkdevparts-cmdline-parsing.patch
@@ -0,0 +1,217 @@
+From patchwork Sun Apr 21 07:39:52 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: INAGAKI Hiroshi <musashino.open at gmail.com>
+X-Patchwork-Id: 13637306
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+To: axboe at kernel.dk
+Cc: yang.yang29 at zte.com,
+	justinstitt at google.com,
+	xu.panda at zte.com.cn,
+	linux-block at vger.kernel.org,
+	linux-kernel at vger.kernel.org,
+	INAGAKI Hiroshi <musashino.open at gmail.com>,
+	Naohiro Aota <naota at elisp.net>
+Subject: [PATCH] block: fix and simplify blkdevparts= cmdline parsing
+Date: Sun, 21 Apr 2024 16:39:52 +0900
+Message-ID: <20240421074005.565-1-musashino.open at gmail.com>
+X-Mailer: git-send-email 2.42.0.windows.2
+Precedence: bulk
+X-Mailing-List: linux-block at vger.kernel.org
+List-Id: <linux-block.vger.kernel.org>
+List-Subscribe: <mailto:linux-block+subscribe at vger.kernel.org>
+List-Unsubscribe: <mailto:linux-block+unsubscribe at vger.kernel.org>
+MIME-Version: 1.0
+
+Fix the cmdline parsing of the "blkdevparts=" parameter using strsep(),
+which makes the code simpler.
+
+Before commit 146afeb235cc ("block: use strscpy() to instead of
+strncpy()"), we used a strncpy() to copy a block device name and partition
+names. The commit simply replaced a strncpy() and NULL termination with
+a strscpy(). It did not update calculations of length passed to strscpy().
+While the length passed to strncpy() is just a length of valid characters
+without NULL termination ('\0'), strscpy() takes it as a length of the
+destination buffer, including a NULL termination.
+
+Since the source buffer is not necessarily NULL terminated, the current
+code copies "length - 1" characters and puts a NULL character in the
+destination buffer. It replaces the last character with NULL and breaks
+the parsing.
+
+As an example, that buffer will be passed to parse_parts() and breaks
+parsing sub-partitions due to the missing ')' at the end, like the
+following.
+
+example (Check Point V-80 & OpenWrt):
+
+- Linux Kernel 6.6
+
+  [    0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M at 10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
+  ...
+  [    0.884016] mmc1: new HS200 MMC card at address 0001
+  [    0.889951] mmcblk1: mmc1:0001 004GA0 3.69 GiB
+  [    0.895043] cmdline partition format is invalid.
+  [    0.895704]  mmcblk1: p1
+  [    0.903447] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
+  [    0.908667] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
+  [    0.913765] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0)
+
+  1. "48M at 10M(kernel-1),..." is passed to strscpy() with length=17
+     from parse_parts()
+  2. strscpy() returns -E2BIG and the destination buffer has
+     "48M at 10M(kernel-1\0"
+  3. "48M at 10M(kernel-1\0" is passed to parse_subpart()
+  4. parse_subpart() fails to find ')' when parsing a partition name,
+     and returns error
+
+- Linux Kernel 6.1
+
+  [    0.000000] Kernel command line: console=ttyS0,115200 earlycon=uart8250,mmio32,0xf0512000 crashkernel=30M mvpp2x.queue_mode=1 blkdevparts=mmcblk1:48M at 10M(kernel-1),1M(dtb-1),720M(rootfs-1),48M(kernel-2),1M(dtb-2),720M(rootfs-2),300M(default_sw),650M(logs),1M(preset_cfg),1M(adsl),-(storage) maxcpus=4
+  ...
+  [    0.953142] mmc1: new HS200 MMC card at address 0001
+  [    0.959114] mmcblk1: mmc1:0001 004GA0 3.69 GiB
+  [    0.964259]  mmcblk1: p1(kernel-1) p2(dtb-1) p3(rootfs-1) p4(kernel-2) p5(dtb-2) 6(rootfs-2) p7(default_sw) p8(logs) p9(preset_cfg) p10(adsl) p11(storage)
+  [    0.979174] mmcblk1boot0: mmc1:0001 004GA0 2.00 MiB
+  [    0.984674] mmcblk1boot1: mmc1:0001 004GA0 2.00 MiB
+  [    0.989926] mmcblk1rpmb: mmc1:0001 004GA0 512 KiB, chardev (248:0
+
+By the way, strscpy() takes a length of destination buffer and it is
+often confusing when copying characters with a specified length. Using
+strsep() helps to separate the string by the specified character. Then,
+we can use strscpy() naturally with the size of the destination buffer.
+
+Separating the string on the fly is also useful to omit the redundant
+string copy, reducing memory usage and improve the code readability.
+
+Fixes: 146afeb235cc ("block: use strscpy() to instead of strncpy()")
+Suggested-by: Naohiro Aota <naota at elisp.net>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+---
+ block/partitions/cmdline.c | 49 ++++++++++----------------------------
+ 1 file changed, 12 insertions(+), 37 deletions(-)
+
+--- a/block/partitions/cmdline.c
++++ b/block/partitions/cmdline.c
+@@ -70,8 +70,8 @@ static int parse_subpart(struct cmdline_
+ 	}
+ 
+ 	if (*partdef == '(') {
+-		int length;
+-		char *next = strchr(++partdef, ')');
++		partdef++;
++		char *next = strsep(&partdef, ")");
+ 
+ 		if (!next) {
+ 			pr_warn("cmdline partition format is invalid.");
+@@ -79,11 +79,7 @@ static int parse_subpart(struct cmdline_
+ 			goto fail;
+ 		}
+ 
+-		length = min_t(int, next - partdef,
+-			       sizeof(new_subpart->name) - 1);
+-		strscpy(new_subpart->name, partdef, length);
+-
+-		partdef = ++next;
++		strscpy(new_subpart->name, next, sizeof(new_subpart->name));
+ 	} else
+ 		new_subpart->name[0] = '\0';
+ 
+@@ -117,14 +113,12 @@ static void free_subpart(struct cmdline_
+ 	}
+ }
+ 
+-static int parse_parts(struct cmdline_parts **parts, const char *bdevdef)
++static int parse_parts(struct cmdline_parts **parts, char *bdevdef)
+ {
+ 	int ret = -EINVAL;
+ 	char *next;
+-	int length;
+ 	struct cmdline_subpart **next_subpart;
+ 	struct cmdline_parts *newparts;
+-	char buf[BDEVNAME_SIZE + 32 + 4];
+ 
+ 	*parts = NULL;
+ 
+@@ -132,28 +126,19 @@ static int parse_parts(struct cmdline_pa
+ 	if (!newparts)
+ 		return -ENOMEM;
+ 
+-	next = strchr(bdevdef, ':');
++	next = strsep(&bdevdef, ":");
+ 	if (!next) {
+ 		pr_warn("cmdline partition has no block device.");
+ 		goto fail;
+ 	}
+ 
+-	length = min_t(int, next - bdevdef, sizeof(newparts->name) - 1);
+-	strscpy(newparts->name, bdevdef, length);
++	strscpy(newparts->name, next, sizeof(newparts->name));
+ 	newparts->nr_subparts = 0;
+ 
+ 	next_subpart = &newparts->subpart;
+ 
+-	while (next && *(++next)) {
+-		bdevdef = next;
+-		next = strchr(bdevdef, ',');
+-
+-		length = (!next) ? (sizeof(buf) - 1) :
+-			min_t(int, next - bdevdef, sizeof(buf) - 1);
+-
+-		strscpy(buf, bdevdef, length);
+-
+-		ret = parse_subpart(next_subpart, buf);
++	while ((next = strsep(&bdevdef, ","))) {
++		ret = parse_subpart(next_subpart, next);
+ 		if (ret)
+ 			goto fail;
+ 
+@@ -199,24 +184,17 @@ static int cmdline_parts_parse(struct cm
+ 
+ 	*parts = NULL;
+ 
+-	next = pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
++	pbuf = buf = kstrdup(cmdline, GFP_KERNEL);
+ 	if (!buf)
+ 		return -ENOMEM;
+ 
+ 	next_parts = parts;
+ 
+-	while (next && *pbuf) {
+-		next = strchr(pbuf, ';');
+-		if (next)
+-			*next = '\0';
+-
+-		ret = parse_parts(next_parts, pbuf);
++	while ((next = strsep(&pbuf, ";"))) {
++		ret = parse_parts(next_parts, next);
+ 		if (ret)
+ 			goto fail;
+ 
+-		if (next)
+-			pbuf = ++next;
+-
+ 		next_parts = &(*next_parts)->next_parts;
+ 	}
+ 
+@@ -250,7 +228,6 @@ static struct cmdline_parts *bdev_parts;
+ static int add_part(int slot, struct cmdline_subpart *subpart,
+ 		struct parsed_partitions *state)
+ {
+-	int label_min;
+ 	struct partition_meta_info *info;
+ 	char tmp[sizeof(info->volname) + 4];
+ 
+@@ -262,9 +239,7 @@ static int add_part(int slot, struct cmd
+ 
+ 	info = &state->parts[slot].info;
+ 
+-	label_min = min_t(int, sizeof(info->volname) - 1,
+-			  sizeof(subpart->name));
+-	strscpy(info->volname, subpart->name, label_min);
++	strscpy(info->volname, subpart->name, sizeof(info->volname));
+ 
+ 	snprintf(tmp, sizeof(tmp), "(%s)", info->volname);
+ 	strlcat(state->pp_buf, tmp, PAGE_SIZE);



From lede-commits at lists.infradead.org  Fri May  3 15:02:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 18:02:55 -0400
Subject: [openwrt/openwrt]  ramips: remove unnecessary macros for previous
 kernel versions
In-Reply-To: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
References: <171477377147.3750826.14514375559907576226@git-01.infra.openwrt.org>
Message-ID: <mailman.33493.1714773778.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/263fde5ab87bc3f299e4bd2d33a22e0fe55f9545

commit 263fde5ab87bc3f299e4bd2d33a22e0fe55f9545
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri May 3 19:35:11 2024 +0200

    ramips: remove unnecessary macros for previous kernel versions
    
    Remove unnecessary 'if' macros for previous kernel versions.
    After removing kernel 6.1 the kernel is always >= 6.6 so the conditions
    are unnecessary.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    [removed some more and also no longer include version.h]
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c   |  8 --------
 .../ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c     |  8 --------
 .../ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h     |  1 -
 target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c     | 10 ----------
 4 files changed, 27 deletions(-)

diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
index ca3b6fb302..5d4cebb089 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
@@ -199,20 +199,12 @@ static void fe_get_ethtool_stats(struct net_device *dev,
 	do {
 		data_src = &hwstats->tx_bytes;
 		data_dst = data;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 		start = u64_stats_fetch_begin(&hwstats->syncp);
-#else
-		start = u64_stats_fetch_begin_irq(&hwstats->syncp);
-#endif
 
 		for (i = 0; i < ARRAY_SIZE(fe_gdma_str); i++)
 			*data_dst++ = *data_src++;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 	} while (u64_stats_fetch_retry(&hwstats->syncp, start));
-#else
-	} while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
-#endif
 }
 
 static struct ethtool_ops fe_ethtool_ops = {
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
index 4365e398d3..c8afa4e3bb 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
@@ -487,11 +487,7 @@ static void fe_get_stats64(struct net_device *dev,
 	}
 
 	do {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 		start = u64_stats_fetch_begin(&hwstats->syncp);
-#else
-		start = u64_stats_fetch_begin_irq(&hwstats->syncp);
-#endif
 		storage->rx_packets = hwstats->rx_packets;
 		storage->tx_packets = hwstats->tx_packets;
 		storage->rx_bytes = hwstats->rx_bytes;
@@ -503,11 +499,7 @@ static void fe_get_stats64(struct net_device *dev,
 		storage->rx_crc_errors = hwstats->rx_fcs_errors;
 		storage->rx_errors = hwstats->rx_checksum_errors;
 		storage->tx_aborted_errors = hwstats->tx_skip;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 	} while (u64_stats_fetch_retry(&hwstats->syncp, start));
-#else
-	} while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
-#endif
 
 	storage->tx_errors = priv->netdev->stats.tx_errors;
 	storage->rx_dropped = priv->netdev->stats.rx_dropped;
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h
index 364dd54a58..151caae1dc 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.h
@@ -21,7 +21,6 @@
 #include <linux/dma-mapping.h>
 #include <linux/phy.h>
 #include <linux/ethtool.h>
-#include <linux/version.h>
 
 enum fe_reg {
 	FE_REG_PDMA_GLO_CFG = 0,
diff --git a/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c b/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
index a429bb82a3..8b642e28b1 100644
--- a/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
+++ b/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
@@ -16,7 +16,6 @@
 #include <linux/slab.h>
 #include <linux/of.h>
 #include <linux/of_device.h>
-#include <linux/version.h>
 #include <linux/gpio/consumer.h>
 #include <linux/gpio/driver.h>
 #include <linux/pinctrl/pinconf.h>
@@ -810,11 +809,7 @@ static int aw9523_init_gpiochip(struct aw9523 *awi, unsigned int npins)
 	gpiochip->set_multiple = aw9523_gpio_set_multiple;
 	gpiochip->set_config = gpiochip_generic_config;
 	gpiochip->parent = dev;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 	gpiochip->fwnode = dev->fwnode;
-#else
-	gpiochip->of_node = dev->of_node;
-#endif
 	gpiochip->owner = THIS_MODULE;
 	gpiochip->can_sleep = true;
 
@@ -988,12 +983,7 @@ static int aw9523_hw_init(struct aw9523 *awi)
 	return regmap_reinit_cache(awi->regmap, &aw9523_regmap);
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
 static int aw9523_probe(struct i2c_client *client)
-#else
-static int aw9523_probe(struct i2c_client *client,
-			const struct i2c_device_id *id)
-#endif
 {
 	struct device *dev = &client->dev;
 	struct pinctrl_desc *pdesc;



From lede-commits at lists.infradead.org  Fri May  3 15:41:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 18:41:06 -0400
Subject: [openwrt/openwrt]  sunxi: add support for Lichee Pi Zero Dock (V3s)
 board
In-Reply-To: <171477606672.3840948.18328762046918133821@git-01.infra.openwrt.org>
References: <171477606672.3840948.18328762046918133821@git-01.infra.openwrt.org>
Message-ID: <mailman.33499.1714776071.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3f7d8e20cd1b56bf6c8e20cb984724ae1fa7525c

commit 3f7d8e20cd1b56bf6c8e20cb984724ae1fa7525c
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Oct 27 18:23:57 2023 +0200

    sunxi: add support for Lichee Pi Zero Dock (V3s) board
    
    CPU:     Allwinner V3s single-core Cortex-A7 @ 1.2GHz
    Memory:  64Mb DDR2 integrated into SoC package
    Storage: 1x SDcard on board, 1x SDcard on dock
    Network: 10/100M ethernet
    Other:   4x buttons via LRADC, CSI
    
    Flashing instructions:
      Standard sunxi SD card installation procedure - copy image to SD card,
      insert into SD card slot on the device and boot.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 package/boot/uboot-sunxi/Makefile    | 7 +++++++
 target/linux/sunxi/image/cortexa7.mk | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile
index 112ea47d21..c6f98a0db4 100644
--- a/package/boot/uboot-sunxi/Makefile
+++ b/package/boot/uboot-sunxi/Makefile
@@ -140,6 +140,12 @@ define U-Boot/Linksprite_pcDuino
   BUILD_DEVICES:=linksprite_a10-pcduino
 endef
 
+define U-Boot/LicheePi_Zero
+  BUILD_SUBTARGET:=cortexa7
+  NAME:=Lichee Pi Zero V3s
+  BUILD_DEVICES:=licheepi_licheepi-zero-dock
+endef
+
 define U-Boot/Linksprite_pcDuino3
   BUILD_SUBTARGET:=cortexa7
   NAME:=Linksprite pcDuino3
@@ -389,6 +395,7 @@ UBOOT_TARGETS := \
 	Marsboard_A10 \
 	Mele_M9 \
 	OLIMEX_A13_SOM \
+	LicheePi_Zero \
 	Linksprite_pcDuino \
 	Linksprite_pcDuino3 \
 	Linksprite_pcDuino3_Nano \
diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk
index a85b20531d..e2d83fa94f 100644
--- a/target/linux/sunxi/image/cortexa7.mk
+++ b/target/linux/sunxi/image/cortexa7.mk
@@ -112,6 +112,14 @@ define Device/lemaker_bananapro
 endef
 TARGET_DEVICES += lemaker_bananapro
 
+define Device/licheepi_licheepi-zero-dock
+  DEVICE_VENDOR := LicheePi
+  DEVICE_MODEL := Zero with Dock (V3s)
+  DEVICE_PACKAGES:=kmod-rtc-sunxi
+  SOC := sun8i-v3s
+endef
+TARGET_DEVICES += licheepi_licheepi-zero-dock
+
 define Device/linksprite_pcduino3
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino3



From lede-commits at lists.infradead.org  Fri May  3 16:16:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 03 May 2024 19:16:06 -0400
Subject: [openwrt/openwrt]  Revert "mediatek: backport mt7622 dts fix for
 mt7531 switch id to 6.1"
In-Reply-To: <171477816661.3948499.13855110791352768885@git-01.infra.openwrt.org>
References: <171477816661.3948499.13855110791352768885@git-01.infra.openwrt.org>
Message-ID: <mailman.33505.1714778171.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6bb2551343fb53423c7129e93fee3b1abde402d1

commit 6bb2551343fb53423c7129e93fee3b1abde402d1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat May 4 00:14:48 2024 +0100

    Revert "mediatek: backport mt7622 dts fix for mt7531 switch id to 6.1"
    
    This reverts commit 3fe239fcf8d0ea91b947af25fd28a6133aba93c6.
    Now that we switched to Linux 6.6 this is no longer needed, and resulted
    in a left-over file because it's removal was not included in the commit
    removing all the other files intended for Linux 6.1.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../181-mt7622_fix_dts_mt7531_reg.patch            | 28 ----------------------
 1 file changed, 28 deletions(-)

diff --git a/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch b/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch
deleted file mode 100644
index 3d2c2c1dec..0000000000
--- a/target/linux/mediatek/patches-6.1/181-mt7622_fix_dts_mt7531_reg.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -152,9 +152,9 @@
- 		#address-cells = <1>;
- 		#size-cells = <0>;
- 
--		switch at 0 {
-+		switch at 1f {
- 			compatible = "mediatek,mt7531";
--			reg = <0>;
-+			reg = <31>;
- 			interrupt-controller;
- 			#interrupt-cells = <1>;
- 			interrupt-parent = <&pio>;
---- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -117,9 +117,9 @@
- 		#address-cells = <1>;
- 		#size-cells = <0>;
- 
--		switch at 0 {
-+		switch at 1f {
- 			compatible = "mediatek,mt7531";
--			reg = <0>;
-+			reg = <31>;
- 			reset-gpios = <&pio 54 0>;
- 
- 			ports {



From lede-commits at lists.infradead.org  Fri May  3 23:41:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:41:02 -0400
Subject: [openwrt/openwrt]  openssl: add linux64-loongarch64 into the targets
 list
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33528.1714804863.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/33cd87079b926d95a7bd85fdcd7614e869bd2851

commit 33cd87079b926d95a7bd85fdcd7614e869bd2851
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Tue Jan 9 15:54:50 2024 +0800

    openssl: add linux64-loongarch64 into the targets list
    
    Add "linux64-loongarch64-openwrt" into openssl configurations to enable
    building on loongarch64 machines.
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/libs/openssl/patches/110-openwrt_targets.patch | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/libs/openssl/patches/110-openwrt_targets.patch b/package/libs/openssl/patches/110-openwrt_targets.patch
index a97c603fa7..d02bc03fb8 100644
--- a/package/libs/openssl/patches/110-openwrt_targets.patch
+++ b/package/libs/openssl/patches/110-openwrt_targets.patch
@@ -9,7 +9,7 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github at yahoo.com>
 
 --- /dev/null
 +++ b/Configurations/25-openwrt.conf
-@@ -0,0 +1,56 @@
+@@ -0,0 +1,59 @@
 +## Openwrt "CONFIG_ARCH" matching targets.
 +
 +# The targets need to end in '-openwrt' for the AFALG patch to work
@@ -34,6 +34,9 @@ Signed-off-by: Eneas U de Queiroz <cote2004-github at yahoo.com>
 +    "linux-i386-openwrt" => {
 +        inherit_from    => [ "linux-x86", "openwrt" ],
 +    },
++    "linux-loongarch64-openwrt" => {
++        inherit_from    => [ "linux64-loongarch64", "openwrt" ],
++    },
 +    "linux-mips-openwrt" => {
 +        inherit_from    => [ "linux-mips32", "openwrt" ],
 +    },



From lede-commits at lists.infradead.org  Fri May  3 23:41:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:41:01 -0400
Subject: [openwrt/openwrt]  grub2: add EFI support for loongarch64
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33529.1714804864.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b98355ed0fc488876c24c2649f289a3934dc8854

commit b98355ed0fc488876c24c2649f289a3934dc8854
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:37:34 2024 +0800

    grub2: add EFI support for loongarch64
    
    Add a new package for loongarch64 which only supports EFI.
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/boot/grub2/Makefile | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index 279f2bd3c6..14933e80ce 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -42,6 +42,7 @@ endef
 Package/grub2=$(call Package/grub2/Default,x86,pc)
 Package/grub2-efi=$(call Package/grub2/Default,x86,efi)
 Package/grub2-efi-arm=$(call Package/grub2/Default,armsr,efi)
+Package/grub2-efi-loongarch64=$(call Package/grub2/Default,loongarch64,efi)
 
 define Package/grub2-editenv
   CATEGORY:=Utilities
@@ -191,6 +192,19 @@ define Package/grub2-efi-arm/install
 		reboot serial test efi_gop
 endef
 
+define Package/grub2-efi-loongarch64/install
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
+	cp ./files/grub-early-gpt.cfg $(PKG_BUILD_DIR)/grub-early.cfg
+	$(STAGING_DIR_HOST)/bin/grub-mkimage \
+		-d $(PKG_BUILD_DIR)/grub-core \
+		-p /boot/grub \
+		-O loongarch64-efi \
+		-c $(PKG_BUILD_DIR)/grub-early.cfg \
+		-o $(STAGING_DIR_IMAGE)/grub2/bootloongarch64.efi \
+		boot chain configfile fat linux ls lsefi minicmd part_gpt part_msdos reboot search \
+		search_fs_uuid search_label serial efi_gop all_video gfxterm ext2
+endef
+
 
 define Package/grub2-editenv/install
 	$(INSTALL_DIR) $(1)/usr/sbin
@@ -206,5 +220,6 @@ $(eval $(call HostBuild))
 $(eval $(call BuildPackage,grub2))
 $(eval $(call BuildPackage,grub2-efi))
 $(eval $(call BuildPackage,grub2-efi-arm))
+$(eval $(call BuildPackage,grub2-efi-loongarch64))
 $(eval $(call BuildPackage,grub2-editenv))
 $(eval $(call BuildPackage,grub2-bios-setup))



From lede-commits at lists.infradead.org  Fri May  3 23:41:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:41:03 -0400
Subject: [openwrt/openwrt]  libunwind: add support for loongarch64
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33530.1714804866.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3f28c422ba7ca06efd41686fd2f9e664f7e8a12e

commit 3f28c422ba7ca06efd41686fd2f9e664f7e8a12e
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Fri Mar 15 00:44:06 2024 +0800

    libunwind: add support for loongarch64
    
    Modify package depends to allow building for loongarch64.
    Also fix for building with musl.
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/libs/libunwind/Makefile                            |  2 +-
 package/libs/libunwind/patches/005-loongarch64-musl.pattch | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
index 7a82d76663..7bd3c5ac17 100644
--- a/package/libs/libunwind/Makefile
+++ b/package/libs/libunwind/Makefile
@@ -32,7 +32,7 @@ define Package/libunwind
   CATEGORY:=Libraries
   TITLE:=The libunwind project
   URL:=http://www.nongnu.org/libunwind/
-  DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
+  DEPENDS:=@((mips||mipsel||mips64||powerpc64||x86_64||arm||aarch64||loongarch64)||(USE_GLIBC&&(powerpc||i386))) +zlib
   ABI_VERSION:=8
 endef
 
diff --git a/package/libs/libunwind/patches/005-loongarch64-musl.pattch b/package/libs/libunwind/patches/005-loongarch64-musl.pattch
new file mode 100644
index 0000000000..bb961bdfad
--- /dev/null
+++ b/package/libs/libunwind/patches/005-loongarch64-musl.pattch
@@ -0,0 +1,12 @@
+--- a/src/loongarch64/getcontext.S
++++ b/src/loongarch64/getcontext.S
+@@ -25,7 +25,9 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
+ 
+ #include "offsets.h"
++#ifdef __GLIBC__
+ #include <endian.h>
++#endif
+ 	.text
+ 
+ #define SREG(X) st.d $r##X, $r4, (LINUX_UC_MCONTEXT_GREGS + 8 * X)



From lede-commits at lists.infradead.org  Fri May  3 23:40:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:40:58 -0400
Subject: [openwrt/openwrt]  toolchain: Disable libtsan and liblsan sanitizer
 on loongarch64
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33531.1714804866.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6eafcd86b87bf4ef0e2e8df2891f303b52c804b7

commit 6eafcd86b87bf4ef0e2e8df2891f303b52c804b7
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 12:50:51 2024 +0800

    toolchain: Disable libtsan and liblsan sanitizer on loongarch64
    
    libtsan and liblsan are not supported by glibc on loongarch64
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/libs/toolchain/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile
index 285fbcfa98..3dd844d65b 100644
--- a/package/libs/toolchain/Makefile
+++ b/package/libs/toolchain/Makefile
@@ -144,7 +144,7 @@ define Package/libtsan
 $(call Package/gcc/Default)
   NAME:=libtsan
   TITLE:=Runtime library for ThreadSanitizer in GCC
-  DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+  DEPENDS:=@USE_GLIBC +librt +libstdcpp @!loongarch64 @!mips @!mipsel @!mips64 @!mips64el @!arc
   ABI_VERSION:=0
 endef
 
@@ -173,7 +173,7 @@ define Package/liblsan
 $(call Package/gcc/Default)
   NAME:=liblsan
   TITLE:=Runtime library for LeakSanitizer in GCC
-  DEPENDS:=@USE_GLIBC +librt +libstdcpp @!mips @!mipsel @!mips64 @!mips64el @!arc
+  DEPENDS:=@USE_GLIBC +librt +libstdcpp @!loongarch64 @!mips @!mipsel @!mips64 @!mips64el @!arc
   ABI_VERSION:=0
 endef
 



From lede-commits at lists.infradead.org  Fri May  3 23:40:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:40:56 -0400
Subject: [openwrt/openwrt]  toolchain/musl: fix loongarch64 ldso file name
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33532.1714804868.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/197d90dc31741a5510cd2218eff0befa935312cd

commit 197d90dc31741a5510cd2218eff0befa935312cd
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Thu Apr 18 00:08:24 2024 +0800

    toolchain/musl: fix loongarch64 ldso file name
    
    GCC has changed musl dynamic linker name from
    ld-musl-loongarch-lp64d.so.1 to ld-musl-loongarch64.so.1 recently [1].
    
    This means there are two dynamic linker names will be used across different
    ersions of GCC. But musl 1.2.5 only supports the new name while the GCC
    we're currently using uses the old name.
    
    To maintain compatibility with all versions of GCC, the musl is then patched
    to generate two symbolic links to libc.so with both old and new names.
    
    [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8bccee51f0deac64b79cd9ad75df599422f4c8ff
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 .../musl/patches/400-fix-loongarch64-ldso-file-name.patch      | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch b/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch
new file mode 100644
index 0000000000..a19ceb4583
--- /dev/null
+++ b/toolchain/musl/patches/400-fix-loongarch64-ldso-file-name.patch
@@ -0,0 +1,10 @@
+--- a/Makefile
++++ b/Makefile
+@@ -218,6 +218,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/inc
+ 
+ $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
+ 	$(INSTALL) -D -l libc.so $@ || true
++	$(if $(filter loongarch64,$(ARCH)$(SUBARCH)),$(INSTALL) -D -l libc.so $(subst $(ARCH)$(SUBARCH).so.1,loongarch-lp64d.so.1,$@) || true)
+ 
+ install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if $(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
+ 



From lede-commits at lists.infradead.org  Fri May  3 23:40:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:40:57 -0400
Subject: [openwrt/openwrt]  loongarch64: new target
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33533.1714804868.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7fcb82665e96a50174084c8bfcd0302ce31291f4

commit 7fcb82665e96a50174084c8bfcd0302ce31291f4
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:10:45 2024 +0800

    loongarch64: new target
    
    Add target for Loongson LoongArch64-based boards.
    
    LoongArch is a new RISC ISA developed by Loongson. It's a bit like
    MIPS or RISC-V. LoongArch includes both 32-bit and 64-bit versions
    (LoongArch32/LoongArch64).
    
    Loongson 3A5000 and 3A6000 are the two existing CPUs of LoongArch64
    and is used for PC products. It's BIOS supports ACPI and UEFI-only
    boot. These CPUs supports SMP and SMT.
    
    At present only LoongArch64 is supported by linux kernel.
    
    Toolchain requirement:
    binutils >= 2.40
    gcc >= 13.1
    
    For details, please check the following links:
    https://lwn.net/Articles/861951/
    https://loongson.github.io/LoongArch-Documentation/README-EN.html
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 config/Config-images.in                            |  10 +-
 include/kernel.mk                                  |   2 +
 include/site/loongarch64                           |  30 +
 include/target.mk                                  |   5 +
 target/Config.in                                   |   5 +
 target/linux/loongarch64/Makefile                  |  22 +
 target/linux/loongarch64/base-files.mk             |   8 +
 target/linux/loongarch64/base-files/etc/inittab    |   4 +
 .../base-files/lib/preinit/01_sysinfo_acpi         |  52 ++
 .../base-files/lib/preinit/79_move_config          |  19 +
 .../loongarch64/base-files/lib/upgrade/platform.sh | 167 +++++
 target/linux/loongarch64/config-6.6                | 806 +++++++++++++++++++++
 target/linux/loongarch64/generic/target.mk         |   1 +
 target/linux/loongarch64/image/Makefile            |  92 +++
 target/linux/loongarch64/image/grub-efi.cfg        |  14 +
 toolchain/Config.in                                |   3 +
 16 files changed, 1236 insertions(+), 4 deletions(-)

diff --git a/config/Config-images.in b/config/Config-images.in
index 5222065b04..47f3dfc0d9 100644
--- a/config/Config-images.in
+++ b/config/Config-images.in
@@ -204,13 +204,14 @@ menu "Target Images"
 		default y
 
 	config GRUB_EFI_IMAGES
-		bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
-		depends on TARGET_x86 || TARGET_armsr
+		bool "Build GRUB EFI images"
+		depends on TARGET_x86 || TARGET_armsr || TARGET_loongarch64
 		depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
 		select PACKAGE_grub2 if TARGET_x86
 		select PACKAGE_grub2-efi if TARGET_x86
 		select PACKAGE_grub2-bios-setup if TARGET_x86
 		select PACKAGE_grub2-efi-arm if TARGET_armsr
+		select PACKAGE_grub2-efi-loongarch64 if TARGET_loongarch64
 		select PACKAGE_kmod-fs-vfat
 		default y
 
@@ -276,12 +277,12 @@ menu "Target Images"
 
 	config TARGET_SERIAL
 		string "Serial port device"
-		depends on TARGET_x86 || TARGET_armsr
+		depends on TARGET_x86 || TARGET_armsr || TARGET_loongarch64
 		default "ttyS0"
 
 	config TARGET_IMAGES_GZIP
 		bool "GZip images"
-		depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
+		depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta || TARGET_loongarch64
 		default y
 
 	comment "Image Options"
@@ -300,6 +301,7 @@ menu "Target Images"
 	config TARGET_ROOTFS_PARTSIZE
 		int "Root filesystem partition size (in MiB)"
 		depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
+		default 232 if TARGET_loongarch64
 		default 448 if TARGET_mediatek
 		default 104
 		help
diff --git a/include/kernel.mk b/include/kernel.mk
index 479c586ea2..6ef766388a 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -86,6 +86,8 @@ else ifneq (,$(findstring $(ARCH) , arceb ))
   LINUX_KARCH := arc
 else ifneq (,$(findstring $(ARCH) , armeb ))
   LINUX_KARCH := arm
+else ifneq (,$(findstring $(ARCH) , loongarch64 ))
+  LINUX_KARCH := loongarch
 else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
   LINUX_KARCH := mips
 else ifneq (,$(findstring $(ARCH) , powerpc64 ))
diff --git a/include/site/loongarch64 b/include/site/loongarch64
new file mode 100644
index 0000000000..b8d581d448
--- /dev/null
+++ b/include/site/loongarch64
@@ -0,0 +1,30 @@
+#!/bin/sh
+. $TOPDIR/include/site/linux
+ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
+ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
+
+ac_cv_sizeof___int64=0
+ac_cv_sizeof_char=1
+ac_cv_sizeof_int=4
+ac_cv_sizeof_int16_t=2
+ac_cv_sizeof_int32_t=4
+ac_cv_sizeof_int64_t=8
+ac_cv_sizeof_long_int=8
+ac_cv_sizeof_long_long=8
+ac_cv_sizeof_long=8
+ac_cv_sizeof_off_t=8
+ac_cv_sizeof_short_int=2
+ac_cv_sizeof_short=2
+ac_cv_sizeof_size_t=8
+ac_cv_sizeof_ssize_t=8
+ac_cv_sizeof_u_int16_t=2
+ac_cv_sizeof_u_int32_t=4
+ac_cv_sizeof_u_int64_t=8
+ac_cv_sizeof_uint16_t=2
+ac_cv_sizeof_uint32_t=4
+ac_cv_sizeof_uint64_t=8
+ac_cv_sizeof_unsigned_int=4
+ac_cv_sizeof_unsigned_long=8
+ac_cv_sizeof_unsigned_long_long=8
+ac_cv_sizeof_unsigned_short=2
+ac_cv_sizeof_void_p=8
diff --git a/include/target.mk b/include/target.mk
index b5e3e7ff6f..68558601f3 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -264,6 +264,11 @@ ifeq ($(DUMP),1)
     CPU_TYPE ?= riscv64
     CPU_CFLAGS_riscv64:=-mabi=lp64d -march=rv64imafdc
   endif
+  ifeq ($(ARCH),loongarch64)
+    CPU_TYPE ?= generic
+    CPU_CFLAGS := -O2 -pipe
+    CPU_CFLAGS_generic:=-march=loongarch64
+  endif
   ifneq ($(CPU_TYPE),)
     ifndef CPU_CFLAGS_$(CPU_TYPE)
       $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)
diff --git a/target/Config.in b/target/Config.in
index ac0f1f9826..c2395923d4 100644
--- a/target/Config.in
+++ b/target/Config.in
@@ -156,6 +156,10 @@ config i386
 config i686
 	bool 
 
+config loongarch64
+	select ARCH_64BIT
+	bool
+
 config m68k
 	bool
 
@@ -220,6 +224,7 @@ config ARCH
 	default "armeb"     if armeb
 	default "i386"      if i386
 	default "i686"      if i686
+	default "loongarch64" if loongarch64
 	default "m68k"      if m68k
 	default "mips"      if mips
 	default "mipsel"    if mipsel
diff --git a/target/linux/loongarch64/Makefile b/target/linux/loongarch64/Makefile
new file mode 100644
index 0000000000..f8401c2b2e
--- /dev/null
+++ b/target/linux/loongarch64/Makefile
@@ -0,0 +1,22 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2024 Weijie Gao <hackpascal at gmail.com>
+
+include $(TOPDIR)/rules.mk
+
+ARCH:=loongarch64
+BOARD:=loongarch64
+BOARDNAME:=Loongson LoongArch
+FEATURES:=audio display ext4 pcie boot-part rootfs-part rtc usb targz
+SUBTARGETS:=generic
+
+KERNEL_PATCHVER:=6.6
+
+KERNELNAME:=vmlinuz.efi dtbs
+
+include $(INCLUDE_DIR)/target.mk
+
+DEFAULT_PACKAGES += \
+	partx-utils blkid e2fsprogs grub2-efi-loongarch64
+
+$(eval $(call BuildTarget))
diff --git a/target/linux/loongarch64/base-files.mk b/target/linux/loongarch64/base-files.mk
new file mode 100644
index 0000000000..e2b7d05f57
--- /dev/null
+++ b/target/linux/loongarch64/base-files.mk
@@ -0,0 +1,8 @@
+GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
+ifeq ($(GRUB_SERIAL),)
+$(error This platform requires CONFIG_TARGET_SERIAL be set!)
+endif
+
+define Package/base-files/install-target
+	$(SED) "s#@GRUB_SERIAL@#$(GRUB_SERIAL)#" $(1)/etc/inittab
+endef
diff --git a/target/linux/loongarch64/base-files/etc/inittab b/target/linux/loongarch64/base-files/etc/inittab
new file mode 100644
index 0000000000..584a4114d4
--- /dev/null
+++ b/target/linux/loongarch64/base-files/etc/inittab
@@ -0,0 +1,4 @@
+::sysinit:/etc/init.d/rcS S boot
+::shutdown:/etc/init.d/rcS K shutdown
+ at GRUB_SERIAL@::askfirst:/usr/libexec/login.sh
+tty0::askfirst:/usr/libexec/login.sh
diff --git a/target/linux/loongarch64/base-files/lib/preinit/01_sysinfo_acpi b/target/linux/loongarch64/base-files/lib/preinit/01_sysinfo_acpi
new file mode 100644
index 0000000000..4d9e92e544
--- /dev/null
+++ b/target/linux/loongarch64/base-files/lib/preinit/01_sysinfo_acpi
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+sanitize_name_loongarch64() {
+	sed -e '
+		y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;
+		s/[^a-z0-9_-]\+/-/g;
+		s/^-//;
+		s/-$//;
+	' "$@"
+}
+
+do_sysinfo_loongarch64() {
+	local vendor product file
+
+	for file in sys_vendor board_vendor; do
+		vendor="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)"
+		case "$vendor" in
+		empty | \
+		System\ manufacturer | \
+		To\ [bB]e\ [fF]illed\ [bB]y\ O\.E\.M\.)
+			continue
+			;;
+		esac
+		[ -n "$vendor" ] && break
+	done
+
+	for file in product_name board_name; do
+		product="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)"
+		case "$vendor:$product" in
+		?*:empty | \
+		?*:System\ Product\ Name | \
+		?*:To\ [bB]e\ [fF]illed\ [bB]y\ O\.E\.M\.)
+			continue
+			;;
+		?*:?*)
+			break
+			;;
+		esac
+	done
+
+	[ -d "/sys/firmware/devicetree/base" ] && return
+
+	[ -n "$vendor" -a -n "$product" ] || return
+
+	mkdir -p /tmp/sysinfo
+
+	echo "$vendor $product" > /tmp/sysinfo/model
+
+	sanitize_name_loongarch64 /tmp/sysinfo/model > /tmp/sysinfo/board_name
+}
+
+boot_hook_add preinit_main do_sysinfo_loongarch64
diff --git a/target/linux/loongarch64/base-files/lib/preinit/79_move_config b/target/linux/loongarch64/base-files/lib/preinit/79_move_config
new file mode 100644
index 0000000000..864d4dfa64
--- /dev/null
+++ b/target/linux/loongarch64/base-files/lib/preinit/79_move_config
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+move_config() {
+	local partdev parttype=ext4
+
+	. /lib/upgrade/common.sh
+
+	if export_bootdevice && export_partdevice partdev 1; then
+		part_magic_fat "/dev/$partdev" && parttype=vfat
+		if mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt; then
+			if [ -f "/mnt/$BACKUP_FILE" ]; then
+				mv -f "/mnt/$BACKUP_FILE" /
+			fi
+			umount /mnt
+		fi
+	fi
+}
+
+boot_hook_add preinit_mount_root move_config
diff --git a/target/linux/loongarch64/base-files/lib/upgrade/platform.sh b/target/linux/loongarch64/base-files/lib/upgrade/platform.sh
new file mode 100644
index 0000000000..a0d4c2dcec
--- /dev/null
+++ b/target/linux/loongarch64/base-files/lib/upgrade/platform.sh
@@ -0,0 +1,167 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+RAMFS_COPY_BIN="/usr/sbin/blkid"
+
+platform_check_image() {
+	local board=$(board_name)
+	local diskdev partdev diff
+	[ "$#" -gt 1 ] && return 1
+
+	v "Board is ${board}"
+
+	export_bootdevice && export_partdevice diskdev 0 || {
+		v "platform_check_image: Unable to determine upgrade device"
+		return 1
+	}
+
+	get_partitions "/dev/$diskdev" bootdisk
+
+	v "Extract boot sector from the image"
+	get_image_dd "$1" of=/tmp/image.bs count=63 bs=512b
+
+	get_partitions /tmp/image.bs image
+
+	#compare tables
+	diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+
+	rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
+
+	if [ -n "$diff" ]; then
+		v "Partition layout has changed. Full image will be written."
+		ask_bool 0 "Abort" && exit 1
+		return 0
+	fi
+}
+
+platform_copy_config() {
+	local partdev parttype=ext4
+
+	if export_partdevice partdev 1; then
+		part_magic_fat "/dev/$partdev" && parttype=vfat
+		mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt
+		cp -af "$UPGRADE_BACKUP" "/mnt/$BACKUP_FILE"
+		umount /mnt
+	else
+		v "ERROR: Unable to find partition to copy config data to"
+	fi
+
+	sleep 5
+}
+
+# To avoid writing over any firmware
+# files (e.g ubootefi.var or firmware/X/ aka EBBR)
+# Copy efi/openwrt and efi/boot from the new image
+# to the existing ESP
+platform_do_upgrade_efi_system_partition() {
+	local image_file=$1
+	local target_partdev=$2
+	local image_efisp_start=$3
+	local image_efisp_size=$4
+
+	v "Updating ESP on ${target_partdev}"
+	NEW_ESP_DIR="/mnt/new_esp_loop"
+	CUR_ESP_DIR="/mnt/cur_esp"
+	mkdir "${NEW_ESP_DIR}"
+	mkdir "${CUR_ESP_DIR}"
+
+	get_image_dd "$image_file" of="/tmp/new_efi_sys_part.img" \
+		skip="$image_efisp_start" count="$image_efisp_size"
+
+	mount -t vfat -o loop -o ro /tmp/new_efi_sys_part.img "${NEW_ESP_DIR}"
+	if [ ! -d "${NEW_ESP_DIR}/efi/boot" ]; then
+		v "ERROR: Image does not contain EFI boot files (/efi/boot)"
+		return 1
+	fi
+
+	mount -t vfat "/dev/$partdev" "${CUR_ESP_DIR}"
+
+	for d in $(find "${NEW_ESP_DIR}/efi/" -mindepth 1 -maxdepth 1 -type d); do
+		v "Copying ${d}"
+		newdir_bname=$(basename "${d}")
+		rm -rf "${CUR_ESP_DIR}/efi/${newdir_bname}"
+		cp -r "${d}" "${CUR_ESP_DIR}/efi"
+		v "rm -rf \"${CUR_ESP_DIR}/efi/${newdir_bname}\""
+		v "cp -r \"${d}\" \"${CUR_ESP_DIR}/efi\""
+	done
+
+	umount "${NEW_ESP_DIR}"
+	umount "${CUR_ESP_DIR}"
+}
+
+platform_do_upgrade() {
+	local board=$(board_name)
+	local diskdev partdev diff
+
+	export_bootdevice && export_partdevice diskdev 0 || {
+		v "platform_do_upgrade: Unable to determine upgrade device"
+		return 1
+	}
+
+	sync
+
+	if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
+		get_partitions "/dev/$diskdev" bootdisk
+
+		v "Extract boot sector from the image"
+		get_image_dd "$1" of=/tmp/image.bs count=63 bs=512b
+
+		get_partitions /tmp/image.bs image
+
+		#compare tables
+		diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
+	else
+		diff=1
+	fi
+
+	# Only change the partition table if sysupgrade -p is set,
+	# otherwise doing so could interfere with embedded "single storage"
+	# (e.g SoC boot from SD card) setups, as well as other user
+	# created storage (like uvol)
+	if [ -n "$diff" ] && [ "${UPGRADE_OPT_SAVE_PARTITIONS}" = "0" ]; then
+		# Need to remove partitions before dd, otherwise the partitions
+		# that are added after will have minor numbers offset
+		partx -d - "/dev/$diskdev"
+
+		get_image_dd "$1" of="/dev/$diskdev" bs=4096 conv=fsync
+
+		# Separate removal and addtion is necessary; otherwise, partition 1
+		# will be missing if it overlaps with the old partition 2
+		partx -a - "/dev/$diskdev"
+
+		return 0
+	fi
+
+	#iterate over each partition from the image and write it to the boot disk
+	while read part start size; do
+		if export_partdevice partdev $part; then
+			v "Writing image to /dev/$partdev..."
+			if [ "$part" = "1" ]; then
+				platform_do_upgrade_efi_system_partition \
+					$1 $partdev $start $size || return 1
+			else
+				v "Normal partition, doing DD"
+				get_image_dd "$1" of="/dev/$partdev" ibs=512 obs=1M skip="$start" \
+					count="$size" conv=fsync
+			fi
+		else
+			v "Unable to find partition $part device, skipped."
+		fi
+	done < /tmp/partmap.image
+
+	local parttype=ext4
+
+	if (blkid > /dev/null) && export_partdevice partdev 1; then
+		part_magic_fat "/dev/$partdev" && parttype=vfat
+		mount -t $parttype -o rw,noatime "/dev/$partdev" /mnt
+		if export_partdevice partdev 2; then
+			THIS_PART_BLKID=$(blkid -o value -s PARTUUID "/dev/${partdev}")
+			v "Setting rootfs PARTUUID=${THIS_PART_BLKID}"
+			sed -i "s/\(PARTUUID=\)[a-f0-9-]\+/\1${THIS_PART_BLKID}/ig" \
+				/mnt/efi/openwrt/grub.cfg
+		fi
+		umount /mnt
+	fi
+	# Provide time for the storage medium to flush before system reset
+	# (despite the sync/umount it appears NVMe etc. do it in the background)
+	sleep 5
+}
diff --git a/target/linux/loongarch64/config-6.6 b/target/linux/loongarch64/config-6.6
new file mode 100644
index 0000000000..596301f0f4
--- /dev/null
+++ b/target/linux/loongarch64/config-6.6
@@ -0,0 +1,806 @@
+# CONFIG_16KB_2LEVEL is not set
+CONFIG_16KB_3LEVEL=y
+# CONFIG_4KB_3LEVEL is not set
+# CONFIG_4KB_4LEVEL is not set
+CONFIG_64BIT=y
+# CONFIG_64KB_2LEVEL is not set
+# CONFIG_64KB_3LEVEL is not set
+CONFIG_AC97_BUS=y
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_CPU_FREQ_PSS=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_FFH is not set
+CONFIG_ACPI_GENERIC_GSI=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_I2C_OPREGION=y
+CONFIG_ACPI_MCFG=y
+# CONFIG_ACPI_PCI_SLOT is not set
+# CONFIG_ACPI_PFRUT is not set
+CONFIG_ACPI_PPTT=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_SLEEP=y
+# CONFIG_ACPI_SPCR_TABLE is not set
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_TABLE_UPGRADE=y
+# CONFIG_ACPI_TAD is not set
+CONFIG_ACPI_THERMAL=y
+CONFIG_ACPI_VIDEO=y
+CONFIG_APERTURE_HELPERS=y
+CONFIG_ARCH_DISABLE_KASAN_INLINE=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+# CONFIG_ARCH_IOREMAP is not set
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS=12
+CONFIG_ARCH_MMAP_RND_BITS_MAX=18
+CONFIG_ARCH_MMAP_RND_BITS_MIN=12
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_STRICT_ALIGN=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+# CONFIG_ARCH_WRITECOMBINE is not set
+CONFIG_ASN1=y
+CONFIG_ASSOCIATIVE_ARRAY=y
+CONFIG_ATA=y
+CONFIG_ATA_ACPI=y
+CONFIG_ATA_FORCE=y
+# CONFIG_ATA_SFF is not set
+CONFIG_ATA_VERBOSE_ERROR=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_GENERIC=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_KTZ8866 is not set
+CONFIG_BLK_CGROUP=y
+CONFIG_BLK_CGROUP_IOCOST=y
+CONFIG_BLK_CGROUP_RWSTAT=y
+CONFIG_BLK_DEBUG_FS=y
+CONFIG_BLK_DEBUG_FS_ZONED=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_BSG_COMMON=y
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_INTEGRITY_T10=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_THROTTLING=y
+# CONFIG_BLK_DEV_THROTTLING_LOW is not set
+CONFIG_BLK_DEV_ZONED=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BLK_RQ_ALLOC_TIME=y
+CONFIG_BLK_SED_OPAL=y
+CONFIG_BLK_WBT=y
+CONFIG_BLK_WBT_MQ=y
+CONFIG_BLOCK_LEGACY_AUTOLOAD=y
+CONFIG_BOOT_PRINTK_DELAY=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_BUFFER_HEAD=y
+CONFIG_BUG_ON_DATA_CORRUPTION=y
+CONFIG_CACHESTAT_SYSCALL=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CDROM=y
+CONFIG_CFS_BANDWIDTH=y
+CONFIG_CGROUPS=y
+# CONFIG_CGROUP_BPF is not set
+# CONFIG_CGROUP_CPUACCT is not set
+# CONFIG_CGROUP_DEBUG is not set
+# CONFIG_CGROUP_DEVICE is not set
+# CONFIG_CGROUP_FREEZER is not set
+# CONFIG_CGROUP_HUGETLB is not set
+# CONFIG_CGROUP_NET_CLASSID is not set
+# CONFIG_CGROUP_NET_PRIO is not set
+# CONFIG_CGROUP_PIDS is not set
+# CONFIG_CGROUP_RDMA is not set
+CONFIG_CGROUP_SCHED=y
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_CHR_DEV_SG=y
+CONFIG_CLZ_TAB=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_CMDLINE_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+# CONFIG_COMMON_CLK_LOONGSON2 is not set
+# CONFIG_COMMON_CLK_SI521XX is not set
+# CONFIG_COMMON_CLK_VC3 is not set
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+# CONFIG_COMPAT_32BIT_TIME is not set
+CONFIG_CONNECTOR=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_COREDUMP=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+CONFIG_CPUSETS=y
+CONFIG_CPU_HAS_FPU=y
+CONFIG_CPU_HAS_LASX=y
+CONFIG_CPU_HAS_LBT=y
+CONFIG_CPU_HAS_LSX=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_ISOLATION=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+CONFIG_CRC64=y
+CONFIG_CRC64_ROCKSOFT=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_CRC32_LOONGARCH is not set
+CONFIG_CRYPTO_CRC64_ROCKSOFT=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RSA=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_DCB=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
+# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
+# CONFIG_DEBUG_INFO_COMPRESSED_ZSTD is not set
+CONFIG_DEBUG_LIST=y
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_MISC=y
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
+# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
+# CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
+# CONFIG_DEVFREQ_GOV_USERSPACE is not set
+CONFIG_DEVFREQ_THERMAL=y
+CONFIG_DEVMEM=y
+CONFIG_DEVTMPFS=y
+# CONFIG_DMAPOOL_TEST is not set
+CONFIG_DMA_CMA=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DMI=y
+CONFIG_DMIID=y
+CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
+CONFIG_DMI_SYSFS=y
+CONFIG_DRM=y
+# CONFIG_DRM_ACCEL is not set
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_LOAD_EDID_FIRMWARE=y
+CONFIG_DRM_LOONGSON=y
+CONFIG_DRM_PANEL=y
+# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set
+# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set
+# CONFIG_DRM_SAMSUNG_DSIM is not set
+CONFIG_DRM_TTM=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EFI=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_EFI_BOOTLOADER_CONTROL is not set
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_COCO_SECRET is not set
+CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# CONFIG_EFI_DISABLE_RUNTIME is not set
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_ESRT=y
+CONFIG_EFI_GENERIC_STUB=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+CONFIG_EFI_STUB=y
+# CONFIG_EFI_TEST is not set
+CONFIG_EFI_ZBOOT=y
+CONFIG_ELF_CORE=y
+CONFIG_ENCRYPTED_KEYS=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXPORTFS_BLOCK_OPS=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
+CONFIG_FAILOVER=y
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FANOTIFY=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CORE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_DEVICE=y
+CONFIG_FB_EFI=y
+CONFIG_FB_IOMEM_HELPERS=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_SIMPLE=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_FHANDLE=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FIX_EARLYCON_MEM=y
+# CONFIG_FLATMEM_MANUAL is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_10x18 is not set
+# CONFIG_FONT_6x10 is not set
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+CONFIG_FONT_8x16=y
+CONFIG_FONT_8x8=y
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_SUN8x16 is not set
+CONFIG_FONT_SUPPORT=y
+CONFIG_FONT_TER16x32=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FREEZER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FUNCTION_ALIGNMENT=0
+CONFIG_FW_CACHE=y
+# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_ENTRY=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOREMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
+CONFIG_GPIO_ACPI=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_CDEV_V1=y
+# CONFIG_GPIO_DS4520 is not set
+# CONFIG_GPIO_FXL6408 is not set
+# CONFIG_GPIO_LATCH is not set
+# CONFIG_GPIO_LOONGSON_64BIT is not set
+CONFIG_HAMRADIO=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HDMI=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HIBERNATION=y
+CONFIG_HIBERNATION_SNAPSHOT_DEV=y
+CONFIG_HID=y
+CONFIG_HIDRAW=y
+CONFIG_HID_GENERIC=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
+CONFIG_HWMON=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HZ=250
+# CONFIG_HZ_100 is not set
+CONFIG_HZ_250=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_LS2X is not set
+CONFIG_INITRAMFS_PRESERVE_MTIME=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INIT_STACK_ALL_ZERO=y
+# CONFIG_INIT_STACK_NONE is not set
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_LEDS=y
+# CONFIG_INPUT_MISC is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_SPARSEKMAP=y
+# CONFIG_IOMMUFD is not set
+# CONFIG_IOMMU_DEBUGFS is not set
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IO_URING=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_LOONGARCH_CPU=y
+CONFIG_IRQ_POLL=y
+CONFIG_IRQ_WORK=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_ISO9660_FS=y
+CONFIG_JBD2=y
+CONFIG_JUMP_LABEL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_SELFTEST is not set
+CONFIG_KCMP=y
+CONFIG_KEYS=y
+CONFIG_KSM=y
+CONFIG_L1_CACHE_SHIFT=6
+# CONFIG_LEDS_AW200XX is not set
+# CONFIG_LEDS_BD2606MVV is not set
+# CONFIG_LEDS_GROUP_MULTICOLOR is not set
+# CONFIG_LEDS_LM3697 is not set
+# CONFIG_LEDS_PCA995X is not set
+CONFIG_LEDS_TRIGGER_AUDIO=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_LEDS_TRIGGER_MTD=y
+CONFIG_LEDS_TRIGGER_PANIC=y
+CONFIG_LEGACY_TIOCSTI=y
+CONFIG_LIBFDT=y
+CONFIG_LIST_HARDENED=y
+CONFIG_LOCKUP_DETECTOR=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LOONGARCH=y
+CONFIG_LOONGARCH_PLATFORM_DEVICES=y
+# CONFIG_LOONGSON2_GUTS is not set
+# CONFIG_LOONGSON2_PM is not set
+# CONFIG_LOONGSON2_THERMAL is not set
+CONFIG_LOONGSON_EIOINTC=y
+CONFIG_LOONGSON_HTVEC=y
+CONFIG_LOONGSON_LAPTOP=y
+CONFIG_LOONGSON_LIOINTC=y
+CONFIG_LOONGSON_PCH_LPC=y
+CONFIG_LOONGSON_PCH_MSI=y
+CONFIG_LOONGSON_PCH_PIC=y
+CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,apparmor,selinux,smack,tomoyo,bpf"
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACH_LOONGSON64=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x01b6
+CONFIG_MAGIC_SYSRQ_SERIAL=y
+# CONFIG_MAX31827 is not set
+CONFIG_MAX_SKB_FRAGS=17
+# CONFIG_MEMCG is not set
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+# CONFIG_MFD_CS42L43_I2C is not set
+# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
+# CONFIG_MFD_MAX5970 is not set
+# CONFIG_MFD_MAX77541 is not set
+# CONFIG_MFD_RK8XX_I2C is not set
+# CONFIG_MFD_RK8XX_SPI is not set
+# CONFIG_MFD_SMPRO is not set
+# CONFIG_MFD_TPS65219 is not set
+# CONFIG_MFD_TPS6594_I2C is not set
+# CONFIG_MFD_TPS6594_SPI is not set
+CONFIG_MIGRATION=y
+CONFIG_MMU_GATHER_MERGE_VMAS=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
+CONFIG_MODULES_USE_ELF_RELA=y
+# CONFIG_MODULE_DEBUG is not set
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_CYAPA is not set
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_BYD=y
+CONFIG_MOUSE_PS2_CYPRESS=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SMBUS=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+CONFIG_MPILIB=y
+CONFIG_MQ_IOSCHED_DEADLINE=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
+CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
+# CONFIG_NET_CLS_CGROUP is not set
+CONFIG_NET_EGRESS=y
+CONFIG_NET_FAILOVER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_XGRESS=y
+CONFIG_NLS=y
+CONFIG_NR_CPUS=64
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_NVME_CORE=y
+CONFIG_NVME_HWMON=y
+CONFIG_NVME_MULTIPATH=y
+CONFIG_NVME_VERBOSE_ERRORS=y
+# CONFIG_N_HDLC is not set
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OID_REGISTRY=y
+# CONFIG_OVERLAY_FS_DEBUG is not set
+CONFIG_PADATA=y
+CONFIG_PAGE_EXTENSION=y
+CONFIG_PAGE_POISONING=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_POOL_STATS=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_PAGE_SIZE_16KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+# CONFIG_PANIC_ON_OOPS is not set
+CONFIG_PANIC_ON_OOPS_VALUE=0
+CONFIG_PATA_TIMINGS=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DPC=y
+# CONFIG_PCIE_EDR is not set
+CONFIG_PCIE_PME=y
+CONFIG_PCIE_PTM=y
+CONFIG_PCI_ATS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+# CONFIG_PCI_DYNAMIC_OF_NODES is not set
+CONFIG_PCI_ECAM=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_LABEL=y
+CONFIG_PCI_LOONGSON=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_ARCH_FALLBACKS=y
+CONFIG_PCI_REALLOC_ENABLE_AUTO=y
+CONFIG_PCPU_DEV_REFCNT=y
+# CONFIG_PDS_CORE is not set
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_3LEVEL=y
+CONFIG_PGTABLE_LEVELS=3
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PM=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PM_ADVANCED_DEBUG=y
+CONFIG_PM_CLK=y
+CONFIG_PM_DEBUG=y
+CONFIG_PM_DEVFREQ=y
+# CONFIG_PM_DEVFREQ_EVENT is not set
+CONFIG_PM_OPP=y
+CONFIG_PM_SLEEP=y
+CONFIG_PM_SLEEP_DEBUG=y
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PM_STD_PARTITION=""
+# CONFIG_PM_TEST_SUSPEND is not set
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+# CONFIG_PNP_DEBUG_MESSAGES is not set
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_POWER_SUPPLY_HWMON=y
+CONFIG_PPS=y
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_VOLUNTARY=y
+CONFIG_PREEMPT_VOLUNTARY_BUILD=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PROC_CHILDREN=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PROC_PID_CPUSET=y
+CONFIG_PTP_1588_CLOCK=y
+# CONFIG_PTP_1588_CLOCK_MOCK is not set
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+# CONFIG_RANDOM_KMALLOC_CACHES is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+# CONFIG_RAVE_SP_CORE is not set
+# CONFIG_RCU_CPU_STALL_CPUTIME is not set
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_RELAY=y
+CONFIG_RELOCATABLE=y
+CONFIG_RESET_ATTACK_MITIGATION=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RSEQ=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_EFI is not set
+CONFIG_RTC_DRV_LOONGSON=y
+CONFIG_RTC_I2C_AND_SPI=y
+# CONFIG_RT_GROUP_SCHED is not set
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_HOST=y
+# CONFIG_SATA_ZPODD is not set
+CONFIG_SCHEDSTATS=y
+CONFIG_SCHED_AUTOGROUP=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCHED_INFO=y
+CONFIG_SCHED_MM_CID=y
+CONFIG_SCHED_SMT=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
+# CONFIG_SENSORS_HS3001 is not set
+# CONFIG_SENSORS_MC34VR500 is not set
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_PCI=y
+# CONFIG_SERIAL_8250_PCI1XXXX is not set
+CONFIG_SERIAL_8250_PCILIB=y
+CONFIG_SERIAL_8250_PERICOM=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_NONSTANDARD=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+# CONFIG_SLAB_DEPRECATED is not set
+# CONFIG_SLUB_TINY is not set
+CONFIG_SMP=y
+CONFIG_SND=y
+CONFIG_SND_AC97_CODEC=y
+CONFIG_SND_COMPRESS_OFFLOAD=y
+CONFIG_SND_CTL_LED=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_HDA=y
+# CONFIG_SND_HDA_CODEC_ANALOG is not set
+# CONFIG_SND_HDA_CODEC_CA0110 is not set
+# CONFIG_SND_HDA_CODEC_CA0132 is not set
+# CONFIG_SND_HDA_CODEC_CIRRUS is not set
+# CONFIG_SND_HDA_CODEC_CMEDIA is not set
+CONFIG_SND_HDA_CODEC_CONEXANT=y
+CONFIG_SND_HDA_CODEC_HDMI=y
+# CONFIG_SND_HDA_CODEC_REALTEK is not set
+# CONFIG_SND_HDA_CODEC_SI3054 is not set
+# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
+# CONFIG_SND_HDA_CODEC_VIA is not set
+CONFIG_SND_HDA_CORE=y
+# CONFIG_SND_HDA_CTL_DEV_ID is not set
+CONFIG_SND_HDA_GENERIC=y
+CONFIG_SND_HDA_GENERIC_LEDS=y
+CONFIG_SND_HDA_HWDEP=y
+# CONFIG_SND_HDA_INPUT_BEEP is not set
+CONFIG_SND_HDA_INTEL=y
+# CONFIG_SND_HDA_PATCH_LOADER is not set
+# CONFIG_SND_HDA_RECONFIG is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
+# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
+CONFIG_SND_HWDEP=y
+CONFIG_SND_INTEL_DSP_CONFIG=y
+CONFIG_SND_INTEL_NHLT=y
+CONFIG_SND_INTEL_SOUNDWIRE_ACPI=y
+CONFIG_SND_JACK=y
+CONFIG_SND_JACK_INPUT_DEV=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_TIMER=y
+CONFIG_SND_RAWMIDI=y
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SEQ_DEVICE=y
+CONFIG_SND_SEQ_DUMMY=y
+CONFIG_SND_SEQ_MIDI=y
+CONFIG_SND_SEQ_MIDI_EVENT=y
+CONFIG_SND_SEQ_VIRMIDI=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC_AC97_CODEC=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SOC_LOONGSON_CARD=y
+CONFIG_SND_SOC_LOONGSON_I2S_PCI=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_VIRMIDI=y
+CONFIG_SND_VMASTER=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOFTLOCKUP_DETECTOR=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_DYNAMIC=y
+CONFIG_SPI_LOONGSON_CORE=y
+CONFIG_SPI_LOONGSON_PCI=y
+CONFIG_SPI_LOONGSON_PLATFORM=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_PCI1XXXX is not set
+# CONFIG_SPI_SN_F_OSPI is not set
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
+CONFIG_STACKPROTECTOR=y
+CONFIG_STACKPROTECTOR_STRONG=y
+CONFIG_STACKTRACE=y
+CONFIG_STRICT_DEVMEM=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_SWIOTLB=y
+# CONFIG_SWIOTLB_DYNAMIC is not set
+CONFIG_SYNC_FILE=y
+CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW=y
+CONFIG_SYSCTL_ARCH_UNALIGN_NO_WARN=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYSFB=y
+# CONFIG_SYSFB_SIMPLEFB is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_TASK_XACCT=y
+# CONFIG_TEST_DHRY is not set
+CONFIG_THERMAL=y
+# CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG is not set
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_BANG_BANG=y
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_THERMAL_STATISTICS=y
+CONFIG_THERMAL_WRITABLE_TRIPS=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TMPFS_INODE64=y
+CONFIG_TMPFS_POSIX_ACL=y
+# CONFIG_TMPFS_QUOTA is not set
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
+# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UCS2_STRING=y
+# CONFIG_UEVENT_HELPER is not set
+# CONFIG_UNWINDER_GUESS is not set
+CONFIG_UNWINDER_PROLOGUE=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PCI=y
+# CONFIG_USB_OHCI_HCD_PLATFORM is not set
+CONFIG_USB_PCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_UAS=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PCI=y
+# CONFIG_USB_XHCI_PLATFORM is not set
+CONFIG_USERFAULTFD=y
+CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_USE_PERCPU_NUMA_NODE_ID=y
+# CONFIG_VCAP is not set
+CONFIG_VGA_ARB=y
+CONFIG_VGA_ARB_MAX_GPUS=16
+CONFIG_VGA_CONSOLE=y
+CONFIG_VIDEO_CMDLINE=y
+CONFIG_VIDEO_NOMODESET=y
+CONFIG_VIRTIO_VSOCKETS_COMMON=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VSOCKETS=y
+CONFIG_VSOCKETS_LOOPBACK=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_CONSOLE_SLEEP=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_WPCM450_SOC is not set
+# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
+CONFIG_XARRAY_MULTI=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+# CONFIG_ZONEFS_FS is not set
+CONFIG_ZONE_DMA32=y
diff --git a/target/linux/loongarch64/generic/target.mk b/target/linux/loongarch64/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/loongarch64/generic/target.mk
@@ -0,0 +1 @@
+BOARDNAME:=Generic
diff --git a/target/linux/loongarch64/image/Makefile b/target/linux/loongarch64/image/Makefile
new file mode 100644
index 0000000000..7000356292
--- /dev/null
+++ b/target/linux/loongarch64/image/Makefile
@@ -0,0 +1,92 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2024 Weijie Gao <hackpascal at gmail.com>
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
+GRUB2_VARIANT =
+GRUB_TERMINALS =
+GRUB_SERIAL_CONFIG =
+GRUB_TERMINAL_CONFIG =
+GRUB_CONSOLE_CMDLINE =
+
+ifneq ($(CONFIG_GRUB_CONSOLE),)
+  GRUB_CONSOLE_CMDLINE += console=tty0
+  GRUB_TERMINALS += console
+endif
+
+GRUB_SERIAL:=$(call qstrip,$(CONFIG_TARGET_SERIAL))
+
+GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_GRUB_BAUDRATE)n8$(if $(CONFIG_GRUB_FLOWCONTROL),r,)
+GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 --rtscts=$(if $(CONFIG_GRUB_FLOWCONTROL),on,off)
+GRUB_TERMINALS += serial
+
+GRUB_TERMINAL_CONFIG := terminal_input $(GRUB_TERMINALS); terminal_output $(GRUB_TERMINALS)
+
+ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
+ROOTPART:=$(if $(ROOTPART),$(ROOTPART),PARTUUID=$(IMG_PART_SIGNATURE)-02)
+GPT_ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
+GPT_ROOTPART:=$(if $(GPT_ROOTPART),$(GPT_ROOTPART),PARTUUID=$(shell echo $(IMG_PART_DISKGUID) | sed 's/00$$/02/'))
+
+GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_GRUB_TIMEOUT))
+GRUB_TITLE:=$(call qstrip,$(CONFIG_GRUB_TITLE))
+
+BOOTOPTS:=$(call qstrip,$(CONFIG_GRUB_BOOTOPTS))
+
+define Build/combined
+	$(INSTALL_DIR) $@.boot/
+	$(CP) $(KDIR)/$(KERNEL_NAME) $@.boot/efi/openwrt/
+	$(INSTALL_DIR) $@.boot/efi/boot
+	$(CP) $(STAGING_DIR_IMAGE)/grub2/bootloongarch64.efi $@.boot/efi/boot/
+	KERNELPARTTYPE=ef FAT_TYPE="32" PADDING="1" SIGNATURE="$(IMG_PART_SIGNATURE)" \
+		GUID="$(IMG_PART_DISKGUID)" $(SCRIPT_DIR)/gen_image_generic.sh \
+		$@ \
+		$(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \
+		$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) \
+		256
+endef
+
+define Build/grub-config
+	rm -fR $@.boot
+	$(INSTALL_DIR) $@.boot/efi/openwrt/
+	sed \
+		-e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
+		-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
+		-e 's#@ROOTPART@#root=$(ROOTPART) rootwait#g' \
+		-e 's#@GPT_ROOTPART@#root=$(GPT_ROOTPART) rootwait#g' \
+		-e 's#@CMDLINE@#$(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE)#g' \
+		-e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
+		-e 's#@TITLE@#$(GRUB_TITLE)#g' \
+		-e 's#@KERNEL_NAME@#$(KERNEL_NAME)#g' \
+		./grub-$(1).cfg > $@.boot/efi/openwrt/grub.cfg
+endef
+
+define Device/Default
+  KERNEL_INSTALL := 1
+  ARTIFACTS := $$(ARTIFACTS-y)
+  SUPPORTED_DEVICES :=
+endef
+
+define Device/generic
+  DEVICE_VENDOR := Generic
+  DEVICE_MODEL := LoongArch64
+  DEVICE_PACKAGES += kmod-r8169 kmod-drm-amdgpu
+  KERNEL := kernel-bin
+  KERNEL_NAME := vmlinuz.efi
+  IMAGE/rootfs.img := append-rootfs | pad-to $(ROOTFS_PARTSIZE)
+  IMAGE/rootfs.img.gz := append-rootfs | pad-to $(ROOTFS_PARTSIZE) | gzip
+  IMAGE/combined-efi.img := grub-config efi | combined | append-metadata
+  IMAGE/combined-efi.img.gz := grub-config efi | combined | gzip | append-metadata
+  ifeq ($(CONFIG_TARGET_IMAGES_GZIP),y)
+    IMAGES-y := rootfs.img.gz
+    IMAGES-$$(CONFIG_GRUB_EFI_IMAGES) += combined-efi.img.gz
+  else
+    IMAGES-y := rootfs.img
+    IMAGES-$$(CONFIG_GRUB_EFI_IMAGES) += combined-efi.img
+  endif
+  IMAGES := $$(IMAGES-y)
+endef
+TARGET_DEVICES += generic
+
+$(eval $(call BuildImage))
diff --git a/target/linux/loongarch64/image/grub-efi.cfg b/target/linux/loongarch64/image/grub-efi.cfg
new file mode 100644
index 0000000000..fd329e41e0
--- /dev/null
+++ b/target/linux/loongarch64/image/grub-efi.cfg
@@ -0,0 +1,14 @@
+ at SERIAL_CONFIG@
+ at TERMINAL_CONFIG@
+
+set default="0"
+set timeout="@TIMEOUT@"
+
+menuentry "@TITLE@" {
+	search --set=root --label kernel
+	linux /efi/openwrt/@KERNEL_NAME@ @GPT_ROOTPART@ @CMDLINE@ noinitrd
+}
+menuentry "@TITLE@ (failsafe)" {
+	search --set=root --label kernel
+	linux /efi/openwrt/@KERNEL_NAME@ failsafe=true @GPT_ROOTPART@ @CMDLINE@ noinitrd
+}
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 24caecccb3..b4ba5b3b67 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -97,6 +97,7 @@ menuconfig EXTERNAL_TOOLCHAIN
 		default "arm-unknown-linux-gnu"      if arm
 		default "armeb-unknown-linux-gnu"    if armeb
 		default "i486-unknown-linux-gnu"     if i386
+		default "loongarch64-unknown-linux-gnu" if loongarch64
 		default "mips-unknown-linux-gnu"     if mips
 		default "mipsel-unknown-linux-gnu"   if mipsel
 		default "powerpc-unknown-linux-gnu"  if powerpc
@@ -111,6 +112,7 @@ menuconfig EXTERNAL_TOOLCHAIN
 		default "arm-unknown-linux-gnu-"      if arm
 		default "armeb-unknown-linux-gnu-"    if armeb
 		default "i486-unknown-linux-gnu-"     if i386
+		default "loongarch64-unknown-linux-gnu-" if loongarch64
 		default "mips-unknown-linux-gnu-"     if mips
 		default "mipsel-unknown-linux-gnu-"   if mipsel
 		default "powerpc-unknown-linux-gnu-"  if powerpc
@@ -125,6 +127,7 @@ menuconfig EXTERNAL_TOOLCHAIN
 		default "/opt/cross/arm-unknown-linux-gnu"      if arm
 		default "/opt/cross/armeb-unknown-linux-gnu"    if armeb
 		default "/opt/cross/i486-unknown-linux-gnu"     if i386
+		default "/opt/cross/loongarch64-unknown-linux-gnu" if loongarch64
 		default "/opt/cross/mips-unknown-linux-gnu"     if mips
 		default "/opt/cross/mipsel-unknown-linux-gnu"   if mipsel
 		default "/opt/cross/powerpc-unknown-linux-gnu"  if powerpc



From lede-commits at lists.infradead.org  Fri May  3 23:40:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:40:55 -0400
Subject: [openwrt/openwrt]  toolchain/gcc: fix loongarch64 ldso file name
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33536.1714804870.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c5946c07241272361da702b5eebd5f887b8a68c1

commit c5946c07241272361da702b5eebd5f887b8a68c1
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Thu Apr 18 18:58:18 2024 +0800

    toolchain/gcc: fix loongarch64 ldso file name
    
    GCC has changed musl dynamic linker name from
    ld-musl-loongarch-lp64d.so.1 to ld-musl-loongarch64.so.1 recently [1].
    
    Meanwhile musl 1.2.5 only supports the new name. So it's better to follow
    the new name.
    
    [1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=8bccee51f0deac64b79cd9ad75df599422f4c8ff
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 .../400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch    | 41 +++++++++++++++++++++
 .../401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch | 43 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch b/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 0000000000..4fddc3f77e
--- /dev/null
+++ b/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,41 @@
+From a80c68a08604b0ac625ac7fc59eae40b551b1176 Mon Sep 17 00:00:00 2001
+From: Peng Fan <fanpeng at loongson.cn>
+Date: Wed, 19 Apr 2023 16:23:42 +0800
+Subject: [PATCH] LoongArch: Fix MUSL_DYNAMIC_LINKER
+
+The system based on musl has no '/lib64', so change it.
+
+https://wiki.musl-libc.org/guidelines-for-distributions.html,
+"Multilib/multi-arch" section of this introduces it.
+
+gcc/
+	* config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.
+
+Signed-off-by: Peng Fan <fanpeng at loongson.cn>
+Suggested-by: Xi Ruoyao <xry111 at xry111.site>
+---
+ gcc/config/loongarch/gnu-user.h | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
+index aecaa02a199..fa1a5211419 100644
+--- a/gcc/config/loongarch/gnu-user.h
++++ b/gcc/config/loongarch/gnu-user.h
+@@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
+ #define GLIBC_DYNAMIC_LINKER \
+   "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
+ 
++#define MUSL_ABI_SPEC \
++  "%{mabi=lp64d:-lp64d}" \
++  "%{mabi=lp64f:-lp64f}" \
++  "%{mabi=lp64s:-lp64s}"
++
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER \
+-  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
++  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
+ 
+ #undef GNU_USER_TARGET_LINK_SPEC
+ #define GNU_USER_TARGET_LINK_SPEC \
+-- 
+2.39.3
diff --git a/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch b/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch
new file mode 100644
index 0000000000..218a692578
--- /dev/null
+++ b/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch
@@ -0,0 +1,43 @@
+From 8bccee51f0deac64b79cd9ad75df599422f4c8ff Mon Sep 17 00:00:00 2001
+From: Lulu Cheng <chenglulu at loongson.cn>
+Date: Sat, 18 Nov 2023 11:04:42 +0800
+Subject: [PATCH] LoongArch: Modify MUSL_DYNAMIC_LINKER.
+
+Use no suffix at all in the musl dynamic linker name for hard
+float ABI. Use -sf and -sp suffixes in musl dynamic linker name
+for soft float and single precision ABIs. The following table
+outlines the musl interpreter names for the LoongArch64 ABI names.
+
+musl interpreter            | LoongArch64 ABI
+--------------------------- | -----------------
+ld-musl-loongarch64.so.1    | loongarch64-lp64d
+ld-musl-loongarch64-sp.so.1 | loongarch64-lp64f
+ld-musl-loongarch64-sf.so.1 | loongarch64-lp64s
+
+gcc/ChangeLog:
+
+	* config/loongarch/gnu-user.h (MUSL_ABI_SPEC): Modify suffix.
+---
+ gcc/config/loongarch/gnu-user.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
+index 9616d6e8a0b..e9f4bcef1d4 100644
+--- a/gcc/config/loongarch/gnu-user.h
++++ b/gcc/config/loongarch/gnu-user.h
+@@ -34,9 +34,9 @@ along with GCC; see the file COPYING3.  If not see
+   "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
+ 
+ #define MUSL_ABI_SPEC \
+-  "%{mabi=lp64d:-lp64d}" \
+-  "%{mabi=lp64f:-lp64f}" \
+-  "%{mabi=lp64s:-lp64s}"
++  "%{mabi=lp64d:}" \
++  "%{mabi=lp64f:-sp}" \
++  "%{mabi=lp64s:-sf}"
+ 
+ #undef MUSL_DYNAMIC_LINKER
+ #define MUSL_DYNAMIC_LINKER \
+-- 
+2.39.3
+



From lede-commits at lists.infradead.org  Fri May  3 23:40:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:40:59 -0400
Subject: [openwrt/openwrt]  kernel: modules: netdevices: add depedency
 required for loongarch64
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33537.1714805100.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/886a507fa643d8f63d1f7c25b968a252401ada45

commit 886a507fa643d8f63d1f7c25b968a252401ada45
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:26:00 2024 +0800

    kernel: modules: netdevices: add depedency required for loongarch64
    
    Add TARGET_loongarch64 as dependency for kmod-mdio-devres,
    kmod-mdio-gpio and kmod-switch-rtl8366-smi
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/kernel/linux/modules/netdevices.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index e0110764c2..cf253ff9e0 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -142,7 +142,7 @@ $(eval $(call KernelPackage,mii))
 define KernelPackage/mdio-devres
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Supports MDIO device registration
-  DEPENDS:=+kmod-libphy +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio
+  DEPENDS:=+kmod-libphy +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_loongarch64||TARGET_malta||TARGET_tegra):kmod-of-mdio
   KCONFIG:=CONFIG_MDIO_DEVRES
   HIDDEN:=1
   FILES:=$(LINUX_DIR)/drivers/net/phy/mdio_devres.ko
@@ -159,7 +159,7 @@ $(eval $(call KernelPackage,mdio-devres))
 define KernelPackage/mdio-gpio
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:= Supports GPIO lib-based MDIO busses
-  DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio
+  DEPENDS:=+kmod-libphy @GPIO_SUPPORT +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_loongarch64||TARGET_malta||TARGET_tegra):kmod-of-mdio
   KCONFIG:= \
 	CONFIG_MDIO_BITBANG \
 	CONFIG_MDIO_GPIO
@@ -523,7 +523,7 @@ $(eval $(call KernelPackage,switch-rtl8306))
 define KernelPackage/switch-rtl8366-smi
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Realtek RTL8366 SMI switch interface support
-  DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_malta||TARGET_tegra):kmod-of-mdio
+  DEPENDS:=@GPIO_SUPPORT +kmod-swconfig +(TARGET_armsr||TARGET_bcm27xx_bcm2708||TARGET_loongarch64||TARGET_malta||TARGET_tegra):kmod-of-mdio
   KCONFIG:=CONFIG_RTL8366_SMI
   FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8366_smi.ko
   AUTOLOAD:=$(call AutoLoad,42,rtl8366_smi,1)



From lede-commits at lists.infradead.org  Fri May  3 23:41:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 02:41:00 -0400
Subject: [openwrt/openwrt]  kernel: modules: video: adapt for loongarch64
In-Reply-To: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
References: <171480485575.1025556.5777876296452946248@git-01.infra.openwrt.org>
Message-ID: <mailman.33538.1714805100.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/159a2857360a0755c5bcf14d2d4d65bf04022936

commit 159a2857360a0755c5bcf14d2d4d65bf04022936
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:27:57 2024 +0800

    kernel: modules: video: adapt for loongarch64
    
    * Allow kmod-acpi-video to be built for loongarch64:
    The x86-specific CONFIG_ACPI_WMI will be split from default
    kmod-acpi-video as a board-specific addition.
    
    * Allow kmod-drm-amdgpu to be built for loongarch64:
    Also add loongarch64-specific configs and modules.
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/kernel/linux/modules/video.mk | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index b282d7695c..dc1953279e 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -19,19 +19,23 @@ V4L2_MEM2MEM_DIR=platform
 define KernelPackage/acpi-video
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=ACPI Extensions For Display Adapters
-  DEPENDS:=@TARGET_x86 +kmod-backlight
+  DEPENDS:=@TARGET_x86||TARGET_loongarch64 +kmod-backlight
   HIDDEN:=1
-  KCONFIG:=CONFIG_ACPI_VIDEO \
-	CONFIG_ACPI_WMI
-  FILES:=$(LINUX_DIR)/drivers/acpi/video.ko \
-	$(LINUX_DIR)/drivers/platform/x86/wmi.ko
-  AUTOLOAD:=$(call AutoProbe,wmi video)
+  KCONFIG:=CONFIG_ACPI_VIDEO
+  FILES:=$(LINUX_DIR)/drivers/acpi/video.ko
+  AUTOLOAD:=$(call AutoProbe,video)
 endef
 
 define KernelPackage/acpi-video/description
   Kernel support for integrated graphics devices.
 endef
 
+define KernelPackage/acpi-video/x86
+  KCONFIG+=CONFIG_ACPI_WMI
+  FILES+=$(LINUX_DIR)/drivers/platform/x86/wmi.ko
+  AUTOLOAD:=$(call AutoProbe,wmi video)
+endef
+
 $(eval $(call KernelPackage,acpi-video))
 
 define KernelPackage/backlight
@@ -372,7 +376,7 @@ $(eval $(call KernelPackage,drm-suballoc-helper))
 define KernelPackage/drm-amdgpu
   SUBMENU:=$(VIDEO_MENU)
   TITLE:=AMDGPU DRM support
-  DEPENDS:=@TARGET_x86 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
+  DEPENDS:=@TARGET_x86||TARGET_loongarch64 @DISPLAY_SUPPORT +kmod-backlight +kmod-drm-ttm \
 	+kmod-drm-ttm-helper +kmod-drm-kms-helper +kmod-i2c-algo-bit +amdgpu-firmware \
 	+kmod-drm-display-helper +kmod-drm-buddy +kmod-acpi-video \
 	+LINUX_6_6:kmod-drm-exec +LINUX_6_6:kmod-drm-suballoc-helper
@@ -391,6 +395,13 @@ define KernelPackage/drm-amdgpu/description
   Direct Rendering Manager (DRM) support for AMDGPU Cards
 endef
 
+define KernelPackage/drm-amdgpu/loongarch64
+  KCONFIG+=CONFIG_DRM_AMDGPU_USERPTR=y \
+	CONFIG_DRM_AMD_DC=y \
+	CONFIG_DRM_AMD_DC_FP=y \
+	CONFIG_DRM_AMD_DC_SI=y
+endef
+
 $(eval $(call KernelPackage,drm-amdgpu))
 
 



From lede-commits at lists.infradead.org  Sat May  4 06:00:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 09:00:20 -0400
Subject: [openwrt/openwrt]  rockchip: add driver for hardware RNG
In-Reply-To: <171482762050.2149384.7272622248194803975@git-01.infra.openwrt.org>
References: <171482762050.2149384.7272622248194803975@git-01.infra.openwrt.org>
Message-ID: <mailman.33564.1714827628.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d9d7286279157dfc3cfe010423566f7d2ce5d238

commit d9d7286279157dfc3cfe010423566f7d2ce5d238
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat May 4 03:01:39 2024 +0100

    rockchip: add driver for hardware RNG
    
    Rockchip SoCs used to have a random number generator as part of their
    crypto device, and support for it has to be added to the corresponding
    driver.
    
    Newer Rockchip SoCs like the RK3568 have an independent True Random
    Number Generator device. Import pending patchset which adds a driver for
    it, include it in Kconfig and enable it in the device tree.
    
    Doing so significantly reduces the time needed to boot devices based on
    those SoCs, from about 27 seconds until Ethernet is up and running to
    less than 13 seconds with a minimal snapshot image.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/rockchip/armv8/config-6.1             |   2 +
 .../300-hwrng-add-Rockchip-SoC-hwrng-driver.patch  | 339 +++++++++++++++++++++
 ...s-rockchip-add-DT-entry-for-RNG-to-RK356x.patch |  56 ++++
 3 files changed, 397 insertions(+)

diff --git a/target/linux/rockchip/armv8/config-6.1 b/target/linux/rockchip/armv8/config-6.1
index 1830a89c93..a1f79510d7 100644
--- a/target/linux/rockchip/armv8/config-6.1
+++ b/target/linux/rockchip/armv8/config-6.1
@@ -295,6 +295,8 @@ CONFIG_HUGETLB_PAGE=y
 CONFIG_HWMON=y
 CONFIG_HWSPINLOCK=y
 CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ROCKCHIP=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
diff --git a/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch b/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
new file mode 100644
index 0000000000..6a2d35889b
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
@@ -0,0 +1,339 @@
+From patchwork Sat Nov 12 14:10:58 2022
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
+X-Patchwork-Id: 13041222
+Return-Path: 
+ <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org at lists.infradead.org>
+X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
+	aws-us-west-2-korg-lkml-1.web.codeaurora.org
+From: Aurelien Jarno <aurelien at aurel32.net>
+To: Olivia Mackall <olivia at selenic.com>,
+	Herbert Xu <herbert at gondor.apana.org.au>,
+	Rob Herring <robh+dt at kernel.org>,
+	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
+	Heiko Stuebner <heiko at sntech.de>,
+	Philipp Zabel <p.zabel at pengutronix.de>,
+	Lin Jinhan <troy.lin at rock-chips.com>
+Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
+ CORE),
+	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
+ BINDINGS),
+	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
+ support),
+	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
+	linux-kernel at vger.kernel.org (open list),
+	Aurelien Jarno <aurelien at aurel32.net>
+Subject: [PATCH v1 2/3] hwrng: add Rockchip SoC hwrng driver
+Date: Sat, 12 Nov 2022 15:10:58 +0100
+Message-Id: <20221112141059.3802506-3-aurelien at aurel32.net>
+In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
+References: <20221112141059.3802506-1-aurelien at aurel32.net>
+MIME-Version: 1.0
+List-Id: <linux-arm-kernel.lists.infradead.org>
+
+Rockchip SoCs used to have a random number generator as part of their
+crypto device, and support for it has to be added to the corresponding
+driver. However newer Rockchip SoCs like the RK356x have an independent
+True Random Number Generator device. This patch adds a driver for it,
+greatly inspired from the downstream driver.
+
+The TRNG device does not seem to have a signal conditionner and the FIPS
+140-2 test returns a lot of failures. They can be reduced by increasing
+RK_RNG_SAMPLE_CNT, in a tradeoff between quality and speed. This value
+has been adjusted to get ~90% of successes and the quality value has
+been set accordingly.
+
+Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+---
+ drivers/char/hw_random/Kconfig        |  14 ++
+ drivers/char/hw_random/Makefile       |   1 +
+ drivers/char/hw_random/rockchip-rng.c | 251 ++++++++++++++++++++++++++
+ 3 files changed, 266 insertions(+)
+ create mode 100644 drivers/char/hw_random/rockchip-rng.c
+
+--- a/drivers/char/hw_random/Kconfig
++++ b/drivers/char/hw_random/Kconfig
+@@ -549,6 +549,20 @@ config HW_RANDOM_CN10K
+ 	 To compile this driver as a module, choose M here.
+ 	 The module will be called cn10k_rng. If unsure, say Y.
+ 
++config HW_RANDOM_ROCKCHIP
++        tristate "Rockchip True Random Number Generator"
++        depends on HW_RANDOM && (ARCH_ROCKCHIP || COMPILE_TEST)
++        depends on HAS_IOMEM
++        default HW_RANDOM
++        help
++          This driver provides kernel-side support for the True Random Number
++          Generator hardware found on some Rockchip SoC like RK3566 or RK3568.
++
++          To compile this driver as a module, choose M here: the
++          module will be called rockchip-rng.
++
++          If unsure, say Y.
++
+ endif # HW_RANDOM
+ 
+ config UML_RANDOM
+--- a/drivers/char/hw_random/Makefile
++++ b/drivers/char/hw_random/Makefile
+@@ -47,3 +47,4 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
+ obj-$(CONFIG_HW_RANDOM_ARM_SMCCC_TRNG) += arm_smccc_trng.o
+ obj-$(CONFIG_HW_RANDOM_CN10K) += cn10k-rng.o
+ obj-$(CONFIG_HW_RANDOM_POLARFIRE_SOC) += mpfs-rng.o
++obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
+--- /dev/null
++++ b/drivers/char/hw_random/rockchip-rng.c
+@@ -0,0 +1,251 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * rockchip-rng.c True Random Number Generator driver for Rockchip SoCs
++ *
++ * Copyright (c) 2018, Fuzhou Rockchip Electronics Co., Ltd.
++ * Copyright (c) 2022, Aurelien Jarno
++ * Authors:
++ *  Lin Jinhan <troy.lin at rock-chips.com>
++ *  Aurelien Jarno <aurelien at aurel32.net>
++ */
++#include <linux/clk.h>
++#include <linux/hw_random.h>
++#include <linux/io.h>
++#include <linux/iopoll.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/of_platform.h>
++#include <linux/pm_runtime.h>
++#include <linux/reset.h>
++#include <linux/slab.h>
++
++#define RK_RNG_AUTOSUSPEND_DELAY	100
++#define RK_RNG_MAX_BYTE			32
++#define RK_RNG_POLL_PERIOD_US		100
++#define RK_RNG_POLL_TIMEOUT_US		10000
++
++/*
++ * TRNG collects osc ring output bit every RK_RNG_SAMPLE_CNT time. The value is
++ * a tradeoff between speed and quality and has been adjusted to get a quality
++ * of ~900 (~90% of FIPS 140-2 successes).
++ */
++#define RK_RNG_SAMPLE_CNT		1000
++
++/* TRNG registers from RK3568 TRM-Part2, section 5.4.1 */
++#define TRNG_RST_CTL			0x0004
++#define TRNG_RNG_CTL			0x0400
++#define TRNG_RNG_CTL_LEN_64_BIT		(0x00 << 4)
++#define TRNG_RNG_CTL_LEN_128_BIT	(0x01 << 4)
++#define TRNG_RNG_CTL_LEN_192_BIT	(0x02 << 4)
++#define TRNG_RNG_CTL_LEN_256_BIT	(0x03 << 4)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_0	(0x00 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_1	(0x01 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_2	(0x02 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_3	(0x03 << 2)
++#define TRNG_RNG_CTL_ENABLE		BIT(1)
++#define TRNG_RNG_CTL_START		BIT(0)
++#define TRNG_RNG_SAMPLE_CNT		0x0404
++#define TRNG_RNG_DOUT_0			0x0410
++#define TRNG_RNG_DOUT_1			0x0414
++#define TRNG_RNG_DOUT_2			0x0418
++#define TRNG_RNG_DOUT_3			0x041c
++#define TRNG_RNG_DOUT_4			0x0420
++#define TRNG_RNG_DOUT_5			0x0424
++#define TRNG_RNG_DOUT_6			0x0428
++#define TRNG_RNG_DOUT_7			0x042c
++
++struct rk_rng {
++	struct hwrng rng;
++	void __iomem *base;
++	struct reset_control *rst;
++	int clk_num;
++	struct clk_bulk_data *clk_bulks;
++};
++
++/* The mask determine the bits that are updated */
++static void rk_rng_write_ctl(struct rk_rng *rng, u32 val, u32 mask)
++{
++	writel_relaxed((mask << 16) | val, rng->base + TRNG_RNG_CTL);
++}
++
++static int rk_rng_init(struct hwrng *rng)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++	int ret;
++
++	/* start clocks */
++	ret = clk_bulk_prepare_enable(rk_rng->clk_num, rk_rng->clk_bulks);
++	if (ret < 0) {
++		dev_err((struct device *) rk_rng->rng.priv,
++			"Failed to enable clks %d\n", ret);
++		return ret;
++	}
++
++	/* set the sample period */
++	writel(RK_RNG_SAMPLE_CNT, rk_rng->base + TRNG_RNG_SAMPLE_CNT);
++
++	/* set osc ring speed and enable it */
++	reg = TRNG_RNG_CTL_LEN_256_BIT |
++		   TRNG_RNG_CTL_OSC_RING_SPEED_0 |
++		   TRNG_RNG_CTL_ENABLE;
++	rk_rng_write_ctl(rk_rng, reg, 0xffff);
++
++	return 0;
++}
++
++static void rk_rng_cleanup(struct hwrng *rng)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++
++	/* stop TRNG */
++	reg = 0;
++	rk_rng_write_ctl(rk_rng, reg, 0xffff);
++
++	/* stop clocks */
++	clk_bulk_disable_unprepare(rk_rng->clk_num, rk_rng->clk_bulks);
++}
++
++static int rk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++	int ret = 0;
++	int i;
++
++	pm_runtime_get_sync((struct device *) rk_rng->rng.priv);
++
++	/* Start collecting random data */
++	reg = TRNG_RNG_CTL_START;
++	rk_rng_write_ctl(rk_rng, reg, reg);
++
++	ret = readl_poll_timeout(rk_rng->base + TRNG_RNG_CTL, reg,
++				 !(reg & TRNG_RNG_CTL_START),
++				 RK_RNG_POLL_PERIOD_US,
++				 RK_RNG_POLL_TIMEOUT_US);
++	if (ret < 0)
++		goto out;
++
++	/* Read random data stored in big endian in the registers */
++	ret = min_t(size_t, max, RK_RNG_MAX_BYTE);
++	for (i = 0; i < ret; i += 4) {
++		reg = readl_relaxed(rk_rng->base + TRNG_RNG_DOUT_0 + i);
++		*(u32 *)(buf + i) = be32_to_cpu(reg);
++	}
++
++out:
++	pm_runtime_mark_last_busy((struct device *) rk_rng->rng.priv);
++	pm_runtime_put_sync_autosuspend((struct device *) rk_rng->rng.priv);
++
++	return ret;
++}
++
++static int rk_rng_probe(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct rk_rng *rk_rng;
++	int ret;
++
++	rk_rng = devm_kzalloc(dev, sizeof(struct rk_rng), GFP_KERNEL);
++	if (!rk_rng)
++		return -ENOMEM;
++
++	rk_rng->base = devm_platform_ioremap_resource(pdev, 0);
++	if (IS_ERR(rk_rng->base))
++		return PTR_ERR(rk_rng->base);
++
++	rk_rng->clk_num = devm_clk_bulk_get_all(dev, &rk_rng->clk_bulks);
++	if (rk_rng->clk_num < 0)
++		return dev_err_probe(dev, rk_rng->clk_num,
++				     "Failed to get clks property\n");
++
++	rk_rng->rst = devm_reset_control_array_get(&pdev->dev, false, false);
++	if (IS_ERR(rk_rng->rst))
++		return dev_err_probe(dev, PTR_ERR(rk_rng->rst),
++				     "Failed to get reset property\n");
++
++	reset_control_assert(rk_rng->rst);
++	udelay(2);
++	reset_control_deassert(rk_rng->rst);
++
++	platform_set_drvdata(pdev, rk_rng);
++
++	rk_rng->rng.name = dev_driver_string(dev);
++#ifndef CONFIG_PM
++	rk_rng->rng.init = rk_rng_init;
++	rk_rng->rng.cleanup = rk_rng_cleanup;
++#endif
++	rk_rng->rng.read = rk_rng_read;
++	rk_rng->rng.priv = (unsigned long) dev;
++	rk_rng->rng.quality = 900;
++
++	pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
++	pm_runtime_use_autosuspend(dev);
++	pm_runtime_enable(dev);
++
++	ret = devm_hwrng_register(dev, &rk_rng->rng);
++	if (ret)
++		return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n");
++
++	dev_info(&pdev->dev, "Registered Rockchip hwrng\n");
++
++	return 0;
++}
++
++static int rk_rng_remove(struct platform_device *pdev)
++{
++	pm_runtime_disable(&pdev->dev);
++
++	return 0;
++}
++
++#ifdef CONFIG_PM
++static int rk_rng_runtime_suspend(struct device *dev)
++{
++	struct rk_rng *rk_rng = dev_get_drvdata(dev);
++
++	rk_rng_cleanup(&rk_rng->rng);
++
++	return 0;
++}
++
++static int rk_rng_runtime_resume(struct device *dev)
++{
++	struct rk_rng *rk_rng = dev_get_drvdata(dev);
++
++	return rk_rng_init(&rk_rng->rng);
++}
++#endif
++
++static const struct dev_pm_ops rk_rng_pm_ops = {
++	SET_RUNTIME_PM_OPS(rk_rng_runtime_suspend,
++				rk_rng_runtime_resume, NULL)
++	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
++				pm_runtime_force_resume)
++};
++
++static const struct of_device_id rk_rng_dt_match[] = {
++	{
++		.compatible = "rockchip,rk3568-rng",
++	},
++	{},
++};
++
++MODULE_DEVICE_TABLE(of, rk_rng_dt_match);
++
++static struct platform_driver rk_rng_driver = {
++	.driver	= {
++		.name	= "rockchip-rng",
++		.pm	= &rk_rng_pm_ops,
++		.of_match_table = rk_rng_dt_match,
++	},
++	.probe	= rk_rng_probe,
++	.remove = rk_rng_remove,
++};
++
++module_platform_driver(rk_rng_driver);
++
++MODULE_DESCRIPTION("Rockchip True Random Number Generator driver");
++MODULE_AUTHOR("Lin Jinhan <troy.lin at rock-chips.com>, Aurelien Jarno <aurelien at aurel32.net>");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch b/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
new file mode 100644
index 0000000000..bb34ba76e0
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
@@ -0,0 +1,56 @@
+From patchwork Sat Nov 12 14:10:59 2022
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
+X-Patchwork-Id: 13041221
+From: Aurelien Jarno <aurelien at aurel32.net>
+To: Olivia Mackall <olivia at selenic.com>,
+	Herbert Xu <herbert at gondor.apana.org.au>,
+	Rob Herring <robh+dt at kernel.org>,
+	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
+	Heiko Stuebner <heiko at sntech.de>,
+	Philipp Zabel <p.zabel at pengutronix.de>,
+	Lin Jinhan <troy.lin at rock-chips.com>
+Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
+ CORE),
+	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
+ BINDINGS),
+	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
+ support),
+	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
+	linux-kernel at vger.kernel.org (open list),
+	Aurelien Jarno <aurelien at aurel32.net>
+Subject: [PATCH v1 3/3] arm64: dts: rockchip: add DT entry for RNG to RK356x
+Date: Sat, 12 Nov 2022 15:10:59 +0100
+Message-Id: <20221112141059.3802506-4-aurelien at aurel32.net>
+In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
+References: <20221112141059.3802506-1-aurelien at aurel32.net>
+MIME-Version: 1.0
+List-Id: <linux-arm-kernel.lists.infradead.org>
+
+Enable the just added Rockchip RNG driver for RK356x SoCs.
+
+Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+---
+ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+@@ -1773,6 +1773,15 @@
+ 		};
+ 	};
+ 
++	rng: rng at fe388000 {
++		compatible = "rockchip,rk3568-rng";
++		reg = <0x0 0xfe388000 0x0 0x4000>;
++		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
++		clock-names = "trng_clk", "trng_hclk";
++		resets = <&cru SRST_TRNG_NS>;
++		reset-names = "reset";
++	};
++
+ 	pinctrl: pinctrl {
+ 		compatible = "rockchip,rk3568-pinctrl";
+ 		rockchip,grf = <&grf>;



From lede-commits at lists.infradead.org  Sat May  4 11:07:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 14:07:55 -0400
Subject: [openwrt/openwrt]  toolchain: glibc: Update glibc 2.38 to recent HEAD
In-Reply-To: <171484607573.2979656.2486461860993517254@git-01.infra.openwrt.org>
References: <171484607573.2979656.2486461860993517254@git-01.infra.openwrt.org>
Message-ID: <mailman.33677.1714846084.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6b3195ae62091fc224500e50661ccdc9651376fc

commit 6b3195ae62091fc224500e50661ccdc9651376fc
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 28 22:05:23 2024 +0200

    toolchain: glibc: Update glibc 2.38 to recent HEAD
    
    23514c72b7 syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6246)
    d0338312aa syslog: Fix heap buffer overflow in __vsyslog_internal (CVE-2023-6779)
    d37c2b20a4 syslog: Fix integer overflow in __vsyslog_internal (CVE-2023-6780)
    30e546d76e x86_64: Optimize ffsll function code size.
    18876c9ff5 S390: Fix building with --disable-mutli-arch [BZ #31196]
    6f68075869 sparc: Fix broken memset for sparc32 [BZ #31068]
    0e383d2d4e sparc64: Remove unwind information from signal return stubs [BZ#31244]
    aac57faf54 sparc: Fix sparc64 memmove length comparison (BZ 31266)
    0c5e5bace5 sparc: Remove unwind information from signal return stubs [BZ #31244]
    b09073e631 arm: Remove wrong ldr from _dl_start_user (BZ 31339)
    506e47da1d malloc: Use __get_nprocs on arena_get2 (BZ 30945)
    ee4806e978 S390: Do not clobber r7 in clone [BZ #31402]
    5753cda1ca linux: Use rseq area unconditionally in sched_getcpu (bug 31479)
    0518bb0c16 LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, _}_scalbf
    5456ff5d80 Add HWCAP2_MOPS from Linux 6.5 to AArch64 bits/hwcap.h
    d8a2b56b4f AArch64: Add support for MOPS memcpy/memmove/memset
    25b66e8c4a AArch64: Cleanup ifuncs
    1521237c32 AArch64: Cleanup emag memset
    156e44845f AArch64: Add memset_zva64
    a08ff92294 AArch64: Remove Falkor memcpy
    168ae58e6e aarch64: correct CFI in rawmemchr (bug 31113)
    1bf17ce978 aarch64: fix check for SVE support in assembler
    92da7c2cfe AArch64: Check kernel version for SVE ifuncs
    20534f8176 powerpc: Fix ld.so address determination for PCREL mode (bug 31640)
    e1135387de iconv: ISO-2022-CN-EXT: fix out-of-bound writes when writing escape sequence (CVE-2024-2961)
    61484011e7 sparc: Remove 64 bit check on sparc32 wordsize (BZ 27574)
    78d9f91da6 login: Check default sizes of structs utmp, utmpx, lastlog
    68bff88592 login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701)
    decc9f504a nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
    29e20bd122 i386: ulp update for SSE2 --disable-multi-arch configurations
    5968aebb86 CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)
    541ea5172a CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
    2ae9446c1b CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)
    71af8ca864 CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)
    e9f05fa1c6 elf: Also compile dl-misc.os with $(rtld-early-cflags)
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 toolchain/glibc/common.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index 79a7a0131d..28beda04eb 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -12,8 +12,8 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=cfe121910013a46e2477562282c56ae8062089aa
-PKG_MIRROR_HASH:=99b9beb283d644caacea12fe87dd7f0a0141ff26349ee500a78047aba3f5be5c
+PKG_SOURCE_VERSION:=e9f05fa1c62c8044ff025963498063f73eb51c5f
+PKG_MIRROR_HASH:=fd61eb2caea0d4100638b8aa8285b0f1bc23af921c376516307c9ab8ac307739
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
 PKG_CPE_ID:=cpe:/a:gnu:glibc



From lede-commits at lists.infradead.org  Sat May  4 15:47:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 18:47:14 -0400
Subject: [openwrt/openwrt]  kernel: add kmod-ata-ahci-dwc
In-Reply-To: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
References: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
Message-ID: <mailman.33678.1714862836.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cfb7df2991d9b9580d9c14b482813214bddbe125

commit cfb7df2991d9b9580d9c14b482813214bddbe125
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Thu Apr 11 14:43:06 2024 -0400

    kernel: add kmod-ata-ahci-dwc
    
    Add kmod-ata-ahci-dwc for the rockchip target.
    
    https://github.com/torvalds/linux/commit/33629d35090f5ce2b1b4ce78aa39954c603536d5
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 package/kernel/linux/modules/block.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/kernel/linux/modules/block.mk b/package/kernel/linux/modules/block.mk
index 4f3a6e085f..3dbeca9f9f 100644
--- a/package/kernel/linux/modules/block.mk
+++ b/package/kernel/linux/modules/block.mk
@@ -89,6 +89,18 @@ endef
 
 $(eval $(call KernelPackage,ata-artop))
 
+define KernelPackage/ata-ahci-dwc
+  TITLE:=Synopsys DWC AHCI SATA
+  KCONFIG:= \
+	CONFIG_AHCI_DWC \
+	CONFIG_SATA_HOST=y
+  FILES:=$(LINUX_DIR)/drivers/ata/ahci_dwc.ko
+  DEPENDS:=+kmod-ata-ahci-platform
+  AUTOLOAD:=$(call AutoLoad,41,ahci_dwc,1)
+  $(call AddDepends/ata, at TARGET_rockchip)
+endef
+
+$(eval $(call KernelPackage,ata-ahci-dwc))
 
 define KernelPackage/ata-nvidia-sata
   TITLE:=Nvidia Serial ATA support



From lede-commits at lists.infradead.org  Sat May  4 15:47:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 18:47:13 -0400
Subject: [openwrt/openwrt]  rockchip: enable MT7531 and RTC drivers
In-Reply-To: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
References: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
Message-ID: <mailman.33679.1714862836.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/298e11e43ddaff226cf381560aec253f9790e395

commit 298e11e43ddaff226cf381560aec253f9790e395
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Thu Apr 11 14:51:37 2024 -0400

    rockchip: enable MT7531 and RTC drivers
    
    This patch enable MT7531 switch and RTC drivers for BPI-R2 Pro.
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/rockchip/armv8/config-6.1 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/rockchip/armv8/config-6.1 b/target/linux/rockchip/armv8/config-6.1
index a1f79510d7..6337245ff8 100644
--- a/target/linux/rockchip/armv8/config-6.1
+++ b/target/linux/rockchip/armv8/config-6.1
@@ -365,6 +365,7 @@ CONFIG_MDIO_BUS_MUX_GPIO=y
 CONFIG_MDIO_BUS_MUX_MMIOREG=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
+CONFIG_MEDIATEK_GE_PHY=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY_ISOLATION=y
 CONFIG_MFD_CORE=y
@@ -401,9 +402,16 @@ CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MT7530=y
+CONFIG_NET_DSA_MT7530_MDIO=y
+CONFIG_NET_DSA_MT7530_MMIO=y
+CONFIG_NET_DSA_TAG_MTK=y
 CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
 CONFIG_NLS=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NOP_USB_XCEIV=y
@@ -458,6 +466,7 @@ CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_MSI=y
 CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCI_STUB=y
+CONFIG_PCS_MTK_LYNXI=y
 CONFIG_PCS_XPCS=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_PHYLIB=y
@@ -550,6 +559,7 @@ CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
 CONFIG_RPS=y
 CONFIG_RSEQ=y
 CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_HYM8563=y
 CONFIG_RTC_DRV_RK808=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_NVMEM=y



From lede-commits at lists.infradead.org  Sat May  4 15:47:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 18:47:15 -0400
Subject: [openwrt/openwrt]  rockchip: add Bananapi-R2 Pro board support
In-Reply-To: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
References: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
Message-ID: <mailman.33680.1714862838.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4ebcc5375a5f3610164a3b605437b4392f021454

commit 4ebcc5375a5f3610164a3b605437b4392f021454
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Thu Apr 11 12:35:00 2024 -0400

    rockchip: add Bananapi-R2 Pro board support
    
    Hardware spec:
    
    - Rockchip RK3568 Quad-core ARM Cortex-A55 CPU 2GHz
    - GPU Mali-G52 1-Core-2EE OpenGL ES3.2 Vu1kn 1.1 OpenCL 2.0
    - Memory2G DDR3 SDRAM (option 4G)
    - Storage Onboard 16GB eMMC Flash, Micro SD-Card slot, SATA 3.0 Port,SPI flash
    - Network 5 x 10/100/1000 Mbit/s Ethernet MT7531
    - Display 1 HDMI port, 2 DSI interface(1 DSI can change to LVDS by software)
    - Camera 1 CSI camera interface
    - Audio Output HDMI & I2S & Speaker & Headphone
    - USB port USB 3.0 PORT (x2), micro USB OTG (x1)
    - PCIE 1 mini pcie interface & 1 M.2 key-e interface
    - Remote IR Receiver (x1)
    - GPIO 40 Pin Header : GPIO (x28) and Power (+5V, +3.3V and GND).
    - Switches Reset button, Power button, U-boot button
    - LED Power Status
    - Power Source 12 volt 2A via DC Power
    
    Installation:
    
    Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*)
    Boot from the SD card
    1-hold down the MaskRom button
    2-Connect DC power
    3-Wait 5 seconds, release the button.
    
    eMMC Installation:
    
    1-Uncompress the OpenWrt sysupgrade image
    2-fash to eMMC
    dd if=openwrt-rockchip-armv8-sinovoip_bpi-r2-pro-squashfs-sysupgrade.img of=/dev/mmcblk1
    sync
    3-remove SD card
    reboot
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 .../armv8/base-files/etc/board.d/02_network        |  6 +++-
 .../etc/hotplug.d/net/40-net-smp-affinity          |  3 +-
 target/linux/rockchip/image/armv8.mk               |  9 +++++
 ...ockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch | 27 +++++++++++++++
 ...ockchip-set-PHY-address-of-MT7531-switch-.patch | 40 ++++++++++++++++++++++
 ...ockchip-regulator-for-sd-needs-to-be-alwa.patch | 33 ++++++++++++++++++
 6 files changed, 116 insertions(+), 2 deletions(-)

diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
index d6e97b91fa..8729bd52f2 100644
--- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
+++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network
@@ -23,6 +23,9 @@ rockchip_setup_interfaces()
 	friendlyarm,nanopi-r5s)
 		ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
 		;;
+	sinovoip,rk3568-bpi-r2pro)
+		ucidef_set_interfaces_lan_wan 'lan0 lan1 lan2 lan3' 'eth0'
+		;;
 	*)
 		ucidef_set_interface_lan 'eth0'
 		;;
@@ -44,7 +47,8 @@ rockchip_setup_macs()
 		;;
 	friendlyarm,nanopi-r2c-plus|\
 	friendlyarm,nanopi-r4s|\
-	friendlyarm,nanopi-r5s)
+	friendlyarm,nanopi-r5s|\
+	sinovoip,rk3568-bpi-r2pro)
 		wan_mac=$(macaddr_generate_from_mmc_cid mmcblk1)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
 		;;
diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
index 5753d1e856..8bbce1c328 100644
--- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
+++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
@@ -44,7 +44,8 @@ friendlyarm,nanopi-r4s-enterprise)
 	set_interface_core 20 "eth1"
 	;;
 friendlyarm,nanopi-r5c|\
-radxa,e25)
+radxa,e25|\
+sinovoip,rk3568-bpi-r2pro)
 	set_interface_core 2 "eth0"
 	set_interface_core 4 "eth1"
 	;;
diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk
index d457058282..df0ca6ffb5 100644
--- a/target/linux/rockchip/image/armv8.mk
+++ b/target/linux/rockchip/image/armv8.mk
@@ -130,6 +130,15 @@ define Device/radxa_rock-pi-e
 endef
 TARGET_DEVICES += radxa_rock-pi-e
 
+define Device/sinovoip_bpi-r2-pro
+  DEVICE_VENDOR := Sinovoip
+  DEVICE_MODEL := Bananapi-R2 Pro
+  SOC := rk3568
+  SUPPORTED_DEVICES := sinovoip,rk3568-bpi-r2pro
+  DEVICE_PACKAGES := kmod-ata-ahci-dwc
+endef
+TARGET_DEVICES += sinovoip_bpi-r2-pro
+
 define Device/xunlong_orangepi-r1-plus
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi R1 Plus
diff --git a/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch b/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
new file mode 100644
index 0000000000..9be609f661
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
@@ -0,0 +1,27 @@
+From 437644753208092f642b7669c69da606aa07dfb4 Mon Sep 17 00:00:00 2001
+From: Tim Lunn <tim at feathertop.org>
+Date: Wed, 14 Feb 2024 15:07:30 +1100
+Subject: [PATCH] arm64: dts: rockchip: adjust vendor on Banana Pi R2 Pro board
+
+Adjust compatible string to match the board vendor of Sinovoip
+
+Signed-off-by: Tim Lunn <tim at feathertop.org>
+Reviewed-by: Dragan Simic <dsimic at manjaro.org>
+Acked-by: Conor Dooley <conor.dooley at microchip.com>
+Link: https://lore.kernel.org/r/20240214040731.3069111-4-tim at feathertop.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -13,7 +13,7 @@
+ 
+ / {
+ 	model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
+-	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
++	compatible = "sinovoip,rk3568-bpi-r2pro", "rockchip,rk3568";
+ 
+ 	aliases {
+ 		ethernet0 = &gmac0;
diff --git a/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch b/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
new file mode 100644
index 0000000000..6a5622b813
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
@@ -0,0 +1,40 @@
+From a2ac2a1b02590a22a236c43c455f421cdede45f5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 15:24:35 +0300
+Subject: [PATCH] arm64: dts: rockchip: set PHY address of MT7531 switch to
+ 0x1f
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7531 switch listens on PHY address 0x1f on an MDIO bus. I've got two
+findings that support this. There's no bootstrapping option to change the
+PHY address of the switch. The Linux driver hardcodes 0x1f as the PHY
+address of the switch. So the reg property on the device tree is currently
+ignored by the Linux driver.
+
+Therefore, describe the correct PHY address on Banana Pi BPI-R2 Pro that
+has this switch.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Fixes: c1804463e5c6 ("arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board")
+Link: https://lore.kernel.org/r/20240314-for-rockchip-mt7531-phy-address-v1-1-743b5873358f at arinc9.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -521,9 +521,9 @@
+ 	#address-cells = <1>;
+ 	#size-cells = <0>;
+ 
+-	switch at 0 {
++	switch at 1f {
+ 		compatible = "mediatek,mt7531";
+-		reg = <0>;
++		reg = <0x1f>;
+ 
+ 		ports {
+ 			#address-cells = <1>;
diff --git a/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch b/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
new file mode 100644
index 0000000000..dca18f5c58
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
@@ -0,0 +1,33 @@
+From 433d54818f64a2fe0562f8c04c7a81f562368515 Mon Sep 17 00:00:00 2001
+From: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
+Date: Tue, 5 Mar 2024 15:32:18 +0100
+Subject: [PATCH] arm64: dts: rockchip: regulator for sd needs to be always on
+ for BPI-R2Pro
+
+With default dts configuration for BPI-R2Pro, the regulator for sd card is
+powered off when reboot is commanded, and the only solution to detect the
+sd card again, and therefore, allow rebooting from there, is to do a
+hardware reset.
+
+Configure the regulator for sd to be always on for BPI-R2Pro in order to
+avoid this issue.
+
+Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro")
+Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
+Link: https://lore.kernel.org/r/20240305143222.189413-1-jtornosm at redhat.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -412,6 +412,8 @@
+ 
+ 			vccio_sd: LDO_REG5 {
+ 				regulator-name = "vccio_sd";
++				regulator-always-on;
++				regulator-boot-on;
+ 				regulator-min-microvolt = <1800000>;
+ 				regulator-max-microvolt = <3300000>;
+ 



From lede-commits at lists.infradead.org  Sat May  4 15:47:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 04 May 2024 18:47:12 -0400
Subject: [openwrt/openwrt]  uboot-rockchip: add Bananapi-R2 Pro support
In-Reply-To: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
References: <171486283215.3865260.4211769740536994211@git-01.infra.openwrt.org>
Message-ID: <mailman.33681.1714862840.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4a6e3e1bc85111b787472148322c51329256be1e

commit 4a6e3e1bc85111b787472148322c51329256be1e
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Thu Apr 11 11:10:40 2024 -0400

    uboot-rockchip: add Bananapi-R2 Pro support
    
    add uboot support for Bananapi-R2 Pro
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 package/boot/uboot-rockchip/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index 863d0157f4..844f59e9f6 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -151,6 +151,13 @@ define U-Boot/rk3568/Default
   TPL:=rk3568_ddr_1560MHz_v1.21.bin
 endef
 
+define U-Boot/bpi-r2-pro-rk3568
+  $(U-Boot/rk3568/Default)
+  NAME:=Bananapi-R2 Pro
+  BUILD_DEVICES:= \
+    sinovoip_bpi-r2-pro
+endef
+
 define U-Boot/nanopi-r5c-rk3568
   $(U-Boot/rk3568/Default)
   NAME:=NanoPi R5C
@@ -186,6 +193,7 @@ UBOOT_TARGETS := \
   rock64-rk3328 \
   rock-pi-e-rk3328 \
   radxa-cm3-io-rk3566 \
+  bpi-r2-pro-rk3568 \
   nanopi-r5c-rk3568 \
   nanopi-r5s-rk3568 \
   radxa-e25-rk3568



From lede-commits at lists.infradead.org  Sun May  5 01:33:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 04:33:18 -0400
Subject: [openwrt/openwrt]  ipq40xx: clean up Linksys WHW03 V2 DTS
In-Reply-To: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
References: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
Message-ID: <mailman.33688.1714898003.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5ac0615b7e1e322fba32232b7e2c89594c3d8e93

commit 5ac0615b7e1e322fba32232b7e2c89594c3d8e93
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Tue Apr 30 20:47:10 2024 -0300

    ipq40xx: clean up Linksys WHW03 V2 DTS
    
    Apply stylistic changes to facilitate DTS merging with WHW03 V1.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15345
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts     | 45 +++++++++-------------
 1 file changed, 18 insertions(+), 27 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
index b76c52cd0a..ccee293e96 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
@@ -17,8 +17,7 @@
 		led-upgrade = &led_red;
 	};
 
-	// The arguments rootfstype and ro are needed
-	// to override the default bootargs
+	// Default bootargs include rootfstype=ext4 and need to be overriden.
 	chosen {
 		bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
 		stdout-path = &blsp1_uart1;
@@ -80,33 +79,27 @@
 	};
 
 	i2c_0_pins: i2c-0-pinmux {
-		mux {
-			function = "blsp_i2c0";
-			pins = "gpio20", "gpio21";
-			bias-disable;
-		};
+		pins = "gpio20", "gpio21";
+		function = "blsp_i2c0";
+		bias-disable;
 	};
 
 	serial_0_pins: serial0-pinmux {
-		mux {
-			pins = "gpio16", "gpio17";
-			function = "blsp_uart0";
-			bias-disable;
-		};
+		pins = "gpio16", "gpio17";
+		function = "blsp_uart0";
+		bias-disable;
 	};
 
 	serial_1_pins: serial1-pinmux {
-		mux {
-			pins = "gpio8", "gpio9", "gpio10", "gpio11";
-			function = "blsp_uart1";
-			bias-disable;
-		};
+		pins = "gpio8", "gpio9", "gpio10", "gpio11";
+		function = "blsp_uart1";
+		bias-disable;
 	};
 
 	spi_0_pins: spi-0-pinmux {
 		mux {
-			function = "blsp_spi0";
 			pins = "gpio13", "gpio14", "gpio15";
+			function = "blsp_spi0";
 			drive-strength = <12>;
 			bias-disable;
 		};
@@ -121,8 +114,8 @@
 
 	spi_1_pins: spi-1-pinmux {
 		mux-1 {
+			pins = "gpio44", "gpio46", "gpio47";
 			function = "blsp_spi1";
-			pins = "gpio44", "gpio46","gpio47";
 			bias-disable;
 		};
 
@@ -141,13 +134,11 @@
 	};
 
 	wifi_0_pins: wifi0-pinmux {
-		btcoexist {
-			bias-pull-up;
-			drive-strength = <6>;
-			function = "gpio";
-			output-high;
-			pins = "gpio52";
-		};
+		pins = "gpio52";
+		function = "gpio";
+		drive-strength = <6>;
+		bias-pull-up;
+		output-high;
 	};
 
 	zigbee-0 {
@@ -485,7 +476,7 @@
 	status = "okay";
 
 	qcom,coexist-support = <1>;
-	qcom,coexist-gpio-pin = <0x34>;
+	qcom,coexist-gpio-pin = <52>;
 
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 



From lede-commits at lists.infradead.org  Sun May  5 01:33:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 04:33:19 -0400
Subject: [openwrt/openwrt]  ipq40xx: merge DTS for Linksys WHW03 V1 and V2
In-Reply-To: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
References: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
Message-ID: <mailman.33689.1714898004.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6dc751815ba090bc2929239479f57a2efe7697ba

commit 6dc751815ba090bc2929239479f57a2efe7697ba
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Fri May 3 02:34:53 2024 -0300

    ipq40xx: merge DTS for Linksys WHW03 V1 and V2
    
    No changes other than the merging itself are intended in this commit.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15345
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts  | 292 +--------------------
 ...m-ipq4019-whw03.dts => qcom-ipq4019-whw03.dtsi} |  70 +----
 .../arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts     | 283 +-------------------
 3 files changed, 19 insertions(+), 626 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
index c835a2216e..70c3b561c0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
@@ -1,82 +1,18 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qcom-ipq4019.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/soc/qcom,tcsr.h>
-#include <dt-bindings/leds/common.h>
+#include "qcom-ipq4019-whw03.dtsi"
 
 / {
 	model = "Linksys WHW03 (Velop)";
 	compatible = "linksys,whw03", "qcom,ipq4019";
 
-	aliases {
-		led-boot = &led_blue;
-		led-failsafe = &led_red;
-		led-running = &led_blue;
-		led-upgrade = &led_red;
-	};
-
 	// Default bootargs include rootfstype=ext4 and need to be overriden.
 	chosen {
 		bootargs-append = " rootfstype=squashfs";
 	};
-
-	soc {
-		ess-tcsr at 1953000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1953000 0x1000>;
-			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
-		};
-
-
-		tcsr at 1949000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1949000 0x100>;
-			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
-		};
-
-		tcsr at 194b000 {
-			compatible = "qcom,tcsr";
-			reg = <0x194b000 0x100>;
-			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
-		};
-
-		tcsr at 1957000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1957000 0x100>;
-			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
-		};
-	};
-
-
-	keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
 };
 
-
 &tlmm {
-	mdio_pins: mdio-pinmux {
-		mux-1 {
-			pins = "gpio6";
-			function = "mdio";
-			bias-pull-up;
-		};
-
-		mux-2 {
-			pins = "gpio7";
-			function = "mdc";
-			bias-pull-up;
-		};
-	};
-
 	sd_pins: sd-pinmux {
 		pins = "gpio23", "gpio24", "gpio25", "gpio26",
 			"gpio27", "gpio28", "gpio29", "gpio30",
@@ -90,262 +26,46 @@
 		bias-disable;
 	};
 
-	serial_0_pins: serial0-pinmux {
-		pins = "gpio16", "gpio17";
-		function = "blsp_uart0";
-		bias-disable;
-	};
-
-	serial_1_pins: serial1-pinmux {
-		pins = "gpio8", "gpio9", "gpio10", "gpio11";
-		function = "blsp_uart1";
-		bias-disable;
-	};
-
 	spi_0_pins: spi-0-pinmux {
 		pins = "gpio12", "gpio13", "gpio14", "gpio15";
 		function = "blsp_spi0";
 		bias-disable;
 	};
-
-	spi_1_pins: spi-1-pinmux {
-		mux-1 {
-			pins = "gpio44", "gpio46", "gpio47";
-			function = "blsp_spi1";
-			bias-disable;
-		};
-
-		mux-2 {
-			pins = "gpio45", "gpio49";
-			function = "gpio";
-			bias-pull-up;
-			output-high;
-		};
-
-		host-interrupt {
-			pins = "gpio42";
-			function = "gpio";
-			input;
-		};
-	};
-
-	wifi_0_pins: wifi0-pinmux {
-		pins = "gpio52";
-		function = "gpio";
-		drive-strength = <6>;
-		bias-pull-up;
-		output-high;
-	};
-
-	zigbee-0 {
-		gpio-hog;
-		gpios = <29 GPIO_ACTIVE_HIGH>;
-		bias-disable;
-		output-low;
-	};
-
-	zigbee-1 {
-		gpio-hog;
-		gpios = <50 GPIO_ACTIVE_HIGH>;
-		bias-disable;
-		input;
-	};
-
-	bluetooth-enable {
-		gpio-hog;
-		gpios = <32 GPIO_ACTIVE_HIGH>;
-		output-high;
-	};
 };
 
 &mdio {
 	status = "okay";
 	pinctrl-0 = <&mdio_pins>;
 	pinctrl-names = "default";
-	reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
-};
-
-&ethphy0 {
-	status = "disabled";
-};
-
-&ethphy1 {
-	status = "disabled";
-};
-
-&ethphy2 {
-	status = "disabled";
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&prng {
-	status = "okay";
-};
-
-&blsp_dma {
-	status = "okay";
-};
-
-&cryptobam {
-	num-channels = <4>;
-	qcom,num-ees = <2>;
 
-	status = "okay";
-};
-
-&crypto {
-	status = "okay";
+	reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
 };
 
 &vqmmc {
 	status = "okay";
 };
 
-&blsp1_uart1 {
-	status = "okay";
-	pinctrl-0 = <&serial_0_pins>;
-	pinctrl-names = "default";
-};
-
-&blsp1_uart2 {
-	status = "okay";
-	pinctrl-0 = <&serial_1_pins>;
-	pinctrl-names = "default";
-
-	bluetooth {
-		compatible = "csr,8811";
-
-		enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
-	};
-};
-
-&blsp1_spi2 {
-	pinctrl-0 = <&spi_1_pins>;
-	pinctrl-names = "default";
-	status = "okay";
-
-	cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
-
-	zigbee at 0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		compatible = "silabs,em3581";
-		reg = <0>;
-		spi-max-frequency = <12000000>;
-	};
-};
-
-&blsp1_i2c3 {
-	pinctrl-0 = <&i2c_0_pins>;
-	pinctrl-names = "default";
-
-	status = "okay";
-
-	// RGB LEDs
-	pca9633: led-controller at 62 {
-		compatible = "nxp,pca9633";
-		nxp,hw-blink;
-		reg = <0x62>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		led_red: red at 0 {
-			color = <LED_COLOR_ID_RED>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <0>;
-		};
-
-		led_green: green at 1 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <1>;
-		};
-
-		led_blue: blue at 2 {
-			color = <LED_COLOR_ID_BLUE>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <2>;
-		};
-	};
-};
-
 &sdhci {
-	vqmmc-supply = <&vqmmc>;
+	status = "okay";
 	pinctrl-0 = <&sd_pins>;
 	pinctrl-names = "default";
+
 	cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
 	sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
-	status = "okay";
-};
-
-&pcie0 {
-	status = "okay";
-
-	perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
-	wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
-	clkreq-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
-
-	bridge at 0,0 {
-		reg = <0x00000000 0 0 0 0>;
-		#address-cells = <3>;
-		#size-cells = <2>;
-		ranges;
-
-		wifi2: wifi at 1,0 {
-			compatible = "qcom,ath10k";
-			reg = <0x00000000 0 0 0 0>;
-		};
-	};
-};
-
-&qpic_bam {
-	status = "okay";
-};
-
-&gmac {
-	status = "okay";
-};
-
-&switch {
-	status = "okay";
-};
-
-&swport4 {
-	status = "okay";
-	label = "lan";
-};
 
-&swport5 {
-	status = "okay";
-	label = "wan";
+	vqmmc-supply = <&vqmmc>;
 };
 
 &wifi0 {
-	pinctrl-0 = <&wifi_0_pins>;
-	pinctrl-names = "default";
-
-	status = "okay";
-
-	qcom,coexist-support = <1>;
-	qcom,coexist-gpio-pin = <52>;
-
 	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
 
 &wifi1 {
-	status = "okay";
-
-	ieee80211-freq-limit = <5170000 5330000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
 
 &wifi2 {
-	status = "okay";
+	reg = <0x00000000 0 0 0 0>;
 
-	ieee80211-freq-limit = <5490000 5835000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi
similarity index 79%
copy from target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
copy to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi
index c835a2216e..ce8d66680a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dtsi
@@ -7,9 +7,6 @@
 #include <dt-bindings/leds/common.h>
 
 / {
-	model = "Linksys WHW03 (Velop)";
-	compatible = "linksys,whw03", "qcom,ipq4019";
-
 	aliases {
 		led-boot = &led_blue;
 		led-failsafe = &led_red;
@@ -17,11 +14,6 @@
 		led-upgrade = &led_red;
 	};
 
-	// Default bootargs include rootfstype=ext4 and need to be overriden.
-	chosen {
-		bootargs-append = " rootfstype=squashfs";
-	};
-
 	soc {
 		ess-tcsr at 1953000 {
 			compatible = "qcom,tcsr";
@@ -49,7 +41,6 @@
 		};
 	};
 
-
 	keys {
 		compatible = "gpio-keys";
 
@@ -61,7 +52,6 @@
 	};
 };
 
-
 &tlmm {
 	mdio_pins: mdio-pinmux {
 		mux-1 {
@@ -77,19 +67,6 @@
 		};
 	};
 
-	sd_pins: sd-pinmux {
-		pins = "gpio23", "gpio24", "gpio25", "gpio26",
-			"gpio27", "gpio28", "gpio29", "gpio30",
-			"gpio31", "gpio32";
-		function = "sdio";
-	};
-
-	i2c_0_pins: i2c-0-pinmux {
-		pins = "gpio58", "gpio59";
-		function = "blsp_i2c0";
-		bias-disable;
-	};
-
 	serial_0_pins: serial0-pinmux {
 		pins = "gpio16", "gpio17";
 		function = "blsp_uart0";
@@ -102,12 +79,6 @@
 		bias-disable;
 	};
 
-	spi_0_pins: spi-0-pinmux {
-		pins = "gpio12", "gpio13", "gpio14", "gpio15";
-		function = "blsp_spi0";
-		bias-disable;
-	};
-
 	spi_1_pins: spi-1-pinmux {
 		mux-1 {
 			pins = "gpio44", "gpio46", "gpio47";
@@ -158,13 +129,6 @@
 	};
 };
 
-&mdio {
-	status = "okay";
-	pinctrl-0 = <&mdio_pins>;
-	pinctrl-names = "default";
-	reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
-};
-
 &ethphy0 {
 	status = "disabled";
 };
@@ -190,20 +154,15 @@
 };
 
 &cryptobam {
+	status = "okay";
 	num-channels = <4>;
 	qcom,num-ees = <2>;
-
-	status = "okay";
 };
 
 &crypto {
 	status = "okay";
 };
 
-&vqmmc {
-	status = "okay";
-};
-
 &blsp1_uart1 {
 	status = "okay";
 	pinctrl-0 = <&serial_0_pins>;
@@ -223,28 +182,26 @@
 };
 
 &blsp1_spi2 {
+	status = "okay";
 	pinctrl-0 = <&spi_1_pins>;
 	pinctrl-names = "default";
-	status = "okay";
 
 	cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
 
 	zigbee at 0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
 		compatible = "silabs,em3581";
 		reg = <0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
 		spi-max-frequency = <12000000>;
 	};
 };
 
 &blsp1_i2c3 {
+	status = "okay";
 	pinctrl-0 = <&i2c_0_pins>;
 	pinctrl-names = "default";
 
-	status = "okay";
-
 	// RGB LEDs
 	pca9633: led-controller at 62 {
 		compatible = "nxp,pca9633";
@@ -273,15 +230,6 @@
 	};
 };
 
-&sdhci {
-	vqmmc-supply = <&vqmmc>;
-	pinctrl-0 = <&sd_pins>;
-	pinctrl-names = "default";
-	cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
-	sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
-	status = "okay";
-};
-
 &pcie0 {
 	status = "okay";
 
@@ -297,7 +245,6 @@
 
 		wifi2: wifi at 1,0 {
 			compatible = "qcom,ath10k";
-			reg = <0x00000000 0 0 0 0>;
 		};
 	};
 };
@@ -325,27 +272,22 @@
 };
 
 &wifi0 {
+	status = "okay";
 	pinctrl-0 = <&wifi_0_pins>;
 	pinctrl-names = "default";
 
-	status = "okay";
-
 	qcom,coexist-support = <1>;
 	qcom,coexist-gpio-pin = <52>;
-
-	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
 
 &wifi1 {
 	status = "okay";
 
 	ieee80211-freq-limit = <5170000 5330000>;
-	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
 
 &wifi2 {
 	status = "okay";
 
 	ieee80211-freq-limit = <5490000 5835000>;
-	qcom,ath10k-calibration-variant = "linksys-whw03";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
index ccee293e96..d6aaf93b29 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
@@ -1,101 +1,25 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qcom-ipq4019.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/soc/qcom,tcsr.h>
-#include <dt-bindings/leds/common.h>
+#include "qcom-ipq4019-whw03.dtsi"
 
 / {
 	model = "Linksys WHW03 V2 (Velop)";
 	compatible = "linksys,whw03v2", "qcom,ipq4019";
 
-	aliases {
-		led-boot = &led_blue;
-		led-failsafe = &led_red;
-		led-running = &led_blue;
-		led-upgrade = &led_red;
-	};
-
 	// Default bootargs include rootfstype=ext4 and need to be overriden.
 	chosen {
 		bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
 		stdout-path = &blsp1_uart1;
 	};
-
-	soc {
-		ess-tcsr at 1953000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1953000 0x1000>;
-			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
-		};
-
-
-		tcsr at 1949000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1949000 0x100>;
-			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
-		};
-
-		tcsr at 194b000 {
-			compatible = "qcom,tcsr";
-			reg = <0x194b000 0x100>;
-			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
-		};
-
-		tcsr at 1957000 {
-			compatible = "qcom,tcsr";
-			reg = <0x1957000 0x100>;
-			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
-		};
-	};
-
-
-	keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
 };
 
-
 &tlmm {
-	mdio_pins: mdio-pinmux {
-		mux-1 {
-			pins = "gpio6";
-			function = "mdio";
-			bias-pull-up;
-		};
-
-		mux-2 {
-			pins = "gpio7";
-			function = "mdc";
-			bias-pull-up;
-		};
-	};
-
 	i2c_0_pins: i2c-0-pinmux {
 		pins = "gpio20", "gpio21";
 		function = "blsp_i2c0";
 		bias-disable;
 	};
 
-	serial_0_pins: serial0-pinmux {
-		pins = "gpio16", "gpio17";
-		function = "blsp_uart0";
-		bias-disable;
-	};
-
-	serial_1_pins: serial1-pinmux {
-		pins = "gpio8", "gpio9", "gpio10", "gpio11";
-		function = "blsp_uart1";
-		bias-disable;
-	};
-
 	spi_0_pins: spi-0-pinmux {
 		mux {
 			pins = "gpio13", "gpio14", "gpio15";
@@ -111,74 +35,23 @@
 			output-high;
 		};
 	};
+};
 
-	spi_1_pins: spi-1-pinmux {
-		mux-1 {
-			pins = "gpio44", "gpio46", "gpio47";
-			function = "blsp_spi1";
-			bias-disable;
-		};
-
-		mux-2 {
-			pins = "gpio31", "gpio45", "gpio49";
-			function = "gpio";
-			bias-pull-up;
-			output-high;
-		};
-
-		host-interrupt {
-			pins = "gpio42";
-			function = "gpio";
-			input;
-		};
-	};
-
-	wifi_0_pins: wifi0-pinmux {
-		pins = "gpio52";
+&spi_1_pins {
+	mux-wake {
+		pins = "gpio31";
 		function = "gpio";
-		drive-strength = <6>;
 		bias-pull-up;
 		output-high;
 	};
-
-	zigbee-0 {
-		gpio-hog;
-		gpios = <29 GPIO_ACTIVE_HIGH>;
-		bias-disable;
-		output-low;
-	};
-
-	zigbee-1 {
-		gpio-hog;
-		gpios = <50 GPIO_ACTIVE_HIGH>;
-		bias-disable;
-		input;
-	};
-
-	bluetooth-enable {
-		gpio-hog;
-		gpios = <32 GPIO_ACTIVE_HIGH>;
-		output-high;
-	};
 };
 
 &mdio {
 	status = "okay";
 	pinctrl-0 = <&mdio_pins>;
 	pinctrl-names = "default";
-	phy-reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
-};
 
-&ethphy0 {
-	status = "disabled";
-};
-
-&ethphy1 {
-	status = "disabled";
-};
-
-&ethphy2 {
-	status = "disabled";
+	phy-reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
 };
 
 &ethphy3 {
@@ -193,98 +66,6 @@
 	reg = <0x1d>;
 };
 
-&watchdog {
-	status = "okay";
-};
-
-&prng {
-	status = "okay";
-};
-
-&blsp_dma {
-	status = "okay";
-};
-
-&cryptobam {
-	num-channels = <4>;
-	qcom,num-ees = <2>;
-
-	status = "okay";
-};
-
-&crypto {
-	status = "okay";
-};
-
-&blsp1_uart1 {
-	status = "okay";
-	pinctrl-0 = <&serial_0_pins>;
-	pinctrl-names = "default";
-};
-
-&blsp1_uart2 {
-	status = "okay";
-	pinctrl-0 = <&serial_1_pins>;
-	pinctrl-names = "default";
-
-	bluetooth {
-		compatible = "csr,8811";
-
-		enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
-	};
-};
-
-&blsp1_spi2 {
-	pinctrl-0 = <&spi_1_pins>;
-	pinctrl-names = "default";
-	status = "okay";
-
-	cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
-
-	zigbee at 0 {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		compatible = "silabs,em3581";
-		reg = <0>;
-		spi-max-frequency = <12000000>;
-	};
-};
-
-&blsp1_i2c3 {
-	pinctrl-0 = <&i2c_0_pins>;
-	pinctrl-names = "default";
-
-	status = "okay";
-
-	// RGB LEDs
-	pca9633: led-controller at 62 {
-		compatible = "nxp,pca9633";
-		nxp,hw-blink;
-		reg = <0x62>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		led_red: red at 0 {
-			color = <LED_COLOR_ID_RED>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <0>;
-		};
-
-		led_green: green at 1 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <1>;
-		};
-
-		led_blue: blue at 2 {
-			color = <LED_COLOR_ID_BLUE>;
-			function = LED_FUNCTION_INDICATOR;
-			reg = <2>;
-		};
-	};
-};
-
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -421,63 +202,17 @@
 	};
 };
 
-&pcie0 {
-	status = "okay";
-
-	perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
-	wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
-	clkreq-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
-
-	bridge at 0,0 {
-		reg = <0x00000000 0 0 0 0>;
-		#address-cells = <3>;
-		#size-cells = <2>;
-		ranges;
-
-		wifi2: wifi at 1,0 {
-			compatible = "qcom,ath10k";
-			reg = <0x00010000 0 0 0 0>;
-		};
-	};
-};
-
-&qpic_bam {
-	status = "okay";
-};
-
-&gmac {
-	status = "okay";
-};
-
-&switch {
-	status = "okay";
-};
-
 &swport4 {
-	status = "okay";
-	label = "lan";
-
 	nvmem-cell-names = "mac-address";
 	nvmem-cells = <&macaddr_gmac1>;
 };
 
 &swport5 {
-	status = "okay";
-	label = "wan";
-
 	nvmem-cell-names = "mac-address";
 	nvmem-cells = <&macaddr_gmac0 0>;
 };
 
 &wifi0 {
-	pinctrl-0 = <&wifi_0_pins>;
-	pinctrl-names = "default";
-
-	status = "okay";
-
-	qcom,coexist-support = <1>;
-	qcom,coexist-gpio-pin = <52>;
-
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -485,9 +220,6 @@
 };
 
 &wifi1 {
-	status = "okay";
-
-	ieee80211-freq-limit = <5170000 5330000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -495,9 +227,8 @@
 };
 
 &wifi2 {
-	status = "okay";
+	reg = <0x00010000 0 0 0 0>;
 
-	ieee80211-freq-limit = <5490000 5835000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";



From lede-commits at lists.infradead.org  Sun May  5 01:33:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 04:33:17 -0400
Subject: [openwrt/openwrt]  ipq40xx: add support for Linksys WHW03 V1
In-Reply-To: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
References: <171489799775.1393013.4649522146487934828@git-01.infra.openwrt.org>
Message-ID: <mailman.33692.1714898005.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c90487556229ae264dec33305e5c71c4ef7dd1c5

commit c90487556229ae264dec33305e5c71c4ef7dd1c5
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Thu Apr 11 12:14:19 2024 -0300

    ipq40xx: add support for Linksys WHW03 V1
    
    Hardware:
    =========
    SOC:             Qualcomm IPQ4019
    WiFi 1:          QCA4019 IEEE 802.11b/g/n
    WiFi 2:          QCA4019 IEEE 802.11a/n/ac
    WiFi 3:          QCA9886 IEEE 802.11a/n/ac
    Bluetooth:       Qualcomm CSR8510 (A10)
    Zigbee:          Silicon Labs EM3581 NCP + Skyworks SE2432L
    Ethernet:        Qualcomm Atheros QCA8072 (2-port)
    Flash:           Samsung KLM4G1FEPD (4GB eMMC)
    RAM (NAND):      512MB
    LED Controller:  NXP PCA9633 (I2C)
    Buttons:         Single reset button (GPIO).
    
    Ethernet:
    =========
    The device has 2 ethernet ports, configured as follows by default:
    - left port: WAN
    - right port: LAN
    
    Wifi:
    =====
    The Wifi radios are turned off by default. To configure the router,
    you will need to connect your computer to the LAN port of the device.
    
    Bluetooth and Zigbee:
    =====================
    Configuration included but not tested.
    
    Storage:
    ========
    For compatibility with stock firmware, all of OpenWrt runs in a 136 MiB
    eMMC partition (of which there are two copies, see below). You can also
    use partition /dev/mmcblk0p19 "syscfg" (3.4 GiB) any way you see fit.
    During very limited tests, stock firmware did not mount this partition.
    However, backing up its stock content before use is recommended anyway.
    
    Firmware:
    =========
    The device uses a dual firmware mechanism: it automatically reverts to
    the previous firmware after 3 failed boot attempts.
    
    You can switch to the inactive firmware copy by changing the "boot_part"
    U-Boot environment variable. You can also do it by turning on the device
    for a couple of seconds and then back off, 3 times in a row.
    
    Installation:
    =============
    OpenWrt's "factory" image can be installed via the stock web UI:
    1. Login to the UI. (The default password is printed on the label.)
    2. Enter support mode by clicking on the "CA" link at the bottom.
    3. Click "Connectivity", "Choose file", "Start", and ignore warnings.
    
    This port is based on work done by flipy (https://github.com/flipy).
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15345
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/uboot-envtools/files/ipq40xx          |   3 +
 .../ipq40xx/base-files/etc/board.d/02_network      |   5 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |  12 +
 .../linux/ipq40xx/base-files/etc/init.d/bootcount  |  32 ++
 .../lib/preinit/05_set_iface_mac_ipq40xx.sh        |   6 +
 .../ipq40xx/base-files/lib/upgrade/linksys.sh      |  68 ++++
 .../ipq40xx/base-files/lib/upgrade/platform.sh     |   6 +-
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts  | 351 +++++++++++++++++++++
 target/linux/ipq40xx/image/generic.mk              |  14 +
 9 files changed, 496 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx
index 8cada7334b..717158b042 100644
--- a/package/boot/uboot-envtools/files/ipq40xx
+++ b/package/boot/uboot-envtools/files/ipq40xx
@@ -67,6 +67,9 @@ linksys,mr8300)
 linksys,whw01)
 	ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000"
 	;;
+linksys,whw03)
+        ubootenv_add_uci_config "/dev/mmcblk0p11" "0x0" "0x100000"
+        ;;
 linksys,whw03v2)
 	ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x80000" "0x20000"
 	;;
diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 02059580a1..e86d24fab5 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -37,6 +37,7 @@ ipq40xx_setup_interfaces()
 	glinet,gl-ap1300|\
 	glinet,gl-b2200|\
 	google,wifi|\
+	linksys,whw03|\
 	linksys,whw03v2|\
 	luma,wrtq-329acn|\
 	mikrotik,cap-ac|\
@@ -215,6 +216,10 @@ ipq40xx_setup_macs()
 		wan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
 		;;
+	linksys,whw03)
+		wan_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
+		lan_mac="$wan_mac"
+		;;
 	mikrotik,cap-ac |\
 	mikrotik,hap-ac2|\
 	mikrotik,hap-ac3|\
diff --git a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 654be2697a..3b7f44282d 100644
--- a/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ipq40xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -40,6 +40,10 @@ case "$FIRMWARE" in
 		# OEM assigns 4 sequential MACs
 		ath10k_patch_mac $(macaddr_setbit_la $(macaddr_add "$(cat /sys/class/net/eth0/address)" 4))
 		;;
+	linksys,whw03)
+		caldata_extract_mmc "0:ART" 0x9000 0x2f20
+		ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
+		;;
 	netgear,rbr40|\
 	netgear,rbs40|\
 	netgear,rbr50|\
@@ -104,6 +108,10 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x1000 0x2f20
 		ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
 		;;
+	linksys,whw03)
+		caldata_extract_mmc "0:ART" 0x1000 0x2f20
+		ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+		;;
 	meraki,mr33 |\
 	meraki,mr74)
 		caldata_extract_ubi "ART" 0x1000 0x2f20
@@ -200,6 +208,10 @@ case "$FIRMWARE" in
 		caldata_extract "ART" 0x5000 0x2f20
 		ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 3)
 		;;
+	linksys,whw03)
+		caldata_extract_mmc "0:ART" 0x5000 0x2f20
+		ath10k_patch_mac $(macaddr_add "$(cat /sys/class/net/eth0/address)" 2)
+		;;
 	meraki,mr33 |\
 	meraki,mr74)
 		caldata_extract_ubi "ART" 0x5000 0x2f20
diff --git a/target/linux/ipq40xx/base-files/etc/init.d/bootcount b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
index df656c9b85..0120f78cfe 100755
--- a/target/linux/ipq40xx/base-files/etc/init.d/bootcount
+++ b/target/linux/ipq40xx/base-files/etc/init.d/bootcount
@@ -2,6 +2,35 @@
 
 START=99
 
+mmc_resetbc() {
+	local part_label="$1"
+
+	. /lib/functions.sh
+
+	local part_device="$(find_mmc_part "$part_label")"
+	if [ "$part_device" = "" ]; then
+		>&2 echo "mmc_resetbc: Unknown partition label: $part_label"
+		return 1
+	fi
+
+	local magic_number="$(hexdump -e '"0x%02x\n"' -n 4 "$part_device")"
+	if [ "$magic_number" != "0x20110811" ]; then
+		>&2 echo "mmc_resetbc: Unexpected partition magic: $magic_number"
+		return 1
+	fi
+
+	local last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
+	if [ "$last_count" != "0x00" ]; then
+		printf "\x00" | dd of="$part_device" bs=4 seek=1 count=1 conv=notrunc 2>/dev/null
+
+		last_count=$(hexdump -e '"0x%02x\n"' -n 4 -s 4 "$part_device")
+		if [ "$last_count" != "0x00" ]; then
+			>&2 echo "mmc_resetbc: Unable to reset boot counter"
+			return 1
+		fi
+	fi
+}
+
 boot() {
 	case $(board_name) in
 	alfa-network,ap120c-ac)
@@ -15,6 +44,9 @@ boot() {
 	linksys,whw03v2)
 		mtd resetbc s_env || true
 		;;
+	linksys,whw03)
+		mmc_resetbc s_env || true
+		;;
 	netgear,wac510)
 		fw_setenv boot_cnt=0
 		;;
diff --git a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
index 96e70f62a9..1ede544aac 100644
--- a/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
+++ b/target/linux/ipq40xx/base-files/lib/preinit/05_set_iface_mac_ipq40xx.sh
@@ -30,6 +30,12 @@ preinit_set_mac_address() {
 		ip link set dev lan1 address $(macaddr_add "$base_mac" 1)
 		ip link set dev eth0 address $(macaddr_setbit "$base_mac" 7)
 		;;
+	linksys,whw03)
+		base_mac=$(mmc_get_mac_ascii devinfo hw_mac_addr)
+		ip link set dev eth0 address "$base_mac"
+		ip link set dev lan address "$base_mac"
+		ip link set dev wan address "$base_mac"
+		;;
 	mikrotik,wap-ac|\
 	mikrotik,wap-ac-lte|\
 	mikrotik,wap-r-ac)
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh b/target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
index 18366fc622..860c3fd2de 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/linksys.sh
@@ -123,3 +123,71 @@ platform_do_upgrade_linksys() {
 		get_image "$1" | mtd -e "$part_label" write - "$part_label"
 	}
 }
+
+linksys_get_cmdline_rootfs_device() {
+	if read cmdline < /proc/cmdline; then
+		case "$cmdline" in
+		*root=*)
+			local str="${cmdline##*root=}"
+			echo "${str%% *}"
+			return
+			;;
+		esac
+	fi
+	return 1
+}
+
+linksys_get_current_boot_part_emmc() {
+	local boot_part="$(fw_printenv -n boot_part)"
+	if [ "$boot_part" = 1 ] || [ "$boot_part" = 2 ]; then
+		v "Current boot_part=$boot_part selected from bootloader environment"
+	else
+		local rootfs_device="$(linksys_get_cmdline_rootfs_device)"
+		if [ "$rootfs_device" = "$(find_mmc_part "rootfs")" ]; then
+			boot_part=1
+		elif [ "$rootfs_device" = "$(find_mmc_part "alt_rootfs")" ]; then
+			boot_part=2
+		else
+			v "Could not determine current boot_part"
+			return 1
+		fi
+		v "Current boot_part=$boot_part selected from cmdline rootfs=$rootfs_device"
+	fi
+	echo $boot_part
+}
+
+linksys_set_target_partitions_emmc() {
+	local current_boot_part="$1"
+
+	if [ "$current_boot_part" = 1 ]; then
+		CI_KERNPART="alt_kernel"
+		CI_ROOTPART="alt_rootfs"
+		fw_setenv -s - <<-EOF
+			boot_part 2
+			auto_recovery yes
+		EOF
+	elif [ "$current_boot_part" = 2 ]; then
+		CI_KERNPART="kernel"
+		CI_ROOTPART="rootfs"
+		fw_setenv -s - <<-EOF
+			boot_part 1
+			auto_recovery yes
+		EOF
+	else
+		v "Could not set target eMMC partitions"
+		return 1
+	fi
+
+	v "Target eMMC partitions: $CI_KERNPART, $CI_ROOTPART"
+}
+
+platform_do_upgrade_linksys_emmc() {
+	local file="$1"
+
+	mkdir -p /var/lock
+	local current_boot_part="$(linksys_get_current_boot_part_emmc)"
+	linksys_set_target_partitions_emmc "$current_boot_part" || exit 1
+	touch /var/lock/fw_printenv.lock
+
+	emmc_do_upgrade "$file"
+}
diff --git a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
index e934326849..53a9561148 100644
--- a/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ipq40xx/base-files/lib/upgrade/platform.sh
@@ -175,6 +175,9 @@ platform_do_upgrade() {
 	linksys,whw03v2)
 		platform_do_upgrade_linksys "$1"
 		;;
+	linksys,whw03)
+		platform_do_upgrade_linksys_emmc "$1"
+		;;
 	meraki,mr33 |\
 	meraki,mr74)
 		CI_KERNPART="part.safe"
@@ -236,7 +239,8 @@ platform_do_upgrade() {
 platform_copy_config() {
 	case "$(board_name)" in
 	glinet,gl-b2200 |\
-	google,wifi)
+	google,wifi |\
+	linksys,whw03)
 		emmc_copy_config
 		;;
 	esac
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
new file mode 100644
index 0000000000..c835a2216e
--- /dev/null
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03.dts
@@ -0,0 +1,351 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qcom-ipq4019.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/soc/qcom,tcsr.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Linksys WHW03 (Velop)";
+	compatible = "linksys,whw03", "qcom,ipq4019";
+
+	aliases {
+		led-boot = &led_blue;
+		led-failsafe = &led_red;
+		led-running = &led_blue;
+		led-upgrade = &led_red;
+	};
+
+	// Default bootargs include rootfstype=ext4 and need to be overriden.
+	chosen {
+		bootargs-append = " rootfstype=squashfs";
+	};
+
+	soc {
+		ess-tcsr at 1953000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1953000 0x1000>;
+			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
+		};
+
+
+		tcsr at 1949000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1949000 0x100>;
+			qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
+		};
+
+		tcsr at 194b000 {
+			compatible = "qcom,tcsr";
+			reg = <0x194b000 0x100>;
+			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
+		};
+
+		tcsr at 1957000 {
+			compatible = "qcom,tcsr";
+			reg = <0x1957000 0x100>;
+			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
+		};
+	};
+
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+};
+
+
+&tlmm {
+	mdio_pins: mdio-pinmux {
+		mux-1 {
+			pins = "gpio6";
+			function = "mdio";
+			bias-pull-up;
+		};
+
+		mux-2 {
+			pins = "gpio7";
+			function = "mdc";
+			bias-pull-up;
+		};
+	};
+
+	sd_pins: sd-pinmux {
+		pins = "gpio23", "gpio24", "gpio25", "gpio26",
+			"gpio27", "gpio28", "gpio29", "gpio30",
+			"gpio31", "gpio32";
+		function = "sdio";
+	};
+
+	i2c_0_pins: i2c-0-pinmux {
+		pins = "gpio58", "gpio59";
+		function = "blsp_i2c0";
+		bias-disable;
+	};
+
+	serial_0_pins: serial0-pinmux {
+		pins = "gpio16", "gpio17";
+		function = "blsp_uart0";
+		bias-disable;
+	};
+
+	serial_1_pins: serial1-pinmux {
+		pins = "gpio8", "gpio9", "gpio10", "gpio11";
+		function = "blsp_uart1";
+		bias-disable;
+	};
+
+	spi_0_pins: spi-0-pinmux {
+		pins = "gpio12", "gpio13", "gpio14", "gpio15";
+		function = "blsp_spi0";
+		bias-disable;
+	};
+
+	spi_1_pins: spi-1-pinmux {
+		mux-1 {
+			pins = "gpio44", "gpio46", "gpio47";
+			function = "blsp_spi1";
+			bias-disable;
+		};
+
+		mux-2 {
+			pins = "gpio45", "gpio49";
+			function = "gpio";
+			bias-pull-up;
+			output-high;
+		};
+
+		host-interrupt {
+			pins = "gpio42";
+			function = "gpio";
+			input;
+		};
+	};
+
+	wifi_0_pins: wifi0-pinmux {
+		pins = "gpio52";
+		function = "gpio";
+		drive-strength = <6>;
+		bias-pull-up;
+		output-high;
+	};
+
+	zigbee-0 {
+		gpio-hog;
+		gpios = <29 GPIO_ACTIVE_HIGH>;
+		bias-disable;
+		output-low;
+	};
+
+	zigbee-1 {
+		gpio-hog;
+		gpios = <50 GPIO_ACTIVE_HIGH>;
+		bias-disable;
+		input;
+	};
+
+	bluetooth-enable {
+		gpio-hog;
+		gpios = <32 GPIO_ACTIVE_HIGH>;
+		output-high;
+	};
+};
+
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 41 GPIO_ACTIVE_LOW>;
+};
+
+&ethphy0 {
+	status = "disabled";
+};
+
+&ethphy1 {
+	status = "disabled";
+};
+
+&ethphy2 {
+	status = "disabled";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&prng {
+	status = "okay";
+};
+
+&blsp_dma {
+	status = "okay";
+};
+
+&cryptobam {
+	num-channels = <4>;
+	qcom,num-ees = <2>;
+
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&vqmmc {
+	status = "okay";
+};
+
+&blsp1_uart1 {
+	status = "okay";
+	pinctrl-0 = <&serial_0_pins>;
+	pinctrl-names = "default";
+};
+
+&blsp1_uart2 {
+	status = "okay";
+	pinctrl-0 = <&serial_1_pins>;
+	pinctrl-names = "default";
+
+	bluetooth {
+		compatible = "csr,8811";
+
+		enable-gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&blsp1_spi2 {
+	pinctrl-0 = <&spi_1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	cs-gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
+
+	zigbee at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		compatible = "silabs,em3581";
+		reg = <0>;
+		spi-max-frequency = <12000000>;
+	};
+};
+
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	// RGB LEDs
+	pca9633: led-controller at 62 {
+		compatible = "nxp,pca9633";
+		nxp,hw-blink;
+		reg = <0x62>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		led_red: red at 0 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_INDICATOR;
+			reg = <0>;
+		};
+
+		led_green: green at 1 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+			reg = <1>;
+		};
+
+		led_blue: blue at 2 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_INDICATOR;
+			reg = <2>;
+		};
+	};
+};
+
+&sdhci {
+	vqmmc-supply = <&vqmmc>;
+	pinctrl-0 = <&sd_pins>;
+	pinctrl-names = "default";
+	cd-gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
+	sd-ldo-gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
+	status = "okay";
+};
+
+&pcie0 {
+	status = "okay";
+
+	perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+	wake-gpios = <&tlmm 40 GPIO_ACTIVE_LOW>;
+	clkreq-gpios = <&tlmm 39 GPIO_ACTIVE_LOW>;
+
+	bridge at 0,0 {
+		reg = <0x00000000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		wifi2: wifi at 1,0 {
+			compatible = "qcom,ath10k";
+			reg = <0x00000000 0 0 0 0>;
+		};
+	};
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&switch {
+	status = "okay";
+};
+
+&swport4 {
+	status = "okay";
+	label = "lan";
+};
+
+&swport5 {
+	status = "okay";
+	label = "wan";
+};
+
+&wifi0 {
+	pinctrl-0 = <&wifi_0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+
+	qcom,coexist-support = <1>;
+	qcom,coexist-gpio-pin = <52>;
+
+	qcom,ath10k-calibration-variant = "linksys-whw03";
+};
+
+&wifi1 {
+	status = "okay";
+
+	ieee80211-freq-limit = <5170000 5330000>;
+	qcom,ath10k-calibration-variant = "linksys-whw03";
+};
+
+&wifi2 {
+	status = "okay";
+
+	ieee80211-freq-limit = <5490000 5835000>;
+	qcom,ath10k-calibration-variant = "linksys-whw03";
+};
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 3b6d111905..7af777248d 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -723,6 +723,20 @@ define Device/linksys_mr8300
 endef
 TARGET_DEVICES += linksys_mr8300
 
+define Device/linksys_whw03
+	$(call Device/FitzImage)
+	DEVICE_VENDOR := Linksys
+	DEVICE_MODEL := WHW03
+	SOC := qcom-ipq4019
+	KERNEL_SIZE := 8192k
+	IMAGE_SIZE := 131072k
+	IMAGES += factory.bin
+	IMAGE/factory.bin  := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | linksys-image type=WHW03
+	DEVICE_PACKAGES := ath10k-firmware-qca9888-ct kmod-leds-pca963x kmod-spi-dev kmod-bluetooth \
+		kmod-fs-ext4 e2fsprogs kmod-fs-f2fs mkf2fs losetup
+endef
+TARGET_DEVICES += linksys_whw03
+
 define Device/linksys_whw03v2
 	$(call Device/FitzImage)
 	DEVICE_VENDOR := Linksys



From lede-commits at lists.infradead.org  Sun May  5 02:27:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 05:27:21 -0400
Subject: [openwrt/openwrt]  ath79: refresh patches
In-Reply-To: <171490124176.1526475.12949083143609612705@git-01.infra.openwrt.org>
References: <171490124176.1526475.12949083143609612705@git-01.infra.openwrt.org>
Message-ID: <mailman.33693.1714901247.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d1504a1e762addc005bd39b03cb3f9ada584bf75

commit d1504a1e762addc005bd39b03cb3f9ada584bf75
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun May 5 10:38:37 2024 +0200

    ath79: refresh patches
    
    CI is telling us that we need to refresh the patches, so lets do so.
    
    Link: https://github.com/openwrt/openwrt/pull/15382
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
index 2763b16bf5..6c97bc307c 100644
--- a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
@@ -579,7 +579,7 @@ SVN-Revision: 35130
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -259,7 +259,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+@@ -290,7 +290,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);



From lede-commits at lists.infradead.org  Sun May  5 08:22:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 11:22:34 -0400
Subject: [openwrt/openwrt]  tools: pkgconf: provide prefix for host and
 hostpkg stagind directory
In-Reply-To: <171492255457.2500911.5942061995157156699@git-01.infra.openwrt.org>
References: <171492255457.2500911.5942061995157156699@git-01.infra.openwrt.org>
Message-ID: <mailman.33715.1714922562.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/49a64c954109a7af9e64e3ea8d84ae5b3004435f

commit 49a64c954109a7af9e64e3ea8d84ae5b3004435f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Apr 11 17:02:45 2024 +0200

    tools: pkgconf: provide prefix for host and hostpkg stagind directory
    
    Some package might require to fix their pkg-config file to point to host
    or hostpkg file. This is the case for glib2 library that provides with
    pkg-config variables, tools to generates files from xml. Those tools
    should use the host binary instead of the targets one to correctly build
    packages that makes use of such tools.
    
    Link: https://github.com/openwrt/openwrt/pull/15134
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/pkgconf/files/pkg-config | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/pkgconf/files/pkg-config b/tools/pkgconf/files/pkg-config
index 65e0fb09f5..2e4dac9073 100755
--- a/tools/pkgconf/files/pkg-config
+++ b/tools/pkgconf/files/pkg-config
@@ -4,6 +4,8 @@ ${STAGING_DIR_HOST}/bin/pkg-config.real \
 --keep-system-cflags \
 --keep-system-libs \
 --define-variable=prefix="${STAGING_PREFIX}" \
+--define-variable=prefix_host="${STAGING_DIR_HOST}" \
+--define-variable=prefix_hostpkg="${STAGING_DIR_HOSTPKG}" \
 --define-variable=exec_prefix="${STAGING_PREFIX}" \
 --define-variable=bindir="${STAGING_PREFIX}/bin" \
 $PKG_CONFIG_EXTRAARGS "$@"



From lede-commits at lists.infradead.org  Sun May  5 11:49:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 14:49:55 -0400
Subject: [openwrt/openwrt]  kernel: fix corrupted ethernet header on bridge
 multicast-to-unicast
In-Reply-To: <171493499513.3039485.3392608558278525591@git-01.infra.openwrt.org>
References: <171493499513.3039485.3392608558278525591@git-01.infra.openwrt.org>
Message-ID: <mailman.33754.1714935003.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ccb2390d4fa59d6880d8e3948b10ce05579ce355

commit ccb2390d4fa59d6880d8e3948b10ce05579ce355
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun May 5 20:48:23 2024 +0200

    kernel: fix corrupted ethernet header on bridge multicast-to-unicast
    
    Fixes: 45a8e962a591 ("kernel: fix crash with multicast-to-unicast and fraglist GRO")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...fix-corrupted-ethernet-header-on-multicas.patch | 42 ++++++++++++++++++++++
 ...fix-corrupted-ethernet-header-on-multicas.patch | 42 ++++++++++++++++++++++
 2 files changed, 84 insertions(+)

diff --git a/target/linux/generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch b/target/linux/generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
new file mode 100644
index 0000000000..c315790082
--- /dev/null
+++ b/target/linux/generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
@@ -0,0 +1,42 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 5 May 2024 20:36:56 +0200
+Subject: [PATCH] net: bridge: fix corrupted ethernet header on
+ multicast-to-unicast
+
+The change from skb_copy to pskb_copy unfortunately changed the data
+copying to omit the ethernet header, since it was pulled before reaching
+this point. Fix this by calling __skb_push/pull around pskb_copy.
+
+Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -253,6 +253,7 @@ static void maybe_deliver_addr(struct ne
+ {
+ 	struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
+ 	const unsigned char *src = eth_hdr(skb)->h_source;
++	struct sk_buff *nskb;
+ 
+ 	if (!should_deliver(p, skb))
+ 		return;
+@@ -261,12 +262,16 @@ static void maybe_deliver_addr(struct ne
+ 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
+ 		return;
+ 
+-	skb = pskb_copy(skb, GFP_ATOMIC);
+-	if (!skb) {
++	__skb_push(skb, ETH_HLEN);
++	nskb = pskb_copy(skb, GFP_ATOMIC);
++	__skb_pull(skb, ETH_HLEN);
++	if (!nskb) {
+ 		DEV_STATS_INC(dev, tx_dropped);
+ 		return;
+ 	}
+ 
++	skb = nskb;
++	__skb_pull(skb, ETH_HLEN);
+ 	if (!is_broadcast_ether_addr(addr))
+ 		memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);
+ 
diff --git a/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch b/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
new file mode 100644
index 0000000000..fb2fab24e3
--- /dev/null
+++ b/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
@@ -0,0 +1,42 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 5 May 2024 20:36:56 +0200
+Subject: [PATCH] net: bridge: fix corrupted ethernet header on
+ multicast-to-unicast
+
+The change from skb_copy to pskb_copy unfortunately changed the data
+copying to omit the ethernet header, since it was pulled before reaching
+this point. Fix this by calling __skb_push/pull around pskb_copy.
+
+Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -258,6 +258,7 @@ static void maybe_deliver_addr(struct ne
+ {
+ 	struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
+ 	const unsigned char *src = eth_hdr(skb)->h_source;
++	struct sk_buff *nskb;
+ 
+ 	if (!should_deliver(p, skb))
+ 		return;
+@@ -266,12 +267,16 @@ static void maybe_deliver_addr(struct ne
+ 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
+ 		return;
+ 
+-	skb = pskb_copy(skb, GFP_ATOMIC);
+-	if (!skb) {
++	__skb_push(skb, ETH_HLEN);
++	nskb = pskb_copy(skb, GFP_ATOMIC);
++	__skb_pull(skb, ETH_HLEN);
++	if (!nskb) {
+ 		DEV_STATS_INC(dev, tx_dropped);
+ 		return;
+ 	}
+ 
++	skb = nskb;
++	__skb_pull(skb, ETH_HLEN);
+ 	if (!is_broadcast_ether_addr(addr))
+ 		memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);
+ 



From lede-commits at lists.infradead.org  Sun May  5 12:23:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 15:23:07 -0400
Subject: [openwrt/openwrt]  x86: generic: config-6.6: add/remove default syms
In-Reply-To: <171493698599.3137648.6877304973879553859@git-01.infra.openwrt.org>
References: <171493698599.3137648.6877304973879553859@git-01.infra.openwrt.org>
Message-ID: <mailman.33757.1714936990.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/485afd4b1107d38dff94bca106ecf260982dee35

commit 485afd4b1107d38dff94bca106ecf260982dee35
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Thu May 2 16:05:41 2024 -0400

    x86: generic: config-6.6: add/remove default syms
    
    Add new default and remove deprecated symbol introduced by 6.6.30[1]
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.30&id2=v6.6.29
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 target/linux/x86/config-6.6 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6
index 7f00ffdb78..d71e95f676 100644
--- a/target/linux/x86/config-6.6
+++ b/target/linux/x86/config-6.6
@@ -61,6 +61,7 @@ CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_SUP_AMD=y
 CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_CPU_SUP_CYRIX_32=y
@@ -361,7 +362,6 @@ CONFIG_SG_POOL=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set
 # CONFIG_STRICT_SIGALTSTACK_SIZE is not set



From lede-commits at lists.infradead.org  Sun May  5 12:23:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 15:23:06 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.30
In-Reply-To: <171493698599.3137648.6877304973879553859@git-01.infra.openwrt.org>
References: <171493698599.3137648.6877304973879553859@git-01.infra.openwrt.org>
Message-ID: <mailman.33758.1714936990.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4c6e9a99432bd87c0afb73a48a28b3f467db407e

commit 4c6e9a99432bd87c0afb73a48a28b3f467db407e
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Thu May 2 15:40:57 2024 -0400

    kernel: bump 6.6 to 6.6.30
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30
    
    Removed upstreamed:
            ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch[1]
    
    Manually rebased:
            generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
            mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.30&id=87fc30db0a2bb300de289dae7c5579cc27a3cbbd
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |  4 +-
 ...1-net-dsa-mv88e6xxx-disable-ATU-violation.patch |  2 +-
 .../generic/hack-6.6/901-debloat_sock_diag.patch   |  4 +-
 .../linux/generic/hack-6.6/902-debloat_proc.patch  |  2 +-
 ...d-optional-threading-for-backlog-processi.patch |  6 +--
 ...xxx-Request-assisted-learning-on-CPU-port.patch |  2 +-
 ...-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch | 46 ----------------------
 .../patches-6.6/104-mt7622-add-snor-irq.patch      |  2 +-
 ...arm64-dts-mediatek-mt7622-fix-GICv2-range.patch |  2 +-
 ...64-dts-mediatek-add-mt7622-pcie-slot-node.patch |  4 +-
 ...cie-mediatek-add-support-for-coherent-DMA.patch |  4 +-
 .../patches-6.6/862-arm64-dts-mt7986-add-afe.patch |  4 +-
 ...s-mt7986-move-cpuboot-in-a-dedicated-node.patch | 16 ++++----
 ...4-dts-mt7986-move-ilm-in-a-dedicated-node.patch |  6 +--
 ...4-dts-mt7986-move-dlm-in-a-dedicated-node.patch |  8 ++--
 15 files changed, 33 insertions(+), 79 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index c3e9ee3309..7b447be076 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .29
-LINUX_KERNEL_HASH-6.6.29 = 7f26f74c08082c86b1daf866e4d49c5d8276cc1906a89d0e367e457ec167cbd0
+LINUX_VERSION-6.6 = .30
+LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6
diff --git a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
index 6a2c60107b..69e19c3b47 100644
--- a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
+++ b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -3305,6 +3305,9 @@ static int mv88e6xxx_setup_port(struct m
+@@ -3353,6 +3353,9 @@ static int mv88e6xxx_setup_port(struct m
  	else
  		reg = 1 << port;
  
diff --git a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
index b0054da2eb..af000f76fc 100644
--- a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
+++ b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  static void sock_def_write_space_wfree(struct sock *sk);
  static void sock_def_write_space(struct sock *sk);
-@@ -589,6 +591,21 @@ discard_and_relse:
+@@ -590,6 +592,21 @@ discard_and_relse:
  }
  EXPORT_SYMBOL(__sk_receive_skb);
  
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
  							  u32));
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
-@@ -2246,9 +2263,11 @@ static void __sk_free(struct sock *sk)
+@@ -2247,9 +2264,11 @@ static void __sk_free(struct sock *sk)
  	if (likely(sk->sk_net_refcnt))
  		sock_inuse_add(sock_net(sk), -1);
  
diff --git a/target/linux/generic/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch
index 6b59fd674f..2a311d327a 100644
--- a/target/linux/generic/hack-6.6/902-debloat_proc.patch
+++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -4144,6 +4144,8 @@ static __net_initdata struct pernet_oper
+@@ -4145,6 +4145,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
diff --git a/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
index 7b4678251d..5372171b42 100644
--- a/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
+++ b/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
@@ -182,10 +182,10 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int min_rcvbuf = SOCK_MIN_RCVBUF;
  static int max_skb_frags = MAX_SKB_FRAGS;
 +static int backlog_threaded;
+ static int min_mem_pcpu_rsv = SK_MEMORY_PCPU_RESERVE;
  
  static int net_msg_warn;	/* Unused, but still a sysctl */
- 
-@@ -188,6 +189,23 @@ static int rps_sock_flow_sysctl(struct c
+@@ -189,6 +190,23 @@ static int rps_sock_flow_sysctl(struct c
  }
  #endif /* CONFIG_RPS */
  
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef CONFIG_NET_FLOW_LIMIT
  static DEFINE_MUTEX(flow_limit_update_mutex);
  
-@@ -532,6 +550,15 @@ static struct ctl_table net_core_table[]
+@@ -541,6 +559,15 @@ static struct ctl_table net_core_table[]
  		.proc_handler	= rps_sock_flow_sysctl
  	},
  #endif
diff --git a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index d11e0eda66..28d89eb0fe 100644
--- a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -6887,6 +6887,7 @@ static int mv88e6xxx_register_switch(str
+@@ -6935,6 +6935,7 @@ static int mv88e6xxx_register_switch(str
  	ds->ops = &mv88e6xxx_switch_ops;
  	ds->ageing_time_min = chip->info->age_time_coeff;
  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
diff --git a/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch b/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
deleted file mode 100644
index caa5b070e4..0000000000
--- a/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9732c4f2d93a4a39ffc903c88ab7d531a8bb2e74 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 20 Mar 2024 00:47:58 +0100
-Subject: [PATCH] mtd: rawnand: qcom: Fix broken misc_cmd_type in exec_op
-
-misc_cmd_type in exec_op have multiple problems. With commit a82990c8a409
-("mtd: rawnand: qcom: Add read/read_start ops in exec_op path") it was
-reworked and generalized but actually dropped the handling of the
-RESET_DEVICE command.
-
-Also additional logic was added without clear explaination causing the
-erase command to be broken on testing it on a ipq806x nandc.
-
-Add some additional logic to restore RESET_DEVICE command handling and
-fix erase command.
-
-Fixes: a82990c8a409 ("mtd: rawnand: qcom: Add read/read_start ops in exec_op path")
-Cc: stable at vger.kernel.org
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/mtd/nand/raw/qcom_nandc.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/drivers/mtd/nand/raw/qcom_nandc.c
-+++ b/drivers/mtd/nand/raw/qcom_nandc.c
-@@ -2815,7 +2815,7 @@ static int qcom_misc_cmd_type_exec(struc
- 			      host->cfg0_raw & ~(7 << CW_PER_PAGE));
- 		nandc_set_reg(chip, NAND_DEV0_CFG1, host->cfg1_raw);
- 		instrs = 3;
--	} else {
-+	} else if (q_op.cmd_reg != OP_RESET_DEVICE) {
- 		return 0;
- 	}
- 
-@@ -2830,9 +2830,8 @@ static int qcom_misc_cmd_type_exec(struc
- 	nandc_set_reg(chip, NAND_EXEC_CMD, 1);
- 
- 	write_reg_dma(nandc, NAND_FLASH_CMD, instrs, NAND_BAM_NEXT_SGL);
--	(q_op.cmd_reg == OP_BLOCK_ERASE) ? write_reg_dma(nandc, NAND_DEV0_CFG0,
--	2, NAND_BAM_NEXT_SGL) : read_reg_dma(nandc,
--	NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
-+	if (q_op.cmd_reg == OP_BLOCK_ERASE)
-+		write_reg_dma(nandc, NAND_DEV0_CFG0, 2, NAND_BAM_NEXT_SGL);
- 
- 	write_reg_dma(nandc, NAND_EXEC_CMD, 1, NAND_BAM_NEXT_SGL);
- 	read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
diff --git a/target/linux/mediatek/patches-6.6/104-mt7622-add-snor-irq.patch b/target/linux/mediatek/patches-6.6/104-mt7622-add-snor-irq.patch
index 0d9c91f44d..d15d989e97 100644
--- a/target/linux/mediatek/patches-6.6/104-mt7622-add-snor-irq.patch
+++ b/target/linux/mediatek/patches-6.6/104-mt7622-add-snor-irq.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -578,6 +578,7 @@
+@@ -575,6 +575,7 @@
  		compatible = "mediatek,mt7622-nor",
  			     "mediatek,mt8173-nor";
  		reg = <0 0x11014000 0 0xe0>;
diff --git a/target/linux/mediatek/patches-6.6/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch b/target/linux/mediatek/patches-6.6/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
index bd0c785fde..bf6823147e 100644
--- a/target/linux/mediatek/patches-6.6/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
+++ b/target/linux/mediatek/patches-6.6/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
@@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -347,7 +347,7 @@
+@@ -345,7 +345,7 @@
  		#interrupt-cells = <3>;
  		interrupt-parent = <&gic>;
  		reg = <0 0x10310000 0 0x1000>,
diff --git a/target/linux/mediatek/patches-6.6/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch b/target/linux/mediatek/patches-6.6/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
index bf479ab53b..d58082aa6f 100644
--- a/target/linux/mediatek/patches-6.6/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
+++ b/target/linux/mediatek/patches-6.6/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -849,6 +849,12 @@
+@@ -844,6 +844,12 @@
  			#address-cells = <0>;
  			#interrupt-cells = <1>;
  		};
@@ -13,7 +13,7 @@
  	};
  
  	pcie1: pcie at 1a145000 {
-@@ -887,6 +893,12 @@
+@@ -882,6 +888,12 @@
  			#address-cells = <0>;
  			#interrupt-cells = <1>;
  		};
diff --git a/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index 76ee2fc89a..a3247f1779 100644
--- a/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -837,6 +837,9 @@
+@@ -832,6 +832,9 @@
  		bus-range = <0x00 0xff>;
  		ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
  		status = "disabled";
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		#interrupt-cells = <1>;
  		interrupt-map-mask = <0 0 0 7>;
-@@ -881,6 +884,9 @@
+@@ -876,6 +879,9 @@
  		bus-range = <0x00 0xff>;
  		ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
  		status = "disabled";
diff --git a/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch b/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch
index b31710fe69..29de7851d3 100644
--- a/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch
+++ b/target/linux/mediatek/patches-6.6/862-arm64-dts-mt7986-add-afe.patch
@@ -9,8 +9,8 @@ Subject: [PATCH] arm64: dts: mt7986: add afe
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -248,6 +248,28 @@
- 			status = "disabled";
+@@ -202,6 +202,28 @@
+ 			#interrupt-cells = <2>;
  		};
  
 +		afe: audio-controller at 11210000 {
diff --git a/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
index e1f121eba1..73714fbd6f 100644
--- a/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
@@ -23,8 +23,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 -
  	};
  
- 	timer {
-@@ -543,10 +537,11 @@
+ 	soc {
+@@ -532,10 +526,11 @@
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
  			memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		};
  
  		wed1: wed at 15011000 {
-@@ -556,10 +551,11 @@
+@@ -545,10 +540,11 @@
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
  			memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@@ -51,8 +51,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
- 		wo_ccif0: syscon at 151a5000 {
-@@ -576,6 +572,11 @@
+ 		eth: ethernet at 15100000 {
+@@ -606,6 +602,11 @@
  			interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
  		};
  
@@ -61,6 +61,6 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +			reg = <0 0x15194000 0 0x1000>;
 +		};
 +
- 		eth: ethernet at 15100000 {
- 			compatible = "mediatek,mt7986-eth";
- 			reg = <0 0x15100000 0 0x80000>;
+ 		wifi: wifi at 18000000 {
+ 			compatible = "mediatek,mt7986-wmac";
+ 			reg = <0 0x18000000 0 0x1000000>,
diff --git a/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
index 08c76cf44b..e2dce9ffa3 100644
--- a/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		wo_data: wo-data at 4fd80000 {
  			reg = <0 0x4fd80000 0 0x240000>;
  			no-map;
-@@ -536,11 +526,10 @@
+@@ -525,11 +515,10 @@
  			reg = <0 0x15010000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -550,11 +539,10 @@
+@@ -539,11 +528,10 @@
  			reg = <0 0x15011000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -572,6 +560,16 @@
+@@ -602,6 +590,16 @@
  			interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
  		};
  
diff --git a/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
index a44d006c53..a972f235f2 100644
--- a/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
@@ -33,8 +33,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 -		};
  	};
  
- 	timer {
-@@ -526,10 +516,11 @@
+ 	soc {
+@@ -515,10 +505,11 @@
  			reg = <0 0x15010000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -539,10 +530,11 @@
+@@ -528,10 +519,11 @@
  			reg = <0 0x15011000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -570,6 +562,16 @@
+@@ -600,6 +592,16 @@
  			reg = <0 0x151f0000 0 0x8000>;
  		};
  



From lede-commits at lists.infradead.org  Sun May  5 12:46:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 05 May 2024 15:46:05 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.12.6
In-Reply-To: <171493836541.3200441.4643527367895439252@git-01.infra.openwrt.org>
References: <171493836541.3200441.4643527367895439252@git-01.infra.openwrt.org>
Message-ID: <mailman.33759.1714938369.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/064d4a808367295233db5fce981e3b1d4305b014

commit 064d4a808367295233db5fce981e3b1d4305b014
Author: Pascal Ernster <git at hardfalcon.net>
AuthorDate: Wed May 1 21:04:18 2024 +0200

    libxml2: update to 2.12.6
    
    Release Notes:
    https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.6
    
    Changelog (taken from the release notes):
    - Regressions
      - parser: Fix detection of duplicate attributes in XML namespace
      - xmlreader: Fix xmlTextReaderConstEncoding
      - html: Fix htmlCreatePushParserCtxt with encoding
      - xmllint: Return error code if XPath returns empty nodeset
    
    Compile-tested: x86_x64, Q35 VM, OpenWRT SNAPSHOT r26135-a8bfdf2ed4d9
    Run-tested: x86_x64, Q35 VM, OpenWRT SNAPSHOT r26135-a8bfdf2ed4d9
    Signed-off-by: Pascal Ernster <git at hardfalcon.net>
---
 package/libs/libxml2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index efd33a5278..2be8026e89 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.12.5
+PKG_VERSION:=2.12.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
+PKG_HASH:=889c593a881a3db5fdd96cc9318c87df34eb648edfc458272ad46fd607353fbb
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING



From lede-commits at lists.infradead.org  Mon May  6 02:02:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 05:02:29 -0400
Subject: [openwrt/openwrt]  uboot-envtools: filogic: add support for BananaPi
 R4 PoE
In-Reply-To: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
References: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
Message-ID: <mailman.33829.1714986162.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/357fe33d2ce54be32558711a2c453b800990a4ef

commit 357fe33d2ce54be32558711a2c453b800990a4ef
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Thu May 2 09:00:58 2024 +0200

    uboot-envtools: filogic: add support for BananaPi R4 PoE
    
    This adds support for the bpi-r4 variant with internal 2.5G PHY and
    additional ethernet port instead of second sfp.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 package/boot/uboot-envtools/files/mediatek_filogic | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 7d46e73dbe..c439af12c8 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -39,6 +39,7 @@ asus,rt-ax59u)
 bananapi,bpi-r3|\
 bananapi,bpi-r3-mini|\
 bananapi,bpi-r4|\
+bananapi,bpi-r4-poe|\
 jdcloud,re-cp-03)
 	. /lib/upgrade/common.sh
 



From lede-commits at lists.infradead.org  Mon May  6 02:02:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 05:02:27 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: add support for 2.5GE PoE
 variant
In-Reply-To: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
References: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
Message-ID: <mailman.33830.1714986162.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fa804f7d0e5a616ec651f0f2fbb7d1387d8c46f8

commit fa804f7d0e5a616ec651f0f2fbb7d1387d8c46f8
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Apr 30 10:50:51 2024 +0200

    mediatek: bpi-r4: add support for 2.5GE PoE variant
    
    This adds support for the bpi-r4 variant with internal 2.5G PHY and
    additional ethernet port instead of second sfp.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts   | 25 +++++++++++++++++
 .../files-6.6/drivers/net/phy/mediatek-2p5ge.c     |  5 ++++
 .../filogic/base-files/etc/board.d/01_leds         |  3 ++-
 .../filogic/base-files/etc/board.d/02_network      |  3 ++-
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |  3 ++-
 .../filogic/base-files/lib/upgrade/platform.sh     |  5 +++-
 target/linux/mediatek/image/filogic.mk             | 31 +++++++++++++++-------
 7 files changed, 62 insertions(+), 13 deletions(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts
new file mode 100644
index 0000000000..efcf0ec358
--- /dev/null
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-poe.dts
@@ -0,0 +1,25 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2022 MediaTek Inc.
+ * Author: Sam.Shih <sam.shih at mediatek.com>
+ */
+
+#include "mt7988a-bananapi-bpi-r4.dtsi"
+
+/ {
+	model = "Bananapi BPI-R4 2.5GE PoE";
+	compatible = "bananapi,bpi-r4-poe",
+		     "mediatek,mt7988a";
+};
+
+&gmac1 {
+	phy-mode = "internal";
+	phy-connection-type = "internal";
+	phy = <&int_2p5g_phy>;
+	status = "okay";
+};
+
+&int_2p5g_phy {
+	pinctrl-names = "i2p5gbe-led";
+	pinctrl-0 = <&i2p5gbe_led0_pins>;
+};
diff --git a/target/linux/mediatek/files-6.6/drivers/net/phy/mediatek-2p5ge.c b/target/linux/mediatek/files-6.6/drivers/net/phy/mediatek-2p5ge.c
index e2e06d1eca..d1d01190ed 100644
--- a/target/linux/mediatek/files-6.6/drivers/net/phy/mediatek-2p5ge.c
+++ b/target/linux/mediatek/files-6.6/drivers/net/phy/mediatek-2p5ge.c
@@ -137,6 +137,11 @@ static int mt7988_2p5ge_phy_config_init(struct phy_device *phydev)
 	}
 
 	/* Setup LED */
+
+	/* Set polarity of led0 to active-high for BPI-R4 */
+	phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MTK_PHY_LED0_ON_CTRL,
+			 MTK_PHY_LED0_POLARITY);
+
 	phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MTK_PHY_LED0_ON_CTRL,
 			 MTK_PHY_LED0_ON_LINK10 |
 			 MTK_PHY_LED0_ON_LINK100 |
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 7f75de8b3b..b5a2554671 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
@@ -20,7 +20,8 @@ bananapi,bpi-r3-mini)
 	ucidef_set_led_netdev "wlan2g" "WLAN2G" "blue:wlan-1" "phy0-ap0"
 	ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan-2" "phy1-ap0"
 	;;
-bananapi,bpi-r4)
+bananapi,bpi-r4|\
+bananapi,bpi-r4-poe)
 	ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:lan" "wan" "link tx rx"
 	ucidef_set_led_netdev "lan1" "lan1" "mt7530-0:01:green:lan" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan2" "lan2" "mt7530-0:02:green:lan" "lan2" "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 c9fd8d96e6..a161a86462 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
@@ -41,7 +41,8 @@ mediatek_setup_interfaces()
 	edgecore,eap111)
 		ucidef_set_interfaces_lan_wan eth0 eth1
 		;;
-	bananapi,bpi-r4)
+	bananapi,bpi-r4|\
+	bananapi,bpi-r4-poe)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 eth1" "wan eth2"
 		;;
 	cmcc,rax3000m|\
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 62860390eb..0c5f66c029 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -42,7 +42,8 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
 		;;
-	bananapi,bpi-r4)
+	bananapi,bpi-r4|\
+	bananapi,bpi-r4-poe)
 		addr=$(cat /sys/class/net/eth0/address)
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index ee0e8b62d7..ff791a600a 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -83,6 +83,7 @@ platform_do_upgrade() {
 	bananapi,bpi-r3|\
 	bananapi,bpi-r3-mini|\
 	bananapi,bpi-r4|\
+	bananapi,bpi-r4-poe|\
 	jdcloud,re-cp-03|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
@@ -196,6 +197,7 @@ platform_check_image() {
 	case "$board" in
 	bananapi,bpi-r3|\
 	bananapi,bpi-r4|\
+	bananapi,bpi-r4-poe|\
 	cmcc,rax3000m)
 		[ "$magic" != "d00dfeed" ] && {
 			echo "Invalid image type."
@@ -223,7 +225,8 @@ platform_copy_config() {
 		;;
 	bananapi,bpi-r3|\
 	bananapi,bpi-r3-mini|\
-	bananapi,bpi-r4)
+	bananapi,bpi-r4|\
+	bananapi,bpi-r4-poe)
 		case "$(fitblk_get_bootdev)" in
 		mmcblk*)
 			emmc_copy_config
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index f99a73ac74..13426f4f3a 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -318,11 +318,8 @@ endif
 endef
 TARGET_DEVICES += bananapi_bpi-r3-mini
 
-define Device/bananapi_bpi-r4
+define Device/bananapi_bpi-r4-common
   DEVICE_VENDOR := Bananapi
-  DEVICE_MODEL := BPi-R4
-  DEVICE_DTS := mt7988a-bananapi-bpi-r4
-  DEVICE_DTS_CONFIG := config-mt7988a-bananapi-bpi-r4
   DEVICE_DTS_DIR := $(DTS_DIR)/
   DEVICE_DTS_LOADADDR := 0x45f00000
   DEVICE_DTS_OVERLAY:= mt7988a-bananapi-bpi-r4-emmc mt7988a-bananapi-bpi-r4-rtc mt7988a-bananapi-bpi-r4-sd mt7988a-bananapi-bpi-r4-wifi-mt7996a
@@ -337,19 +334,19 @@ define Device/bananapi_bpi-r4
 	       sdcard.img.gz \
 	       snand-preloader.bin snand-bl31-uboot.fip
   ARTIFACT/emmc-preloader.bin	:= mt7988-bl2 emmc-comb
-  ARTIFACT/emmc-bl31-uboot.fip	:= mt7988-bl31-uboot bananapi_bpi-r4-emmc
+  ARTIFACT/emmc-bl31-uboot.fip	:= mt7988-bl31-uboot $$(DEVICE_NAME)-emmc
   ARTIFACT/snand-preloader.bin	:= mt7988-bl2 spim-nand-ubi-comb
-  ARTIFACT/snand-bl31-uboot.fip	:= mt7988-bl31-uboot bananapi_bpi-r4-snand
+  ARTIFACT/snand-bl31-uboot.fip	:= mt7988-bl31-uboot $$(DEVICE_NAME)-snand
   ARTIFACT/sdcard.img.gz	:= mt798x-gpt sdmmc |\
 				   pad-to 17k | mt7988-bl2 sdmmc-comb |\
-				   pad-to 6656k | mt7988-bl31-uboot bananapi_bpi-r4-sdmmc |\
+				   pad-to 6656k | mt7988-bl31-uboot $$(DEVICE_NAME)-sdmmc |\
 				$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),\
 				   pad-to 12M | append-image-stage initramfs-recovery.itb | check-size 44m |\
 				) \
 				   pad-to 44M | mt7988-bl2 spim-nand-ubi-comb |\
-				   pad-to 45M | mt7988-bl31-uboot bananapi_bpi-r4-snand |\
+				   pad-to 45M | mt7988-bl31-uboot $$(DEVICE_NAME)-snand |\
 				   pad-to 51M | mt7988-bl2 emmc-comb |\
-				   pad-to 52M | mt7988-bl31-uboot bananapi_bpi-r4-emmc |\
+				   pad-to 52M | mt7988-bl31-uboot $$(DEVICE_NAME)-emmc |\
 				   pad-to 56M | mt798x-gpt emmc |\
 				$(if $(CONFIG_TARGET_ROOTFS_SQUASHFS),\
 				   pad-to 64M | append-image squashfs-sysupgrade.itb | check-size |\
@@ -361,8 +358,24 @@ define Device/bananapi_bpi-r4
 	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
   IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
 endef
+
+define Device/bananapi_bpi-r4
+  DEVICE_MODEL := BPi-R4
+  DEVICE_DTS := mt7988a-bananapi-bpi-r4
+  DEVICE_DTS_CONFIG := config-mt7988a-bananapi-bpi-r4
+  $(call Device/bananapi_bpi-r4-common)
+endef
 TARGET_DEVICES += bananapi_bpi-r4
 
+define Device/bananapi_bpi-r4-poe
+  DEVICE_MODEL := BPi-R4 2.5GE
+  DEVICE_DTS := mt7988a-bananapi-bpi-r4-poe
+  DEVICE_DTS_CONFIG := config-mt7988a-bananapi-bpi-r4-poe
+  $(call Device/bananapi_bpi-r4-common)
+  DEVICE_PACKAGES += mt7988-2p5g-phy-firmware
+endef
+TARGET_DEVICES += bananapi_bpi-r4-poe
+
 define Device/cetron_ct3003
   DEVICE_VENDOR := Cetron
   DEVICE_MODEL := CT3003



From lede-commits at lists.infradead.org  Mon May  6 02:02:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 05:02:26 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: dts: move common parts to dtsi
 file
In-Reply-To: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
References: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
Message-ID: <mailman.33833.1714986164.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/14955dcb7e2f8bc3bc77e47a1f1663ed84ba91c1

commit 14955dcb7e2f8bc3bc77e47a1f1663ed84ba91c1
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Apr 30 10:16:21 2024 +0200

    mediatek: bpi-r4: dts: move common parts to dtsi file
    
    Move the common parts of the mt7988a-bananapi-bpi-r4.dts to a dtsi file.
    This is done to prepare support for the 2.5G Ethernet Variant.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 375 +--------------------
 ...api-bpi-r4.dts => mt7988a-bananapi-bpi-r4.dtsi} |  25 --
 2 files changed, 4 insertions(+), 396 deletions(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index d72051d187..d2c223b4ef 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -4,48 +4,13 @@
  * Author: Sam.Shih <sam.shih at mediatek.com>
  */
 
-/dts-v1/;
-#include "mt7988a.dtsi"
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/leds/common.h>
-#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
+#include "mt7988a-bananapi-bpi-r4.dtsi"
 
 / {
 	model = "Bananapi BPI-R4";
 	compatible = "bananapi,bpi-r4",
 		     "mediatek,mt7988a";
 
-	aliases {
-		serial0 = &uart0;
-		led-boot = &led_green;
-		led-failsafe = &led_green;
-		led-running = &led_green;
-		led-upgrade = &led_green;
-	};
-
-	chosen {
-		stdout-path = &uart0;
-		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
-		rootdisk-spim-nand = <&ubi_rootfs>;
-	};
-
-	memory {
-		reg = <0x00 0x40000000 0x00 0x10000000>;
-	};
-
-	/* SFP1 cage (WAN) */
-	sfp1: sfp1 {
-		compatible = "sff,sfp";
-		i2c-bus = <&i2c_sfp1>;
-		los-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
-		mod-def0-gpios = <&pio 82 GPIO_ACTIVE_LOW>;
-		tx-disable-gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
-		tx-fault-gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
-		rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
-		maximum-power-milliwatt = <3000>;
-	};
-
 	/* SFP2 cage (LAN) */
 	sfp2: sfp2 {
 		compatible = "sff,sfp";
@@ -57,42 +22,6 @@
 		rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
 		maximum-power-milliwatt = <3000>;
 	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-
-		wps {
-			label = "WPS";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 14 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		led_green: led-green {
-			function = LED_FUNCTION_STATUS;
-			color = <LED_COLOR_ID_GREEN>;
-			gpios = <&pio 79 GPIO_ACTIVE_HIGH>;
-			default-state = "on";
-		};
-
-		led_blue: led-blue {
-			function = LED_FUNCTION_WPS;
-			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
-			default-state = "off";
-		};
-	};
-};
-
-&eth {
-	status = "okay";
-};
-
-&gmac0 {
-	status = "okay";
 };
 
 &gmac1 {
@@ -102,306 +31,10 @@
 	status = "okay";
 };
 
-&gmac2 {
-	sfp = <&sfp1>;
-	managed = "in-band-status";
-	phy-mode = "usxgmii";
-	status = "okay";
-};
-
-&switch {
-	status = "okay";
-};
-
-&gsw_phy0 {
-	pinctrl-names = "gbe-led";
-	pinctrl-0 = <&gbe0_led0_pins>;
-};
-
-&gsw_port0 {
-	label = "wan";
-};
-
-&gsw_phy0_led0 {
-	status = "okay";
-	color = <LED_COLOR_ID_GREEN>;
-};
-
-&gsw_phy1 {
-	pinctrl-names = "gbe-led";
-	pinctrl-0 = <&gbe1_led0_pins>;
-};
-
-&gsw_phy1_led0 {
-	status = "okay";
-	color = <LED_COLOR_ID_GREEN>;
-};
-
-&gsw_phy2 {
-	pinctrl-names = "gbe-led";
-	pinctrl-0 = <&gbe2_led0_pins>;
-};
-
-&gsw_phy2_led0 {
-	status = "okay";
-	color = <LED_COLOR_ID_GREEN>;
-};
-
-&gsw_phy3 {
-	pinctrl-names = "gbe-led";
-	pinctrl-0 = <&gbe3_led0_pins>;
-};
-
-&gsw_phy3_led0 {
-	status = "okay";
-	color = <LED_COLOR_ID_GREEN>;
-};
-
-&cpu0 {
-	proc-supply = <&rt5190_buck3>;
-};
-
-&cpu1 {
-	proc-supply = <&rt5190_buck3>;
-};
-
-&cpu2 {
-	proc-supply = <&rt5190_buck3>;
-};
-
-&cpu3 {
-	proc-supply = <&rt5190_buck3>;
-};
-
-&cci {
-	proc-supply = <&rt5190_buck3>;
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c0_pins>;
-	status = "okay";
-
-	rt5190a_64: rt5190a at 64 {
-		compatible = "richtek,rt5190a";
-		reg = <0x64>;
-		vin2-supply = <&rt5190_buck1>;
-		vin3-supply = <&rt5190_buck1>;
-		vin4-supply = <&rt5190_buck1>;
-
-		regulators {
-			rt5190_buck1: buck1 {
-				regulator-name = "rt5190a-buck1";
-				regulator-min-microvolt = <5090000>;
-				regulator-max-microvolt = <5090000>;
-				regulator-allowed-modes =
-				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-			buck2 {
-				regulator-name = "vcore";
-				regulator-min-microvolt = <600000>;
-				regulator-max-microvolt = <1400000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-			rt5190_buck3: buck3 {
-				regulator-name = "vproc";
-				regulator-min-microvolt = <600000>;
-				regulator-max-microvolt = <1400000>;
-				regulator-boot-on;
-			};
-			buck4 {
-				regulator-name = "rt5190a-buck4";
-				regulator-min-microvolt = <850000>;
-				regulator-max-microvolt = <850000>;
-				regulator-allowed-modes =
-				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-			ldo {
-				regulator-name = "rt5190a-ldo";
-				regulator-min-microvolt = <1200000>;
-				regulator-max-microvolt = <1200000>;
-				regulator-boot-on;
-				regulator-always-on;
-			};
-		};
-	};
-};
-
-&i2c2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c2_1_pins>;
-	status = "okay";
-
-	pca9545: i2c-switch at 70 {
-		reg = <0x70>;
-		compatible = "nxp,pca9545";
-		reset-gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+&pca9545 {
+	i2c_sfp2: i2c at 2 {
 		#address-cells = <1>;
 		#size-cells = <0>;
-
-		i2c_rtc: i2c at 0 { //eeprom,rtc,ngff
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <0>;
-
-			eeprom at 50 {
-				compatible = "atmel,24c02";
-				reg = <0x50>;
-				address-bits = <8>;
-				page-size = <8>;
-				size = <256>;
-			};
-
-			eeprom at 57 {
-				compatible = "atmel,24c02";
-				reg = <0x57>;
-				address-bits = <8>;
-				page-size = <8>;
-				size = <256>;
-			};
-
-			pcf8563: rtc at 51 {
-				compatible = "nxp,pcf8563";
-				reg = <0x51>;
-				status = "disabled";
-			};
-		};
-
-		i2c_sfp1: i2c at 1 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <1>;
-		};
-
-		i2c_sfp2: i2c at 2 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <2>;
-		};
-
-		i2c_wifi: i2c at 3 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <3>;
-		};
-	};
-};
-
-/* mPCIe SIM2 */
-&pcie0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie0_pins>;
-	status = "okay";
-};
-
-/* mPCIe SIM3 */
-&pcie1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie1_pins>;
-	status = "okay";
-};
-
-/* M.2 key-B SIM1 */
-&pcie2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie2_pins>;
-	status = "okay";
-};
-
-/* M.2 key-M SSD */
-&pcie3 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie3_pins>;
-	status = "okay";
-};
-
-&ssusb1 {
-	status = "okay";
-};
-
-&tphy {
-	status = "okay";
-};
-
-&spi0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi0_flash_pins>;
-	status = "okay";
-
-	spi_nand: spi_nand at 0 {
-		compatible = "spi-nand";
-		reg = <0>;
-		spi-max-frequency = <52000000>;
-		spi-tx-buswidth = <4>;
-		spi-rx-buswidth = <4>;
-	};
-};
-
-&spi_nand {
-	partitions {
-		compatible = "fixed-partitions";
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		partition at 0 {
-			label = "bl2";
-			reg = <0x0 0x200000>;
-			read-only;
-		};
-
-		partition at 200000 {
-			label = "ubi";
-			reg = <0x200000 0x7e00000>;
-			compatible = "linux,ubi";
-
-			volumes {
-				ubi-volume-ubootenv {
-					volname = "ubootenv";
-					nvmem-layout {
-						compatible = "u-boot,env-redundant-bool-layout";
-					};
-				};
-
-				ubi-volume-ubootenv2 {
-					volname = "ubootenv2";
-					nvmem-layout {
-						compatible = "u-boot,env-redundant-bool-layout";
-					};
-				};
-
-				ubi_rootfs: ubi-volume-fit {
-					volname = "fit";
-				};
-			};
-		};
+		reg = <2>;
 	};
 };
-
-&uart0 {
-	status = "okay";
-};
-
-&uart1 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart1_2_lite_pins>;
-};
-
-&uart2 {
-	status = "okay";
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_3_pins>;
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&xphy {
-	status = "okay";
-};
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
similarity index 92%
copy from target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
copy to target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index d72051d187..49d7edcd6b 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -46,18 +46,6 @@
 		maximum-power-milliwatt = <3000>;
 	};
 
-	/* SFP2 cage (LAN) */
-	sfp2: sfp2 {
-		compatible = "sff,sfp";
-		i2c-bus = <&i2c_sfp2>;
-		los-gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
-		mod-def0-gpios = <&pio 83 GPIO_ACTIVE_LOW>;
-		tx-disable-gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
-		tx-fault-gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
-		rate-select0-gpios = <&pio 3 GPIO_ACTIVE_LOW>;
-		maximum-power-milliwatt = <3000>;
-	};
-
 	gpio-keys {
 		compatible = "gpio-keys";
 
@@ -95,13 +83,6 @@
 	status = "okay";
 };
 
-&gmac1 {
-	sfp = <&sfp2>;
-	managed = "in-band-status";
-	phy-mode = "usxgmii";
-	status = "okay";
-};
-
 &gmac2 {
 	sfp = <&sfp1>;
 	managed = "in-band-status";
@@ -278,12 +259,6 @@
 			reg = <1>;
 		};
 
-		i2c_sfp2: i2c at 2 {
-			#address-cells = <1>;
-			#size-cells = <0>;
-			reg = <2>;
-		};
-
 		i2c_wifi: i2c at 3 {
 			#address-cells = <1>;
 			#size-cells = <0>;



From lede-commits at lists.infradead.org  Mon May  6 02:02:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 05:02:28 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: bpi-r4: add support for 2.5GE PoE
 variant
In-Reply-To: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
References: <171498614689.1196111.515388322459356609@git-01.infra.openwrt.org>
Message-ID: <mailman.33834.1714986165.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/10bf949ea5b414044420ae895e8b6aaecf11a913

commit 10bf949ea5b414044420ae895e8b6aaecf11a913
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Apr 30 14:55:28 2024 +0200

    uboot-mediatek: bpi-r4: add support for 2.5GE PoE variant
    
    This adds support for the bpi-r4 variant with internal 2.5G PHY and
    additional ethernet port instead of second sfp.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 package/boot/uboot-mediatek/Makefile               |  39 ++
 .../uboot-mediatek/patches/450-add-bpi-r4.patch    | 750 +++++++++++++++++++++
 2 files changed, 789 insertions(+)

diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile
index c8213f7a53..470b4db4fa 100644
--- a/package/boot/uboot-mediatek/Makefile
+++ b/package/boot/uboot-mediatek/Makefile
@@ -580,6 +580,42 @@ define U-Boot/mt7988_bananapi_bpi-r4-snand
   DEPENDS:=+trusted-firmware-a-mt7988-spim-nand-ubi-comb
 endef
 
+define U-Boot/mt7988_bananapi_bpi-r4-poe-emmc
+  NAME:=BananaPi BPi-R4 2.5GE
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=bananapi_bpi-r4-poe
+  UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-emmc
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=emmc
+  BL2_SOC:=mt7988
+  BL2_DDRTYPE:=comb
+  DEPENDS:=+trusted-firmware-a-mt7988-emmc-comb
+endef
+
+define U-Boot/mt7988_bananapi_bpi-r4-poe-sdmmc
+  NAME:=BananaPi BPi-R4 2.5GE
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=bananapi_bpi-r4-poe
+  UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-sdmmc
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=sdmmc
+  BL2_SOC:=mt7988
+  BL2_DDRTYPE:=comb
+  DEPENDS:=+trusted-firmware-a-mt7988-sdmmc-comb
+endef
+
+define U-Boot/mt7988_bananapi_bpi-r4-poe-snand
+  NAME:=BananaPi BPi-R4 2.5GE
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=bananapi_bpi-r4-poe
+  UBOOT_CONFIG:=mt7988a_bananapi_bpi-r4-poe-snand
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=spim-nand-ubi
+  BL2_SOC:=mt7988
+  BL2_DDRTYPE:=comb
+  DEPENDS:=+trusted-firmware-a-mt7988-spim-nand-ubi-comb
+endef
+
 define U-Boot/mt7988_rfb-spim-nand
   NAME:=MT7988 Reference Board
   BUILD_SUBTARGET:=filogic
@@ -691,6 +727,9 @@ UBOOT_TARGETS := \
 	mt7988_bananapi_bpi-r4-emmc \
 	mt7988_bananapi_bpi-r4-sdmmc \
 	mt7988_bananapi_bpi-r4-snand \
+	mt7988_bananapi_bpi-r4-poe-emmc \
+	mt7988_bananapi_bpi-r4-poe-sdmmc \
+	mt7988_bananapi_bpi-r4-poe-snand \
 	mt7988_rfb-spim-nand \
 	mt7988_rfb-snand \
 	mt7988_rfb-nor \
diff --git a/package/boot/uboot-mediatek/patches/450-add-bpi-r4.patch b/package/boot/uboot-mediatek/patches/450-add-bpi-r4.patch
index 5fb956a2e3..0a69e74e02 100644
--- a/package/boot/uboot-mediatek/patches/450-add-bpi-r4.patch
+++ b/package/boot/uboot-mediatek/patches/450-add-bpi-r4.patch
@@ -996,3 +996,753 @@
 +	non-removable;
 +	status = "okay";
 +};
+--- /dev/null
++++ b/configs/mt7988a_bananapi_bpi-r4-poe-emmc_defconfig
+@@ -0,0 +1,180 @@
++CONFIG_ARM=y
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_ARCH_MEDIATEK=y
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_SYS_PROMPT="MT7988> "
++CONFIG_TARGET_MT7988=y
++CONFIG_DEBUG_UART_BASE=0x11000000
++CONFIG_DEBUG_UART_CLOCK=40000000
++CONFIG_SYS_LOAD_ADDR=0x50000000
++CONFIG_DEBUG_UART=y
++CONFIG_SYS_CBSIZE=512
++CONFIG_SYS_PBSIZE=1049
++CONFIG_DEFAULT_DEVICE_TREE="mt7988a-bananapi-bpi-r4-emmc"
++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r4-poe_emmc_env"
++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7988a-bpi-r4-emmc.dtb"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_OF_SYSTEM_SETUP=y
++CONFIG_SMBIOS_PRODUCT_NAME=""
++CONFIG_AUTOBOOT_KEYED=y
++CONFIG_BOOTDELAY=30
++CONFIG_AUTOBOOT_MENU_SHOW=y
++CONFIG_CFB_CONSOLE_ANSI=y
++CONFIG_BOARD_LATE_INIT=y
++CONFIG_BUTTON=y
++CONFIG_BUTTON_GPIO=y
++CONFIG_GPIO_HOG=y
++CONFIG_CMD_ENV_FLAGS=y
++CONFIG_FIT=y
++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
++CONFIG_LED=y
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++CONFIG_LOGLEVEL=7
++CONFIG_LOG=y
++CONFIG_CMD_BOOTMENU=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_CPU=y
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_DM=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ENV_READMEM=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_EXT4=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_FDT=y
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
++CONFIG_CMD_GPIO=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_HASH=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_LED=y
++CONFIG_CMD_LICENSE=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_MBR is not set
++CONFIG_CMD_MMC=y
++CONFIG_CMD_MTD=y
++CONFIG_CMD_PCI=y
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_SF_TEST=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_PXE=y
++CONFIG_CMD_PWM=y
++CONFIG_CMD_SMC=y
++CONFIG_CMD_TFTPBOOT=y
++CONFIG_CMD_TFTPSRV=y
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_PART=y
++CONFIG_CMD_RARP=y
++CONFIG_CMD_SETEXPR=y
++CONFIG_CMD_SLEEP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_STRINGS=y
++CONFIG_CMD_USB=y
++CONFIG_CMD_UUID=y
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DM_MMC=y
++CONFIG_DM_MTD=y
++CONFIG_DM_REGULATOR=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_DM_REGULATOR_GPIO=y
++CONFIG_DM_USB=y
++CONFIG_DM_PWM=y
++CONFIG_PWM_MTK=y
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_VERSION_VARIABLE=y
++CONFIG_PARTITION_UUIDS=y
++CONFIG_NETCONSOLE=y
++CONFIG_DM_GPIO=y
++CONFIG_DM_SCSI=y
++CONFIG_AHCI=y
++CONFIG_AHCI_PCI=y
++CONFIG_SCSI_AHCI=y
++CONFIG_SCSI=y
++CONFIG_CMD_SCSI=y
++CONFIG_PHY=y
++CONFIG_PHY_MTK_TPHY=y
++CONFIG_MTK_AHCI=y
++CONFIG_PCI=y
++CONFIG_MTD=y
++CONFIG_MTD_UBI_FASTMAP=y
++CONFIG_DM_PCI=y
++CONFIG_PCIE_MEDIATEK=y
++CONFIG_PRE_CONSOLE_BUFFER=y
++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
++CONFIG_RAM=y
++CONFIG_DM_SERIAL=y
++CONFIG_MTK_SERIAL=y
++CONFIG_MMC=y
++CONFIG_MMC_DEFAULT_DEV=1
++CONFIG_MMC_SUPPORTS_TUNING=y
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_MTK_SPI_NAND=y
++CONFIG_MTK_SPI_NAND_MTD=y
++CONFIG_SYSRESET_WATCHDOG=y
++CONFIG_WDT_MTK=y
++CONFIG_LZO=y
++CONFIG_ZSTD=y
++CONFIG_HEXDUMP=y
++CONFIG_RANDOM_UUID=y
++CONFIG_REGEX=y
++CONFIG_USB=y
++CONFIG_USB_HOST=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_XHCI_MTK=y
++CONFIG_USB_STORAGE=y
++CONFIG_OF_EMBED=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_IS_IN_MMC=y
++CONFIG_ENV_OFFSET=0x400000
++CONFIG_ENV_OFFSET_REDUND=0x440000
++CONFIG_ENV_SIZE=0x40000
++CONFIG_ENV_SIZE_REDUND=0x40000
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_CLK=y
++CONFIG_SUPPORT_EMMC_BOOT=y
++CONFIG_MMC_HS200_SUPPORT=y
++CONFIG_MMC_MTK=y
++CONFIG_PHY_FIXED=y
++CONFIG_DM_ETH=y
++CONFIG_MEDIATEK_ETH=y
++CONFIG_PINCTRL=y
++CONFIG_PINCONF=y
++CONFIG_PINCTRL_MT7988=y
++CONFIG_POWER_DOMAIN=y
++CONFIG_MTK_POWER_DOMAIN=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_MTD_SPI_NAND=y
++CONFIG_MTK_SPIM=y
++#CONFIG_MTK_SNOR=y
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SPI_FLASH_MTD=y
++CONFIG_SPI_FLASH_WINBOND=y
++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
++CONFIG_CMD_SF=y
++CONFIG_CMD_NAND=y
++CONFIG_CMD_NAND_TRIMFFS=y
++CONFIG_LMB_MAX_REGIONS=64
++CONFIG_USE_IPADDR=y
++CONFIG_IPADDR="192.168.1.1"
++CONFIG_USE_SERVERIP=y
++CONFIG_SERVERIP="192.168.1.254"
+--- /dev/null
++++ b/configs/mt7988a_bananapi_bpi-r4-poe-sdmmc_defconfig
+@@ -0,0 +1,180 @@
++CONFIG_ARM=y
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_ARCH_MEDIATEK=y
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_SYS_PROMPT="MT7988> "
++CONFIG_TARGET_MT7988=y
++CONFIG_DEBUG_UART_BASE=0x11000000
++CONFIG_DEBUG_UART_CLOCK=40000000
++CONFIG_SYS_LOAD_ADDR=0x50000000
++CONFIG_DEBUG_UART=y
++CONFIG_SYS_CBSIZE=512
++CONFIG_SYS_PBSIZE=1049
++CONFIG_DEFAULT_DEVICE_TREE="mt7988a-bananapi-bpi-r4-sd"
++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r4-poe_sdmmc_env"
++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7988a-bpi-r4-sd.dtb"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_OF_SYSTEM_SETUP=y
++CONFIG_SMBIOS_PRODUCT_NAME=""
++CONFIG_AUTOBOOT_KEYED=y
++CONFIG_BOOTDELAY=30
++CONFIG_AUTOBOOT_MENU_SHOW=y
++CONFIG_CFB_CONSOLE_ANSI=y
++CONFIG_BOARD_LATE_INIT=y
++CONFIG_BUTTON=y
++CONFIG_BUTTON_GPIO=y
++CONFIG_GPIO_HOG=y
++CONFIG_CMD_ENV_FLAGS=y
++CONFIG_FIT=y
++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
++CONFIG_LED=y
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++CONFIG_LOGLEVEL=7
++CONFIG_LOG=y
++CONFIG_CMD_BOOTMENU=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_CPU=y
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_DM=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ENV_READMEM=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_EXT4=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_FDT=y
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
++CONFIG_CMD_GPIO=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_HASH=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_LED=y
++CONFIG_CMD_LICENSE=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_MBR is not set
++CONFIG_CMD_MMC=y
++CONFIG_CMD_MTD=y
++CONFIG_CMD_PCI=y
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_SF_TEST=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_PXE=y
++CONFIG_CMD_PWM=y
++CONFIG_CMD_SMC=y
++CONFIG_CMD_TFTPBOOT=y
++CONFIG_CMD_TFTPSRV=y
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_PART=y
++CONFIG_CMD_RARP=y
++CONFIG_CMD_SETEXPR=y
++CONFIG_CMD_SLEEP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_STRINGS=y
++CONFIG_CMD_USB=y
++CONFIG_CMD_UUID=y
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DM_MMC=y
++CONFIG_DM_MTD=y
++CONFIG_DM_REGULATOR=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_DM_REGULATOR_GPIO=y
++CONFIG_DM_USB=y
++CONFIG_DM_PWM=y
++CONFIG_PWM_MTK=y
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_VERSION_VARIABLE=y
++CONFIG_PARTITION_UUIDS=y
++CONFIG_NETCONSOLE=y
++CONFIG_DM_GPIO=y
++CONFIG_DM_SCSI=y
++CONFIG_AHCI=y
++CONFIG_AHCI_PCI=y
++CONFIG_SCSI_AHCI=y
++CONFIG_SCSI=y
++CONFIG_CMD_SCSI=y
++CONFIG_PHY=y
++CONFIG_PHY_MTK_TPHY=y
++CONFIG_MTK_AHCI=y
++CONFIG_PCI=y
++CONFIG_MTD=y
++CONFIG_MTD_UBI_FASTMAP=y
++CONFIG_DM_PCI=y
++CONFIG_PCIE_MEDIATEK=y
++CONFIG_PRE_CONSOLE_BUFFER=y
++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
++CONFIG_RAM=y
++CONFIG_DM_SERIAL=y
++CONFIG_MTK_SERIAL=y
++CONFIG_MMC=y
++CONFIG_MMC_DEFAULT_DEV=1
++CONFIG_MMC_SUPPORTS_TUNING=y
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_MTK_SPI_NAND=y
++CONFIG_MTK_SPI_NAND_MTD=y
++CONFIG_SYSRESET_WATCHDOG=y
++CONFIG_WDT_MTK=y
++CONFIG_LZO=y
++CONFIG_ZSTD=y
++CONFIG_HEXDUMP=y
++CONFIG_RANDOM_UUID=y
++CONFIG_REGEX=y
++CONFIG_USB=y
++CONFIG_USB_HOST=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_XHCI_MTK=y
++CONFIG_USB_STORAGE=y
++CONFIG_OF_EMBED=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_IS_IN_MMC=y
++CONFIG_ENV_OFFSET=0x400000
++CONFIG_ENV_OFFSET_REDUND=0x440000
++CONFIG_ENV_SIZE=0x40000
++CONFIG_ENV_SIZE_REDUND=0x40000
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_CLK=y
++CONFIG_SUPPORT_EMMC_BOOT=y
++CONFIG_MMC_HS200_SUPPORT=y
++CONFIG_MMC_MTK=y
++CONFIG_PHY_FIXED=y
++CONFIG_DM_ETH=y
++CONFIG_MEDIATEK_ETH=y
++CONFIG_PINCTRL=y
++CONFIG_PINCONF=y
++CONFIG_PINCTRL_MT7988=y
++CONFIG_POWER_DOMAIN=y
++CONFIG_MTK_POWER_DOMAIN=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_MTD_SPI_NAND=y
++CONFIG_MTK_SPIM=y
++#CONFIG_MTK_SNOR=y
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SPI_FLASH_MTD=y
++CONFIG_SPI_FLASH_WINBOND=y
++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
++CONFIG_CMD_SF=y
++CONFIG_CMD_NAND=y
++CONFIG_CMD_NAND_TRIMFFS=y
++CONFIG_LMB_MAX_REGIONS=64
++CONFIG_USE_IPADDR=y
++CONFIG_IPADDR="192.168.1.1"
++CONFIG_USE_SERVERIP=y
++CONFIG_SERVERIP="192.168.1.254"
+--- /dev/null
++++ b/configs/mt7988a_bananapi_bpi-r4-poe-snand_defconfig
+@@ -0,0 +1,182 @@
++CONFIG_ARM=y
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_ARCH_MEDIATEK=y
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_SYS_PROMPT="MT7988> "
++CONFIG_TARGET_MT7988=y
++CONFIG_DEBUG_UART_BASE=0x11000000
++CONFIG_DEBUG_UART_CLOCK=40000000
++CONFIG_SYS_LOAD_ADDR=0x50000000
++CONFIG_DEBUG_UART=y
++CONFIG_SYS_CBSIZE=512
++CONFIG_SYS_PBSIZE=1049
++CONFIG_DEFAULT_DEVICE_TREE="mt7988a-bananapi-bpi-r4-emmc"
++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r4-poe_snand_env"
++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7988a-bpi-r4-emmc.dtb"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_OF_SYSTEM_SETUP=y
++CONFIG_SMBIOS_PRODUCT_NAME=""
++CONFIG_AUTOBOOT_KEYED=y
++CONFIG_BOOTDELAY=30
++CONFIG_AUTOBOOT_MENU_SHOW=y
++CONFIG_CFB_CONSOLE_ANSI=y
++CONFIG_BOARD_LATE_INIT=y
++CONFIG_BUTTON=y
++CONFIG_BUTTON_GPIO=y
++CONFIG_GPIO_HOG=y
++CONFIG_CMD_ENV_FLAGS=y
++CONFIG_FIT=y
++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
++CONFIG_LED=y
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++CONFIG_LOGLEVEL=7
++CONFIG_LOG=y
++CONFIG_CMD_BOOTMENU=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_CPU=y
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_DM=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ENV_READMEM=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_EXT4=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_FDT=y
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
++CONFIG_CMD_GPIO=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_HASH=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_LED=y
++CONFIG_CMD_LICENSE=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_MBR is not set
++CONFIG_CMD_MMC=y
++CONFIG_CMD_MTD=y
++CONFIG_CMD_PCI=y
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_SF_TEST=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_PXE=y
++CONFIG_CMD_PWM=y
++CONFIG_CMD_SMC=y
++CONFIG_CMD_TFTPBOOT=y
++CONFIG_CMD_TFTPSRV=y
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_PART=y
++CONFIG_CMD_RARP=y
++CONFIG_CMD_SETEXPR=y
++CONFIG_CMD_SLEEP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_STRINGS=y
++CONFIG_CMD_USB=y
++CONFIG_CMD_UUID=y
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DM_MMC=y
++CONFIG_DM_MTD=y
++CONFIG_DM_REGULATOR=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_DM_REGULATOR_GPIO=y
++CONFIG_DM_USB=y
++CONFIG_DM_PWM=y
++CONFIG_PWM_MTK=y
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_VERSION_VARIABLE=y
++CONFIG_PARTITION_UUIDS=y
++CONFIG_NETCONSOLE=y
++CONFIG_DM_GPIO=y
++CONFIG_DM_SCSI=y
++CONFIG_AHCI=y
++CONFIG_AHCI_PCI=y
++CONFIG_SCSI_AHCI=y
++CONFIG_SCSI=y
++CONFIG_CMD_SCSI=y
++CONFIG_PHY=y
++CONFIG_PHY_MTK_TPHY=y
++CONFIG_MTK_AHCI=y
++CONFIG_PCI=y
++CONFIG_MTD=y
++CONFIG_MTD_UBI_FASTMAP=y
++CONFIG_DM_PCI=y
++CONFIG_PCIE_MEDIATEK=y
++CONFIG_PINCTRL_MT7988=y
++CONFIG_PRE_CONSOLE_BUFFER=y
++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
++CONFIG_RAM=y
++CONFIG_DM_SERIAL=y
++CONFIG_MTK_SERIAL=y
++CONFIG_MMC=y
++CONFIG_MMC_DEFAULT_DEV=1
++CONFIG_MMC_SUPPORTS_TUNING=y
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_MTK_SPI_NAND=y
++CONFIG_MTK_SPI_NAND_MTD=y
++CONFIG_SYSRESET_WATCHDOG=y
++CONFIG_WDT_MTK=y
++CONFIG_LZO=y
++CONFIG_ZSTD=y
++CONFIG_HEXDUMP=y
++CONFIG_RANDOM_UUID=y
++CONFIG_REGEX=y
++CONFIG_USB=y
++CONFIG_USB_HOST=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_XHCI_MTK=y
++CONFIG_USB_STORAGE=y
++CONFIG_OF_EMBED=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_IS_IN_UBI=y
++CONFIG_ENV_UBI_PART="ubi"
++CONFIG_ENV_SIZE=0x1f000
++CONFIG_ENV_SIZE_REDUND=0x1f000
++CONFIG_ENV_UBI_VOLUME="ubootenv"
++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_CLK=y
++CONFIG_SUPPORT_EMMC_BOOT=y
++CONFIG_MMC_HS200_SUPPORT=y
++CONFIG_MMC_MTK=y
++CONFIG_PHY_FIXED=y
++CONFIG_DM_ETH=y
++CONFIG_MEDIATEK_ETH=y
++CONFIG_PINCTRL=y
++CONFIG_PINCONF=y
++CONFIG_PINCTRL_MT7988=y
++CONFIG_POWER_DOMAIN=y
++CONFIG_MTK_POWER_DOMAIN=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_MTD_SPI_NAND=y
++CONFIG_MTK_SPIM=y
++#CONFIG_MTK_SNOR=y
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SPI_FLASH_MTD=y
++CONFIG_SPI_FLASH_WINBOND=y
++# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
++CONFIG_CMD_SF=y
++CONFIG_CMD_NAND=y
++CONFIG_CMD_NAND_TRIMFFS=y
++CONFIG_LMB_MAX_REGIONS=64
++CONFIG_USE_IPADDR=y
++CONFIG_IPADDR="192.168.1.1"
++CONFIG_USE_SERVERIP=y
++CONFIG_SERVERIP="192.168.1.254"
+--- /dev/null
++++ b/bananapi_bpi-r4-poe_emmc_env
+@@ -0,0 +1,57 @@
++ipaddr=192.168.1.1
++serverip=192.168.1.254
++loadaddr=0x50000000
++bootargs=console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait
++bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
++bootconf=config-mt7988a-bananapi-bpi-r4-poe
++bootconf_base=config-mt7988a-bananapi-bpi-r4-poe
++bootconf_emmc=mt7988a-bananapi-bpi-r4-emmc
++bootconf_extra=
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-initramfs-recovery.itb
++bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-emmc-preloader.bin
++bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-emmc-bl31-uboot.fip
++bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-squashfs-sysupgrade.itb
++bootled_pwr=green:status
++bootled_rec=blue:status
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )  [0;36m[eMMC][0m
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
++bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to eMMC.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
++bootmenu_7=[31mLoad BL2 preloader via TFTP then write to eMMC.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
++bootmenu_8=Reboot.=reset
++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf#$bootconf_emmc#$bootconf_extra ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf#$bootconf_emmc#$bootconf_extra ; led $bootled_rec off
++boot_emmc=run boot_production ; run boot_recovery
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_emmc#$bootconf_extra ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_emmc ; fi
++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
++part_default=production
++part_recovery=recovery
++reset_factory=eraseenv && reset
++emmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
++emmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
++emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
++emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
++emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
+--- /dev/null
++++ b/bananapi_bpi-r4-poe_sdmmc_env
+@@ -0,0 +1,66 @@
++ipaddr=192.168.1.1
++serverip=192.168.1.254
++loadaddr=0x50000000
++bootargs=console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait
++bootcmd=if pstore check ; then run boot_recovery ; else run boot_sdmmc ; fi
++bootconf=config-mt7988a-bananapi-bpi-r4-poe
++bootconf_sd=mt7988a-bananapi-bpi-r4-sd
++bootconf_emmc=mt7988a-bananapi-bpi-r4-emmc
++bootconf_extra=
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-initramfs-recovery.itb
++bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-squashfs-sysupgrade.itb
++bootled_pwr=green:status
++bootled_rec=blue:status
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )  [0;36m[SD card][0m
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++bootmenu_2=Boot production system from SD card.=run boot_production ; run bootmenu_confirm_return
++bootmenu_3=Boot recovery system from SD card.=run boot_recovery ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_6=[31mInstall bootloader, recovery and production to NAND.[0m=if nand info ; then run ubi_init ; else echo "NAND not detected" ; fi ; run bootmenu_confirm_return
++bootmenu_7=Reboot.=reset
++bootmenu_8=Reset all settings to factory defaults.=run reset_factory ; reset
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run sdmmc_read_production && bootm $loadaddr#$bootconf#$bootconf_sd#$bootconf_extra ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf#$bootconf_emmc ; led $bootled_rec off
++boot_sdmmc=run boot_production ; run boot_recovery
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_sd#$bootconf_extra ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_sd ; fi
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf#$bootconf_sd
++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
++mmc_read_vol=mmc read $loadaddr $part_addr 0x100 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
++part_default=production
++part_recovery=recovery
++reset_factory=eraseenv && reset
++sdmmc_read_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
++sdmmc_read_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
++sdmmc_read_snand_bl2=part start mmc 0 install part_addr && mmc read $loadaddr $part_addr 0x400
++sdmmc_read_snand_fip=part start mmc 0 install part_addr && setexpr offset $part_addr + 0x800 && mmc read $loadaddr $offset 0x1000
++sdmmc_read_emmc_install=part start mmc 0 install part_addr && setexpr offset $part_addr + 0x3800 && mmc read $loadaddr $offset 0x4000
++sdmmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++sdmmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr 0x0 0x80000 && mtd write bl2 $loadaddr 0x80000 0x80000 && mtd write bl2 $loadaddr 0x100000 0x80000 && mtd write bl2 $loadaddr 0x180000 0x80000
++ubi_create_env=ubi create ubootenv 0x100000 dynamic 1 ; ubi create ubootenv2 0x100000 dynamic 2
++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi
++ubi_init=run ubi_format && run ubi_init_bl && run ubi_create_env && run ubi_init_openwrt && run ubi_init_emmc_install
++ubi_init_openwrt=run sdmmc_read_recovery && iminfo $loadaddr && run ubi_write_recovery ; run sdmmc_read_production && iminfo $loadaddr && run ubi_write_production
++ubi_init_bl=run sdmmc_read_snand_bl2 && run snand_write_bl2 && run sdmmc_read_snand_fip && run ubi_write_fip
++ubi_init_emmc_install=run sdmmc_read_emmc_install && run ubi_write_emmc_install
++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
++ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000
++ubi_write_emmc_install=ubi check emmc_install && ubi remove emmc_install ; ubi create emmc_install 0x800000 dynamic ; ubi write $loadaddr emmc_install 0x800000
++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
++_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
+--- /dev/null
++++ b/bananapi_bpi-r4-poe_snand_env
+@@ -0,0 +1,67 @@
++ipaddr=192.168.1.1
++serverip=192.168.1.254
++loadaddr=0x50000000
++bootargs=console=ttyS0,115200n1 pci=pcie_bus_perf root=/dev/fit0 rootwait ubi.block=0,fit
++bootconf=config-mt7988a-bananapi-bpi-r4-poe
++bootconf_extra=mt7988a-bananapi-bpi-r4-emmc
++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-initramfs-recovery.itb
++bootfile_bl2=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-snand-preloader.bin
++bootfile_fip=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-snand-bl31-uboot.fip
++bootfile_upg=openwrt-mediatek-filogic-bananapi_bpi-r4-poe-squashfs-sysupgrade.itb
++bootled_pwr=green:status
++bootled_rec=blue:status
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )  [0;36m[SPI-NAND][0m
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
++bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
++bootmenu_8=[31mInstall bootloader, recovery and production to eMMC.[0m=if mmc partconf 0 ; then run emmc_init ; else echo "eMMC not detected" ; fi ; run bootmenu_confirm_return
++bootmenu_9=Reboot.=reset
++bootmenu_10=Reset all settings to factory defaults.=run reset_factory ; reset
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf#$bootconf_extra ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
++boot_ubi=run boot_production ; run boot_recovery
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf#$bootconf_extra ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run ubi_write_fip && run reset_factory
++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run snand_write_bl2
++part_default=production
++part_recovery=recovery
++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
++snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr 0x0 0x80000 && mtd write bl2 $loadaddr 0x80000 0x80000 && mtd write bl2 $loadaddr 0x100000 0x80000 && mtd write bl2 $loadaddr 0x180000 0x80000
++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 1 ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 2
++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
++ubi_read_emmc_install=ubi check emmc_install && ubi read $loadaddr emmc_install
++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
++ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip 0x200000 static ; ubi write $loadaddr fip 0x200000
++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$image_size && mmc write $loadaddr 0x$part_addr 0x$image_size
++emmc_init=mmc dev 0 && mmc bootbus 0 0 0 0 && run emmc_init_bl && run emmc_init_openwrt ; env default bootcmd ; saveenv ; saveenv
++emmc_init_bl=run ubi_read_emmc_install && setenv fileaddr $loadaddr && run emmc_write_bl2 && setexpr fileaddr $loadaddr + 0x100000 && run emmc_write_fip && setexpr fileaddr $loadaddr + 0x500000 && run emmc_write_hdr
++emmc_init_openwrt=run ubi_read_recovery && iminfo $loadaddr && run emmc_write_recovery ; run ubi_read_production && iminfo $loadaddr && run emmc_write_production
++emmc_write_bl2=mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $fileaddr 0x0 0x400 ; mmc partconf 0 1 1 0
++emmc_write_fip=mmc erase 0x3400 0x2000 && mmc write $fileaddr 0x3400 0x2000 && mmc erase 0x2000 0x800
++emmc_write_hdr=mmc erase 0x0 0x40 && mmc write $fileaddr 0x0 0x40
++emmc_write_production=part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++emmc_write_recovery=part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"



From lede-commits at lists.infradead.org  Mon May  6 02:05:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 05:05:33 -0400
Subject: [openwrt/openwrt]  mediatek: fix broken PCIe caused by update to
 6.6.30
In-Reply-To: <171498633316.1203351.6332234238083202804@git-01.infra.openwrt.org>
References: <171498633316.1203351.6332234238083202804@git-01.infra.openwrt.org>
Message-ID: <mailman.33837.1714986337.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8607372b410fbb24b08de97ff5941341d0870d6f

commit 8607372b410fbb24b08de97ff5941341d0870d6f
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 6 01:39:58 2024 +0300

    mediatek: fix broken PCIe caused by update to 6.6.30
    
    The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
    makes use of "syscon_regmap_lookup_by_phandle" which requires that
    "syscon" be in the compatible list.
    
    Without this patch, PCIe probe will fail with the following error:
    
    [    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie at 1a143000 ranges:
    [    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
    [    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
    [    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
    [    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22
    
    Fixes: 4c6e9a9943 ("kernel: bump 6.6 to 6.6.30")
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
---
 .../710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index a3247f1779..917a458d30 100644
--- a/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-6.6/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -30,6 +30,15 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		#interrupt-cells = <1>;
  		interrupt-map-mask = <0 0 0 7>;
+@@ -937,7 +943,7 @@
+ 	};
+ 
+ 	hifsys: clock-controller at 1af00000 {
+-		compatible = "mediatek,mt7622-hifsys";
++		compatible = "mediatek,mt7622-hifsys", "syscon";
+ 		reg = <0 0x1af00000 0 0x70>;
+ 		#clock-cells = <1>;
+ 	};
 --- a/drivers/pci/controller/pcie-mediatek.c
 +++ b/drivers/pci/controller/pcie-mediatek.c
 @@ -20,6 +20,7 @@



From lede-commits at lists.infradead.org  Mon May  6 03:51:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 06:51:02 -0400
Subject: [openwrt/openwrt]  ipq4019: fix even more wrong reference to USB node
In-Reply-To: <171499266224.1518969.3247902509128339632@git-01.infra.openwrt.org>
References: <171499266224.1518969.3247902509128339632@git-01.infra.openwrt.org>
Message-ID: <mailman.33861.1714992674.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f3f3e2c5bb89f56a122978e791c1284add1bd20e

commit f3f3e2c5bb89f56a122978e791c1284add1bd20e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun May 5 19:42:52 2024 +0200

    ipq4019: fix even more wrong reference to USB node
    
    Commit 6136ebabc5cb ("ipq40xx: 6.6: fix DTS to use reference for usb
    node") fixed only some of the reference to USB node but many others were
    still using the old broken usb3/usb2. Fix every reference to those node
    and move them on using the tag name.
    
    Fixes: 6136ebabc5cb ("ipq40xx: 6.6: fix DTS to use reference for usb node")
    Link: https://github.com/openwrt/openwrt/pull/15392
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts   | 26 ++++-----
 .../arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts    | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts     | 28 ++++-----
 .../arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts     |  4 --
 .../boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts   | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts   | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts     | 18 +++---
 .../arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts     | 66 ++++++++++-----------
 .../arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts    | 38 ++++++------
 .../arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts  | 14 ++---
 .../arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts    | 14 ++---
 .../arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts   | 66 ++++++++++-----------
 .../arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 24 ++++----
 .../boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts   |  8 +--
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts    | 24 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts  |  8 +--
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts  | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts   | 16 +++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts | 16 +++---
 .../dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts   | 14 ++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts | 67 +++++++++++-----------
 .../arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi     | 16 +++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts  | 18 +++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts  | 18 +++---
 .../arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts    | 38 ++++++------
 .../arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts     | 16 +++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi | 67 +++++++++++-----------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 40 ++++++-------
 .../arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts |  8 +--
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi | 66 ++++++++++-----------
 .../arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi     | 66 ++++++++++-----------
 .../arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts    | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts    | 16 +++---
 34 files changed, 451 insertions(+), 465 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
index ceaa1edd45..07262f9ed5 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
@@ -98,19 +98,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				phys = <&usb3_hs_phy>;
-				phy-names = "usb2-phy";
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -323,10 +310,23 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
index 50e7f3d4e0..396d4e5fea 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
@@ -50,14 +50,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -307,6 +299,14 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&usb2 {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
index e74d110b3d..4f3d00c678 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
@@ -89,19 +89,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				phys = <&usb3_hs_phy>;
-				phy-names = "usb2-phy";
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -325,10 +312,23 @@
 	qcom,ath10k-calibration-variant = "ALFA-Network-AP120C-AC";
 };
 
+&usb2_hs_phy {
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
 
-&usb2_hs_phy {
+&usb3 {
 	status = "okay";
 };
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
index 701dc936f1..8f108a3f9f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
@@ -37,10 +37,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2_hs_phy: hsphy at a8000 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
index 524bcbcb2b..572e6545c4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
@@ -51,14 +51,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -315,10 +307,18 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	qcom,ath10k-calibration-variant = "AVM-FRITZBox-4040";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
index 5fc97d7bb2..fb0175aeca 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
@@ -61,14 +61,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -261,6 +253,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
@@ -269,6 +265,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index fa3ed8b054..deee82b1a6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -63,15 +63,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				phys = <&usb3_hs_phy>;
-				phy-names = "usb2-phy";
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -219,6 +210,15 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
+
 &mdio {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index a9e9683592..cb40b87e56 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -60,39 +60,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb2_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -360,6 +327,39 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index 38158fbfa7..ecf652368c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -55,25 +55,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -291,6 +272,25 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts
index 8ff18d92b7..5cb103b321 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts
@@ -15,15 +15,6 @@
 			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
 			status = "okay";
 		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				phys = <&usb3_hs_phy>;
-				phy-names = "usb2-phy";
-			};
-		};
 	};
 };
 
@@ -43,3 +34,8 @@
 &usb3 {
 	status = "okay";
 };
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts
index e7f28f23cf..bf50ebfc54 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts
@@ -15,15 +15,6 @@
 			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
 			status = "okay";
 		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				phys = <&usb3_hs_phy>;
-				phy-names = "usb2-phy";
-			};
-		};
 	};
 };
 
@@ -43,3 +34,8 @@
 &usb3 {
 	status = "okay";
 };
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
index f3c6f34bf4..26c8c0244a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
@@ -69,14 +69,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -282,6 +274,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
@@ -290,6 +286,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
index d1c8d798f9..b4f536fdb8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
@@ -54,39 +54,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb2_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -344,10 +311,43 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &gmac {
 	status = "okay";
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 9216a7c9f8..6ea0eb2b55 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -202,20 +202,20 @@
 
 &usb3 {
 	status = "okay";
+};
 
-	dwc3 at 8a00000 {
-		#address-cells = <1>;
-		#size-cells = <0>;
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
 
-		usb3_port1: port at 1 {
-			reg = <1>;
-			#trigger-source-cells = <0>;
-		};
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
 
-		usb3_port2: port at 2 {
-			reg = <2>;
-			#trigger-source-cells = <0>;
-		};
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
 	};
 };
 
@@ -230,7 +230,7 @@
 &usb2 {
 	status = "okay";
 
-	dwc3 at 6000000 {
+	usb at 6000000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
index a118bdf26b..2c86cd57bc 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
@@ -54,10 +54,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -266,6 +262,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &qpic_bam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts
index c4e7d0b207..1577ed58bb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts
@@ -269,7 +269,7 @@
 &usb2 {
 	status = "okay";
 
-	dwc3 at 6000000 {
+	usb at 6000000 {
 		#address-cells = <1>;
 		#size-cells = <0>;
 
@@ -286,20 +286,20 @@
 
 &usb3 {
 	status = "okay";
+};
 
-	dwc3 at 8a00000 {
-		#address-cells = <1>;
-		#size-cells = <0>;
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
 
-		usb3_port1: port at 1 {
-			reg = <1>;
-			#trigger-source-cells = <0>;
-		};
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
 
-		usb3_port2: port at 2 {
-			reg = <2>;
-			#trigger-source-cells = <0>;
-		};
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
 	};
 };
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
index 32f0473fb1..30101b0c3a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
@@ -45,10 +45,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -233,6 +229,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &blsp1_i2c3 {
 	pinctrl-0 = <&i2c_0_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index 6987515720..9bc12be8ef 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -135,14 +135,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -449,6 +441,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -457,6 +453,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration", "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
index 54353cac58..ede92f7e22 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
@@ -118,14 +118,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -423,6 +415,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -431,6 +427,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 /*
  * The MD5 sum of the board file of the MF286D is identical to the board
  * file in the OEM firmware
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
index 61cbdba0d1..cd1c3c732f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
@@ -111,14 +111,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -430,6 +422,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -438,6 +434,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration", "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
index ea27defea3..a23654e4c8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
@@ -582,15 +582,15 @@
 
 	pinctrl-0 = <&usb3_pins>, <&lte_pins>;
 	pinctrl-names = "default";
+};
 
-	dwc3 at 8a00000 {
-		#address-cells = <1>;
-		#size-cells = <0>;
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
 
-		device at 1 {
-			compatible = "usb1bc7,1900";
-			reg = <1>;
-		};
+	device at 1 {
+		compatible = "usb1bc7,1900";
+		reg = <1>;
 	};
 };
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
index 2080a34e2f..f3f9395b41 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
@@ -53,39 +53,6 @@
 			status = "okay";
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb2_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -337,6 +304,40 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
index 90e5455b25..0abc3aff55 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
@@ -53,14 +53,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -364,10 +356,18 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts
index a803999804..f83f75b464 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts
@@ -9,22 +9,20 @@
 	chosen {
 		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_ALT)ro,256K(0:CDT)ro,256K(0:CDT_ALT)ro,256K(0:DDRPARAMS)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_ALT)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squas [...]
 	};
-
-	soc {
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-	};
 };
 
 &usb3_hs_phy {
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&usb2 {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts
index 4d0a9132c6..9151c5d33c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts
@@ -9,22 +9,20 @@
 	chosen {
 		bootargs = "root=/dev/mmcblk0p20 blkdevparts=mmcblk0:512K at 17K(0:SBL1)ro,512K(0:BOOTCONFIG)ro,512K(0:QSEE)ro,512K(0:QSEE_ALT)ro,256K(0:CDT)ro,256K(0:CDT_ALT)ro,256K(0:DDRPARAMS)ro,256K(0:APPSBLENV)ro,1M(0:APPSBL)ro,1M(0:APPSBL_ALT)ro,256K(0:ART)ro,256K(ARTMTD)ro,2M(language)ro,256K(config)ro,256K(pot)ro,256K(traffic_meter)ro,256K(pot_bak)ro,256K(traffic_meter.bak)ro,3840K(kernel),31488K(rootfs),35328K at 9233K(firmware),256K(mtdoops)ro,1457651200(reserved)ro,-(unallocated) rootfstype=squas [...]
 	};
-
-	soc {
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-	};
 };
 
 &usb3_hs_phy {
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&usb2 {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
index 70849d71d6..2854809bfe 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
@@ -55,25 +55,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -269,6 +250,25 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
index e2df1d1997..e2d435133b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
@@ -172,14 +172,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -358,6 +350,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -366,6 +362,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	qcom,ath10k-calibration-variant = "cellc,rtl30vw";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
index c7439b87ec..e31f10f9d3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
@@ -46,39 +46,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		watchdog at b017000 {
 			status = "okay";
 		};
@@ -199,10 +166,44 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
+
 &usb2_hs_phy {
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 2dc4544433..d99cbdb608 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -300,26 +300,6 @@
 			status = "okay";
 		};
 
-		usb3_ss_phy: ssphy at 9a000 {
-			status = "okay";
-		};
-
-		usb3_hs_phy: hsphy at a6000 {
-			status = "okay";
-		};
-
-		usb3: usb3 at 8af8800 {
-			status = "okay";
-		};
-
-		usb2_hs_phy: hsphy at a8000 {
-			status = "okay";
-		};
-
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		cryptobam: dma at 8e04000 {
 			status = "okay";
 		};
@@ -354,6 +334,26 @@
 	};
 };
 
+&usb3_ss_phy {
+	status = "okay";
+};
+
+&usb3_hs_phy {
+	status = "okay";
+};
+
+&usb3 {
+	status = "okay";
+};
+
+&usb2_hs_phy {
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
+
 &nand {
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
index 00b5897b7d..37383b015d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
@@ -72,10 +72,6 @@
 		watchdog at b017000 {
 			status = "okay";
 		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -470,3 +466,7 @@
 &usb3_hs_phy {
 	status = "okay";
 };
+
+&usb3 {
+	status = "okay";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
index fe3650ca58..8f0fd9a89f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
@@ -56,39 +56,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		watchdog at b017000 {
 			status = "okay";
 		};
@@ -201,10 +168,43 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
index 141ea60442..83574f89c7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
@@ -59,39 +59,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb2_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -289,6 +256,20 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+
+	usb at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
@@ -297,6 +278,25 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	usb3_port1: port at 1 {
+		reg = <1>;
+		#trigger-source-cells = <0>;
+	};
+
+	usb3_port2: port at 2 {
+		reg = <2>;
+		#trigger-source-cells = <0>;
+	};
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
index 13ed26d5d6..e424a021b7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
@@ -72,14 +72,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -275,6 +267,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
@@ -283,6 +279,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
index e7236824aa..b7ff970b25 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
@@ -57,14 +57,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -340,6 +332,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb3_hs_phy {
 	status = "okay";
 };
@@ -348,6 +344,10 @@
 	status = "okay";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";



From lede-commits at lists.infradead.org  Mon May  6 03:56:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 06:56:11 -0400
Subject: [openwrt/openwrt]  ipq40xx: Properly set MAC addresses for the
 EAP1300
In-Reply-To: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
References: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
Message-ID: <mailman.33868.1714992974.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/63b1326575fe4689ab9a0ac4b845daa6d80de5b5

commit 63b1326575fe4689ab9a0ac4b845daa6d80de5b5
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Fri May 3 08:12:38 2024 -0500

    ipq40xx: Properly set MAC addresses for the EAP1300
    
    The code that was there was just taking whatever was left in the
    registers, which was just wrong.  Set the addresses using the value from
    the u-boot environment, the same way the OEM firmware does.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts       | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index 3629101403..bfbed30b90 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -200,8 +200,13 @@
 				reg = <0x190000 0x1dc0000>;
 			};
 			partition9 at 1f50000 {
+				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x01f50000 0x00010000>;
+
+				macaddr_ubootenv_ethaddr: ethaddr {
+					#nvmem-cell-cells = <1>;
+				};
 			};
 			partition10 at 1f60000 {
 				label = "userconfig";
@@ -228,6 +233,8 @@
 &swport5 {
 	status = "okay";
 	label = "lan";
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
 };
 
 &gmac {
@@ -240,14 +247,14 @@
 
 &wifi0 {
 	status = "okay";
-	nvmem-cell-names = "pre-calibration";
-	nvmem-cells = <&precal_art_1000>;
+	nvmem-cell-names = "pre-calibration", "mac-address";
+	nvmem-cells = <&precal_art_1000>, <&macaddr_ubootenv_ethaddr 1>;
 	qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };
 
 &wifi1 {
 	status = "okay";
-	nvmem-cell-names = "pre-calibration";
-	nvmem-cells = <&precal_art_5000>;
+	nvmem-cell-names = "pre-calibration", "mac-address";
+	nvmem-cells = <&precal_art_5000>, <&macaddr_ubootenv_ethaddr 2>;
 	qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };



From lede-commits at lists.infradead.org  Mon May  6 03:56:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 06:56:09 -0400
Subject: [openwrt/openwrt]  ipq40xx: Enable NVMEM_U_BOOT_ENV config
In-Reply-To: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
References: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
Message-ID: <mailman.33869.1714992974.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e51791963e39d3ea8d7c7e679cebbb5191977c00

commit e51791963e39d3ea8d7c7e679cebbb5191977c00
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Thu May 2 14:11:04 2024 -0500

    ipq40xx: Enable NVMEM_U_BOOT_ENV config
    
    It's needed to get the MAC addresses for the Engenius EAP1300.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/config-6.6 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ipq40xx/config-6.6 b/target/linux/ipq40xx/config-6.6
index 22101d7df0..52ac1a585e 100644
--- a/target/linux/ipq40xx/config-6.6
+++ b/target/linux/ipq40xx/config-6.6
@@ -330,6 +330,7 @@ CONFIG_NVMEM=y
 CONFIG_NVMEM_QCOM_QFPROM=y
 # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
 # CONFIG_NVMEM_SPMI_SDAM is not set
+CONFIG_NVMEM_U_BOOT_ENV=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y



From lede-commits at lists.infradead.org  Mon May  6 03:56:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 06:56:10 -0400
Subject: [openwrt/openwrt]  ipq40xx: convert Engenius EAP1300 to DSA
In-Reply-To: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
References: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
Message-ID: <mailman.33870.1714992974.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e0567456bf54accf573f9cc3624c14649ce397a6

commit e0567456bf54accf573f9cc3624c14649ce397a6
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Wed May 1 15:43:16 2024 -0500

    ipq40xx: convert Engenius EAP1300 to DSA
    
    This commit converts the EAP1300 to DSA setup.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network  |  1 +
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts     | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index e86d24fab5..df0fca7544 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -52,6 +52,7 @@ ipq40xx_setup_interfaces()
 	aruba,ap-365|\
 	avm,fritzrepeater-1200|\
 	dlink,dap-2610|\
+	engenius,eap1300|\
 	extreme-networks,ws-ap3915i|\
 	meraki,mr33|\
 	meraki,mr74|\
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index e9d4775fd8..3629101403 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -221,6 +221,23 @@
 	status = "okay";
 };
 
+&switch {
+	status = "okay";
+};
+
+&swport5 {
+	status = "okay";
+	label = "lan";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";



From lede-commits at lists.infradead.org  Mon May  6 03:56:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 06:56:12 -0400
Subject: [openwrt/openwrt]  ipq40xx: Enable the Engenius EAP1300
In-Reply-To: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
References: <171499296918.1546526.2180248185138659727@git-01.infra.openwrt.org>
Message-ID: <mailman.33871.1714992976.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/226b15f8859afa7bfdfb6aca2d48f2b4e83e74e2

commit 226b15f8859afa7bfdfb6aca2d48f2b4e83e74e2
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Fri May 3 08:14:31 2024 -0500

    ipq40xx: Enable the Engenius EAP1300
    
    Now that DSA is enabled and the MAC addresses are set properly, we can
    use it.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/image/generic.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 7af777248d..444035ffe5 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -454,8 +454,7 @@ define Device/engenius_eap1300
 	IMAGE_SIZE := 25344k
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += engenius_eap1300
+TARGET_DEVICES += engenius_eap1300
 
 define Device/engenius_eap2200
 	$(call Device/FitImage)



From lede-commits at lists.infradead.org  Mon May  6 04:47:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 07:47:42 -0400
Subject: [openwrt/openwrt]  dropbear: use ssh-keygen  as an alias for
 dropbearkey
In-Reply-To: <171499606297.1696053.14863750305190100105@git-01.infra.openwrt.org>
References: <171499606297.1696053.14863750305190100105@git-01.infra.openwrt.org>
Message-ID: <mailman.33881.1714996069.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1d4b88265b1befd36dc9e02881d57b46dfeb74b2

commit 1d4b88265b1befd36dc9e02881d57b46dfeb74b2
Author: Sergey Ponomarev <stokito at gmail.com>
AuthorDate: Sun Dec 3 18:11:38 2023 +0200

    dropbear: use ssh-keygen  as an alias for dropbearkey
    
    The DropBear's dropbearkey supports limited set of arguments of
    OpenSSH ssh-keygen:  -t, -q -N -Y
    After the change you can generate a key with the same command.
    Still many features of the original OpenSSH ssh-keygen are absent in
    the dropbearkey.
    If it's needed then users should install openssh-keygen package that
    will replace the /usr/bin/ssh-keygen with the full version.
    
    Signed-off-by: Sergey Ponomarev <stokito at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14174
    [ wrap commit description to 80 columns ]
    Link: https://github.com/openwrt/openwrt/pull/14174
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/services/dropbear/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index b0f486f990..abb46157ea 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=2022.83
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
@@ -57,7 +57,7 @@ define Package/dropbear
   CATEGORY:=Base system
   TITLE:=Small SSH2 client/server
   DEPENDS:= +DROPBEAR_ZLIB:zlib
-  ALTERNATIVES:=
+  ALTERNATIVES:=100:/usr/bin/ssh-keygen:/usr/sbin/dropbear
   $(if $(CONFIG_DROPBEAR_SCP),ALTERNATIVES+= \
 	  100:/usr/bin/scp:/usr/sbin/dropbear,)
   $(if $(CONFIG_DROPBEAR_DBCLIENT),ALTERNATIVES+= \



From lede-commits at lists.infradead.org  Mon May  6 04:54:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 07:54:40 -0400
Subject: [openwrt/openwrt]  uboot-envtools: add env settings for
 ubnt,unifi-6-lr-v2
In-Reply-To: <171499648078.1716331.9091751655869966305@git-01.infra.openwrt.org>
References: <171499648078.1716331.9091751655869966305@git-01.infra.openwrt.org>
Message-ID: <mailman.33882.1714996485.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/587f3531fa35a09023684e79ad2df92de58bc808

commit 587f3531fa35a09023684e79ad2df92de58bc808
Author: Joel Low <joel at joelsplace.sg>
AuthorDate: Tue Nov 7 22:05:14 2023 +0800

    uboot-envtools: add env settings for ubnt,unifi-6-lr-v2
    
    This has been tested on two of my Unifi 6 LR v2s:
    
    ```bash
    $ fw_printenv # before
    Cannot parse config file '/etc/fw_env.config': No such file or directory
    $ cat /etc/fw_env.config
    /dev/mtd3 0x0000 0x1000 0x1000 1
    $ fw_printenv
    arch=arm
    baudrate=115200
    board=mt7622_evb
    board_name=mt7622_evb
    bootcmd=bootubnt
    bootdelay=3
    bootfile=uImage
    cpu=armv7
    device_model=U6-LR
    ethact=mtk_eth
    ethaddr=<redacted>
    ethcard=AQR112C
    ipaddr=<redacted>
    is_default=true
    loadaddr=0x5007FF28
    macaddr=<redacted>
    serverip=<redacted>
    soc=mt7622
    stderr=serial
    stdin=serial
    stdout=serial
    vendor=mediatek
    is_ble_stp=true
    ```
    
    I had to reverse-engineer the working settings above to the UCI script.
    
    Signed-off-by: Joel Low <joel at joelsplace.sg>
    Link: https://github.com/openwrt/openwrt/pull/13897
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/boot/uboot-envtools/files/mediatek_mt7622 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/boot/uboot-envtools/files/mediatek_mt7622 b/package/boot/uboot-envtools/files/mediatek_mt7622
index c8d3857484..6698e06ee3 100644
--- a/package/boot/uboot-envtools/files/mediatek_mt7622
+++ b/package/boot/uboot-envtools/files/mediatek_mt7622
@@ -57,6 +57,9 @@ ubnt,unifi-6-lr-v2-ubootmod|\
 ubnt,unifi-6-lr-v3-ubootmod)
 	ubootenv_add_uci_config "/dev/mtd$(find_mtd_index "u-boot-env")" "0x0" "0x4000" "0x1000"
 	;;
+ubnt,unifi-6-lr-v2)
+	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x1000" "1"
+	;;
 xiaomi,redmi-router-ax6s)
 	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000" "0x40000"
 	;;



From lede-commits at lists.infradead.org  Mon May  6 08:40:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 11:40:25 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: add ethernet aliases to DT
In-Reply-To: <171501002569.2314037.9006156914027867131@git-01.infra.openwrt.org>
References: <171501002569.2314037.9006156914027867131@git-01.infra.openwrt.org>
Message-ID: <mailman.33959.1715010035.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0b0e3e22f8830c6f0224509f25eb0f55d36ba7b5

commit 0b0e3e22f8830c6f0224509f25eb0f55d36ba7b5
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon May 6 16:37:24 2024 +0100

    mediatek: bpi-r4: add ethernet aliases to DT
    
    Adding the aliases also for Linux 6.6 was forgotten and is required for
    U-Boot to hand down persistent MAC addresses to Linux.
    
    Fixes: 5709254690 ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi         | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index 49d7edcd6b..ba19f69bbf 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -17,11 +17,13 @@
 		     "mediatek,mt7988a";
 
 	aliases {
-		serial0 = &uart0;
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
 		led-boot = &led_green;
 		led-failsafe = &led_green;
 		led-running = &led_green;
 		led-upgrade = &led_green;
+		serial0 = &uart0;
 	};
 
 	chosen {



From lede-commits at lists.infradead.org  Mon May  6 13:40:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 16:40:44 -0400
Subject: [openwrt/openwrt]  kselftests-bpf: update for kernel 6.6
In-Reply-To: <171502804444.3147860.2102300183782761304@git-01.infra.openwrt.org>
References: <171502804444.3147860.2102300183782761304@git-01.infra.openwrt.org>
Message-ID: <mailman.34063.1715028052.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/708e6b840ee7e08e9056e40c96bd93b1355928a7

commit 708e6b840ee7e08e9056e40c96bd93b1355928a7
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Sun May 5 16:11:02 2024 -0700

    kselftests-bpf: update for kernel 6.6
    
    Enable building multiple test programs and related kernel modules, with
    initial support for the bpf_testmod.ko module required since kernel 6.4.
    Explicitly disable LTO and clean up makefile variables and formatting.
    
    Fix a musl-related build failure by adding a kernel 6.6 patch:
    
         360-selftests-bpf-portability-of-unprivileged-tests.patch
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/devel/kselftests-bpf/Makefile              | 30 ++++++++++++++--------
 ...sts-bpf-portability-of-unprivileged-tests.patch | 26 +++++++++++++++++++
 2 files changed, 46 insertions(+), 10 deletions(-)

diff --git a/package/devel/kselftests-bpf/Makefile b/package/devel/kselftests-bpf/Makefile
index 0a5b874e04..d69e1e6dc3 100644
--- a/package/devel/kselftests-bpf/Makefile
+++ b/package/devel/kselftests-bpf/Makefile
@@ -13,7 +13,7 @@ PKG_VERSION:=$(LINUX_VERSION)
 PKG_RELEASE:=1
 PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>
 
-PKG_BUILD_FLAGS:=gc-sections lto
+PKG_BUILD_FLAGS:=no-lto
 PKG_BUILD_PARALLEL:=1
 PKG_FLAGS:=nonshared
 
@@ -23,8 +23,9 @@ include $(INCLUDE_DIR)/nls.mk
 define Package/kselftests-bpf
   SECTION:=devel
   CATEGORY:=Development
-  DEPENDS:= +libelf +zlib +libpthread +librt @!IN_SDK \
-	    @KERNEL_DEBUG_FS @KERNEL_DEBUG_INFO_BTF @KERNEL_BPF_EVENTS
+  DEPENDS:= \
+	+libelf +zlib +libpthread +librt @!IN_SDK \
+	@KERNEL_DEBUG_FS @KERNEL_DEBUG_INFO_BTF @KERNEL_BPF_EVENTS
   TITLE:=Linux Kernel Selftests (BPF)
   URL:=http://www.kernel.org
 endef
@@ -33,31 +34,40 @@ define Package/kselftests-bpf/description
   kselftests-bpf is the Linux kernel BPF test suite
 endef
 
-TEST_TARGET = test_verifier
+EXE_TARGETS = test_verifier
+
+MOD_TARGETS = $(if $(call kernel_patchver_ge,6.4),bpf_testmod.ko)
 
 MAKE_PATH:=tools/testing/selftests/bpf
 
 MAKE_VARS = \
 	ARCH="$(LINUX_KARCH)" \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
-	SAN_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
+	EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
 	LDLIBS="$(TARGET_LDFLAGS)" \
 	TOOLCHAIN_INCLUDE="$(TOOLCHAIN_INC_DIRS)" \
-	VMLINUX_BTF="$(LINUX_DIR)/vmlinux"
+	KBUILD_OUTPUT="$(LINUX_DIR)"
 
 MAKE_FLAGS = \
 	$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
-	O=$(PKG_BUILD_DIR)
+	OUTPUT=$(PKG_BUILD_DIR)
 
 define Build/Compile
 	+$(MAKE_VARS) \
 	$(MAKE) $(PKG_JOBS) -C $(LINUX_DIR)/$(MAKE_PATH) \
-		$(MAKE_FLAGS) $(TEST_TARGET) ;
+		$(MAKE_FLAGS) $(EXE_TARGETS) $(MOD_TARGETS) ;
 endef
 
 define Package/kselftests-bpf/install
-	$(INSTALL_DIR) $(1)/usr/bin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(TEST_TARGET) $(1)/usr/bin/
+	$(INSTALL_DIR) $(1)/usr/libexec/$(PKG_NAME)
+	$(foreach tgt,$(MOD_TARGETS), \
+		$(INSTALL_DATA) \
+			$(PKG_BUILD_DIR)/$(tgt) $(1)/usr/libexec/$(PKG_NAME); \
+	)
+	$(foreach tgt,$(EXE_TARGETS), \
+		$(INSTALL_BIN) \
+			$(PKG_BUILD_DIR)/$(tgt) $(1)/usr/libexec/$(PKG_NAME); \
+)
 endef
 
 $(eval $(call BuildPackage,kselftests-bpf))
diff --git a/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch b/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch
new file mode 100644
index 0000000000..0f28834d48
--- /dev/null
+++ b/target/linux/generic/pending-6.6/360-selftests-bpf-portability-of-unprivileged-tests.patch
@@ -0,0 +1,26 @@
+From ecb8f9a7d69698ce20fc6f4d107718d56fa861df Mon Sep 17 00:00:00 2001
+From: Tony Ambardar <Tony.Ambardar at gmail.com>
+Date: Sat, 9 Mar 2024 16:44:53 -0800
+Subject: [PATCH] selftests/bpf: Improve portability of unprivileged tests
+
+The addition of general support for unprivileged tests in test_loader.c
+breaks building test_verifier on non-glibc (e.g. musl) systems, due to the
+inclusion of glibc extension '<error.h>' in 'unpriv_helpers.c'. However,
+the header is actually not needed, so remove it to restore building.
+
+Fixes: 1d56ade032a4 ("selftests/bpf: Unprivileged tests for test_loader.c")
+Signed-off-by: Tony Ambardar <Tony.Ambardar at gmail.com>
+---
+ tools/testing/selftests/bpf/unpriv_helpers.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/tools/testing/selftests/bpf/unpriv_helpers.c
++++ b/tools/testing/selftests/bpf/unpriv_helpers.c
+@@ -2,7 +2,6 @@
+ 
+ #include <stdbool.h>
+ #include <stdlib.h>
+-#include <error.h>
+ #include <stdio.h>
+ 
+ #include "unpriv_helpers.h"



From lede-commits at lists.infradead.org  Mon May  6 13:42:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 16:42:07 -0400
Subject: [openwrt/openwrt]  libbpf: Update to v1.4.1
In-Reply-To: <171502812743.3151174.14604854366350996709@git-01.infra.openwrt.org>
References: <171502812743.3151174.14604854366350996709@git-01.infra.openwrt.org>
Message-ID: <mailman.34064.1715028132.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8cf28cc6a5ee4f74a9101bc26433c26e7f899c96

commit 8cf28cc6a5ee4f74a9101bc26433c26e7f899c96
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Wed Apr 3 15:31:29 2024 -0700

    libbpf: Update to v1.4.1
    
    Update to the latest upstream release to include recent improvements and
    bugfixes.
    
    Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.1
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/libs/libbpf/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile
index 666786e9f6..6b894972a7 100644
--- a/package/libs/libbpf/Makefile
+++ b/package/libs/libbpf/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libbpf
-PKG_VERSION:=1.4.0
+PKG_VERSION:=1.4.1
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
-PKG_MIRROR_HASH:=4c37636699c604de345937bdbdf8f2e6ce69cbf768a4aa669c32b542e5302de6
+PKG_MIRROR_HASH:=46469f720ed246529e46d84a6444ae1c1a1eaf2a717a5a055c9973bb52159ec3
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v1.4.0
+PKG_SOURCE_VERSION:=v1.4.1
 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>



From lede-commits at lists.infradead.org  Mon May  6 15:17:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:51 -0400
Subject: [openwrt/openwrt]  kernel: add missing kernel 6.6 symbols
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34071.1715033873.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e18dda015963be53c8f4a130f20f0a7b2c2ec65e

commit e18dda015963be53c8f4a130f20f0a7b2c2ec65e
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 13:41:26 2024 -0400

    kernel: add missing kernel 6.6 symbols
    
    Add missing kernel 6.6 symbols
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/generic/config-6.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index dd274e63d8..1e9a82e8f0 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -414,6 +414,7 @@ CONFIG_ARM64_SW_TTBR0_PAN=y
 # CONFIG_ARM_CCI_PMU is not set
 # CONFIG_ARM_CCN is not set
 # CONFIG_ARM_CMN is not set
+# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set
 # CONFIG_ARM_CPUIDLE is not set
 CONFIG_ARM_CPU_TOPOLOGY=y
 # CONFIG_ARM_CRYPTO is not set
@@ -465,6 +466,7 @@ CONFIG_ARM_MODULE_PLTS=y
 # CONFIG_ARM_SDE_INTERFACE is not set
 # CONFIG_ARM_SMCCC_SOC_ID is not set
 # CONFIG_ARM_SMC_WATCHDOG is not set
+# CONFIG_ARM_SMMU_V3_PMU is not set
 # CONFIG_ARM_SP805_WATCHDOG is not set
 # CONFIG_ARM_SPE_PMU is not set
 # CONFIG_ARM_THUMBEE is not set



From lede-commits at lists.infradead.org  Mon May  6 15:17:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:47 -0400
Subject: [openwrt/openwrt]  kernel/rockchip: Create kernel files for v6.6
 (from v6.1)
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34072.1715033873.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ddfd526140ac279c88f0da3d1c11204f8954ca43

commit ddfd526140ac279c88f0da3d1c11204f8954ca43
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 12:49:23 2024 -0400

    kernel/rockchip: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/rockchip/armv8/{config-6.1 => config-6.6}                    | 0
 ...01-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch | 0
 .../002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch   | 0
 .../006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch          | 0
 .../007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch        | 0
 .../008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch    | 0
 .../009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch         | 0
 ...0-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch | 0
 .../011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch     | 0
 ...2-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch | 0
 .../013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch          | 0
 .../014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch | 0
 ...5-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch | 0
 .../016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch | 0
 .../016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch     | 0
 .../017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch    | 0
 ...-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch | 0
 ...019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch | 0
 .../020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch | 0
 .../021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch        | 0
 .../022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch     | 0
 ...64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch | 0
 .../024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch                  | 0
 .../025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch                      | 0
 .../026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch                    | 0
 ...027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch | 0
 .../028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch    | 0
 .../029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch            | 0
 .../030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch   | 0
 .../031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch   | 0
 .../032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch  | 0
 .../100-rockchip-use-system-LED-for-OpenWrt.patch                         | 0
 .../103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch        | 0
 .../{patches-6.1 => patches-6.6}/105-nanopi-r4s-sd-signalling.patch       | 0
 .../rockchip/{patches-6.1 => patches-6.6}/106-r4s-openwrt-leds.patch      | 0
 .../107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch        | 0
 .../108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch        | 0
 .../{patches-6.1 => patches-6.6}/109-nanopc-t4-add-led-aliases.patch      | 0
 .../110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch        | 0
 .../{patches-6.1 => patches-6.6}/111-radxa-cm3-io-add-led-aliases.patch   | 0
 .../{patches-6.1 => patches-6.6}/112-radxa-e25-add-led-aliases.patch      | 0
 .../300-hwrng-add-Rockchip-SoC-hwrng-driver.patch                         | 0
 .../301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch           | 0
 43 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/rockchip/armv8/config-6.1 b/target/linux/rockchip/armv8/config-6.6
similarity index 100%
rename from target/linux/rockchip/armv8/config-6.1
rename to target/linux/rockchip/armv8/config-6.6
diff --git a/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch b/target/linux/rockchip/patches-6.6/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
rename to target/linux/rockchip/patches-6.6/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
diff --git a/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch b/target/linux/rockchip/patches-6.6/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
rename to target/linux/rockchip/patches-6.6/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
diff --git a/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch b/target/linux/rockchip/patches-6.6/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
rename to target/linux/rockchip/patches-6.6/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
diff --git a/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch b/target/linux/rockchip/patches-6.6/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
rename to target/linux/rockchip/patches-6.6/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
diff --git a/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch b/target/linux/rockchip/patches-6.6/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
rename to target/linux/rockchip/patches-6.6/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
diff --git a/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch b/target/linux/rockchip/patches-6.6/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
rename to target/linux/rockchip/patches-6.6/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
diff --git a/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch b/target/linux/rockchip/patches-6.6/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
rename to target/linux/rockchip/patches-6.6/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
diff --git a/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch b/target/linux/rockchip/patches-6.6/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
rename to target/linux/rockchip/patches-6.6/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
diff --git a/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch b/target/linux/rockchip/patches-6.6/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
rename to target/linux/rockchip/patches-6.6/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
diff --git a/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch b/target/linux/rockchip/patches-6.6/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
rename to target/linux/rockchip/patches-6.6/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
diff --git a/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch b/target/linux/rockchip/patches-6.6/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
rename to target/linux/rockchip/patches-6.6/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
diff --git a/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch b/target/linux/rockchip/patches-6.6/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
rename to target/linux/rockchip/patches-6.6/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
diff --git a/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch b/target/linux/rockchip/patches-6.6/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
rename to target/linux/rockchip/patches-6.6/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
diff --git a/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch b/target/linux/rockchip/patches-6.6/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
rename to target/linux/rockchip/patches-6.6/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
diff --git a/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch b/target/linux/rockchip/patches-6.6/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
rename to target/linux/rockchip/patches-6.6/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
diff --git a/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch b/target/linux/rockchip/patches-6.6/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
rename to target/linux/rockchip/patches-6.6/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
diff --git a/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
rename to target/linux/rockchip/patches-6.6/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
diff --git a/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
rename to target/linux/rockchip/patches-6.6/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
diff --git a/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
rename to target/linux/rockchip/patches-6.6/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
diff --git a/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch b/target/linux/rockchip/patches-6.6/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
rename to target/linux/rockchip/patches-6.6/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
diff --git a/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch b/target/linux/rockchip/patches-6.6/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
rename to target/linux/rockchip/patches-6.6/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
diff --git a/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch b/target/linux/rockchip/patches-6.6/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
rename to target/linux/rockchip/patches-6.6/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
diff --git a/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch b/target/linux/rockchip/patches-6.6/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
rename to target/linux/rockchip/patches-6.6/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
diff --git a/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch b/target/linux/rockchip/patches-6.6/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
rename to target/linux/rockchip/patches-6.6/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
diff --git a/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
rename to target/linux/rockchip/patches-6.6/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
diff --git a/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
rename to target/linux/rockchip/patches-6.6/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
diff --git a/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
rename to target/linux/rockchip/patches-6.6/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
diff --git a/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch b/target/linux/rockchip/patches-6.6/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
rename to target/linux/rockchip/patches-6.6/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
diff --git a/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch b/target/linux/rockchip/patches-6.6/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
rename to target/linux/rockchip/patches-6.6/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
diff --git a/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch b/target/linux/rockchip/patches-6.6/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
rename to target/linux/rockchip/patches-6.6/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
diff --git a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch b/target/linux/rockchip/patches-6.6/100-rockchip-use-system-LED-for-OpenWrt.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch
rename to target/linux/rockchip/patches-6.6/100-rockchip-use-system-LED-for-OpenWrt.patch
diff --git a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch b/target/linux/rockchip/patches-6.6/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
rename to target/linux/rockchip/patches-6.6/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
diff --git a/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch b/target/linux/rockchip/patches-6.6/105-nanopi-r4s-sd-signalling.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch
rename to target/linux/rockchip/patches-6.6/105-nanopi-r4s-sd-signalling.patch
diff --git a/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch b/target/linux/rockchip/patches-6.6/106-r4s-openwrt-leds.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch
rename to target/linux/rockchip/patches-6.6/106-r4s-openwrt-leds.patch
diff --git a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch b/target/linux/rockchip/patches-6.6/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
rename to target/linux/rockchip/patches-6.6/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
diff --git a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch b/target/linux/rockchip/patches-6.6/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
rename to target/linux/rockchip/patches-6.6/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
diff --git a/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch b/target/linux/rockchip/patches-6.6/109-nanopc-t4-add-led-aliases.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch
rename to target/linux/rockchip/patches-6.6/109-nanopc-t4-add-led-aliases.patch
diff --git a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch b/target/linux/rockchip/patches-6.6/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
rename to target/linux/rockchip/patches-6.6/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
diff --git a/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch b/target/linux/rockchip/patches-6.6/111-radxa-cm3-io-add-led-aliases.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch
rename to target/linux/rockchip/patches-6.6/111-radxa-cm3-io-add-led-aliases.patch
diff --git a/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch b/target/linux/rockchip/patches-6.6/112-radxa-e25-add-led-aliases.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch
rename to target/linux/rockchip/patches-6.6/112-radxa-e25-add-led-aliases.patch
diff --git a/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch b/target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
rename to target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
diff --git a/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch b/target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
similarity index 100%
rename from target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
rename to target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch



From lede-commits at lists.infradead.org  Mon May  6 15:17:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:52 -0400
Subject: [openwrt/openwrt]  rockchip: add kernel 6.6 as testing kernel
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34075.1715033876.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ce4da3cf41c3a41037d8ff9dc3d14b9078a63d58

commit ce4da3cf41c3a41037d8ff9dc3d14b9078a63d58
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 13:44:18 2024 -0400

    rockchip: add kernel 6.6 as testing kernel
    
    Add kernel 6.6 as testing kernel
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/rockchip/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/rockchip/Makefile b/target/linux/rockchip/Makefile
index 42d75e3b4f..75423f70ef 100644
--- a/target/linux/rockchip/Makefile
+++ b/target/linux/rockchip/Makefile
@@ -8,6 +8,7 @@ FEATURES:=ext4 audio usb usbgadget display gpio fpu pci pcie rootfs-part boot-pa
 SUBTARGETS:=armv8
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 define Target/Description
 	Build firmware image for Rockchip SoC devices.



From lede-commits at lists.infradead.org  Mon May  6 15:17:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:50 -0400
Subject: [openwrt/openwrt]  rockchip: refresh config 6.6
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34076.1715033876.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/83edd39db68a89904656954487df0a2919e01fda

commit 83edd39db68a89904656954487df0a2919e01fda
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 13:38:57 2024 -0400

    rockchip: refresh config 6.6
    
    Refresh config 6.6 (make kernel_oldconfig).
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/rockchip/armv8/config-6.6 | 56 +++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 18 deletions(-)

diff --git a/target/linux/rockchip/armv8/config-6.6 b/target/linux/rockchip/armv8/config-6.6
index 6337245ff8..fb57fc6260 100644
--- a/target/linux/rockchip/armv8/config-6.6
+++ b/target/linux/rockchip/armv8/config-6.6
@@ -1,7 +1,9 @@
 CONFIG_64BIT=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
+CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_FORCE_MAX_ORDER=10
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
@@ -9,9 +11,9 @@ CONFIG_ARCH_MMAP_RND_BITS=18
 CONFIG_ARCH_MMAP_RND_BITS_MAX=33
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_PROC_KCORE_TEXT=y
 CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_SELECTS_KEXEC_FILE=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
@@ -72,6 +74,7 @@ CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
 CONFIG_ARM_SCMI_POWER_CONTROL=y
 CONFIG_ARM_SCMI_POWER_DOMAIN=y
 CONFIG_ARM_SCMI_PROTOCOL=y
+# CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set
 CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
 CONFIG_ARM_SCMI_TRANSPORT_SMC=y
 CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE=y
@@ -102,6 +105,8 @@ CONFIG_BLK_PM=y
 CONFIG_BRCMSTB_GISB_ARB=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_BUFFER_HEAD=y
+CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
 CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
 CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
 CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
@@ -115,6 +120,7 @@ CONFIG_CLK_RK3328=y
 CONFIG_CLK_RK3368=y
 CONFIG_CLK_RK3399=y
 CONFIG_CLK_RK3568=y
+CONFIG_CLK_RK3588=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=8
@@ -183,11 +189,13 @@ CONFIG_CRYPTO_CRYPTD=y
 CONFIG_CRYPTO_GHASH_ARM64_CE=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_POLYVAL=y
 CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
-CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SM3=y
 CONFIG_CRYPTO_SM3_NEON=y
 CONFIG_CRYPTO_SM4=y
@@ -205,6 +213,7 @@ CONFIG_DEVFREQ_GOV_USERSPACE=y
 CONFIG_DEVMEM=y
 # CONFIG_DEVPORT is not set
 CONFIG_DMADEVICES=y
+CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_DIRECT_REMAP=y
 CONFIG_DMA_ENGINE=y
@@ -238,11 +247,14 @@ CONFIG_FRAME_POINTER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FUNCTION_ALIGNMENT=4
+CONFIG_FUNCTION_ALIGNMENT_4B=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
-CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
+CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -263,7 +275,6 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_PINCONF=y
@@ -279,12 +290,14 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_ROCKCHIP=y
 CONFIG_GPIO_SYSCON=y
+CONFIG_GRO_CELLS=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HOTPLUG_PCI=y
 # CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -314,6 +327,7 @@ CONFIG_INPUT_KEYBOARD=y
 CONFIG_INPUT_LEDS=y
 CONFIG_INPUT_MATRIXKMAP=y
 CONFIG_INPUT_RK805_PWRKEY=y
+# CONFIG_IOMMUFD is not set
 CONFIG_IOMMU_API=y
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
@@ -366,11 +380,13 @@ CONFIG_MDIO_BUS_MUX_MMIOREG=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MEDIATEK_GE_PHY=y
-CONFIG_MEMFD_CREATE=y
+# CONFIG_MEDIATEK_GE_SOC_PHY is not set
 CONFIG_MEMORY_ISOLATION=y
 CONFIG_MFD_CORE=y
 # CONFIG_MFD_KHADAS_MCU is not set
-CONFIG_MFD_RK808=y
+CONFIG_MFD_RK8XX=y
+CONFIG_MFD_RK8XX_I2C=y
+CONFIG_MFD_RK8XX_SPI=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
@@ -390,6 +406,7 @@ CONFIG_MMC_SDHCI_OF_ARASAN=y
 CONFIG_MMC_SDHCI_OF_DWCMSHC=y
 # CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_RELA=y
 CONFIG_MOTORCOMM_PHY=y
 CONFIG_MQ_IOSCHED_DEADLINE=y
@@ -401,6 +418,7 @@ CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SG_DMA_FLAGS=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 CONFIG_NET_DEVLINK=y
 CONFIG_NET_DSA=y
@@ -408,10 +426,13 @@ CONFIG_NET_DSA_MT7530=y
 CONFIG_NET_DSA_MT7530_MDIO=y
 CONFIG_NET_DSA_MT7530_MMIO=y
 CONFIG_NET_DSA_TAG_MTK=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_SWITCHDEV=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NLS_ISO8859_1=y
 CONFIG_NOP_USB_XCEIV=y
@@ -419,6 +440,7 @@ CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=256
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_NVMEM_ROCKCHIP_EFUSE=y
 # CONFIG_NVMEM_ROCKCHIP_OTP is not set
 CONFIG_NVMEM_SYSFS=y
@@ -464,12 +486,13 @@ CONFIG_PCIE_ROCKCHIP_HOST=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCI_STUB=y
 CONFIG_PCS_MTK_LYNXI=y
 CONFIG_PCS_XPCS=y
+CONFIG_PER_VMA_LOCK=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PHY_ROCKCHIP_DP=y
@@ -509,7 +532,6 @@ CONFIG_PREEMPT_COUNT=y
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
-# CONFIG_PRINT_QUOTA_WARNING is not set
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PROC_VMCORE=y
 CONFIG_PTP_1588_CLOCK=y
@@ -523,8 +545,6 @@ CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_QUOTA=y
 CONFIG_QUOTACTL=y
 CONFIG_RAID_ATTRS=y
-CONFIG_RANDOMIZE_BASE=y
-CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
@@ -535,6 +555,7 @@ CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_IRQ=y
 CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_ARM_SCMI=y
 CONFIG_REGULATOR_FAN53555=y
@@ -584,6 +605,7 @@ CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PCILIB=y
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_AMBA_PL011=y
@@ -612,13 +634,11 @@ CONFIG_SPI_MEM=y
 CONFIG_SPI_ROCKCHIP=y
 CONFIG_SPI_ROCKCHIP_SFC=y
 CONFIG_SPI_SPIDEV=y
-# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_SQUASHFS_EMBEDDED is not set
 CONFIG_SQUASHFS_FILE_CACHE=y
 # CONFIG_SQUASHFS_FILE_DIRECT is not set
 CONFIG_SRAM=y
-CONFIG_SRCU=y
 CONFIG_STACKPROTECTOR=y
 CONFIG_STACKPROTECTOR_PER_TASK=y
 CONFIG_STACKPROTECTOR_STRONG=y
@@ -659,6 +679,8 @@ CONFIG_TYPEC=y
 CONFIG_TYPEC_FUSB302=y
 # CONFIG_TYPEC_HD3SS3220 is not set
 # CONFIG_TYPEC_MUX_FSA4480 is not set
+# CONFIG_TYPEC_MUX_GPIO_SBU is not set
+# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
 # CONFIG_TYPEC_MUX_PI3USB30532 is not set
 # CONFIG_TYPEC_RT1719 is not set
 # CONFIG_TYPEC_STUSB160X is not set
@@ -666,7 +688,6 @@ CONFIG_TYPEC_FUSB302=y
 CONFIG_TYPEC_TCPM=y
 # CONFIG_TYPEC_TPS6598X is not set
 # CONFIG_TYPEC_WUSB3801 is not set
-# CONFIG_UACCE is not set
 # CONFIG_UCLAMP_TASK is not set
 # CONFIG_UEVENT_HELPER is not set
 CONFIG_UNINLINE_SPIN_UNLOCK=y
@@ -679,7 +700,6 @@ CONFIG_USB_DWC3_OF_SIMPLE=y
 CONFIG_USB_EHCI_HCD=y
 CONFIG_USB_EHCI_HCD_PLATFORM=y
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_HID=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PLATFORM=y
 CONFIG_USB_PHY=y



From lede-commits at lists.infradead.org  Mon May  6 15:17:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:49 -0400
Subject: [openwrt/openwrt]  rockchip: refresh 6.6 patches
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34077.1715033880.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/728db5ec05d798c45266acb53511abf74d53aeb8

commit 728db5ec05d798c45266acb53511abf74d53aeb8
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 13:12:01 2024 -0400

    rockchip: refresh 6.6 patches
    
    Refresh kernel 6.6 patches.
    Removed backpored patches.
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 ...cmshc-Update-DLL-and-pre-change-delay-for.patch |   60 -
 ...f-dwcmshc-properly-determine-max-clock-on.patch |   52 -
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch |   70 --
 ...dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch |  407 -------
 ...rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch |   71 --
 ...-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch |  754 ------------
 ...ip-create-common-dtsi-for-NanoPi-R5-serie.patch | 1226 --------------------
 ...-rockchip-fix-gmac-support-for-NanoPi-R5S.patch |   49 -
 ...ip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch |   39 -
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch |  152 ---
 ...kchip-fix-button-reset-pin-for-nanopi-r5c.patch |   37 -
 ...ip-configure-eth-pad-driver-strength-for-.patch |   33 -
 ...kchip-Add-Radxa-Compute-Module-3-IO-board.patch |  233 ----
 ...-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch |   63 -
 ...rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch |  131 ---
 ...p-Add-rk3566-based-Radxa-Compute-Module-3.patch |  386 ------
 ...chip-Enable-WiFi-BT-support-for-Radxa-CM3.patch |  134 ---
 ...kchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch |   32 -
 ...dts-rockchip-Fix-compatible-for-Radxa-CM3.patch |   45 -
 ...-rockchip-minor-whitespace-cleanup-around.patch |   28 -
 ...6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch |  689 -----------
 ...25-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch |   48 -
 ...-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch |   35 -
 ...chip-Correct-the-model-name-for-Radxa-E25.patch |   28 -
 ...rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch |   79 --
 ...m64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch |   41 -
 ...ockchip-set-PHY-address-of-MT7531-switch-.patch |   40 -
 ...ockchip-regulator-for-sd-needs-to-be-alwa.patch |   33 -
 .../300-hwrng-add-Rockchip-SoC-hwrng-driver.patch  |    9 +-
 ...s-rockchip-add-DT-entry-for-RNG-to-RK356x.patch |    2 +-
 30 files changed, 6 insertions(+), 5000 deletions(-)

diff --git a/target/linux/rockchip/patches-6.6/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch b/target/linux/rockchip/patches-6.6/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
deleted file mode 100644
index 2bb542be36..0000000000
--- a/target/linux/rockchip/patches-6.6/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From b75a52b0dda353aeefb4830a320589a363f49579 Mon Sep 17 00:00:00 2001
-From: Shawn Lin <shawn.lin at rock-chips.com>
-Date: Thu, 2 Feb 2023 08:35:16 +0800
-Subject: [PATCH] mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for
- rockchip platform
-
-For Rockchip platform, DLL bypass bit and start bit need to be set if
-DLL is not locked. And adjust pre-change delay to 0x3 for better signal
-test result.
-
-Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
-Link: https://lore.kernel.org/r/1675298118-64243-2-git-send-email-shawn.lin at rock-chips.com
-Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -48,6 +48,7 @@
- #define DWCMSHC_EMMC_DLL_RXCLK_SRCSEL	29
- #define DWCMSHC_EMMC_DLL_START_POINT	16
- #define DWCMSHC_EMMC_DLL_INC		8
-+#define DWCMSHC_EMMC_DLL_BYPASS		BIT(24)
- #define DWCMSHC_EMMC_DLL_DLYENA		BIT(27)
- #define DLL_TXCLK_TAPNUM_DEFAULT	0x10
- #define DLL_TXCLK_TAPNUM_90_DEGREES	0xA
-@@ -60,6 +61,7 @@
- #define DLL_RXCLK_NO_INVERTER		1
- #define DLL_RXCLK_INVERTER		0
- #define DLL_CMDOUT_TAPNUM_90_DEGREES	0x8
-+#define DLL_RXCLK_ORI_GATE		BIT(31)
- #define DLL_CMDOUT_TAPNUM_FROM_SW	BIT(24)
- #define DLL_CMDOUT_SRC_CLK_NEG		BIT(28)
- #define DLL_CMDOUT_EN_SRC_CLK_NEG	BIT(29)
-@@ -234,9 +236,12 @@ static void dwcmshc_rk3568_set_clock(str
- 	sdhci_writel(host, extra, reg);
- 
- 	if (clock <= 52000000) {
--		/* Disable DLL and reset both of sample and drive clock */
--		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_CTRL);
--		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_RXCLK);
-+		/*
-+		 * Disable DLL and reset both of sample and drive clock.
-+		 * The bypass bit and start bit need to be set if DLL is not locked.
-+		 */
-+		sdhci_writel(host, DWCMSHC_EMMC_DLL_BYPASS | DWCMSHC_EMMC_DLL_START, DWCMSHC_EMMC_DLL_CTRL);
-+		sdhci_writel(host, DLL_RXCLK_ORI_GATE, DWCMSHC_EMMC_DLL_RXCLK);
- 		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_TXCLK);
- 		sdhci_writel(host, 0, DECMSHC_EMMC_DLL_CMDOUT);
- 		/*
-@@ -279,7 +284,7 @@ static void dwcmshc_rk3568_set_clock(str
- 	}
- 
- 	extra = 0x1 << 16 | /* tune clock stop en */
--		0x2 << 17 | /* pre-change delay */
-+		0x3 << 17 | /* pre-change delay */
- 		0x3 << 19;  /* post-change delay */
- 	sdhci_writel(host, extra, dwc_priv->vendor_specific_area1 + DWCMSHC_EMMC_ATCTRL);
- 
diff --git a/target/linux/rockchip/patches-6.6/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch b/target/linux/rockchip/patches-6.6/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
deleted file mode 100644
index 9d9c1b5c1c..0000000000
--- a/target/linux/rockchip/patches-6.6/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 49502408007b77ff290ce62e6218cefaeedcb31a Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul at gmail.com>
-Date: Thu, 9 Mar 2023 17:03:49 -0800
-Subject: [PATCH] mmc: sdhci-of-dwcmshc: properly determine max clock on
- Rockchip
-
-Currently .get_max_clock returns the current clock rate for cclk_emmc
-on rk35xx, thus max clock gets set to whatever bootloader set it to.
-
-In case of u-boot, it is intentionally reset to 50 MHz if it boots
-from eMMC, see mmc_deinit() in u-boot sources. As a result, HS200 and
-HS400 modes are never selected by Linux, because dwcmshc_rk35xx_postinit
-clears appropriate caps if host->mmc->f_max is < 52MHz
-
-cclk_emmc is not a fixed clock on rk35xx, so using
-sdhci_pltfm_clk_get_max_clock is not appropriate here.
-
-Implement rk35xx_get_max_clock that returns actual max clock for cclk_emmc.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Acked-by: Adrian Hunter <adrian.hunter at intel.com>
-Link: https://lore.kernel.org/r/20230310010349.509132-1-anarsoul at gmail.com
-Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -126,6 +126,13 @@ static unsigned int dwcmshc_get_max_cloc
- 		return pltfm_host->clock;
- }
- 
-+static unsigned int rk35xx_get_max_clock(struct sdhci_host *host)
-+{
-+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-+
-+	return clk_round_rate(pltfm_host->clk, ULONG_MAX);
-+}
-+
- static void dwcmshc_check_auto_cmd23(struct mmc_host *mmc,
- 				     struct mmc_request *mrq)
- {
-@@ -343,7 +350,7 @@ static const struct sdhci_ops sdhci_dwcm
- 	.set_clock		= dwcmshc_rk3568_set_clock,
- 	.set_bus_width		= sdhci_set_bus_width,
- 	.set_uhs_signaling	= dwcmshc_set_uhs_signaling,
--	.get_max_clock		= sdhci_pltfm_clk_get_max_clock,
-+	.get_max_clock		= rk35xx_get_max_clock,
- 	.reset			= rk35xx_sdhci_reset,
- 	.adma_write_desc	= dwcmshc_adma_write_desc,
- };
diff --git a/target/linux/rockchip/patches-6.6/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch b/target/linux/rockchip/patches-6.6/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
deleted file mode 100644
index 049c8ad1af..0000000000
--- a/target/linux/rockchip/patches-6.6/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 004589ff9df5b75672a78b6c3c4cba93202b14c9 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 25 Mar 2023 15:40:20 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C
-
-The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC
-chip changed from rtl8211e to yt8521s, and otherwise identical to R2S.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230325074022.9818-3-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |  1 +
- .../boot/dts/rockchip/rk3328-nanopi-r2c.dts   | 40 +++++++++++++++++++
- 2 files changed, 41 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a9
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
-@@ -0,0 +1,40 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+/*
-+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
-+ * (http://www.friendlyarm.com)
-+ *
-+ * Copyright (c) 2021-2023 Tianling Shen <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include "rk3328-nanopi-r2s.dts"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R2C";
-+	compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
-+};
-+
-+&gmac2io {
-+	phy-handle = <&yt8521s>;
-+	tx_delay = <0x22>;
-+	rx_delay = <0x12>;
-+
-+	mdio {
-+		/delete-node/ ethernet-phy at 1;
-+
-+		yt8521s: ethernet-phy at 3 {
-+			compatible = "ethernet-phy-ieee802.3-c22";
-+			reg = <3>;
-+
-+			motorcomm,clk-out-frequency-hz = <125000000>;
-+			motorcomm,keep-pll-enabled;
-+			motorcomm,auto-sleep-disabled;
-+
-+			pinctrl-0 = <&eth_phy_reset_pin>;
-+			pinctrl-names = "default";
-+			reset-assert-us = <10000>;
-+			reset-deassert-us = <50000>;
-+			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch b/target/linux/rockchip/patches-6.6/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
deleted file mode 100644
index 4e48218b89..0000000000
--- a/target/linux/rockchip/patches-6.6/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
+++ /dev/null
@@ -1,407 +0,0 @@
-From 51712e1d014aaaa4c6e1e7e84932d58b5c0f59ed Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sat, 3 Dec 2022 15:41:49 +0800
-Subject: [PATCH] arm64: dts: rockchip: rk3328: Add 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.
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Link: https://lore.kernel.org/r/20221203074149.11543-3-amadeus at jmu.edu.cn
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../dts/rockchip/rk3328-orangepi-r1-plus.dts  | 373 ++++++++++++++++++
- 2 files changed, 374 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <mail at david-bauer.net>
-+ */
-+
-+/dts-v1/;
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+#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 = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-1 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "heartbeat";
-+		};
-+
-+		led-2 {
-+			function = LED_FUNCTION_WAN;
-+			color = <LED_COLOR_ID_GREEN>;
-+			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 at 1 {
-+			reg = <1>;
-+			pinctrl-0 = <&eth_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 at 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 at 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 at 2 {
-+		compatible = "usbbda,8153";
-+		reg = <2>;
-+	};
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host0_ohci {
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.6/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch b/target/linux/rockchip/patches-6.6/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
deleted file mode 100644
index 78d3d51a17..0000000000
--- a/target/linux/rockchip/patches-6.6/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 387b3bbac5ea6a0a105d685237f033ffe0f184f1 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 25 Mar 2023 15:40:22 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add Xunlong OrangePi 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 otherwise
-identical to OrangePi R1 Plus.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230325074022.9818-5-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |  1 +
- .../rockchip/rk3328-orangepi-r1-plus-lts.dts  | 40 +++++++++++++++++++
- 2 files changed, 41 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
-+ */
-+
-+/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 at 1;
-+
-+		yt8531c: ethernet-phy at 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 = <&eth_phy_reset_pin>;
-+			pinctrl-names = "default";
-+			reset-assert-us = <15000>;
-+			reset-deassert-us = <50000>;
-+			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch b/target/linux/rockchip/patches-6.6/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
deleted file mode 100644
index 3d502a65b6..0000000000
--- a/target/linux/rockchip/patches-6.6/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
+++ /dev/null
@@ -1,754 +0,0 @@
-From c6629b9a6738a64507478527da6c7b83c10a6d2c Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul at gmail.com>
-Date: Tue, 7 Mar 2023 22:32:40 -0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyElec Nanopi R5S
-
-FriendlyElec 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
-
-Based on Tianling Shen's <cnsztl at gmail.com> work.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Link: https://lore.kernel.org/r/20230308063240.107178-2-anarsoul at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 713 ++++++++++++++++++
- 2 files changed, 714 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -74,4 +74,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -0,0 +1,713 @@
-+// 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 <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#include "rk3568.dtsi"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R5S";
-+	compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568";
-+
-+	aliases {
-+		ethernet0 = &gmac0;
-+		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>;
-+			};
-+		};
-+	};
-+
-+	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 = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			function-enumerator = <1>;
-+			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-lan2 {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			function-enumerator = <2>;
-+			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		power_led: led-power {
-+			color = <LED_COLOR_ID_RED>;
-+			function = LED_FUNCTION_POWER;
-+			linux,default-trigger = "heartbeat";
-+			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_WAN;
-+			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+
-+	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>;
-+};
-+
-+&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-id";
-+	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";
-+};
-+
-+&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 at 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 at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#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-always-on;
-+				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 at 51 {
-+		compatible = "haoyu,hym8563";
-+		reg = <0x51>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <0>;
-+		clock-output-names = "rtcic_32kout";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&hym8563_int>;
-+		wakeup-source;
-+	};
-+};
-+
-+&i2s0_8ch {
-+	status = "okay";
-+};
-+
-+&i2s1_8ch {
-+	rockchip,trcm-sync-tx-only;
-+	status = "okay";
-+};
-+
-+&mdio0 {
-+	rgmii_phy0: ethernet-phy at 1 {
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <1>;
-+		pinctrl-0 = <&eth_phy0_reset_pin>;
-+		pinctrl-names = "default";
-+		reset-assert-us = <10000>;
-+		reset-deassert-us = <50000>;
-+		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
-+	};
-+};
-+
-+&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_down>;
-+		};
-+	};
-+
-+	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>;
-+		};
-+	};
-+
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch b/target/linux/rockchip/patches-6.6/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
deleted file mode 100644
index cf9fe06ad0..0000000000
--- a/target/linux/rockchip/patches-6.6/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
+++ /dev/null
@@ -1,1226 +0,0 @@
-From c8ec73b05a95d9f0969ae0f28dd8799a54fcdfc7 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:41 +0800
-Subject: [PATCH] arm64: dts: rockchip: create common dtsi for NanoPi R5 series
-
-Create common dtsi for the FriendlyElec NanoPi R5 series.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-2-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 575 +----------------
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dtsi  | 596 ++++++++++++++++++
- 2 files changed, 597 insertions(+), 574 deletions(-)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -7,12 +7,7 @@
-  */
- 
- /dts-v1/;
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/input/input.h>
--#include <dt-bindings/leds/common.h>
--#include <dt-bindings/pinctrl/rockchip.h>
--#include <dt-bindings/soc/rockchip,vop2.h>
--#include "rk3568.dtsi"
-+#include "rk3568-nanopi-r5s.dtsi"
- 
- / {
- 	model = "FriendlyElec NanoPi R5S";
-@@ -20,23 +15,6 @@
- 
- 	aliases {
- 		ethernet0 = &gmac0;
--		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>;
--			};
--		};
- 	};
- 
- 	gpio-leds {
-@@ -71,130 +49,6 @@
- 			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
- 		};
- 	};
--
--	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>;
- };
- 
- &gmac0 {
-@@ -219,292 +73,6 @@
- 	status = "okay";
- };
- 
--&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 at 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 at 20 {
--		compatible = "rockchip,rk809";
--		reg = <0x20>;
--		interrupt-parent = <&gpio0>;
--		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
--		#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-always-on;
--				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 at 51 {
--		compatible = "haoyu,hym8563";
--		reg = <0x51>;
--		interrupt-parent = <&gpio0>;
--		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
--		#clock-cells = <0>;
--		clock-output-names = "rtcic_32kout";
--		pinctrl-names = "default";
--		pinctrl-0 = <&hym8563_int>;
--		wakeup-source;
--	};
--};
--
--&i2s0_8ch {
--	status = "okay";
--};
--
--&i2s1_8ch {
--	rockchip,trcm-sync-tx-only;
--	status = "okay";
--};
--
- &mdio0 {
- 	rgmii_phy0: ethernet-phy at 1 {
- 		compatible = "ethernet-phy-ieee802.3-c22";
-@@ -568,146 +136,5 @@
- 			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
- 		};
- 	};
--
--	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 at ROCKCHIP_VOP2_EP_HDMI0 {
--		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
--		remote-endpoint = <&hdmi_in_vp0>;
--	};
--};
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-@@ -0,0 +1,596 @@
-+// 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 <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#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 at 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 at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#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-always-on;
-+				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 at 51 {
-+		compatible = "haoyu,hym8563";
-+		reg = <0x51>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <0>;
-+		clock-output-names = "rtcic_32kout";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&hym8563_int>;
-+		wakeup-source;
-+	};
-+};
-+
-+&i2s0_8ch {
-+	status = "okay";
-+};
-+
-+&i2s1_8ch {
-+	rockchip,trcm-sync-tx-only;
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch b/target/linux/rockchip/patches-6.6/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
deleted file mode 100644
index 47f76d54e7..0000000000
--- a/target/linux/rockchip/patches-6.6/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 31425b1fadb2040b359e52ffc24c049a78d56c96 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:44 +0800
-Subject: [PATCH] arm64: dts: rockchip: fix gmac support for NanoPi R5S
-
-- Changed phy-mode to rgmii.
-
-- Fixed pull type in pinctrl for gmac0.
-
-- Removed duplicate properties in mdio node.
-  These properties are defined in the gmac0 node already.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-5-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -57,7 +57,7 @@
- 	assigned-clock-rates = <0>, <125000000>;
- 	clock_in_out = "output";
- 	phy-handle = <&rgmii_phy0>;
--	phy-mode = "rgmii-id";
-+	phy-mode = "rgmii";
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&gmac0_miim
- 		     &gmac0_tx_bus2
-@@ -79,9 +79,6 @@
- 		reg = <1>;
- 		pinctrl-0 = <&eth_phy0_reset_pin>;
- 		pinctrl-names = "default";
--		reset-assert-us = <10000>;
--		reset-deassert-us = <50000>;
--		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
- 	};
- };
- 
-@@ -115,7 +112,7 @@
- &pinctrl {
- 	gmac0 {
- 		eth_phy0_reset_pin: eth-phy0-reset-pin {
--			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
-+			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
- 		};
- 	};
- 
diff --git a/target/linux/rockchip/patches-6.6/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch b/target/linux/rockchip/patches-6.6/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
deleted file mode 100644
index 48021b226a..0000000000
--- a/target/linux/rockchip/patches-6.6/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 975e9bbad11950fc8276f1fa260d8bf2c341aa41 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:45 +0800
-Subject: [PATCH] arm64: dts: rockchip: remove I2S1 TDM node for the NanoPi R5
- series
-
-This is for the audio output which does not exist on the boards.
-Also disable regulator-always-on for vccio_acodec since it's only
-used by the audio output.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-6-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi | 6 ------
- 1 file changed, 6 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-@@ -330,7 +330,6 @@
- 
- 			vccio_acodec: LDO_REG4 {
- 				regulator-name = "vccio_acodec";
--				regulator-always-on;
- 				regulator-min-microvolt = <3300000>;
- 				regulator-max-microvolt = <3300000>;
- 
-@@ -441,11 +440,6 @@
- 	status = "okay";
- };
- 
--&i2s1_8ch {
--	rockchip,trcm-sync-tx-only;
--	status = "okay";
--};
--
- &pcie30phy {
- 	data-lanes = <1 2>;
- 	status = "okay";
diff --git a/target/linux/rockchip/patches-6.6/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch b/target/linux/rockchip/patches-6.6/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
deleted file mode 100644
index 0465d80cba..0000000000
--- a/target/linux/rockchip/patches-6.6/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 05620031408ac6cfc6d5c048431827e49aa0ade1 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:43 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add 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
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-4-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-nanopi-r5c.dts   | 112 ++++++++++++++++++
- 2 files changed, 113 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -74,5 +74,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
-+ */
-+
-+/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 = <KEY_RESTART>;
-+		};
-+	};
-+
-+	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 = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		power_led: led-power {
-+			color = <LED_COLOR_ID_RED>;
-+			function = LED_FUNCTION_POWER;
-+			linux,default-trigger = "heartbeat";
-+			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_WAN;
-+			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wlan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			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>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch b/target/linux/rockchip/patches-6.6/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
deleted file mode 100644
index 0e59f0275b..0000000000
--- a/target/linux/rockchip/patches-6.6/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5325593377f07de31f7e473a9677a28a04c891f3 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Thu, 11 May 2023 00:18:50 +0800
-Subject: [PATCH] arm64: dts: rockchip: fix button reset pin for nanopi r5c
-
-The reset pin was wrongly assigned due to a copy/paste error,
-fix it to match actual gpio pin.
-
-While at it, remove a blank line from nanopi r5s dts.
-
-Fixes: 05620031408a ("arm64: dts: rockchip: Add FriendlyARM NanoPi R5C")
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230510161850.4866-1-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts | 2 +-
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 1 -
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-@@ -106,7 +106,7 @@
- 
- 	rockchip-key {
- 		reset_button_pin: reset-button-pin {
--			rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
-+			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
- 		};
- 	};
- };
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -134,4 +134,3 @@
- 		};
- 	};
- };
--
diff --git a/target/linux/rockchip/patches-6.6/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch b/target/linux/rockchip/patches-6.6/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
deleted file mode 100644
index 01efaa3a9d..0000000000
--- a/target/linux/rockchip/patches-6.6/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From fc5a80a432607d05e85bba37971712405f75c546 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 16 Dec 2023 12:07:23 +0800
-Subject: [PATCH] arm64: dts: rockchip: configure eth pad driver strength
- for orangepi r1 plus lts
-
-The default strength is not enough to provide stable connection
-under 3.3v LDO voltage.
-
-Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS")
-Cc: stable at vger.kernel.org # 6.6+
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20231216040723.17864-1-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-@@ -26,9 +26,11 @@
- 			compatible = "ethernet-phy-ieee802.3-c22";
- 			reg = <0>;
- 
-+			motorcomm,auto-sleep-disabled;
- 			motorcomm,clk-out-frequency-hz = <125000000>;
- 			motorcomm,keep-pll-enabled;
--			motorcomm,auto-sleep-disabled;
-+			motorcomm,rx-clk-drv-microamp = <5020>;
-+			motorcomm,rx-data-drv-microamp = <5020>;
- 
- 			pinctrl-0 = <&eth_phy_reset_pin>;
- 			pinctrl-names = "default";
diff --git a/target/linux/rockchip/patches-6.6/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch b/target/linux/rockchip/patches-6.6/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
deleted file mode 100644
index b4a68d1558..0000000000
--- a/target/linux/rockchip/patches-6.6/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From 096ebfb74b19f2d4bdcbc33ae02e857ff4b3e0a0 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Thu, 12 Jan 2023 16:29:02 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
-
-Radxa Compute Module 3(CM3) IO board is an application board from Radxa
-and is compatible with Raspberry Pi CM4 IO form factor.
-
-Specification:
-- 1x HDMI,
-- 2x MIPI DSI
-- 2x MIPI CSI2
-- 1x eDP
-- 1x PCIe card
-- 2x SATA
-- 2x USB 2.0 Host
-- 1x USB 3.0
-- 1x USB 2.0 OTG
-- Phone jack
-- microSD slot
-- 40-pin GPIO expansion header
-- 12V DC
-
-Radxa CM3 needs to mount on top of this IO board in order to create
-complete Radxa CM3 IO board platform.
-
-Add support for Radxa CM3 IO Board.
-
-Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
-Co-developed-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230112105902.192852-3-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 179 ++++++++++++++++++
- 2 files changed, 180 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pi
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -0,0 +1,179 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (c) 2022 Radxa Limited
-+ * Copyright (c) 2022 Amarula Solutions(India)
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#include "rk3566.dtsi"
-+#include "rk3566-radxa-cm3.dtsi"
-+
-+/ {
-+	model = "Radxa Compute Module 3(CM3) IO Board";
-+	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
-+
-+	aliases {
-+		mmc1 = &sdmmc0;
-+	};
-+
-+	chosen: chosen {
-+		stdout-path = "serial2:1500000n8";
-+	};
-+
-+	hdmi-con {
-+		compatible = "hdmi-connector";
-+		type = "a";
-+
-+		port {
-+			hdmi_con_in: endpoint {
-+				remote-endpoint = <&hdmi_out_con>;
-+			};
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-1 {
-+			gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_ACTIVITY;
-+			linux,default-trigger = "heartbeat";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&pi_nled_activity>;
-+		};
-+	};
-+
-+	vcc5v0_usb30: vcc5v0-usb30-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc5v0_usb30";
-+		enable-active-high;
-+		gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&vcc5v0_usb30_en_h>;
-+		regulator-always-on;
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc_sys>;
-+	};
-+
-+	vcca1v8_image: vcca1v8-image-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca1v8_image";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+
-+	vdda0v9_image: vdda0v9-image-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca0v9_image";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <900000>;
-+		regulator-max-microvolt = <900000>;
-+		vin-supply = <&vdda_0v9>;
-+	};
-+};
-+
-+&combphy1 {
-+	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";
-+};
-+
-+&pinctrl {
-+	leds {
-+		pi_nled_activity: pi-nled-activity {
-+			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	sdcard {
-+		sdmmc_pwren: sdmmc-pwren {
-+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	usb {
-+		vcc5v0_usb30_en_h: vcc5v0-host-en-h {
-+			rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&sdmmc0 {
-+	bus-width = <4>;
-+	cap-mmc-highspeed;
-+	cap-sd-highspeed;
-+	disable-wp;
-+	vqmmc-supply = <&vccio_sd>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_pwren>;
-+	status = "okay";
-+};
-+
-+&uart2 {
-+	status = "okay";
-+};
-+
-+&usb2phy0_host {
-+	phy-supply = <&vcc5v0_usb30>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_host {
-+	status = "okay";
-+};
-+
-+&usb2phy1_otg {
-+	status = "okay";
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host1_xhci {
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.6/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch b/target/linux/rockchip/patches-6.6/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
deleted file mode 100644
index d0a0aa1b69..0000000000
--- a/target/linux/rockchip/patches-6.6/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d211665c5a833873ee37e501af58adbf028e6b5f Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 13 May 2023 21:53:07 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C Plus
-
-The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
-eMMC flash (8G) included.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230513135307.26554-2-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile              |  1 +
- .../boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts   | 33 ++++++++++++++++++++++
- 2 files changed, 34 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
-@@ -0,0 +1,33 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+/*
-+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
-+ * (http://www.friendlyarm.com)
-+ *
-+ * Copyright (c) 2023 Tianling Shen <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include "rk3328-nanopi-r2c.dts"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R2C Plus";
-+	compatible = "friendlyarm,nanopi-r2c-plus", "rockchip,rk3328";
-+
-+	aliases {
-+		mmc1 = &emmc;
-+	};
-+};
-+
-+&emmc {
-+	bus-width = <8>;
-+	cap-mmc-highspeed;
-+	max-frequency = <150000000>;
-+	mmc-ddr-1_8v;
-+	mmc-hs200-1_8v;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
-+	vmmc-supply = <&vcc_io_33>;
-+	vqmmc-supply = <&vcc18_emmc>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.6/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch b/target/linux/rockchip/patches-6.6/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
deleted file mode 100644
index 305b5702d5..0000000000
--- a/target/linux/rockchip/patches-6.6/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From cc52bfc04726a574fc4440bbbe0c710890e7040a Mon Sep 17 00:00:00 2001
-From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Date: Wed, 25 Jan 2023 21:40:22 +0530
-Subject: [PATCH] arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO
-
-Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board.
-
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230125161023.12115-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 93 +++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -21,6 +21,13 @@
- 		stdout-path = "serial2:1500000n8";
- 	};
- 
-+	gmac1_clkin: external-gmac1-clock {
-+		compatible = "fixed-clock";
-+		clock-frequency = <125000000>;
-+		clock-output-names = "gmac1_clkin";
-+		#clock-cells = <0>;
-+	};
-+
- 	hdmi-con {
- 		compatible = "hdmi-connector";
- 		type = "a";
-@@ -83,6 +90,29 @@
- 	status = "okay";
- };
- 
-+&gmac1 {
-+	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
-+	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
-+	assigned-clock-rates = <0>, <125000000>;
-+	clock_in_out = "input";
-+	phy-handle = <&rgmii_phy1>;
-+	phy-mode = "rgmii";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac1m0_miim
-+		     &gmac1m0_tx_bus2
-+		     &gmac1m0_rx_bus2
-+		     &gmac1m0_rgmii_clk
-+		     &gmac1m0_rgmii_bus
-+		     &gmac1m0_clkinout>;
-+	snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
-+	snps,reset-active-low;
-+	/* Reset time is 20ms, 100ms for rtl8211f */
-+	snps,reset-delays-us = <0 20000 100000>;
-+	tx_delay = <0x46>;
-+	rx_delay = <0x2e>;
-+	status = "okay";
-+};
-+
- &hdmi {
- 	avdd-0v9-supply = <&vdda0v9_image>;
- 	avdd-1v8-supply = <&vcca1v8_image>;
-@@ -105,7 +135,70 @@
- 	status = "okay";
- };
- 
-+&mdio1 {
-+	rgmii_phy1: ethernet-phy at 0 {
-+		compatible="ethernet-phy-ieee802.3-c22";
-+		reg= <0x0>;
-+	};
-+};
-+
- &pinctrl {
-+	gmac1 {
-+		gmac1m0_miim: gmac1m0-miim {
-+			rockchip,pins =
-+				/* gmac1_mdcm0 */
-+				<3 RK_PC4 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_mdiom0 */
-+				<3 RK_PC5 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rx_bus2: gmac1m0-rx-bus2 {
-+			rockchip,pins =
-+				/* gmac1_rxd0m0 */
-+				<3 RK_PB1 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxd1m0 */
-+				<3 RK_PB2 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxdvcrsm0 */
-+				<3 RK_PB3 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_tx_bus2: gmac1m0-tx-bus2 {
-+			rockchip,pins =
-+				/* gmac1_txd0m0 */
-+				<3 RK_PB5 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd1m0 */
-+				<3 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txenm0 */
-+				<3 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rgmii_clk: gmac1m0-rgmii-clk {
-+			rockchip,pins =
-+				/* gmac1_rxclkm0 */
-+				<3 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txclkm0 */
-+				<3 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rgmii_bus: gmac1m0-rgmii-bus {
-+			rockchip,pins =
-+				/* gmac1_rxd2m0 */
-+				<3 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxd3m0 */
-+				<3 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd2m0 */
-+				<3 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd3m0 */
-+				<3 RK_PA3 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_clkinout: gmac1m0-clkinout {
-+			rockchip,pins =
-+				/* gmac1_mclkinoutm0 */
-+				<3 RK_PC0 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+	};
-+
- 	leds {
- 		pi_nled_activity: pi-nled-activity {
- 			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
diff --git a/target/linux/rockchip/patches-6.6/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch b/target/linux/rockchip/patches-6.6/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
deleted file mode 100644
index e53f7fa7e0..0000000000
--- a/target/linux/rockchip/patches-6.6/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
+++ /dev/null
@@ -1,386 +0,0 @@
-From 7469ab529bcad50490f6ff651c3e4f03bfa88fe0 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Thu, 12 Jan 2023 16:29:01 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Radxa Compute Module 3(CM3) is one of the modules from a series
-System On Module based on the Radxa ROCK 3 series and is compatible
-with Raspberry Pi CM4 pinout and form factor.
-
-Specification:
-- Rockchip RK3566
-- up to 8GB LPDDR4
-- up to 128GB high performance eMMC
-- Optional wireless LAN, 2.4GHz and 5.0GHz IEEE 802.11b/g/n/ac wireless,
-  BT 5.0, BLE with onboard and external antenna.
-- Gigabit Ethernet PHY
-
-Radxa CM3 needs to mount on top of this IO board in order to create
-complete Radxa CM3 IO board platform.
-
-Since Radxa CM3 is compatible with Raspberry Pi CM4 pinout so it is
-possible to mount Radxa CM3 on top of the?Rasberry Pi CM4 IO board.
-
-Add support for Radxa CM3.
-
-Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230112105902.192852-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 345 ++++++++++++++++++
- 1 file changed, 345 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -0,0 +1,345 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (c) 2022 Radxa Limited
-+ * Copyright (c) 2022 Amarula Solutions(India)
-+ */
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
-+
-+	aliases {
-+		mmc0 = &sdhci;
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-0 {
-+			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_STATUS;
-+			linux,default-trigger = "timer";
-+			default-state = "on";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&user_led2>;
-+		};
-+	};
-+
-+	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>;
-+	};
-+
-+	vcc_1v8: vcc-1v8-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc_1v8";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+
-+	vcc_3v3: vcc-3v3-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc_3v3";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_sys>;
-+	};
-+
-+	vcca_1v8: vcca-1v8-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca_1v8";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+};
-+
-+&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_npu>;
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+
-+	vdd_cpu: regulator at 1c {
-+		compatible = "tcs,tcs4525";
-+		reg = <0x1c>;
-+		fcs,suspend-voltage-selector = <1>;
-+		regulator-name = "vdd_cpu";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <712500>;
-+		regulator-max-microvolt = <1390000>;
-+		regulator-ramp-delay = <2300>;
-+		vin-supply = <&vcc_sys>;
-+
-+		regulator-state-mem {
-+			regulator-off-in-suspend;
-+		};
-+	};
-+
-+	rk817: pmic at 20 {
-+		compatible = "rockchip,rk817";
-+		reg = <0x20>;
-+		#clock-cells = <1>;
-+		clock-output-names = "rk817-clkout1", "rk817-clkout2";
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pmic_int_l>;
-+		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_sys>;
-+		vcc6-supply = <&vcc_sys>;
-+		vcc7-supply = <&vcc_sys>;
-+
-+		regulators {
-+			vdd_logic: DCDC_REG1 {
-+				regulator-name = "vdd_logic";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-initial-mode = <0x2>;
-+				regulator-min-microvolt = <500000>;
-+				regulator-max-microvolt = <1350000>;
-+				regulator-ramp-delay = <6001>;
-+				regulator-state-mem {
-+					regulator-on-in-suspend;
-+					regulator-suspend-microvolt = <900000>;
-+				};
-+			};
-+
-+			vdd_gpu_npu: DCDC_REG2 {
-+				regulator-name = "vdd_gpu_npu";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				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;
-+				};
-+			};
-+
-+			vcc3v3_sys: DCDC_REG4 {
-+				regulator-name = "vcc3v3_sys";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-initial-mode = <0x2>;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-state-mem {
-+					regulator-on-in-suspend;
-+					regulator-suspend-microvolt = <3300000>;
-+				};
-+			};
-+
-+			vcca1v8_pmu: LDO_REG1 {
-+				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>;
-+				};
-+			};
-+
-+			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-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vccio_sd: LDO_REG5 {
-+				regulator-name = "vccio_sd";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				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>;
-+				};
-+			};
-+
-+			vcc_1v8_p: LDO_REG7 {
-+				regulator-name = "vcc_1v8_p";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vcc1v8_dvp: LDO_REG8 {
-+				regulator-name = "vcc1v8_dvp";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vcc2v8_dvp: LDO_REG9 {
-+				regulator-name = "vcc2v8_dvp";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <2800000>;
-+				regulator-max-microvolt = <2800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+		};
-+	};
-+};
-+
-+&pinctrl {
-+	pmic {
-+		pmic_int_l: pmic-int-l {
-+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-+		};
-+	};
-+
-+	leds {
-+		user_led2: user-led2 {
-+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&pmu_io_domains {
-+	pmuio1-supply = <&vcc3v3_pmu>;
-+	pmuio2-supply = <&vcc_3v3>;
-+	vccio1-supply = <&vccio_acodec>;
-+	vccio2-supply = <&vcc_1v8>;
-+	vccio3-supply = <&vccio_sd>;
-+	vccio4-supply = <&vcc_1v8>;
-+	vccio5-supply = <&vcc_3v3>;
-+	vccio6-supply = <&vcc_3v3>;
-+	vccio7-supply = <&vcc_3v3>;
-+	status = "okay";
-+};
-+
-+&saradc {
-+	vref-supply = <&vcca_1v8>;
-+	status = "okay";
-+};
-+
-+&sdhci {
-+	bus-width = <8>;
-+	max-frequency = <200000000>;
-+	mmc-hs200-1_8v;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+};
-+
-+&usb2phy0 {
-+	status = "okay";
-+};
-+
-+&usb2phy1 {
-+	status = "okay";
-+};
-+
-+&tsadc {
-+	rockchip,hw-tshut-mode = <1>;
-+	rockchip,hw-tshut-polarity = <0>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.6/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
deleted file mode 100644
index 9855b9e1a6..0000000000
--- a/target/linux/rockchip/patches-6.6/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From af5a803bf212e077e5fb7a1d4cf6be02f74a74ca Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Wed, 25 Jan 2023 21:40:23 +0530
-Subject: [PATCH] arm64: dts: rockchip: rk3566: Enable WiFi, BT support for
- Radxa CM3
-
-Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module.
-
-Add nodes for enabling it.
-
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 80 +++++++++++++++++++
- 1 file changed, 80 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -66,6 +66,15 @@
- 		regulator-max-microvolt = <1800000>;
- 		vin-supply = <&vcc_1v8_p>;
- 	};
-+
-+	sdio_pwrseq: pwrseq-sdio {
-+		compatible = "mmc-pwrseq-simple";
-+		clocks = <&rk817 1>;
-+		clock-names = "ext_clock";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&wifi_reg_on_h>;
-+		reset-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>;
-+	};
- };
- 
- &cpu0 {
-@@ -287,6 +296,20 @@
- };
- 
- &pinctrl {
-+	bluetooth {
-+		bt_host_wake_h: bt-host-wake-h {
-+			rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		bt_reg_on_h: bt-reg-on-h {
-+			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		bt_wake_host_h: bt-wake-host-h {
-+			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
- 	pmic {
- 		pmic_int_l: pmic-int-l {
- 			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-@@ -298,6 +321,16 @@
- 			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
- 		};
- 	};
-+
-+	wifi {
-+		wifi_reg_on_h: wifi-reg-on-h {
-+			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		wifi_host_wake_h: wifi-host-wake-h {
-+			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
- };
- 
- &pmu_io_domains {
-@@ -318,6 +351,34 @@
- 	status = "okay";
- };
- 
-+&sdmmc1 {
-+	#address-cells = <1>;
-+	#size-cells = <0>;
-+	bus-width = <4>;
-+	disable-wp;
-+	cap-sd-highspeed;
-+	cap-sdio-irq;
-+	keep-power-in-suspend;
-+	mmc-pwrseq = <&sdio_pwrseq>;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;
-+	sd-uhs-sdr104;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+
-+	wifi at 1 {
-+		compatible = "brcm,bcm43455-fmac";
-+		reg = <1>;
-+		interrupt-parent = <&gpio2>;
-+		interrupts = <RK_PC1 IRQ_TYPE_LEVEL_HIGH>;
-+		interrupt-names = "host-wake";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&wifi_host_wake_h>;
-+	};
-+};
-+
- &sdhci {
- 	bus-width = <8>;
- 	max-frequency = <200000000>;
-@@ -330,6 +391,25 @@
- 	status = "okay";
- };
- 
-+&uart1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart1m0_ctsn &uart1m0_rtsn &uart1m0_xfer>;
-+	status = "okay";
-+
-+	bluetooth {
-+		compatible = "brcm,bcm4345c5";
-+		clocks = <&rk817 1>;
-+		clock-names = "lpo";
-+		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
-+		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
-+		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
-+		vbat-supply = <&vcc_3v3>;
-+		vddio-supply = <&vcc_1v8>;
-+	};
-+};
-+
- &usb2phy0 {
- 	status = "okay";
- };
diff --git a/target/linux/rockchip/patches-6.6/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
deleted file mode 100644
index bfd6dbe0db..0000000000
--- a/target/linux/rockchip/patches-6.6/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 477ed3ade6a46e445b4e2348b710c51df4f6f4b1 Mon Sep 17 00:00:00 2001
-From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Date: Thu, 23 Feb 2023 19:29:29 +0530
-Subject: [PATCH] arm64: dts: rockchip: Enable USB OTG for rk3566 Radxa CM3
-
-Enable USB OTG support for Radxa Compute Module 3 IO Board
-
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230223135929.630787-1-abbaraju.manojsai at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -254,6 +254,14 @@
- 	status = "okay";
- };
- 
-+&usb2phy0_otg {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	status = "okay";
-+};
-+
- &vop {
- 	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
- 	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
diff --git a/target/linux/rockchip/patches-6.6/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.6/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
deleted file mode 100644
index e7e3ea0100..0000000000
--- a/target/linux/rockchip/patches-6.6/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 8f19828844f20b22182719cf53be64f8c955aee8 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:50 +0530
-Subject: [PATCH] arm64: dts: rockchip: Fix compatible for Radxa CM3
-
-The compatible string "radxa,radxa-cm3" referring the product name
-as "Radxa Radxa CM3" but the actual product name is "Radxa CM3".
-
-Fix the compatible strings.
-
-Fixes: 24a28d3eb07d ("dt-bindings: arm: rockchip: Add Radxa Compute Module 3")
-Fixes: 7469ab529bca ("arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3")
-Fixes: 096ebfb74b19 ("arm64: dts: rockchip: Add Radxa Compute Module 3 IO board")
-Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20230123071654.73139-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 2 +-
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -11,7 +11,7 @@
- 
- / {
- 	model = "Radxa Compute Module 3(CM3) IO Board";
--	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
-+	compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
- 
- 	aliases {
- 		mmc1 = &sdmmc0;
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -8,7 +8,7 @@
- #include <dt-bindings/leds/common.h>
- 
- / {
--	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
-+	compatible = "radxa,cm3", "rockchip,rk3566";
- 
- 	aliases {
- 		mmc0 = &sdhci;
diff --git a/target/linux/rockchip/patches-6.6/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch b/target/linux/rockchip/patches-6.6/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
deleted file mode 100644
index 8342c14ea4..0000000000
--- a/target/linux/rockchip/patches-6.6/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f99a75f11f46a24dabb33e90893eebf61dca0566 Mon Sep 17 00:00:00 2001
-From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Date: Sun, 2 Jul 2023 20:52:42 +0200
-Subject: [PATCH] arm64: dts: rockchip: minor whitespace cleanup around '='
-
-The DTS code coding style expects exactly one space before and after '='
-sign.
-
-Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20230702185242.44421-1-krzysztof.kozlowski at linaro.org
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts    |  4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -137,8 +137,8 @@
- 
- &mdio1 {
- 	rgmii_phy1: ethernet-phy at 0 {
--		compatible="ethernet-phy-ieee802.3-c22";
--		reg= <0x0>;
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <0x0>;
- 	};
- };
- 
diff --git a/target/linux/rockchip/patches-6.6/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch b/target/linux/rockchip/patches-6.6/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
deleted file mode 100644
index 354c546d7e..0000000000
--- a/target/linux/rockchip/patches-6.6/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
+++ /dev/null
@@ -1,689 +0,0 @@
-From 2bf2f4d9f673013a58109626b87329310537a611 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Fri, 9 Dec 2022 18:25:24 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add Radxa CM3I E25
-
-Radxa E25 is a network application carrier board for the Radxa CM3
-Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC.
-
-It has the following features:
-
-- MicroSD card socket, on board eMMC flash
-- 2x 2.5GbE Realtek RTL8125B Ethernet transceiver
-- 1x USB Type-C port (Power and Serial console)
-- 1x USB 3.0 OTG port
-- mini PCIe socket (USB or PCIe)
-- ngff PCIe socket (USB or SATA)
-- 1x User LED and 16x RGB LEDs
-- 26-pin expansion header
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Link: https://lore.kernel.org/r/20221209102524.129367-3-amadeus at jmu.edu.cn
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-radxa-cm3i.dtsi  | 416 ++++++++++++++++++
- .../boot/dts/rockchip/rk3568-radxa-e25.dts    | 229 ++++++++++
- 3 files changed, 646 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -78,4 +78,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
-@@ -0,0 +1,416 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include "rk3568.dtsi"
-+
-+/ {
-+	model = "Radxa CM3 Industrial Board";
-+	compatible = "radxa,cm3i", "rockchip,rk3568";
-+
-+	aliases {
-+		mmc0 = &sdhci;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial2:115200n8";
-+	};
-+
-+	gpio-leds {
-+		compatible = "gpio-leds";
-+
-+		led_user: led-0 {
-+			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
-+			function = LED_FUNCTION_HEARTBEAT;
-+			color = <LED_COLOR_ID_GREEN>;
-+			linux,default-trigger = "heartbeat";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&led_user_en>;
-+		};
-+	};
-+
-+	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>;
-+	};
-+
-+	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 = <&vcc5v_input>;
-+	};
-+
-+	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 = <&vcc5v_input>;
-+	};
-+
-+	/* labeled +5v_input in schematic */
-+	vcc5v_input: vcc5v-input-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc5v_input";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+	};
-+};
-+
-+&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>;
-+};
-+
-+&display_subsystem {
-+	status = "disabled";
-+};
-+
-+&gpu {
-+	mali-supply = <&vdd_gpu>;
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+
-+	vdd_cpu: regulator at 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 = <&vcc5v_input>;
-+
-+		regulator-state-mem {
-+			regulator-off-in-suspend;
-+		};
-+	};
-+
-+	rk809: pmic at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <1>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pmic_int>;
-+		rockchip,system-power-controller;
-+		wakeup-source;
-+
-+		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>;
-+
-+		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 = <900000>;
-+				regulator-max-microvolt = <900000>;
-+
-+				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-always-on;
-+				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-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+		};
-+	};
-+};
-+
-+&pinctrl {
-+	leds {
-+		led_user_en: led_user_en {
-+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	pmic {
-+		pmic_int: pmic_int {
-+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-+		};
-+	};
-+};
-+
-+&pmu_io_domains {
-+	pmuio1-supply = <&vcc3v3_pmu>;
-+	pmuio2-supply = <&vcc3v3_pmu>;
-+	vccio1-supply = <&vccio_acodec>;
-+	vccio2-supply = <&vcc_1v8>;
-+	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 &emmc_datastrobe>;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+};
-+
-+&tsadc {
-+	rockchip,hw-tshut-mode = <1>;
-+	rockchip,hw-tshut-polarity = <0>;
-+	status = "okay";
-+};
-+
-+&uart2 {
-+	status = "okay";
-+};
-+
-+&usb2phy0 {
-+	status = "okay";
-+};
-+
-+&usb2phy1 {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	extcon = <&usb2phy0>;
-+};
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -0,0 +1,229 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+
-+/dts-v1/;
-+#include "rk3568-radxa-cm3i.dtsi"
-+
-+/ {
-+	model = "Radxa E25";
-+	compatible = "radxa,e25", "rockchip,rk3568";
-+
-+	aliases {
-+		mmc0 = &sdmmc0;
-+		mmc1 = &sdhci;
-+	};
-+
-+	pwm-leds {
-+		compatible = "pwm-leds-multicolor";
-+
-+		multi-led {
-+			color = <LED_COLOR_ID_RGB>;
-+			max-brightness = <255>;
-+
-+			led-red {
-+				color = <LED_COLOR_ID_RED>;
-+				pwms = <&pwm1 0 1000000 0>;
-+			};
-+
-+			led-green {
-+				color = <LED_COLOR_ID_GREEN>;
-+				pwms = <&pwm2 0 1000000 0>;
-+			};
-+
-+			led-blue {
-+				color = <LED_COLOR_ID_BLUE>;
-+				pwms = <&pwm12 0 1000000 0>;
-+			};
-+		};
-+	};
-+
-+	vbus_typec: vbus-typec-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&vbus_typec_en>;
-+		regulator-name = "vbus_typec";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&minipcie_enable_h>;
-+		regulator-name = "vcc3v3_minipcie";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	vcc3v3_ngff: vcc3v3-ngff-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&ngffpcie_enable_h>;
-+		regulator-name = "vcc3v3_ngff";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	/* actually fed by vcc5v0_sys, dependent
-+	 * on pi6c clock generator
-+	 */
-+	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pcie30x1_enable_h>;
-+		regulator-name = "vcc3v3_pcie30x1";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_pi6c_05>;
-+	};
-+
-+	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pcie_enable_h>;
-+		regulator-name = "vcc3v3_pcie";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+};
-+
-+&pcie2x1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie20_reset_h>;
-+	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
-+	status = "okay";
-+};
-+
-+&pcie30phy {
-+	data-lanes = <1 2>;
-+	status = "okay";
-+};
-+
-+&pcie3x1 {
-+	num-lanes = <1>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie30x1m0_pins>;
-+	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
-+	status = "okay";
-+};
-+
-+&pcie3x2 {
-+	num-lanes = <1>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie30x2_reset_h>;
-+	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
-+	status = "okay";
-+};
-+
-+&pinctrl {
-+	pcie {
-+		pcie20_reset_h: pcie20-reset-h {
-+			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie30x1_enable_h: pcie30x1-enable-h {
-+			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie30x2_reset_h: pcie30x2-reset-h {
-+			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie_enable_h: pcie-enable-h {
-+			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	usb {
-+		minipcie_enable_h: minipcie-enable-h {
-+			rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		ngffpcie_enable_h: ngffpcie-enable-h {
-+			rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		vbus_typec_en: vbus_typec_en {
-+			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&pwm1 {
-+	status = "okay";
-+};
-+
-+&pwm2 {
-+	status = "okay";
-+};
-+
-+&pwm12 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm12m1_pins>;
-+	status = "okay";
-+};
-+
-+&sdmmc0 {
-+	bus-width = <4>;
-+	cap-sd-highspeed;
-+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
-+	/* Also used in pcie30x1_clkreqnm0 */
-+	disable-wp;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>;
-+	sd-uhs-sdr104;
-+	vmmc-supply = <&vcc3v3_sd>;
-+	vqmmc-supply = <&vccio_sd>;
-+	status = "okay";
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host0_ohci {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	status = "okay";
-+};
-+
-+&usb_host1_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host1_ohci {
-+	status = "okay";
-+};
-+
-+&usb2phy0_otg {
-+	phy-supply = <&vbus_typec>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_host {
-+	phy-supply = <&vcc3v3_minipcie>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_otg {
-+	phy-supply = <&vcc3v3_ngff>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.6/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch b/target/linux/rockchip/patches-6.6/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
deleted file mode 100644
index e556e2eb42..0000000000
--- a/target/linux/rockchip/patches-6.6/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From c80992abd2877590059e9cb254213c16824e2106 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Wed, 18 Jan 2023 13:34:53 +0530
-Subject: [PATCH] arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM
- boards
-
-Radxa has produced Compute Modules like RK3399pro VMARC and CM3i with
-onboarding eMMC flash, so the eMMC is the primary MMC device.
-
-On the other hand, Rockchip boot orders start from eMMC from an MMC
-device perspective.
-
-Mark, the eMMC has mmc0 to satisfy the above two conditions.
-
-Reported-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230118080454.11643-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 ++--
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts     | 3 +--
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
-@@ -13,8 +13,8 @@
- 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
- 
- 	aliases {
--		mmc0 = &sdmmc;
--		mmc1 = &sdhci;
-+		mmc0 = &sdhci;
-+		mmc1 = &sdmmc;
- 	};
- 
- 	vcc3v3_pcie: vcc-pcie-regulator {
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -8,8 +8,7 @@
- 	compatible = "radxa,e25", "rockchip,rk3568";
- 
- 	aliases {
--		mmc0 = &sdmmc0;
--		mmc1 = &sdhci;
-+		mmc1 = &sdmmc0;
- 	};
- 
- 	pwm-leds {
diff --git a/target/linux/rockchip/patches-6.6/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch b/target/linux/rockchip/patches-6.6/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
deleted file mode 100644
index c1f1a09219..0000000000
--- a/target/linux/rockchip/patches-6.6/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c4d2b02d63ee38b381fbc886c02eecfec4f981cc Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:51 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add missing CM3i fallback compatible
- for Radxa E25
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In order to function the Radxa E25 Carrier board, it is mandatory to
-mount the Radxa CM3i module.?
-
-Add Radxa CM3i compatible as fallback compatible to string to satisfy
-the Module and Carrier board topology.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Cc: Chukun Pan <amadeus at jmu.edu.cn>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230123071654.73139-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -5,7 +5,7 @@
- 
- / {
- 	model = "Radxa E25";
--	compatible = "radxa,e25", "rockchip,rk3568";
-+	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
- 
- 	aliases {
- 		mmc1 = &sdmmc0;
diff --git a/target/linux/rockchip/patches-6.6/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
deleted file mode 100644
index 84e87bae05..0000000000
--- a/target/linux/rockchip/patches-6.6/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ef9134d9bbce071c9e4ebdcbb6f8fb1a5dd0a67e Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:53 +0530
-Subject: [PATCH] arm64: dts: rockchip: Correct the model name for Radxa E25
-
-Radxa E25 is a Carrier board, so update the model name for Radxa E25
-as suggested by the Radxa website.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Cc: Chukun Pan <amadeus at jmu.edu.cn>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230123071654.73139-4-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -4,7 +4,7 @@
- #include "rk3568-radxa-cm3i.dtsi"
- 
- / {
--	model = "Radxa E25";
-+	model = "Radxa E25 Carrier Board";
- 	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
- 
- 	aliases {
diff --git a/target/linux/rockchip/patches-6.6/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
deleted file mode 100644
index da02c4c001..0000000000
--- a/target/linux/rockchip/patches-6.6/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From a87852e37f782257ebc57cc44a0d3fbf806471f6 Mon Sep 17 00:00:00 2001
-From: Jonas Karlman <jonas at kwiboo.se>
-Date: Mon, 24 Jul 2023 14:52:16 +0000
-Subject: [PATCH] arm64: dts: rockchip: Fix PCIe regulators on Radxa E25
-
-Despite its name, the regulator vcc3v3_pcie30x1 has nothing to do with
-pcie30x1. Instead, it supply power to VBAT1-5 on the M.2 KEY B port as
-seen on page 8 of the schematic [1].
-
-pcie30x1 is used for the mini PCIe slot, and as seen on page 9 the
-vcc3v3_minipcie regulator is instead related to pcie30x1.
-
-The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
-
-Use correct regulator vcc3v3_minipcie for pcie30x1.
-
-[1] https://dl.radxa.com/cm3p/e25/radxa-e25-v1.4-sch.pdf
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
-Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -47,6 +47,9 @@
- 		vin-supply = <&vcc5v0_sys>;
- 	};
- 
-+	/* actually fed by vcc5v0_sys, dependent
-+	 * on pi6c clock generator
-+	 */
- 	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
- 		compatible = "regulator-fixed";
- 		enable-active-high;
-@@ -54,9 +57,9 @@
- 		pinctrl-names = "default";
- 		pinctrl-0 = <&minipcie_enable_h>;
- 		regulator-name = "vcc3v3_minipcie";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		vin-supply = <&vcc5v0_sys>;
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_pi6c_05>;
- 	};
- 
- 	vcc3v3_ngff: vcc3v3-ngff-regulator {
-@@ -71,9 +74,6 @@
- 		vin-supply = <&vcc5v0_sys>;
- 	};
- 
--	/* actually fed by vcc5v0_sys, dependent
--	 * on pi6c clock generator
--	 */
- 	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
- 		compatible = "regulator-fixed";
- 		enable-active-high;
-@@ -83,7 +83,7 @@
- 		regulator-name = "vcc3v3_pcie30x1";
- 		regulator-min-microvolt = <3300000>;
- 		regulator-max-microvolt = <3300000>;
--		vin-supply = <&vcc3v3_pi6c_05>;
-+		vin-supply = <&vcc5v0_sys>;
- 	};
- 
- 	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
-@@ -117,7 +117,7 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&pcie30x1m0_pins>;
- 	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
--	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
-+	vpcie3v3-supply = <&vcc3v3_minipcie>;
- 	status = "okay";
- };
- 
diff --git a/target/linux/rockchip/patches-6.6/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.6/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
deleted file mode 100644
index c0abdeb267..0000000000
--- a/target/linux/rockchip/patches-6.6/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2bdfe84fbd57a4ed9fd65a67210442559ce078f0 Mon Sep 17 00:00:00 2001
-From: Jonas Karlman <jonas at kwiboo.se>
-Date: Mon, 24 Jul 2023 14:52:16 +0000
-Subject: [PATCH] arm64: dts: rockchip: Enable SATA on Radxa E25
-
-The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
-
-Enable sata1 node to fix use of SATA drives on the M.2 slot.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
-Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -99,6 +99,10 @@
- 	};
- };
- 
-+&combphy1 {
-+	phy-supply = <&vcc3v3_pcie30x1>;
-+};
-+
- &pcie2x1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&pcie20_reset_h>;
-@@ -178,6 +182,10 @@
- 	status = "okay";
- };
- 
-+&sata1 {
-+	status = "okay";
-+};
-+
- &sdmmc0 {
- 	bus-width = <4>;
- 	cap-sd-highspeed;
diff --git a/target/linux/rockchip/patches-6.6/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch b/target/linux/rockchip/patches-6.6/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
deleted file mode 100644
index 6a5622b813..0000000000
--- a/target/linux/rockchip/patches-6.6/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a2ac2a1b02590a22a236c43c455f421cdede45f5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Thu, 14 Mar 2024 15:24:35 +0300
-Subject: [PATCH] arm64: dts: rockchip: set PHY address of MT7531 switch to
- 0x1f
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The MT7531 switch listens on PHY address 0x1f on an MDIO bus. I've got two
-findings that support this. There's no bootstrapping option to change the
-PHY address of the switch. The Linux driver hardcodes 0x1f as the PHY
-address of the switch. So the reg property on the device tree is currently
-ignored by the Linux driver.
-
-Therefore, describe the correct PHY address on Banana Pi BPI-R2 Pro that
-has this switch.
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Fixes: c1804463e5c6 ("arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board")
-Link: https://lore.kernel.org/r/20240314-for-rockchip-mt7531-phy-address-v1-1-743b5873358f at arinc9.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-@@ -521,9 +521,9 @@
- 	#address-cells = <1>;
- 	#size-cells = <0>;
- 
--	switch at 0 {
-+	switch at 1f {
- 		compatible = "mediatek,mt7531";
--		reg = <0>;
-+		reg = <0x1f>;
- 
- 		ports {
- 			#address-cells = <1>;
diff --git a/target/linux/rockchip/patches-6.6/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch b/target/linux/rockchip/patches-6.6/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
deleted file mode 100644
index dca18f5c58..0000000000
--- a/target/linux/rockchip/patches-6.6/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 433d54818f64a2fe0562f8c04c7a81f562368515 Mon Sep 17 00:00:00 2001
-From: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
-Date: Tue, 5 Mar 2024 15:32:18 +0100
-Subject: [PATCH] arm64: dts: rockchip: regulator for sd needs to be always on
- for BPI-R2Pro
-
-With default dts configuration for BPI-R2Pro, the regulator for sd card is
-powered off when reboot is commanded, and the only solution to detect the
-sd card again, and therefore, allow rebooting from there, is to do a
-hardware reset.
-
-Configure the regulator for sd to be always on for BPI-R2Pro in order to
-avoid this issue.
-
-Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro")
-Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
-Link: https://lore.kernel.org/r/20240305143222.189413-1-jtornosm at redhat.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-@@ -412,6 +412,8 @@
- 
- 			vccio_sd: LDO_REG5 {
- 				regulator-name = "vccio_sd";
-+				regulator-always-on;
-+				regulator-boot-on;
- 				regulator-min-microvolt = <1800000>;
- 				regulator-max-microvolt = <3300000>;
- 
diff --git a/target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch b/target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
index 6a2d35889b..0be9a7300b 100644
--- a/target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
+++ b/target/linux/rockchip/patches-6.6/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
@@ -55,9 +55,9 @@ Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
 
 --- a/drivers/char/hw_random/Kconfig
 +++ b/drivers/char/hw_random/Kconfig
-@@ -549,6 +549,20 @@ config HW_RANDOM_CN10K
- 	 To compile this driver as a module, choose M here.
- 	 The module will be called cn10k_rng. If unsure, say Y.
+@@ -573,6 +573,20 @@ config HW_RANDOM_JH7110
+ 	  To compile this driver as a module, choose M here.
+ 	  The module will be called jh7110-trng.
  
 +config HW_RANDOM_ROCKCHIP
 +        tristate "Rockchip True Random Number Generator"
@@ -78,11 +78,12 @@ Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
  config UML_RANDOM
 --- a/drivers/char/hw_random/Makefile
 +++ b/drivers/char/hw_random/Makefile
-@@ -47,3 +47,4 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
+@@ -48,4 +48,5 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
  obj-$(CONFIG_HW_RANDOM_ARM_SMCCC_TRNG) += arm_smccc_trng.o
  obj-$(CONFIG_HW_RANDOM_CN10K) += cn10k-rng.o
  obj-$(CONFIG_HW_RANDOM_POLARFIRE_SOC) += mpfs-rng.o
 +obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
+ obj-$(CONFIG_HW_RANDOM_JH7110) += jh7110-trng.o
 --- /dev/null
 +++ b/drivers/char/hw_random/rockchip-rng.c
 @@ -0,0 +1,251 @@
diff --git a/target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch b/target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
index bb34ba76e0..577aa6c9d2 100644
--- a/target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
+++ b/target/linux/rockchip/patches-6.6/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
@@ -38,7 +38,7 @@ Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
 
 --- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
 +++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
-@@ -1773,6 +1773,15 @@
+@@ -1807,6 +1807,15 @@
  		};
  	};
  



From lede-commits at lists.infradead.org  Mon May  6 15:17:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 06 May 2024 18:17:48 -0400
Subject: [openwrt/openwrt]  kernel/rockchip: Restore kernel files for v6.1
In-Reply-To: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
References: <171503386753.3428515.17327948645086871282@git-01.infra.openwrt.org>
Message-ID: <mailman.34080.1715033885.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dcd2367349b35c43673914970f85c7809bd457d6

commit dcd2367349b35c43673914970f85c7809bd457d6
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 19 12:49:23 2024 -0400

    kernel/rockchip: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 target/linux/rockchip/armv8/config-6.1             |  709 +++++++++++
 ...cmshc-Update-DLL-and-pre-change-delay-for.patch |   60 +
 ...f-dwcmshc-properly-determine-max-clock-on.patch |   52 +
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch |   70 ++
 ...dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch |  407 +++++++
 ...rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch |   71 ++
 ...-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch |  754 ++++++++++++
 ...ip-create-common-dtsi-for-NanoPi-R5-serie.patch | 1226 ++++++++++++++++++++
 ...-rockchip-fix-gmac-support-for-NanoPi-R5S.patch |   49 +
 ...ip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch |   39 +
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch |  152 +++
 ...kchip-fix-button-reset-pin-for-nanopi-r5c.patch |   37 +
 ...ip-configure-eth-pad-driver-strength-for-.patch |   33 +
 ...kchip-Add-Radxa-Compute-Module-3-IO-board.patch |  233 ++++
 ...-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch |   63 +
 ...rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch |  131 +++
 ...p-Add-rk3566-based-Radxa-Compute-Module-3.patch |  386 ++++++
 ...chip-Enable-WiFi-BT-support-for-Radxa-CM3.patch |  134 +++
 ...kchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch |   32 +
 ...dts-rockchip-Fix-compatible-for-Radxa-CM3.patch |   45 +
 ...-rockchip-minor-whitespace-cleanup-around.patch |   28 +
 ...ernet0-alias-to-the-dts-for-RK3566-boards.patch |   28 +
 ...6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch |  689 +++++++++++
 ...25-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch |   48 +
 ...-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch |   35 +
 ...chip-Correct-the-model-name-for-Radxa-E25.patch |   28 +
 ...rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch |   79 ++
 ...m64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch |   41 +
 ...ockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch |   27 +
 ...ockchip-set-PHY-address-of-MT7531-switch-.patch |   40 +
 ...ockchip-regulator-for-sd-needs-to-be-alwa.patch |   33 +
 .../100-rockchip-use-system-LED-for-OpenWrt.patch  |   77 ++
 ...hip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch |   24 +
 .../patches-6.1/105-nanopi-r4s-sd-signalling.patch |   36 +
 .../patches-6.1/106-r4s-openwrt-leds.patch         |   16 +
 ...ockchip-Update-LED-properties-for-Orange-.patch |   40 +
 ...ockchip-add-LED-configuration-to-Orange-P.patch |   24 +
 .../109-nanopc-t4-add-led-aliases.patch            |   16 +
 ...ockchip-Update-LED-properties-for-NanoPi-.patch |   45 +
 .../111-radxa-cm3-io-add-led-aliases.patch         |   36 +
 .../112-radxa-e25-add-led-aliases.patch            |   24 +
 .../300-hwrng-add-Rockchip-SoC-hwrng-driver.patch  |  339 ++++++
 ...s-rockchip-add-DT-entry-for-RNG-to-RK356x.patch |   56 +
 43 files changed, 6492 insertions(+)

diff --git a/target/linux/rockchip/armv8/config-6.1 b/target/linux/rockchip/armv8/config-6.1
new file mode 100644
index 0000000000..6337245ff8
--- /dev/null
+++ b/target/linux/rockchip/armv8/config-6.1
@@ -0,0 +1,709 @@
+CONFIG_64BIT=y
+CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
+CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=33
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+CONFIG_ARCH_WANTS_THP_SWAP=y
+CONFIG_ARC_EMAC_CORE=y
+CONFIG_ARM64=y
+CONFIG_ARM64_4K_PAGES=y
+CONFIG_ARM64_CNP=y
+CONFIG_ARM64_EPAN=y
+CONFIG_ARM64_ERRATUM_2051678=y
+CONFIG_ARM64_ERRATUM_2054223=y
+CONFIG_ARM64_ERRATUM_2067961=y
+CONFIG_ARM64_ERRATUM_2077057=y
+CONFIG_ARM64_ERRATUM_2658417=y
+CONFIG_ARM64_ERRATUM_819472=y
+CONFIG_ARM64_ERRATUM_824069=y
+CONFIG_ARM64_ERRATUM_826319=y
+CONFIG_ARM64_ERRATUM_827319=y
+CONFIG_ARM64_ERRATUM_832075=y
+CONFIG_ARM64_ERRATUM_843419=y
+CONFIG_ARM64_ERRATUM_858921=y
+CONFIG_ARM64_HW_AFDBM=y
+CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
+CONFIG_ARM64_PAGE_SHIFT=12
+CONFIG_ARM64_PAN=y
+CONFIG_ARM64_PA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_PTR_AUTH=y
+CONFIG_ARM64_PTR_AUTH_KERNEL=y
+CONFIG_ARM64_RAS_EXTN=y
+CONFIG_ARM64_SME=y
+CONFIG_ARM64_SVE=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_ARM64_VA_BITS=48
+# CONFIG_ARM64_VA_BITS_39 is not set
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
+CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GIC_V2M=y
+CONFIG_ARM_GIC_V3=y
+CONFIG_ARM_GIC_V3_ITS=y
+CONFIG_ARM_GIC_V3_ITS_PCI=y
+CONFIG_ARM_MHU=y
+CONFIG_ARM_MHU_V2=y
+CONFIG_ARM_PSCI_CPUIDLE=y
+CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
+CONFIG_ARM_PSCI_FW=y
+# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set
+CONFIG_ARM_SCMI_CPUFREQ=y
+CONFIG_ARM_SCMI_HAVE_SHMEM=y
+CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
+CONFIG_ARM_SCMI_POWER_CONTROL=y
+CONFIG_ARM_SCMI_POWER_DOMAIN=y
+CONFIG_ARM_SCMI_PROTOCOL=y
+CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
+CONFIG_ARM_SCMI_TRANSPORT_SMC=y
+CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE=y
+CONFIG_ARM_SCPI_CPUFREQ=y
+CONFIG_ARM_SCPI_POWER_DOMAIN=y
+CONFIG_ARM_SCPI_PROTOCOL=y
+CONFIG_ARM_SMMU=y
+CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
+# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
+CONFIG_ARM_SMMU_V3=y
+# CONFIG_ARM_SMMU_V3_SVA is not set
+CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_GPIO=y
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_BSG_COMMON=y
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_INTEGRITY_T10=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_PCIESSD_MTIP32XX=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BRCMSTB_GISB_ARB=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
+CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CHARGER_GPIO=y
+# CONFIG_CHARGER_RK817 is not set
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLK_PX30=y
+CONFIG_CLK_RK3308=y
+CONFIG_CLK_RK3328=y
+CONFIG_CLK_RK3368=y
+CONFIG_CLK_RK3399=y
+CONFIG_CLK_RK3568=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_RK808=y
+CONFIG_COMMON_CLK_ROCKCHIP=y
+CONFIG_COMMON_CLK_SCMI=y
+CONFIG_COMMON_CLK_SCPI=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_FREQ=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
+CONFIG_CPU_ISOLATION=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CRASH_CORE=y
+CONFIG_CRASH_DUMP=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRC64=y
+CONFIG_CRC64_ROCKSOFT=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_AES_ARM64=y
+CONFIG_CRYPTO_AES_ARM64_CE=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRC64_ROCKSOFT=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
+CONFIG_CRYPTO_CRYPTD=y
+# CONFIG_CRYPTO_DEV_ROCKCHIP is not set
+CONFIG_CRYPTO_GHASH_ARM64_CE=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_POLYVAL=y
+CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SM3=y
+CONFIG_CRYPTO_SM3_NEON=y
+CONFIG_CRYPTO_SM4=y
+CONFIG_CRYPTO_SM4_ARM64_CE_BLK=y
+CONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+CONFIG_DEVFREQ_GOV_PERFORMANCE=y
+CONFIG_DEVFREQ_GOV_POWERSAVE=y
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+CONFIG_DEVFREQ_GOV_USERSPACE=y
+# CONFIG_DEVFREQ_THERMAL is not set
+CONFIG_DEVMEM=y
+# CONFIG_DEVPORT is not set
+CONFIG_DMADEVICES=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+CONFIG_DT_IDLE_GENPD=y
+CONFIG_DT_IDLE_STATES=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_DWMAC_DWC_QOS_ETH=y
+CONFIG_DWMAC_GENERIC=y
+CONFIG_DWMAC_ROCKCHIP=y
+CONFIG_DW_WATCHDOG=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EMAC_ROCKCHIP=y
+CONFIG_ENERGY_MODEL=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXT4_FS=y
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXTCON=y
+CONFIG_F2FS_FS=y
+CONFIG_FANOTIFY=y
+CONFIG_FHANDLE=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+# CONFIG_FORTIFY_SOURCE is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IOREMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_DWAPB=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_ROCKCHIP=y
+CONFIG_GPIO_SYSCON=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+# CONFIG_HOTPLUG_PCI_PCIE is not set
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ROCKCHIP=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_RK3X=y
+CONFIG_IIO=y
+# CONFIG_IIO_SCMI is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+CONFIG_INDIRECT_PIO=y
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_LEDS=y
+CONFIG_INPUT_MATRIXKMAP=y
+CONFIG_INPUT_RK805_PWRKEY=y
+CONFIG_IOMMU_API=y
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
+# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
+CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
+CONFIG_IOMMU_DMA=y
+CONFIG_IOMMU_IOVA=y
+CONFIG_IOMMU_IO_PGTABLE=y
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_DART is not set
+CONFIG_IOMMU_IO_PGTABLE_LPAE=y
+# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
+CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IO_STRICT_DEVMEM is not set
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MSI_IOMMU=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JUMP_LABEL=y
+CONFIG_KALLSYMS=y
+CONFIG_KCMP=y
+CONFIG_KEXEC_CORE=y
+CONFIG_KEXEC_FILE=y
+CONFIG_KSM=y
+# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_SYSCON=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_PANIC=y
+CONFIG_LIBCRC32C=y
+CONFIG_LIBFDT=y
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LOG_BUF_SHIFT=19
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_SERIAL=y
+CONFIG_MAILBOX=y
+# CONFIG_MAILBOX_TEST is not set
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_BUS_MUX=y
+CONFIG_MDIO_BUS_MUX_GPIO=y
+CONFIG_MDIO_BUS_MUX_MMIOREG=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEDIATEK_GE_PHY=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_MFD_CORE=y
+# CONFIG_MFD_KHADAS_MCU is not set
+CONFIG_MFD_RK808=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_MINORS=32
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_DW=y
+# CONFIG_MMC_DW_BLUEFIELD is not set
+# CONFIG_MMC_DW_EXYNOS is not set
+# CONFIG_MMC_DW_HI3798CV200 is not set
+# CONFIG_MMC_DW_K3 is not set
+# CONFIG_MMC_DW_PCI is not set
+CONFIG_MMC_DW_PLTFM=y
+CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+CONFIG_MMC_SDHCI_OF_DWCMSHC=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MOTORCOMM_PHY=y
+CONFIG_MQ_IOSCHED_DEADLINE=y
+# CONFIG_MTD_CFI is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MT7530=y
+CONFIG_NET_DSA_MT7530_MDIO=y
+CONFIG_NET_DSA_MT7530_MMIO=y
+CONFIG_NET_DSA_TAG_MTK=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=256
+CONFIG_NVMEM=y
+CONFIG_NVMEM_ROCKCHIP_EFUSE=y
+# CONFIG_NVMEM_ROCKCHIP_OTP is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_NVME_CORE=y
+# CONFIG_NVME_HWMON is not set
+# CONFIG_NVME_MULTIPATH is not set
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_DYNAMIC=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IOMMU=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OF_OVERLAY=y
+CONFIG_OF_RESOLVE=y
+# CONFIG_OVERLAY_FS_XINO_AUTO is not set
+CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+# CONFIG_PANIC_ON_OOPS is not set
+CONFIG_PANIC_ON_OOPS_VALUE=0
+CONFIG_PANIC_TIMEOUT=0
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PARTITION_PERCPU=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_DW_HOST=y
+CONFIG_PCIE_PME=y
+CONFIG_PCIE_ROCKCHIP=y
+CONFIG_PCIE_ROCKCHIP_DW_HOST=y
+CONFIG_PCIE_ROCKCHIP_HOST=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PCI_STUB=y
+CONFIG_PCS_MTK_LYNXI=y
+CONFIG_PCS_XPCS=y
+CONFIG_PGTABLE_LEVELS=4
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PHY_ROCKCHIP_DP=y
+# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
+CONFIG_PHY_ROCKCHIP_EMMC=y
+# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
+# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
+# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
+CONFIG_PHY_ROCKCHIP_PCIE=y
+CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+CONFIG_PHY_ROCKCHIP_USB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_RK805=y
+CONFIG_PINCTRL_ROCKCHIP=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PL330_DMA=y
+CONFIG_PLATFORM_MHU=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_DEVFREQ=y
+# CONFIG_PM_DEVFREQ_EVENT is not set
+CONFIG_PM_GENERIC_DOMAINS=y
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+CONFIG_PM_OPP=y
+CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_POWER_SUPPLY_HWMON=y
+CONFIG_PPS=y
+CONFIG_PREEMPT=y
+CONFIG_PREEMPTION=y
+CONFIG_PREEMPT_BUILD=y
+CONFIG_PREEMPT_COUNT=y
+# CONFIG_PREEMPT_NONE is not set
+CONFIG_PREEMPT_RCU=y
+CONFIG_PRINTK_TIME=y
+# CONFIG_PRINT_QUOTA_WARNING is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PROC_VMCORE=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_ROCKCHIP=y
+CONFIG_PWM_SYSFS=y
+# CONFIG_QFMT_V2 is not set
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+CONFIG_RAID_ATTRS=y
+CONFIG_RANDOMIZE_BASE=y
+CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+# CONFIG_RAVE_SP_CORE is not set
+CONFIG_RCU_TRACE=y
+CONFIG_REALTEK_PHY=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_IRQ=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_ARM_SCMI=y
+CONFIG_REGULATOR_FAN53555=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_REGULATOR_PWM=y
+CONFIG_REGULATOR_RK808=y
+CONFIG_RELOCATABLE=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_SCMI=y
+CONFIG_RFS_ACCEL=y
+CONFIG_ROCKCHIP_GRF=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_ROCKCHIP_IOMMU=y
+CONFIG_ROCKCHIP_MBOX=y
+CONFIG_ROCKCHIP_PHY=y
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+# CONFIG_ROCKCHIP_SARADC is not set
+CONFIG_ROCKCHIP_THERMAL=y
+CONFIG_ROCKCHIP_TIMER=y
+CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+CONFIG_RPS=y
+CONFIG_RSEQ=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_HYM8563=y
+CONFIG_RTC_DRV_RK808=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_NVMEM=y
+# CONFIG_RUNTIME_TESTING_MENU is not set
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCHED_MC=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_SCSI_SAS_ATTRS=y
+CONFIG_SCSI_SAS_HOST_SMP=y
+CONFIG_SCSI_SAS_LIBSAS=y
+# CONFIG_SECURITY_DMESG_RESTRICT is not set
+CONFIG_SENSORS_ARM_SCMI=y
+CONFIG_SENSORS_ARM_SCPI=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_8250_DWLIB=y
+CONFIG_SERIAL_8250_EXAR=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIO=y
+CONFIG_SERIO_AMBAKMI=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_DYNAMIC=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_ROCKCHIP=y
+CONFIG_SPI_ROCKCHIP_SFC=y
+CONFIG_SPI_SPIDEV=y
+# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
+# CONFIG_SQUASHFS_EMBEDDED is not set
+CONFIG_SQUASHFS_FILE_CACHE=y
+# CONFIG_SQUASHFS_FILE_DIRECT is not set
+CONFIG_SRAM=y
+CONFIG_SRCU=y
+CONFIG_STACKPROTECTOR=y
+CONFIG_STACKPROTECTOR_PER_TASK=y
+CONFIG_STACKPROTECTOR_STRONG=y
+CONFIG_STACKTRACE=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
+CONFIG_STRICT_DEVMEM=y
+# CONFIG_STRIP_ASM_SYMS is not set
+# CONFIG_SWAP is not set
+CONFIG_SWIOTLB=y
+CONFIG_SWPHY=y
+CONFIG_SYNC_FILE=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYSFS_SYSCALL=y
+# CONFIG_TEXTSEARCH is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_EMULATION=y
+CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TRACE_CLOCK=y
+CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
+# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+CONFIG_TRANS_TABLE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_TYPEC=y
+# CONFIG_TYPEC_ANX7411 is not set
+CONFIG_TYPEC_FUSB302=y
+# CONFIG_TYPEC_HD3SS3220 is not set
+# CONFIG_TYPEC_MUX_FSA4480 is not set
+# CONFIG_TYPEC_MUX_PI3USB30532 is not set
+# CONFIG_TYPEC_RT1719 is not set
+# CONFIG_TYPEC_STUSB160X is not set
+# CONFIG_TYPEC_TCPCI is not set
+CONFIG_TYPEC_TCPM=y
+# CONFIG_TYPEC_TPS6598X is not set
+# CONFIG_TYPEC_WUSB3801 is not set
+# CONFIG_UACCE is not set
+# CONFIG_UCLAMP_TASK is not set
+# CONFIG_UEVENT_HELPER is not set
+CONFIG_UNINLINE_SPIN_UNLOCK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_HOST=y
+CONFIG_USB_DWC3_OF_SIMPLE=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+CONFIG_USB_HID=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_PHY=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_ULPI_BUS=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
+# CONFIG_VIRTIO_MENU is not set
+CONFIG_VMAP_STACK=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XARRAY_MULTI=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZONE_DMA32=y
diff --git a/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch b/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
new file mode 100644
index 0000000000..2bb542be36
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
@@ -0,0 +1,60 @@
+From b75a52b0dda353aeefb4830a320589a363f49579 Mon Sep 17 00:00:00 2001
+From: Shawn Lin <shawn.lin at rock-chips.com>
+Date: Thu, 2 Feb 2023 08:35:16 +0800
+Subject: [PATCH] mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for
+ rockchip platform
+
+For Rockchip platform, DLL bypass bit and start bit need to be set if
+DLL is not locked. And adjust pre-change delay to 0x3 for better signal
+test result.
+
+Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
+Link: https://lore.kernel.org/r/1675298118-64243-2-git-send-email-shawn.lin at rock-chips.com
+Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
+---
+ drivers/mmc/host/sdhci-of-dwcmshc.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
++++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
+@@ -48,6 +48,7 @@
+ #define DWCMSHC_EMMC_DLL_RXCLK_SRCSEL	29
+ #define DWCMSHC_EMMC_DLL_START_POINT	16
+ #define DWCMSHC_EMMC_DLL_INC		8
++#define DWCMSHC_EMMC_DLL_BYPASS		BIT(24)
+ #define DWCMSHC_EMMC_DLL_DLYENA		BIT(27)
+ #define DLL_TXCLK_TAPNUM_DEFAULT	0x10
+ #define DLL_TXCLK_TAPNUM_90_DEGREES	0xA
+@@ -60,6 +61,7 @@
+ #define DLL_RXCLK_NO_INVERTER		1
+ #define DLL_RXCLK_INVERTER		0
+ #define DLL_CMDOUT_TAPNUM_90_DEGREES	0x8
++#define DLL_RXCLK_ORI_GATE		BIT(31)
+ #define DLL_CMDOUT_TAPNUM_FROM_SW	BIT(24)
+ #define DLL_CMDOUT_SRC_CLK_NEG		BIT(28)
+ #define DLL_CMDOUT_EN_SRC_CLK_NEG	BIT(29)
+@@ -234,9 +236,12 @@ static void dwcmshc_rk3568_set_clock(str
+ 	sdhci_writel(host, extra, reg);
+ 
+ 	if (clock <= 52000000) {
+-		/* Disable DLL and reset both of sample and drive clock */
+-		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_CTRL);
+-		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_RXCLK);
++		/*
++		 * Disable DLL and reset both of sample and drive clock.
++		 * The bypass bit and start bit need to be set if DLL is not locked.
++		 */
++		sdhci_writel(host, DWCMSHC_EMMC_DLL_BYPASS | DWCMSHC_EMMC_DLL_START, DWCMSHC_EMMC_DLL_CTRL);
++		sdhci_writel(host, DLL_RXCLK_ORI_GATE, DWCMSHC_EMMC_DLL_RXCLK);
+ 		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_TXCLK);
+ 		sdhci_writel(host, 0, DECMSHC_EMMC_DLL_CMDOUT);
+ 		/*
+@@ -279,7 +284,7 @@ static void dwcmshc_rk3568_set_clock(str
+ 	}
+ 
+ 	extra = 0x1 << 16 | /* tune clock stop en */
+-		0x2 << 17 | /* pre-change delay */
++		0x3 << 17 | /* pre-change delay */
+ 		0x3 << 19;  /* post-change delay */
+ 	sdhci_writel(host, extra, dwc_priv->vendor_specific_area1 + DWCMSHC_EMMC_ATCTRL);
+ 
diff --git a/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch b/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
new file mode 100644
index 0000000000..9d9c1b5c1c
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
@@ -0,0 +1,52 @@
+From 49502408007b77ff290ce62e6218cefaeedcb31a Mon Sep 17 00:00:00 2001
+From: Vasily Khoruzhick <anarsoul at gmail.com>
+Date: Thu, 9 Mar 2023 17:03:49 -0800
+Subject: [PATCH] mmc: sdhci-of-dwcmshc: properly determine max clock on
+ Rockchip
+
+Currently .get_max_clock returns the current clock rate for cclk_emmc
+on rk35xx, thus max clock gets set to whatever bootloader set it to.
+
+In case of u-boot, it is intentionally reset to 50 MHz if it boots
+from eMMC, see mmc_deinit() in u-boot sources. As a result, HS200 and
+HS400 modes are never selected by Linux, because dwcmshc_rk35xx_postinit
+clears appropriate caps if host->mmc->f_max is < 52MHz
+
+cclk_emmc is not a fixed clock on rk35xx, so using
+sdhci_pltfm_clk_get_max_clock is not appropriate here.
+
+Implement rk35xx_get_max_clock that returns actual max clock for cclk_emmc.
+
+Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Acked-by: Adrian Hunter <adrian.hunter at intel.com>
+Link: https://lore.kernel.org/r/20230310010349.509132-1-anarsoul at gmail.com
+Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
+---
+ drivers/mmc/host/sdhci-of-dwcmshc.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/mmc/host/sdhci-of-dwcmshc.c
++++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
+@@ -126,6 +126,13 @@ static unsigned int dwcmshc_get_max_cloc
+ 		return pltfm_host->clock;
+ }
+ 
++static unsigned int rk35xx_get_max_clock(struct sdhci_host *host)
++{
++	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
++
++	return clk_round_rate(pltfm_host->clk, ULONG_MAX);
++}
++
+ static void dwcmshc_check_auto_cmd23(struct mmc_host *mmc,
+ 				     struct mmc_request *mrq)
+ {
+@@ -343,7 +350,7 @@ static const struct sdhci_ops sdhci_dwcm
+ 	.set_clock		= dwcmshc_rk3568_set_clock,
+ 	.set_bus_width		= sdhci_set_bus_width,
+ 	.set_uhs_signaling	= dwcmshc_set_uhs_signaling,
+-	.get_max_clock		= sdhci_pltfm_clk_get_max_clock,
++	.get_max_clock		= rk35xx_get_max_clock,
+ 	.reset			= rk35xx_sdhci_reset,
+ 	.adma_write_desc	= dwcmshc_adma_write_desc,
+ };
diff --git a/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch b/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
new file mode 100644
index 0000000000..049c8ad1af
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
@@ -0,0 +1,70 @@
+From 004589ff9df5b75672a78b6c3c4cba93202b14c9 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 25 Mar 2023 15:40:20 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C
+
+The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC
+chip changed from rtl8211e to yt8521s, and otherwise identical to R2S.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230325074022.9818-3-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |  1 +
+ .../boot/dts/rockchip/rk3328-nanopi-r2c.dts   | 40 +++++++++++++++++++
+ 2 files changed, 41 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a9
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
+@@ -0,0 +1,40 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/*
++ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
++ * (http://www.friendlyarm.com)
++ *
++ * Copyright (c) 2021-2023 Tianling Shen <cnsztl at gmail.com>
++ */
++
++/dts-v1/;
++#include "rk3328-nanopi-r2s.dts"
++
++/ {
++	model = "FriendlyElec NanoPi R2C";
++	compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
++};
++
++&gmac2io {
++	phy-handle = <&yt8521s>;
++	tx_delay = <0x22>;
++	rx_delay = <0x12>;
++
++	mdio {
++		/delete-node/ ethernet-phy at 1;
++
++		yt8521s: ethernet-phy at 3 {
++			compatible = "ethernet-phy-ieee802.3-c22";
++			reg = <3>;
++
++			motorcomm,clk-out-frequency-hz = <125000000>;
++			motorcomm,keep-pll-enabled;
++			motorcomm,auto-sleep-disabled;
++
++			pinctrl-0 = <&eth_phy_reset_pin>;
++			pinctrl-names = "default";
++			reset-assert-us = <10000>;
++			reset-deassert-us = <50000>;
++			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch b/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
new file mode 100644
index 0000000000..4e48218b89
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
@@ -0,0 +1,407 @@
+From 51712e1d014aaaa4c6e1e7e84932d58b5c0f59ed Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Sat, 3 Dec 2022 15:41:49 +0800
+Subject: [PATCH] arm64: dts: rockchip: rk3328: Add 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.
+
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+Link: https://lore.kernel.org/r/20221203074149.11543-3-amadeus at jmu.edu.cn
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |   1 +
+ .../dts/rockchip/rk3328-orangepi-r1-plus.dts  | 373 ++++++++++++++++++
+ 2 files changed, 374 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/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 <mail at david-bauer.net>
++ */
++
++/dts-v1/;
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/leds/common.h>
++#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 = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-1 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_RED>;
++			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "heartbeat";
++		};
++
++		led-2 {
++			function = LED_FUNCTION_WAN;
++			color = <LED_COLOR_ID_GREEN>;
++			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 at 1 {
++			reg = <1>;
++			pinctrl-0 = <&eth_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 at 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 at 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 at 2 {
++		compatible = "usbbda,8153";
++		reg = <2>;
++	};
++};
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host0_ohci {
++	status = "okay";
++};
diff --git a/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch b/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
new file mode 100644
index 0000000000..78d3d51a17
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
@@ -0,0 +1,71 @@
+From 387b3bbac5ea6a0a105d685237f033ffe0f184f1 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 25 Mar 2023 15:40:22 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add Xunlong OrangePi 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 otherwise
+identical to OrangePi R1 Plus.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230325074022.9818-5-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |  1 +
+ .../rockchip/rk3328-orangepi-r1-plus-lts.dts  | 40 +++++++++++++++++++
+ 2 files changed, 41 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
++ */
++
++/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 at 1;
++
++		yt8531c: ethernet-phy at 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 = <&eth_phy_reset_pin>;
++			pinctrl-names = "default";
++			reset-assert-us = <15000>;
++			reset-deassert-us = <50000>;
++			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch b/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
new file mode 100644
index 0000000000..3d502a65b6
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
@@ -0,0 +1,754 @@
+From c6629b9a6738a64507478527da6c7b83c10a6d2c Mon Sep 17 00:00:00 2001
+From: Vasily Khoruzhick <anarsoul at gmail.com>
+Date: Tue, 7 Mar 2023 22:32:40 -0800
+Subject: [PATCH] arm64: dts: rockchip: Add FriendlyElec Nanopi R5S
+
+FriendlyElec 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
+
+Based on Tianling Shen's <cnsztl at gmail.com> work.
+
+Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Link: https://lore.kernel.org/r/20230308063240.107178-2-anarsoul at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |   1 +
+ .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 713 ++++++++++++++++++
+ 2 files changed, 714 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -74,4 +74,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -0,0 +1,713 @@
++// 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 <cnsztl at gmail.com>
++ */
++
++/dts-v1/;
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/leds/common.h>
++#include <dt-bindings/pinctrl/rockchip.h>
++#include <dt-bindings/soc/rockchip,vop2.h>
++#include "rk3568.dtsi"
++
++/ {
++	model = "FriendlyElec NanoPi R5S";
++	compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568";
++
++	aliases {
++		ethernet0 = &gmac0;
++		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>;
++			};
++		};
++	};
++
++	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 = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_LAN;
++			function-enumerator = <1>;
++			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-lan2 {
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_LAN;
++			function-enumerator = <2>;
++			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
++		};
++
++		power_led: led-power {
++			color = <LED_COLOR_ID_RED>;
++			function = LED_FUNCTION_POWER;
++			linux,default-trigger = "heartbeat";
++			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-wan {
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_WAN;
++			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
++		};
++	};
++
++	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>;
++};
++
++&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-id";
++	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";
++};
++
++&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 at 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 at 20 {
++		compatible = "rockchip,rk809";
++		reg = <0x20>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
++		#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-always-on;
++				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 at 51 {
++		compatible = "haoyu,hym8563";
++		reg = <0x51>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
++		#clock-cells = <0>;
++		clock-output-names = "rtcic_32kout";
++		pinctrl-names = "default";
++		pinctrl-0 = <&hym8563_int>;
++		wakeup-source;
++	};
++};
++
++&i2s0_8ch {
++	status = "okay";
++};
++
++&i2s1_8ch {
++	rockchip,trcm-sync-tx-only;
++	status = "okay";
++};
++
++&mdio0 {
++	rgmii_phy0: ethernet-phy at 1 {
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <1>;
++		pinctrl-0 = <&eth_phy0_reset_pin>;
++		pinctrl-names = "default";
++		reset-assert-us = <10000>;
++		reset-deassert-us = <50000>;
++		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
++	};
++};
++
++&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_down>;
++		};
++	};
++
++	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>;
++		};
++	};
++
++	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 at ROCKCHIP_VOP2_EP_HDMI0 {
++		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
++		remote-endpoint = <&hdmi_in_vp0>;
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch b/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
new file mode 100644
index 0000000000..cf9fe06ad0
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
@@ -0,0 +1,1226 @@
+From c8ec73b05a95d9f0969ae0f28dd8799a54fcdfc7 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 18 Mar 2023 16:37:41 +0800
+Subject: [PATCH] arm64: dts: rockchip: create common dtsi for NanoPi R5 series
+
+Create common dtsi for the FriendlyElec NanoPi R5 series.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230318083745.6181-2-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 575 +----------------
+ .../boot/dts/rockchip/rk3568-nanopi-r5s.dtsi  | 596 ++++++++++++++++++
+ 2 files changed, 597 insertions(+), 574 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -7,12 +7,7 @@
+  */
+ 
+ /dts-v1/;
+-#include <dt-bindings/gpio/gpio.h>
+-#include <dt-bindings/input/input.h>
+-#include <dt-bindings/leds/common.h>
+-#include <dt-bindings/pinctrl/rockchip.h>
+-#include <dt-bindings/soc/rockchip,vop2.h>
+-#include "rk3568.dtsi"
++#include "rk3568-nanopi-r5s.dtsi"
+ 
+ / {
+ 	model = "FriendlyElec NanoPi R5S";
+@@ -20,23 +15,6 @@
+ 
+ 	aliases {
+ 		ethernet0 = &gmac0;
+-		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>;
+-			};
+-		};
+ 	};
+ 
+ 	gpio-leds {
+@@ -71,130 +49,6 @@
+ 			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
+ 		};
+ 	};
+-
+-	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>;
+ };
+ 
+ &gmac0 {
+@@ -219,292 +73,6 @@
+ 	status = "okay";
+ };
+ 
+-&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 at 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 at 20 {
+-		compatible = "rockchip,rk809";
+-		reg = <0x20>;
+-		interrupt-parent = <&gpio0>;
+-		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
+-		#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-always-on;
+-				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 at 51 {
+-		compatible = "haoyu,hym8563";
+-		reg = <0x51>;
+-		interrupt-parent = <&gpio0>;
+-		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
+-		#clock-cells = <0>;
+-		clock-output-names = "rtcic_32kout";
+-		pinctrl-names = "default";
+-		pinctrl-0 = <&hym8563_int>;
+-		wakeup-source;
+-	};
+-};
+-
+-&i2s0_8ch {
+-	status = "okay";
+-};
+-
+-&i2s1_8ch {
+-	rockchip,trcm-sync-tx-only;
+-	status = "okay";
+-};
+-
+ &mdio0 {
+ 	rgmii_phy0: ethernet-phy at 1 {
+ 		compatible = "ethernet-phy-ieee802.3-c22";
+@@ -568,146 +136,5 @@
+ 			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
+ 		};
+ 	};
+-
+-	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 at ROCKCHIP_VOP2_EP_HDMI0 {
+-		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
+-		remote-endpoint = <&hdmi_in_vp0>;
+-	};
+-};
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+@@ -0,0 +1,596 @@
++// 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 <cnsztl at gmail.com>
++ */
++
++/dts-v1/;
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++#include <dt-bindings/leds/common.h>
++#include <dt-bindings/pinctrl/rockchip.h>
++#include <dt-bindings/soc/rockchip,vop2.h>
++#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 at 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 at 20 {
++		compatible = "rockchip,rk809";
++		reg = <0x20>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
++		#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-always-on;
++				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 at 51 {
++		compatible = "haoyu,hym8563";
++		reg = <0x51>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
++		#clock-cells = <0>;
++		clock-output-names = "rtcic_32kout";
++		pinctrl-names = "default";
++		pinctrl-0 = <&hym8563_int>;
++		wakeup-source;
++	};
++};
++
++&i2s0_8ch {
++	status = "okay";
++};
++
++&i2s1_8ch {
++	rockchip,trcm-sync-tx-only;
++	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 at ROCKCHIP_VOP2_EP_HDMI0 {
++		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
++		remote-endpoint = <&hdmi_in_vp0>;
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch b/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
new file mode 100644
index 0000000000..47f76d54e7
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
@@ -0,0 +1,49 @@
+From 31425b1fadb2040b359e52ffc24c049a78d56c96 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 18 Mar 2023 16:37:44 +0800
+Subject: [PATCH] arm64: dts: rockchip: fix gmac support for NanoPi R5S
+
+- Changed phy-mode to rgmii.
+
+- Fixed pull type in pinctrl for gmac0.
+
+- Removed duplicate properties in mdio node.
+  These properties are defined in the gmac0 node already.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230318083745.6181-5-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -57,7 +57,7 @@
+ 	assigned-clock-rates = <0>, <125000000>;
+ 	clock_in_out = "output";
+ 	phy-handle = <&rgmii_phy0>;
+-	phy-mode = "rgmii-id";
++	phy-mode = "rgmii";
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&gmac0_miim
+ 		     &gmac0_tx_bus2
+@@ -79,9 +79,6 @@
+ 		reg = <1>;
+ 		pinctrl-0 = <&eth_phy0_reset_pin>;
+ 		pinctrl-names = "default";
+-		reset-assert-us = <10000>;
+-		reset-deassert-us = <50000>;
+-		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
+ 	};
+ };
+ 
+@@ -115,7 +112,7 @@
+ &pinctrl {
+ 	gmac0 {
+ 		eth_phy0_reset_pin: eth-phy0-reset-pin {
+-			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
++			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
+ 		};
+ 	};
+ 
diff --git a/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch b/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
new file mode 100644
index 0000000000..48021b226a
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
@@ -0,0 +1,39 @@
+From 975e9bbad11950fc8276f1fa260d8bf2c341aa41 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 18 Mar 2023 16:37:45 +0800
+Subject: [PATCH] arm64: dts: rockchip: remove I2S1 TDM node for the NanoPi R5
+ series
+
+This is for the audio output which does not exist on the boards.
+Also disable regulator-always-on for vccio_acodec since it's only
+used by the audio output.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230318083745.6181-6-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+@@ -330,7 +330,6 @@
+ 
+ 			vccio_acodec: LDO_REG4 {
+ 				regulator-name = "vccio_acodec";
+-				regulator-always-on;
+ 				regulator-min-microvolt = <3300000>;
+ 				regulator-max-microvolt = <3300000>;
+ 
+@@ -441,11 +440,6 @@
+ 	status = "okay";
+ };
+ 
+-&i2s1_8ch {
+-	rockchip,trcm-sync-tx-only;
+-	status = "okay";
+-};
+-
+ &pcie30phy {
+ 	data-lanes = <1 2>;
+ 	status = "okay";
diff --git a/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch b/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
new file mode 100644
index 0000000000..0465d80cba
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
@@ -0,0 +1,152 @@
+From 05620031408ac6cfc6d5c048431827e49aa0ade1 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 18 Mar 2023 16:37:43 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add 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
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230318083745.6181-4-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |   1 +
+ .../boot/dts/rockchip/rk3568-nanopi-r5c.dts   | 112 ++++++++++++++++++
+ 2 files changed, 113 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -74,5 +74,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
++ */
++
++/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 = <KEY_RESTART>;
++		};
++	};
++
++	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 = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_LAN;
++			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
++		};
++
++		power_led: led-power {
++			color = <LED_COLOR_ID_RED>;
++			function = LED_FUNCTION_POWER;
++			linux,default-trigger = "heartbeat";
++			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-wan {
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_WAN;
++			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-wlan {
++			color = <LED_COLOR_ID_GREEN>;
++			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>;
++		};
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch b/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
new file mode 100644
index 0000000000..0e59f0275b
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
@@ -0,0 +1,37 @@
+From 5325593377f07de31f7e473a9677a28a04c891f3 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Thu, 11 May 2023 00:18:50 +0800
+Subject: [PATCH] arm64: dts: rockchip: fix button reset pin for nanopi r5c
+
+The reset pin was wrongly assigned due to a copy/paste error,
+fix it to match actual gpio pin.
+
+While at it, remove a blank line from nanopi r5s dts.
+
+Fixes: 05620031408a ("arm64: dts: rockchip: Add FriendlyARM NanoPi R5C")
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230510161850.4866-1-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts | 2 +-
+ arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 1 -
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+@@ -106,7 +106,7 @@
+ 
+ 	rockchip-key {
+ 		reset_button_pin: reset-button-pin {
+-			rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
++			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
+ 		};
+ 	};
+ };
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -134,4 +134,3 @@
+ 		};
+ 	};
+ };
+-
diff --git a/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch b/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
new file mode 100644
index 0000000000..01efaa3a9d
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
@@ -0,0 +1,33 @@
+From fc5a80a432607d05e85bba37971712405f75c546 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 16 Dec 2023 12:07:23 +0800
+Subject: [PATCH] arm64: dts: rockchip: configure eth pad driver strength
+ for orangepi r1 plus lts
+
+The default strength is not enough to provide stable connection
+under 3.3v LDO voltage.
+
+Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS")
+Cc: stable at vger.kernel.org # 6.6+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20231216040723.17864-1-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
+@@ -26,9 +26,11 @@
+ 			compatible = "ethernet-phy-ieee802.3-c22";
+ 			reg = <0>;
+ 
++			motorcomm,auto-sleep-disabled;
+ 			motorcomm,clk-out-frequency-hz = <125000000>;
+ 			motorcomm,keep-pll-enabled;
+-			motorcomm,auto-sleep-disabled;
++			motorcomm,rx-clk-drv-microamp = <5020>;
++			motorcomm,rx-data-drv-microamp = <5020>;
+ 
+ 			pinctrl-0 = <&eth_phy_reset_pin>;
+ 			pinctrl-names = "default";
diff --git a/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch b/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
new file mode 100644
index 0000000000..b4a68d1558
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
@@ -0,0 +1,233 @@
+From 096ebfb74b19f2d4bdcbc33ae02e857ff4b3e0a0 Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Thu, 12 Jan 2023 16:29:02 +0530
+Subject: [PATCH] arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
+
+Radxa Compute Module 3(CM3) IO board is an application board from Radxa
+and is compatible with Raspberry Pi CM4 IO form factor.
+
+Specification:
+- 1x HDMI,
+- 2x MIPI DSI
+- 2x MIPI CSI2
+- 1x eDP
+- 1x PCIe card
+- 2x SATA
+- 2x USB 2.0 Host
+- 1x USB 3.0
+- 1x USB 2.0 OTG
+- Phone jack
+- microSD slot
+- 40-pin GPIO expansion header
+- 12V DC
+
+Radxa CM3 needs to mount on top of this IO board in order to create
+complete Radxa CM3 IO board platform.
+
+Add support for Radxa CM3 IO Board.
+
+Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
+Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
+Co-developed-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230112105902.192852-3-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |   1 +
+ .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 179 ++++++++++++++++++
+ 2 files changed, 180 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pi
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -0,0 +1,179 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (c) 2022 Radxa Limited
++ * Copyright (c) 2022 Amarula Solutions(India)
++ */
++
++/dts-v1/;
++#include <dt-bindings/soc/rockchip,vop2.h>
++#include "rk3566.dtsi"
++#include "rk3566-radxa-cm3.dtsi"
++
++/ {
++	model = "Radxa Compute Module 3(CM3) IO Board";
++	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
++
++	aliases {
++		mmc1 = &sdmmc0;
++	};
++
++	chosen: chosen {
++		stdout-path = "serial2:1500000n8";
++	};
++
++	hdmi-con {
++		compatible = "hdmi-connector";
++		type = "a";
++
++		port {
++			hdmi_con_in: endpoint {
++				remote-endpoint = <&hdmi_out_con>;
++			};
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		led-1 {
++			gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_ACTIVITY;
++			linux,default-trigger = "heartbeat";
++			pinctrl-names = "default";
++			pinctrl-0 = <&pi_nled_activity>;
++		};
++	};
++
++	vcc5v0_usb30: vcc5v0-usb30-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc5v0_usb30";
++		enable-active-high;
++		gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&vcc5v0_usb30_en_h>;
++		regulator-always-on;
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&vcc_sys>;
++	};
++
++	vcca1v8_image: vcca1v8-image-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcca1v8_image";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <1800000>;
++		vin-supply = <&vcc_1v8_p>;
++	};
++
++	vdda0v9_image: vdda0v9-image-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcca0v9_image";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <900000>;
++		regulator-max-microvolt = <900000>;
++		vin-supply = <&vdda_0v9>;
++	};
++};
++
++&combphy1 {
++	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";
++};
++
++&pinctrl {
++	leds {
++		pi_nled_activity: pi-nled-activity {
++			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	sdcard {
++		sdmmc_pwren: sdmmc-pwren {
++			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	usb {
++		vcc5v0_usb30_en_h: vcc5v0-host-en-h {
++			rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++};
++
++&sdmmc0 {
++	bus-width = <4>;
++	cap-mmc-highspeed;
++	cap-sd-highspeed;
++	disable-wp;
++	vqmmc-supply = <&vccio_sd>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_pwren>;
++	status = "okay";
++};
++
++&uart2 {
++	status = "okay";
++};
++
++&usb2phy0_host {
++	phy-supply = <&vcc5v0_usb30>;
++	status = "okay";
++};
++
++&usb2phy1_host {
++	status = "okay";
++};
++
++&usb2phy1_otg {
++	status = "okay";
++};
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host1_xhci {
++	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 at ROCKCHIP_VOP2_EP_HDMI0 {
++		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
++		remote-endpoint = <&hdmi_in_vp0>;
++	};
++};
diff --git a/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch b/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
new file mode 100644
index 0000000000..d0a0aa1b69
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
@@ -0,0 +1,63 @@
+From d211665c5a833873ee37e501af58adbf028e6b5f Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Sat, 13 May 2023 21:53:07 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C Plus
+
+The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
+eMMC flash (8G) included.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+Link: https://lore.kernel.org/r/20230513135307.26554-2-cnsztl at gmail.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile              |  1 +
+ .../boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts   | 33 ++++++++++++++++++++++
+ 2 files changed, 34 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
+@@ -0,0 +1,33 @@
++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
++/*
++ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
++ * (http://www.friendlyarm.com)
++ *
++ * Copyright (c) 2023 Tianling Shen <cnsztl at gmail.com>
++ */
++
++/dts-v1/;
++#include "rk3328-nanopi-r2c.dts"
++
++/ {
++	model = "FriendlyElec NanoPi R2C Plus";
++	compatible = "friendlyarm,nanopi-r2c-plus", "rockchip,rk3328";
++
++	aliases {
++		mmc1 = &emmc;
++	};
++};
++
++&emmc {
++	bus-width = <8>;
++	cap-mmc-highspeed;
++	max-frequency = <150000000>;
++	mmc-ddr-1_8v;
++	mmc-hs200-1_8v;
++	non-removable;
++	pinctrl-names = "default";
++	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
++	vmmc-supply = <&vcc_io_33>;
++	vqmmc-supply = <&vcc18_emmc>;
++	status = "okay";
++};
diff --git a/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch b/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
new file mode 100644
index 0000000000..305b5702d5
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
@@ -0,0 +1,131 @@
+From cc52bfc04726a574fc4440bbbe0c710890e7040a Mon Sep 17 00:00:00 2001
+From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Date: Wed, 25 Jan 2023 21:40:22 +0530
+Subject: [PATCH] arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO
+
+Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board.
+
+Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230125161023.12115-1-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 93 +++++++++++++++++++
+ 1 file changed, 93 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -21,6 +21,13 @@
+ 		stdout-path = "serial2:1500000n8";
+ 	};
+ 
++	gmac1_clkin: external-gmac1-clock {
++		compatible = "fixed-clock";
++		clock-frequency = <125000000>;
++		clock-output-names = "gmac1_clkin";
++		#clock-cells = <0>;
++	};
++
+ 	hdmi-con {
+ 		compatible = "hdmi-connector";
+ 		type = "a";
+@@ -83,6 +90,29 @@
+ 	status = "okay";
+ };
+ 
++&gmac1 {
++	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
++	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
++	assigned-clock-rates = <0>, <125000000>;
++	clock_in_out = "input";
++	phy-handle = <&rgmii_phy1>;
++	phy-mode = "rgmii";
++	pinctrl-names = "default";
++	pinctrl-0 = <&gmac1m0_miim
++		     &gmac1m0_tx_bus2
++		     &gmac1m0_rx_bus2
++		     &gmac1m0_rgmii_clk
++		     &gmac1m0_rgmii_bus
++		     &gmac1m0_clkinout>;
++	snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
++	snps,reset-active-low;
++	/* Reset time is 20ms, 100ms for rtl8211f */
++	snps,reset-delays-us = <0 20000 100000>;
++	tx_delay = <0x46>;
++	rx_delay = <0x2e>;
++	status = "okay";
++};
++
+ &hdmi {
+ 	avdd-0v9-supply = <&vdda0v9_image>;
+ 	avdd-1v8-supply = <&vcca1v8_image>;
+@@ -105,7 +135,70 @@
+ 	status = "okay";
+ };
+ 
++&mdio1 {
++	rgmii_phy1: ethernet-phy at 0 {
++		compatible="ethernet-phy-ieee802.3-c22";
++		reg= <0x0>;
++	};
++};
++
+ &pinctrl {
++	gmac1 {
++		gmac1m0_miim: gmac1m0-miim {
++			rockchip,pins =
++				/* gmac1_mdcm0 */
++				<3 RK_PC4 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_mdiom0 */
++				<3 RK_PC5 3 &pcfg_pull_none_drv_level_15>;
++		};
++
++		gmac1m0_rx_bus2: gmac1m0-rx-bus2 {
++			rockchip,pins =
++				/* gmac1_rxd0m0 */
++				<3 RK_PB1 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_rxd1m0 */
++				<3 RK_PB2 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_rxdvcrsm0 */
++				<3 RK_PB3 3 &pcfg_pull_none_drv_level_15>;
++		};
++
++		gmac1m0_tx_bus2: gmac1m0-tx-bus2 {
++			rockchip,pins =
++				/* gmac1_txd0m0 */
++				<3 RK_PB5 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_txd1m0 */
++				<3 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_txenm0 */
++				<3 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
++		};
++
++		gmac1m0_rgmii_clk: gmac1m0-rgmii-clk {
++			rockchip,pins =
++				/* gmac1_rxclkm0 */
++				<3 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_txclkm0 */
++				<3 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
++		};
++
++		gmac1m0_rgmii_bus: gmac1m0-rgmii-bus {
++			rockchip,pins =
++				/* gmac1_rxd2m0 */
++				<3 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_rxd3m0 */
++				<3 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_txd2m0 */
++				<3 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
++				/* gmac1_txd3m0 */
++				<3 RK_PA3 3 &pcfg_pull_none_drv_level_15>;
++		};
++
++		gmac1m0_clkinout: gmac1m0-clkinout {
++			rockchip,pins =
++				/* gmac1_mclkinoutm0 */
++				<3 RK_PC0 3 &pcfg_pull_none_drv_level_15>;
++		};
++	};
++
+ 	leds {
+ 		pi_nled_activity: pi-nled-activity {
+ 			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
diff --git a/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch b/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
new file mode 100644
index 0000000000..e53f7fa7e0
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
@@ -0,0 +1,386 @@
+From 7469ab529bcad50490f6ff651c3e4f03bfa88fe0 Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Thu, 12 Jan 2023 16:29:01 +0530
+Subject: [PATCH] arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Radxa Compute Module 3(CM3) is one of the modules from a series
+System On Module based on the Radxa ROCK 3 series and is compatible
+with Raspberry Pi CM4 pinout and form factor.
+
+Specification:
+- Rockchip RK3566
+- up to 8GB LPDDR4
+- up to 128GB high performance eMMC
+- Optional wireless LAN, 2.4GHz and 5.0GHz IEEE 802.11b/g/n/ac wireless,
+  BT 5.0, BLE with onboard and external antenna.
+- Gigabit Ethernet PHY
+
+Radxa CM3 needs to mount on top of this IO board in order to create
+complete Radxa CM3 IO board platform.
+
+Since Radxa CM3 is compatible with Raspberry Pi CM4 pinout so it is
+possible to mount Radxa CM3 on top of the?Rasberry Pi CM4 IO board.
+
+Add support for Radxa CM3.
+
+Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
+Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230112105902.192852-2-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 345 ++++++++++++++++++
+ 1 file changed, 345 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+@@ -0,0 +1,345 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (c) 2022 Radxa Limited
++ * Copyright (c) 2022 Amarula Solutions(India)
++ */
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/leds/common.h>
++
++/ {
++	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
++
++	aliases {
++		mmc0 = &sdhci;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		led-0 {
++			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_STATUS;
++			linux,default-trigger = "timer";
++			default-state = "on";
++			pinctrl-names = "default";
++			pinctrl-0 = <&user_led2>;
++		};
++	};
++
++	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>;
++	};
++
++	vcc_1v8: vcc-1v8-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_1v8";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <1800000>;
++		vin-supply = <&vcc_1v8_p>;
++	};
++
++	vcc_3v3: vcc-3v3-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc_3v3";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc3v3_sys>;
++	};
++
++	vcca_1v8: vcca-1v8-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcca_1v8";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <1800000>;
++		regulator-max-microvolt = <1800000>;
++		vin-supply = <&vcc_1v8_p>;
++	};
++};
++
++&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_npu>;
++	status = "okay";
++};
++
++&i2c0 {
++	status = "okay";
++
++	vdd_cpu: regulator at 1c {
++		compatible = "tcs,tcs4525";
++		reg = <0x1c>;
++		fcs,suspend-voltage-selector = <1>;
++		regulator-name = "vdd_cpu";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <712500>;
++		regulator-max-microvolt = <1390000>;
++		regulator-ramp-delay = <2300>;
++		vin-supply = <&vcc_sys>;
++
++		regulator-state-mem {
++			regulator-off-in-suspend;
++		};
++	};
++
++	rk817: pmic at 20 {
++		compatible = "rockchip,rk817";
++		reg = <0x20>;
++		#clock-cells = <1>;
++		clock-output-names = "rk817-clkout1", "rk817-clkout2";
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pmic_int_l>;
++		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_sys>;
++		vcc6-supply = <&vcc_sys>;
++		vcc7-supply = <&vcc_sys>;
++
++		regulators {
++			vdd_logic: DCDC_REG1 {
++				regulator-name = "vdd_logic";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-initial-mode = <0x2>;
++				regulator-min-microvolt = <500000>;
++				regulator-max-microvolt = <1350000>;
++				regulator-ramp-delay = <6001>;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <900000>;
++				};
++			};
++
++			vdd_gpu_npu: DCDC_REG2 {
++				regulator-name = "vdd_gpu_npu";
++				regulator-always-on;
++				regulator-boot-on;
++				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;
++				};
++			};
++
++			vcc3v3_sys: DCDC_REG4 {
++				regulator-name = "vcc3v3_sys";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-initial-mode = <0x2>;
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-state-mem {
++					regulator-on-in-suspend;
++					regulator-suspend-microvolt = <3300000>;
++				};
++			};
++
++			vcca1v8_pmu: LDO_REG1 {
++				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>;
++				};
++			};
++
++			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-always-on;
++				regulator-boot-on;
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-state-mem {
++					regulator-off-in-suspend;
++				};
++			};
++
++			vccio_sd: LDO_REG5 {
++				regulator-name = "vccio_sd";
++				regulator-always-on;
++				regulator-boot-on;
++				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>;
++				};
++			};
++
++			vcc_1v8_p: LDO_REG7 {
++				regulator-name = "vcc_1v8_p";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-state-mem {
++					regulator-off-in-suspend;
++				};
++			};
++
++			vcc1v8_dvp: LDO_REG8 {
++				regulator-name = "vcc1v8_dvp";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-state-mem {
++					regulator-off-in-suspend;
++				};
++			};
++
++			vcc2v8_dvp: LDO_REG9 {
++				regulator-name = "vcc2v8_dvp";
++				regulator-always-on;
++				regulator-boot-on;
++				regulator-min-microvolt = <2800000>;
++				regulator-max-microvolt = <2800000>;
++				regulator-state-mem {
++					regulator-off-in-suspend;
++				};
++			};
++
++		};
++	};
++};
++
++&pinctrl {
++	pmic {
++		pmic_int_l: pmic-int-l {
++			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++
++	leds {
++		user_led2: user-led2 {
++			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++};
++
++&pmu_io_domains {
++	pmuio1-supply = <&vcc3v3_pmu>;
++	pmuio2-supply = <&vcc_3v3>;
++	vccio1-supply = <&vccio_acodec>;
++	vccio2-supply = <&vcc_1v8>;
++	vccio3-supply = <&vccio_sd>;
++	vccio4-supply = <&vcc_1v8>;
++	vccio5-supply = <&vcc_3v3>;
++	vccio6-supply = <&vcc_3v3>;
++	vccio7-supply = <&vcc_3v3>;
++	status = "okay";
++};
++
++&saradc {
++	vref-supply = <&vcca_1v8>;
++	status = "okay";
++};
++
++&sdhci {
++	bus-width = <8>;
++	max-frequency = <200000000>;
++	mmc-hs200-1_8v;
++	non-removable;
++	pinctrl-names = "default";
++	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
++	vmmc-supply = <&vcc_3v3>;
++	vqmmc-supply = <&vcc_1v8>;
++	status = "okay";
++};
++
++&usb2phy0 {
++	status = "okay";
++};
++
++&usb2phy1 {
++	status = "okay";
++};
++
++&tsadc {
++	rockchip,hw-tshut-mode = <1>;
++	rockchip,hw-tshut-polarity = <0>;
++	status = "okay";
++};
diff --git a/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
new file mode 100644
index 0000000000..9855b9e1a6
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
@@ -0,0 +1,134 @@
+From af5a803bf212e077e5fb7a1d4cf6be02f74a74ca Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Wed, 25 Jan 2023 21:40:23 +0530
+Subject: [PATCH] arm64: dts: rockchip: rk3566: Enable WiFi, BT support for
+ Radxa CM3
+
+Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module.
+
+Add nodes for enabling it.
+
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 80 +++++++++++++++++++
+ 1 file changed, 80 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+@@ -66,6 +66,15 @@
+ 		regulator-max-microvolt = <1800000>;
+ 		vin-supply = <&vcc_1v8_p>;
+ 	};
++
++	sdio_pwrseq: pwrseq-sdio {
++		compatible = "mmc-pwrseq-simple";
++		clocks = <&rk817 1>;
++		clock-names = "ext_clock";
++		pinctrl-names = "default";
++		pinctrl-0 = <&wifi_reg_on_h>;
++		reset-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>;
++	};
+ };
+ 
+ &cpu0 {
+@@ -287,6 +296,20 @@
+ };
+ 
+ &pinctrl {
++	bluetooth {
++		bt_host_wake_h: bt-host-wake-h {
++			rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		bt_reg_on_h: bt-reg-on-h {
++			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		bt_wake_host_h: bt-wake-host-h {
++			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
+ 	pmic {
+ 		pmic_int_l: pmic-int-l {
+ 			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
+@@ -298,6 +321,16 @@
+ 			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ 		};
+ 	};
++
++	wifi {
++		wifi_reg_on_h: wifi-reg-on-h {
++			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		wifi_host_wake_h: wifi-host-wake-h {
++			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
+ };
+ 
+ &pmu_io_domains {
+@@ -318,6 +351,34 @@
+ 	status = "okay";
+ };
+ 
++&sdmmc1 {
++	#address-cells = <1>;
++	#size-cells = <0>;
++	bus-width = <4>;
++	disable-wp;
++	cap-sd-highspeed;
++	cap-sdio-irq;
++	keep-power-in-suspend;
++	mmc-pwrseq = <&sdio_pwrseq>;
++	non-removable;
++	pinctrl-names = "default";
++	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;
++	sd-uhs-sdr104;
++	vmmc-supply = <&vcc_3v3>;
++	vqmmc-supply = <&vcc_1v8>;
++	status = "okay";
++
++	wifi at 1 {
++		compatible = "brcm,bcm43455-fmac";
++		reg = <1>;
++		interrupt-parent = <&gpio2>;
++		interrupts = <RK_PC1 IRQ_TYPE_LEVEL_HIGH>;
++		interrupt-names = "host-wake";
++		pinctrl-names = "default";
++		pinctrl-0 = <&wifi_host_wake_h>;
++	};
++};
++
+ &sdhci {
+ 	bus-width = <8>;
+ 	max-frequency = <200000000>;
+@@ -330,6 +391,25 @@
+ 	status = "okay";
+ };
+ 
++&uart1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart1m0_ctsn &uart1m0_rtsn &uart1m0_xfer>;
++	status = "okay";
++
++	bluetooth {
++		compatible = "brcm,bcm4345c5";
++		clocks = <&rk817 1>;
++		clock-names = "lpo";
++		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
++		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
++		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
++		vbat-supply = <&vcc_3v3>;
++		vddio-supply = <&vcc_1v8>;
++	};
++};
++
+ &usb2phy0 {
+ 	status = "okay";
+ };
diff --git a/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
new file mode 100644
index 0000000000..bfd6dbe0db
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
@@ -0,0 +1,32 @@
+From 477ed3ade6a46e445b4e2348b710c51df4f6f4b1 Mon Sep 17 00:00:00 2001
+From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Date: Thu, 23 Feb 2023 19:29:29 +0530
+Subject: [PATCH] arm64: dts: rockchip: Enable USB OTG for rk3566 Radxa CM3
+
+Enable USB OTG support for Radxa Compute Module 3 IO Board
+
+Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230223135929.630787-1-abbaraju.manojsai at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -254,6 +254,14 @@
+ 	status = "okay";
+ };
+ 
++&usb2phy0_otg {
++	status = "okay";
++};
++
++&usb_host0_xhci {
++	status = "okay";
++};
++
+ &vop {
+ 	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
+ 	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
diff --git a/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
new file mode 100644
index 0000000000..e7e3ea0100
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
@@ -0,0 +1,45 @@
+From 8f19828844f20b22182719cf53be64f8c955aee8 Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Mon, 23 Jan 2023 12:46:50 +0530
+Subject: [PATCH] arm64: dts: rockchip: Fix compatible for Radxa CM3
+
+The compatible string "radxa,radxa-cm3" referring the product name
+as "Radxa Radxa CM3" but the actual product name is "Radxa CM3".
+
+Fix the compatible strings.
+
+Fixes: 24a28d3eb07d ("dt-bindings: arm: rockchip: Add Radxa Compute Module 3")
+Fixes: 7469ab529bca ("arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3")
+Fixes: 096ebfb74b19 ("arm64: dts: rockchip: Add Radxa Compute Module 3 IO board")
+Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Link: https://lore.kernel.org/r/20230123071654.73139-1-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 2 +-
+ arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -11,7 +11,7 @@
+ 
+ / {
+ 	model = "Radxa Compute Module 3(CM3) IO Board";
+-	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
++	compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
+ 
+ 	aliases {
+ 		mmc1 = &sdmmc0;
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+@@ -8,7 +8,7 @@
+ #include <dt-bindings/leds/common.h>
+ 
+ / {
+-	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
++	compatible = "radxa,cm3", "rockchip,rk3566";
+ 
+ 	aliases {
+ 		mmc0 = &sdhci;
diff --git a/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch b/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
new file mode 100644
index 0000000000..8342c14ea4
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
@@ -0,0 +1,28 @@
+From f99a75f11f46a24dabb33e90893eebf61dca0566 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Date: Sun, 2 Jul 2023 20:52:42 +0200
+Subject: [PATCH] arm64: dts: rockchip: minor whitespace cleanup around '='
+
+The DTS code coding style expects exactly one space before and after '='
+sign.
+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Link: https://lore.kernel.org/r/20230702185242.44421-1-krzysztof.kozlowski at linaro.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts    |  4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -137,8 +137,8 @@
+ 
+ &mdio1 {
+ 	rgmii_phy1: ethernet-phy at 0 {
+-		compatible="ethernet-phy-ieee802.3-c22";
+-		reg= <0x0>;
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <0x0>;
+ 	};
+ };
+ 
diff --git a/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch b/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
new file mode 100644
index 0000000000..fb5015cf6e
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
@@ -0,0 +1,28 @@
+From 36d9b3ae708e865cdab95692db5a24c5d975383d Mon Sep 17 00:00:00 2001
+From: Dragan Simic <dsimic at manjaro.org>
+Date: Tue, 12 Dec 2023 09:01:39 +0100
+Subject: [PATCH] arm64: dts: rockchip: Add ethernet0 alias to the dts for
+ RK3566 boards
+
+Add ethernet0 alias to the board dts files for a few supported RK3566 boards
+that had it missing.  Also, remove the ethernet0 alias from one RK3566 SoM
+dtsi file, which doesn't enable the GMAC, and add the ethernet0 alias back to
+the dependent board dts files, which actually enable the GMAC.
+
+Signed-off-by: Dragan Simic <dsimic at manjaro.org>
+Link: https://lore.kernel.org/r/d2a272e0ae0fff0adfab8bb0238243b11d348799.1702368023.git.dsimic at manjaro.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts     | 1 +
+ 1 files changed, 1 insertions(+), 0 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -14,6 +14,7 @@
+ 	compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
+ 
+ 	aliases {
++		ethernet0 = &gmac1;
+ 		mmc1 = &sdmmc0;
+ 	};
+ 
diff --git a/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch b/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
new file mode 100644
index 0000000000..354c546d7e
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
@@ -0,0 +1,689 @@
+From 2bf2f4d9f673013a58109626b87329310537a611 Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Fri, 9 Dec 2022 18:25:24 +0800
+Subject: [PATCH] arm64: dts: rockchip: Add Radxa CM3I E25
+
+Radxa E25 is a network application carrier board for the Radxa CM3
+Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC.
+
+It has the following features:
+
+- MicroSD card socket, on board eMMC flash
+- 2x 2.5GbE Realtek RTL8125B Ethernet transceiver
+- 1x USB Type-C port (Power and Serial console)
+- 1x USB 3.0 OTG port
+- mini PCIe socket (USB or PCIe)
+- ngff PCIe socket (USB or SATA)
+- 1x User LED and 16x RGB LEDs
+- 26-pin expansion header
+
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+Link: https://lore.kernel.org/r/20221209102524.129367-3-amadeus at jmu.edu.cn
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/Makefile         |   1 +
+ .../boot/dts/rockchip/rk3568-radxa-cm3i.dtsi  | 416 ++++++++++++++++++
+ .../boot/dts/rockchip/rk3568-radxa-e25.dts    | 229 ++++++++++
+ 3 files changed, 646 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
+ create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+
+--- a/arch/arm64/boot/dts/rockchip/Makefile
++++ b/arch/arm64/boot/dts/rockchip/Makefile
+@@ -78,4 +78,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
+ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
+@@ -0,0 +1,416 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/leds/common.h>
++#include <dt-bindings/pinctrl/rockchip.h>
++#include "rk3568.dtsi"
++
++/ {
++	model = "Radxa CM3 Industrial Board";
++	compatible = "radxa,cm3i", "rockchip,rk3568";
++
++	aliases {
++		mmc0 = &sdhci;
++	};
++
++	chosen {
++		stdout-path = "serial2:115200n8";
++	};
++
++	gpio-leds {
++		compatible = "gpio-leds";
++
++		led_user: led-0 {
++			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
++			function = LED_FUNCTION_HEARTBEAT;
++			color = <LED_COLOR_ID_GREEN>;
++			linux,default-trigger = "heartbeat";
++			pinctrl-names = "default";
++			pinctrl-0 = <&led_user_en>;
++		};
++	};
++
++	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>;
++	};
++
++	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 = <&vcc5v_input>;
++	};
++
++	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 = <&vcc5v_input>;
++	};
++
++	/* labeled +5v_input in schematic */
++	vcc5v_input: vcc5v-input-regulator {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc5v_input";
++		regulator-always-on;
++		regulator-boot-on;
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++	};
++};
++
++&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>;
++};
++
++&display_subsystem {
++	status = "disabled";
++};
++
++&gpu {
++	mali-supply = <&vdd_gpu>;
++	status = "okay";
++};
++
++&i2c0 {
++	status = "okay";
++
++	vdd_cpu: regulator at 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 = <&vcc5v_input>;
++
++		regulator-state-mem {
++			regulator-off-in-suspend;
++		};
++	};
++
++	rk809: pmic at 20 {
++		compatible = "rockchip,rk809";
++		reg = <0x20>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
++		#clock-cells = <1>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pmic_int>;
++		rockchip,system-power-controller;
++		wakeup-source;
++
++		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>;
++
++		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 = <900000>;
++				regulator-max-microvolt = <900000>;
++
++				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-always-on;
++				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-state-mem {
++					regulator-off-in-suspend;
++				};
++			};
++		};
++	};
++};
++
++&pinctrl {
++	leds {
++		led_user_en: led_user_en {
++			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	pmic {
++		pmic_int: pmic_int {
++			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
++		};
++	};
++};
++
++&pmu_io_domains {
++	pmuio1-supply = <&vcc3v3_pmu>;
++	pmuio2-supply = <&vcc3v3_pmu>;
++	vccio1-supply = <&vccio_acodec>;
++	vccio2-supply = <&vcc_1v8>;
++	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 &emmc_datastrobe>;
++	vmmc-supply = <&vcc_3v3>;
++	vqmmc-supply = <&vcc_1v8>;
++	status = "okay";
++};
++
++&tsadc {
++	rockchip,hw-tshut-mode = <1>;
++	rockchip,hw-tshut-polarity = <0>;
++	status = "okay";
++};
++
++&uart2 {
++	status = "okay";
++};
++
++&usb2phy0 {
++	status = "okay";
++};
++
++&usb2phy1 {
++	status = "okay";
++};
++
++&usb_host0_xhci {
++	extcon = <&usb2phy0>;
++};
+--- /dev/null
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -0,0 +1,229 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++
++/dts-v1/;
++#include "rk3568-radxa-cm3i.dtsi"
++
++/ {
++	model = "Radxa E25";
++	compatible = "radxa,e25", "rockchip,rk3568";
++
++	aliases {
++		mmc0 = &sdmmc0;
++		mmc1 = &sdhci;
++	};
++
++	pwm-leds {
++		compatible = "pwm-leds-multicolor";
++
++		multi-led {
++			color = <LED_COLOR_ID_RGB>;
++			max-brightness = <255>;
++
++			led-red {
++				color = <LED_COLOR_ID_RED>;
++				pwms = <&pwm1 0 1000000 0>;
++			};
++
++			led-green {
++				color = <LED_COLOR_ID_GREEN>;
++				pwms = <&pwm2 0 1000000 0>;
++			};
++
++			led-blue {
++				color = <LED_COLOR_ID_BLUE>;
++				pwms = <&pwm12 0 1000000 0>;
++			};
++		};
++	};
++
++	vbus_typec: vbus-typec-regulator {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&vbus_typec_en>;
++		regulator-name = "vbus_typec";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
++	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&minipcie_enable_h>;
++		regulator-name = "vcc3v3_minipcie";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
++	vcc3v3_ngff: vcc3v3-ngff-regulator {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&ngffpcie_enable_h>;
++		regulator-name = "vcc3v3_ngff";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++
++	/* actually fed by vcc5v0_sys, dependent
++	 * on pi6c clock generator
++	 */
++	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pcie30x1_enable_h>;
++		regulator-name = "vcc3v3_pcie30x1";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc3v3_pi6c_05>;
++	};
++
++	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
++		compatible = "regulator-fixed";
++		enable-active-high;
++		gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
++		pinctrl-names = "default";
++		pinctrl-0 = <&pcie_enable_h>;
++		regulator-name = "vcc3v3_pcie";
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc5v0_sys>;
++	};
++};
++
++&pcie2x1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pcie20_reset_h>;
++	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
++	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
++	status = "okay";
++};
++
++&pcie30phy {
++	data-lanes = <1 2>;
++	status = "okay";
++};
++
++&pcie3x1 {
++	num-lanes = <1>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pcie30x1m0_pins>;
++	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
++	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
++	status = "okay";
++};
++
++&pcie3x2 {
++	num-lanes = <1>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&pcie30x2_reset_h>;
++	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
++	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
++	status = "okay";
++};
++
++&pinctrl {
++	pcie {
++		pcie20_reset_h: pcie20-reset-h {
++			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		pcie30x1_enable_h: pcie30x1-enable-h {
++			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		pcie30x2_reset_h: pcie30x2-reset-h {
++			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		pcie_enable_h: pcie-enable-h {
++			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++
++	usb {
++		minipcie_enable_h: minipcie-enable-h {
++			rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		ngffpcie_enable_h: ngffpcie-enable-h {
++			rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++
++		vbus_typec_en: vbus_typec_en {
++			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
++		};
++	};
++};
++
++&pwm1 {
++	status = "okay";
++};
++
++&pwm2 {
++	status = "okay";
++};
++
++&pwm12 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&pwm12m1_pins>;
++	status = "okay";
++};
++
++&sdmmc0 {
++	bus-width = <4>;
++	cap-sd-highspeed;
++	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
++	/* Also used in pcie30x1_clkreqnm0 */
++	disable-wp;
++	pinctrl-names = "default";
++	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>;
++	sd-uhs-sdr104;
++	vmmc-supply = <&vcc3v3_sd>;
++	vqmmc-supply = <&vccio_sd>;
++	status = "okay";
++};
++
++&usb_host0_ehci {
++	status = "okay";
++};
++
++&usb_host0_ohci {
++	status = "okay";
++};
++
++&usb_host0_xhci {
++	status = "okay";
++};
++
++&usb_host1_ehci {
++	status = "okay";
++};
++
++&usb_host1_ohci {
++	status = "okay";
++};
++
++&usb2phy0_otg {
++	phy-supply = <&vbus_typec>;
++	status = "okay";
++};
++
++&usb2phy1_host {
++	phy-supply = <&vcc3v3_minipcie>;
++	status = "okay";
++};
++
++&usb2phy1_otg {
++	phy-supply = <&vcc3v3_ngff>;
++	status = "okay";
++};
diff --git a/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch b/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
new file mode 100644
index 0000000000..e556e2eb42
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
@@ -0,0 +1,48 @@
+From c80992abd2877590059e9cb254213c16824e2106 Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Wed, 18 Jan 2023 13:34:53 +0530
+Subject: [PATCH] arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM
+ boards
+
+Radxa has produced Compute Modules like RK3399pro VMARC and CM3i with
+onboarding eMMC flash, so the eMMC is the primary MMC device.
+
+On the other hand, Rockchip boot orders start from eMMC from an MMC
+device perspective.
+
+Mark, the eMMC has mmc0 to satisfy the above two conditions.
+
+Reported-by: FUKAUMI Naoki <naoki at radxa.com>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230118080454.11643-1-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 ++--
+ arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts     | 3 +--
+ 2 files changed, 3 insertions(+), 4 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
+@@ -13,8 +13,8 @@
+ 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
+ 
+ 	aliases {
+-		mmc0 = &sdmmc;
+-		mmc1 = &sdhci;
++		mmc0 = &sdhci;
++		mmc1 = &sdmmc;
+ 	};
+ 
+ 	vcc3v3_pcie: vcc-pcie-regulator {
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -8,8 +8,7 @@
+ 	compatible = "radxa,e25", "rockchip,rk3568";
+ 
+ 	aliases {
+-		mmc0 = &sdmmc0;
+-		mmc1 = &sdhci;
++		mmc1 = &sdmmc0;
+ 	};
+ 
+ 	pwm-leds {
diff --git a/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch b/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
new file mode 100644
index 0000000000..c1f1a09219
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
@@ -0,0 +1,35 @@
+From c4d2b02d63ee38b381fbc886c02eecfec4f981cc Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Mon, 23 Jan 2023 12:46:51 +0530
+Subject: [PATCH] arm64: dts: rockchip: Add missing CM3i fallback compatible
+ for Radxa E25
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In order to function the Radxa E25 Carrier board, it is mandatory to
+mount the Radxa CM3i module.?
+
+Add Radxa CM3i compatible as fallback compatible to string to satisfy
+the Module and Carrier board topology.
+
+Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
+Cc: Chukun Pan <amadeus at jmu.edu.cn>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230123071654.73139-2-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -5,7 +5,7 @@
+ 
+ / {
+ 	model = "Radxa E25";
+-	compatible = "radxa,e25", "rockchip,rk3568";
++	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
+ 
+ 	aliases {
+ 		mmc1 = &sdmmc0;
diff --git a/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
new file mode 100644
index 0000000000..84e87bae05
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
@@ -0,0 +1,28 @@
+From ef9134d9bbce071c9e4ebdcbb6f8fb1a5dd0a67e Mon Sep 17 00:00:00 2001
+From: Jagan Teki <jagan at amarulasolutions.com>
+Date: Mon, 23 Jan 2023 12:46:53 +0530
+Subject: [PATCH] arm64: dts: rockchip: Correct the model name for Radxa E25
+
+Radxa E25 is a Carrier board, so update the model name for Radxa E25
+as suggested by the Radxa website.
+
+Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
+Cc: Chukun Pan <amadeus at jmu.edu.cn>
+Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
+Link: https://lore.kernel.org/r/20230123071654.73139-4-jagan at amarulasolutions.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -4,7 +4,7 @@
+ #include "rk3568-radxa-cm3i.dtsi"
+ 
+ / {
+-	model = "Radxa E25";
++	model = "Radxa E25 Carrier Board";
+ 	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
+ 
+ 	aliases {
diff --git a/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
new file mode 100644
index 0000000000..da02c4c001
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
@@ -0,0 +1,79 @@
+From a87852e37f782257ebc57cc44a0d3fbf806471f6 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Mon, 24 Jul 2023 14:52:16 +0000
+Subject: [PATCH] arm64: dts: rockchip: Fix PCIe regulators on Radxa E25
+
+Despite its name, the regulator vcc3v3_pcie30x1 has nothing to do with
+pcie30x1. Instead, it supply power to VBAT1-5 on the M.2 KEY B port as
+seen on page 8 of the schematic [1].
+
+pcie30x1 is used for the mini PCIe slot, and as seen on page 9 the
+vcc3v3_minipcie regulator is instead related to pcie30x1.
+
+The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
+
+Use correct regulator vcc3v3_minipcie for pcie30x1.
+
+[1] https://dl.radxa.com/cm3p/e25/radxa-e25-v1.4-sch.pdf
+
+Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ .../arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -47,6 +47,9 @@
+ 		vin-supply = <&vcc5v0_sys>;
+ 	};
+ 
++	/* actually fed by vcc5v0_sys, dependent
++	 * on pi6c clock generator
++	 */
+ 	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
+ 		compatible = "regulator-fixed";
+ 		enable-active-high;
+@@ -54,9 +57,9 @@
+ 		pinctrl-names = "default";
+ 		pinctrl-0 = <&minipcie_enable_h>;
+ 		regulator-name = "vcc3v3_minipcie";
+-		regulator-min-microvolt = <5000000>;
+-		regulator-max-microvolt = <5000000>;
+-		vin-supply = <&vcc5v0_sys>;
++		regulator-min-microvolt = <3300000>;
++		regulator-max-microvolt = <3300000>;
++		vin-supply = <&vcc3v3_pi6c_05>;
+ 	};
+ 
+ 	vcc3v3_ngff: vcc3v3-ngff-regulator {
+@@ -71,9 +74,6 @@
+ 		vin-supply = <&vcc5v0_sys>;
+ 	};
+ 
+-	/* actually fed by vcc5v0_sys, dependent
+-	 * on pi6c clock generator
+-	 */
+ 	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
+ 		compatible = "regulator-fixed";
+ 		enable-active-high;
+@@ -83,7 +83,7 @@
+ 		regulator-name = "vcc3v3_pcie30x1";
+ 		regulator-min-microvolt = <3300000>;
+ 		regulator-max-microvolt = <3300000>;
+-		vin-supply = <&vcc3v3_pi6c_05>;
++		vin-supply = <&vcc5v0_sys>;
+ 	};
+ 
+ 	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
+@@ -117,7 +117,7 @@
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pcie30x1m0_pins>;
+ 	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
+-	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
++	vpcie3v3-supply = <&vcc3v3_minipcie>;
+ 	status = "okay";
+ };
+ 
diff --git a/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
new file mode 100644
index 0000000000..c0abdeb267
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
@@ -0,0 +1,41 @@
+From 2bdfe84fbd57a4ed9fd65a67210442559ce078f0 Mon Sep 17 00:00:00 2001
+From: Jonas Karlman <jonas at kwiboo.se>
+Date: Mon, 24 Jul 2023 14:52:16 +0000
+Subject: [PATCH] arm64: dts: rockchip: Enable SATA on Radxa E25
+
+The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
+
+Enable sata1 node to fix use of SATA drives on the M.2 slot.
+
+Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
+Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
+Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -99,6 +99,10 @@
+ 	};
+ };
+ 
++&combphy1 {
++	phy-supply = <&vcc3v3_pcie30x1>;
++};
++
+ &pcie2x1 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&pcie20_reset_h>;
+@@ -178,6 +182,10 @@
+ 	status = "okay";
+ };
+ 
++&sata1 {
++	status = "okay";
++};
++
+ &sdmmc0 {
+ 	bus-width = <4>;
+ 	cap-sd-highspeed;
diff --git a/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch b/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
new file mode 100644
index 0000000000..9be609f661
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
@@ -0,0 +1,27 @@
+From 437644753208092f642b7669c69da606aa07dfb4 Mon Sep 17 00:00:00 2001
+From: Tim Lunn <tim at feathertop.org>
+Date: Wed, 14 Feb 2024 15:07:30 +1100
+Subject: [PATCH] arm64: dts: rockchip: adjust vendor on Banana Pi R2 Pro board
+
+Adjust compatible string to match the board vendor of Sinovoip
+
+Signed-off-by: Tim Lunn <tim at feathertop.org>
+Reviewed-by: Dragan Simic <dsimic at manjaro.org>
+Acked-by: Conor Dooley <conor.dooley at microchip.com>
+Link: https://lore.kernel.org/r/20240214040731.3069111-4-tim at feathertop.org
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -13,7 +13,7 @@
+ 
+ / {
+ 	model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
+-	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
++	compatible = "sinovoip,rk3568-bpi-r2pro", "rockchip,rk3568";
+ 
+ 	aliases {
+ 		ethernet0 = &gmac0;
diff --git a/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch b/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
new file mode 100644
index 0000000000..6a5622b813
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
@@ -0,0 +1,40 @@
+From a2ac2a1b02590a22a236c43c455f421cdede45f5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 15:24:35 +0300
+Subject: [PATCH] arm64: dts: rockchip: set PHY address of MT7531 switch to
+ 0x1f
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7531 switch listens on PHY address 0x1f on an MDIO bus. I've got two
+findings that support this. There's no bootstrapping option to change the
+PHY address of the switch. The Linux driver hardcodes 0x1f as the PHY
+address of the switch. So the reg property on the device tree is currently
+ignored by the Linux driver.
+
+Therefore, describe the correct PHY address on Banana Pi BPI-R2 Pro that
+has this switch.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Fixes: c1804463e5c6 ("arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board")
+Link: https://lore.kernel.org/r/20240314-for-rockchip-mt7531-phy-address-v1-1-743b5873358f at arinc9.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -521,9 +521,9 @@
+ 	#address-cells = <1>;
+ 	#size-cells = <0>;
+ 
+-	switch at 0 {
++	switch at 1f {
+ 		compatible = "mediatek,mt7531";
+-		reg = <0>;
++		reg = <0x1f>;
+ 
+ 		ports {
+ 			#address-cells = <1>;
diff --git a/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch b/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
new file mode 100644
index 0000000000..dca18f5c58
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
@@ -0,0 +1,33 @@
+From 433d54818f64a2fe0562f8c04c7a81f562368515 Mon Sep 17 00:00:00 2001
+From: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
+Date: Tue, 5 Mar 2024 15:32:18 +0100
+Subject: [PATCH] arm64: dts: rockchip: regulator for sd needs to be always on
+ for BPI-R2Pro
+
+With default dts configuration for BPI-R2Pro, the regulator for sd card is
+powered off when reboot is commanded, and the only solution to detect the
+sd card again, and therefore, allow rebooting from there, is to do a
+hardware reset.
+
+Configure the regulator for sd to be always on for BPI-R2Pro in order to
+avoid this issue.
+
+Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro")
+Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
+Link: https://lore.kernel.org/r/20240305143222.189413-1-jtornosm at redhat.com
+Signed-off-by: Heiko Stuebner <heiko at sntech.de>
+---
+ arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
+@@ -412,6 +412,8 @@
+ 
+ 			vccio_sd: LDO_REG5 {
+ 				regulator-name = "vccio_sd";
++				regulator-always-on;
++				regulator-boot-on;
+ 				regulator-min-microvolt = <1800000>;
+ 				regulator-max-microvolt = <3300000>;
+ 
diff --git a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch b/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch
new file mode 100644
index 0000000000..683e5347f7
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch
@@ -0,0 +1,77 @@
+From 6731d2c9039fbe1ecf21915eab3acee0a999508a Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Fri, 10 Jul 2020 21:38:20 +0200
+Subject: [PATCH] rockchip: use system LED for OpenWrt
+
+Use the SYS LED on the casing for showing system status.
+
+This patch is kept separate from the NanoPi R2S support patch, as i plan
+on submitting the device support upstream.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
+@@ -6,6 +6,7 @@
+ /dts-v1/;
+ 
+ #include <dt-bindings/input/input.h>
++#include <dt-bindings/leds/common.h>
+ #include <dt-bindings/gpio/gpio.h>
+ #include "rk3328.dtsi"
+ 
+@@ -16,6 +17,11 @@
+ 	aliases {
+ 		ethernet1 = &rtl8153;
+ 		mmc0 = &sdmmc;
++
++		led-boot = &sys_led;
++		led-failsafe = &sys_led;
++		led-running = &sys_led;
++		led-upgrade = &sys_led;
+ 	};
+ 
+ 	chosen {
+@@ -48,19 +54,22 @@
+ 		pinctrl-names = "default";
+ 
+ 		lan_led: led-0 {
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_LAN;
+ 			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
+-			label = "nanopi-r2s:green:lan";
+ 		};
+ 
+ 		sys_led: led-1 {
++			color = <LED_COLOR_ID_RED>;
++			function = LED_FUNCTION_STATUS;
+ 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
+-			label = "nanopi-r2s:red:sys";
+ 			default-state = "on";
+ 		};
+ 
+ 		wan_led: led-2 {
++			color = <LED_COLOR_ID_GREEN>;
++			function = LED_FUNCTION_WAN;
+ 			gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
+-			label = "nanopi-r2s:green:wan";
+ 		};
+ 	};
+ 
+--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+@@ -13,6 +13,11 @@
+ 	aliases {
+ 		mmc0 = &sdmmc;
+ 		mmc1 = &emmc;
++
++		led-boot = &power_led;
++		led-failsafe = &power_led;
++		led-running = &power_led;
++		led-upgrade = &power_led;
+ 	};
+ 
+ 	chosen {
diff --git a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch b/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
new file mode 100644
index 0000000000..eeef0df014
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
@@ -0,0 +1,24 @@
+From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Sun, 26 Jul 2020 13:32:59 +0200
+Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S
+
+This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
+NanoPi R2S. Add the correct value for the RTL8153 LED configuration
+register to match the blink behavior of the other port on the device.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++
+ 1 file changed, 1 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
+@@ -406,6 +406,7 @@
+ 	rtl8153: device at 2 {
+ 		compatible = "usbbda,8153";
+ 		reg = <2>;
++		realtek,led-data = <0x87>;
+ 	};
+ };
+ 
diff --git a/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch b/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch
new file mode 100644
index 0000000000..b3c941821a
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch
@@ -0,0 +1,36 @@
+From: David Bauer <mail at david-bauer.net>
+Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S
+
+The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
+while U-Boot requires the card to be in 3.3V mode.
+
+Remove UHS support from the SD controller so the card remains in 3.3V
+mode. This reduces transfer speeds but ensures a reboot whether from
+userspace or following a kernel panic is always working.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+@@ -335,7 +335,6 @@
+ 	sd-uhs-sdr12;
+ 	sd-uhs-sdr25;
+ 	sd-uhs-sdr50;
+-	sd-uhs-sdr104;
+ 	vmmc-supply = <&vcc_sd>;
+ 	vqmmc-supply = <&vcc_sdio>;
+ 	status = "okay";
+--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+@@ -112,6 +112,11 @@
+ 	status = "disabled";
+ };
+ 
++&sdmmc {
++	/delete-property/ sd-uhs-sdr104;
++	cap-sd-highspeed;
++};
++
+ &u2phy0_host {
+ 	phy-supply = <&vdd_5v>;
+ };
diff --git a/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch b/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch
new file mode 100644
index 0000000000..d7579d61e9
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch
@@ -0,0 +1,16 @@
+--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
+@@ -19,6 +19,13 @@
+ 	model = "FriendlyElec NanoPi R4S";
+ 	compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
+ 
++	aliases {
++		led-boot = &sys_led;
++		led-failsafe = &sys_led;
++		led-running = &sys_led;
++		led-upgrade = &sys_led;
++	};
++
+ 	/delete-node/ display-subsystem;
+ 
+ 	gpio-leds {
diff --git a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch b/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
new file mode 100644
index 0000000000..3aff37d096
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
@@ -0,0 +1,40 @@
+From d2166e3b3680bd2b206aebf1e1ce4c0d346f3c50 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Fri, 19 May 2023 12:10:52 +0800
+Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Orange Pi R1
+ Plus
+
+Add OpenWrt's LED aliases for showing system status.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+---
+ .../dts/rockchip/rk3328-orangepi-r1-plus.dts    | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
+@@ -17,6 +17,11 @@
+ 	aliases {
+ 		ethernet1 = &rtl8153;
+ 		mmc0 = &sdmmc;
++
++		led-boot = &status_led;
++		led-failsafe = &status_led;
++		led-running = &status_led;
++		led-upgrade = &status_led;
+ 	};
+ 
+ 	chosen {
+@@ -41,11 +46,10 @@
+ 			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		led-1 {
++		status_led: led-1 {
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_RED>;
+ 			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
+-			linux,default-trigger = "heartbeat";
+ 		};
+ 
+ 		led-2 {
diff --git a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch b/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
new file mode 100644
index 0000000000..af8f8b16ba
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
@@ -0,0 +1,24 @@
+From b46a530d12ada422b9d5b2b97059e0d3ed950b40 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Fri, 19 May 2023 12:38:04 +0800
+Subject: [PATCH] arm64: dts: rockchip: add LED configuration to Orange Pi R1
+ Plus
+
+Add the correct value for the RTL8153 LED configuration register to
+match the blink behavior of the other port on the device.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+---
+ arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
+@@ -365,6 +365,7 @@
+ 	rtl8153: device at 2 {
+ 		compatible = "usbbda,8153";
+ 		reg = <2>;
++		realtek,led-data = <0x87>;
+ 	};
+ };
+ 
diff --git a/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch
new file mode 100644
index 0000000000..1a80dadd48
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch
@@ -0,0 +1,16 @@
+--- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
+@@ -15,6 +15,13 @@
+ 	model = "FriendlyElec NanoPC-T4";
+ 	compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
+ 
++	aliases {
++		led-boot = &status_led;
++		led-failsafe = &status_led;
++		led-running = &status_led;
++		led-upgrade = &status_led;
++	};
++
+ 	vcc12v0_sys: vcc12v0-sys {
+ 		compatible = "regulator-fixed";
+ 		regulator-always-on;
diff --git a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch b/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
new file mode 100644
index 0000000000..c22fdd52b8
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Tianling Shen <cnsztl at gmail.com>
+Date: Tue Jun 20 16:45:27 2023 +0800
+Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
+ series
+
+Add OpenWrt's LED aliases for showing system status.
+
+Signed-off-by: Tianling Shen <cnsztl at gmail.com>
+---
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
+@@ -40,7 +40,6 @@
+ 		power_led: led-power {
+ 			color = <LED_COLOR_ID_RED>;
+ 			function = LED_FUNCTION_POWER;
+-			linux,default-trigger = "heartbeat";
+ 			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
+@@ -39,7 +39,6 @@
+ 		power_led: led-power {
+ 			color = <LED_COLOR_ID_RED>;
+ 			function = LED_FUNCTION_POWER;
+-			linux,default-trigger = "heartbeat";
+ 			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+--- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
+@@ -18,6 +18,11 @@
+ 	aliases {
+ 		mmc0 = &sdmmc0;
+ 		mmc1 = &sdhci;
++
++		led-boot = &power_led;
++		led-failsafe = &power_led;
++		led-running = &power_led;
++		led-upgrade = &power_led;
+ 	};
+ 
+ 	chosen: chosen {
diff --git a/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch
new file mode 100644
index 0000000000..c8183a2b8a
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Marius Durbaca <mariusd84 at gmail.com>
+Date: Tue Feb 20 15:05:27 2024 +0200
+Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa 
+CM3 IO board
+
+Add OpenWrt's LED aliases for showing system status.
+
+Suggested-by: Tianling Shen <cnsztl at immortalwrt.org>
+Signed-off-by: Marius Durbaca <mariusd84 at gmail.com>
+---
+
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
+@@ -16,6 +16,10 @@
+ 	aliases {
+ 		ethernet0 = &gmac1;
+ 		mmc1 = &sdmmc0;
++		led-boot = &status_led;
++		led-failsafe = &status_led;
++		led-running = &status_led;
++		led-upgrade = &status_led;
+ 	};
+ 
+ 	chosen: chosen {
+--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
+@@ -17,7 +17,7 @@
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+-		led-0 {
++		status_led: led-0 {
+ 			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			function = LED_FUNCTION_STATUS;
diff --git a/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch
new file mode 100644
index 0000000000..75038c7f39
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch
@@ -0,0 +1,24 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Marius Durbaca <mariusd84 at gmail.com>
+Date: Tue Feb 27 16:25:27 2024 +0200
+Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa 
+E25
+
+Add OpenWrt's LED aliases for showing system status.
+
+Signed-off-by: Marius Durbaca <mariusd84 at gmail.com>
+---
+
+--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+@@ -9,6 +9,10 @@
+ 
+ 	aliases {
+ 		mmc1 = &sdmmc0;
++		led-boot = &led_user;
++		led-failsafe = &led_user;
++		led-running = &led_user;
++		led-upgrade = &led_user;
+ 	};
+ 
+ 	pwm-leds {
diff --git a/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch b/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
new file mode 100644
index 0000000000..6a2d35889b
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
@@ -0,0 +1,339 @@
+From patchwork Sat Nov 12 14:10:58 2022
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
+X-Patchwork-Id: 13041222
+Return-Path: 
+ <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org at lists.infradead.org>
+X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
+	aws-us-west-2-korg-lkml-1.web.codeaurora.org
+From: Aurelien Jarno <aurelien at aurel32.net>
+To: Olivia Mackall <olivia at selenic.com>,
+	Herbert Xu <herbert at gondor.apana.org.au>,
+	Rob Herring <robh+dt at kernel.org>,
+	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
+	Heiko Stuebner <heiko at sntech.de>,
+	Philipp Zabel <p.zabel at pengutronix.de>,
+	Lin Jinhan <troy.lin at rock-chips.com>
+Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
+ CORE),
+	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
+ BINDINGS),
+	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
+ support),
+	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
+	linux-kernel at vger.kernel.org (open list),
+	Aurelien Jarno <aurelien at aurel32.net>
+Subject: [PATCH v1 2/3] hwrng: add Rockchip SoC hwrng driver
+Date: Sat, 12 Nov 2022 15:10:58 +0100
+Message-Id: <20221112141059.3802506-3-aurelien at aurel32.net>
+In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
+References: <20221112141059.3802506-1-aurelien at aurel32.net>
+MIME-Version: 1.0
+List-Id: <linux-arm-kernel.lists.infradead.org>
+
+Rockchip SoCs used to have a random number generator as part of their
+crypto device, and support for it has to be added to the corresponding
+driver. However newer Rockchip SoCs like the RK356x have an independent
+True Random Number Generator device. This patch adds a driver for it,
+greatly inspired from the downstream driver.
+
+The TRNG device does not seem to have a signal conditionner and the FIPS
+140-2 test returns a lot of failures. They can be reduced by increasing
+RK_RNG_SAMPLE_CNT, in a tradeoff between quality and speed. This value
+has been adjusted to get ~90% of successes and the quality value has
+been set accordingly.
+
+Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+---
+ drivers/char/hw_random/Kconfig        |  14 ++
+ drivers/char/hw_random/Makefile       |   1 +
+ drivers/char/hw_random/rockchip-rng.c | 251 ++++++++++++++++++++++++++
+ 3 files changed, 266 insertions(+)
+ create mode 100644 drivers/char/hw_random/rockchip-rng.c
+
+--- a/drivers/char/hw_random/Kconfig
++++ b/drivers/char/hw_random/Kconfig
+@@ -549,6 +549,20 @@ config HW_RANDOM_CN10K
+ 	 To compile this driver as a module, choose M here.
+ 	 The module will be called cn10k_rng. If unsure, say Y.
+ 
++config HW_RANDOM_ROCKCHIP
++        tristate "Rockchip True Random Number Generator"
++        depends on HW_RANDOM && (ARCH_ROCKCHIP || COMPILE_TEST)
++        depends on HAS_IOMEM
++        default HW_RANDOM
++        help
++          This driver provides kernel-side support for the True Random Number
++          Generator hardware found on some Rockchip SoC like RK3566 or RK3568.
++
++          To compile this driver as a module, choose M here: the
++          module will be called rockchip-rng.
++
++          If unsure, say Y.
++
+ endif # HW_RANDOM
+ 
+ config UML_RANDOM
+--- a/drivers/char/hw_random/Makefile
++++ b/drivers/char/hw_random/Makefile
+@@ -47,3 +47,4 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
+ obj-$(CONFIG_HW_RANDOM_ARM_SMCCC_TRNG) += arm_smccc_trng.o
+ obj-$(CONFIG_HW_RANDOM_CN10K) += cn10k-rng.o
+ obj-$(CONFIG_HW_RANDOM_POLARFIRE_SOC) += mpfs-rng.o
++obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
+--- /dev/null
++++ b/drivers/char/hw_random/rockchip-rng.c
+@@ -0,0 +1,251 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * rockchip-rng.c True Random Number Generator driver for Rockchip SoCs
++ *
++ * Copyright (c) 2018, Fuzhou Rockchip Electronics Co., Ltd.
++ * Copyright (c) 2022, Aurelien Jarno
++ * Authors:
++ *  Lin Jinhan <troy.lin at rock-chips.com>
++ *  Aurelien Jarno <aurelien at aurel32.net>
++ */
++#include <linux/clk.h>
++#include <linux/hw_random.h>
++#include <linux/io.h>
++#include <linux/iopoll.h>
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/of_platform.h>
++#include <linux/pm_runtime.h>
++#include <linux/reset.h>
++#include <linux/slab.h>
++
++#define RK_RNG_AUTOSUSPEND_DELAY	100
++#define RK_RNG_MAX_BYTE			32
++#define RK_RNG_POLL_PERIOD_US		100
++#define RK_RNG_POLL_TIMEOUT_US		10000
++
++/*
++ * TRNG collects osc ring output bit every RK_RNG_SAMPLE_CNT time. The value is
++ * a tradeoff between speed and quality and has been adjusted to get a quality
++ * of ~900 (~90% of FIPS 140-2 successes).
++ */
++#define RK_RNG_SAMPLE_CNT		1000
++
++/* TRNG registers from RK3568 TRM-Part2, section 5.4.1 */
++#define TRNG_RST_CTL			0x0004
++#define TRNG_RNG_CTL			0x0400
++#define TRNG_RNG_CTL_LEN_64_BIT		(0x00 << 4)
++#define TRNG_RNG_CTL_LEN_128_BIT	(0x01 << 4)
++#define TRNG_RNG_CTL_LEN_192_BIT	(0x02 << 4)
++#define TRNG_RNG_CTL_LEN_256_BIT	(0x03 << 4)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_0	(0x00 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_1	(0x01 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_2	(0x02 << 2)
++#define TRNG_RNG_CTL_OSC_RING_SPEED_3	(0x03 << 2)
++#define TRNG_RNG_CTL_ENABLE		BIT(1)
++#define TRNG_RNG_CTL_START		BIT(0)
++#define TRNG_RNG_SAMPLE_CNT		0x0404
++#define TRNG_RNG_DOUT_0			0x0410
++#define TRNG_RNG_DOUT_1			0x0414
++#define TRNG_RNG_DOUT_2			0x0418
++#define TRNG_RNG_DOUT_3			0x041c
++#define TRNG_RNG_DOUT_4			0x0420
++#define TRNG_RNG_DOUT_5			0x0424
++#define TRNG_RNG_DOUT_6			0x0428
++#define TRNG_RNG_DOUT_7			0x042c
++
++struct rk_rng {
++	struct hwrng rng;
++	void __iomem *base;
++	struct reset_control *rst;
++	int clk_num;
++	struct clk_bulk_data *clk_bulks;
++};
++
++/* The mask determine the bits that are updated */
++static void rk_rng_write_ctl(struct rk_rng *rng, u32 val, u32 mask)
++{
++	writel_relaxed((mask << 16) | val, rng->base + TRNG_RNG_CTL);
++}
++
++static int rk_rng_init(struct hwrng *rng)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++	int ret;
++
++	/* start clocks */
++	ret = clk_bulk_prepare_enable(rk_rng->clk_num, rk_rng->clk_bulks);
++	if (ret < 0) {
++		dev_err((struct device *) rk_rng->rng.priv,
++			"Failed to enable clks %d\n", ret);
++		return ret;
++	}
++
++	/* set the sample period */
++	writel(RK_RNG_SAMPLE_CNT, rk_rng->base + TRNG_RNG_SAMPLE_CNT);
++
++	/* set osc ring speed and enable it */
++	reg = TRNG_RNG_CTL_LEN_256_BIT |
++		   TRNG_RNG_CTL_OSC_RING_SPEED_0 |
++		   TRNG_RNG_CTL_ENABLE;
++	rk_rng_write_ctl(rk_rng, reg, 0xffff);
++
++	return 0;
++}
++
++static void rk_rng_cleanup(struct hwrng *rng)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++
++	/* stop TRNG */
++	reg = 0;
++	rk_rng_write_ctl(rk_rng, reg, 0xffff);
++
++	/* stop clocks */
++	clk_bulk_disable_unprepare(rk_rng->clk_num, rk_rng->clk_bulks);
++}
++
++static int rk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
++{
++	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
++	u32 reg;
++	int ret = 0;
++	int i;
++
++	pm_runtime_get_sync((struct device *) rk_rng->rng.priv);
++
++	/* Start collecting random data */
++	reg = TRNG_RNG_CTL_START;
++	rk_rng_write_ctl(rk_rng, reg, reg);
++
++	ret = readl_poll_timeout(rk_rng->base + TRNG_RNG_CTL, reg,
++				 !(reg & TRNG_RNG_CTL_START),
++				 RK_RNG_POLL_PERIOD_US,
++				 RK_RNG_POLL_TIMEOUT_US);
++	if (ret < 0)
++		goto out;
++
++	/* Read random data stored in big endian in the registers */
++	ret = min_t(size_t, max, RK_RNG_MAX_BYTE);
++	for (i = 0; i < ret; i += 4) {
++		reg = readl_relaxed(rk_rng->base + TRNG_RNG_DOUT_0 + i);
++		*(u32 *)(buf + i) = be32_to_cpu(reg);
++	}
++
++out:
++	pm_runtime_mark_last_busy((struct device *) rk_rng->rng.priv);
++	pm_runtime_put_sync_autosuspend((struct device *) rk_rng->rng.priv);
++
++	return ret;
++}
++
++static int rk_rng_probe(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct rk_rng *rk_rng;
++	int ret;
++
++	rk_rng = devm_kzalloc(dev, sizeof(struct rk_rng), GFP_KERNEL);
++	if (!rk_rng)
++		return -ENOMEM;
++
++	rk_rng->base = devm_platform_ioremap_resource(pdev, 0);
++	if (IS_ERR(rk_rng->base))
++		return PTR_ERR(rk_rng->base);
++
++	rk_rng->clk_num = devm_clk_bulk_get_all(dev, &rk_rng->clk_bulks);
++	if (rk_rng->clk_num < 0)
++		return dev_err_probe(dev, rk_rng->clk_num,
++				     "Failed to get clks property\n");
++
++	rk_rng->rst = devm_reset_control_array_get(&pdev->dev, false, false);
++	if (IS_ERR(rk_rng->rst))
++		return dev_err_probe(dev, PTR_ERR(rk_rng->rst),
++				     "Failed to get reset property\n");
++
++	reset_control_assert(rk_rng->rst);
++	udelay(2);
++	reset_control_deassert(rk_rng->rst);
++
++	platform_set_drvdata(pdev, rk_rng);
++
++	rk_rng->rng.name = dev_driver_string(dev);
++#ifndef CONFIG_PM
++	rk_rng->rng.init = rk_rng_init;
++	rk_rng->rng.cleanup = rk_rng_cleanup;
++#endif
++	rk_rng->rng.read = rk_rng_read;
++	rk_rng->rng.priv = (unsigned long) dev;
++	rk_rng->rng.quality = 900;
++
++	pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
++	pm_runtime_use_autosuspend(dev);
++	pm_runtime_enable(dev);
++
++	ret = devm_hwrng_register(dev, &rk_rng->rng);
++	if (ret)
++		return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n");
++
++	dev_info(&pdev->dev, "Registered Rockchip hwrng\n");
++
++	return 0;
++}
++
++static int rk_rng_remove(struct platform_device *pdev)
++{
++	pm_runtime_disable(&pdev->dev);
++
++	return 0;
++}
++
++#ifdef CONFIG_PM
++static int rk_rng_runtime_suspend(struct device *dev)
++{
++	struct rk_rng *rk_rng = dev_get_drvdata(dev);
++
++	rk_rng_cleanup(&rk_rng->rng);
++
++	return 0;
++}
++
++static int rk_rng_runtime_resume(struct device *dev)
++{
++	struct rk_rng *rk_rng = dev_get_drvdata(dev);
++
++	return rk_rng_init(&rk_rng->rng);
++}
++#endif
++
++static const struct dev_pm_ops rk_rng_pm_ops = {
++	SET_RUNTIME_PM_OPS(rk_rng_runtime_suspend,
++				rk_rng_runtime_resume, NULL)
++	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
++				pm_runtime_force_resume)
++};
++
++static const struct of_device_id rk_rng_dt_match[] = {
++	{
++		.compatible = "rockchip,rk3568-rng",
++	},
++	{},
++};
++
++MODULE_DEVICE_TABLE(of, rk_rng_dt_match);
++
++static struct platform_driver rk_rng_driver = {
++	.driver	= {
++		.name	= "rockchip-rng",
++		.pm	= &rk_rng_pm_ops,
++		.of_match_table = rk_rng_dt_match,
++	},
++	.probe	= rk_rng_probe,
++	.remove = rk_rng_remove,
++};
++
++module_platform_driver(rk_rng_driver);
++
++MODULE_DESCRIPTION("Rockchip True Random Number Generator driver");
++MODULE_AUTHOR("Lin Jinhan <troy.lin at rock-chips.com>, Aurelien Jarno <aurelien at aurel32.net>");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch b/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
new file mode 100644
index 0000000000..bb34ba76e0
--- /dev/null
+++ b/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
@@ -0,0 +1,56 @@
+From patchwork Sat Nov 12 14:10:59 2022
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
+X-Patchwork-Id: 13041221
+From: Aurelien Jarno <aurelien at aurel32.net>
+To: Olivia Mackall <olivia at selenic.com>,
+	Herbert Xu <herbert at gondor.apana.org.au>,
+	Rob Herring <robh+dt at kernel.org>,
+	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
+	Heiko Stuebner <heiko at sntech.de>,
+	Philipp Zabel <p.zabel at pengutronix.de>,
+	Lin Jinhan <troy.lin at rock-chips.com>
+Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
+ CORE),
+	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
+ BINDINGS),
+	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
+ support),
+	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
+	linux-kernel at vger.kernel.org (open list),
+	Aurelien Jarno <aurelien at aurel32.net>
+Subject: [PATCH v1 3/3] arm64: dts: rockchip: add DT entry for RNG to RK356x
+Date: Sat, 12 Nov 2022 15:10:59 +0100
+Message-Id: <20221112141059.3802506-4-aurelien at aurel32.net>
+In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
+References: <20221112141059.3802506-1-aurelien at aurel32.net>
+MIME-Version: 1.0
+List-Id: <linux-arm-kernel.lists.infradead.org>
+
+Enable the just added Rockchip RNG driver for RK356x SoCs.
+
+Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
+---
+ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
++++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+@@ -1773,6 +1773,15 @@
+ 		};
+ 	};
+ 
++	rng: rng at fe388000 {
++		compatible = "rockchip,rk3568-rng";
++		reg = <0x0 0xfe388000 0x0 0x4000>;
++		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
++		clock-names = "trng_clk", "trng_hclk";
++		resets = <&cru SRST_TRNG_NS>;
++		reset-names = "reset";
++	};
++
+ 	pinctrl: pinctrl {
+ 		compatible = "rockchip,rk3568-pinctrl";
+ 		rockchip,grf = <&grf>;



From lede-commits at lists.infradead.org  Tue May  7 01:03:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 04:03:43 -0400
Subject: [openwrt/openwrt]  kernel: qca-ssdk: update to 12.5 for kernel 6.6
In-Reply-To: <171506902306.830080.17305287476943414031@git-01.infra.openwrt.org>
References: <171506902306.830080.17305287476943414031@git-01.infra.openwrt.org>
Message-ID: <mailman.34188.1715069030.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cae1b504e93cc9d35c845accab0854e18d801fd1

commit cae1b504e93cc9d35c845accab0854e18d801fd1
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Sat May 4 17:09:08 2024 -0400

    kernel: qca-ssdk: update to 12.5 for kernel 6.6
    
    Qualcomm recently committed a new branch (12.5.r2) targeting kernel
    6.6. This lets us clean up a few patches particularly the one for
    "C22/C45" mdio.
    
    A quick way to see what changed for IPQ807x/6018 was to list the files produced
    during build (**/*.o), replace the extension with ".c", and doing a
    `git log`.
    
    Filtering from those commits, ones of particular interest are listed
    below:
    
    ```
    2024-04-16 - 0d8f30aa - fix compile issue on hk with linux style build
    2024-01-29 - 636464f7 - update the check for port link notify
    2024-01-24 - 30c10e7f - enable and disable loopback for xgmac to fix qm stuck issue
    2024-01-15 - b6ea10aa - update the the APIs to access switch
    2024-01-08 - a1687502 - Disable Tx bridge mac before power off the PHY
    2024-01-07 - 3eafb613 - support led configure for malibu phy
    2024-01-07 - 5c1af60d - remove phy type check from mac reset when mode switch
    2023-12-17 - 79d0b1e8 - remove the PHY access APIs in ssdk_plat.c
    2023-12-16 - b2953740 - Update mii read/write functions
    2023-12-11 - 37f2eac3 - add port id check for fdb entry
    2023-12-11 - d040ca4d - support mdio clause45 on kernel6.6
    2023-12-07 - 11494fbc - use barrier mw() during access fdb entry table
    2023-12-03 - 8e40a284 - fix build warnings on kernel6.6
    2023-11-10 - 10aa0a02 - change speed value when call ssdk_port_link_notify
    2023-11-06 - ee4c4a60 - Update mac bitmap value of L3 table on MAC delete
    2023-11-03 - 7cd27d39 - support 10G phy common feature
    2023-10-30 - 383cc0d2 - fix mactype and mux select issue
    2023-10-24 - decf534a - support autoneg status query on force port
    2023-10-11 - 111d574e - move ssdk_led_init to regi_init
    2023-10-08 - 6b14c142 - the combo port also need to parse SFP pins
    2023-10-03 - fb2e0401 - fix port5 interface mode switch issue in erp case
    ```
    
    Verified with users on QNAP 301W, NBG7815, and myself on Dynalink
    DL-WRX36 that everything is functional, including LEDS.
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15379
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/qca-ssdk/Makefile                   |  8 +-
 .../patches/0001-config-identify-kernel-6.6.patch  | 47 -----------
 ...add-support-for-detection-PSGMII-PHY-mode.patch |  2 +-
 ...pport-selecting-PCS-channel-for-PORT3-on-.patch | 20 ++---
 ...dio-adapt-to-C22-and-C45-read-write-split.patch | 98 ----------------------
 .../patches/200-allow-parallel-build.patch         |  2 +-
 .../patches/201-fix-compile-warnings.patch         | 31 +++++++
 7 files changed, 47 insertions(+), 161 deletions(-)

diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile
index bbe9f12051..ed18f17504 100644
--- a/package/kernel/qca-ssdk/Makefile
+++ b/package/kernel/qca-ssdk/Makefile
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qca-ssdk
-PKG_RELEASE:=6
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-10-04
-PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0
-PKG_MIRROR_HASH:=53fb201053b3aca004c4da07b06a0608b0b3322a2062b1f7ab3b3a7871ddabcb
+PKG_SOURCE_DATE:=2024-04-17
+PKG_SOURCE_VERSION:=3d060f7ad70d087f6b0452abe79ab6d042e8cd53
+PKG_MIRROR_HASH:=6f5e390b294e699491584094f5d7eb941de6237ad8c5320191e9e306fbcd8eb5
 
 PKG_FLAGS:=nonshared
 PKG_BUILD_PARALLEL:=1
diff --git a/package/kernel/qca-ssdk/patches/0001-config-identify-kernel-6.6.patch b/package/kernel/qca-ssdk/patches/0001-config-identify-kernel-6.6.patch
deleted file mode 100644
index 2dc0923263..0000000000
--- a/package/kernel/qca-ssdk/patches/0001-config-identify-kernel-6.6.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From f6c0115daaac586740e873a3b8145c5370a73dce Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko at gmail.com>
-Date: Sat, 17 Feb 2024 13:02:31 +0100
-Subject: [PATCH] config: identify kernel 6.6
-
-Identify kernel 6.6 so it can be compiled against.
-
-Signed-off-by: Robert Marko <robimarko at gmail.com>
----
- config            | 5 +++++
- make/linux_opt.mk | 4 ++--
- 2 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/config
-+++ b/config
-@@ -27,6 +27,11 @@ endif
- ifeq ($(KVER),$(filter 6.1%,$(KVER)))
- 	OS_VER=6_1
- endif
-+
-+ifeq ($(KVER),$(filter 6.6%,$(KVER)))
-+	OS_VER=6_6
-+endif
-+
- ifeq ($(KVER), 3.4.0)
- 	OS_VER=3_4
- endif
---- a/make/linux_opt.mk
-+++ b/make/linux_opt.mk
-@@ -450,7 +450,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
-       KASAN_SHADOW_SCALE_SHIFT := 3
-   endif
- 
--  ifeq ($(OS_VER),$(filter 5_4 6_1, $(OS_VER)))
-+  ifeq ($(OS_VER),$(filter 5_4 6_1 6_6, $(OS_VER)))
-       ifeq ($(ARCH), arm64)
-           KASAN_OPTION += -DKASAN_SHADOW_SCALE_SHIFT=$(KASAN_SHADOW_SCALE_SHIFT)
-        endif
-@@ -481,7 +481,7 @@ ifeq (KSLIB, $(MODULE_TYPE))
- 
-   endif
- 
--  ifeq ($(OS_VER),$(filter 4_4 5_4 6_1, $(OS_VER)))
-+  ifeq ($(OS_VER),$(filter 4_4 5_4 6_1 6_6, $(OS_VER)))
-                 MODULE_CFLAG += -DKVER34
-                 MODULE_CFLAG += -DKVER32
-             MODULE_CFLAG += -DLNX26_22
diff --git a/package/kernel/qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch b/package/kernel/qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch
index c27902c4ce..9d028992a7 100644
--- a/package/kernel/qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch
+++ b/package/kernel/qca-ssdk/patches/101-hsl_phy-add-support-for-detection-PSGMII-PHY-mode.patch
@@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/src/hsl/phy/hsl_phy.c
 +++ b/src/hsl/phy/hsl_phy.c
-@@ -1335,6 +1335,9 @@ hsl_port_phydev_interface_mode_status_ge
+@@ -1322,6 +1322,9 @@ hsl_port_phydev_interface_mode_status_ge
  		case PHY_INTERFACE_MODE_10GKR:
  			*interface_mode_status = PORT_10GBASE_R;
  			break;
diff --git a/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch b/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch
index 5e390d8ee3..db84ea1422 100644
--- a/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch
+++ b/package/kernel/qca-ssdk/patches/102-qca-ssdk-support-selecting-PCS-channel-for-PORT3-on-.patch
@@ -24,15 +24,15 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
 
 --- a/include/init/ssdk_dts.h
 +++ b/include/init/ssdk_dts.h
-@@ -101,6 +101,7 @@ typedef struct
+@@ -99,6 +99,7 @@ typedef struct
  	a_uint32_t emu_chip_ver; /*only valid when is_emulation is true*/
  	a_uint32_t clk_mode;
  	a_uint32_t pcie_hw_base;
 +	a_uint32_t port3_pcs_channel;
+ 	led_ctrl_pattern_t source_pattern[SSDK_MAX_PORT_NUM][PORT_LED_SOURCE_MAX];
  } ssdk_dt_cfg;
  
- #define SSDK_MAX_NR_ETH 6
-@@ -162,6 +163,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
+@@ -161,6 +162,7 @@ a_uint32_t ssdk_device_id_get(a_uint32_t
  struct device_node *ssdk_dts_node_get(a_uint32_t dev_id);
  struct clk *ssdk_dts_essclk_get(a_uint32_t dev_id);
  struct clk *ssdk_dts_cmnclk_get(a_uint32_t dev_id);
@@ -62,7 +62,7 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
  					cppe_port_mux_ctrl.bf.port4_pcs_sel =
 --- a/src/adpt/hppe/adpt_hppe_uniphy.c
 +++ b/src/adpt/hppe/adpt_hppe_uniphy.c
-@@ -1122,9 +1122,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
+@@ -1160,9 +1160,6 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
  {
  	a_uint32_t i;
  	sw_error_t rv = SW_OK;
@@ -72,7 +72,7 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
  
  	union uniphy_mode_ctrl_u uniphy_mode_ctrl;
  
-@@ -1134,9 +1131,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
+@@ -1172,9 +1169,7 @@ __adpt_hppe_uniphy_psgmii_mode_set(a_uin
  	SSDK_DEBUG("uniphy %d is psgmii mode\n", uniphy_index);
  #if defined(CPPE)
  	if (adpt_ppe_type_get(dev_id) == CPPE_TYPE) {
@@ -92,14 +92,14 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
 +a_uint32_t ssdk_dts_port3_pcs_channel_get(a_uint32_t dev_id)
 +{
 +	ssdk_dt_cfg* cfg = ssdk_dt_global.ssdk_dt_switch_nodes[dev_id];
-+	
++
 +	return cfg->port3_pcs_channel;
 +}
 +
- #ifndef BOARD_AR71XX
  #if defined(CONFIG_OF) && (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
  static void ssdk_dt_parse_mac_mode(a_uint32_t dev_id,
-@@ -306,6 +313,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
+ 		struct device_node *switch_node, ssdk_init_cfg *cfg)
+@@ -305,6 +312,25 @@ static void ssdk_dt_parse_mac_mode(a_uin
  
  	return;
  }
@@ -109,7 +109,7 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
 +{
 +	const __be32 *port3_pcs_channel;
 +	a_uint32_t len = 0;
-+	
++
 +	port3_pcs_channel = of_get_property(switch_node, "port3_pcs_channel", &len);
 +	if (!port3_pcs_channel) {
 +		ssdk_dt_global.ssdk_dt_switch_nodes[dev_id]->port3_pcs_channel = 2;
@@ -125,7 +125,7 @@ Signed-off-by: Mantas Pucka <mantas at 8devices.com>
  #ifdef IN_UNIPHY
  static void ssdk_dt_parse_uniphy(a_uint32_t dev_id)
  {
-@@ -1292,6 +1318,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
+@@ -1347,6 +1373,7 @@ sw_error_t ssdk_dt_parse(ssdk_init_cfg *
  	rv = ssdk_dt_parse_access_mode(switch_node, ssdk_dt_priv);
  	SW_RTN_ON_ERROR(rv);
  	ssdk_dt_parse_mac_mode(*dev_id, switch_node, cfg);
diff --git a/package/kernel/qca-ssdk/patches/103-mdio-adapt-to-C22-and-C45-read-write-split.patch b/package/kernel/qca-ssdk/patches/103-mdio-adapt-to-C22-and-C45-read-write-split.patch
deleted file mode 100644
index 7ddca554ec..0000000000
--- a/package/kernel/qca-ssdk/patches/103-mdio-adapt-to-C22-and-C45-read-write-split.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From bdae481e89cbe551068a99028bb57119b59f5ff4 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko at gmail.com>
-Date: Tue, 26 Mar 2024 12:19:49 +0100
-Subject: [PATCH] mdio: adapt to C22 and C45 read/write split
-
-Kernel 6.3 has introduced separate C45 read/write operations, and thus
-split them out of the C22 operations completely so the old way of marking
-C45 reads and writes via the register value does not work anymore.
-
-This is causing SSDK to fail and find C45 only PHY-s such as Aquantia ones:
-[   22.187877] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 8, phy_id = 0x0 phytype doesn't match
-[   22.209924] ssdk_phy_driver_init[371]:INFO:dev_id = 0, phy_adress = 0, phy_id = 0x0 phytype doesn't match
-
-This in turn causes USXGMII MAC autoneg bit to not get set and then UNIPHY
-autoneg will time out, causing the 10G ports not to work:
-[   37.292784] uniphy autoneg time out!
-
-So, lets detect C45 reads and writes by the magic BIT(30) in the register
-argument and if so call separate C45 mdiobus read/write functions.
-
-Signed-off-by: Robert Marko <robimarko at gmail.com>
----
- include/init/ssdk_plat.h |  7 +++++++
- src/init/ssdk_plat.c     | 30 ++++++++++++++++++++++++++++++
- 2 files changed, 37 insertions(+)
-
---- a/include/init/ssdk_plat.h
-+++ b/include/init/ssdk_plat.h
-@@ -505,3 +505,10 @@ void ssdk_plat_exit(a_uint32_t dev_id);
- 
- #endif
- /*qca808x_end*/
-+
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
-+#define MII_ADDR_C45		(1<<30)
-+#define MII_DEVADDR_C45_SHIFT	16
-+#define MII_DEVADDR_C45_MASK	GENMASK(20, 16)
-+#define MII_REGADDR_C45_MASK	GENMASK(15, 0)
-+#endif
---- a/src/init/ssdk_plat.c
-+++ b/src/init/ssdk_plat.c
-@@ -356,6 +356,18 @@ phy_addr_validation_check(a_uint32_t phy
- 		return A_TRUE;
- }
- 
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
-+static inline u16 mdiobus_c45_regad(u32 regnum)
-+{
-+	return FIELD_GET(MII_REGADDR_C45_MASK, regnum);
-+}
-+
-+static inline u16 mdiobus_c45_devad(u32 regnum)
-+{
-+	return FIELD_GET(MII_DEVADDR_C45_MASK, regnum);
-+}
-+#endif
-+
- sw_error_t
- qca_ar8327_phy_read(a_uint32_t dev_id, a_uint32_t phy_addr,
-                            a_uint32_t reg, a_uint16_t* data)
-@@ -371,9 +383,18 @@ qca_ar8327_phy_read(a_uint32_t dev_id, a
- 	if (!bus)
- 		return SW_NOT_SUPPORTED;
- 	phy_addr = TO_PHY_ADDR(phy_addr);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
-+	mutex_lock(&bus->mdio_lock);
-+	if (reg & MII_ADDR_C45)
-+		*data = __mdiobus_c45_read(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg));
-+	else
-+		*data = __mdiobus_read(bus, phy_addr, reg);
-+	mutex_unlock(&bus->mdio_lock);
-+#else
- 	mutex_lock(&bus->mdio_lock);
- 	*data = __mdiobus_read(bus, phy_addr, reg);
- 	mutex_unlock(&bus->mdio_lock);
-+#endif
- 
- 	return 0;
- }
-@@ -393,9 +414,18 @@ qca_ar8327_phy_write(a_uint32_t dev_id,
- 	if (!bus)
- 		return SW_NOT_SUPPORTED;
- 	phy_addr = TO_PHY_ADDR(phy_addr);
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0))
-+	mutex_lock(&bus->mdio_lock);
-+	if (reg & MII_ADDR_C45)
-+		__mdiobus_c45_write(bus, phy_addr, mdiobus_c45_devad(reg), mdiobus_c45_regad(reg), data);
-+	else
-+		__mdiobus_write(bus, phy_addr, reg, data);
-+	mutex_unlock(&bus->mdio_lock);
-+#else
- 	mutex_lock(&bus->mdio_lock);
- 	__mdiobus_write(bus, phy_addr, reg, data);
- 	mutex_unlock(&bus->mdio_lock);
-+#endif
- 
- 	return 0;
- }
diff --git a/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch b/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch
index 5635c2fdcf..6c28e0ff2e 100644
--- a/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch
+++ b/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch
@@ -40,7 +40,7 @@
  kslib_c:
 --- a/make/linux_opt.mk
 +++ b/make/linux_opt.mk
-@@ -777,6 +777,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
+@@ -778,6 +778,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
  ####################################################################
  # 			cflags for LNX Modules-Style Makefile
  ####################################################################
diff --git a/package/kernel/qca-ssdk/patches/201-fix-compile-warnings.patch b/package/kernel/qca-ssdk/patches/201-fix-compile-warnings.patch
new file mode 100644
index 0000000000..5b57f41975
--- /dev/null
+++ b/package/kernel/qca-ssdk/patches/201-fix-compile-warnings.patch
@@ -0,0 +1,31 @@
+--- a/src/fal/fal_port_ctrl.c
++++ b/src/fal/fal_port_ctrl.c
+@@ -2089,7 +2089,7 @@ fal_port_hibernate_get (a_uint32_t dev_i
+  */
+ sw_error_t
+ fal_port_cdt (a_uint32_t dev_id, fal_port_t port_id, a_uint32_t mdi_pair,
+-	      a_uint32_t * cable_status, a_uint32_t * cable_len)
++	      fal_cable_status_t * cable_status, a_uint32_t * cable_len)
+ {
+   sw_error_t rv;
+ 
+--- a/src/fal/fal_portvlan.c
++++ b/src/fal/fal_portvlan.c
+@@ -2173,7 +2173,7 @@ fal_netisolate_get(a_uint32_t dev_id, a_
+  * @return SW_OK or error code
+  */
+ sw_error_t
+-fal_eg_trans_filter_bypass_en_set(a_uint32_t dev_id, a_bool_t enable)
++fal_eg_trans_filter_bypass_en_set(a_uint32_t dev_id, a_uint32_t enable)
+ {
+     sw_error_t rv;
+ 
+@@ -2190,7 +2190,7 @@ fal_eg_trans_filter_bypass_en_set(a_uint
+  * @return SW_OK or error code
+  */
+ sw_error_t
+-fal_eg_trans_filter_bypass_en_get(a_uint32_t dev_id, a_bool_t* enable)
++fal_eg_trans_filter_bypass_en_get(a_uint32_t dev_id, a_uint32_t* enable)
+ {
+     sw_error_t rv;
+ 



From lede-commits at lists.infradead.org  Tue May  7 01:04:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 04:04:03 -0400
Subject: [openwrt/openwrt]  kernel: qca-nss-dp: update to 12.5.r2 for kernel
 6.6
In-Reply-To: <171506904389.831617.16105574046559746151@git-01.infra.openwrt.org>
References: <171506904389.831617.16105574046559746151@git-01.infra.openwrt.org>
Message-ID: <mailman.34189.1715069048.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a5d12e7839a43a58a2c203d539e33f61ea46adfd

commit a5d12e7839a43a58a2c203d539e33f61ea46adfd
Author: Kristian Skramstad <kristian+github at 83.no>
AuthorDate: Sun May 5 12:36:20 2024 +0200

    kernel: qca-nss-dp: update to 12.5.r2 for kernel 6.6
    
    There is a new branch 12.5.r2 for kernel 6.6, so refresh
    and update patches.
    
    Delete patch 0010-nss-dp-include-net-netdev_rx_queue.h.patch
    
    Changes:
    2024-04-04 -5bf8b91 [qca-nss-dp] Adding support for port ID 3 & 4 in MHT switch
    2024-03-28 -ce1e4cf [qca-nss-dp] Use skb_queue_head_init instead of __skb_queue_head_init.
    2024-03-11 -0d26366 [qca-nss-dp] Read MHT LAN port status for ErP phase2
    2024-03-22 -8382f14 [qca-nss-dp] Fix compilation issues seen on ginger branch for Miami profile
    2023-05-02 -09b0983 [qca-nss-dp] vp list processing for capwap
    2024-02-22 -bc09a01 [qca-nss-dp] EDMA ring reset for PPE-DS
    2024-03-12 -2fcb586 [qca-nss-dp] Fix the EDMA clock frequency for the mitigation timer configuration
    2024-02-23 -44ba1be [qca-nss-dp] Add API to retrieve ethernet netdevs for ErP
    2024-02-09 -a5979b7 [qca-nss-dp] send napi and ip checksum for VP handler
    2024-01-12 -1b9cb5d qca-nss-dp: User netdev_alloc_skb_fast instead of dev_alloc_skb
    2024-01-08 -a859b48 [qca-nss-dp] NAPI Budget and EDMA Rx size change for KPI improvement.
    2024-01-06 -8935523 [qca-nss-dp] Offload L3, L4 checksum to hardware for ppe-vp.
    2023-12-07 -bbd9547 [qca-nss-dp] Fix Compilation issues on kernel6.6
    2023-10-12 -bc55f75 [qca-nss-dp]: Enable legacy SCS for PPE-VP.
    2023-09-08 -6bd771f [qca-nss-dp] Invalidate secondary descriptor before use.
    2023-12-19 -b143df8 [qca-nss-dp] Fixed nss_dp_hal_hw_reset functionality for ipq53xx.
    2023-12-16 -7cfde1d [qca-nss-dp] Added nss_dp_hal_hw_reset functionality for ipq53xx.
    2023-11-02 -70af6c2 [qca-nss-dp] Implement EDMA hang recovery support
    2023-11-27 -2202b29 [qca-nss-dp] Add support for adding the link speed for the Miami's port connected to the internal Switch.
    2023-12-06 -bef68a8 [qca-nss-dp] Resolve ring utilization reporting issue in EDMA driver
    2023-12-06 -eaa7627 [qca-nss-dp] Add/Delete static fdb entries only for physical ports
    2023-10-16 -4551d0f [qca-nss-dp]: Support HLOST_TID_override from PPE_VP path.
    2023-11-09 -42ad3f3 [qca-nss-dp] Correct the NAPI poll implementation for DS Rx fill handling
    2023-10-16 -dfeb7d3 [qca-nss-dp] Check for disabled ethernet port in ErP functions
    2023-11-09 -42ad3f3 [qca-nss-dp] Correct the NAPI poll implementation for DS Rx fill handling
    2023-10-16 -dfeb7d3 [qca-nss-dp] Check for disabled ethernet port in ErP functions
    2023-09-22 -03f83d6 [qca-nss-dp] Correct the mht device flag
    2023-08-18 -5efd7f4 [qca-nss-dp] Add EDMA Tx rings for MHT ports
    2023-09-11 -7808ba2 [qca-nss-dp] Move DP standby code to new file and use new SSDK API
    2023-09-28 -22ade1e [qca-nss-dp] : enable PPE-DS support in 6.x kernel
    2023-08-28 -1943922 [qca-nss-dp] Support for bitmap based CPU selection.
    2023-08-16 -dcb82a7 qca-nss-dp: 512M profile changes for Miami+Pebble
    2023-09-01 -18e51f3 [qca-nss-dp] Fix tx descriptor completion error.
    2023-08-28 -0bfde2d [qca-nss-dp] Changes to enable ErP mode
    2023-09-05 -f1d635a [qca-nss-dp] Enable fast recycled changes in dp for kernel 6.1
    2023-06-15 -55d35bd [qca-nss-dp] Tracking the full utilization of EDMA rings
    2023-08-25 -89b9c19 [qca-nss-dp] Restricting the MTU as 9216 for all interfaces in DP
    2023-01-03 -5098a4f [qca-nss-dp] Requeue Tx packet in case of Tx-failure.
    2023-04-06 -3576dbb [qca-nss-dp] Adding tx napi with four queue per interface.
    2023-08-10 -d2b6921 [qca-nss-dp] : changes to support ppe-qdisc for linux 6.x
    2023-08-08 -a1941fb [qca-nss-dp] moving SET_NETDEV_DEV for all netdev to set.
    2023-07-18 -74d3178 [qca-nss-dp] Reordering the CPU code and ACL index processing.
    2023-06-30 -ab03139 [qca-nss-dp] Configure port level PPE offload flag in PPE
    2023-06-06 -e9bb8c5 [qca-nss-dp] Rate limit the debug logs.
    2023-07-18 -43afb9b [qca-nss-dp] Support Core selection for PPE mirrored packets.
    2023-07-11 -92edcfd [qca-nss-dp] Add sysctl to invalidate RX secondary descriptor.
    
    Tested and working on WAX620.
    
    Signed-off-by: Kristian Skramstad <kristian+github at 83.no>
    Link: https://github.com/openwrt/openwrt/pull/15383
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/qca-nss-dp/Makefile                 |  8 +++----
 ...-Use-a-phy-handle-property-to-connect-to-.patch | 28 ++++++++++++----------
 ...nss-dp-allow-setting-netdev-name-from-DTS.patch |  2 +-
 .../0009-nss-dp-switchdev-fix-FDB-roaming.patch    |  2 +-
 ...0010-nss-dp-include-net-netdev_rx_queue.h.patch | 25 -------------------
 ...chdev-correctly-unregister-notifier-on-dp.patch |  6 ++---
 ...03-nss_dp_main-swap-dp_exit-function-call.patch |  4 ++--
 ...-call-unregister_netdev-first-in-dp_remov.patch |  4 ++--
 ...-use-phy_detach-instead-of-disconnect-in-.patch |  2 +-
 9 files changed, 29 insertions(+), 52 deletions(-)

diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile
index e6c380aead..a917f0518c 100644
--- a/package/kernel/qca-nss-dp/Makefile
+++ b/package/kernel/qca-nss-dp/Makefile
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qca-nss-dp
-PKG_RELEASE:=3
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-06-06
-PKG_SOURCE_VERSION:=fa67464466f69f00967cc373d1bdd6025f57eb89
-PKG_MIRROR_HASH:=39329770042c85b32780cd12eef2aad2c5df79f34d1b7081e5ba1e1cc0b1b161
+PKG_SOURCE_DATE:=2024-04-16
+PKG_SOURCE_VERSION:=5bf8b91e9fc209f175f9a58723b03055ace3d581
+PKG_MIRROR_HASH:=e86b04ea674c18fb69cd09a45ccab50317b85117e40d76c8457052c2e55d7c18
 
 PKG_BUILD_PARALLEL:=1
 PKG_FLAGS:=nonshared
diff --git a/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch b/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
index 0432b82dda..20a7e6b350 100644
--- a/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
+++ b/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
@@ -26,7 +26,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/include/nss_dp_dev.h
 +++ b/include/nss_dp_dev.h
-@@ -202,13 +202,10 @@ struct nss_dp_dev {
+@@ -225,13 +225,10 @@ struct nss_dp_dev {
  	unsigned long drv_flags;	/* Driver specific feature flags */
  
  	/* Phy related stuff */
@@ -43,7 +43,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -418,7 +418,7 @@ static int nss_dp_open(struct net_device
+@@ -436,7 +436,7 @@ static int nss_dp_open(struct net_device
  
  	netif_start_queue(netdev);
  
@@ -52,7 +52,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  		/* Notify data plane link is up */
  		if (dp_priv->data_plane_ops->link_state(dp_priv->dpc, 1)) {
  			netdev_dbg(netdev, "Data plane set link failed\n");
-@@ -615,6 +615,12 @@ static int32_t nss_dp_of_get_pdata(struc
+@@ -633,6 +633,12 @@ static int32_t nss_dp_of_get_pdata(struc
  		return -EFAULT;
  	}
  
@@ -65,7 +65,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  	if (of_property_read_u32(np, "qcom,mactype", &hal_pdata->mactype)) {
  		pr_err("%s: error reading mactype\n", np->name);
  		return -EFAULT;
-@@ -635,18 +641,6 @@ static int32_t nss_dp_of_get_pdata(struc
+@@ -653,18 +659,6 @@ static int32_t nss_dp_of_get_pdata(struc
  		return -EFAULT;
  #endif
  
@@ -84,7 +84,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  #if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0))
  	maddr = (uint8_t *)of_get_mac_address(np);
  #if (LINUX_VERSION_CODE > KERNEL_VERSION(5, 4, 0))
-@@ -695,56 +689,6 @@ static int32_t nss_dp_of_get_pdata(struc
+@@ -753,56 +747,6 @@ static int32_t nss_dp_of_get_pdata(struc
  	return 0;
  }
  
@@ -141,7 +141,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  #ifdef CONFIG_NET_SWITCHDEV
  /*
   * nss_dp_is_phy_dev()
-@@ -803,7 +747,6 @@ static int32_t nss_dp_probe(struct platf
+@@ -861,7 +805,6 @@ static int32_t nss_dp_probe(struct platf
  	struct device_node *np = pdev->dev.of_node;
  	struct nss_gmac_hal_platform_data gmac_hal_pdata;
  	int32_t ret = 0;
@@ -149,7 +149,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  #if defined(NSS_DP_PPE_SUPPORT)
  	uint32_t vsi_id;
  	fal_port_t port_id;
-@@ -880,22 +823,14 @@ static int32_t nss_dp_probe(struct platf
+@@ -940,22 +883,15 @@ static int32_t nss_dp_probe(struct platf
  
  	dp_priv->drv_flags |= NSS_DP_PRIV_FLAG(INIT_DONE);
  
@@ -161,20 +161,22 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 -		}
 -		snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
 -				dp_priv->miibus->id, dp_priv->phy_mdio_addr);
--
 +	if (dp_priv->phy_node) {
- 		SET_NETDEV_DEV(netdev, &pdev->dev);
  
 -		dp_priv->phydev = phy_connect(netdev, phy_id,
 -				&nss_dp_adjust_link,
 -				dp_priv->phy_mii_type);
 -		if (IS_ERR(dp_priv->phydev)) {
 -			netdev_dbg(netdev, "failed to connect to phy device\n");
+-			goto phy_setup_fail;
+-		}
 +		dp_priv->phydev = of_phy_connect(netdev, dp_priv->phy_node,
-+		                                 &nss_dp_adjust_link, 0,
-+		                                 dp_priv->phy_mii_type);
++		        &nss_dp_adjust_link, 0,
++		        dp_priv->phy_mii_type);
 +		if (!(dp_priv->phydev)) {
 +			netdev_err(netdev, "failed to connect to phy device\n");
- 			goto phy_setup_fail;
- 		}
++ 			goto phy_setup_fail;
++ 		}
  	}
+ 
+ #if defined(NSS_DP_PPE_SUPPORT)
diff --git a/package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch b/package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch
index e90bf32ced..d70284dfb5 100644
--- a/package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch
+++ b/package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch
@@ -15,7 +15,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -746,18 +746,29 @@ static int32_t nss_dp_probe(struct platf
+@@ -804,18 +804,29 @@ static int32_t nss_dp_probe(struct platf
  	struct nss_dp_dev *dp_priv;
  	struct device_node *np = pdev->dev.of_node;
  	struct nss_gmac_hal_platform_data gmac_hal_pdata;
diff --git a/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch b/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch
index ec10bdc2d9..7fccfac76d 100644
--- a/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch
+++ b/package/kernel/qca-nss-dp/patches/0009-nss-dp-switchdev-fix-FDB-roaming.patch
@@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  
  #define NSS_DP_SWITCH_ID		0
  #define NSS_DP_SW_ETHTYPE_PID		0 /* PPE ethtype profile ID for slow protocols */
-@@ -521,7 +523,76 @@ static struct notifier_block *nss_dp_sw_
+@@ -534,7 +536,76 @@ static struct notifier_block *nss_dp_sw_
  
  #else
  
diff --git a/package/kernel/qca-nss-dp/patches/0010-nss-dp-include-net-netdev_rx_queue.h.patch b/package/kernel/qca-nss-dp/patches/0010-nss-dp-include-net-netdev_rx_queue.h.patch
deleted file mode 100644
index ddbf342868..0000000000
--- a/package/kernel/qca-nss-dp/patches/0010-nss-dp-include-net-netdev_rx_queue.h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 01ec275bd0942ddc6b80e1d3671cdc66be670f57 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko at gmail.com>
-Date: Fri, 1 Sep 2023 12:23:58 +0200
-Subject: [PATCH] nss-dp: include <net/netdev_rx_queue.h>
-
-Since 6.5 netdev_rx_queue was moved out of netdevice.h so include the new
-header since that is where it lives now.
-
-Signed-off-by: Robert Marko <robimarko at gmail.com>
----
- nss_dp_main.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/nss_dp_main.c
-+++ b/nss_dp_main.c
-@@ -34,6 +34,9 @@
- #if defined(NSS_DP_MAC_POLL_SUPPORT)
- #include <init/ssdk_init.h>
- #endif
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0))
-+#include <net/netdev_rx_queue.h>
-+#endif
- 
- #include "nss_dp_hal.h"
- 
diff --git a/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
index e0a47cfca0..8379fcf20c 100644
--- a/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
@@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/include/nss_dp_dev.h
 +++ b/include/nss_dp_dev.h
-@@ -312,6 +312,7 @@ void nss_dp_set_ethtool_ops(struct net_d
+@@ -349,6 +349,7 @@ void nss_dp_set_ethtool_ops(struct net_d
   */
  #ifdef CONFIG_NET_SWITCHDEV
  void nss_dp_switchdev_setup(struct net_device *dev);
@@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -913,6 +913,10 @@ static int nss_dp_remove(struct platform
+@@ -972,6 +972,10 @@ static int nss_dp_remove(struct platform
  		if (!dp_priv)
  			continue;
  
@@ -39,7 +39,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  
 --- a/nss_dp_switchdev.c
 +++ b/nss_dp_switchdev.c
-@@ -635,4 +635,17 @@ void nss_dp_switchdev_setup(struct net_d
+@@ -648,4 +648,17 @@ void nss_dp_switchdev_setup(struct net_d
  
  	switch_init_done = true;
  }
diff --git a/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
index 7ffde3d286..68a9821ceb 100644
--- a/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -1082,6 +1082,8 @@ int __init nss_dp_init(void)
+@@ -1163,6 +1163,8 @@ int __init nss_dp_init(void)
   */
  void __exit nss_dp_exit(void)
  {
@@ -24,7 +24,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	/*
  	 * TODO Move this to soc_ops
  	 */
-@@ -1089,8 +1091,6 @@ void __exit nss_dp_exit(void)
+@@ -1170,8 +1172,6 @@ void __exit nss_dp_exit(void)
  		nss_dp_hal_cleanup();
  		dp_global_ctx.common_init_done = false;
  	}
diff --git a/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
index 20e87459f8..2721d2cfba 100644
--- a/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -920,6 +920,9 @@ static int nss_dp_remove(struct platform
+@@ -979,6 +979,9 @@ static int nss_dp_remove(struct platform
  		dp_ops = dp_priv->data_plane_ops;
  		hal_ops = dp_priv->gmac_hal_ops;
  
@@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  		if (dp_priv->phydev)
  			phy_disconnect(dp_priv->phydev);
  
-@@ -931,7 +934,6 @@ static int nss_dp_remove(struct platform
+@@ -990,7 +993,6 @@ static int nss_dp_remove(struct platform
  #endif
  		hal_ops->exit(dp_priv->gmac_hal_ctx);
  		dp_ops->deinit(dp_priv->dpc);
diff --git a/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
index 6e87e4e8c4..3c99cae2d5 100644
--- a/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -924,7 +924,7 @@ static int nss_dp_remove(struct platform
+@@ -983,7 +983,7 @@ static int nss_dp_remove(struct platform
  		unregister_netdev(dp_priv->netdev);
  
  		if (dp_priv->phydev)



From lede-commits at lists.infradead.org  Tue May  7 01:57:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 04:57:20 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: add rootwait to bootargs
In-Reply-To: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
References: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
Message-ID: <mailman.34198.1715072244.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/738b427d351faa718eab2f789094e459d8f602c5

commit 738b427d351faa718eab2f789094e459d8f602c5
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue May 7 08:31:24 2024 +0200

    mediatek: bpi-r4: add rootwait to bootargs
    
    In commit cd4de3251c1f ("mediatek: wait for fitblk rootfs"), the linux
    6.6 files and patches has been forgotton to be fixed.
    
    Fixes: cd4de3251c1f ("mediatek: wait for fitblk rootfs")
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index ba19f69bbf..c4c05fd419 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -28,7 +28,7 @@
 
 	chosen {
 		stdout-path = &uart0;
-		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
+		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0 rootwait";
 		rootdisk-spim-nand = <&ubi_rootfs>;
 	};
 



From lede-commits at lists.infradead.org  Tue May  7 01:57:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 04:57:19 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r2: add rootwait to bootargs
In-Reply-To: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
References: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
Message-ID: <mailman.34199.1715072244.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8c1250cb3947dd6da9def9e1ba32a93c760a1093

commit 8c1250cb3947dd6da9def9e1ba32a93c760a1093
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue May 7 08:27:32 2024 +0200

    mediatek: bpi-r2: add rootwait to bootargs
    
    In commit cd4de3251c1f ("mediatek: wait for fitblk rootfs"), the linux
    6.6 files and patches has been forgotton to be fixed.
    
    Fixes: cd4de3251c1f ("mediatek: wait for fitblk rootfs")
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch b/target/linux/mediatek/patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch
index f1a182b044..fac14b4d82 100644
--- a/target/linux/mediatek/patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch
+++ b/target/linux/mediatek/patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch
@@ -5,7 +5,7 @@
  	chosen {
  		stdout-path = "serial2:115200n8";
 -		bootargs = "earlycon=uart8250,mmio32,0x11004000 console=ttyS2,115200n8 console=tty1";
-+		bootargs = "root=/dev/fit0 earlycon=uart8250,mmio32,0x11004000 console=ttyS2,115200n8 console=tty1";
++		bootargs = "root=/dev/fit0 rootwait earlycon=uart8250,mmio32,0x11004000 console=ttyS2,115200n8 console=tty1";
 +		rootdisk-emmc = <&emmc_rootdisk>;
 +		rootdisk-sd = <&sd_rootdisk>;
  	};



From lede-commits at lists.infradead.org  Tue May  7 01:57:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 04:57:21 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: fix uci-default script for mac
 storage
In-Reply-To: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
References: <171507223990.987762.12298020737365939858@git-01.infra.openwrt.org>
Message-ID: <mailman.34200.1715072248.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3dde7861635dffa8975049e67e44a4a3def33290

commit 3dde7861635dffa8975049e67e44a4a3def33290
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue May 7 08:32:42 2024 +0200

    mediatek: bpi-r4: fix uci-default script for mac storage
    
    There was a typo in commit 5709254690cb ("mediatek: bpi-r4: store random
    MAC addresses for the BPi-R4"). Let's fix it and also add support for
    the bpi-r4-poe variant.
    
    Fixes: 5709254690cb ("mediatek: bpi-r4: store random MAC addresses for the BPi-R4")
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
index 0afb434c97..e9cb4f921d 100644
--- a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
+++ b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
@@ -11,7 +11,8 @@ unielec,u7623-02)
 	;;
 bananapi,bpi-r3|\
 bananapi,bpi-r3-mini|\
-bananapi,bpi-4)
+bananapi,bpi-r4|\
+bananapi,bpi-r4-poe)
 	[ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] &&
 		fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
 	[ -z "$(fw_printenv -n eth1addr 2>/dev/null)" ] &&



From lede-commits at lists.infradead.org  Tue May  7 03:50:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 06:50:44 -0400
Subject: [openwrt/openwrt]  mediatek: fix mt7988a pmu interrupt dts property
In-Reply-To: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
References: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
Message-ID: <mailman.34228.1715079048.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/931b2bafa7a60eb722082a889740e94a7fef7e8c

commit 931b2bafa7a60eb722082a889740e94a7fef7e8c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 7 12:13:00 2024 +0200

    mediatek: fix mt7988a pmu interrupt dts property
    
    Fixes profiling using perf
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index caad6e5577..db2b85c181 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -159,7 +159,7 @@
 	pmu {
 		compatible = "arm,cortex-a73-pmu";
 		interrupt-parent = <&gic>;
-		interrupt = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
 	};
 
 	psci {



From lede-commits at lists.infradead.org  Tue May  7 03:50:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 06:50:43 -0400
Subject: [openwrt/openwrt]  mbedtls: export cmake files
In-Reply-To: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
References: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
Message-ID: <mailman.34229.1715079048.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a2c17190997440a754683a9f29f94fc5c34e74e

commit 1a2c17190997440a754683a9f29f94fc5c34e74e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 18 21:56:56 2024 +0200

    mbedtls: export cmake files
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/mbedtls/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 568ca28308..8990db6fdc 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -156,6 +156,7 @@ define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmake $(1)/usr/lib/
 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
 	$(CP) \
 		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbedcrypto.pc \



From lede-commits at lists.infradead.org  Tue May  7 03:50:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 06:50:46 -0400
Subject: [openwrt/openwrt]  kernel: fix tools build breakage on macos with x86
In-Reply-To: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
References: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
Message-ID: <mailman.34230.1715079048.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a7ae4ed0a3951c45d4a59ee575951b64ae4a23fb

commit a7ae4ed0a3951c45d4a59ee575951b64ae4a23fb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 7 12:22:15 2024 +0200

    kernel: fix tools build breakage on macos with x86
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../generic/hack-6.6/200-tools_portability.patch   | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)

diff --git a/target/linux/generic/hack-6.6/200-tools_portability.patch b/target/linux/generic/hack-6.6/200-tools_portability.patch
new file mode 100644
index 0000000000..2ea8a68537
--- /dev/null
+++ b/target/linux/generic/hack-6.6/200-tools_portability.patch
@@ -0,0 +1,90 @@
+--- a/tools/scripts/Makefile.include
++++ b/tools/scripts/Makefile.include
+@@ -72,8 +72,6 @@ $(call allow-override,CXX,$(CROSS_COMPIL
+ $(call allow-override,STRIP,$(CROSS_COMPILE)strip)
+ endif
+ 
+-CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
+-
+ ifneq ($(LLVM),)
+ HOSTAR  ?= $(LLVM_PREFIX)llvm-ar$(LLVM_SUFFIX)
+ HOSTCC  ?= $(LLVM_PREFIX)clang$(LLVM_SUFFIX)
+@@ -84,6 +82,9 @@ HOSTCC  ?= gcc
+ HOSTLD  ?= ld
+ endif
+ 
++CC_NO_CLANG := $(shell $(CC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
++HOSTCC_NO_CLANG := $(shell $(HOSTCC) -dM -E -x c /dev/null | grep -Fq "__clang__"; echo $$?)
++
+ # Some tools require Clang, LLC and/or LLVM utils
+ CLANG		?= clang
+ LLC		?= llc
+@@ -92,8 +93,9 @@ LLVM_OBJCOPY	?= llvm-objcopy
+ LLVM_STRIP	?= llvm-strip
+ 
+ ifeq ($(CC_NO_CLANG), 1)
+-EXTRA_WARNINGS += -Wstrict-aliasing=3
+-
++  ifeq ($(HOSTCC_NO_CLANG), 1)
++    EXTRA_WARNINGS += -Wstrict-aliasing=3
++  endif
+ else ifneq ($(CROSS_COMPILE),)
+ # Allow userspace to override CLANG_CROSS_FLAGS to specify their own
+ # sysroots and flags or to avoid the GCC call in pure Clang builds.
+--- a/tools/include/linux/types.h
++++ b/tools/include/linux/types.h
+@@ -56,6 +56,7 @@ typedef __s8  s8;
+ #define __user
+ #endif
+ #define __must_check
++#undef __cold
+ #define __cold
+ 
+ typedef __u16 __bitwise __le16;
+--- a/tools/objtool/include/objtool/objtool.h
++++ b/tools/objtool/include/objtool/objtool.h
+@@ -12,6 +12,7 @@
+ 
+ #include <objtool/elf.h>
+ 
++#undef __weak
+ #define __weak __attribute__((weak))
+ 
+ struct pv_state {
+--- a/tools/include/asm-generic/bitops/fls.h
++++ b/tools/include/asm-generic/bitops/fls.h
+@@ -2,6 +2,8 @@
+ #ifndef _ASM_GENERIC_BITOPS_FLS_H_
+ #define _ASM_GENERIC_BITOPS_FLS_H_
+ 
++#include <string.h>
++
+ /**
+  * fls - find last (most-significant) bit set
+  * @x: the word to search
+@@ -10,6 +12,7 @@
+  * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
+  */
+ 
++#define fls __linux_fls
+ static __always_inline int fls(unsigned int x)
+ {
+ 	int r = 32;
+--- a/tools/lib/string.c
++++ b/tools/lib/string.c
+@@ -96,6 +96,7 @@ int strtobool(const char *s, bool *res)
+  * If libc has strlcpy() then that version will override this
+  * implementation:
+  */
++#ifndef __APPLE__
+ #ifdef __clang__
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wignored-attributes"
+@@ -114,6 +115,7 @@ size_t __weak strlcpy(char *dest, const
+ #ifdef __clang__
+ #pragma clang diagnostic pop
+ #endif
++#endif
+ 
+ /**
+  * skip_spaces - Removes leading whitespace from @str.



From lede-commits at lists.infradead.org  Tue May  7 03:50:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 06:50:45 -0400
Subject: [openwrt/openwrt]  tools: add more linux include files to fix x86
 build on macos
In-Reply-To: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
References: <171507904364.1293040.13820237942985061337@git-01.infra.openwrt.org>
Message-ID: <mailman.34231.1715079050.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c3d4598c0129671d534e5556d25b00229fc22095

commit c3d4598c0129671d534e5556d25b00229fc22095
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 7 12:18:08 2024 +0200

    tools: add more linux include files to fix x86 build on macos
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 tools/include/asm/bitsperlong.h     |  27 ++++
 tools/include/asm/byteorder.h       |  12 ++
 tools/include/asm/errno-base.h      |  40 +++++
 tools/include/asm/errno.h           | 123 +++++++++++++++
 tools/include/asm/posix_types.h     | 100 ++++++++++++
 tools/include/asm/swab.h            |  19 +++
 tools/include/linux/big_endian.h    | 107 +++++++++++++
 tools/include/linux/errno.h         |   1 +
 tools/include/linux/little_endian.h | 107 +++++++++++++
 tools/include/linux/stddef.h        |  56 +++++++
 tools/include/linux/swab.h          | 305 ++++++++++++++++++++++++++++++++++++
 11 files changed, 897 insertions(+)

diff --git a/tools/include/asm/bitsperlong.h b/tools/include/asm/bitsperlong.h
new file mode 100644
index 0000000000..75f320fa91
--- /dev/null
+++ b/tools/include/asm/bitsperlong.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef __ASM_GENERIC_BITS_PER_LONG
+#define __ASM_GENERIC_BITS_PER_LONG
+
+#ifndef __BITS_PER_LONG
+/*
+ * In order to keep safe and avoid regression, only unify uapi
+ * bitsperlong.h for some archs which are using newer toolchains
+ * that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.
+ * See the following link for more info:
+ * https://lore.kernel.org/linux-arch/b9624545-2c80-49a1-ac3c-39264a591f7b at app.fastmail.com/
+ */
+#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__)
+#define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
+#else
+/*
+ * There seems to be no way of detecting this automatically from user
+ * space, so 64 bit architectures should override this in their
+ * bitsperlong.h. In particular, an architecture that supports
+ * both 32 and 64 bit user space must not rely on CONFIG_64BIT
+ * to decide it, but rather check a compiler provided macro.
+ */
+#define __BITS_PER_LONG 32
+#endif
+#endif
+
+#endif /* __ASM_GENERIC_BITS_PER_LONG */
diff --git a/tools/include/asm/byteorder.h b/tools/include/asm/byteorder.h
new file mode 100644
index 0000000000..8e7d779d7d
--- /dev/null
+++ b/tools/include/asm/byteorder.h
@@ -0,0 +1,12 @@
+#ifndef __ASM_BYTEORDER_H
+#define __ASM_BYTEORDER_H
+
+#include <endian.h>
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#include <linux/byteorder/little_endian.h>
+#else
+#include <linux/byteorder/big_endian.h>
+#endif
+
+#endif
diff --git a/tools/include/asm/errno-base.h b/tools/include/asm/errno-base.h
new file mode 100644
index 0000000000..9653140bff
--- /dev/null
+++ b/tools/include/asm/errno-base.h
@@ -0,0 +1,40 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _ASM_GENERIC_ERRNO_BASE_H
+#define _ASM_GENERIC_ERRNO_BASE_H
+
+#define	EPERM		 1	/* Operation not permitted */
+#define	ENOENT		 2	/* No such file or directory */
+#define	ESRCH		 3	/* No such process */
+#define	EINTR		 4	/* Interrupted system call */
+#define	EIO		 5	/* I/O error */
+#define	ENXIO		 6	/* No such device or address */
+#define	E2BIG		 7	/* Argument list too long */
+#define	ENOEXEC		 8	/* Exec format error */
+#define	EBADF		 9	/* Bad file number */
+#define	ECHILD		10	/* No child processes */
+#define	EAGAIN		11	/* Try again */
+#define	ENOMEM		12	/* Out of memory */
+#define	EACCES		13	/* Permission denied */
+#define	EFAULT		14	/* Bad address */
+#define	ENOTBLK		15	/* Block device required */
+#define	EBUSY		16	/* Device or resource busy */
+#define	EEXIST		17	/* File exists */
+#define	EXDEV		18	/* Cross-device link */
+#define	ENODEV		19	/* No such device */
+#define	ENOTDIR		20	/* Not a directory */
+#define	EISDIR		21	/* Is a directory */
+#define	EINVAL		22	/* Invalid argument */
+#define	ENFILE		23	/* File table overflow */
+#define	EMFILE		24	/* Too many open files */
+#define	ENOTTY		25	/* Not a typewriter */
+#define	ETXTBSY		26	/* Text file busy */
+#define	EFBIG		27	/* File too large */
+#define	ENOSPC		28	/* No space left on device */
+#define	ESPIPE		29	/* Illegal seek */
+#define	EROFS		30	/* Read-only file system */
+#define	EMLINK		31	/* Too many links */
+#define	EPIPE		32	/* Broken pipe */
+#define	EDOM		33	/* Math argument out of domain of func */
+#define	ERANGE		34	/* Math result not representable */
+
+#endif
diff --git a/tools/include/asm/errno.h b/tools/include/asm/errno.h
new file mode 100644
index 0000000000..a96d525330
--- /dev/null
+++ b/tools/include/asm/errno.h
@@ -0,0 +1,123 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _ASM_GENERIC_ERRNO_H
+#define _ASM_GENERIC_ERRNO_H
+
+#include <asm/errno-base.h>
+
+#define	EDEADLK		35	/* Resource deadlock would occur */
+#define	ENAMETOOLONG	36	/* File name too long */
+#define	ENOLCK		37	/* No record locks available */
+
+/*
+ * This error code is special: arch syscall entry code will return
+ * -ENOSYS if users try to call a syscall that doesn't exist.  To keep
+ * failures of syscalls that really do exist distinguishable from
+ * failures due to attempts to use a nonexistent syscall, syscall
+ * implementations should refrain from returning -ENOSYS.
+ */
+#define	ENOSYS		38	/* Invalid system call number */
+
+#define	ENOTEMPTY	39	/* Directory not empty */
+#define	ELOOP		40	/* Too many symbolic links encountered */
+#define	EWOULDBLOCK	EAGAIN	/* Operation would block */
+#define	ENOMSG		42	/* No message of desired type */
+#define	EIDRM		43	/* Identifier removed */
+#define	ECHRNG		44	/* Channel number out of range */
+#define	EL2NSYNC	45	/* Level 2 not synchronized */
+#define	EL3HLT		46	/* Level 3 halted */
+#define	EL3RST		47	/* Level 3 reset */
+#define	ELNRNG		48	/* Link number out of range */
+#define	EUNATCH		49	/* Protocol driver not attached */
+#define	ENOCSI		50	/* No CSI structure available */
+#define	EL2HLT		51	/* Level 2 halted */
+#define	EBADE		52	/* Invalid exchange */
+#define	EBADR		53	/* Invalid request descriptor */
+#define	EXFULL		54	/* Exchange full */
+#define	ENOANO		55	/* No anode */
+#define	EBADRQC		56	/* Invalid request code */
+#define	EBADSLT		57	/* Invalid slot */
+
+#define	EDEADLOCK	EDEADLK
+
+#define	EBFONT		59	/* Bad font file format */
+#define	ENOSTR		60	/* Device not a stream */
+#define	ENODATA		61	/* No data available */
+#define	ETIME		62	/* Timer expired */
+#define	ENOSR		63	/* Out of streams resources */
+#define	ENONET		64	/* Machine is not on the network */
+#define	ENOPKG		65	/* Package not installed */
+#define	EREMOTE		66	/* Object is remote */
+#define	ENOLINK		67	/* Link has been severed */
+#define	EADV		68	/* Advertise error */
+#define	ESRMNT		69	/* Srmount error */
+#define	ECOMM		70	/* Communication error on send */
+#define	EPROTO		71	/* Protocol error */
+#define	EMULTIHOP	72	/* Multihop attempted */
+#define	EDOTDOT		73	/* RFS specific error */
+#define	EBADMSG		74	/* Not a data message */
+#define	EOVERFLOW	75	/* Value too large for defined data type */
+#define	ENOTUNIQ	76	/* Name not unique on network */
+#define	EBADFD		77	/* File descriptor in bad state */
+#define	EREMCHG		78	/* Remote address changed */
+#define	ELIBACC		79	/* Can not access a needed shared library */
+#define	ELIBBAD		80	/* Accessing a corrupted shared library */
+#define	ELIBSCN		81	/* .lib section in a.out corrupted */
+#define	ELIBMAX		82	/* Attempting to link in too many shared libraries */
+#define	ELIBEXEC	83	/* Cannot exec a shared library directly */
+#define	EILSEQ		84	/* Illegal byte sequence */
+#define	ERESTART	85	/* Interrupted system call should be restarted */
+#define	ESTRPIPE	86	/* Streams pipe error */
+#define	EUSERS		87	/* Too many users */
+#define	ENOTSOCK	88	/* Socket operation on non-socket */
+#define	EDESTADDRREQ	89	/* Destination address required */
+#define	EMSGSIZE	90	/* Message too long */
+#define	EPROTOTYPE	91	/* Protocol wrong type for socket */
+#define	ENOPROTOOPT	92	/* Protocol not available */
+#define	EPROTONOSUPPORT	93	/* Protocol not supported */
+#define	ESOCKTNOSUPPORT	94	/* Socket type not supported */
+#define	EOPNOTSUPP	95	/* Operation not supported on transport endpoint */
+#define	EPFNOSUPPORT	96	/* Protocol family not supported */
+#define	EAFNOSUPPORT	97	/* Address family not supported by protocol */
+#define	EADDRINUSE	98	/* Address already in use */
+#define	EADDRNOTAVAIL	99	/* Cannot assign requested address */
+#define	ENETDOWN	100	/* Network is down */
+#define	ENETUNREACH	101	/* Network is unreachable */
+#define	ENETRESET	102	/* Network dropped connection because of reset */
+#define	ECONNABORTED	103	/* Software caused connection abort */
+#define	ECONNRESET	104	/* Connection reset by peer */
+#define	ENOBUFS		105	/* No buffer space available */
+#define	EISCONN		106	/* Transport endpoint is already connected */
+#define	ENOTCONN	107	/* Transport endpoint is not connected */
+#define	ESHUTDOWN	108	/* Cannot send after transport endpoint shutdown */
+#define	ETOOMANYREFS	109	/* Too many references: cannot splice */
+#define	ETIMEDOUT	110	/* Connection timed out */
+#define	ECONNREFUSED	111	/* Connection refused */
+#define	EHOSTDOWN	112	/* Host is down */
+#define	EHOSTUNREACH	113	/* No route to host */
+#define	EALREADY	114	/* Operation already in progress */
+#define	EINPROGRESS	115	/* Operation now in progress */
+#define	ESTALE		116	/* Stale file handle */
+#define	EUCLEAN		117	/* Structure needs cleaning */
+#define	ENOTNAM		118	/* Not a XENIX named type file */
+#define	ENAVAIL		119	/* No XENIX semaphores available */
+#define	EISNAM		120	/* Is a named type file */
+#define	EREMOTEIO	121	/* Remote I/O error */
+#define	EDQUOT		122	/* Quota exceeded */
+
+#define	ENOMEDIUM	123	/* No medium found */
+#define	EMEDIUMTYPE	124	/* Wrong medium type */
+#define	ECANCELED	125	/* Operation Canceled */
+#define	ENOKEY		126	/* Required key not available */
+#define	EKEYEXPIRED	127	/* Key has expired */
+#define	EKEYREVOKED	128	/* Key has been revoked */
+#define	EKEYREJECTED	129	/* Key was rejected by service */
+
+/* for robust mutexes */
+#define	EOWNERDEAD	130	/* Owner died */
+#define	ENOTRECOVERABLE	131	/* State not recoverable */
+
+#define ERFKILL		132	/* Operation not possible due to RF-kill */
+
+#define EHWPOISON	133	/* Memory page has hardware error */
+
+#endif
diff --git a/tools/include/asm/posix_types.h b/tools/include/asm/posix_types.h
new file mode 100644
index 0000000000..10f5e6ef4a
--- /dev/null
+++ b/tools/include/asm/posix_types.h
@@ -0,0 +1,100 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef __ASM_GENERIC_POSIX_TYPES_H
+#define __ASM_GENERIC_POSIX_TYPES_H
+
+#include <asm/bitsperlong.h>
+
+/*
+ * This file is generally used by user-level software, so you need to
+ * be a little careful about namespace pollution etc.
+ *
+ * First the types that are often defined in different ways across
+ * architectures, so that you can override them.
+ */
+
+#ifndef __kernel_long_t
+typedef long		__kernel_long_t;
+typedef unsigned long	__kernel_ulong_t;
+#endif
+
+#ifndef __kernel_ino_t
+typedef __kernel_ulong_t __kernel_ino_t;
+#endif
+
+#ifndef __kernel_mode_t
+typedef unsigned int	__kernel_mode_t;
+#endif
+
+#ifndef __kernel_pid_t
+typedef int		__kernel_pid_t;
+#endif
+
+#ifndef __kernel_ipc_pid_t
+typedef int		__kernel_ipc_pid_t;
+#endif
+
+#ifndef __kernel_uid_t
+typedef unsigned int	__kernel_uid_t;
+typedef unsigned int	__kernel_gid_t;
+#endif
+
+#ifndef __kernel_suseconds_t
+typedef __kernel_long_t		__kernel_suseconds_t;
+#endif
+
+#ifndef __kernel_daddr_t
+typedef int		__kernel_daddr_t;
+#endif
+
+#ifndef __kernel_uid32_t
+typedef unsigned int	__kernel_uid32_t;
+typedef unsigned int	__kernel_gid32_t;
+#endif
+
+#ifndef __kernel_old_uid_t
+typedef __kernel_uid_t	__kernel_old_uid_t;
+typedef __kernel_gid_t	__kernel_old_gid_t;
+#endif
+
+#ifndef __kernel_old_dev_t
+typedef unsigned int	__kernel_old_dev_t;
+#endif
+
+/*
+ * Most 32 bit architectures use "unsigned int" size_t,
+ * and all 64 bit architectures use "unsigned long" size_t.
+ */
+#ifndef __kernel_size_t
+#if __BITS_PER_LONG != 64
+typedef unsigned int	__kernel_size_t;
+typedef int		__kernel_ssize_t;
+typedef int		__kernel_ptrdiff_t;
+#else
+typedef __kernel_ulong_t __kernel_size_t;
+typedef __kernel_long_t	__kernel_ssize_t;
+typedef __kernel_long_t	__kernel_ptrdiff_t;
+#endif
+#endif
+
+#ifndef __kernel_fsid_t
+typedef struct {
+	int	val[2];
+} __kernel_fsid_t;
+#endif
+
+/*
+ * anything below here should be completely generic
+ */
+typedef __kernel_long_t	__kernel_off_t;
+typedef long long	__kernel_loff_t;
+typedef __kernel_long_t	__kernel_old_time_t;
+typedef __kernel_long_t	__kernel_time_t;
+typedef long long __kernel_time64_t;
+typedef __kernel_long_t	__kernel_clock_t;
+typedef int		__kernel_timer_t;
+typedef int		__kernel_clockid_t;
+typedef char *		__kernel_caddr_t;
+typedef unsigned short	__kernel_uid16_t;
+typedef unsigned short	__kernel_gid16_t;
+
+#endif /* __ASM_GENERIC_POSIX_TYPES_H */
diff --git a/tools/include/asm/swab.h b/tools/include/asm/swab.h
new file mode 100644
index 0000000000..f2da4e4fd4
--- /dev/null
+++ b/tools/include/asm/swab.h
@@ -0,0 +1,19 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _ASM_GENERIC_SWAB_H
+#define _ASM_GENERIC_SWAB_H
+
+#include <asm/bitsperlong.h>
+
+/*
+ * 32 bit architectures typically (but not always) want to
+ * set __SWAB_64_THRU_32__. In user space, this is only
+ * valid if the compiler supports 64 bit data types.
+ */
+
+#if __BITS_PER_LONG == 32
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
+#define __SWAB_64_THRU_32__
+#endif
+#endif
+
+#endif /* _ASM_GENERIC_SWAB_H */
diff --git a/tools/include/linux/big_endian.h b/tools/include/linux/big_endian.h
new file mode 100644
index 0000000000..3bb87c573c
--- /dev/null
+++ b/tools/include/linux/big_endian.h
@@ -0,0 +1,107 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_BYTEORDER_BIG_ENDIAN_H
+#define _LINUX_BYTEORDER_BIG_ENDIAN_H
+
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __BIG_ENDIAN_BITFIELD
+#define __BIG_ENDIAN_BITFIELD
+#endif
+
+#include <linux/stddef.h>
+#include <linux/types.h>
+#include <linux/swab.h>
+
+#define __constant_htonl(x) ((__be32)(__u32)(x))
+#define __constant_ntohl(x) ((__u32)(__be32)(x))
+#define __constant_htons(x) ((__be16)(__u16)(x))
+#define __constant_ntohs(x) ((__u16)(__be16)(x))
+#define __constant_cpu_to_le64(x) ((__le64)___constant_swab64((x)))
+#define __constant_le64_to_cpu(x) ___constant_swab64((__u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__le32)___constant_swab32((x)))
+#define __constant_le32_to_cpu(x) ___constant_swab32((__u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__le16)___constant_swab16((x)))
+#define __constant_le16_to_cpu(x) ___constant_swab16((__u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__be64)(__u64)(x))
+#define __constant_be64_to_cpu(x) ((__u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__be32)(__u32)(x))
+#define __constant_be32_to_cpu(x) ((__u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__be16)(__u16)(x))
+#define __constant_be16_to_cpu(x) ((__u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__le64)__swab64((x)))
+#define __le64_to_cpu(x) __swab64((__u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__le32)__swab32((x)))
+#define __le32_to_cpu(x) __swab32((__u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__le16)__swab16((x)))
+#define __le16_to_cpu(x) __swab16((__u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__be64)(__u64)(x))
+#define __be64_to_cpu(x) ((__u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__be32)(__u32)(x))
+#define __be32_to_cpu(x) ((__u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__be16)(__u16)(x))
+#define __be16_to_cpu(x) ((__u16)(__be16)(x))
+
+static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
+{
+	return (__le64)__swab64p(p);
+}
+static __always_inline __u64 __le64_to_cpup(const __le64 *p)
+{
+	return __swab64p((__u64 *)p);
+}
+static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
+{
+	return (__le32)__swab32p(p);
+}
+static __always_inline __u32 __le32_to_cpup(const __le32 *p)
+{
+	return __swab32p((__u32 *)p);
+}
+static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
+{
+	return (__le16)__swab16p(p);
+}
+static __always_inline __u16 __le16_to_cpup(const __le16 *p)
+{
+	return __swab16p((__u16 *)p);
+}
+static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
+{
+	return (__be64)*p;
+}
+static __always_inline __u64 __be64_to_cpup(const __be64 *p)
+{
+	return (__u64)*p;
+}
+static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
+{
+	return (__be32)*p;
+}
+static __always_inline __u32 __be32_to_cpup(const __be32 *p)
+{
+	return (__u32)*p;
+}
+static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
+{
+	return (__be16)*p;
+}
+static __always_inline __u16 __be16_to_cpup(const __be16 *p)
+{
+	return (__u16)*p;
+}
+#define __cpu_to_le64s(x) __swab64s((x))
+#define __le64_to_cpus(x) __swab64s((x))
+#define __cpu_to_le32s(x) __swab32s((x))
+#define __le32_to_cpus(x) __swab32s((x))
+#define __cpu_to_le16s(x) __swab16s((x))
+#define __le16_to_cpus(x) __swab16s((x))
+#define __cpu_to_be64s(x) do { (void)(x); } while (0)
+#define __be64_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_be32s(x) do { (void)(x); } while (0)
+#define __be32_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_be16s(x) do { (void)(x); } while (0)
+#define __be16_to_cpus(x) do { (void)(x); } while (0)
+
+
+#endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */
diff --git a/tools/include/linux/errno.h b/tools/include/linux/errno.h
new file mode 100644
index 0000000000..70f2bd34e3
--- /dev/null
+++ b/tools/include/linux/errno.h
@@ -0,0 +1 @@
+#include <asm/errno.h>
diff --git a/tools/include/linux/little_endian.h b/tools/include/linux/little_endian.h
new file mode 100644
index 0000000000..ba6c199c9b
--- /dev/null
+++ b/tools/include/linux/little_endian.h
@@ -0,0 +1,107 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+#define _LINUX_BYTEORDER_LITTLE_ENDIAN_H
+
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+#ifndef __LITTLE_ENDIAN_BITFIELD
+#define __LITTLE_ENDIAN_BITFIELD
+#endif
+
+#include <linux/stddef.h>
+#include <linux/types.h>
+#include <linux/swab.h>
+
+#define __constant_htonl(x) ((__be32)___constant_swab32((x)))
+#define __constant_ntohl(x) ___constant_swab32((__be32)(x))
+#define __constant_htons(x) ((__be16)___constant_swab16((x)))
+#define __constant_ntohs(x) ___constant_swab16((__be16)(x))
+#define __constant_cpu_to_le64(x) ((__le64)(__u64)(x))
+#define __constant_le64_to_cpu(x) ((__u64)(__le64)(x))
+#define __constant_cpu_to_le32(x) ((__le32)(__u32)(x))
+#define __constant_le32_to_cpu(x) ((__u32)(__le32)(x))
+#define __constant_cpu_to_le16(x) ((__le16)(__u16)(x))
+#define __constant_le16_to_cpu(x) ((__u16)(__le16)(x))
+#define __constant_cpu_to_be64(x) ((__be64)___constant_swab64((x)))
+#define __constant_be64_to_cpu(x) ___constant_swab64((__u64)(__be64)(x))
+#define __constant_cpu_to_be32(x) ((__be32)___constant_swab32((x)))
+#define __constant_be32_to_cpu(x) ___constant_swab32((__u32)(__be32)(x))
+#define __constant_cpu_to_be16(x) ((__be16)___constant_swab16((x)))
+#define __constant_be16_to_cpu(x) ___constant_swab16((__u16)(__be16)(x))
+#define __cpu_to_le64(x) ((__le64)(__u64)(x))
+#define __le64_to_cpu(x) ((__u64)(__le64)(x))
+#define __cpu_to_le32(x) ((__le32)(__u32)(x))
+#define __le32_to_cpu(x) ((__u32)(__le32)(x))
+#define __cpu_to_le16(x) ((__le16)(__u16)(x))
+#define __le16_to_cpu(x) ((__u16)(__le16)(x))
+#define __cpu_to_be64(x) ((__be64)__swab64((x)))
+#define __be64_to_cpu(x) __swab64((__u64)(__be64)(x))
+#define __cpu_to_be32(x) ((__be32)__swab32((x)))
+#define __be32_to_cpu(x) __swab32((__u32)(__be32)(x))
+#define __cpu_to_be16(x) ((__be16)__swab16((x)))
+#define __be16_to_cpu(x) __swab16((__u16)(__be16)(x))
+
+static __always_inline __le64 __cpu_to_le64p(const __u64 *p)
+{
+	return (__le64)*p;
+}
+static __always_inline __u64 __le64_to_cpup(const __le64 *p)
+{
+	return (__u64)*p;
+}
+static __always_inline __le32 __cpu_to_le32p(const __u32 *p)
+{
+	return (__le32)*p;
+}
+static __always_inline __u32 __le32_to_cpup(const __le32 *p)
+{
+	return (__u32)*p;
+}
+static __always_inline __le16 __cpu_to_le16p(const __u16 *p)
+{
+	return (__le16)*p;
+}
+static __always_inline __u16 __le16_to_cpup(const __le16 *p)
+{
+	return (__u16)*p;
+}
+static __always_inline __be64 __cpu_to_be64p(const __u64 *p)
+{
+	return (__be64)__swab64p(p);
+}
+static __always_inline __u64 __be64_to_cpup(const __be64 *p)
+{
+	return __swab64p((__u64 *)p);
+}
+static __always_inline __be32 __cpu_to_be32p(const __u32 *p)
+{
+	return (__be32)__swab32p(p);
+}
+static __always_inline __u32 __be32_to_cpup(const __be32 *p)
+{
+	return __swab32p((__u32 *)p);
+}
+static __always_inline __be16 __cpu_to_be16p(const __u16 *p)
+{
+	return (__be16)__swab16p(p);
+}
+static __always_inline __u16 __be16_to_cpup(const __be16 *p)
+{
+	return __swab16p((__u16 *)p);
+}
+#define __cpu_to_le64s(x) do { (void)(x); } while (0)
+#define __le64_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_le32s(x) do { (void)(x); } while (0)
+#define __le32_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_le16s(x) do { (void)(x); } while (0)
+#define __le16_to_cpus(x) do { (void)(x); } while (0)
+#define __cpu_to_be64s(x) __swab64s((x))
+#define __be64_to_cpus(x) __swab64s((x))
+#define __cpu_to_be32s(x) __swab32s((x))
+#define __be32_to_cpus(x) __swab32s((x))
+#define __cpu_to_be16s(x) __swab16s((x))
+#define __be16_to_cpus(x) __swab16s((x))
+
+
+#endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */
diff --git a/tools/include/linux/stddef.h b/tools/include/linux/stddef.h
new file mode 100644
index 0000000000..e3d20e76b1
--- /dev/null
+++ b/tools/include/linux/stddef.h
@@ -0,0 +1,56 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_LINUX_STDDEF_H
+#define _UAPI_LINUX_STDDEF_H
+
+#ifndef __always_inline
+#define __always_inline inline
+#endif
+
+/**
+ * __struct_group() - Create a mirrored named and anonyomous struct
+ *
+ * @TAG: The tag name for the named sub-struct (usually empty)
+ * @NAME: The identifier name of the mirrored sub-struct
+ * @ATTRS: Any struct attributes (usually empty)
+ * @MEMBERS: The member declarations for the mirrored structs
+ *
+ * Used to create an anonymous union of two structs with identical layout
+ * and size: one anonymous and one named. The former's members can be used
+ * normally without sub-struct naming, and the latter can be used to
+ * reason about the start, end, and size of the group of struct members.
+ * The named struct can also be explicitly tagged for layer reuse, as well
+ * as both having struct attributes appended.
+ */
+#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
+	union { \
+		struct { MEMBERS } ATTRS; \
+		struct TAG { MEMBERS } ATTRS NAME; \
+	} ATTRS
+
+#ifdef __cplusplus
+/* sizeof(struct{}) is 1 in C++, not 0, can't use C version of the macro. */
+#define __DECLARE_FLEX_ARRAY(T, member)	\
+	T member[0]
+#else
+/**
+ * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+ *
+ * @TYPE: The type of each flexible array element
+ * @NAME: The name of the flexible array member
+ *
+ * In order to have a flexible array member in a union or alone in a
+ * struct, it needs to be wrapped in an anonymous struct with at least 1
+ * named member, but that member can be empty.
+ */
+#define __DECLARE_FLEX_ARRAY(TYPE, NAME)	\
+	struct { \
+		struct { } __empty_ ## NAME; \
+		TYPE NAME[]; \
+	}
+#endif
+
+#ifndef __counted_by
+#define __counted_by(m)
+#endif
+
+#endif /* _UAPI_LINUX_STDDEF_H */
diff --git a/tools/include/linux/swab.h b/tools/include/linux/swab.h
new file mode 100644
index 0000000000..7e3bad56cf
--- /dev/null
+++ b/tools/include/linux/swab.h
@@ -0,0 +1,305 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_SWAB_H
+#define _LINUX_SWAB_H
+
+#include <linux/types.h>
+#include <linux/stddef.h>
+#include <asm/bitsperlong.h>
+#include <asm/swab.h>
+
+/*
+ * casts are necessary for constants, because we never know how for sure
+ * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
+ */
+#define ___constant_swab16(x) ((__u16)(				\
+	(((__u16)(x) & (__u16)0x00ffU) << 8) |			\
+	(((__u16)(x) & (__u16)0xff00U) >> 8)))
+
+#define ___constant_swab32(x) ((__u32)(				\
+	(((__u32)(x) & (__u32)0x000000ffUL) << 24) |		\
+	(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |		\
+	(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |		\
+	(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
+
+#define ___constant_swab64(x) ((__u64)(				\
+	(((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) |	\
+	(((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) |	\
+	(((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) |	\
+	(((__u64)(x) & (__u64)0x00000000ff000000ULL) <<  8) |	\
+	(((__u64)(x) & (__u64)0x000000ff00000000ULL) >>  8) |	\
+	(((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) |	\
+	(((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) |	\
+	(((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56)))
+
+#define ___constant_swahw32(x) ((__u32)(			\
+	(((__u32)(x) & (__u32)0x0000ffffUL) << 16) |		\
+	(((__u32)(x) & (__u32)0xffff0000UL) >> 16)))
+
+#define ___constant_swahb32(x) ((__u32)(			\
+	(((__u32)(x) & (__u32)0x00ff00ffUL) << 8) |		\
+	(((__u32)(x) & (__u32)0xff00ff00UL) >> 8)))
+
+/*
+ * Implement the following as inlines, but define the interface using
+ * macros to allow constant folding when possible:
+ * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32
+ */
+
+static __inline__  __u16 __fswab16(__u16 val)
+{
+#if defined (__arch_swab16)
+	return __arch_swab16(val);
+#else
+	return ___constant_swab16(val);
+#endif
+}
+
+static __inline__  __u32 __fswab32(__u32 val)
+{
+#if defined(__arch_swab32)
+	return __arch_swab32(val);
+#else
+	return ___constant_swab32(val);
+#endif
+}
+
+static __inline__  __u64 __fswab64(__u64 val)
+{
+#if defined (__arch_swab64)
+	return __arch_swab64(val);
+#elif defined(__SWAB_64_THRU_32__)
+	__u32 h = val >> 32;
+	__u32 l = val & ((1ULL << 32) - 1);
+	return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h)));
+#else
+	return ___constant_swab64(val);
+#endif
+}
+
+static __inline__  __u32 __fswahw32(__u32 val)
+{
+#ifdef __arch_swahw32
+	return __arch_swahw32(val);
+#else
+	return ___constant_swahw32(val);
+#endif
+}
+
+static __inline__  __u32 __fswahb32(__u32 val)
+{
+#ifdef __arch_swahb32
+	return __arch_swahb32(val);
+#else
+	return ___constant_swahb32(val);
+#endif
+}
+
+/**
+ * __swab16 - return a byteswapped 16-bit value
+ * @x: value to byteswap
+ */
+#ifdef __HAVE_BUILTIN_BSWAP16__
+#define __swab16(x) (__u16)__builtin_bswap16((__u16)(x))
+#else
+#define __swab16(x)				\
+	(__u16)(__builtin_constant_p(x) ?	\
+	___constant_swab16(x) :			\
+	__fswab16(x))
+#endif
+
+/**
+ * __swab32 - return a byteswapped 32-bit value
+ * @x: value to byteswap
+ */
+#ifdef __HAVE_BUILTIN_BSWAP32__
+#define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
+#else
+#define __swab32(x)				\
+	(__u32)(__builtin_constant_p(x) ?	\
+	___constant_swab32(x) :			\
+	__fswab32(x))
+#endif
+
+/**
+ * __swab64 - return a byteswapped 64-bit value
+ * @x: value to byteswap
+ */
+#ifdef __HAVE_BUILTIN_BSWAP64__
+#define __swab64(x) (__u64)__builtin_bswap64((__u64)(x))
+#else
+#define __swab64(x)				\
+	(__u64)(__builtin_constant_p(x) ?	\
+	___constant_swab64(x) :			\
+	__fswab64(x))
+#endif
+
+static __always_inline unsigned long __swab(const unsigned long y)
+{
+#if __BITS_PER_LONG == 64
+	return __swab64(y);
+#else /* __BITS_PER_LONG == 32 */
+	return __swab32(y);
+#endif
+}
+
+/**
+ * __swahw32 - return a word-swapped 32-bit value
+ * @x: value to wordswap
+ *
+ * __swahw32(0x12340000) is 0x00001234
+ */
+#define __swahw32(x)				\
+	(__builtin_constant_p((__u32)(x)) ?	\
+	___constant_swahw32(x) :		\
+	__fswahw32(x))
+
+/**
+ * __swahb32 - return a high and low byte-swapped 32-bit value
+ * @x: value to byteswap
+ *
+ * __swahb32(0x12345678) is 0x34127856
+ */
+#define __swahb32(x)				\
+	(__builtin_constant_p((__u32)(x)) ?	\
+	___constant_swahb32(x) :		\
+	__fswahb32(x))
+
+/**
+ * __swab16p - return a byteswapped 16-bit value from a pointer
+ * @p: pointer to a naturally-aligned 16-bit value
+ */
+static __always_inline __u16 __swab16p(const __u16 *p)
+{
+#ifdef __arch_swab16p
+	return __arch_swab16p(p);
+#else
+	return __swab16(*p);
+#endif
+}
+
+/**
+ * __swab32p - return a byteswapped 32-bit value from a pointer
+ * @p: pointer to a naturally-aligned 32-bit value
+ */
+static __always_inline __u32 __swab32p(const __u32 *p)
+{
+#ifdef __arch_swab32p
+	return __arch_swab32p(p);
+#else
+	return __swab32(*p);
+#endif
+}
+
+/**
+ * __swab64p - return a byteswapped 64-bit value from a pointer
+ * @p: pointer to a naturally-aligned 64-bit value
+ */
+static __always_inline __u64 __swab64p(const __u64 *p)
+{
+#ifdef __arch_swab64p
+	return __arch_swab64p(p);
+#else
+	return __swab64(*p);
+#endif
+}
+
+/**
+ * __swahw32p - return a wordswapped 32-bit value from a pointer
+ * @p: pointer to a naturally-aligned 32-bit value
+ *
+ * See __swahw32() for details of wordswapping.
+ */
+static __inline__ __u32 __swahw32p(const __u32 *p)
+{
+#ifdef __arch_swahw32p
+	return __arch_swahw32p(p);
+#else
+	return __swahw32(*p);
+#endif
+}
+
+/**
+ * __swahb32p - return a high and low byteswapped 32-bit value from a pointer
+ * @p: pointer to a naturally-aligned 32-bit value
+ *
+ * See __swahb32() for details of high/low byteswapping.
+ */
+static __inline__ __u32 __swahb32p(const __u32 *p)
+{
+#ifdef __arch_swahb32p
+	return __arch_swahb32p(p);
+#else
+	return __swahb32(*p);
+#endif
+}
+
+/**
+ * __swab16s - byteswap a 16-bit value in-place
+ * @p: pointer to a naturally-aligned 16-bit value
+ */
+static __inline__ void __swab16s(__u16 *p)
+{
+#ifdef __arch_swab16s
+	__arch_swab16s(p);
+#else
+	*p = __swab16p(p);
+#endif
+}
+/**
+ * __swab32s - byteswap a 32-bit value in-place
+ * @p: pointer to a naturally-aligned 32-bit value
+ */
+static __always_inline void __swab32s(__u32 *p)
+{
+#ifdef __arch_swab32s
+	__arch_swab32s(p);
+#else
+	*p = __swab32p(p);
+#endif
+}
+
+/**
+ * __swab64s - byteswap a 64-bit value in-place
+ * @p: pointer to a naturally-aligned 64-bit value
+ */
+static __always_inline void __swab64s(__u64 *p)
+{
+#ifdef __arch_swab64s
+	__arch_swab64s(p);
+#else
+	*p = __swab64p(p);
+#endif
+}
+
+/**
+ * __swahw32s - wordswap a 32-bit value in-place
+ * @p: pointer to a naturally-aligned 32-bit value
+ *
+ * See __swahw32() for details of wordswapping
+ */
+static __inline__ void __swahw32s(__u32 *p)
+{
+#ifdef __arch_swahw32s
+	__arch_swahw32s(p);
+#else
+	*p = __swahw32p(p);
+#endif
+}
+
+/**
+ * __swahb32s - high and low byteswap a 32-bit value in-place
+ * @p: pointer to a naturally-aligned 32-bit value
+ *
+ * See __swahb32() for details of high and low byte swapping
+ */
+static __inline__ void __swahb32s(__u32 *p)
+{
+#ifdef __arch_swahb32s
+	__arch_swahb32s(p);
+#else
+	*p = __swahb32p(p);
+#endif
+}
+
+
+#endif /* _LINUX_SWAB_H */



From lede-commits at lists.infradead.org  Tue May  7 04:21:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 07:21:41 -0400
Subject: [openwrt/openwrt]  generic: 6.1,
 6.6: move accepted patches to backport folders
In-Reply-To: <171508090150.1373736.6671140446710959930@git-01.infra.openwrt.org>
References: <171508090150.1373736.6671140446710959930@git-01.infra.openwrt.org>
Message-ID: <mailman.34236.1715080907.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/50f7155d576575ec3f410924df5ecb414f3de6fc

commit 50f7155d576575ec3f410924df5ecb414f3de6fc
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 12:00:58 2024 +0100

    generic: 6.1, 6.6: move accepted patches to backport folders
    
    Move two accepted patches for the mt7530 DSA driver from pending to
    accepted.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  45 +++++++
 ...530-detect-PHY-muxing-when-PHY-is-defined.patch |  45 +++++++
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  45 +++++++
 ...530-detect-PHY-muxing-when-PHY-is-defined.patch |  45 +++++++
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  79 ------------
 ...ng-when-PHY-is-defined-on-switch-MDIO-bus.patch | 136 ---------------------
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  79 ------------
 ...ng-when-PHY-is-defined-on-switch-MDIO-bus.patch | 136 ---------------------
 8 files changed, 180 insertions(+), 430 deletions(-)

diff --git a/target/linux/generic/backport-6.1/790-69-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/backport-6.1/790-69-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
new file mode 100644
index 0000000000..29079e03c5
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-69-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
@@ -0,0 +1,45 @@
+From 16e6592cd5c5bd74d8890973489f60176c692614 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sun, 28 Apr 2024 12:19:58 +0300
+Subject: [PATCH] net: dsa: mt7530: do not set MT7530_P5_DIS when PHY muxing is
+ being used
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+DSA initalises the ds->num_ports amount of ports in
+dsa_switch_touch_ports(). When the PHY muxing feature is in use, port 5
+won't be defined in the device tree. Because of this, the type member of
+the dsa_port structure for this port will be assigned DSA_PORT_TYPE_UNUSED.
+The dsa_port_setup() function calls ds->ops->port_disable() when the port
+type is DSA_PORT_TYPE_UNUSED.
+
+The MT7530_P5_DIS bit is unset in mt7530_setup() when PHY muxing is being
+used. mt7530_port_disable() which is assigned to ds->ops->port_disable() is
+called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
+which breaks network connectivity when PHY muxing is being used.
+
+Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
+
+Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
+Reported-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240428-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v2-1-bb7c37d293f8 at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1227,7 +1227,8 @@ mt7530_port_disable(struct dsa_switch *d
+ 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
+ 		return;
+ 
+-	if (port == 5)
++	/* Do not set MT7530_P5_DIS when port 5 is being used for PHY muxing. */
++	if (port == 5 && priv->p5_mode == GMAC5)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 	else if (port == 6)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
diff --git a/target/linux/generic/backport-6.1/790-70-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch b/target/linux/generic/backport-6.1/790-70-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch
new file mode 100644
index 0000000000..69bbb8e229
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-70-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch
@@ -0,0 +1,45 @@
+From d8dcf5bd6d0eace9f7c1daa14b63b3925b09d033 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 30 Apr 2024 08:01:33 +0300
+Subject: [PATCH] net: dsa: mt7530: detect PHY muxing when PHY is defined on
+ switch MDIO bus
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
+direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
+bus the switch listens on. The PHY muxing feature makes use of this.
+
+This is problematic as the PHY may be attached before the switch is
+initialised, in which case, the PHY will fail to be attached.
+
+Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
+of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
+the switch on the device tree. Extend the check to detect PHY muxing when
+the PHY is defined on the MDIO bus of the switch on the device tree.
+
+When the PHY is described this way, the switch will be initialised first,
+then the switch MDIO bus will be registered. Only after these steps, the
+PHY will be attached.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Link: https://lore.kernel.org/r/20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2489,7 +2489,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			if (!phy_node)
+ 				continue;
+ 
+-			if (phy_node->parent == priv->dev->of_node->parent) {
++			if (phy_node->parent == priv->dev->of_node->parent ||
++			    phy_node->parent->parent == priv->dev->of_node) {
+ 				ret = of_get_phy_mode(mac_np, &interface);
+ 				if (ret && ret != -ENODEV) {
+ 					of_node_put(mac_np);
diff --git a/target/linux/generic/backport-6.6/790-53-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/backport-6.6/790-53-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
new file mode 100644
index 0000000000..cee3d01728
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-53-v6.10-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
@@ -0,0 +1,45 @@
+From 16e6592cd5c5bd74d8890973489f60176c692614 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sun, 28 Apr 2024 12:19:58 +0300
+Subject: [PATCH] net: dsa: mt7530: do not set MT7530_P5_DIS when PHY muxing is
+ being used
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+DSA initalises the ds->num_ports amount of ports in
+dsa_switch_touch_ports(). When the PHY muxing feature is in use, port 5
+won't be defined in the device tree. Because of this, the type member of
+the dsa_port structure for this port will be assigned DSA_PORT_TYPE_UNUSED.
+The dsa_port_setup() function calls ds->ops->port_disable() when the port
+type is DSA_PORT_TYPE_UNUSED.
+
+The MT7530_P5_DIS bit is unset in mt7530_setup() when PHY muxing is being
+used. mt7530_port_disable() which is assigned to ds->ops->port_disable() is
+called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
+which breaks network connectivity when PHY muxing is being used.
+
+Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
+
+Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
+Reported-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240428-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v2-1-bb7c37d293f8 at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1220,7 +1220,8 @@ mt7530_port_disable(struct dsa_switch *d
+ 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
+ 		return;
+ 
+-	if (port == 5)
++	/* Do not set MT7530_P5_DIS when port 5 is being used for PHY muxing. */
++	if (port == 5 && priv->p5_mode == GMAC5)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 	else if (port == 6)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
diff --git a/target/linux/generic/backport-6.6/790-54-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch b/target/linux/generic/backport-6.6/790-54-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch
new file mode 100644
index 0000000000..d369c4e05e
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-54-v6.10-796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined.patch
@@ -0,0 +1,45 @@
+From d8dcf5bd6d0eace9f7c1daa14b63b3925b09d033 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 30 Apr 2024 08:01:33 +0300
+Subject: [PATCH] net: dsa: mt7530: detect PHY muxing when PHY is defined on
+ switch MDIO bus
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
+direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
+bus the switch listens on. The PHY muxing feature makes use of this.
+
+This is problematic as the PHY may be attached before the switch is
+initialised, in which case, the PHY will fail to be attached.
+
+Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
+of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
+the switch on the device tree. Extend the check to detect PHY muxing when
+the PHY is defined on the MDIO bus of the switch on the device tree.
+
+When the PHY is described this way, the switch will be initialised first,
+then the switch MDIO bus will be registered. Only after these steps, the
+PHY will be attached.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Link: https://lore.kernel.org/r/20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2484,7 +2484,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			if (!phy_node)
+ 				continue;
+ 
+-			if (phy_node->parent == priv->dev->of_node->parent) {
++			if (phy_node->parent == priv->dev->of_node->parent ||
++			    phy_node->parent->parent == priv->dev->of_node) {
+ 				ret = of_get_phy_mode(mac_np, &interface);
+ 				if (ret && ret != -ENODEV) {
+ 					of_node_put(mac_np);
diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
deleted file mode 100644
index 04d8c8760f..0000000000
--- a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From patchwork Sat Apr 27 11:24:42 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-X-Patchwork-Id: 13645655
-From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-Date: Sat, 27 Apr 2024 14:24:42 +0300
-Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
- PHY muxing is being used
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-Message-Id: 
- <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707 at arinc9.com>
-To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
- Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
- Florian Fainelli <f.fainelli at gmail.com>,
- Vladimir Oltean <olteanv at gmail.com>,
- "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
- Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
- Matthias Brugger <matthias.bgg at gmail.com>,
- AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Cc: netdev at vger.kernel.org, linux-kernel at vger.kernel.org,
-  linux-arm-kernel at lists.infradead.org, linux-mediatek at lists.infradead.org,
-	=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-X-Mailer: b4 0.13.0
-X-Patchwork-Delegate: kuba at kernel.org
-
-From: Ar?n? ?NAL <arinc.unal at arinc9.com>
-
-When the PHY muxing feature is in use, port 5 won't be defined in the
-device tree. Because of this, the type member of the dsa_port structure for
-this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
-function calls ds->ops->port_disable() when the port type is
-DSA_PORT_TYPE_UNUSED.
-
-The MT7530_P5_DIS bit is unset when PHY muxing is being used.
-mt7530_port_disable() which is assigned to ds->ops->port_disable() is
-called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
-which breaks network connectivity when PHY muxing is being used.
-
-Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
-
-Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
-Reported-by: Daniel Golle <daniel at makrotopia.org>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
-Hello.
-
-I've sent this to net-next as the patch it fixes is on the current
-development cycle.
----
- drivers/net/dsa/mt7530.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-
----
-base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
-change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
-
-Best regards,
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -1227,7 +1227,7 @@ mt7530_port_disable(struct dsa_switch *d
- 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
- 		return;
- 
--	if (port == 5)
-+	if (port == 5 && priv->p5_mode == GMAC5)
- 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
- 	else if (port == 6)
- 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
deleted file mode 100644
index 5db834e23f..0000000000
--- a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From patchwork Tue Apr 30 05:01:33 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-X-Patchwork-Id: 13648264
-X-Patchwork-Delegate: kuba at kernel.org
-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
- [10.30.226.201])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
-	(No client certificate requested)
-	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
- arc=none smtp.client-ip=10.30.226.201
-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
-	t=1714453299; cv=none;
- b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
-	s=arc-20240116; t=1714453299; c=relaxed/simple;
-	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
-	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
- b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
- dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
- header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
-Authentication-Results: smtp.subspace.kernel.org;
-	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
- header.b="LTwGL2cB"
-Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
-	s=k20201202; t=1714453299;
-	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
-	h=From:Date:Subject:To:Cc:Reply-To:From;
-	b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
-	 FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
-	 jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
-	 yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
-	 QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
-	 aa8XczXBSlBVw==
-Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
- (localhost.localdomain [127.0.0.1])
-	by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-Date: Tue, 30 Apr 2024 08:01:33 +0300
-Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
- is defined on switch MDIO bus
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-Message-Id: 
- <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com>
-X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
- e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
- O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
- ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
-To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
- Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
- Florian Fainelli <f.fainelli at gmail.com>,
- Vladimir Oltean <olteanv at gmail.com>,
- "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
- Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
- Matthias Brugger <matthias.bgg at gmail.com>,
- AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Cc: Bartel Eerdekens <bartel.eerdekens at constell8.be>,
-  mithat.guner at xeront.com, erkin.bozoglu at xeront.com, netdev at vger.kernel.org,
-  linux-kernel at vger.kernel.org, linux-arm-kernel at lists.infradead.org,
-  linux-mediatek at lists.infradead.org,
- =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-X-Mailer: b4 0.13.0
-X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
- i=arinc.unal at arinc9.com; s=arinc9-PC; h=from:subject:message-id;
- bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
- b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
- lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
-X-Developer-Key: i=arinc.unal at arinc9.com; a=ed25519;
- pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
-X-Endpoint-Received: by B4 Relay for arinc.unal at arinc9.com/arinc9-PC with
- auth_id=158
-X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-Reply-To: arinc.unal at arinc9.com
-X-Patchwork-Delegate: kuba at kernel.org
-
-From: Ar?n? ?NAL <arinc.unal at arinc9.com>
-
-Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
-direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
-bus the switch listens on. The PHY muxing feature makes use of this.
-
-This is problematic as the PHY may be attached before the switch is
-initialised, in which case, the PHY will fail to be attached.
-
-Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
-of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
-the switch on the device tree. Extend the check to detect PHY muxing when
-the PHY is defined on the MDIO bus of the switch on the device tree.
-
-When the PHY is described this way, the switch will be initialised first,
-then the switch MDIO bus will be registered. Only after these steps, the
-PHY will be attached.
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
-Changes in v2:
-- Address the terminology on the patch log.
-- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155 at arinc9.com
----
- drivers/net/dsa/mt7530.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-
----
-base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
-change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
-
-Best regards,
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2488,7 +2488,8 @@ mt7530_setup(struct dsa_switch *ds)
- 			if (!phy_node)
- 				continue;
- 
--			if (phy_node->parent == priv->dev->of_node->parent) {
-+			if (phy_node->parent == priv->dev->of_node->parent ||
-+			    phy_node->parent->parent == priv->dev->of_node) {
- 				ret = of_get_phy_mode(mac_np, &interface);
- 				if (ret && ret != -ENODEV) {
- 					of_node_put(mac_np);
diff --git a/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
deleted file mode 100644
index 286c96e43b..0000000000
--- a/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From patchwork Sat Apr 27 11:24:42 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-X-Patchwork-Id: 13645655
-From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-Date: Sat, 27 Apr 2024 14:24:42 +0300
-Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
- PHY muxing is being used
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-Message-Id: 
- <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707 at arinc9.com>
-To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
- Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
- Florian Fainelli <f.fainelli at gmail.com>,
- Vladimir Oltean <olteanv at gmail.com>,
- "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
- Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
- Matthias Brugger <matthias.bgg at gmail.com>,
- AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Cc: netdev at vger.kernel.org, linux-kernel at vger.kernel.org,
-  linux-arm-kernel at lists.infradead.org, linux-mediatek at lists.infradead.org,
-	=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-X-Mailer: b4 0.13.0
-X-Patchwork-Delegate: kuba at kernel.org
-
-From: Ar?n? ?NAL <arinc.unal at arinc9.com>
-
-When the PHY muxing feature is in use, port 5 won't be defined in the
-device tree. Because of this, the type member of the dsa_port structure for
-this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
-function calls ds->ops->port_disable() when the port type is
-DSA_PORT_TYPE_UNUSED.
-
-The MT7530_P5_DIS bit is unset when PHY muxing is being used.
-mt7530_port_disable() which is assigned to ds->ops->port_disable() is
-called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
-which breaks network connectivity when PHY muxing is being used.
-
-Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
-
-Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
-Reported-by: Daniel Golle <daniel at makrotopia.org>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
-Hello.
-
-I've sent this to net-next as the patch it fixes is on the current
-development cycle.
----
- drivers/net/dsa/mt7530.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-
----
-base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
-change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
-
-Best regards,
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -1220,7 +1220,7 @@ mt7530_port_disable(struct dsa_switch *d
- 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
- 		return;
- 
--	if (port == 5)
-+	if (port == 5 && priv->p5_mode == GMAC5)
- 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
- 	else if (port == 6)
- 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
deleted file mode 100644
index f181be933a..0000000000
--- a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-detect-PHY-muxing-when-PHY-is-defined-on-switch-MDIO-bus.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From patchwork Tue Apr 30 05:01:33 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-X-Patchwork-Id: 13648264
-X-Patchwork-Delegate: kuba at kernel.org
-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org
- [10.30.226.201])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
-	(No client certificate requested)
-	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C9C114A89;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
- arc=none smtp.client-ip=10.30.226.201
-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
-	t=1714453299; cv=none;
- b=gV4Z0elIASLrrICjPPmDeR0kBaXtdjeqbz/cnj3/0V74cRGmjd5sMQ4PtMYq5iPdJkWbhn4mzf/WX9xcqituDcVV7Vj68zrsE5d6NavvrMK9kf7Ef3Yyr8gEbekALfL9fKuF6ul7TeVFQiFoGQyAJNFzB9YAiQGJlWzw98bldMQ=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
-	s=arc-20240116; t=1714453299; c=relaxed/simple;
-	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
-	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
- b=QRWD6k4Qg1t5nZj6oj2xdwWDCGHQWHG2xj0lkYcEMm3dMkvPpLbCIOptpZBJtSq06TMxRjVJhgVJ9ATDTIYGKwCHJTx3JTxspI+YkxLsXsfnz9jNxMyQ/+CO3xzRjTuKg0mGP3fl1Q1xznm/8cenWMDUOrv/p1Wlg1XZ8s01edY=
-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
- dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
- header.b=LTwGL2cB; arc=none smtp.client-ip=10.30.226.201
-Authentication-Results: smtp.subspace.kernel.org;
-	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org
- header.b="LTwGL2cB"
-Received: by smtp.kernel.org (Postfix) with ESMTPS id 1A3AEC2BBFC;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
-	s=k20201202; t=1714453299;
-	bh=GGkybB3RbZ4yacytPZCe3ceKcaWca6ygWTw/PJtmpsk=;
-	h=From:Date:Subject:To:Cc:Reply-To:From;
-	b=LTwGL2cBtvmG8vpW/5yPEkA2A4EWbBIHkpxGRp6NhmQcwKx6T+Q4Gt/MKTUdGZ6pp
-	 FHxkNOtF/KeqTZc814r9H7gtR+6rzRBCcQfWYl2TIdj+1edX/UrwUARQa8CQYwWK3V
-	 jqfD9pCOCm+hptOHs6o0+j5FaW5TtN6QJTG/1GpftEfJkQYpsp/jEL28MY35u99DBK
-	 yZErlS77MlNQEMScOR7McNtMj0pYnTvgrZLefdORzeWQhX6REODGKFL2xoSWjtg9jw
-	 QeQUp07wKwtuwHpKI07IBsFwIsclZYD3/oXrjBSSZmvwHCCvAYT+PXRiH0moLzHERn
-	 aa8XczXBSlBVw==
-Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org
- (localhost.localdomain [127.0.0.1])
-	by smtp.lore.kernel.org (Postfix) with ESMTP id 04CA2C25B10;
-	Tue, 30 Apr 2024 05:01:39 +0000 (UTC)
-From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
- <devnull+arinc.unal.arinc9.com at kernel.org>
-Date: Tue, 30 Apr 2024 08:01:33 +0300
-Subject: [PATCH net-next v2] net: dsa: mt7530: detect PHY muxing when PHY
- is defined on switch MDIO bus
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-Message-Id: 
- <20240430-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v2-1-9104d886d0db at arinc9.com>
-X-B4-Tracking: v=1; b=H4sIACx7MGYC/6WOSw6DMBBDr1LNulNBIHy66j0qFhAGmAUJSgIFI
- e7eNFeovLJsPfsER5bJwfN2gqWNHRsdjLjfQE2tHgm5Dx5EIvIkFzV2OQ7Goiavafc4+1JmCa6
- O0H3Yqwnnng12q4u1ZTpwXnfWI8qqEEWdlamSEgJ+sTTwHqffEHD440ETkomdN/aIn7Y05v/Pb
- ykGDWUp6yqjVMpXa1mr+qHMDM11XV8dryM7CwEAAA==
-To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
- Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
- Florian Fainelli <f.fainelli at gmail.com>,
- Vladimir Oltean <olteanv at gmail.com>,
- "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
- Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
- Matthias Brugger <matthias.bgg at gmail.com>,
- AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Cc: Bartel Eerdekens <bartel.eerdekens at constell8.be>,
-  mithat.guner at xeront.com, erkin.bozoglu at xeront.com, netdev at vger.kernel.org,
-  linux-kernel at vger.kernel.org, linux-arm-kernel at lists.infradead.org,
-  linux-mediatek at lists.infradead.org,
- =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-X-Mailer: b4 0.13.0
-X-Developer-Signature: v=1; a=ed25519-sha256; t=1714453297; l=1949;
- i=arinc.unal at arinc9.com; s=arinc9-PC; h=from:subject:message-id;
- bh=c3IRARdnxa6x5otHszH4xrnla2RxJAal1114ej/d2wE=;
- b=FL4WEHh4zYu1gBE7wbaN+X2OMCOIMJVsYBkXurHM0IC3CnI6XfpKE1V5QLUSXby75WZfvQ0se
- lrMQos/eOAaCNbkyxUkmwb3opbC915iywMECA0lv/g0IAo6snRYzMae
-X-Developer-Key: i=arinc.unal at arinc9.com; a=ed25519;
- pk=Bd1s2kQtNfZAWyeLHg39jaWBDqt8Ud1WJXLFh7gxl20=
-X-Endpoint-Received: by B4 Relay for arinc.unal at arinc9.com/arinc9-PC with
- auth_id=158
-X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
-Reply-To: arinc.unal at arinc9.com
-X-Patchwork-Delegate: kuba at kernel.org
-
-From: Ar?n? ?NAL <arinc.unal at arinc9.com>
-
-Currently, the MT7530 DSA subdriver configures the MT7530 switch to provide
-direct access to switch PHYs, meaning, the switch PHYs listen on the MDIO
-bus the switch listens on. The PHY muxing feature makes use of this.
-
-This is problematic as the PHY may be attached before the switch is
-initialised, in which case, the PHY will fail to be attached.
-
-Since commit 91374ba537bd ("net: dsa: mt7530: support OF-based registration
-of switch MDIO bus"), we can describe the switch PHYs on the MDIO bus of
-the switch on the device tree. Extend the check to detect PHY muxing when
-the PHY is defined on the MDIO bus of the switch on the device tree.
-
-When the PHY is described this way, the switch will be initialised first,
-then the switch MDIO bus will be registered. Only after these steps, the
-PHY will be attached.
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
-Changes in v2:
-- Address the terminology on the patch log.
-- Link to v1: https://lore.kernel.org/r/20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-v1-1-1f775983e155 at arinc9.com
----
- drivers/net/dsa/mt7530.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-
----
-base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
-change-id: 20240429-b4-for-netnext-mt7530-use-switch-mdio-bus-for-phy-muxing-586269371c55
-
-Best regards,
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2483,7 +2483,8 @@ mt7530_setup(struct dsa_switch *ds)
- 			if (!phy_node)
- 				continue;
- 
--			if (phy_node->parent == priv->dev->of_node->parent) {
-+			if (phy_node->parent == priv->dev->of_node->parent ||
-+			    phy_node->parent->parent == priv->dev->of_node) {
- 				ret = of_get_phy_mode(mac_np, &interface);
- 				if (ret && ret != -ENODEV) {
- 					of_node_put(mac_np);



From lede-commits at lists.infradead.org  Tue May  7 04:36:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 07:36:35 -0400
Subject: [openwrt/openwrt]  ipq806x: swap lan leds for Meraki MR52
In-Reply-To: <171508179551.1413181.4994436699536572192@git-01.infra.openwrt.org>
References: <171508179551.1413181.4994436699536572192@git-01.infra.openwrt.org>
Message-ID: <mailman.34241.1715081799.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bd6852185b7c7362fc5485afa961c686d9cd74b4

commit bd6852185b7c7362fc5485afa961c686d9cd74b4
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue May 7 08:46:07 2024 +0200

    ipq806x: swap lan leds for Meraki MR52
    
    LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually
    reflect real ports (lan1<->lan2).
    
    Fixes: #15388
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    Link: https://github.com/openwrt/openwrt/pull/15410
    [ wrap commit to 80 columns and improve commit title ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts         | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts
index 7512bfb74f..0d3230e6de 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts
@@ -46,13 +46,13 @@
 			gpios = <&qcom_pinmux 19 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan2_green {
-			label = "green:lan2";
+		lan1_green {
+			label = "green:lan1";
 			gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan1_green {
-			label = "green:lan1";
+		lan2_green {
+			label = "green:lan2";
 			gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
 		};
 
@@ -61,13 +61,13 @@
 			gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
 		};
 
-		lan2_orange {
-			label = "orange:lan2";
+		lan1_orange {
+			label = "orange:lan1";
 			gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan1_orange {
-			label = "orange:lan1";
+		lan2_orange {
+			label = "orange:lan2";
 			gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
 		};
 	};



From lede-commits at lists.infradead.org  Tue May  7 04:38:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 07:38:44 -0400
Subject: [openwrt/openwrt]  ipq806x: swap lan leds for Meraki MR52
In-Reply-To: <171508192498.1417239.555229388143799544@git-01.infra.openwrt.org>
References: <171508192498.1417239.555229388143799544@git-01.infra.openwrt.org>
Message-ID: <mailman.34242.1715081929.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ec8f647d168fa8f3b1eedd9b5fe665f793f3a659

commit ec8f647d168fa8f3b1eedd9b5fe665f793f3a659
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue May 7 08:46:07 2024 +0200

    ipq806x: swap lan leds for Meraki MR52
    
    LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually
    reflect real ports (lan1<->lan2).
    
    Fixes: #15388
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    Link: https://github.com/openwrt/openwrt/pull/15410
    [ wrap commit to 80 columns and improve commit title ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit bd6852185b7c7362fc5485afa961c686d9cd74b4)
---
 .../files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
index f81e3ef690..b49ea499d6 100644
--- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
+++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
@@ -44,13 +44,13 @@
 			gpios = <&qcom_pinmux 19 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan2_green {
-			label = "green:lan2";
+		lan1_green {
+			label = "green:lan1";
 			gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan1_green {
-			label = "green:lan1";
+		lan2_green {
+			label = "green:lan2";
 			gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
 		};
 
@@ -59,13 +59,13 @@
 			gpios = <&qcom_pinmux 26 GPIO_ACTIVE_LOW>;
 		};
 
-		lan2_orange {
-			label = "orange:lan2";
+		lan1_orange {
+			label = "orange:lan1";
 			gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
 		};
 
-		lan1_orange {
-			label = "orange:lan1";
+		lan2_orange {
+			label = "orange:lan2";
 			gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
 		};
 	};



From lede-commits at lists.infradead.org  Tue May  7 05:02:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:31 -0400
Subject: [openwrt/openwrt]  armsr: armv8: add new fsl-enetc-core module for
 kernel 6.6
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34249.1715083353.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c8927d7c01179cfbc9a6f7c51af2a5966eeaf780

commit c8927d7c01179cfbc9a6f7c51af2a5966eeaf780
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Wed Mar 13 12:26:12 2024 +1100

    armsr: armv8: add new fsl-enetc-core module for kernel 6.6
    
    From kernel 6.3 onwards, the fsl-enetc driver has restructured
    it's common code into a 'core' module[1].
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
    
    [1] https://patchwork.kernel.org/project/netdevbpf/patch/20230119160431.295833-2-vladimir.oltean at nxp.com/
---
 target/linux/armsr/modules.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/armsr/modules.mk b/target/linux/armsr/modules.mk
index 7dd3739ffa..d5a5d5c407 100644
--- a/target/linux/armsr/modules.mk
+++ b/target/linux/armsr/modules.mk
@@ -92,6 +92,7 @@ define KernelPackage/fsl-enetc-net
     CONFIG_FSL_ENETC_QOS=y
   FILES:= \
     $(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc.ko \
+    $(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-core.ko at ge6.3 \
     $(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-vf.ko \
     $(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-mdio.ko \
     $(LINUX_DIR)/drivers/net/ethernet/freescale/enetc/fsl-enetc-ierb.ko



From lede-commits at lists.infradead.org  Tue May  7 05:02:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:30 -0400
Subject: [openwrt/openwrt]  armsr: add kernel 6.6 as a testing target
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34250.1715083353.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5744205eb623d4a38decb4e6973cec0ec84e02d3

commit 5744205eb623d4a38decb4e6973cec0ec84e02d3
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Wed Mar 13 12:34:03 2024 +1100

    armsr: add kernel 6.6 as a testing target
    
    Add kernel 6.6 for testing.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 target/linux/armsr/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/armsr/Makefile b/target/linux/armsr/Makefile
index 7de77decb5..c2e57e52da 100644
--- a/target/linux/armsr/Makefile
+++ b/target/linux/armsr/Makefile
@@ -10,6 +10,7 @@ FEATURES:=fpu pci pcie rtc usb boot-part rootfs-part
 FEATURES+=cpiogz ext4 ramdisk squashfs targz vmdk
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Tue May  7 05:02:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:33 -0400
Subject: [openwrt/openwrt]  base-files: armsr: add script to migrate GPIO
 switches on Ten64 board
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34251.1715083355.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ffbc4c897fe643845bdf9746be7335938db374e4

commit ffbc4c897fe643845bdf9746be7335938db374e4
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Mon Apr 1 14:44:47 2024 +1100

    base-files: armsr: add script to migrate GPIO switches on Ten64 board
    
    Due to a change in kernel 6.2, the GPIO numbers on certain
    architectures (including arm64) have changed. This script
    will update any defined GPIO switches to the new numbering.
    
    See https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042448.html
    for more information.
    
    In the future, the GPIO switch mechanism will likely be
    replaced with something using libgpiod.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 .../etc/uci-defaults/05-migrate-ten64-gpio         | 37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/target/linux/armsr/base-files/etc/uci-defaults/05-migrate-ten64-gpio b/target/linux/armsr/base-files/etc/uci-defaults/05-migrate-ten64-gpio
new file mode 100644
index 0000000000..dc8648e570
--- /dev/null
+++ b/target/linux/armsr/base-files/etc/uci-defaults/05-migrate-ten64-gpio
@@ -0,0 +1,37 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# This script migrates GPIO switch pin numbers
+# from kernel versions prior to 6.6
+# See https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042448.html
+
+. /lib/functions.sh
+
+ten64_update_gpioswitch_num() {
+	local section="$1"
+	config_get gpio_pin  "${section}" gpio_pin
+	config_get gpio_name "${section}" name
+	if [ -z "${gpio_pin}" ]; then
+		return
+	fi
+	local this_pin_name=$(uci get "system.${section}.name")
+	if [ "${gpio_pin}" -lt 640 ]; then
+		new_pin_value=$(( $gpio_pin + 272 ))
+		uci set "system.${section}.gpio_pin=${new_pin_value}"
+	fi
+}
+
+board=$(board_name)
+if [ "${board}" != "traverse,ten64" ]; then
+	exit 0
+fi
+
+KERNEL_MINOR=$(uname -r | awk -F '.' '{print $2}')
+if [ "${KERNEL_MINOR}" -lt "6" ]; then
+	exit 0
+fi
+
+config_load system
+config_foreach ten64_update_gpioswitch_num gpio_switch
+
+exit 0
\ No newline at end of file



From lede-commits at lists.infradead.org  Tue May  7 05:02:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:32 -0400
Subject: [openwrt/openwrt]  base-files: armsr: number Ten64 GPIOs according to
 kernel version
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34252.1715083355.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5f609d8960f0ad4f5bd59a69facaeb2739c6e625

commit 5f609d8960f0ad4f5bd59a69facaeb2739c6e625
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Mon Mar 18 13:03:55 2024 +1100

    base-files: armsr: number Ten64 GPIOs according to kernel version
    
    A change in kernel 6.2[1] caused the base numbers of GPIOs to
    change significantly on some architectures like aarch64.
    
    We have to number our GPIOs accordingly.
    Ideally the board.d scripts should look through sysfs
    to find the basenum (like cat "/sys/devices/platform/soc/2000000.i2c/
    i2c-0/0-0076/gpio/gpiochip640/base"), but the problem is
    that this occurs before modules are loaded, meaning I2C and other
    runtime devices may be missing.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
    
    [1] https://lore.kernel.org/lkml/cover.1662116601.git.christophe.leroy at csgroup.eu/T/
---
 .../armsr/base-files/etc/board.d/03_gpio_switches    | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/target/linux/armsr/base-files/etc/board.d/03_gpio_switches b/target/linux/armsr/base-files/etc/board.d/03_gpio_switches
index cf07bc0f54..72f310277a 100644
--- a/target/linux/armsr/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/armsr/base-files/etc/board.d/03_gpio_switches
@@ -3,18 +3,26 @@
 
 . /lib/functions/uci-defaults.sh
 
+KERNEL_MAJOR=$(uname -r | awk -F '.' '{print $1}')
+KERNEL_MINOR=$(uname -r | awk -F '.' '{print $2}')
+
 board_config_update
 
 board=$(board_name)
 
 case "$board" in
 traverse,ten64)
-	ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "376"
-	ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "377"
-	ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "378"
-	ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "379"
-	ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "369"
-	ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "373"
+	if [ "${KERNEL_MAJOR}" -ge "6" ] && [ "${KERNEL_MINOR}" -ge "6" ]; then
+		I2C_GPIO_BASE=640
+	else
+		I2C_GPIO_BASE=368
+	fi
+	ucidef_add_gpio_switch "lte_reset" "Cell Modem Reset" "$(($I2C_GPIO_BASE + 8))"
+	ucidef_add_gpio_switch "lte_power" "Cell Modem Power" "$(($I2C_GPIO_BASE + 9))"
+	ucidef_add_gpio_switch "lte_disable" "Cell Modem Airplane mode" "$((I2C_GPIO_BASE + 10))"
+	ucidef_add_gpio_switch "gnss_disable" "Cell Modem Disable GNSS receiver" "$(($I2C_GPIO_BASE + 11))"
+	ucidef_add_gpio_switch "lower_sfp_txidsable" "Lower SFP+ TX Disable" "$(($I2C_GPIO_BASE + 1))"
+	ucidef_add_gpio_switch "upper_sfp_txdisable" "Upper SFP+ TX Disable" "$(($I2C_GPIO_BASE + 5))"
 	;;
 esac
 



From lede-commits at lists.infradead.org  Tue May  7 05:02:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:29 -0400
Subject: [openwrt/openwrt]  kernel/armsr: add config stubs and changes needed
 for 6.6
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34253.1715083355.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fb29f702af87715cd94a3e708b0ec1b493106b29

commit fb29f702af87715cd94a3e708b0ec1b493106b29
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Mon Mar 18 10:51:21 2024 +1100

    kernel/armsr: add config stubs and changes needed for 6.6
    
    Introduce new configuration options prompted by 6.6 (relative to 6.1).
    The kernel arm64 defconfig is used as guide for 'core' options, while
    video/camera/other media drivers are turned off by default.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 target/linux/armsr/armv7/config-6.6 | 11 +++++---
 target/linux/armsr/armv8/config-6.6 | 53 ++++++++++++++++++++++++++++++++++---
 target/linux/armsr/config-6.6       |  4 ++-
 3 files changed, 61 insertions(+), 7 deletions(-)

diff --git a/target/linux/armsr/armv7/config-6.6 b/target/linux/armsr/armv7/config-6.6
index 664ef2e05b..18f5cd7c79 100644
--- a/target/linux/armsr/armv7/config-6.6
+++ b/target/linux/armsr/armv7/config-6.6
@@ -1,10 +1,12 @@
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MMAP_RND_BITS=8
 CONFIG_ARCH_MULTIPLATFORM=y
+# CONFIG_ARCH_MULTI_V4 is not set
+# CONFIG_ARCH_MULTI_V4T is not set
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_MMAP_RND_BITS=8
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
@@ -36,6 +38,7 @@ CONFIG_CPU_CACHE_VIPT=y
 CONFIG_CPU_COPY_V6=y
 CONFIG_CPU_CP15=y
 CONFIG_CPU_CP15_MMU=y
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
 CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_SPECTRE=y
@@ -62,6 +65,7 @@ CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PHYS_OFFSET=0
 CONFIG_RTC_MC146818_LIB=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SMP_ON_UP=y
@@ -69,10 +73,11 @@ CONFIG_SWP_EMULATE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNWINDER_ARM=y
+# CONFIG_UNWINDER_FRAME_POINTER is not set
 CONFIG_USE_OF=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZBOOT_ROM_BSS=0
-CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
diff --git a/target/linux/armsr/armv8/config-6.6 b/target/linux/armsr/armv8/config-6.6
index 0ead973064..7b50fced91 100644
--- a/target/linux/armsr/armv8/config-6.6
+++ b/target/linux/armsr/armv8/config-6.6
@@ -1,5 +1,7 @@
 CONFIG_64BIT=y
 CONFIG_ACPI_APEI=y
+# CONFIG_ACPI_FFH is not set
+# CONFIG_ACPI_FPDT is not set
 CONFIG_ACPI_HMAT=y
 CONFIG_ACPI_PCC=y
 CONFIG_AHCI_IMX=y
@@ -136,6 +138,7 @@ CONFIG_BCM2835_POWER=y
 # CONFIG_BCM2835_THERMAL is not set
 # CONFIG_BCM2835_VCHIQ is not set
 CONFIG_BCM2835_WDT=y
+# CONFIG_BCMASP is not set
 # CONFIG_BCMGENET is not set
 # CONFIG_BCM_CYGNUS_PHY is not set
 # CONFIG_BCM_FLEXRM_MBOX is not set
@@ -179,6 +182,7 @@ CONFIG_CLK_RK3328=y
 CONFIG_CLK_RK3368=y
 CONFIG_CLK_RK3399=y
 CONFIG_CLK_RK3568=y
+CONFIG_CLK_RK3588=y
 CONFIG_CLK_SP810=y
 CONFIG_CLK_SUNXI=y
 CONFIG_CLK_SUNXI_CLOCKS=y
@@ -248,11 +252,14 @@ CONFIG_CRYPTO_SHA2_ARM64_CE=y
 CONFIG_CRYPTO_SHA512_ARM64=y
 CONFIG_CRYPTO_SIMD=y
 # CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
+# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set
+# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set
 # CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
 # CONFIG_DEV_DAX_HMEM is not set
 CONFIG_DMA_BCM2835=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_DIRECT_REMAP=y
+# CONFIG_DMA_NUMA_CMA is not set
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DMA_SUN6I=y
 CONFIG_DRM=y
@@ -266,17 +273,29 @@ CONFIG_DRM_GEM_SHMEM_HELPER=y
 # CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set
 # CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set
 # CONFIG_DRM_IMX_DCSS is not set
+# CONFIG_DRM_IMX_LCDC is not set
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_PANEL=y
 CONFIG_DRM_PANEL_BRIDGE=y
+# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
+# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
+# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
+# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
+# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
+# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
+# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
 CONFIG_DRM_QXL=y
 # CONFIG_DRM_RCAR_DU is not set
 # CONFIG_DRM_ROCKCHIP is not set
+# CONFIG_DRM_RZG2L_MIPI_DSI is not set
+# CONFIG_DRM_SHMOBILE is not set
 CONFIG_DRM_TTM=y
 CONFIG_DRM_TTM_HELPER=y
 # CONFIG_DRM_V3D is not set
 CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VIRTIO_GPU_KMS=y
 CONFIG_DRM_VRAM_HELPER=y
 # CONFIG_DWMAC_SUN8I is not set
 # CONFIG_DWMAC_SUNXI is not set
@@ -335,6 +354,7 @@ CONFIG_HOTPLUG_PCI_ACPI=y
 CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y
 # CONFIG_HW_RANDOM_HISI is not set
+# CONFIG_HW_RANDOM_HISTB is not set
 CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
@@ -354,6 +374,7 @@ CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
 # CONFIG_IMX2_WDT is not set
 # CONFIG_IMX8MM_THERMAL is not set
 # CONFIG_IMX8QXP_ADC is not set
+# CONFIG_IMX93_ADC is not set
 # CONFIG_IMX_DMA is not set
 # CONFIG_IMX_DSP is not set
 CONFIG_IMX_INTMUX=y
@@ -366,6 +387,7 @@ CONFIG_IMX_SCU_PD=y
 # CONFIG_IMX_SC_WDT is not set
 # CONFIG_IMX_SDMA is not set
 # CONFIG_IMX_WEIM is not set
+# CONFIG_INPUT_BBNSM_PWRKEY is not set
 # CONFIG_INPUT_HISI_POWERKEY is not set
 # CONFIG_INPUT_IBM_PANEL is not set
 # CONFIG_INTEL_STRATIX10_RSU is not set
@@ -376,6 +398,7 @@ CONFIG_INTERCONNECT_IMX8MM=y
 CONFIG_INTERCONNECT_IMX8MN=y
 CONFIG_INTERCONNECT_IMX8MP=y
 CONFIG_INTERCONNECT_IMX8MQ=y
+# CONFIG_IOMMUFD is not set
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
 CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
@@ -390,6 +413,7 @@ CONFIG_KCMP=y
 # CONFIG_KEYBOARD_IMX_SC_KEY is not set
 # CONFIG_KEYBOARD_SUN4I_LRADC is not set
 CONFIG_KSM=y
+# CONFIG_KUNPENG_HCCS is not set
 CONFIG_KVM=y
 CONFIG_LCD_CLASS_DEVICE=m
 # CONFIG_LCD_PLATFORM is not set
@@ -397,6 +421,7 @@ CONFIG_LCD_CLASS_DEVICE=m
 CONFIG_MARVELL_10G_PHY=y
 # CONFIG_MARVELL_CN10K_DDR_PMU is not set
 # CONFIG_MARVELL_CN10K_TAD_PMU is not set
+# CONFIG_MARVELL_GTI_WDT is not set
 CONFIG_MDIO_BCM_IPROC=y
 CONFIG_MDIO_BUS_MUX_BCM_IPROC=y
 CONFIG_MDIO_SUN4I=y
@@ -495,6 +520,7 @@ CONFIG_PCI_HISI=y
 CONFIG_PCI_HOST_THUNDER_ECAM=y
 CONFIG_PCI_HOST_THUNDER_PEM=y
 CONFIG_PCI_IMX6=y
+CONFIG_PCI_IMX6_HOST=y
 CONFIG_PCI_IOV=y
 CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_PASID=y
@@ -518,6 +544,7 @@ CONFIG_PHY_MVEBU_A38X_COMPHY=y
 CONFIG_PHY_MVEBU_CP110_COMPHY=y
 CONFIG_PHY_NS2_PCIE=y
 CONFIG_PHY_NS2_USB_DRD=y
+# CONFIG_PHY_R8A779F0_ETHERNET_SERDES is not set
 # CONFIG_PHY_RCAR_GEN2 is not set
 CONFIG_PHY_RCAR_GEN3_PCIE=y
 CONFIG_PHY_RCAR_GEN3_USB2=y
@@ -597,12 +624,11 @@ CONFIG_QCOM_QDF2400_ERRATUM_0065=y
 CONFIG_QORIQ_THERMAL=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RASPBERRYPI_FIRMWARE=y
-CONFIG_RASPBERRYPI_POWER=y
 CONFIG_RANDOMIZE_BASE=y
 CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
 CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RELOCATABLE=y
+CONFIG_RASPBERRYPI_FIRMWARE=y
+CONFIG_RASPBERRYPI_POWER=y
 # CONFIG_RAVB is not set
 CONFIG_RCAR_DMAC=y
 # CONFIG_RCAR_GEN3_THERMAL is not set
@@ -616,6 +642,8 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_HI655X=y
 CONFIG_REGULATOR_PFUZE100=y
 # CONFIG_REGULATOR_VEXPRESS is not set
+CONFIG_RELOCATABLE=y
+# CONFIG_RENESAS_ETHER_SWITCH is not set
 CONFIG_RENESAS_OSTM=y
 # CONFIG_RENESAS_RZAWDT is not set
 # CONFIG_RENESAS_RZG2LWDT is not set
@@ -633,6 +661,7 @@ CONFIG_ROCKCHIP_PM_DOMAINS=y
 # CONFIG_ROCKCHIP_SARADC is not set
 # CONFIG_ROCKCHIP_THERMAL is not set
 CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+# CONFIG_RTC_DRV_BBNSM is not set
 # CONFIG_RTC_DRV_BRCMSTB is not set
 # CONFIG_RTC_DRV_FSL_FTM_ALARM is not set
 # CONFIG_RTC_DRV_IMXDI is not set
@@ -645,6 +674,7 @@ CONFIG_RTC_I2C_AND_SPI=y
 # CONFIG_RZG2L_ADC is not set
 # CONFIG_RZG2L_THERMAL is not set
 CONFIG_RZ_DMAC=y
+CONFIG_RZ_MTU3=y
 CONFIG_SATA_SIL24=y
 # CONFIG_SCHED_CORE is not set
 CONFIG_SCHED_MC=y
@@ -693,6 +723,7 @@ CONFIG_SPI_FSL_LPSPI=y
 CONFIG_SPI_IMX=y
 # CONFIG_SPI_ROCKCHIP_SFC is not set
 # CONFIG_SPI_RSPI is not set
+# CONFIG_SPI_RZV2M_CSI is not set
 # CONFIG_SPI_SH_HSPI is not set
 # CONFIG_SPI_SH_MSIOF is not set
 # CONFIG_SPI_SUN4I is not set
@@ -700,8 +731,11 @@ CONFIG_SPI_IMX=y
 # CONFIG_SPI_SYNQUACER is not set
 CONFIG_SPI_THUNDERX=y
 # CONFIG_SPI_XLP is not set
+# CONFIG_SSIF_IPMI_BMC is not set
 CONFIG_STUB_CLK_HI3660=y
 CONFIG_STUB_CLK_HI6220=y
+# CONFIG_SUN20I_GPADC is not set
+# CONFIG_SUN20I_PPU is not set
 CONFIG_SUN50I_A100_CCU=y
 CONFIG_SUN50I_A100_R_CCU=y
 CONFIG_SUN50I_A64_CCU=y
@@ -734,6 +768,8 @@ CONFIG_TYPEC=y
 # CONFIG_TYPEC_FUSB302 is not set
 # CONFIG_TYPEC_HD3SS3220 is not set
 # CONFIG_TYPEC_MUX_FSA4480 is not set
+# CONFIG_TYPEC_MUX_GPIO_SBU is not set
+# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
 # CONFIG_TYPEC_MUX_PI3USB30532 is not set
 # CONFIG_TYPEC_RT1711H is not set
 # CONFIG_TYPEC_RT1719 is not set
@@ -746,6 +782,7 @@ CONFIG_TYPEC_TCPM=y
 # CONFIG_UACCE is not set
 CONFIG_UNMAP_KERNEL_AT_EL0=y
 # CONFIG_USB_BRCMSTB is not set
+# CONFIG_USB_CDNS2_UDC is not set
 CONFIG_USB_CHIPIDEA=y
 CONFIG_USB_CHIPIDEA_GENERIC=y
 CONFIG_USB_CHIPIDEA_HOST=y
@@ -776,15 +813,25 @@ CONFIG_USB_OHCI_HCD_PLATFORM=y
 CONFIG_USB_OTG=y
 CONFIG_USB_OTG_FSM=y
 CONFIG_USB_RENESAS_USB3=y
+CONFIG_USB_RENESAS_USBF=y
 CONFIG_USB_RENESAS_USBHS=y
 CONFIG_USB_RENESAS_USBHS_HCD=y
 CONFIG_USB_RENESAS_USBHS_UDC=y
+CONFIG_USB_RZV2M_USB3DRD=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_HISTB=y
 CONFIG_USB_XHCI_MVEBU=y
 CONFIG_USB_XHCI_PLATFORM=y
+# CONFIG_USB_XHCI_RCAR is not set
+CONFIG_USB_XHCI_RZV2M=y
 CONFIG_VEXPRESS_CONFIG=y
+# CONFIG_VFIO_AMBA is not set
 CONFIG_VIDEOMODE_HELPERS=y
+# CONFIG_VIDEO_IMX7_CSI is not set
+# CONFIG_VIDEO_IMX8MQ_MIPI_CSI2 is not set
+# CONFIG_VIDEO_IMX8_ISI is not set
+# CONFIG_VIDEO_RZG2L_CRU is not set
+# CONFIG_VIDEO_RZG2L_CSI2 is not set
 CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
 # CONFIG_VIRTIO_IOMMU is not set
 CONFIG_VIRTUALIZATION=y
diff --git a/target/linux/armsr/config-6.6 b/target/linux/armsr/config-6.6
index d1dac69da4..8b4f291c9f 100644
--- a/target/linux/armsr/config-6.6
+++ b/target/linux/armsr/config-6.6
@@ -171,6 +171,7 @@ CONFIG_GPIO_ACPI=y
 CONFIG_GPIO_CDEV=y
 # CONFIG_GPIO_HISI is not set
 CONFIG_GPIO_PL061=y
+# CONFIG_GPIO_VF610 is not set
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
@@ -178,6 +179,7 @@ CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HID=y
 CONFIG_HID_GENERIC=y
+CONFIG_HID_SUPPORT=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HOTPLUG_PCI_ACPI=y
 CONFIG_HVC_DRIVER=y
@@ -328,9 +330,9 @@ CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_PCI_LEGACY=y
 CONFIG_VIRTIO_PCI_LIB=y
 CONFIG_VMAP_STACK=y
-CONFIG_WATCHDOG_CORE=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_WATCHDOG_CORE=y
 CONFIG_XPS=y
 CONFIG_ZONE_DMA32=y



From lede-commits at lists.infradead.org  Tue May  7 05:02:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:34 -0400
Subject: [openwrt/openwrt]  armsr: armv8: enable serial console for Renesas
 platforms
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34256.1715083355.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/683355d0a6d51cbeda258492bc16a9c6413b387e

commit 683355d0a6d51cbeda258492bc16a9c6413b387e
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Tue Apr 30 12:34:37 2024 +1000

    armsr: armv8: enable serial console for Renesas platforms
    
    Support for Renesas Arm families was added in commit 1ff4f4df2301
    ("armsr: armv8: enable CONFIG_ARCH_RENESAS"), but this did not
    enable the console/tty hardware for these SoCs, which is derived
    from the SuperH family (CONFIG_SERIAL_SH_SCI).
    
    Link: https://github.com/openwrt/openwrt/issues/15284
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 target/linux/armsr/armv8/config-6.6 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/target/linux/armsr/armv8/config-6.6 b/target/linux/armsr/armv8/config-6.6
index 7b50fced91..aa5774a7b6 100644
--- a/target/linux/armsr/armv8/config-6.6
+++ b/target/linux/armsr/armv8/config-6.6
@@ -696,6 +696,11 @@ CONFIG_SERIAL_MVEBU_CONSOLE=y
 CONFIG_SERIAL_MVEBU_UART=y
 CONFIG_SERIAL_SAMSUNG=y
 CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+CONFIG_SERIAL_SH_SCI=y
+CONFIG_SERIAL_SH_SCI_CONSOLE=y
+CONFIG_SERIAL_SH_SCI_DMA=y
+CONFIG_SERIAL_SH_SCI_EARLYCON=y
+CONFIG_SERIAL_SH_SCI_NR_UARTS=18
 # CONFIG_SMC91X is not set
 # CONFIG_SND_SOC_RCAR is not set
 # CONFIG_SND_SOC_RZ is not set



From lede-commits at lists.infradead.org  Tue May  7 05:02:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:28 -0400
Subject: [openwrt/openwrt]  kernel/armsr: Restore kernel files for v6.1
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34257.1715083360.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/587b8b8e3211c8ecbd0281bc6742e3ef618e50f1

commit 587b8b8e3211c8ecbd0281bc6742e3ef618e50f1
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Mon Mar 18 10:48:13 2024 +1100

    kernel/armsr: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 target/linux/armsr/armv7/config-6.1                |  78 ++
 target/linux/armsr/armv8/config-6.1                | 800 +++++++++++++++++++++
 target/linux/armsr/config-6.1                      | 336 +++++++++
 .../221-armsr-disable_gc_sections_armv7.patch      |  23 +
 ...t-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch |  44 ++
 ...eplace-dpaa2_mac_is_type_fixed-with-dpaa2.patch |  99 +++
 ...ac-absorb-phylink_start-call-into-dpaa2_m.patch |  88 +++
 ...ac-remove-defensive-check-in-dpaa2_mac_di.patch |  50 ++
 ...th-assign-priv-mac-after-dpaa2_mac_connec.patch | 101 +++
 ...witch-assign-port_priv-mac-after-dpaa2_ma.patch |  73 ++
 ...ublish-MAC-stringset-to-ethtool-S-even-if.patch | 111 +++
 ...witch-replace-direct-MAC-access-with-dpaa.patch |  28 +
 ...th-connect-to-MAC-before-requesting-the-e.patch |  93 +++
 ...th-serialize-changes-to-priv-mac-with-a-m.patch | 320 +++++++++
 ...switch-serialize-changes-to-priv-mac-with.patch | 203 ++++++
 ...a2-mac-move-rtnl_lock-only-around-phylink.patch | 113 +++
 16 files changed, 2560 insertions(+)

diff --git a/target/linux/armsr/armv7/config-6.1 b/target/linux/armsr/armv7/config-6.1
new file mode 100644
index 0000000000..664ef2e05b
--- /dev/null
+++ b/target/linux/armsr/armv7/config-6.1
@@ -0,0 +1,78 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_MMAP_RND_BITS=8
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_VIRT=y
+CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_LPAE=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_PSCI=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_CACHE_L2X0=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMA_OPS=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HAVE_SMP=y
+CONFIG_HZ_FIXED=0
+CONFIG_HZ_PERIODIC=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_NEON=y
+CONFIG_NR_CPUS=4
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USE_OF=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
diff --git a/target/linux/armsr/armv8/config-6.1 b/target/linux/armsr/armv8/config-6.1
new file mode 100644
index 0000000000..0ead973064
--- /dev/null
+++ b/target/linux/armsr/armv8/config-6.1
@@ -0,0 +1,800 @@
+CONFIG_64BIT=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_HMAT=y
+CONFIG_ACPI_PCC=y
+CONFIG_AHCI_IMX=y
+CONFIG_AHCI_MVEBU=y
+CONFIG_AHCI_QORIQ=y
+CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM2835=y
+# CONFIG_ARCH_BCMBCA is not set
+CONFIG_ARCH_BCM_IPROC=y
+CONFIG_ARCH_BRCMSTB=y
+CONFIG_ARCH_HISI=y
+CONFIG_ARCH_INTEL_SOCFPGA=y
+CONFIG_ARCH_LAYERSCAPE=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=24
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_MVEBU=y
+CONFIG_ARCH_MXC=y
+CONFIG_ARCH_NXP=y
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_ARCH_R8A774A1=y
+CONFIG_ARCH_R8A774B1=y
+CONFIG_ARCH_R8A774C0=y
+CONFIG_ARCH_R8A774E1=y
+# CONFIG_ARCH_R8A77950 is not set
+# CONFIG_ARCH_R8A77951 is not set
+# CONFIG_ARCH_R8A77960 is not set
+# CONFIG_ARCH_R8A77961 is not set
+# CONFIG_ARCH_R8A77965 is not set
+# CONFIG_ARCH_R8A77970 is not set
+# CONFIG_ARCH_R8A77980 is not set
+# CONFIG_ARCH_R8A77990 is not set
+# CONFIG_ARCH_R8A77995 is not set
+# CONFIG_ARCH_R8A779A0 is not set
+# CONFIG_ARCH_R8A779F0 is not set
+# CONFIG_ARCH_R8A779G0 is not set
+CONFIG_ARCH_R9A07G043=y
+CONFIG_ARCH_R9A07G044=y
+CONFIG_ARCH_R9A07G054=y
+CONFIG_ARCH_R9A09G011=y
+CONFIG_ARCH_RENESAS=y
+CONFIG_ARCH_ROCKCHIP=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_ARCH_SYNQUACER=y
+CONFIG_ARCH_THUNDER=y
+CONFIG_ARCH_THUNDER2=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+CONFIG_ARCH_ZYNQMP=y
+CONFIG_ARM64=y
+CONFIG_ARM64_4K_PAGES=y
+CONFIG_ARM64_AMU_EXTN=y
+CONFIG_ARM64_BTI=y
+CONFIG_ARM64_CNP=y
+CONFIG_ARM64_CRYPTO=y
+CONFIG_ARM64_E0PD=y
+CONFIG_ARM64_EPAN=y
+CONFIG_ARM64_ERRATUM_1024718=y
+CONFIG_ARM64_ERRATUM_1165522=y
+CONFIG_ARM64_ERRATUM_1286807=y
+CONFIG_ARM64_ERRATUM_1319367=y
+CONFIG_ARM64_ERRATUM_1418040=y
+CONFIG_ARM64_ERRATUM_1463225=y
+CONFIG_ARM64_ERRATUM_1508412=y
+CONFIG_ARM64_ERRATUM_1530923=y
+CONFIG_ARM64_ERRATUM_1542419=y
+CONFIG_ARM64_ERRATUM_1742098=y
+CONFIG_ARM64_ERRATUM_2051678=y
+CONFIG_ARM64_ERRATUM_2054223=y
+CONFIG_ARM64_ERRATUM_2067961=y
+CONFIG_ARM64_ERRATUM_2077057=y
+CONFIG_ARM64_ERRATUM_2441007=y
+CONFIG_ARM64_ERRATUM_2441009=y
+CONFIG_ARM64_ERRATUM_2457168=y
+CONFIG_ARM64_ERRATUM_2658417=y
+CONFIG_ARM64_ERRATUM_819472=y
+CONFIG_ARM64_ERRATUM_824069=y
+CONFIG_ARM64_ERRATUM_826319=y
+CONFIG_ARM64_ERRATUM_827319=y
+CONFIG_ARM64_ERRATUM_832075=y
+CONFIG_ARM64_ERRATUM_834220=y
+CONFIG_ARM64_ERRATUM_843419=y
+CONFIG_ARM64_ERRATUM_845719=y
+CONFIG_ARM64_HW_AFDBM=y
+CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
+CONFIG_ARM64_MTE=y
+CONFIG_ARM64_PAGE_SHIFT=12
+CONFIG_ARM64_PAN=y
+CONFIG_ARM64_PA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_PTR_AUTH=y
+CONFIG_ARM64_PTR_AUTH_KERNEL=y
+CONFIG_ARM64_RAS_EXTN=y
+CONFIG_ARM64_SME=y
+CONFIG_ARM64_SVE=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_ARM64_TLB_RANGE=y
+CONFIG_ARM64_VA_BITS=48
+CONFIG_ARM64_VA_BITS_48=y
+CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
+CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
+CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
+CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
+# CONFIG_ARMADA_37XX_RWTM_MBOX is not set
+CONFIG_ARMADA_37XX_WATCHDOG=y
+CONFIG_ARMADA_THERMAL=y
+CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
+# CONFIG_ARM_DMC620_PMU is not set
+# CONFIG_ARM_MHU_V2 is not set
+CONFIG_ARM_PSCI_CPUIDLE=y
+CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
+CONFIG_ARM_SBSA_WATCHDOG=y
+CONFIG_ARM_SCPI_POWER_DOMAIN=y
+CONFIG_ARM_SCPI_PROTOCOL=y
+CONFIG_ARM_SMCCC_SOC_ID=y
+CONFIG_ARM_SMC_WATCHDOG=y
+CONFIG_ARM_SMMU=y
+# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
+# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
+CONFIG_ARM_SMMU_V3=y
+# CONFIG_ARM_SMMU_V3_PMU is not set
+# CONFIG_ARM_SMMU_V3_SVA is not set
+CONFIG_ATOMIC64_SELFTEST=y
+CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
+# CONFIG_AXI_DMAC is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BCM2711_THERMAL is not set
+CONFIG_BCM2835_MBOX=y
+CONFIG_BCM2835_POWER=y
+# CONFIG_BCM2835_THERMAL is not set
+# CONFIG_BCM2835_VCHIQ is not set
+CONFIG_BCM2835_WDT=y
+# CONFIG_BCMGENET is not set
+# CONFIG_BCM_CYGNUS_PHY is not set
+# CONFIG_BCM_FLEXRM_MBOX is not set
+# CONFIG_BCM_NS_THERMAL is not set
+# CONFIG_BCM_PDC_MBOX is not set
+# CONFIG_BCM_SR_THERMAL is not set
+CONFIG_BCM_VIDEOCORE=y
+# CONFIG_BGMAC_PLATFORM is not set
+CONFIG_BLK_PM=y
+# CONFIG_BRCMSTB_PM is not set
+# CONFIG_BRCMSTB_THERMAL is not set
+CONFIG_BRCM_USB_PINMAP=y
+CONFIG_CAVIUM_ERRATUM_22375=y
+CONFIG_CAVIUM_ERRATUM_23144=y
+CONFIG_CAVIUM_ERRATUM_23154=y
+CONFIG_CAVIUM_ERRATUM_27456=y
+CONFIG_CAVIUM_ERRATUM_30115=y
+CONFIG_CAVIUM_TX2_ERRATUM_219=y
+CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CLK_BCM2711_DVP=y
+CONFIG_CLK_BCM2835=y
+CONFIG_CLK_BCM_NS2=y
+CONFIG_CLK_BCM_SR=y
+CONFIG_CLK_IMX8MM=y
+CONFIG_CLK_IMX8MN=y
+CONFIG_CLK_IMX8MP=y
+CONFIG_CLK_IMX8MQ=y
+CONFIG_CLK_IMX8QXP=y
+CONFIG_CLK_IMX8ULP=y
+CONFIG_CLK_IMX93=y
+CONFIG_CLK_INTEL_SOCFPGA=y
+CONFIG_CLK_INTEL_SOCFPGA64=y
+CONFIG_CLK_LS1028A_PLLDIG=y
+CONFIG_CLK_PX30=y
+CONFIG_CLK_QORIQ=y
+CONFIG_CLK_RASPBERRYPI=y
+CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y
+CONFIG_CLK_RENESAS=y
+CONFIG_CLK_RK3308=y
+CONFIG_CLK_RK3328=y
+CONFIG_CLK_RK3368=y
+CONFIG_CLK_RK3399=y
+CONFIG_CLK_RK3568=y
+CONFIG_CLK_SP810=y
+CONFIG_CLK_SUNXI=y
+CONFIG_CLK_SUNXI_CLOCKS=y
+# CONFIG_CLK_SUNXI_PRCM_SUN6I is not set
+# CONFIG_CLK_SUNXI_PRCM_SUN8I is not set
+# CONFIG_CLK_SUNXI_PRCM_SUN9I is not set
+CONFIG_CLK_VEXPRESS_OSC=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=19
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=32
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+# CONFIG_COMMON_CLK_FSL_FLEXSPI is not set
+# CONFIG_COMMON_CLK_FSL_SAI is not set
+CONFIG_COMMON_CLK_HI3516CV300=y
+CONFIG_COMMON_CLK_HI3519=y
+CONFIG_COMMON_CLK_HI3559A=y
+CONFIG_COMMON_CLK_HI3660=y
+CONFIG_COMMON_CLK_HI3670=y
+CONFIG_COMMON_CLK_HI3798CV200=y
+CONFIG_COMMON_CLK_HI6220=y
+CONFIG_COMMON_CLK_HI655X=y
+CONFIG_COMMON_CLK_ROCKCHIP=y
+CONFIG_COMMON_CLK_SCPI=y
+CONFIG_COMMON_CLK_ZYNQMP=y
+CONFIG_COMMON_RESET_HI3660=y
+CONFIG_COMMON_RESET_HI6220=y
+# CONFIG_COMPAT_32BIT_TIME is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PM=y
+CONFIG_CRYPTO_AES_ARM64=y
+CONFIG_CRYPTO_AES_ARM64_BS=y
+CONFIG_CRYPTO_AES_ARM64_CE=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
+CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
+CONFIG_CRYPTO_CHACHA20=y
+CONFIG_CRYPTO_CHACHA20_NEON=y
+CONFIG_CRYPTO_CRYPTD=y
+# CONFIG_CRYPTO_DEV_ALLWINNER is not set
+# CONFIG_CRYPTO_DEV_BCM_SPU is not set
+# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM is not set
+# CONFIG_CRYPTO_DEV_HISI_HPRE is not set
+# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set
+# CONFIG_CRYPTO_DEV_HISI_TRNG is not set
+# CONFIG_CRYPTO_DEV_OCTEONTX2_CPT is not set
+# CONFIG_CRYPTO_DEV_ROCKCHIP is not set
+# CONFIG_CRYPTO_DEV_ZYNQMP_AES is not set
+# CONFIG_CRYPTO_DEV_ZYNQMP_SHA3 is not set
+CONFIG_CRYPTO_GHASH_ARM64_CE=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
+CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA1_ARM64_CE=y
+CONFIG_CRYPTO_SHA256_ARM64=y
+CONFIG_CRYPTO_SHA2_ARM64_CE=y
+CONFIG_CRYPTO_SHA512_ARM64=y
+CONFIG_CRYPTO_SIMD=y
+# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
+# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
+# CONFIG_DEV_DAX_HMEM is not set
+CONFIG_DMA_BCM2835=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DMA_SUN6I=y
+CONFIG_DRM=y
+CONFIG_DRM_BOCHS=y
+CONFIG_DRM_BRIDGE=y
+# CONFIG_DRM_FSL_LDB is not set
+CONFIG_DRM_GEM_SHMEM_HELPER=y
+# CONFIG_DRM_IMX8QM_LDB is not set
+# CONFIG_DRM_IMX8QXP_LDB is not set
+# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set
+# CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set
+# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set
+# CONFIG_DRM_IMX_DCSS is not set
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_QXL=y
+# CONFIG_DRM_RCAR_DU is not set
+# CONFIG_DRM_ROCKCHIP is not set
+CONFIG_DRM_TTM=y
+CONFIG_DRM_TTM_HELPER=y
+# CONFIG_DRM_V3D is not set
+CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VRAM_HELPER=y
+# CONFIG_DWMAC_SUN8I is not set
+# CONFIG_DWMAC_SUNXI is not set
+CONFIG_DW_WATCHDOG=y
+CONFIG_EFI_CAPSULE_LOADER=y
+CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
+CONFIG_EFI_SOFT_RESERVE=y
+CONFIG_EFI_VARS_PSTORE=y
+# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
+CONFIG_FB=y
+CONFIG_FB_ARMCLCD=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_MX3=y
+# CONFIG_FB_SH_MOBILE_LCDC is not set
+# CONFIG_FB_XILINX is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_FSL_DPAA is not set
+# CONFIG_FSL_DPAA2_QDMA is not set
+CONFIG_FSL_ERRATUM_A008585=y
+# CONFIG_FSL_IMX8_DDR_PMU is not set
+# CONFIG_FSL_PQ_MDIO is not set
+CONFIG_FUJITSU_ERRATUM_010001=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+# CONFIG_GIANFAR is not set
+CONFIG_GPIO_BCM_XGS_IPROC=y
+CONFIG_GPIO_BRCMSTB=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_MPC8XXX=y
+CONFIG_GPIO_MXC=y
+CONFIG_GPIO_RASPBERRYPI_EXP=y
+CONFIG_GPIO_ROCKCHIP=y
+CONFIG_GPIO_THUNDERX=y
+CONFIG_GPIO_XLP=y
+CONFIG_GPIO_ZYNQ=y
+CONFIG_GPIO_ZYNQMP_MODEPIN=y
+CONFIG_HDMI=y
+CONFIG_HI3660_MBOX=y
+CONFIG_HI6220_MBOX=y
+CONFIG_HISILICON_ERRATUM_161600802=y
+CONFIG_HISILICON_LPC=y
+CONFIG_HISI_PMU=y
+CONFIG_HISI_THERMAL=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+# CONFIG_HOTPLUG_PCI_PCIE is not set
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y
+# CONFIG_HW_RANDOM_HISI is not set
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_ALTERA=y
+# CONFIG_I2C_BCM2835 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_HIX5HD2 is not set
+CONFIG_I2C_IMX=y
+CONFIG_I2C_IMX_LPI2C=y
+CONFIG_I2C_RIIC=y
+# CONFIG_I2C_RZV2M is not set
+# CONFIG_I2C_SLAVE_TESTUNIT is not set
+CONFIG_I2C_SYNQUACER=y
+CONFIG_I2C_THUNDERX=y
+# CONFIG_I2C_XLP9XX is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+# CONFIG_IMX2_WDT is not set
+# CONFIG_IMX8MM_THERMAL is not set
+# CONFIG_IMX8QXP_ADC is not set
+# CONFIG_IMX_DMA is not set
+# CONFIG_IMX_DSP is not set
+CONFIG_IMX_INTMUX=y
+CONFIG_IMX_IRQSTEER=y
+CONFIG_IMX_MBOX=y
+# CONFIG_IMX_MU_MSI is not set
+CONFIG_IMX_SCU=y
+CONFIG_IMX_SCU_PD=y
+# CONFIG_IMX_SC_THERMAL is not set
+# CONFIG_IMX_SC_WDT is not set
+# CONFIG_IMX_SDMA is not set
+# CONFIG_IMX_WEIM is not set
+# CONFIG_INPUT_HISI_POWERKEY is not set
+# CONFIG_INPUT_IBM_PANEL is not set
+# CONFIG_INTEL_STRATIX10_RSU is not set
+# CONFIG_INTEL_STRATIX10_SERVICE is not set
+CONFIG_INTERCONNECT=y
+CONFIG_INTERCONNECT_IMX=y
+CONFIG_INTERCONNECT_IMX8MM=y
+CONFIG_INTERCONNECT_IMX8MN=y
+CONFIG_INTERCONNECT_IMX8MP=y
+CONFIG_INTERCONNECT_IMX8MQ=y
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
+CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_DART is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
+CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IPMMU_VMSA is not set
+# CONFIG_K3_DMA is not set
+CONFIG_KCMP=y
+# CONFIG_KEYBOARD_IMX_SC_KEY is not set
+# CONFIG_KEYBOARD_SUN4I_LRADC is not set
+CONFIG_KSM=y
+CONFIG_KVM=y
+CONFIG_LCD_CLASS_DEVICE=m
+# CONFIG_LCD_PLATFORM is not set
+# CONFIG_MAILBOX_TEST is not set
+CONFIG_MARVELL_10G_PHY=y
+# CONFIG_MARVELL_CN10K_DDR_PMU is not set
+# CONFIG_MARVELL_CN10K_TAD_PMU is not set
+CONFIG_MDIO_BCM_IPROC=y
+CONFIG_MDIO_BUS_MUX_BCM_IPROC=y
+CONFIG_MDIO_SUN4I=y
+# CONFIG_MFD_ALTERA_A10SR is not set
+CONFIG_MFD_ALTERA_SYSMGR=y
+# CONFIG_MFD_AXP20X_RSB is not set
+CONFIG_MFD_CORE=y
+CONFIG_MFD_HI655X_PMIC=y
+# CONFIG_MFD_KHADAS_MCU is not set
+CONFIG_MFD_SUN4I_GPADC=y
+# CONFIG_MFD_SUN6I_PRCM is not set
+CONFIG_MFD_SYSCON=y
+CONFIG_MFD_VEXPRESS_SYSREG=y
+CONFIG_MMC=y
+CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_BCM2835=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CAVIUM_THUNDERX=y
+CONFIG_MMC_DW=y
+# CONFIG_MMC_DW_BLUEFIELD is not set
+# CONFIG_MMC_DW_EXYNOS is not set
+# CONFIG_MMC_DW_HI3798CV200 is not set
+# CONFIG_MMC_DW_K3 is not set
+# CONFIG_MMC_DW_PCI is not set
+CONFIG_MMC_DW_PLTFM=y
+CONFIG_MMC_DW_ROCKCHIP=y
+# CONFIG_MMC_MXC is not set
+CONFIG_MMC_RICOH_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_CADENCE=y
+CONFIG_MMC_SDHCI_ESDHC_IMX=y
+CONFIG_MMC_SDHCI_IPROC=y
+CONFIG_MMC_SDHCI_OF_ESDHC=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHI=y
+CONFIG_MMC_SDHI_INTERNAL_DMAC=y
+# CONFIG_MMC_SDHI_SYS_DMAC is not set
+# CONFIG_MMC_SH_MMCIF is not set
+CONFIG_MMC_SUNXI=y
+CONFIG_MODULES_USE_ELF_RELA=y
+# CONFIG_MVNETA is not set
+# CONFIG_MVPP2 is not set
+# CONFIG_MV_XOR is not set
+# CONFIG_MX3_IPU is not set
+CONFIG_MXC_CLK=y
+CONFIG_MXC_CLK_SCU=y
+# CONFIG_MXS_DMA is not set
+CONFIG_NEED_SG_DMA_LENGTH=y
+# CONFIG_NET_VENDOR_ALLWINNER is not set
+CONFIG_NODES_SHIFT=4
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=256
+CONFIG_NUMA=y
+CONFIG_NUMA_BALANCING=y
+CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
+# CONFIG_NVHE_EL2_DEBUG is not set
+CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
+# CONFIG_NVMEM_IMX_IIM is not set
+# CONFIG_NVMEM_IMX_OCOTP_ELE is not set
+CONFIG_NVMEM_IMX_OCOTP_SCU=y
+# CONFIG_NVMEM_LAYERSCAPE_SFP is not set
+CONFIG_NVMEM_ROCKCHIP_EFUSE=y
+# CONFIG_NVMEM_ROCKCHIP_OTP is not set
+# CONFIG_NVMEM_SNVS_LPGPR is not set
+# CONFIG_NVMEM_SUNXI_SID is not set
+# CONFIG_NVMEM_ZYNQMP is not set
+CONFIG_PCC=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_ARMADA_8K=y
+CONFIG_PCIE_BRCMSTB=y
+CONFIG_PCIE_HISI_STB=y
+CONFIG_PCIE_IPROC_MSI=y
+CONFIG_PCIE_IPROC_PLATFORM=y
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_PCIE_MOBIVEIL_PLAT=y
+# CONFIG_PCIE_RCAR_EP is not set
+CONFIG_PCIE_RCAR_HOST=y
+CONFIG_PCIE_ROCKCHIP=y
+# CONFIG_PCIE_ROCKCHIP_DW_HOST is not set
+CONFIG_PCIE_ROCKCHIP_HOST=y
+CONFIG_PCIE_XILINX_CPM=y
+CONFIG_PCIE_XILINX_NWL=y
+CONFIG_PCI_AARDVARK=y
+CONFIG_PCI_HISI=y
+CONFIG_PCI_HOST_THUNDER_ECAM=y
+CONFIG_PCI_HOST_THUNDER_PEM=y
+CONFIG_PCI_IMX6=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_LAYERSCAPE=y
+CONFIG_PCI_PASID=y
+# CONFIG_PCI_RCAR_GEN2 is not set
+CONFIG_PHY_BCM_SR_PCIE=y
+CONFIG_PHY_BCM_SR_USB=y
+CONFIG_PHY_BRCM_SATA=y
+CONFIG_PHY_BRCM_USB=y
+CONFIG_PHY_FSL_IMX8M_PCIE=y
+# CONFIG_PHY_FSL_LYNX_28G is not set
+CONFIG_PHY_HI3660_USB=y
+CONFIG_PHY_HI3670_PCIE=y
+CONFIG_PHY_HI3670_USB=y
+CONFIG_PHY_HI6220_USB=y
+CONFIG_PHY_HISI_INNO_USB2=y
+# CONFIG_PHY_HISTB_COMBPHY is not set
+# CONFIG_PHY_MIXEL_LVDS_PHY is not set
+CONFIG_PHY_MVEBU_A3700_COMPHY=y
+CONFIG_PHY_MVEBU_A3700_UTMI=y
+CONFIG_PHY_MVEBU_A38X_COMPHY=y
+CONFIG_PHY_MVEBU_CP110_COMPHY=y
+CONFIG_PHY_NS2_PCIE=y
+CONFIG_PHY_NS2_USB_DRD=y
+# CONFIG_PHY_RCAR_GEN2 is not set
+CONFIG_PHY_RCAR_GEN3_PCIE=y
+CONFIG_PHY_RCAR_GEN3_USB2=y
+CONFIG_PHY_RCAR_GEN3_USB3=y
+# CONFIG_PHY_ROCKCHIP_DP is not set
+# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
+CONFIG_PHY_ROCKCHIP_EMMC=y
+# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
+# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
+# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
+# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set
+CONFIG_PHY_ROCKCHIP_PCIE=y
+CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
+CONFIG_PHY_ROCKCHIP_TYPEC=y
+# CONFIG_PHY_ROCKCHIP_USB is not set
+CONFIG_PHY_SUN4I_USB=y
+CONFIG_PHY_SUN50I_USB3=y
+# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
+CONFIG_PHY_SUN9I_USB=y
+# CONFIG_PHY_XILINX_ZYNQMP is not set
+CONFIG_PINCTRL_IMX=y
+CONFIG_PINCTRL_IMX8DXL=y
+CONFIG_PINCTRL_IMX8MM=y
+CONFIG_PINCTRL_IMX8MN=y
+CONFIG_PINCTRL_IMX8MP=y
+CONFIG_PINCTRL_IMX8MQ=y
+CONFIG_PINCTRL_IMX8QM=y
+CONFIG_PINCTRL_IMX8QXP=y
+CONFIG_PINCTRL_IMX8ULP=y
+CONFIG_PINCTRL_IMX93=y
+# CONFIG_PINCTRL_IMXRT1050 is not set
+# CONFIG_PINCTRL_IMXRT1170 is not set
+CONFIG_PINCTRL_IMX_SCU=y
+CONFIG_PINCTRL_IPROC_GPIO=y
+CONFIG_PINCTRL_NS2_MUX=y
+CONFIG_PINCTRL_ROCKCHIP=y
+# CONFIG_PINCTRL_SUN20I_D1 is not set
+CONFIG_PINCTRL_SUN4I_A10=y
+CONFIG_PINCTRL_SUN50I_A100=y
+CONFIG_PINCTRL_SUN50I_A100_R=y
+CONFIG_PINCTRL_SUN50I_A64=y
+CONFIG_PINCTRL_SUN50I_A64_R=y
+CONFIG_PINCTRL_SUN50I_H5=y
+CONFIG_PINCTRL_SUN50I_H6=y
+CONFIG_PINCTRL_SUN50I_H616=y
+CONFIG_PINCTRL_SUN50I_H616_R=y
+CONFIG_PINCTRL_SUN50I_H6_R=y
+CONFIG_PINCTRL_SUN5I=y
+# CONFIG_PINCTRL_SUN6I_A31 is not set
+# CONFIG_PINCTRL_SUN6I_A31_R is not set
+# CONFIG_PINCTRL_SUN8I_A23 is not set
+# CONFIG_PINCTRL_SUN8I_A23_R is not set
+# CONFIG_PINCTRL_SUN8I_A33 is not set
+# CONFIG_PINCTRL_SUN8I_A83T is not set
+# CONFIG_PINCTRL_SUN8I_A83T_R is not set
+# CONFIG_PINCTRL_SUN8I_H3 is not set
+# CONFIG_PINCTRL_SUN8I_H3_R is not set
+# CONFIG_PINCTRL_SUN8I_V3S is not set
+# CONFIG_PINCTRL_SUN9I_A80 is not set
+# CONFIG_PINCTRL_SUN9I_A80_R is not set
+CONFIG_PINCTRL_ZYNQMP=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_GENERIC_DOMAINS=y
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_HISI=y
+CONFIG_POWER_RESET_VEXPRESS=y
+CONFIG_POWER_SUPPLY=y
+# CONFIG_PTP_1588_CLOCK_DTE is not set
+# CONFIG_PWM_BCM2835 is not set
+CONFIG_QCOM_FALKOR_ERRATUM_1003=y
+CONFIG_QCOM_FALKOR_ERRATUM_1009=y
+CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
+CONFIG_QCOM_QDF2400_ERRATUM_0065=y
+CONFIG_QORIQ_THERMAL=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RASPBERRYPI_FIRMWARE=y
+CONFIG_RASPBERRYPI_POWER=y
+CONFIG_RANDOMIZE_BASE=y
+CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RELOCATABLE=y
+# CONFIG_RAVB is not set
+CONFIG_RCAR_DMAC=y
+# CONFIG_RCAR_GEN3_THERMAL is not set
+# CONFIG_RCAR_THERMAL is not set
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_ANATOP=y
+CONFIG_REGULATOR_AXP20X=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_HI655X=y
+CONFIG_REGULATOR_PFUZE100=y
+# CONFIG_REGULATOR_VEXPRESS is not set
+CONFIG_RENESAS_OSTM=y
+# CONFIG_RENESAS_RZAWDT is not set
+# CONFIG_RENESAS_RZG2LWDT is not set
+# CONFIG_RENESAS_RZN1WDT is not set
+CONFIG_RENESAS_USB_DMAC=y
+# CONFIG_RENESAS_WDT is not set
+# CONFIG_RESET_BRCMSTB is not set
+CONFIG_RESET_IMX7=y
+# CONFIG_RESET_RASPBERRYPI is not set
+CONFIG_RESET_RZG2L_USBPHY_CTRL=y
+CONFIG_ROCKCHIP_IODOMAIN=y
+CONFIG_ROCKCHIP_IOMMU=y
+# CONFIG_ROCKCHIP_MBOX is not set
+CONFIG_ROCKCHIP_PM_DOMAINS=y
+# CONFIG_ROCKCHIP_SARADC is not set
+# CONFIG_ROCKCHIP_THERMAL is not set
+CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+# CONFIG_RTC_DRV_BRCMSTB is not set
+# CONFIG_RTC_DRV_FSL_FTM_ALARM is not set
+# CONFIG_RTC_DRV_IMXDI is not set
+# CONFIG_RTC_DRV_IMX_SC is not set
+CONFIG_RTC_DRV_MV=y
+# CONFIG_RTC_DRV_MXC is not set
+# CONFIG_RTC_DRV_MXC_V2 is not set
+# CONFIG_RTC_DRV_SH is not set
+CONFIG_RTC_I2C_AND_SPI=y
+# CONFIG_RZG2L_ADC is not set
+# CONFIG_RZG2L_THERMAL is not set
+CONFIG_RZ_DMAC=y
+CONFIG_SATA_SIL24=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+# CONFIG_SENSORS_ARM_SCPI is not set
+CONFIG_SERIAL_8250_BCM2835AUX=y
+CONFIG_SERIAL_8250_BCM7271=y
+# CONFIG_SERIAL_8250_EXAR is not set
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_FSL_LINFLEXUART=y
+CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
+CONFIG_SERIAL_FSL_LPUART=y
+CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_IMX_EARLYCON=y
+CONFIG_SERIAL_MVEBU_CONSOLE=y
+CONFIG_SERIAL_MVEBU_UART=y
+CONFIG_SERIAL_SAMSUNG=y
+CONFIG_SERIAL_SAMSUNG_CONSOLE=y
+# CONFIG_SMC91X is not set
+# CONFIG_SND_SOC_RCAR is not set
+# CONFIG_SND_SOC_RZ is not set
+# CONFIG_SND_SOC_SH4_FSI is not set
+# CONFIG_SND_SUN4I_I2S is not set
+# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
+# CONFIG_SND_SUN50I_DMIC is not set
+# CONFIG_SND_SUN8I_CODEC is not set
+# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
+# CONFIG_SNI_NETSEC is not set
+CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
+CONFIG_SOC_IMX8M=y
+CONFIG_SOC_IMX9=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPI_ARMADA_3700=y
+# CONFIG_SPI_BCM2835 is not set
+CONFIG_SPI_FSL_LPSPI=y
+# CONFIG_SPI_FSL_QUADSPI is not set
+# CONFIG_SPI_HISI_KUNPENG is not set
+# CONFIG_SPI_HISI_SFC is not set
+# CONFIG_SPI_HISI_SFC_V3XX is not set
+CONFIG_SPI_IMX=y
+# CONFIG_SPI_ROCKCHIP_SFC is not set
+# CONFIG_SPI_RSPI is not set
+# CONFIG_SPI_SH_HSPI is not set
+# CONFIG_SPI_SH_MSIOF is not set
+# CONFIG_SPI_SUN4I is not set
+# CONFIG_SPI_SUN6I is not set
+# CONFIG_SPI_SYNQUACER is not set
+CONFIG_SPI_THUNDERX=y
+# CONFIG_SPI_XLP is not set
+CONFIG_STUB_CLK_HI3660=y
+CONFIG_STUB_CLK_HI6220=y
+CONFIG_SUN50I_A100_CCU=y
+CONFIG_SUN50I_A100_R_CCU=y
+CONFIG_SUN50I_A64_CCU=y
+CONFIG_SUN50I_H616_CCU=y
+CONFIG_SUN50I_H6_CCU=y
+CONFIG_SUN50I_H6_R_CCU=y
+CONFIG_SUN50I_IOMMU=y
+CONFIG_SUN6I_MSGBOX=y
+CONFIG_SUN6I_RTC_CCU=y
+# CONFIG_SUN8I_A83T_CCU is not set
+CONFIG_SUN8I_DE2_CCU=y
+# CONFIG_SUN8I_H3_CCU is not set
+CONFIG_SUN8I_R_CCU=y
+CONFIG_SUN8I_THERMAL=y
+CONFIG_SUNXI_CCU=y
+CONFIG_SUNXI_RSB=y
+CONFIG_SUNXI_WATCHDOG=y
+CONFIG_SYNC_FILE=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+# CONFIG_TCG_TIS_SYNQUACER is not set
+CONFIG_THREAD_INFO_IN_TASK=y
+# CONFIG_THUNDERX2_PMU is not set
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
+# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+# CONFIG_TURRIS_MOX_RWTM is not set
+CONFIG_TYPEC=y
+# CONFIG_TYPEC_ANX7411 is not set
+# CONFIG_TYPEC_DP_ALTMODE is not set
+# CONFIG_TYPEC_FUSB302 is not set
+# CONFIG_TYPEC_HD3SS3220 is not set
+# CONFIG_TYPEC_MUX_FSA4480 is not set
+# CONFIG_TYPEC_MUX_PI3USB30532 is not set
+# CONFIG_TYPEC_RT1711H is not set
+# CONFIG_TYPEC_RT1719 is not set
+# CONFIG_TYPEC_STUSB160X is not set
+CONFIG_TYPEC_TCPCI=y
+# CONFIG_TYPEC_TCPCI_MAXIM is not set
+CONFIG_TYPEC_TCPM=y
+# CONFIG_TYPEC_TPS6598X is not set
+# CONFIG_TYPEC_WUSB3801 is not set
+# CONFIG_UACCE is not set
+CONFIG_UNMAP_KERNEL_AT_EL0=y
+# CONFIG_USB_BRCMSTB is not set
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_GENERIC=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_IMX=y
+CONFIG_USB_CHIPIDEA_PCI=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_DUAL_ROLE=y
+# CONFIG_USB_DWC3_GADGET is not set
+CONFIG_USB_DWC3_HAPS=y
+# CONFIG_USB_DWC3_HOST is not set
+CONFIG_USB_DWC3_IMX8MP=y
+# CONFIG_USB_DWC3_OF_SIMPLE is not set
+CONFIG_USB_DWC3_PCI=y
+# CONFIG_USB_DWC3_ULPI is not set
+CONFIG_USB_DWC3_XILINX=y
+CONFIG_USB_EHCI_FSL=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_ORION=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+# CONFIG_USB_EMXX is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_MXS_PHY=y
+CONFIG_USB_OHCI_EXYNOS=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_OTG=y
+CONFIG_USB_OTG_FSM=y
+CONFIG_USB_RENESAS_USB3=y
+CONFIG_USB_RENESAS_USBHS=y
+CONFIG_USB_RENESAS_USBHS_HCD=y
+CONFIG_USB_RENESAS_USBHS_UDC=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_HISTB=y
+CONFIG_USB_XHCI_MVEBU=y
+CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_VEXPRESS_CONFIG=y
+CONFIG_VIDEOMODE_HELPERS=y
+CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
+# CONFIG_VIRTIO_IOMMU is not set
+CONFIG_VIRTUALIZATION=y
+CONFIG_VMAP_STACK=y
+CONFIG_WDAT_WDT=y
+# CONFIG_XILINX_AMS is not set
+# CONFIG_XILINX_INTC is not set
+CONFIG_XLNX_EVENT_MANAGER=y
+CONFIG_ZONE_DMA32=y
+CONFIG_ZYNQMP_FIRMWARE=y
+# CONFIG_ZYNQMP_FIRMWARE_DEBUG is not set
+CONFIG_ZYNQMP_PM_DOMAINS=y
+CONFIG_ZYNQMP_POWER=y
diff --git a/target/linux/armsr/config-6.1 b/target/linux/armsr/config-6.1
new file mode 100644
index 0000000000..d1dac69da4
--- /dev/null
+++ b/target/linux/armsr/config-6.1
@@ -0,0 +1,336 @@
+CONFIG_64BIT=y
+CONFIG_9P_FS=y
+# CONFIG_9P_FS_POSIX_ACL is not set
+# CONFIG_9P_FS_SECURITY is not set
+# CONFIG_A64FX_DIAG is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_EINJ=y
+# CONFIG_ACPI_APEI_ERST_DEBUG is not set
+CONFIG_ACPI_APEI_GHES=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_BATTERY=y
+# CONFIG_ACPI_BGRT is not set
+CONFIG_ACPI_BUTTON=y
+CONFIG_ACPI_CCA_REQUIRED=y
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_CPPC_CPUFREQ=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_GENERIC_GSI=y
+CONFIG_ACPI_GTDT=y
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_I2C_OPREGION=y
+CONFIG_ACPI_IORT=y
+CONFIG_ACPI_MCFG=y
+# CONFIG_ACPI_PCI_SLOT is not set
+# CONFIG_ACPI_PFRUT is not set
+CONFIG_ACPI_PPTT=y
+CONFIG_ACPI_PRMT=y
+CONFIG_ACPI_PROCESSOR=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y
+CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TINY_POWER_BUTTON is not set
+# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=24
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+CONFIG_ARM64=y
+CONFIG_ARM64_4K_PAGES=y
+# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set
+CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
+CONFIG_ARM64_PAGE_SHIFT=12
+CONFIG_ARM64_PA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_ARM64_VA_BITS=39
+CONFIG_ARM64_VA_BITS_39=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GIC_V2M=y
+CONFIG_ARM_GIC_V3=y
+CONFIG_ARM_GIC_V3_ITS=y
+CONFIG_ARM_GIC_V3_ITS_PCI=y
+CONFIG_ARM_PSCI_FW=y
+# CONFIG_ARM_SMMU_V3_PMU is not set
+CONFIG_ATA=y
+CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
+CONFIG_BALLOON_COMPACTION=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+# CONFIG_COMPAT_32BIT_TIME is not set
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ACPI=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_REMAP=y
+CONFIG_DMI=y
+CONFIG_DMIID=y
+CONFIG_DMI_SYSFS=y
+CONFIG_DTC=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EFI=y
+CONFIG_EFIVAR_FS=y
+CONFIG_EFI_ARMSTUB_DTB_LOADER=y
+# CONFIG_EFI_BOOTLOADER_CONTROL is not set
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_COCO_SECRET is not set
+# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# CONFIG_EFI_DISABLE_RUNTIME is not set
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_ESRT=y
+CONFIG_EFI_GENERIC_STUB=y
+# CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is not set
+CONFIG_EFI_PARAMS_FROM_FDT=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+CONFIG_EFI_STUB=y
+# CONFIG_EFI_TEST is not set
+# CONFIG_EFI_ZBOOT is not set
+CONFIG_EXT4_FS=y
+CONFIG_F2FS_FS=y
+CONFIG_FAILOVER=y
+CONFIG_FB_EFI=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_AUTOSELECT=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_ACPI=y
+CONFIG_GPIO_CDEV=y
+# CONFIG_GPIO_HISI is not set
+CONFIG_GPIO_PL061=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+CONFIG_HVC_DRIVER=y
+CONFIG_HZ_PERIODIC=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_HID_ACPI=y
+# CONFIG_I2C_HISI is not set
+# CONFIG_I2C_SLAVE_TESTUNIT is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_JBD2=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY_BALLOON=y
+CONFIG_MIGRATION=y
+# CONFIG_MLXBF_GIGE is not set
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_MVMDIO=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_9P=y
+# CONFIG_NET_9P_DEBUG is not set
+# CONFIG_NET_9P_FD is not set
+CONFIG_NET_9P_VIRTIO=y
+CONFIG_NET_FAILOVER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NLS=y
+CONFIG_NR_CPUS=256
+CONFIG_NVMEM=y
+CONFIG_NVME_CORE=y
+# CONFIG_NVME_MULTIPATH is not set
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_PADATA=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_PARTITION_PERCPU=y
+CONFIG_PCI=y
+# CONFIG_PCIE_HISI_ERR is not set
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_ECAM=y
+CONFIG_PCI_HOST_COMMON=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCI_LABEL=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PGTABLE_LEVELS=3
+CONFIG_PHYS_ADDR_T_64BIT=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RATIONAL=y
+# CONFIG_RESET_ATTACK_MITIGATION is not set
+CONFIG_RFS_ACCEL=y
+CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_EFI=y
+CONFIG_RTC_DRV_PL031=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_SATA_HOST=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SCSI_VIRTIO=y
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_EARLYCON=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SRCU=y
+# CONFIG_SURFACE_PLATFORMS is not set
+CONFIG_SWIOTLB=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYSFB=y
+# CONFIG_SYSFB_SIMPLEFB is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_ACPI=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+# CONFIG_UACCE is not set
+CONFIG_UCS2_STRING=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_USB=y
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
+CONFIG_USB_PCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PCI=y
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_PCI_LIB=y
+CONFIG_VMAP_STACK=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_XPS=y
+CONFIG_ZONE_DMA32=y
diff --git a/target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch b/target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch
new file mode 100644
index 0000000000..7c0b4b1920
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch
@@ -0,0 +1,23 @@
+From b77c0ecdc7915e5c5c515da1aa6cfaf6f4eb8351 Mon Sep 17 00:00:00 2001
+From: Mathew McBride <matt at traverse.com.au>
+Date: Wed, 28 Sep 2022 16:39:31 +1000
+Subject: [PATCH] arm: disable code size reduction measures
+ (gc-sections,-f*-sections)
+
+This interferes with the EFI boot stub on armv7l.
+
+Signed-off-by: Mathew McBride <matt at traverse.com.au>
+---
+ arch/arm/Kconfig | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -124,7 +124,6 @@ config ARM
+ 	select HAVE_VIRT_CPU_ACCOUNTING_GEN
+ 	select IRQ_FORCED_THREADING
+ 	select LOCK_MM_AND_FIND_VMA
+-	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
+ 	select MODULES_USE_ELF_REL
+ 	select NEED_DMA_MAP_STATE
+ 	select OF_EARLY_FLATTREE if OF
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch b/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch
new file mode 100644
index 0000000000..ec72f91d0f
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch
@@ -0,0 +1,44 @@
+From f3763a0c1b07273218cbf5886bdf8df9df501111 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:10 +0200
+Subject: [PATCH 03/14] net: dpaa2-eth: don't use -ENOTSUPP error code
+
+dpaa2_eth_setup_dpni() is called from the probe path and
+dpaa2_eth_set_link_ksettings() is propagated to user space.
+
+include/linux/errno.h says that ENOTSUPP is "Defined for the NFSv3
+protocol". Conventional wisdom has it to not use it in networking
+drivers. Replace it with -EOPNOTSUPP.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c     | 2 +-
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -3614,7 +3614,7 @@ static int dpaa2_eth_setup_dpni(struct f
+ 		dev_err(dev, "DPNI version %u.%u not supported, need >= %u.%u\n",
+ 			priv->dpni_ver_major, priv->dpni_ver_minor,
+ 			DPNI_VER_MAJOR, DPNI_VER_MINOR);
+-		err = -ENOTSUPP;
++		err = -EOPNOTSUPP;
+ 		goto close;
+ 	}
+ 
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
+@@ -118,7 +118,7 @@ dpaa2_eth_set_link_ksettings(struct net_
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+ 
+ 	if (!dpaa2_eth_is_type_phy(priv))
+-		return -ENOTSUPP;
++		return -EOPNOTSUPP;
+ 
+ 	return phylink_ethtool_ksettings_set(priv->mac->phylink, link_settings);
+ }
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch b/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch
new file mode 100644
index 0000000000..501eaf42ff
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch
@@ -0,0 +1,99 @@
+From 022a11062261dc4703da846d3bf4d194ef6bebf5 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:11 +0200
+Subject: [PATCH 04/14] net: dpaa2: replace dpaa2_mac_is_type_fixed() with
+ dpaa2_mac_is_type_phy()
+
+dpaa2_mac_is_type_fixed() is a header with no implementation and no
+callers, which is referenced from the documentation though. It can be
+deleted.
+
+On the other hand, it would be useful to reuse the code between
+dpaa2_eth_is_type_phy() and dpaa2_switch_port_is_type_phy(). That common
+code should be called dpaa2_mac_is_type_phy(), so let's create that.
+
+The removal and the addition are merged into the same patch because,
+in fact, is_type_phy() is the logical opposite of is_type_fixed().
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../ethernet/freescale/dpaa2/mac-phy-support.rst       |  9 ++++++---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h       |  7 +------
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h       | 10 ++++++++--
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h    |  7 +------
+ 4 files changed, 16 insertions(+), 17 deletions(-)
+
+--- a/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rst
++++ b/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rst
+@@ -181,10 +181,13 @@ when necessary using the below listed AP
+  - int dpaa2_mac_connect(struct dpaa2_mac *mac);
+  - void dpaa2_mac_disconnect(struct dpaa2_mac *mac);
+ 
+-A phylink integration is necessary only when the partner DPMAC is not of TYPE_FIXED.
+-One can check for this condition using the below API::
++A phylink integration is necessary only when the partner DPMAC is not of
++``TYPE_FIXED``. This means it is either of ``TYPE_PHY``, or of
++``TYPE_BACKPLANE`` (the difference being the two that in the ``TYPE_BACKPLANE``
++mode, the MC firmware does not access the PCS registers). One can check for
++this condition using the following helper::
+ 
+- - bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,struct fsl_mc_io *mc_io);
++ - static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac);
+ 
+ Before connection to a MAC, the caller must allocate and populate the
+ dpaa2_mac structure with the associated net_device, a pointer to the MC portal
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
+@@ -733,12 +733,7 @@ static inline unsigned int dpaa2_eth_rx_
+ 
+ static inline bool dpaa2_eth_is_type_phy(struct dpaa2_eth_priv *priv)
+ {
+-	if (priv->mac &&
+-	    (priv->mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
+-	     priv->mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE))
+-		return true;
+-
+-	return false;
++	return dpaa2_mac_is_type_phy(priv->mac);
+ }
+ 
+ static inline bool dpaa2_eth_has_mac(struct dpaa2_eth_priv *priv)
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
+@@ -30,8 +30,14 @@ struct dpaa2_mac {
+ 	struct phy *serdes_phy;
+ };
+ 
+-bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,
+-			     struct fsl_mc_io *mc_io);
++static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac)
++{
++	if (!mac)
++		return false;
++
++	return mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
++	       mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE;
++}
+ 
+ int dpaa2_mac_open(struct dpaa2_mac *mac);
+ 
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
+@@ -230,12 +230,7 @@ static inline bool dpaa2_switch_supports
+ static inline bool
+ dpaa2_switch_port_is_type_phy(struct ethsw_port_priv *port_priv)
+ {
+-	if (port_priv->mac &&
+-	    (port_priv->mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
+-	     port_priv->mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE))
+-		return true;
+-
+-	return false;
++	return dpaa2_mac_is_type_phy(port_priv->mac);
+ }
+ 
+ static inline bool dpaa2_switch_port_has_mac(struct ethsw_port_priv *port_priv)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch b/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch
new file mode 100644
index 0000000000..af5ff2aea6
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch
@@ -0,0 +1,88 @@
+From 97c07369ab8bf9895e05d4b468f18e6567263154 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:12 +0200
+Subject: [PATCH 05/14] net: dpaa2-mac: absorb phylink_start() call into
+ dpaa2_mac_start()
+
+The phylink handling is intended to be hidden inside the dpaa2_mac
+object. Move the phylink_start() call into dpaa2_mac_start(), and
+phylink_stop() into dpaa2_mac_stop().
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c    | 5 +----
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c    | 8 ++++++++
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 5 +----
+ 3 files changed, 10 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -2083,10 +2083,8 @@ static int dpaa2_eth_open(struct net_dev
+ 		goto enable_err;
+ 	}
+ 
+-	if (dpaa2_eth_is_type_phy(priv)) {
++	if (dpaa2_eth_is_type_phy(priv))
+ 		dpaa2_mac_start(priv->mac);
+-		phylink_start(priv->mac->phylink);
+-	}
+ 
+ 	return 0;
+ 
+@@ -2160,7 +2158,6 @@ static int dpaa2_eth_stop(struct net_dev
+ 	int retries = 10;
+ 
+ 	if (dpaa2_eth_is_type_phy(priv)) {
+-		phylink_stop(priv->mac->phylink);
+ 		dpaa2_mac_stop(priv->mac);
+ 	} else {
+ 		netif_tx_stop_all_queues(net_dev);
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+@@ -336,12 +336,20 @@ static void dpaa2_mac_set_supported_inte
+ 
+ void dpaa2_mac_start(struct dpaa2_mac *mac)
+ {
++	ASSERT_RTNL();
++
+ 	if (mac->serdes_phy)
+ 		phy_power_on(mac->serdes_phy);
++
++	phylink_start(mac->phylink);
+ }
+ 
+ void dpaa2_mac_stop(struct dpaa2_mac *mac)
+ {
++	ASSERT_RTNL();
++
++	phylink_stop(mac->phylink);
++
+ 	if (mac->serdes_phy)
+ 		phy_power_off(mac->serdes_phy);
+ }
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+@@ -703,10 +703,8 @@ static int dpaa2_switch_port_open(struct
+ 
+ 	dpaa2_switch_enable_ctrl_if_napi(ethsw);
+ 
+-	if (dpaa2_switch_port_is_type_phy(port_priv)) {
++	if (dpaa2_switch_port_is_type_phy(port_priv))
+ 		dpaa2_mac_start(port_priv->mac);
+-		phylink_start(port_priv->mac->phylink);
+-	}
+ 
+ 	return 0;
+ }
+@@ -718,7 +716,6 @@ static int dpaa2_switch_port_stop(struct
+ 	int err;
+ 
+ 	if (dpaa2_switch_port_is_type_phy(port_priv)) {
+-		phylink_stop(port_priv->mac->phylink);
+ 		dpaa2_mac_stop(port_priv->mac);
+ 	} else {
+ 		netif_tx_stop_all_queues(netdev);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch b/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch
new file mode 100644
index 0000000000..c3028357fe
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch
@@ -0,0 +1,50 @@
+From 095ef388f714d622aa503fcccf20dc4095b72762 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:13 +0200
+Subject: [PATCH 06/14] net: dpaa2-mac: remove defensive check in
+ dpaa2_mac_disconnect()
+
+dpaa2_mac_disconnect() will only be called with a NULL mac->phylink if
+dpaa2_mac_connect() failed, or was never called.
+
+The callers are these:
+
+dpaa2_eth_disconnect_mac():
+
+	if (dpaa2_eth_is_type_phy(priv))
+		dpaa2_mac_disconnect(priv->mac);
+
+dpaa2_switch_port_disconnect_mac():
+
+	if (dpaa2_switch_port_is_type_phy(port_priv))
+		dpaa2_mac_disconnect(port_priv->mac);
+
+priv->mac can be NULL, but in that case, dpaa2_eth_is_type_phy() returns
+false, and dpaa2_mac_disconnect() is never called. Similar for
+dpaa2-switch.
+
+When priv->mac is non-NULL, it means that dpaa2_mac_connect() returned
+zero (success), and therefore, priv->mac->phylink is also a valid
+pointer.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+@@ -446,9 +446,6 @@ err_pcs_destroy:
+ 
+ void dpaa2_mac_disconnect(struct dpaa2_mac *mac)
+ {
+-	if (!mac->phylink)
+-		return;
+-
+ 	phylink_disconnect_phy(mac->phylink);
+ 	phylink_destroy(mac->phylink);
+ 	dpaa2_pcs_destroy(mac);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch b/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch
new file mode 100644
index 0000000000..c31a470182
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch
@@ -0,0 +1,101 @@
+From 06efc9b8a1360cad83cae6e71558e5458cc1fbf3 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:14 +0200
+Subject: [PATCH 07/14] net: dpaa2-eth: assign priv->mac after
+ dpaa2_mac_connect() call
+
+There are 2 requirements for correct code:
+
+- Any time the driver accesses the priv->mac pointer at runtime, it
+  either holds NULL to indicate a DPNI-DPNI connection (or unconnected
+  DPNI), or a struct dpaa2_mac whose phylink instance was fully
+  initialized (created and connected to the PHY). No changes are made to
+  priv->mac while it is being used. Currently, rtnl_lock() watches over
+  the call to dpaa2_eth_connect_mac(), so it serves the purpose of
+  serializing this with all readers of priv->mac.
+
+- dpaa2_mac_connect() should run unlocked, because inside it are 2
+  phylink calls with incompatible locking requirements: phylink_create()
+  requires that the rtnl_mutex isn't held, and phylink_fwnode_phy_connect()
+  requires that the rtnl_mutex is held. The only way to solve those
+  contradictory requirements is to let dpaa2_mac_connect() take
+  rtnl_lock() when it needs to.
+
+To solve both requirements, we need to identify the writer side of the
+priv->mac pointer, which can be wrapped in a mutex private to the driver
+in a future patch. The dpaa2_mac_connect() cannot be part of the writer
+side critical section, because of an AB/BA deadlock with rtnl_lock().
+
+So the strategy needs to be that where we prepare the DPMAC by calling
+dpaa2_mac_connect(), and only make priv->mac point to it once it's fully
+prepared. This ensures that the writer side critical section has the
+absolute minimum surface it can.
+
+The reverse strategy is adopted in the dpaa2_eth_disconnect_mac() code
+path. This makes sure that priv->mac is NULL when we start tearing down
+the DPMAC that we disconnected from, and concurrent code will simply not
+see it.
+
+No locking changes in this patch (concurrent code is still blocked by
+the rtnl_mutex).
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 21 +++++++++++--------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -4444,9 +4444,8 @@ static int dpaa2_eth_connect_mac(struct
+ 	err = dpaa2_mac_open(mac);
+ 	if (err)
+ 		goto err_free_mac;
+-	priv->mac = mac;
+ 
+-	if (dpaa2_eth_is_type_phy(priv)) {
++	if (dpaa2_mac_is_type_phy(mac)) {
+ 		err = dpaa2_mac_connect(mac);
+ 		if (err && err != -EPROBE_DEFER)
+ 			netdev_err(priv->net_dev, "Error connecting to the MAC endpoint: %pe",
+@@ -4455,11 +4454,12 @@ static int dpaa2_eth_connect_mac(struct
+ 			goto err_close_mac;
+ 	}
+ 
++	priv->mac = mac;
++
+ 	return 0;
+ 
+ err_close_mac:
+ 	dpaa2_mac_close(mac);
+-	priv->mac = NULL;
+ err_free_mac:
+ 	kfree(mac);
+ 	return err;
+@@ -4467,15 +4467,18 @@ err_free_mac:
+ 
+ static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
+ {
+-	if (dpaa2_eth_is_type_phy(priv))
+-		dpaa2_mac_disconnect(priv->mac);
++	struct dpaa2_mac *mac = priv->mac;
++
++	priv->mac = NULL;
+ 
+-	if (!dpaa2_eth_has_mac(priv))
++	if (!mac)
+ 		return;
+ 
+-	dpaa2_mac_close(priv->mac);
+-	kfree(priv->mac);
+-	priv->mac = NULL;
++	if (dpaa2_mac_is_type_phy(mac))
++		dpaa2_mac_disconnect(mac);
++
++	dpaa2_mac_close(mac);
++	kfree(mac);
+ }
+ 
+ static irqreturn_t dpni_irq0_handler_thread(int irq_num, void *arg)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch b/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch
new file mode 100644
index 0000000000..e63654984a
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch
@@ -0,0 +1,73 @@
+From a5e7f7e277bd4403c45c1c7922d56d0eb08dbc7c Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:15 +0200
+Subject: [PATCH 08/14] net: dpaa2-switch: assign port_priv->mac after
+ dpaa2_mac_connect() call
+
+The dpaa2-switch has the exact same locking requirements when connected
+to a DPMAC, so it needs port_priv->mac to always point either to NULL,
+or to a DPMAC with a fully initialized phylink instance.
+
+Make the same preparatory change in the dpaa2-switch driver as in the
+dpaa2-eth one.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../ethernet/freescale/dpaa2/dpaa2-switch.c   | 21 +++++++++++--------
+ 1 file changed, 12 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+@@ -1450,9 +1450,8 @@ static int dpaa2_switch_port_connect_mac
+ 	err = dpaa2_mac_open(mac);
+ 	if (err)
+ 		goto err_free_mac;
+-	port_priv->mac = mac;
+ 
+-	if (dpaa2_switch_port_is_type_phy(port_priv)) {
++	if (dpaa2_mac_is_type_phy(mac)) {
+ 		err = dpaa2_mac_connect(mac);
+ 		if (err) {
+ 			netdev_err(port_priv->netdev,
+@@ -1462,11 +1461,12 @@ static int dpaa2_switch_port_connect_mac
+ 		}
+ 	}
+ 
++	port_priv->mac = mac;
++
+ 	return 0;
+ 
+ err_close_mac:
+ 	dpaa2_mac_close(mac);
+-	port_priv->mac = NULL;
+ err_free_mac:
+ 	kfree(mac);
+ 	return err;
+@@ -1474,15 +1474,18 @@ err_free_mac:
+ 
+ static void dpaa2_switch_port_disconnect_mac(struct ethsw_port_priv *port_priv)
+ {
+-	if (dpaa2_switch_port_is_type_phy(port_priv))
+-		dpaa2_mac_disconnect(port_priv->mac);
++	struct dpaa2_mac *mac = port_priv->mac;
++
++	port_priv->mac = NULL;
+ 
+-	if (!dpaa2_switch_port_has_mac(port_priv))
++	if (!mac)
+ 		return;
+ 
+-	dpaa2_mac_close(port_priv->mac);
+-	kfree(port_priv->mac);
+-	port_priv->mac = NULL;
++	if (dpaa2_mac_is_type_phy(mac))
++		dpaa2_mac_disconnect(mac);
++
++	dpaa2_mac_close(mac);
++	kfree(mac);
+ }
+ 
+ static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch b/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch
new file mode 100644
index 0000000000..c790ba1bd5
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch
@@ -0,0 +1,111 @@
+From ce44b6ed9ee65efa9b3025552c513842eabcab88 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:16 +0200
+Subject: [PATCH 09/14] net: dpaa2: publish MAC stringset to ethtool -S even if
+ MAC is missing
+
+DPNIs and DPSW objects can connect and disconnect at runtime from DPMAC
+objects on the same fsl-mc bus. The DPMAC object also holds "ethtool -S"
+unstructured counters. Those counters are only shown for the entity
+owning the netdev (DPNI, DPSW) if it's connected to a DPMAC.
+
+The ethtool stringset code path is split into multiple callbacks, but
+currently, connecting and disconnecting the DPMAC takes the rtnl_lock().
+This blocks the entire ethtool code path from running, see
+ethnl_default_doit() -> rtnl_lock() -> ops->prepare_data() ->
+strset_prepare_data().
+
+This is going to be a problem if we are going to no longer require
+rtnl_lock() when connecting/disconnecting the DPMAC, because the DPMAC
+could appear between ops->get_sset_count() and ops->get_strings().
+If it appears out of the blue, we will provide a stringset into an array
+that was dimensioned thinking the DPMAC wouldn't be there => array
+accessed out of bounds.
+
+There isn't really a good way to work around that, and I don't want to
+put too much pressure on the ethtool framework by playing locking games.
+Just make the DPMAC counters be always available. They'll be zeroes if
+the DPNI or DPSW isn't connected to a DPMAC.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 12 +++---------
+ .../ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c  | 11 ++---------
+ 2 files changed, 5 insertions(+), 18 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
+@@ -186,7 +186,6 @@ static int dpaa2_eth_set_pauseparam(stru
+ static void dpaa2_eth_get_strings(struct net_device *netdev, u32 stringset,
+ 				  u8 *data)
+ {
+-	struct dpaa2_eth_priv *priv = netdev_priv(netdev);
+ 	u8 *p = data;
+ 	int i;
+ 
+@@ -200,22 +199,17 @@ static void dpaa2_eth_get_strings(struct
+ 			strscpy(p, dpaa2_ethtool_extras[i], ETH_GSTRING_LEN);
+ 			p += ETH_GSTRING_LEN;
+ 		}
+-		if (dpaa2_eth_has_mac(priv))
+-			dpaa2_mac_get_strings(p);
++		dpaa2_mac_get_strings(p);
+ 		break;
+ 	}
+ }
+ 
+ static int dpaa2_eth_get_sset_count(struct net_device *net_dev, int sset)
+ {
+-	int num_ss_stats = DPAA2_ETH_NUM_STATS + DPAA2_ETH_NUM_EXTRA_STATS;
+-	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+-
+ 	switch (sset) {
+ 	case ETH_SS_STATS: /* ethtool_get_stats(), ethtool_get_drvinfo() */
+-		if (dpaa2_eth_has_mac(priv))
+-			num_ss_stats += dpaa2_mac_get_sset_count();
+-		return num_ss_stats;
++		return DPAA2_ETH_NUM_STATS + DPAA2_ETH_NUM_EXTRA_STATS +
++		       dpaa2_mac_get_sset_count();
+ 	default:
+ 		return -EOPNOTSUPP;
+ 	}
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
+@@ -145,14 +145,9 @@ dpaa2_switch_set_link_ksettings(struct n
+ static int
+ dpaa2_switch_ethtool_get_sset_count(struct net_device *netdev, int sset)
+ {
+-	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
+-	int num_ss_stats = DPAA2_SWITCH_NUM_COUNTERS;
+-
+ 	switch (sset) {
+ 	case ETH_SS_STATS:
+-		if (port_priv->mac)
+-			num_ss_stats += dpaa2_mac_get_sset_count();
+-		return num_ss_stats;
++		return DPAA2_SWITCH_NUM_COUNTERS + dpaa2_mac_get_sset_count();
+ 	default:
+ 		return -EOPNOTSUPP;
+ 	}
+@@ -161,7 +156,6 @@ dpaa2_switch_ethtool_get_sset_count(stru
+ static void dpaa2_switch_ethtool_get_strings(struct net_device *netdev,
+ 					     u32 stringset, u8 *data)
+ {
+-	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
+ 	u8 *p = data;
+ 	int i;
+ 
+@@ -172,8 +166,7 @@ static void dpaa2_switch_ethtool_get_str
+ 			       ETH_GSTRING_LEN);
+ 			p += ETH_GSTRING_LEN;
+ 		}
+-		if (port_priv->mac)
+-			dpaa2_mac_get_strings(p);
++		dpaa2_mac_get_strings(p);
+ 		break;
+ 	}
+ }
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch b/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
new file mode 100644
index 0000000000..0663bf6fb1
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
@@ -0,0 +1,28 @@
+From c838d9fd7e6ba9ddd6006bf0a296396266e9f121 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:17 +0200
+Subject: [PATCH 10/14] net: dpaa2-switch replace direct MAC access with
+ dpaa2_switch_port_has_mac()
+
+The helper function will gain a lockdep annotation in a future patch.
+Make sure to benefit from it.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
+@@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_sta
+ 				   dpaa2_switch_ethtool_counters[i].name, err);
+ 	}
+ 
+-	if (port_priv->mac)
++	if (dpaa2_switch_port_has_mac(port_priv))
+ 		dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
+ }
+ 
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch b/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch
new file mode 100644
index 0000000000..4e39e9a0ac
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch
@@ -0,0 +1,93 @@
+From e0ea63162cb5f1ca7f844d6ef5fc4079448ee2d5 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:18 +0200
+Subject: [PATCH 11/14] net: dpaa2-eth: connect to MAC before requesting the
+ "endpoint changed" IRQ
+
+dpaa2_eth_connect_mac() is called both from dpaa2_eth_probe() and from
+dpni_irq0_handler_thread().
+
+It could happen that the DPNI gets connected to a DPMAC on the fsl-mc
+bus exactly during probe, as soon as the "endpoint change" interrupt is
+requested in dpaa2_eth_setup_irqs(). This will cause the
+dpni_irq0_handler_thread() to register a phylink instance for that DPMAC.
+
+Then, the probing function will also try to register a phylink instance
+for the same DPMAC, operation which should fail (and this will fail the
+probing of the driver).
+
+Reorder dpaa2_eth_setup_irqs() and dpaa2_eth_connect_mac(), such that
+dpni_irq0_handler_thread() never races with the DPMAC-related portion of
+the probing path.
+
+Also reorder dpaa2_eth_disconnect_mac() to be in the mirror position of
+dpaa2_eth_connect_mac() in the teardown path.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../net/ethernet/freescale/dpaa2/dpaa2-eth.c   | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -4711,6 +4711,10 @@ static int dpaa2_eth_probe(struct fsl_mc
+ 	}
+ #endif
+ 
++	err = dpaa2_eth_connect_mac(priv);
++	if (err)
++		goto err_connect_mac;
++
+ 	err = dpaa2_eth_setup_irqs(dpni_dev);
+ 	if (err) {
+ 		netdev_warn(net_dev, "Failed to set link interrupt, fall back to polling\n");
+@@ -4723,10 +4727,6 @@ static int dpaa2_eth_probe(struct fsl_mc
+ 		priv->do_link_poll = true;
+ 	}
+ 
+-	err = dpaa2_eth_connect_mac(priv);
+-	if (err)
+-		goto err_connect_mac;
+-
+ 	err = dpaa2_eth_dl_alloc(priv);
+ 	if (err)
+ 		goto err_dl_register;
+@@ -4762,13 +4762,13 @@ err_dl_port_add:
+ err_dl_trap_register:
+ 	dpaa2_eth_dl_free(priv);
+ err_dl_register:
+-	dpaa2_eth_disconnect_mac(priv);
+-err_connect_mac:
+ 	if (priv->do_link_poll)
+ 		kthread_stop(priv->poll_thread);
+ 	else
+ 		fsl_mc_free_irqs(dpni_dev);
+ err_poll_thread:
++	dpaa2_eth_disconnect_mac(priv);
++err_connect_mac:
+ 	dpaa2_eth_free_rings(priv);
+ err_alloc_rings:
+ err_csum:
+@@ -4816,9 +4816,6 @@ static int dpaa2_eth_remove(struct fsl_m
+ #endif
+ 
+ 	unregister_netdev(net_dev);
+-	rtnl_lock();
+-	dpaa2_eth_disconnect_mac(priv);
+-	rtnl_unlock();
+ 
+ 	dpaa2_eth_dl_port_del(priv);
+ 	dpaa2_eth_dl_traps_unregister(priv);
+@@ -4829,6 +4826,9 @@ static int dpaa2_eth_remove(struct fsl_m
+ 	else
+ 		fsl_mc_free_irqs(ls_dev);
+ 
++	rtnl_lock();
++	dpaa2_eth_disconnect_mac(priv);
++	rtnl_unlock();
+ 	dpaa2_eth_free_rings(priv);
+ 	free_percpu(priv->fd);
+ 	free_percpu(priv->sgt_cache);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch b/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch
new file mode 100644
index 0000000000..9b068ce8f5
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch
@@ -0,0 +1,320 @@
+From 5e448a17dfa2e95166534df7f677a3694ef6187d Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:19 +0200
+Subject: [PATCH 12/14] net: dpaa2-eth: serialize changes to priv->mac with a
+ mutex
+
+The dpaa2 architecture permits dynamic connections between objects on
+the fsl-mc bus, specifically between a DPNI object (represented by a
+struct net_device) and a DPMAC object (represented by a struct phylink).
+
+The DPNI driver is notified when those connections are created/broken
+through the dpni_irq0_handler_thread() method. To ensure that ethtool
+operations, as well as netdev up/down operations serialize with the
+connection/disconnection of the DPNI with a DPMAC,
+dpni_irq0_handler_thread() takes the rtnl_lock() to block those other
+operations from taking place.
+
+There is code called by dpaa2_mac_connect() which wants to acquire the
+rtnl_mutex once again, see phylink_create() -> phylink_register_sfp() ->
+sfp_bus_add_upstream() -> rtnl_lock(). So the strategy doesn't quite
+work out, even though it's fairly simple.
+
+Create a different strategy, where all code paths in the dpaa2-eth
+driver access priv->mac only while they are holding priv->mac_lock.
+The phylink instance is not created or connected to the PHY under the
+priv->mac_lock, but only assigned to priv->mac then. This will eliminate
+the reliance on the rtnl_mutex.
+
+Add lockdep annotations and put comments where holding the lock is not
+necessary, and priv->mac can be dereferenced freely.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 43 ++++++++++++--
+ .../net/ethernet/freescale/dpaa2/dpaa2-eth.h  |  6 ++
+ .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  | 58 +++++++++++++++----
+ 3 files changed, 91 insertions(+), 16 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -2021,8 +2021,11 @@ static int dpaa2_eth_link_state_update(s
+ 
+ 	/* When we manage the MAC/PHY using phylink there is no need
+ 	 * to manually update the netif_carrier.
++	 * We can avoid locking because we are called from the "link changed"
++	 * IRQ handler, which is the same as the "endpoint changed" IRQ handler
++	 * (the writer to priv->mac), so we cannot race with it.
+ 	 */
+-	if (dpaa2_eth_is_type_phy(priv))
++	if (dpaa2_mac_is_type_phy(priv->mac))
+ 		goto out;
+ 
+ 	/* Chech link state; speed / duplex changes are not treated yet */
+@@ -2061,6 +2064,8 @@ static int dpaa2_eth_open(struct net_dev
+ 			   priv->dpbp_dev->obj_desc.id, priv->bpid);
+ 	}
+ 
++	mutex_lock(&priv->mac_lock);
++
+ 	if (!dpaa2_eth_is_type_phy(priv)) {
+ 		/* We'll only start the txqs when the link is actually ready;
+ 		 * make sure we don't race against the link up notification,
+@@ -2079,6 +2084,7 @@ static int dpaa2_eth_open(struct net_dev
+ 
+ 	err = dpni_enable(priv->mc_io, 0, priv->mc_token);
+ 	if (err < 0) {
++		mutex_unlock(&priv->mac_lock);
+ 		netdev_err(net_dev, "dpni_enable() failed\n");
+ 		goto enable_err;
+ 	}
+@@ -2086,6 +2092,8 @@ static int dpaa2_eth_open(struct net_dev
+ 	if (dpaa2_eth_is_type_phy(priv))
+ 		dpaa2_mac_start(priv->mac);
+ 
++	mutex_unlock(&priv->mac_lock);
++
+ 	return 0;
+ 
+ enable_err:
+@@ -2157,6 +2165,8 @@ static int dpaa2_eth_stop(struct net_dev
+ 	int dpni_enabled = 0;
+ 	int retries = 10;
+ 
++	mutex_lock(&priv->mac_lock);
++
+ 	if (dpaa2_eth_is_type_phy(priv)) {
+ 		dpaa2_mac_stop(priv->mac);
+ 	} else {
+@@ -2164,6 +2174,8 @@ static int dpaa2_eth_stop(struct net_dev
+ 		netif_carrier_off(net_dev);
+ 	}
+ 
++	mutex_unlock(&priv->mac_lock);
++
+ 	/* On dpni_disable(), the MC firmware will:
+ 	 * - stop MAC Rx and wait for all Rx frames to be enqueued to software
+ 	 * - cut off WRIOP dequeues from egress FQs and wait until transmission
+@@ -2489,12 +2501,20 @@ static int dpaa2_eth_ts_ioctl(struct net
+ static int dpaa2_eth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+ {
+ 	struct dpaa2_eth_priv *priv = netdev_priv(dev);
++	int err;
+ 
+ 	if (cmd == SIOCSHWTSTAMP)
+ 		return dpaa2_eth_ts_ioctl(dev, rq, cmd);
+ 
+-	if (dpaa2_eth_is_type_phy(priv))
+-		return phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
++	mutex_lock(&priv->mac_lock);
++
++	if (dpaa2_eth_is_type_phy(priv)) {
++		err = phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
++		mutex_unlock(&priv->mac_lock);
++		return err;
++	}
++
++	mutex_unlock(&priv->mac_lock);
+ 
+ 	return -EOPNOTSUPP;
+ }
+@@ -4454,7 +4474,9 @@ static int dpaa2_eth_connect_mac(struct
+ 			goto err_close_mac;
+ 	}
+ 
++	mutex_lock(&priv->mac_lock);
+ 	priv->mac = mac;
++	mutex_unlock(&priv->mac_lock);
+ 
+ 	return 0;
+ 
+@@ -4467,9 +4489,12 @@ err_free_mac:
+ 
+ static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
+ {
+-	struct dpaa2_mac *mac = priv->mac;
++	struct dpaa2_mac *mac;
+ 
++	mutex_lock(&priv->mac_lock);
++	mac = priv->mac;
+ 	priv->mac = NULL;
++	mutex_unlock(&priv->mac_lock);
+ 
+ 	if (!mac)
+ 		return;
+@@ -4488,6 +4513,7 @@ static irqreturn_t dpni_irq0_handler_thr
+ 	struct fsl_mc_device *dpni_dev = to_fsl_mc_device(dev);
+ 	struct net_device *net_dev = dev_get_drvdata(dev);
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
++	bool had_mac;
+ 	int err;
+ 
+ 	err = dpni_get_irq_status(dpni_dev->mc_io, 0, dpni_dev->mc_handle,
+@@ -4505,7 +4531,12 @@ static irqreturn_t dpni_irq0_handler_thr
+ 		dpaa2_eth_update_tx_fqids(priv);
+ 
+ 		rtnl_lock();
+-		if (dpaa2_eth_has_mac(priv))
++		/* We can avoid locking because the "endpoint changed" IRQ
++		 * handler is the only one who changes priv->mac at runtime,
++		 * so we are not racing with anyone.
++		 */
++		had_mac = !!priv->mac;
++		if (had_mac)
+ 			dpaa2_eth_disconnect_mac(priv);
+ 		else
+ 			dpaa2_eth_connect_mac(priv);
+@@ -4606,6 +4637,8 @@ static int dpaa2_eth_probe(struct fsl_mc
+ 	priv = netdev_priv(net_dev);
+ 	priv->net_dev = net_dev;
+ 
++	mutex_init(&priv->mac_lock);
++
+ 	priv->iommu_domain = iommu_get_domain_for_dev(dev);
+ 
+ 	priv->tx_tstamp_type = HWTSTAMP_TX_OFF;
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
+@@ -580,6 +580,8 @@ struct dpaa2_eth_priv {
+ #endif
+ 
+ 	struct dpaa2_mac *mac;
++	/* Serializes changes to priv->mac */
++	struct mutex		mac_lock;
+ 	struct workqueue_struct	*dpaa2_ptp_wq;
+ 	struct work_struct	tx_onestep_tstamp;
+ 	struct sk_buff_head	tx_skbs;
+@@ -733,11 +735,15 @@ static inline unsigned int dpaa2_eth_rx_
+ 
+ static inline bool dpaa2_eth_is_type_phy(struct dpaa2_eth_priv *priv)
+ {
++	lockdep_assert_held(&priv->mac_lock);
++
+ 	return dpaa2_mac_is_type_phy(priv->mac);
+ }
+ 
+ static inline bool dpaa2_eth_has_mac(struct dpaa2_eth_priv *priv)
+ {
++	lockdep_assert_held(&priv->mac_lock);
++
+ 	return priv->mac ? true : false;
+ }
+ 
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
+@@ -86,11 +86,16 @@ static void dpaa2_eth_get_drvinfo(struct
+ static int dpaa2_eth_nway_reset(struct net_device *net_dev)
+ {
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
++	int err = -EOPNOTSUPP;
++
++	mutex_lock(&priv->mac_lock);
+ 
+ 	if (dpaa2_eth_is_type_phy(priv))
+-		return phylink_ethtool_nway_reset(priv->mac->phylink);
++		err = phylink_ethtool_nway_reset(priv->mac->phylink);
++
++	mutex_unlock(&priv->mac_lock);
+ 
+-	return -EOPNOTSUPP;
++	return err;
+ }
+ 
+ static int
+@@ -98,10 +103,18 @@ dpaa2_eth_get_link_ksettings(struct net_
+ 			     struct ethtool_link_ksettings *link_settings)
+ {
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
++	int err;
+ 
+-	if (dpaa2_eth_is_type_phy(priv))
+-		return phylink_ethtool_ksettings_get(priv->mac->phylink,
+-						     link_settings);
++	mutex_lock(&priv->mac_lock);
++
++	if (dpaa2_eth_is_type_phy(priv)) {
++		err = phylink_ethtool_ksettings_get(priv->mac->phylink,
++						    link_settings);
++		mutex_unlock(&priv->mac_lock);
++		return err;
++	}
++
++	mutex_unlock(&priv->mac_lock);
+ 
+ 	link_settings->base.autoneg = AUTONEG_DISABLE;
+ 	if (!(priv->link_state.options & DPNI_LINK_OPT_HALF_DUPLEX))
+@@ -116,11 +129,17 @@ dpaa2_eth_set_link_ksettings(struct net_
+ 			     const struct ethtool_link_ksettings *link_settings)
+ {
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
++	int err = -EOPNOTSUPP;
+ 
+-	if (!dpaa2_eth_is_type_phy(priv))
+-		return -EOPNOTSUPP;
++	mutex_lock(&priv->mac_lock);
++
++	if (dpaa2_eth_is_type_phy(priv))
++		err = phylink_ethtool_ksettings_set(priv->mac->phylink,
++						    link_settings);
+ 
+-	return phylink_ethtool_ksettings_set(priv->mac->phylink, link_settings);
++	mutex_unlock(&priv->mac_lock);
++
++	return err;
+ }
+ 
+ static void dpaa2_eth_get_pauseparam(struct net_device *net_dev,
+@@ -129,11 +148,16 @@ static void dpaa2_eth_get_pauseparam(str
+ 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
+ 	u64 link_options = priv->link_state.options;
+ 
++	mutex_lock(&priv->mac_lock);
++
+ 	if (dpaa2_eth_is_type_phy(priv)) {
+ 		phylink_ethtool_get_pauseparam(priv->mac->phylink, pause);
++		mutex_unlock(&priv->mac_lock);
+ 		return;
+ 	}
+ 
++	mutex_unlock(&priv->mac_lock);
++
+ 	pause->rx_pause = dpaa2_eth_rx_pause_enabled(link_options);
+ 	pause->tx_pause = dpaa2_eth_tx_pause_enabled(link_options);
+ 	pause->autoneg = AUTONEG_DISABLE;
+@@ -152,9 +176,17 @@ static int dpaa2_eth_set_pauseparam(stru
+ 		return -EOPNOTSUPP;
+ 	}
+ 
+-	if (dpaa2_eth_is_type_phy(priv))
+-		return phylink_ethtool_set_pauseparam(priv->mac->phylink,
+-						      pause);
++	mutex_lock(&priv->mac_lock);
++
++	if (dpaa2_eth_is_type_phy(priv)) {
++		err = phylink_ethtool_set_pauseparam(priv->mac->phylink,
++						     pause);
++		mutex_unlock(&priv->mac_lock);
++		return err;
++	}
++
++	mutex_unlock(&priv->mac_lock);
++
+ 	if (pause->autoneg)
+ 		return -EOPNOTSUPP;
+ 
+@@ -307,8 +339,12 @@ static void dpaa2_eth_get_ethtool_stats(
+ 	}
+ 	*(data + i++) = buf_cnt;
+ 
++	mutex_lock(&priv->mac_lock);
++
+ 	if (dpaa2_eth_has_mac(priv))
+ 		dpaa2_mac_get_ethtool_stats(priv->mac, data + i);
++
++	mutex_unlock(&priv->mac_lock);
+ }
+ 
+ static int dpaa2_eth_prep_eth_rule(struct ethhdr *eth_value, struct ethhdr *eth_mask,
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch b/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch
new file mode 100644
index 0000000000..9d6f5c52dc
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch
@@ -0,0 +1,203 @@
+From 80d12452a5f160c39d63efc1be07df36f9d07133 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:20 +0200
+Subject: [PATCH 13/14] net: dpaa2-switch: serialize changes to priv->mac with
+ a mutex
+
+The dpaa2-switch driver uses a DPMAC in the same way as the dpaa2-eth
+driver, so we need to duplicate the locking solution established by the
+previous change to the switch driver as well.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ .../freescale/dpaa2/dpaa2-switch-ethtool.c    | 32 +++++++++++++++----
+ .../ethernet/freescale/dpaa2/dpaa2-switch.c   | 31 ++++++++++++++++--
+ .../ethernet/freescale/dpaa2/dpaa2-switch.h   |  2 ++
+ 3 files changed, 55 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
+@@ -60,11 +60,18 @@ dpaa2_switch_get_link_ksettings(struct n
+ {
+ 	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
+ 	struct dpsw_link_state state = {0};
+-	int err = 0;
++	int err;
+ 
+-	if (dpaa2_switch_port_is_type_phy(port_priv))
+-		return phylink_ethtool_ksettings_get(port_priv->mac->phylink,
+-						     link_ksettings);
++	mutex_lock(&port_priv->mac_lock);
++
++	if (dpaa2_switch_port_is_type_phy(port_priv)) {
++		err = phylink_ethtool_ksettings_get(port_priv->mac->phylink,
++						    link_ksettings);
++		mutex_unlock(&port_priv->mac_lock);
++		return err;
++	}
++
++	mutex_unlock(&port_priv->mac_lock);
+ 
+ 	err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0,
+ 				     port_priv->ethsw_data->dpsw_handle,
+@@ -99,9 +106,16 @@ dpaa2_switch_set_link_ksettings(struct n
+ 	bool if_running;
+ 	int err = 0, ret;
+ 
+-	if (dpaa2_switch_port_is_type_phy(port_priv))
+-		return phylink_ethtool_ksettings_set(port_priv->mac->phylink,
+-						     link_ksettings);
++	mutex_lock(&port_priv->mac_lock);
++
++	if (dpaa2_switch_port_is_type_phy(port_priv)) {
++		err = phylink_ethtool_ksettings_set(port_priv->mac->phylink,
++						    link_ksettings);
++		mutex_unlock(&port_priv->mac_lock);
++		return err;
++	}
++
++	mutex_unlock(&port_priv->mac_lock);
+ 
+ 	/* Interface needs to be down to change link settings */
+ 	if_running = netif_running(netdev);
+@@ -189,8 +203,12 @@ static void dpaa2_switch_ethtool_get_sta
+ 				   dpaa2_switch_ethtool_counters[i].name, err);
+ 	}
+ 
++	mutex_lock(&port_priv->mac_lock);
++
+ 	if (dpaa2_switch_port_has_mac(port_priv))
+ 		dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
++
++	mutex_unlock(&port_priv->mac_lock);
+ }
+ 
+ const struct ethtool_ops dpaa2_switch_port_ethtool_ops = {
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+@@ -603,8 +603,11 @@ static int dpaa2_switch_port_link_state_
+ 
+ 	/* When we manage the MAC/PHY using phylink there is no need
+ 	 * to manually update the netif_carrier.
++	 * We can avoid locking because we are called from the "link changed"
++	 * IRQ handler, which is the same as the "endpoint changed" IRQ handler
++	 * (the writer to port_priv->mac), so we cannot race with it.
+ 	 */
+-	if (dpaa2_switch_port_is_type_phy(port_priv))
++	if (dpaa2_mac_is_type_phy(port_priv->mac))
+ 		return 0;
+ 
+ 	/* Interrupts are received even though no one issued an 'ifconfig up'
+@@ -684,6 +687,8 @@ static int dpaa2_switch_port_open(struct
+ 	struct ethsw_core *ethsw = port_priv->ethsw_data;
+ 	int err;
+ 
++	mutex_lock(&port_priv->mac_lock);
++
+ 	if (!dpaa2_switch_port_is_type_phy(port_priv)) {
+ 		/* Explicitly set carrier off, otherwise
+ 		 * netif_carrier_ok() will return true and cause 'ip link show'
+@@ -697,6 +702,7 @@ static int dpaa2_switch_port_open(struct
+ 			     port_priv->ethsw_data->dpsw_handle,
+ 			     port_priv->idx);
+ 	if (err) {
++		mutex_unlock(&port_priv->mac_lock);
+ 		netdev_err(netdev, "dpsw_if_enable err %d\n", err);
+ 		return err;
+ 	}
+@@ -706,6 +712,8 @@ static int dpaa2_switch_port_open(struct
+ 	if (dpaa2_switch_port_is_type_phy(port_priv))
+ 		dpaa2_mac_start(port_priv->mac);
+ 
++	mutex_unlock(&port_priv->mac_lock);
++
+ 	return 0;
+ }
+ 
+@@ -715,6 +723,8 @@ static int dpaa2_switch_port_stop(struct
+ 	struct ethsw_core *ethsw = port_priv->ethsw_data;
+ 	int err;
+ 
++	mutex_lock(&port_priv->mac_lock);
++
+ 	if (dpaa2_switch_port_is_type_phy(port_priv)) {
+ 		dpaa2_mac_stop(port_priv->mac);
+ 	} else {
+@@ -722,6 +732,8 @@ static int dpaa2_switch_port_stop(struct
+ 		netif_carrier_off(netdev);
+ 	}
+ 
++	mutex_unlock(&port_priv->mac_lock);
++
+ 	err = dpsw_if_disable(port_priv->ethsw_data->mc_io, 0,
+ 			      port_priv->ethsw_data->dpsw_handle,
+ 			      port_priv->idx);
+@@ -1461,7 +1473,9 @@ static int dpaa2_switch_port_connect_mac
+ 		}
+ 	}
+ 
++	mutex_lock(&port_priv->mac_lock);
+ 	port_priv->mac = mac;
++	mutex_unlock(&port_priv->mac_lock);
+ 
+ 	return 0;
+ 
+@@ -1474,9 +1488,12 @@ err_free_mac:
+ 
+ static void dpaa2_switch_port_disconnect_mac(struct ethsw_port_priv *port_priv)
+ {
+-	struct dpaa2_mac *mac = port_priv->mac;
++	struct dpaa2_mac *mac;
+ 
++	mutex_lock(&port_priv->mac_lock);
++	mac = port_priv->mac;
+ 	port_priv->mac = NULL;
++	mutex_unlock(&port_priv->mac_lock);
+ 
+ 	if (!mac)
+ 		return;
+@@ -1495,6 +1512,7 @@ static irqreturn_t dpaa2_switch_irq0_han
+ 	struct ethsw_port_priv *port_priv;
+ 	u32 status = ~0;
+ 	int err, if_id;
++	bool had_mac;
+ 
+ 	err = dpsw_get_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle,
+ 				  DPSW_IRQ_INDEX_IF, &status);
+@@ -1513,7 +1531,12 @@ static irqreturn_t dpaa2_switch_irq0_han
+ 
+ 	if (status & DPSW_IRQ_EVENT_ENDPOINT_CHANGED) {
+ 		rtnl_lock();
+-		if (dpaa2_switch_port_has_mac(port_priv))
++		/* We can avoid locking because the "endpoint changed" IRQ
++		 * handler is the only one who changes priv->mac at runtime,
++		 * so we are not racing with anyone.
++		 */
++		had_mac = !!port_priv->mac;
++		if (had_mac)
+ 			dpaa2_switch_port_disconnect_mac(port_priv);
+ 		else
+ 			dpaa2_switch_port_connect_mac(port_priv);
+@@ -3249,6 +3272,8 @@ static int dpaa2_switch_probe_port(struc
+ 	port_priv->netdev = port_netdev;
+ 	port_priv->ethsw_data = ethsw;
+ 
++	mutex_init(&port_priv->mac_lock);
++
+ 	port_priv->idx = port_idx;
+ 	port_priv->stp_state = BR_STATE_FORWARDING;
+ 
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
+@@ -161,6 +161,8 @@ struct ethsw_port_priv {
+ 
+ 	struct dpaa2_switch_filter_block *filter_block;
+ 	struct dpaa2_mac	*mac;
++	/* Protects against changes to port_priv->mac */
++	struct mutex		mac_lock;
+ };
+ 
+ /* Switch data */
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch b/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch
new file mode 100644
index 0000000000..521c9d4a54
--- /dev/null
+++ b/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch
@@ -0,0 +1,113 @@
+From 4ea2faf5bb13d9ba9f07e996d495c4cbe34a4236 Mon Sep 17 00:00:00 2001
+From: Vladimir Oltean <vladimir.oltean at nxp.com>
+Date: Tue, 29 Nov 2022 16:12:21 +0200
+Subject: [PATCH 14/14] net: dpaa2-mac: move rtnl_lock() only around
+ phylink_{,dis}connect_phy()
+
+After the introduction of a private mac_lock that serializes access to
+priv->mac (and port_priv->mac in the switch), the only remaining purpose
+of rtnl_lock() is to satisfy the locking requirements of
+phylink_fwnode_phy_connect() and phylink_disconnect_phy().
+
+But the functions these live in, dpaa2_mac_connect() and
+dpaa2_mac_disconnect(), have contradictory locking requirements.
+While phylink_fwnode_phy_connect() wants rtnl_lock() to be held,
+phylink_create() wants it to not be held.
+
+Move the rtnl_lock() from top-level (in the dpaa2-eth and dpaa2-switch
+drivers) to only surround the phylink calls that require it, in the
+dpaa2-mac library code.
+
+This is possible because dpaa2_mac_connect() and dpaa2_mac_disconnect()
+run unlocked, and there isn't any danger of an AB/BA deadlock between
+the rtnl_mutex and other private locks.
+
+Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c    | 4 ----
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c    | 5 +++++
+ drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ----
+ 3 files changed, 5 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+@@ -4530,7 +4530,6 @@ static irqreturn_t dpni_irq0_handler_thr
+ 		dpaa2_eth_set_mac_addr(netdev_priv(net_dev));
+ 		dpaa2_eth_update_tx_fqids(priv);
+ 
+-		rtnl_lock();
+ 		/* We can avoid locking because the "endpoint changed" IRQ
+ 		 * handler is the only one who changes priv->mac at runtime,
+ 		 * so we are not racing with anyone.
+@@ -4540,7 +4539,6 @@ static irqreturn_t dpni_irq0_handler_thr
+ 			dpaa2_eth_disconnect_mac(priv);
+ 		else
+ 			dpaa2_eth_connect_mac(priv);
+-		rtnl_unlock();
+ 	}
+ 
+ 	return IRQ_HANDLED;
+@@ -4859,9 +4857,7 @@ static int dpaa2_eth_remove(struct fsl_m
+ 	else
+ 		fsl_mc_free_irqs(ls_dev);
+ 
+-	rtnl_lock();
+ 	dpaa2_eth_disconnect_mac(priv);
+-	rtnl_unlock();
+ 	dpaa2_eth_free_rings(priv);
+ 	free_percpu(priv->fd);
+ 	free_percpu(priv->sgt_cache);
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
+@@ -428,7 +428,9 @@ int dpaa2_mac_connect(struct dpaa2_mac *
+ 	}
+ 	mac->phylink = phylink;
+ 
++	rtnl_lock();
+ 	err = phylink_fwnode_phy_connect(mac->phylink, dpmac_node, 0);
++	rtnl_unlock();
+ 	if (err) {
+ 		netdev_err(net_dev, "phylink_fwnode_phy_connect() = %d\n", err);
+ 		goto err_phylink_destroy;
+@@ -446,7 +448,10 @@ err_pcs_destroy:
+ 
+ void dpaa2_mac_disconnect(struct dpaa2_mac *mac)
+ {
++	rtnl_lock();
+ 	phylink_disconnect_phy(mac->phylink);
++	rtnl_unlock();
++
+ 	phylink_destroy(mac->phylink);
+ 	dpaa2_pcs_destroy(mac);
+ 	of_phy_put(mac->serdes_phy);
+--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
++++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+@@ -1530,7 +1530,6 @@ static irqreturn_t dpaa2_switch_irq0_han
+ 	}
+ 
+ 	if (status & DPSW_IRQ_EVENT_ENDPOINT_CHANGED) {
+-		rtnl_lock();
+ 		/* We can avoid locking because the "endpoint changed" IRQ
+ 		 * handler is the only one who changes priv->mac at runtime,
+ 		 * so we are not racing with anyone.
+@@ -1540,7 +1539,6 @@ static irqreturn_t dpaa2_switch_irq0_han
+ 			dpaa2_switch_port_disconnect_mac(port_priv);
+ 		else
+ 			dpaa2_switch_port_connect_mac(port_priv);
+-		rtnl_unlock();
+ 	}
+ 
+ out:
+@@ -2951,9 +2949,7 @@ static void dpaa2_switch_remove_port(str
+ {
+ 	struct ethsw_port_priv *port_priv = ethsw->ports[port_idx];
+ 
+-	rtnl_lock();
+ 	dpaa2_switch_port_disconnect_mac(port_priv);
+-	rtnl_unlock();
+ 	free_netdev(port_priv->netdev);
+ 	ethsw->ports[port_idx] = NULL;
+ }



From lede-commits at lists.infradead.org  Tue May  7 05:02:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 08:02:27 -0400
Subject: [openwrt/openwrt]  kernel/armsr: Add configuration files and patches
 for v6.6
In-Reply-To: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
References: <171508334787.1493222.11558692429990949996@git-01.infra.openwrt.org>
Message-ID: <mailman.34260.1715083360.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f125e38ced28d9e673480732df51f0b24f280e93

commit f125e38ced28d9e673480732df51f0b24f280e93
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Mon Mar 18 10:48:13 2024 +1100

    kernel/armsr: Add configuration files and patches for v6.6
    
    Based on the 6.1 files, but without any 6.6 additions.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 .../linux/armsr/armv7/{config-6.1 => config-6.6}   |   0
 .../linux/armsr/armv8/{config-6.1 => config-6.6}   |   0
 target/linux/armsr/{config-6.1 => config-6.6}      |   0
 ...t-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch |  44 ---
 ...eplace-dpaa2_mac_is_type_fixed-with-dpaa2.patch |  99 -------
 ...ac-absorb-phylink_start-call-into-dpaa2_m.patch |  88 ------
 ...ac-remove-defensive-check-in-dpaa2_mac_di.patch |  50 ----
 ...th-assign-priv-mac-after-dpaa2_mac_connec.patch | 101 -------
 ...witch-assign-port_priv-mac-after-dpaa2_ma.patch |  73 -----
 ...ublish-MAC-stringset-to-ethtool-S-even-if.patch | 111 -------
 ...witch-replace-direct-MAC-access-with-dpaa.patch |  28 --
 ...th-connect-to-MAC-before-requesting-the-e.patch |  93 ------
 ...th-serialize-changes-to-priv-mac-with-a-m.patch | 320 ---------------------
 ...switch-serialize-changes-to-priv-mac-with.patch | 203 -------------
 ...a2-mac-move-rtnl_lock-only-around-phylink.patch | 113 --------
 .../221-armsr-disable_gc_sections_armv7.patch      |   4 +-
 16 files changed, 2 insertions(+), 1325 deletions(-)

diff --git a/target/linux/armsr/armv7/config-6.1 b/target/linux/armsr/armv7/config-6.6
similarity index 100%
rename from target/linux/armsr/armv7/config-6.1
rename to target/linux/armsr/armv7/config-6.6
diff --git a/target/linux/armsr/armv8/config-6.1 b/target/linux/armsr/armv8/config-6.6
similarity index 100%
rename from target/linux/armsr/armv8/config-6.1
rename to target/linux/armsr/armv8/config-6.6
diff --git a/target/linux/armsr/config-6.1 b/target/linux/armsr/config-6.6
similarity index 100%
rename from target/linux/armsr/config-6.1
rename to target/linux/armsr/config-6.6
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch b/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch
deleted file mode 100644
index ec72f91d0f..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0001-net-dpaa2-eth-don-t-use-ENOTSUPP-error-code.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f3763a0c1b07273218cbf5886bdf8df9df501111 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:10 +0200
-Subject: [PATCH 03/14] net: dpaa2-eth: don't use -ENOTSUPP error code
-
-dpaa2_eth_setup_dpni() is called from the probe path and
-dpaa2_eth_set_link_ksettings() is propagated to user space.
-
-include/linux/errno.h says that ENOTSUPP is "Defined for the NFSv3
-protocol". Conventional wisdom has it to not use it in networking
-drivers. Replace it with -EOPNOTSUPP.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c     | 2 +-
- drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -3614,7 +3614,7 @@ static int dpaa2_eth_setup_dpni(struct f
- 		dev_err(dev, "DPNI version %u.%u not supported, need >= %u.%u\n",
- 			priv->dpni_ver_major, priv->dpni_ver_minor,
- 			DPNI_VER_MAJOR, DPNI_VER_MINOR);
--		err = -ENOTSUPP;
-+		err = -EOPNOTSUPP;
- 		goto close;
- 	}
- 
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-@@ -118,7 +118,7 @@ dpaa2_eth_set_link_ksettings(struct net_
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
- 
- 	if (!dpaa2_eth_is_type_phy(priv))
--		return -ENOTSUPP;
-+		return -EOPNOTSUPP;
- 
- 	return phylink_ethtool_ksettings_set(priv->mac->phylink, link_settings);
- }
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch b/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch
deleted file mode 100644
index 501eaf42ff..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0002-net-dpaa2-replace-dpaa2_mac_is_type_fixed-with-dpaa2.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 022a11062261dc4703da846d3bf4d194ef6bebf5 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:11 +0200
-Subject: [PATCH 04/14] net: dpaa2: replace dpaa2_mac_is_type_fixed() with
- dpaa2_mac_is_type_phy()
-
-dpaa2_mac_is_type_fixed() is a header with no implementation and no
-callers, which is referenced from the documentation though. It can be
-deleted.
-
-On the other hand, it would be useful to reuse the code between
-dpaa2_eth_is_type_phy() and dpaa2_switch_port_is_type_phy(). That common
-code should be called dpaa2_mac_is_type_phy(), so let's create that.
-
-The removal and the addition are merged into the same patch because,
-in fact, is_type_phy() is the logical opposite of is_type_fixed().
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../ethernet/freescale/dpaa2/mac-phy-support.rst       |  9 ++++++---
- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h       |  7 +------
- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h       | 10 ++++++++--
- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h    |  7 +------
- 4 files changed, 16 insertions(+), 17 deletions(-)
-
---- a/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rst
-+++ b/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/mac-phy-support.rst
-@@ -181,10 +181,13 @@ when necessary using the below listed AP
-  - int dpaa2_mac_connect(struct dpaa2_mac *mac);
-  - void dpaa2_mac_disconnect(struct dpaa2_mac *mac);
- 
--A phylink integration is necessary only when the partner DPMAC is not of TYPE_FIXED.
--One can check for this condition using the below API::
-+A phylink integration is necessary only when the partner DPMAC is not of
-+``TYPE_FIXED``. This means it is either of ``TYPE_PHY``, or of
-+``TYPE_BACKPLANE`` (the difference being the two that in the ``TYPE_BACKPLANE``
-+mode, the MC firmware does not access the PCS registers). One can check for
-+this condition using the following helper::
- 
-- - bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,struct fsl_mc_io *mc_io);
-+ - static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac);
- 
- Before connection to a MAC, the caller must allocate and populate the
- dpaa2_mac structure with the associated net_device, a pointer to the MC portal
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
-@@ -733,12 +733,7 @@ static inline unsigned int dpaa2_eth_rx_
- 
- static inline bool dpaa2_eth_is_type_phy(struct dpaa2_eth_priv *priv)
- {
--	if (priv->mac &&
--	    (priv->mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
--	     priv->mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE))
--		return true;
--
--	return false;
-+	return dpaa2_mac_is_type_phy(priv->mac);
- }
- 
- static inline bool dpaa2_eth_has_mac(struct dpaa2_eth_priv *priv)
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h
-@@ -30,8 +30,14 @@ struct dpaa2_mac {
- 	struct phy *serdes_phy;
- };
- 
--bool dpaa2_mac_is_type_fixed(struct fsl_mc_device *dpmac_dev,
--			     struct fsl_mc_io *mc_io);
-+static inline bool dpaa2_mac_is_type_phy(struct dpaa2_mac *mac)
-+{
-+	if (!mac)
-+		return false;
-+
-+	return mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
-+	       mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE;
-+}
- 
- int dpaa2_mac_open(struct dpaa2_mac *mac);
- 
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
-@@ -230,12 +230,7 @@ static inline bool dpaa2_switch_supports
- static inline bool
- dpaa2_switch_port_is_type_phy(struct ethsw_port_priv *port_priv)
- {
--	if (port_priv->mac &&
--	    (port_priv->mac->attr.link_type == DPMAC_LINK_TYPE_PHY ||
--	     port_priv->mac->attr.link_type == DPMAC_LINK_TYPE_BACKPLANE))
--		return true;
--
--	return false;
-+	return dpaa2_mac_is_type_phy(port_priv->mac);
- }
- 
- static inline bool dpaa2_switch_port_has_mac(struct ethsw_port_priv *port_priv)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch b/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch
deleted file mode 100644
index af5ff2aea6..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0003-net-dpaa2-mac-absorb-phylink_start-call-into-dpaa2_m.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 97c07369ab8bf9895e05d4b468f18e6567263154 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:12 +0200
-Subject: [PATCH 05/14] net: dpaa2-mac: absorb phylink_start() call into
- dpaa2_mac_start()
-
-The phylink handling is intended to be hidden inside the dpaa2_mac
-object. Move the phylink_start() call into dpaa2_mac_start(), and
-phylink_stop() into dpaa2_mac_stop().
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c    | 5 +----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c    | 8 ++++++++
- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 5 +----
- 3 files changed, 10 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -2083,10 +2083,8 @@ static int dpaa2_eth_open(struct net_dev
- 		goto enable_err;
- 	}
- 
--	if (dpaa2_eth_is_type_phy(priv)) {
-+	if (dpaa2_eth_is_type_phy(priv))
- 		dpaa2_mac_start(priv->mac);
--		phylink_start(priv->mac->phylink);
--	}
- 
- 	return 0;
- 
-@@ -2160,7 +2158,6 @@ static int dpaa2_eth_stop(struct net_dev
- 	int retries = 10;
- 
- 	if (dpaa2_eth_is_type_phy(priv)) {
--		phylink_stop(priv->mac->phylink);
- 		dpaa2_mac_stop(priv->mac);
- 	} else {
- 		netif_tx_stop_all_queues(net_dev);
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-@@ -336,12 +336,20 @@ static void dpaa2_mac_set_supported_inte
- 
- void dpaa2_mac_start(struct dpaa2_mac *mac)
- {
-+	ASSERT_RTNL();
-+
- 	if (mac->serdes_phy)
- 		phy_power_on(mac->serdes_phy);
-+
-+	phylink_start(mac->phylink);
- }
- 
- void dpaa2_mac_stop(struct dpaa2_mac *mac)
- {
-+	ASSERT_RTNL();
-+
-+	phylink_stop(mac->phylink);
-+
- 	if (mac->serdes_phy)
- 		phy_power_off(mac->serdes_phy);
- }
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-@@ -703,10 +703,8 @@ static int dpaa2_switch_port_open(struct
- 
- 	dpaa2_switch_enable_ctrl_if_napi(ethsw);
- 
--	if (dpaa2_switch_port_is_type_phy(port_priv)) {
-+	if (dpaa2_switch_port_is_type_phy(port_priv))
- 		dpaa2_mac_start(port_priv->mac);
--		phylink_start(port_priv->mac->phylink);
--	}
- 
- 	return 0;
- }
-@@ -718,7 +716,6 @@ static int dpaa2_switch_port_stop(struct
- 	int err;
- 
- 	if (dpaa2_switch_port_is_type_phy(port_priv)) {
--		phylink_stop(port_priv->mac->phylink);
- 		dpaa2_mac_stop(port_priv->mac);
- 	} else {
- 		netif_tx_stop_all_queues(netdev);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch b/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch
deleted file mode 100644
index c3028357fe..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0004-net-dpaa2-mac-remove-defensive-check-in-dpaa2_mac_di.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 095ef388f714d622aa503fcccf20dc4095b72762 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:13 +0200
-Subject: [PATCH 06/14] net: dpaa2-mac: remove defensive check in
- dpaa2_mac_disconnect()
-
-dpaa2_mac_disconnect() will only be called with a NULL mac->phylink if
-dpaa2_mac_connect() failed, or was never called.
-
-The callers are these:
-
-dpaa2_eth_disconnect_mac():
-
-	if (dpaa2_eth_is_type_phy(priv))
-		dpaa2_mac_disconnect(priv->mac);
-
-dpaa2_switch_port_disconnect_mac():
-
-	if (dpaa2_switch_port_is_type_phy(port_priv))
-		dpaa2_mac_disconnect(port_priv->mac);
-
-priv->mac can be NULL, but in that case, dpaa2_eth_is_type_phy() returns
-false, and dpaa2_mac_disconnect() is never called. Similar for
-dpaa2-switch.
-
-When priv->mac is non-NULL, it means that dpaa2_mac_connect() returned
-zero (success), and therefore, priv->mac->phylink is also a valid
-pointer.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c | 3 ---
- 1 file changed, 3 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-@@ -446,9 +446,6 @@ err_pcs_destroy:
- 
- void dpaa2_mac_disconnect(struct dpaa2_mac *mac)
- {
--	if (!mac->phylink)
--		return;
--
- 	phylink_disconnect_phy(mac->phylink);
- 	phylink_destroy(mac->phylink);
- 	dpaa2_pcs_destroy(mac);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch b/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch
deleted file mode 100644
index c31a470182..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0005-net-dpaa2-eth-assign-priv-mac-after-dpaa2_mac_connec.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 06efc9b8a1360cad83cae6e71558e5458cc1fbf3 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:14 +0200
-Subject: [PATCH 07/14] net: dpaa2-eth: assign priv->mac after
- dpaa2_mac_connect() call
-
-There are 2 requirements for correct code:
-
-- Any time the driver accesses the priv->mac pointer at runtime, it
-  either holds NULL to indicate a DPNI-DPNI connection (or unconnected
-  DPNI), or a struct dpaa2_mac whose phylink instance was fully
-  initialized (created and connected to the PHY). No changes are made to
-  priv->mac while it is being used. Currently, rtnl_lock() watches over
-  the call to dpaa2_eth_connect_mac(), so it serves the purpose of
-  serializing this with all readers of priv->mac.
-
-- dpaa2_mac_connect() should run unlocked, because inside it are 2
-  phylink calls with incompatible locking requirements: phylink_create()
-  requires that the rtnl_mutex isn't held, and phylink_fwnode_phy_connect()
-  requires that the rtnl_mutex is held. The only way to solve those
-  contradictory requirements is to let dpaa2_mac_connect() take
-  rtnl_lock() when it needs to.
-
-To solve both requirements, we need to identify the writer side of the
-priv->mac pointer, which can be wrapped in a mutex private to the driver
-in a future patch. The dpaa2_mac_connect() cannot be part of the writer
-side critical section, because of an AB/BA deadlock with rtnl_lock().
-
-So the strategy needs to be that where we prepare the DPMAC by calling
-dpaa2_mac_connect(), and only make priv->mac point to it once it's fully
-prepared. This ensures that the writer side critical section has the
-absolute minimum surface it can.
-
-The reverse strategy is adopted in the dpaa2_eth_disconnect_mac() code
-path. This makes sure that priv->mac is NULL when we start tearing down
-the DPMAC that we disconnected from, and concurrent code will simply not
-see it.
-
-No locking changes in this patch (concurrent code is still blocked by
-the rtnl_mutex).
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 21 +++++++++++--------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -4444,9 +4444,8 @@ static int dpaa2_eth_connect_mac(struct
- 	err = dpaa2_mac_open(mac);
- 	if (err)
- 		goto err_free_mac;
--	priv->mac = mac;
- 
--	if (dpaa2_eth_is_type_phy(priv)) {
-+	if (dpaa2_mac_is_type_phy(mac)) {
- 		err = dpaa2_mac_connect(mac);
- 		if (err && err != -EPROBE_DEFER)
- 			netdev_err(priv->net_dev, "Error connecting to the MAC endpoint: %pe",
-@@ -4455,11 +4454,12 @@ static int dpaa2_eth_connect_mac(struct
- 			goto err_close_mac;
- 	}
- 
-+	priv->mac = mac;
-+
- 	return 0;
- 
- err_close_mac:
- 	dpaa2_mac_close(mac);
--	priv->mac = NULL;
- err_free_mac:
- 	kfree(mac);
- 	return err;
-@@ -4467,15 +4467,18 @@ err_free_mac:
- 
- static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
- {
--	if (dpaa2_eth_is_type_phy(priv))
--		dpaa2_mac_disconnect(priv->mac);
-+	struct dpaa2_mac *mac = priv->mac;
-+
-+	priv->mac = NULL;
- 
--	if (!dpaa2_eth_has_mac(priv))
-+	if (!mac)
- 		return;
- 
--	dpaa2_mac_close(priv->mac);
--	kfree(priv->mac);
--	priv->mac = NULL;
-+	if (dpaa2_mac_is_type_phy(mac))
-+		dpaa2_mac_disconnect(mac);
-+
-+	dpaa2_mac_close(mac);
-+	kfree(mac);
- }
- 
- static irqreturn_t dpni_irq0_handler_thread(int irq_num, void *arg)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch b/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch
deleted file mode 100644
index e63654984a..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0006-net-dpaa2-switch-assign-port_priv-mac-after-dpaa2_ma.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From a5e7f7e277bd4403c45c1c7922d56d0eb08dbc7c Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:15 +0200
-Subject: [PATCH 08/14] net: dpaa2-switch: assign port_priv->mac after
- dpaa2_mac_connect() call
-
-The dpaa2-switch has the exact same locking requirements when connected
-to a DPMAC, so it needs port_priv->mac to always point either to NULL,
-or to a DPMAC with a fully initialized phylink instance.
-
-Make the same preparatory change in the dpaa2-switch driver as in the
-dpaa2-eth one.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../ethernet/freescale/dpaa2/dpaa2-switch.c   | 21 +++++++++++--------
- 1 file changed, 12 insertions(+), 9 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-@@ -1450,9 +1450,8 @@ static int dpaa2_switch_port_connect_mac
- 	err = dpaa2_mac_open(mac);
- 	if (err)
- 		goto err_free_mac;
--	port_priv->mac = mac;
- 
--	if (dpaa2_switch_port_is_type_phy(port_priv)) {
-+	if (dpaa2_mac_is_type_phy(mac)) {
- 		err = dpaa2_mac_connect(mac);
- 		if (err) {
- 			netdev_err(port_priv->netdev,
-@@ -1462,11 +1461,12 @@ static int dpaa2_switch_port_connect_mac
- 		}
- 	}
- 
-+	port_priv->mac = mac;
-+
- 	return 0;
- 
- err_close_mac:
- 	dpaa2_mac_close(mac);
--	port_priv->mac = NULL;
- err_free_mac:
- 	kfree(mac);
- 	return err;
-@@ -1474,15 +1474,18 @@ err_free_mac:
- 
- static void dpaa2_switch_port_disconnect_mac(struct ethsw_port_priv *port_priv)
- {
--	if (dpaa2_switch_port_is_type_phy(port_priv))
--		dpaa2_mac_disconnect(port_priv->mac);
-+	struct dpaa2_mac *mac = port_priv->mac;
-+
-+	port_priv->mac = NULL;
- 
--	if (!dpaa2_switch_port_has_mac(port_priv))
-+	if (!mac)
- 		return;
- 
--	dpaa2_mac_close(port_priv->mac);
--	kfree(port_priv->mac);
--	port_priv->mac = NULL;
-+	if (dpaa2_mac_is_type_phy(mac))
-+		dpaa2_mac_disconnect(mac);
-+
-+	dpaa2_mac_close(mac);
-+	kfree(mac);
- }
- 
- static irqreturn_t dpaa2_switch_irq0_handler_thread(int irq_num, void *arg)
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch b/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch
deleted file mode 100644
index c790ba1bd5..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0007-net-dpaa2-publish-MAC-stringset-to-ethtool-S-even-if.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From ce44b6ed9ee65efa9b3025552c513842eabcab88 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:16 +0200
-Subject: [PATCH 09/14] net: dpaa2: publish MAC stringset to ethtool -S even if
- MAC is missing
-
-DPNIs and DPSW objects can connect and disconnect at runtime from DPMAC
-objects on the same fsl-mc bus. The DPMAC object also holds "ethtool -S"
-unstructured counters. Those counters are only shown for the entity
-owning the netdev (DPNI, DPSW) if it's connected to a DPMAC.
-
-The ethtool stringset code path is split into multiple callbacks, but
-currently, connecting and disconnecting the DPMAC takes the rtnl_lock().
-This blocks the entire ethtool code path from running, see
-ethnl_default_doit() -> rtnl_lock() -> ops->prepare_data() ->
-strset_prepare_data().
-
-This is going to be a problem if we are going to no longer require
-rtnl_lock() when connecting/disconnecting the DPMAC, because the DPMAC
-could appear between ops->get_sset_count() and ops->get_strings().
-If it appears out of the blue, we will provide a stringset into an array
-that was dimensioned thinking the DPMAC wouldn't be there => array
-accessed out of bounds.
-
-There isn't really a good way to work around that, and I don't want to
-put too much pressure on the ethtool framework by playing locking games.
-Just make the DPMAC counters be always available. They'll be zeroes if
-the DPNI or DPSW isn't connected to a DPMAC.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c | 12 +++---------
- .../ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c  | 11 ++---------
- 2 files changed, 5 insertions(+), 18 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-@@ -186,7 +186,6 @@ static int dpaa2_eth_set_pauseparam(stru
- static void dpaa2_eth_get_strings(struct net_device *netdev, u32 stringset,
- 				  u8 *data)
- {
--	struct dpaa2_eth_priv *priv = netdev_priv(netdev);
- 	u8 *p = data;
- 	int i;
- 
-@@ -200,22 +199,17 @@ static void dpaa2_eth_get_strings(struct
- 			strscpy(p, dpaa2_ethtool_extras[i], ETH_GSTRING_LEN);
- 			p += ETH_GSTRING_LEN;
- 		}
--		if (dpaa2_eth_has_mac(priv))
--			dpaa2_mac_get_strings(p);
-+		dpaa2_mac_get_strings(p);
- 		break;
- 	}
- }
- 
- static int dpaa2_eth_get_sset_count(struct net_device *net_dev, int sset)
- {
--	int num_ss_stats = DPAA2_ETH_NUM_STATS + DPAA2_ETH_NUM_EXTRA_STATS;
--	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
--
- 	switch (sset) {
- 	case ETH_SS_STATS: /* ethtool_get_stats(), ethtool_get_drvinfo() */
--		if (dpaa2_eth_has_mac(priv))
--			num_ss_stats += dpaa2_mac_get_sset_count();
--		return num_ss_stats;
-+		return DPAA2_ETH_NUM_STATS + DPAA2_ETH_NUM_EXTRA_STATS +
-+		       dpaa2_mac_get_sset_count();
- 	default:
- 		return -EOPNOTSUPP;
- 	}
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-@@ -145,14 +145,9 @@ dpaa2_switch_set_link_ksettings(struct n
- static int
- dpaa2_switch_ethtool_get_sset_count(struct net_device *netdev, int sset)
- {
--	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
--	int num_ss_stats = DPAA2_SWITCH_NUM_COUNTERS;
--
- 	switch (sset) {
- 	case ETH_SS_STATS:
--		if (port_priv->mac)
--			num_ss_stats += dpaa2_mac_get_sset_count();
--		return num_ss_stats;
-+		return DPAA2_SWITCH_NUM_COUNTERS + dpaa2_mac_get_sset_count();
- 	default:
- 		return -EOPNOTSUPP;
- 	}
-@@ -161,7 +156,6 @@ dpaa2_switch_ethtool_get_sset_count(stru
- static void dpaa2_switch_ethtool_get_strings(struct net_device *netdev,
- 					     u32 stringset, u8 *data)
- {
--	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
- 	u8 *p = data;
- 	int i;
- 
-@@ -172,8 +166,7 @@ static void dpaa2_switch_ethtool_get_str
- 			       ETH_GSTRING_LEN);
- 			p += ETH_GSTRING_LEN;
- 		}
--		if (port_priv->mac)
--			dpaa2_mac_get_strings(p);
-+		dpaa2_mac_get_strings(p);
- 		break;
- 	}
- }
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch b/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
deleted file mode 100644
index 0663bf6fb1..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0008-net-dpaa2-switch-replace-direct-MAC-access-with-dpaa.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c838d9fd7e6ba9ddd6006bf0a296396266e9f121 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:17 +0200
-Subject: [PATCH 10/14] net: dpaa2-switch replace direct MAC access with
- dpaa2_switch_port_has_mac()
-
-The helper function will gain a lockdep annotation in a future patch.
-Make sure to benefit from it.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-@@ -189,7 +189,7 @@ static void dpaa2_switch_ethtool_get_sta
- 				   dpaa2_switch_ethtool_counters[i].name, err);
- 	}
- 
--	if (port_priv->mac)
-+	if (dpaa2_switch_port_has_mac(port_priv))
- 		dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
- }
- 
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch b/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch
deleted file mode 100644
index 4e39e9a0ac..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0009-net-dpaa2-eth-connect-to-MAC-before-requesting-the-e.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From e0ea63162cb5f1ca7f844d6ef5fc4079448ee2d5 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:18 +0200
-Subject: [PATCH 11/14] net: dpaa2-eth: connect to MAC before requesting the
- "endpoint changed" IRQ
-
-dpaa2_eth_connect_mac() is called both from dpaa2_eth_probe() and from
-dpni_irq0_handler_thread().
-
-It could happen that the DPNI gets connected to a DPMAC on the fsl-mc
-bus exactly during probe, as soon as the "endpoint change" interrupt is
-requested in dpaa2_eth_setup_irqs(). This will cause the
-dpni_irq0_handler_thread() to register a phylink instance for that DPMAC.
-
-Then, the probing function will also try to register a phylink instance
-for the same DPMAC, operation which should fail (and this will fail the
-probing of the driver).
-
-Reorder dpaa2_eth_setup_irqs() and dpaa2_eth_connect_mac(), such that
-dpni_irq0_handler_thread() never races with the DPMAC-related portion of
-the probing path.
-
-Also reorder dpaa2_eth_disconnect_mac() to be in the mirror position of
-dpaa2_eth_connect_mac() in the teardown path.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c   | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -4711,6 +4711,10 @@ static int dpaa2_eth_probe(struct fsl_mc
- 	}
- #endif
- 
-+	err = dpaa2_eth_connect_mac(priv);
-+	if (err)
-+		goto err_connect_mac;
-+
- 	err = dpaa2_eth_setup_irqs(dpni_dev);
- 	if (err) {
- 		netdev_warn(net_dev, "Failed to set link interrupt, fall back to polling\n");
-@@ -4723,10 +4727,6 @@ static int dpaa2_eth_probe(struct fsl_mc
- 		priv->do_link_poll = true;
- 	}
- 
--	err = dpaa2_eth_connect_mac(priv);
--	if (err)
--		goto err_connect_mac;
--
- 	err = dpaa2_eth_dl_alloc(priv);
- 	if (err)
- 		goto err_dl_register;
-@@ -4762,13 +4762,13 @@ err_dl_port_add:
- err_dl_trap_register:
- 	dpaa2_eth_dl_free(priv);
- err_dl_register:
--	dpaa2_eth_disconnect_mac(priv);
--err_connect_mac:
- 	if (priv->do_link_poll)
- 		kthread_stop(priv->poll_thread);
- 	else
- 		fsl_mc_free_irqs(dpni_dev);
- err_poll_thread:
-+	dpaa2_eth_disconnect_mac(priv);
-+err_connect_mac:
- 	dpaa2_eth_free_rings(priv);
- err_alloc_rings:
- err_csum:
-@@ -4816,9 +4816,6 @@ static int dpaa2_eth_remove(struct fsl_m
- #endif
- 
- 	unregister_netdev(net_dev);
--	rtnl_lock();
--	dpaa2_eth_disconnect_mac(priv);
--	rtnl_unlock();
- 
- 	dpaa2_eth_dl_port_del(priv);
- 	dpaa2_eth_dl_traps_unregister(priv);
-@@ -4829,6 +4826,9 @@ static int dpaa2_eth_remove(struct fsl_m
- 	else
- 		fsl_mc_free_irqs(ls_dev);
- 
-+	rtnl_lock();
-+	dpaa2_eth_disconnect_mac(priv);
-+	rtnl_unlock();
- 	dpaa2_eth_free_rings(priv);
- 	free_percpu(priv->fd);
- 	free_percpu(priv->sgt_cache);
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch b/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch
deleted file mode 100644
index 9b068ce8f5..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0010-net-dpaa2-eth-serialize-changes-to-priv-mac-with-a-m.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-From 5e448a17dfa2e95166534df7f677a3694ef6187d Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:19 +0200
-Subject: [PATCH 12/14] net: dpaa2-eth: serialize changes to priv->mac with a
- mutex
-
-The dpaa2 architecture permits dynamic connections between objects on
-the fsl-mc bus, specifically between a DPNI object (represented by a
-struct net_device) and a DPMAC object (represented by a struct phylink).
-
-The DPNI driver is notified when those connections are created/broken
-through the dpni_irq0_handler_thread() method. To ensure that ethtool
-operations, as well as netdev up/down operations serialize with the
-connection/disconnection of the DPNI with a DPMAC,
-dpni_irq0_handler_thread() takes the rtnl_lock() to block those other
-operations from taking place.
-
-There is code called by dpaa2_mac_connect() which wants to acquire the
-rtnl_mutex once again, see phylink_create() -> phylink_register_sfp() ->
-sfp_bus_add_upstream() -> rtnl_lock(). So the strategy doesn't quite
-work out, even though it's fairly simple.
-
-Create a different strategy, where all code paths in the dpaa2-eth
-driver access priv->mac only while they are holding priv->mac_lock.
-The phylink instance is not created or connected to the PHY under the
-priv->mac_lock, but only assigned to priv->mac then. This will eliminate
-the reliance on the rtnl_mutex.
-
-Add lockdep annotations and put comments where holding the lock is not
-necessary, and priv->mac can be dereferenced freely.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../net/ethernet/freescale/dpaa2/dpaa2-eth.c  | 43 ++++++++++++--
- .../net/ethernet/freescale/dpaa2/dpaa2-eth.h  |  6 ++
- .../ethernet/freescale/dpaa2/dpaa2-ethtool.c  | 58 +++++++++++++++----
- 3 files changed, 91 insertions(+), 16 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -2021,8 +2021,11 @@ static int dpaa2_eth_link_state_update(s
- 
- 	/* When we manage the MAC/PHY using phylink there is no need
- 	 * to manually update the netif_carrier.
-+	 * We can avoid locking because we are called from the "link changed"
-+	 * IRQ handler, which is the same as the "endpoint changed" IRQ handler
-+	 * (the writer to priv->mac), so we cannot race with it.
- 	 */
--	if (dpaa2_eth_is_type_phy(priv))
-+	if (dpaa2_mac_is_type_phy(priv->mac))
- 		goto out;
- 
- 	/* Chech link state; speed / duplex changes are not treated yet */
-@@ -2061,6 +2064,8 @@ static int dpaa2_eth_open(struct net_dev
- 			   priv->dpbp_dev->obj_desc.id, priv->bpid);
- 	}
- 
-+	mutex_lock(&priv->mac_lock);
-+
- 	if (!dpaa2_eth_is_type_phy(priv)) {
- 		/* We'll only start the txqs when the link is actually ready;
- 		 * make sure we don't race against the link up notification,
-@@ -2079,6 +2084,7 @@ static int dpaa2_eth_open(struct net_dev
- 
- 	err = dpni_enable(priv->mc_io, 0, priv->mc_token);
- 	if (err < 0) {
-+		mutex_unlock(&priv->mac_lock);
- 		netdev_err(net_dev, "dpni_enable() failed\n");
- 		goto enable_err;
- 	}
-@@ -2086,6 +2092,8 @@ static int dpaa2_eth_open(struct net_dev
- 	if (dpaa2_eth_is_type_phy(priv))
- 		dpaa2_mac_start(priv->mac);
- 
-+	mutex_unlock(&priv->mac_lock);
-+
- 	return 0;
- 
- enable_err:
-@@ -2157,6 +2165,8 @@ static int dpaa2_eth_stop(struct net_dev
- 	int dpni_enabled = 0;
- 	int retries = 10;
- 
-+	mutex_lock(&priv->mac_lock);
-+
- 	if (dpaa2_eth_is_type_phy(priv)) {
- 		dpaa2_mac_stop(priv->mac);
- 	} else {
-@@ -2164,6 +2174,8 @@ static int dpaa2_eth_stop(struct net_dev
- 		netif_carrier_off(net_dev);
- 	}
- 
-+	mutex_unlock(&priv->mac_lock);
-+
- 	/* On dpni_disable(), the MC firmware will:
- 	 * - stop MAC Rx and wait for all Rx frames to be enqueued to software
- 	 * - cut off WRIOP dequeues from egress FQs and wait until transmission
-@@ -2489,12 +2501,20 @@ static int dpaa2_eth_ts_ioctl(struct net
- static int dpaa2_eth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
- {
- 	struct dpaa2_eth_priv *priv = netdev_priv(dev);
-+	int err;
- 
- 	if (cmd == SIOCSHWTSTAMP)
- 		return dpaa2_eth_ts_ioctl(dev, rq, cmd);
- 
--	if (dpaa2_eth_is_type_phy(priv))
--		return phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
-+	mutex_lock(&priv->mac_lock);
-+
-+	if (dpaa2_eth_is_type_phy(priv)) {
-+		err = phylink_mii_ioctl(priv->mac->phylink, rq, cmd);
-+		mutex_unlock(&priv->mac_lock);
-+		return err;
-+	}
-+
-+	mutex_unlock(&priv->mac_lock);
- 
- 	return -EOPNOTSUPP;
- }
-@@ -4454,7 +4474,9 @@ static int dpaa2_eth_connect_mac(struct
- 			goto err_close_mac;
- 	}
- 
-+	mutex_lock(&priv->mac_lock);
- 	priv->mac = mac;
-+	mutex_unlock(&priv->mac_lock);
- 
- 	return 0;
- 
-@@ -4467,9 +4489,12 @@ err_free_mac:
- 
- static void dpaa2_eth_disconnect_mac(struct dpaa2_eth_priv *priv)
- {
--	struct dpaa2_mac *mac = priv->mac;
-+	struct dpaa2_mac *mac;
- 
-+	mutex_lock(&priv->mac_lock);
-+	mac = priv->mac;
- 	priv->mac = NULL;
-+	mutex_unlock(&priv->mac_lock);
- 
- 	if (!mac)
- 		return;
-@@ -4488,6 +4513,7 @@ static irqreturn_t dpni_irq0_handler_thr
- 	struct fsl_mc_device *dpni_dev = to_fsl_mc_device(dev);
- 	struct net_device *net_dev = dev_get_drvdata(dev);
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
-+	bool had_mac;
- 	int err;
- 
- 	err = dpni_get_irq_status(dpni_dev->mc_io, 0, dpni_dev->mc_handle,
-@@ -4505,7 +4531,12 @@ static irqreturn_t dpni_irq0_handler_thr
- 		dpaa2_eth_update_tx_fqids(priv);
- 
- 		rtnl_lock();
--		if (dpaa2_eth_has_mac(priv))
-+		/* We can avoid locking because the "endpoint changed" IRQ
-+		 * handler is the only one who changes priv->mac at runtime,
-+		 * so we are not racing with anyone.
-+		 */
-+		had_mac = !!priv->mac;
-+		if (had_mac)
- 			dpaa2_eth_disconnect_mac(priv);
- 		else
- 			dpaa2_eth_connect_mac(priv);
-@@ -4606,6 +4637,8 @@ static int dpaa2_eth_probe(struct fsl_mc
- 	priv = netdev_priv(net_dev);
- 	priv->net_dev = net_dev;
- 
-+	mutex_init(&priv->mac_lock);
-+
- 	priv->iommu_domain = iommu_get_domain_for_dev(dev);
- 
- 	priv->tx_tstamp_type = HWTSTAMP_TX_OFF;
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
-@@ -580,6 +580,8 @@ struct dpaa2_eth_priv {
- #endif
- 
- 	struct dpaa2_mac *mac;
-+	/* Serializes changes to priv->mac */
-+	struct mutex		mac_lock;
- 	struct workqueue_struct	*dpaa2_ptp_wq;
- 	struct work_struct	tx_onestep_tstamp;
- 	struct sk_buff_head	tx_skbs;
-@@ -733,11 +735,15 @@ static inline unsigned int dpaa2_eth_rx_
- 
- static inline bool dpaa2_eth_is_type_phy(struct dpaa2_eth_priv *priv)
- {
-+	lockdep_assert_held(&priv->mac_lock);
-+
- 	return dpaa2_mac_is_type_phy(priv->mac);
- }
- 
- static inline bool dpaa2_eth_has_mac(struct dpaa2_eth_priv *priv)
- {
-+	lockdep_assert_held(&priv->mac_lock);
-+
- 	return priv->mac ? true : false;
- }
- 
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
-@@ -86,11 +86,16 @@ static void dpaa2_eth_get_drvinfo(struct
- static int dpaa2_eth_nway_reset(struct net_device *net_dev)
- {
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
-+	int err = -EOPNOTSUPP;
-+
-+	mutex_lock(&priv->mac_lock);
- 
- 	if (dpaa2_eth_is_type_phy(priv))
--		return phylink_ethtool_nway_reset(priv->mac->phylink);
-+		err = phylink_ethtool_nway_reset(priv->mac->phylink);
-+
-+	mutex_unlock(&priv->mac_lock);
- 
--	return -EOPNOTSUPP;
-+	return err;
- }
- 
- static int
-@@ -98,10 +103,18 @@ dpaa2_eth_get_link_ksettings(struct net_
- 			     struct ethtool_link_ksettings *link_settings)
- {
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
-+	int err;
- 
--	if (dpaa2_eth_is_type_phy(priv))
--		return phylink_ethtool_ksettings_get(priv->mac->phylink,
--						     link_settings);
-+	mutex_lock(&priv->mac_lock);
-+
-+	if (dpaa2_eth_is_type_phy(priv)) {
-+		err = phylink_ethtool_ksettings_get(priv->mac->phylink,
-+						    link_settings);
-+		mutex_unlock(&priv->mac_lock);
-+		return err;
-+	}
-+
-+	mutex_unlock(&priv->mac_lock);
- 
- 	link_settings->base.autoneg = AUTONEG_DISABLE;
- 	if (!(priv->link_state.options & DPNI_LINK_OPT_HALF_DUPLEX))
-@@ -116,11 +129,17 @@ dpaa2_eth_set_link_ksettings(struct net_
- 			     const struct ethtool_link_ksettings *link_settings)
- {
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
-+	int err = -EOPNOTSUPP;
- 
--	if (!dpaa2_eth_is_type_phy(priv))
--		return -EOPNOTSUPP;
-+	mutex_lock(&priv->mac_lock);
-+
-+	if (dpaa2_eth_is_type_phy(priv))
-+		err = phylink_ethtool_ksettings_set(priv->mac->phylink,
-+						    link_settings);
- 
--	return phylink_ethtool_ksettings_set(priv->mac->phylink, link_settings);
-+	mutex_unlock(&priv->mac_lock);
-+
-+	return err;
- }
- 
- static void dpaa2_eth_get_pauseparam(struct net_device *net_dev,
-@@ -129,11 +148,16 @@ static void dpaa2_eth_get_pauseparam(str
- 	struct dpaa2_eth_priv *priv = netdev_priv(net_dev);
- 	u64 link_options = priv->link_state.options;
- 
-+	mutex_lock(&priv->mac_lock);
-+
- 	if (dpaa2_eth_is_type_phy(priv)) {
- 		phylink_ethtool_get_pauseparam(priv->mac->phylink, pause);
-+		mutex_unlock(&priv->mac_lock);
- 		return;
- 	}
- 
-+	mutex_unlock(&priv->mac_lock);
-+
- 	pause->rx_pause = dpaa2_eth_rx_pause_enabled(link_options);
- 	pause->tx_pause = dpaa2_eth_tx_pause_enabled(link_options);
- 	pause->autoneg = AUTONEG_DISABLE;
-@@ -152,9 +176,17 @@ static int dpaa2_eth_set_pauseparam(stru
- 		return -EOPNOTSUPP;
- 	}
- 
--	if (dpaa2_eth_is_type_phy(priv))
--		return phylink_ethtool_set_pauseparam(priv->mac->phylink,
--						      pause);
-+	mutex_lock(&priv->mac_lock);
-+
-+	if (dpaa2_eth_is_type_phy(priv)) {
-+		err = phylink_ethtool_set_pauseparam(priv->mac->phylink,
-+						     pause);
-+		mutex_unlock(&priv->mac_lock);
-+		return err;
-+	}
-+
-+	mutex_unlock(&priv->mac_lock);
-+
- 	if (pause->autoneg)
- 		return -EOPNOTSUPP;
- 
-@@ -307,8 +339,12 @@ static void dpaa2_eth_get_ethtool_stats(
- 	}
- 	*(data + i++) = buf_cnt;
- 
-+	mutex_lock(&priv->mac_lock);
-+
- 	if (dpaa2_eth_has_mac(priv))
- 		dpaa2_mac_get_ethtool_stats(priv->mac, data + i);
-+
-+	mutex_unlock(&priv->mac_lock);
- }
- 
- static int dpaa2_eth_prep_eth_rule(struct ethhdr *eth_value, struct ethhdr *eth_mask,
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch b/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch
deleted file mode 100644
index 9d6f5c52dc..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0011-net-dpaa2-switch-serialize-changes-to-priv-mac-with.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From 80d12452a5f160c39d63efc1be07df36f9d07133 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:20 +0200
-Subject: [PATCH 13/14] net: dpaa2-switch: serialize changes to priv->mac with
- a mutex
-
-The dpaa2-switch driver uses a DPMAC in the same way as the dpaa2-eth
-driver, so we need to duplicate the locking solution established by the
-previous change to the switch driver as well.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- .../freescale/dpaa2/dpaa2-switch-ethtool.c    | 32 +++++++++++++++----
- .../ethernet/freescale/dpaa2/dpaa2-switch.c   | 31 ++++++++++++++++--
- .../ethernet/freescale/dpaa2/dpaa2-switch.h   |  2 ++
- 3 files changed, 55 insertions(+), 10 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch-ethtool.c
-@@ -60,11 +60,18 @@ dpaa2_switch_get_link_ksettings(struct n
- {
- 	struct ethsw_port_priv *port_priv = netdev_priv(netdev);
- 	struct dpsw_link_state state = {0};
--	int err = 0;
-+	int err;
- 
--	if (dpaa2_switch_port_is_type_phy(port_priv))
--		return phylink_ethtool_ksettings_get(port_priv->mac->phylink,
--						     link_ksettings);
-+	mutex_lock(&port_priv->mac_lock);
-+
-+	if (dpaa2_switch_port_is_type_phy(port_priv)) {
-+		err = phylink_ethtool_ksettings_get(port_priv->mac->phylink,
-+						    link_ksettings);
-+		mutex_unlock(&port_priv->mac_lock);
-+		return err;
-+	}
-+
-+	mutex_unlock(&port_priv->mac_lock);
- 
- 	err = dpsw_if_get_link_state(port_priv->ethsw_data->mc_io, 0,
- 				     port_priv->ethsw_data->dpsw_handle,
-@@ -99,9 +106,16 @@ dpaa2_switch_set_link_ksettings(struct n
- 	bool if_running;
- 	int err = 0, ret;
- 
--	if (dpaa2_switch_port_is_type_phy(port_priv))
--		return phylink_ethtool_ksettings_set(port_priv->mac->phylink,
--						     link_ksettings);
-+	mutex_lock(&port_priv->mac_lock);
-+
-+	if (dpaa2_switch_port_is_type_phy(port_priv)) {
-+		err = phylink_ethtool_ksettings_set(port_priv->mac->phylink,
-+						    link_ksettings);
-+		mutex_unlock(&port_priv->mac_lock);
-+		return err;
-+	}
-+
-+	mutex_unlock(&port_priv->mac_lock);
- 
- 	/* Interface needs to be down to change link settings */
- 	if_running = netif_running(netdev);
-@@ -189,8 +203,12 @@ static void dpaa2_switch_ethtool_get_sta
- 				   dpaa2_switch_ethtool_counters[i].name, err);
- 	}
- 
-+	mutex_lock(&port_priv->mac_lock);
-+
- 	if (dpaa2_switch_port_has_mac(port_priv))
- 		dpaa2_mac_get_ethtool_stats(port_priv->mac, data + i);
-+
-+	mutex_unlock(&port_priv->mac_lock);
- }
- 
- const struct ethtool_ops dpaa2_switch_port_ethtool_ops = {
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-@@ -603,8 +603,11 @@ static int dpaa2_switch_port_link_state_
- 
- 	/* When we manage the MAC/PHY using phylink there is no need
- 	 * to manually update the netif_carrier.
-+	 * We can avoid locking because we are called from the "link changed"
-+	 * IRQ handler, which is the same as the "endpoint changed" IRQ handler
-+	 * (the writer to port_priv->mac), so we cannot race with it.
- 	 */
--	if (dpaa2_switch_port_is_type_phy(port_priv))
-+	if (dpaa2_mac_is_type_phy(port_priv->mac))
- 		return 0;
- 
- 	/* Interrupts are received even though no one issued an 'ifconfig up'
-@@ -684,6 +687,8 @@ static int dpaa2_switch_port_open(struct
- 	struct ethsw_core *ethsw = port_priv->ethsw_data;
- 	int err;
- 
-+	mutex_lock(&port_priv->mac_lock);
-+
- 	if (!dpaa2_switch_port_is_type_phy(port_priv)) {
- 		/* Explicitly set carrier off, otherwise
- 		 * netif_carrier_ok() will return true and cause 'ip link show'
-@@ -697,6 +702,7 @@ static int dpaa2_switch_port_open(struct
- 			     port_priv->ethsw_data->dpsw_handle,
- 			     port_priv->idx);
- 	if (err) {
-+		mutex_unlock(&port_priv->mac_lock);
- 		netdev_err(netdev, "dpsw_if_enable err %d\n", err);
- 		return err;
- 	}
-@@ -706,6 +712,8 @@ static int dpaa2_switch_port_open(struct
- 	if (dpaa2_switch_port_is_type_phy(port_priv))
- 		dpaa2_mac_start(port_priv->mac);
- 
-+	mutex_unlock(&port_priv->mac_lock);
-+
- 	return 0;
- }
- 
-@@ -715,6 +723,8 @@ static int dpaa2_switch_port_stop(struct
- 	struct ethsw_core *ethsw = port_priv->ethsw_data;
- 	int err;
- 
-+	mutex_lock(&port_priv->mac_lock);
-+
- 	if (dpaa2_switch_port_is_type_phy(port_priv)) {
- 		dpaa2_mac_stop(port_priv->mac);
- 	} else {
-@@ -722,6 +732,8 @@ static int dpaa2_switch_port_stop(struct
- 		netif_carrier_off(netdev);
- 	}
- 
-+	mutex_unlock(&port_priv->mac_lock);
-+
- 	err = dpsw_if_disable(port_priv->ethsw_data->mc_io, 0,
- 			      port_priv->ethsw_data->dpsw_handle,
- 			      port_priv->idx);
-@@ -1461,7 +1473,9 @@ static int dpaa2_switch_port_connect_mac
- 		}
- 	}
- 
-+	mutex_lock(&port_priv->mac_lock);
- 	port_priv->mac = mac;
-+	mutex_unlock(&port_priv->mac_lock);
- 
- 	return 0;
- 
-@@ -1474,9 +1488,12 @@ err_free_mac:
- 
- static void dpaa2_switch_port_disconnect_mac(struct ethsw_port_priv *port_priv)
- {
--	struct dpaa2_mac *mac = port_priv->mac;
-+	struct dpaa2_mac *mac;
- 
-+	mutex_lock(&port_priv->mac_lock);
-+	mac = port_priv->mac;
- 	port_priv->mac = NULL;
-+	mutex_unlock(&port_priv->mac_lock);
- 
- 	if (!mac)
- 		return;
-@@ -1495,6 +1512,7 @@ static irqreturn_t dpaa2_switch_irq0_han
- 	struct ethsw_port_priv *port_priv;
- 	u32 status = ~0;
- 	int err, if_id;
-+	bool had_mac;
- 
- 	err = dpsw_get_irq_status(ethsw->mc_io, 0, ethsw->dpsw_handle,
- 				  DPSW_IRQ_INDEX_IF, &status);
-@@ -1513,7 +1531,12 @@ static irqreturn_t dpaa2_switch_irq0_han
- 
- 	if (status & DPSW_IRQ_EVENT_ENDPOINT_CHANGED) {
- 		rtnl_lock();
--		if (dpaa2_switch_port_has_mac(port_priv))
-+		/* We can avoid locking because the "endpoint changed" IRQ
-+		 * handler is the only one who changes priv->mac at runtime,
-+		 * so we are not racing with anyone.
-+		 */
-+		had_mac = !!port_priv->mac;
-+		if (had_mac)
- 			dpaa2_switch_port_disconnect_mac(port_priv);
- 		else
- 			dpaa2_switch_port_connect_mac(port_priv);
-@@ -3249,6 +3272,8 @@ static int dpaa2_switch_probe_port(struc
- 	port_priv->netdev = port_netdev;
- 	port_priv->ethsw_data = ethsw;
- 
-+	mutex_init(&port_priv->mac_lock);
-+
- 	port_priv->idx = port_idx;
- 	port_priv->stp_state = BR_STATE_FORWARDING;
- 
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.h
-@@ -161,6 +161,8 @@ struct ethsw_port_priv {
- 
- 	struct dpaa2_switch_filter_block *filter_block;
- 	struct dpaa2_mac	*mac;
-+	/* Protects against changes to port_priv->mac */
-+	struct mutex		mac_lock;
- };
- 
- /* Switch data */
diff --git a/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch b/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch
deleted file mode 100644
index 521c9d4a54..0000000000
--- a/target/linux/armsr/patches-6.1/701-v6.2-0012-net-dpaa2-mac-move-rtnl_lock-only-around-phylink.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 4ea2faf5bb13d9ba9f07e996d495c4cbe34a4236 Mon Sep 17 00:00:00 2001
-From: Vladimir Oltean <vladimir.oltean at nxp.com>
-Date: Tue, 29 Nov 2022 16:12:21 +0200
-Subject: [PATCH 14/14] net: dpaa2-mac: move rtnl_lock() only around
- phylink_{,dis}connect_phy()
-
-After the introduction of a private mac_lock that serializes access to
-priv->mac (and port_priv->mac in the switch), the only remaining purpose
-of rtnl_lock() is to satisfy the locking requirements of
-phylink_fwnode_phy_connect() and phylink_disconnect_phy().
-
-But the functions these live in, dpaa2_mac_connect() and
-dpaa2_mac_disconnect(), have contradictory locking requirements.
-While phylink_fwnode_phy_connect() wants rtnl_lock() to be held,
-phylink_create() wants it to not be held.
-
-Move the rtnl_lock() from top-level (in the dpaa2-eth and dpaa2-switch
-drivers) to only surround the phylink calls that require it, in the
-dpaa2-mac library code.
-
-This is possible because dpaa2_mac_connect() and dpaa2_mac_disconnect()
-run unlocked, and there isn't any danger of an AB/BA deadlock between
-the rtnl_mutex and other private locks.
-
-Signed-off-by: Vladimir Oltean <vladimir.oltean at nxp.com>
-Reviewed-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Tested-by: Ioana Ciornei <ioana.ciornei at nxp.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c    | 4 ----
- drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c    | 5 +++++
- drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c | 4 ----
- 3 files changed, 5 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
-@@ -4530,7 +4530,6 @@ static irqreturn_t dpni_irq0_handler_thr
- 		dpaa2_eth_set_mac_addr(netdev_priv(net_dev));
- 		dpaa2_eth_update_tx_fqids(priv);
- 
--		rtnl_lock();
- 		/* We can avoid locking because the "endpoint changed" IRQ
- 		 * handler is the only one who changes priv->mac at runtime,
- 		 * so we are not racing with anyone.
-@@ -4540,7 +4539,6 @@ static irqreturn_t dpni_irq0_handler_thr
- 			dpaa2_eth_disconnect_mac(priv);
- 		else
- 			dpaa2_eth_connect_mac(priv);
--		rtnl_unlock();
- 	}
- 
- 	return IRQ_HANDLED;
-@@ -4859,9 +4857,7 @@ static int dpaa2_eth_remove(struct fsl_m
- 	else
- 		fsl_mc_free_irqs(ls_dev);
- 
--	rtnl_lock();
- 	dpaa2_eth_disconnect_mac(priv);
--	rtnl_unlock();
- 	dpaa2_eth_free_rings(priv);
- 	free_percpu(priv->fd);
- 	free_percpu(priv->sgt_cache);
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c
-@@ -428,7 +428,9 @@ int dpaa2_mac_connect(struct dpaa2_mac *
- 	}
- 	mac->phylink = phylink;
- 
-+	rtnl_lock();
- 	err = phylink_fwnode_phy_connect(mac->phylink, dpmac_node, 0);
-+	rtnl_unlock();
- 	if (err) {
- 		netdev_err(net_dev, "phylink_fwnode_phy_connect() = %d\n", err);
- 		goto err_phylink_destroy;
-@@ -446,7 +448,10 @@ err_pcs_destroy:
- 
- void dpaa2_mac_disconnect(struct dpaa2_mac *mac)
- {
-+	rtnl_lock();
- 	phylink_disconnect_phy(mac->phylink);
-+	rtnl_unlock();
-+
- 	phylink_destroy(mac->phylink);
- 	dpaa2_pcs_destroy(mac);
- 	of_phy_put(mac->serdes_phy);
---- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
-@@ -1530,7 +1530,6 @@ static irqreturn_t dpaa2_switch_irq0_han
- 	}
- 
- 	if (status & DPSW_IRQ_EVENT_ENDPOINT_CHANGED) {
--		rtnl_lock();
- 		/* We can avoid locking because the "endpoint changed" IRQ
- 		 * handler is the only one who changes priv->mac at runtime,
- 		 * so we are not racing with anyone.
-@@ -1540,7 +1539,6 @@ static irqreturn_t dpaa2_switch_irq0_han
- 			dpaa2_switch_port_disconnect_mac(port_priv);
- 		else
- 			dpaa2_switch_port_connect_mac(port_priv);
--		rtnl_unlock();
- 	}
- 
- out:
-@@ -2951,9 +2949,7 @@ static void dpaa2_switch_remove_port(str
- {
- 	struct ethsw_port_priv *port_priv = ethsw->ports[port_idx];
- 
--	rtnl_lock();
- 	dpaa2_switch_port_disconnect_mac(port_priv);
--	rtnl_unlock();
- 	free_netdev(port_priv->netdev);
- 	ethsw->ports[port_idx] = NULL;
- }
diff --git a/target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch b/target/linux/armsr/patches-6.6/221-armsr-disable_gc_sections_armv7.patch
similarity index 89%
rename from target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch
rename to target/linux/armsr/patches-6.6/221-armsr-disable_gc_sections_armv7.patch
index 7c0b4b1920..c9dbdf2521 100644
--- a/target/linux/armsr/patches-6.1/221-armsr-disable_gc_sections_armv7.patch
+++ b/target/linux/armsr/patches-6.6/221-armsr-disable_gc_sections_armv7.patch
@@ -13,8 +13,8 @@ Signed-off-by: Mathew McBride <matt at traverse.com.au>
 
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -124,7 +124,6 @@ config ARM
- 	select HAVE_VIRT_CPU_ACCOUNTING_GEN
+@@ -128,7 +128,6 @@ config ARM
+ 	select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
  	select IRQ_FORCED_THREADING
  	select LOCK_MM_AND_FIND_VMA
 -	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION



From lede-commits at lists.infradead.org  Tue May  7 13:04:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 16:04:17 -0400
Subject: [openwrt/openwrt]  include/trusted-firmware-a.mk: allow overriding
 package install template
In-Reply-To: <171511225752.3073714.6441699676105188907@git-01.infra.openwrt.org>
References: <171511225752.3073714.6441699676105188907@git-01.infra.openwrt.org>
Message-ID: <mailman.34459.1715112266.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3cb8dc3786039d7d2a143fdbf5c3b9249f5bbbf3

commit 3cb8dc3786039d7d2a143fdbf5c3b9249f5bbbf3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 7 19:38:25 2024 +0200

    include/trusted-firmware-a.mk: allow overriding package install template
    
    Useful for special targets (e.g. RAM-only images)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/trusted-firmware-a.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk
index 0c0118e092..e469dae984 100644
--- a/include/trusted-firmware-a.mk
+++ b/include/trusted-firmware-a.mk
@@ -63,9 +63,11 @@ define Build/Trusted-Firmware-A/Target
     URL:=https://www.trustedfirmware.org/projects/tf-a/
   endef
 
-  define Package/trusted-firmware-a-$(1)/install
+  ifndef Package/trusted-firmware-a-$(1)/install
+    define Package/trusted-firmware-a-$(1)/install
 	$$(Package/trusted-firmware-a/install)
-  endef
+    endef
+  endif
 endef
 
 define Build/Configure/Trusted-Firmware-A



From lede-commits at lists.infradead.org  Tue May  7 13:04:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 16:04:18 -0400
Subject: [openwrt/openwrt]  arm-trusted-firmware-mediatek: add ram-download
 bl2 images
In-Reply-To: <171511225752.3073714.6441699676105188907@git-01.infra.openwrt.org>
References: <171511225752.3073714.6441699676105188907@git-01.infra.openwrt.org>
Message-ID: <mailman.34460.1715112266.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c9709d38cbcc1ece7d965b920721d5ef8256e9d3

commit c9709d38cbcc1ece7d965b920721d5ef8256e9d3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 7 19:40:43 2024 +0200

    arm-trusted-firmware-mediatek: add ram-download bl2 images
    
    Support for MT7981-MT7988. Can be used for mtk_uartboot recovery
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../boot/arm-trusted-firmware-mediatek/Makefile    | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile
index c065c7e67d..37d71e183c 100644
--- a/package/boot/arm-trusted-firmware-mediatek/Makefile
+++ b/package/boot/arm-trusted-firmware-mediatek/Makefile
@@ -33,6 +33,7 @@ define Trusted-Firmware-A/Default
   NAND_TYPE:=
   BOARD_QFN:=
   DRAM_USE_COMB:=
+  RAM_BOOT_UART_DL:=
   USE_UBI:=
 endef
 
@@ -113,6 +114,17 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
   DDR3_FLYBY:=1
 endef
 
+define Trusted-Firmware-A/mt7981-ram-ddr4
+  NAME:=MediaTek MT7981 (RAM, DDR4)
+  BOOT_DEVICE:=ram
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7981
+  DDR_TYPE:=ddr4
+  RAM_BOOT_UART_DL:=1
+  HIDDEN:=
+  DEFAULT:=TARGET_mediatek_filogic
+endef
+
 define Trusted-Firmware-A/mt7981-emmc-ddr4
   NAME:=MediaTek MT7981 (eMMC, DDR4)
   BOOT_DEVICE:=emmc
@@ -137,6 +149,17 @@ define Trusted-Firmware-A/mt7981-nor-ddr3
   DDR_TYPE:=ddr3
 endef
 
+define Trusted-Firmware-A/mt7981-ram-ddr3
+  NAME:=MediaTek MT7981 (RAM, DDR3)
+  BOOT_DEVICE:=ram
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7981
+  DDR_TYPE:=ddr3
+  RAM_BOOT_UART_DL:=1
+  HIDDEN:=
+  DEFAULT:=TARGET_mediatek_filogic
+endef
+
 define Trusted-Firmware-A/mt7981-emmc-ddr3
   NAME:=MediaTek MT7981 (eMMC, DDR3)
   BOOT_DEVICE:=emmc
@@ -169,6 +192,17 @@ define Trusted-Firmware-A/mt7981-spim-nand-ddr3
   DDR_TYPE:=ddr3
 endef
 
+define Trusted-Firmware-A/mt7986-ram-ddr4
+  NAME:=MediaTek MT7986 (RAM, DDR4)
+  BOOT_DEVICE:=ram
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7986
+  DDR_TYPE:=ddr4
+  RAM_BOOT_UART_DL:=1
+  HIDDEN:=
+  DEFAULT:=TARGET_mediatek_filogic
+endef
+
 define Trusted-Firmware-A/mt7986-nor-ddr4
   NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
   BOOT_DEVICE:=nor
@@ -229,6 +263,17 @@ define Trusted-Firmware-A/mt7986-spim-nand-4k-ddr4
   NAND_TYPE:=spim:4k+256
 endef
 
+define Trusted-Firmware-A/mt7986-ram-ddr3
+  NAME:=MediaTek MT7986 (RAM, DDR3)
+  BOOT_DEVICE:=ram
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7986
+  DDR_TYPE:=ddr3
+  RAM_BOOT_UART_DL:=1
+  HIDDEN:=
+  DEFAULT:=TARGET_mediatek_filogic
+endef
+
 define Trusted-Firmware-A/mt7986-nor-ddr3
   NAME:=MediaTek MT7986 (SPI-NOR, DDR3)
   BOOT_DEVICE:=nor
@@ -349,6 +394,17 @@ define Trusted-Firmware-A/mt7988-spim-nand-ddr4
   DDR_TYPE:=ddr4
 endef
 
+define Trusted-Firmware-A/mt7988-ram-comb
+  NAME:=MediaTek MT7988 (RAM)
+  BOOT_DEVICE:=ram
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7988
+  DRAM_USE_COMB:=1
+  RAM_BOOT_UART_DL:=1
+  HIDDEN:=
+  DEFAULT:=TARGET_mediatek_filogic
+endef
+
 define Trusted-Firmware-A/mt7988-nor-comb
   NAME:=MediaTek MT7988 (SPI-NOR)
   BOOT_DEVICE:=nor
@@ -418,18 +474,22 @@ TFA_TARGETS:= \
 	mt7622-emmc-2ddr \
 	mt7622-sdmmc-1ddr \
 	mt7622-sdmmc-2ddr \
+	mt7981-ram-ddr3 \
 	mt7981-emmc-ddr3 \
 	mt7981-nor-ddr3 \
 	mt7981-sdmmc-ddr3 \
 	mt7981-snand-ddr3 \
 	mt7981-spim-nand-ddr3 \
+	mt7981-ram-ddr4 \
 	mt7981-emmc-ddr4 \
 	mt7981-spim-nand-ddr4 \
+	mt7986-ram-ddr3 \
 	mt7986-emmc-ddr3 \
 	mt7986-nor-ddr3 \
 	mt7986-sdmmc-ddr3 \
 	mt7986-snand-ddr3 \
 	mt7986-spim-nand-ddr3 \
+	mt7986-ram-ddr4 \
 	mt7986-emmc-ddr4 \
 	mt7986-nor-ddr4 \
 	mt7986-sdmmc-ddr4 \
@@ -447,6 +507,7 @@ TFA_TARGETS:= \
 	mt7988-sdmmc-ddr4 \
 	mt7988-snand-ddr4 \
 	mt7988-spim-nand-ddr4 \
+	mt7988-ram-comb \
 	mt7988-emmc-comb \
 	mt7988-nor-comb \
 	mt7988-sdmmc-comb \
@@ -464,9 +525,20 @@ TFA_MAKE_FLAGS += \
 	HAVE_DRAM_OBJ_FILE=yes \
 	$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
 	$(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
+	$(if $(RAM_BOOT_UART_DL),RAM_BOOT_UART_DL=1) \
 	$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
 	all
 
+define Package/trusted-firmware-a-ram/install
+	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.bin $(BIN_DIR)/$(BUILD_VARIANT)-bl2.bin
+endef
+Package/trusted-firmware-a-mt7981-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
+Package/trusted-firmware-a-mt7981-ram-ddr4/install = $(Package/trusted-firmware-a-ram/install)
+Package/trusted-firmware-a-mt7986-ram-ddr3/install = $(Package/trusted-firmware-a-ram/install)
+Package/trusted-firmware-a-mt7986-ram-ddr4/install = $(Package/trusted-firmware-a-ram/install)
+Package/trusted-firmware-a-mt7988-ram-comb/install = $(Package/trusted-firmware-a-ram/install)
+
 define Package/trusted-firmware-a/install
 	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl2.img $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-bl2.img



From lede-commits at lists.infradead.org  Tue May  7 13:26:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 16:26:18 -0400
Subject: [openwrt/openwrt]  build: remove duplicate MAINTAINER from
 package-dumpinfo.mk
In-Reply-To: <171511357823.3137994.17485303493847051387@git-01.infra.openwrt.org>
References: <171511357823.3137994.17485303493847051387@git-01.infra.openwrt.org>
Message-ID: <mailman.34463.1715113582.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0d445dad9883fdc0383b37661f99fde8ebbaf9bc

commit 0d445dad9883fdc0383b37661f99fde8ebbaf9bc
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Wed Apr 17 15:15:28 2024 +0200

    build: remove duplicate MAINTAINER from package-dumpinfo.mk
    
    This is an artifact and is not needed. We have already set the
    information 'Maintainer:' in the '.packageinfo-*' files.
    
    Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 include/package-dumpinfo.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk
index fc25099ad3..e180c770e3 100644
--- a/include/package-dumpinfo.mk
+++ b/include/package-dumpinfo.mk
@@ -44,7 +44,6 @@ $(if $(KCONFIG),Kernel-Config: $(KCONFIG)
 )$(if $(BUILDONLY),Build-Only: $(BUILDONLY)
 )$(if $(HIDDEN),Hidden: $(HIDDEN)
 )Description: $(if $(Package/$(1)/description),$(Package/$(1)/description),$(TITLE))
-$(MAINTAINER)
 @@
 $(if $(Package/$(1)/config),Config:
 $(Package/$(1)/config)



From lede-commits at lists.infradead.org  Tue May  7 13:26:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 16:26:19 -0400
Subject: [openwrt/openwrt]  build: also generate the CycloneDX SBOM in
 imagebuilder
In-Reply-To: <171511357823.3137994.17485303493847051387@git-01.infra.openwrt.org>
References: <171511357823.3137994.17485303493847051387@git-01.infra.openwrt.org>
Message-ID: <mailman.34464.1715113584.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6d4feb87f19a5d46f7c677fc41e4ebd4f0ad4a6b

commit 6d4feb87f19a5d46f7c677fc41e4ebd4f0ad4a6b
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Wed Apr 24 13:39:33 2024 +0200

    build: also generate the CycloneDX SBOM in imagebuilder
    
    The needed file '.packageinfo' for creating the CycloneDX SBOM in the
    imagebuilder is available in the top directory of the imagebuilder and
    not in the tmp directory.
    
    For this reason, the creation of the CycloneDX SBOM file is not available
    for the imagebuilder.
    
    To fix this, it is now first checked whether the CycloneDX SBOM should be
    built at all and then second decided by checking the IB variable where the
    '.packageinfo' file is to be found.
    
    With this change, it is now possible to create the CycloneDX SBOM also for
    the imagebuilder as well.
    
    Signed-off-by: Florian Eckert <fe at dev.tdt.de>
---
 include/image.mk | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/include/image.mk b/include/image.mk
index b6b796dd97..284298e5ed 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -279,12 +279,11 @@ endef
 define Image/Manifest
 	$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
 		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
-ifndef IB
-	$(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
-		$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
-		$(TMP_DIR)/.packageinfo \
+ifneq ($(CONFIG_JSON_CYCLONEDX_SBOM),)
+	$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
+		$(if $(IB),$(TOPDIR)/.packageinfo, $(TMP_DIR)/.packageinfo) \
 		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
-		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
+		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json
 endif
 endef
 



From lede-commits at lists.infradead.org  Tue May  7 15:11:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 18:11:45 -0400
Subject: [openwrt/openwrt]  odhcpd: update to Git HEAD (2024-05-08)
In-Reply-To: <171511990561.3482872.14117221984343495454@git-01.infra.openwrt.org>
References: <171511990561.3482872.14117221984343495454@git-01.infra.openwrt.org>
Message-ID: <mailman.34533.1715119912.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/21ddd1164dc53b098ed36f8330c397e7de8076e6

commit 21ddd1164dc53b098ed36f8330c397e7de8076e6
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 8 00:11:19 2024 +0200

    odhcpd: update to Git HEAD (2024-05-08)
    
    99dd990690bc treewide: refactor pref(erred) to preferred_lt (lifetime)
    4c2b51eab368 treewide: refactor valid to valid_lt (lifetime)
    3b4e06055900 router: inherit user-assigned preferred_lifetime
    e164414aa184 router: limit prefix preferred_lt to valid_lt in accordance with RFC4861
    a2176af7bdeb treewide: spell-fixes and new comments for extra clarification
    4590efd3a2b3 treewide: normalize spaces to tabs
    2edc60cb7c7a router: rename minvalid to lowest_found_lifetime
    7ee72ee17bfa router: disambiguate and clarify 'no route' messages
    a29882318a4c config: set RFC defaults for preferred lifetime
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/services/odhcpd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile
index 55a24a90e5..4092588353 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
-PKG_MIRROR_HASH:=08fddf4294929d1713e0c3f7b258f8c7bf4abe731d5f34fceb797faa411f7a58
-PKG_SOURCE_DATE:=2023-10-24
-PKG_SOURCE_VERSION:=d8118f6e76e5519881f9a37137c3a06b3cb60fd2
+PKG_MIRROR_HASH:=f6e1c18551a00e01229fa12caa7b3fe33ad82785150fedcbe615fcc651ba2876
+PKG_SOURCE_DATE:=2024-05-08
+PKG_SOURCE_VERSION:=a29882318a4ccb3ae26f7cc0145e06ad4ead224b
 
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh at gmail.com>
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Tue May  7 18:13:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 21:13:05 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: bpi-r2: fix root= default cmdline
 parameter
In-Reply-To: <171513078558.4035340.5491767519716047643@git-01.infra.openwrt.org>
References: <171513078558.4035340.5491767519716047643@git-01.infra.openwrt.org>
Message-ID: <mailman.34594.1715130789.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/71e3e3b892ea91829750a44f3eca5ca91bd13b9f

commit 71e3e3b892ea91829750a44f3eca5ca91bd13b9f
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 16:03:22 2024 +0100

    uboot-mediatek: bpi-r2: fix root= default cmdline parameter
    
    With the switch from the uImage.FIT partition parser to fitblk the
    cmdline needs to be adjusted as well. Do this now as it has been
    forgotten when the switch was done.
    
    Fixes: 6368ed1ae5 ("mediatek: mt7623: phase out uImage.FIT partition parser")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-mediatek/patches/401-update-u7623-defconfig.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/uboot-mediatek/patches/401-update-u7623-defconfig.patch b/package/boot/uboot-mediatek/patches/401-update-u7623-defconfig.patch
index 6528b165f5..58c62dc3ef 100644
--- a/package/boot/uboot-mediatek/patches/401-update-u7623-defconfig.patch
+++ b/package/boot/uboot-mediatek/patches/401-update-u7623-defconfig.patch
@@ -186,7 +186,7 @@
 +reset_factory=eraseenv && reset
 +_init_env=setenv _init_env ; saveenv ; saveenv
 +_firstboot=setenv _firstboot ; run _switch_to_menu _update_bootdev _init_env boot_first
-+_update_bootdev=setenv _update_bootdev ; setenv bootargs "$console root=/dev/mmcblk0p65"
++_update_bootdev=setenv _update_bootdev ; setenv bootargs "$console root=/dev/fit0 rootwait"
 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title                [33m$ver[0m"
 --- a/arch/arm/dts/mt7623a-unielec-u7623-02-emmc.dts



From lede-commits at lists.infradead.org  Tue May  7 18:13:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 07 May 2024 21:13:06 -0400
Subject: [openwrt/openwrt]  generic: 6.1,
 6.6: replace Airoha EN8811H PHY driver with upstream
In-Reply-To: <171513078558.4035340.5491767519716047643@git-01.infra.openwrt.org>
References: <171513078558.4035340.5491767519716047643@git-01.infra.openwrt.org>
Message-ID: <mailman.34595.1715130793.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0d74b2a1e5f35d534fb5433ffcd85aa6b967cd47

commit 0d74b2a1e5f35d534fb5433ffcd85aa6b967cd47
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed May 8 01:48:14 2024 +0100

    generic: 6.1, 6.6: replace Airoha EN8811H PHY driver with upstream
    
    Backport driver from upcoming Linux 6.10 and put a pending fix on top
    to make sure the netdev trigger offloading behaves as expected.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...ernel.h-removed-REPEAT_BYTE-from-kernel.h.patch | 161 +++++
 ...ve-upper_-_bits-and-lower_-_bits-to-wordp.patch | 107 ++++
 ...en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch} | 663 +++++++++++----------
 ...-net-phy-air_en8811h-fix-some-error-codes.patch |  47 ++
 ....7-net-phy-amd-Support-the-Altima-AMI101L.patch |   4 +-
 ...ernel.h-removed-REPEAT_BYTE-from-kernel.h.patch | 161 +++++
 ...ve-upper_-_bits-and-lower_-_bits-to-wordp.patch | 107 ++++
 ...en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch} | 661 ++++++++++----------
 ...-net-phy-air_en8811h-fix-some-error-codes.patch |  47 ++
 ....7-net-phy-amd-Support-the-Altima-AMI101L.patch |   4 +-
 ..._en8811h-reset-netdev-rules-when-LED-is-s.patch |  45 ++
 ..._en8811h-reset-netdev-rules-when-LED-is-s.patch |  45 ++
 12 files changed, 1411 insertions(+), 641 deletions(-)

diff --git a/target/linux/generic/backport-6.1/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch b/target/linux/generic/backport-6.1/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch
new file mode 100644
index 0000000000..239adff1af
--- /dev/null
+++ b/target/linux/generic/backport-6.1/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch
@@ -0,0 +1,161 @@
+From 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f Mon Sep 17 00:00:00 2001
+From: Tanzir Hasan <tanzirh at google.com>
+Date: Tue, 26 Dec 2023 18:00:00 +0000
+Subject: [PATCH] kernel.h: removed REPEAT_BYTE from kernel.h
+
+This patch creates wordpart.h and includes it in asm/word-at-a-time.h
+for all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h
+because of REPEAT_BYTE. Moving this to another header and including it
+where necessary allows us to not include the bloated kernel.h. Making
+this implicit dependency on REPEAT_BYTE explicit allows for later
+improvements in the lib/string.c inclusion list.
+
+Suggested-by: Al Viro <viro at zeniv.linux.org.uk>
+Suggested-by: Andy Shevchenko <andy.shevchenko at gmail.com>
+Signed-off-by: Tanzir Hasan <tanzirh at google.com>
+Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
+Link: https://lore.kernel.org/r/20231226-libstringheader-v6-1-80aa08c7652c at google.com
+Signed-off-by: Kees Cook <keescook at chromium.org>
+---
+ arch/arm/include/asm/word-at-a-time.h     |  3 ++-
+ arch/arm64/include/asm/word-at-a-time.h   |  3 ++-
+ arch/powerpc/include/asm/word-at-a-time.h |  4 ++--
+ arch/riscv/include/asm/word-at-a-time.h   |  3 ++-
+ arch/s390/include/asm/word-at-a-time.h    |  3 ++-
+ arch/sh/include/asm/word-at-a-time.h      |  2 ++
+ arch/x86/include/asm/word-at-a-time.h     |  3 ++-
+ arch/x86/kvm/mmu/mmu.c                    |  1 +
+ fs/namei.c                                |  2 +-
+ include/asm-generic/word-at-a-time.h      |  3 ++-
+ include/linux/kernel.h                    |  8 --------
+ include/linux/wordpart.h                  | 13 +++++++++++++
+ 12 files changed, 31 insertions(+), 17 deletions(-)
+ create mode 100644 include/linux/wordpart.h
+
+--- a/arch/arm/include/asm/word-at-a-time.h
++++ b/arch/arm/include/asm/word-at-a-time.h
+@@ -8,7 +8,8 @@
+  * Little-endian word-at-a-time zero byte handling.
+  * Heavily based on the x86 algorithm.
+  */
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ struct word_at_a_time {
+ 	const unsigned long one_bits, high_bits;
+--- a/arch/arm64/include/asm/word-at-a-time.h
++++ b/arch/arm64/include/asm/word-at-a-time.h
+@@ -9,7 +9,8 @@
+ 
+ #ifndef __AARCH64EB__
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ struct word_at_a_time {
+ 	const unsigned long one_bits, high_bits;
+--- a/arch/powerpc/include/asm/word-at-a-time.h
++++ b/arch/powerpc/include/asm/word-at-a-time.h
+@@ -4,8 +4,8 @@
+ /*
+  * Word-at-a-time interfaces for PowerPC.
+  */
+-
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ #include <asm/asm-compat.h>
+ #include <asm/extable.h>
+ 
+--- a/arch/sh/include/asm/word-at-a-time.h
++++ b/arch/sh/include/asm/word-at-a-time.h
+@@ -5,6 +5,8 @@
+ #ifdef CONFIG_CPU_BIG_ENDIAN
+ # include <asm-generic/word-at-a-time.h>
+ #else
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ /*
+  * Little-endian version cribbed from x86.
+  */
+--- a/arch/x86/include/asm/word-at-a-time.h
++++ b/arch/x86/include/asm/word-at-a-time.h
+@@ -2,7 +2,8 @@
+ #ifndef _ASM_WORD_AT_A_TIME_H
+ #define _ASM_WORD_AT_A_TIME_H
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ /*
+  * This is largely generic for little-endian machines, but the
+--- a/arch/x86/kvm/mmu/mmu.c
++++ b/arch/x86/kvm/mmu/mmu.c
+@@ -44,6 +44,7 @@
+ #include <linux/kern_levels.h>
+ #include <linux/kstrtox.h>
+ #include <linux/kthread.h>
++#include <linux/wordpart.h>
+ 
+ #include <asm/page.h>
+ #include <asm/memtype.h>
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -17,8 +17,8 @@
+ 
+ #include <linux/init.h>
+ #include <linux/export.h>
+-#include <linux/kernel.h>
+ #include <linux/slab.h>
++#include <linux/wordpart.h>
+ #include <linux/fs.h>
+ #include <linux/namei.h>
+ #include <linux/pagemap.h>
+--- a/include/asm-generic/word-at-a-time.h
++++ b/include/asm-generic/word-at-a-time.h
+@@ -2,7 +2,8 @@
+ #ifndef _ASM_WORD_AT_A_TIME_H
+ #define _ASM_WORD_AT_A_TIME_H
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ #include <asm/byteorder.h>
+ 
+ #ifdef __BIG_ENDIAN
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -36,14 +36,6 @@
+ 
+ #define STACK_MAGIC	0xdeadbeef
+ 
+-/**
+- * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
+- * @x: value to repeat
+- *
+- * NOTE: @x is not checked for > 0xff; larger values produce odd results.
+- */
+-#define REPEAT_BYTE(x)	((~0ul / 0xff) * (x))
+-
+ /* generic data direction definitions */
+ #define READ			0
+ #define WRITE			1
+--- /dev/null
++++ b/include/linux/wordpart.h
+@@ -0,0 +1,13 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++#ifndef _LINUX_WORDPART_H
++#define _LINUX_WORDPART_H
++/**
++ * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
++ * @x: value to repeat
++ *
++ * NOTE: @x is not checked for > 0xff; larger values produce odd results.
++ */
++#define REPEAT_BYTE(x)	((~0ul / 0xff) * (x))
++
++#endif // _LINUX_WORDPART_H
diff --git a/target/linux/generic/backport-6.1/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch b/target/linux/generic/backport-6.1/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch
new file mode 100644
index 0000000000..9bbd515852
--- /dev/null
+++ b/target/linux/generic/backport-6.1/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch
@@ -0,0 +1,107 @@
+From adeb04362d74188c1e22ccb824b15a0a7b3de2f4 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
+Date: Wed, 14 Feb 2024 19:26:32 +0200
+Subject: [PATCH] kernel.h: Move upper_*_bits() and lower_*_bits() to
+ wordpart.h
+
+The wordpart.h header is collecting APIs related to the handling
+parts of the word (usually in byte granularity). The upper_*_bits()
+and lower_*_bits() are good candidates to be moved to there.
+
+This helps to clean up header dependency hell with regard to kernel.h
+as the latter gathers completely unrelated stuff together and slows
+down compilation (especially when it's included into other header).
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
+Link: https://lore.kernel.org/r/20240214172752.3605073-1-andriy.shevchenko at linux.intel.com
+Reviewed-by: Randy Dunlap <rdunlap at infradead.org>
+Signed-off-by: Kees Cook <keescook at chromium.org>
+---
+ include/linux/kernel.h   | 30 ++----------------------------
+ include/linux/wordpart.h | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 31 insertions(+), 28 deletions(-)
+
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -30,6 +30,8 @@
+ #include <linux/build_bug.h>
+ #include <linux/static_call_types.h>
+ #include <linux/instruction_pointer.h>
++#include <linux/wordpart.h>
++
+ #include <asm/byteorder.h>
+ 
+ #include <uapi/linux/kernel.h>
+@@ -55,34 +57,6 @@
+ }					\
+ )
+ 
+-/**
+- * upper_32_bits - return bits 32-63 of a number
+- * @n: the number we're accessing
+- *
+- * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
+- * the "right shift count >= width of type" warning when that quantity is
+- * 32-bits.
+- */
+-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+-
+-/**
+- * lower_32_bits - return bits 0-31 of a number
+- * @n: the number we're accessing
+- */
+-#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
+-
+-/**
+- * upper_16_bits - return bits 16-31 of a number
+- * @n: the number we're accessing
+- */
+-#define upper_16_bits(n) ((u16)((n) >> 16))
+-
+-/**
+- * lower_16_bits - return bits 0-15 of a number
+- * @n: the number we're accessing
+- */
+-#define lower_16_bits(n) ((u16)((n) & 0xffff))
+-
+ struct completion;
+ struct user;
+ 
+--- a/include/linux/wordpart.h
++++ b/include/linux/wordpart.h
+@@ -2,6 +2,35 @@
+ 
+ #ifndef _LINUX_WORDPART_H
+ #define _LINUX_WORDPART_H
++
++/**
++ * upper_32_bits - return bits 32-63 of a number
++ * @n: the number we're accessing
++ *
++ * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
++ * the "right shift count >= width of type" warning when that quantity is
++ * 32-bits.
++ */
++#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
++
++/**
++ * lower_32_bits - return bits 0-31 of a number
++ * @n: the number we're accessing
++ */
++#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
++
++/**
++ * upper_16_bits - return bits 16-31 of a number
++ * @n: the number we're accessing
++ */
++#define upper_16_bits(n) ((u16)((n) >> 16))
++
++/**
++ * lower_16_bits - return bits 0-15 of a number
++ * @n: the number we're accessing
++ */
++#define lower_16_bits(n) ((u16)((n) & 0xffff))
++
+ /**
+  * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
+  * @x: value to repeat
diff --git a/target/linux/generic/pending-6.1/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch b/target/linux/generic/backport-6.1/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
similarity index 61%
rename from target/linux/generic/pending-6.1/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch
rename to target/linux/generic/backport-6.1/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
index 1dfa1366eb..7f963b3cf6 100644
--- a/target/linux/generic/pending-6.1/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch
+++ b/target/linux/generic/backport-6.1/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
@@ -1,88 +1,33 @@
-From patchwork Tue Feb  6 19:47:51 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Eric Woudstra <ericwouds at gmail.com>
-X-Patchwork-Id: 13547762
-X-Patchwork-Delegate: kuba at kernel.org
+From 71e79430117d56c409c5ea485a263bc0d8083390 Mon Sep 17 00:00:00 2001
 From: Eric Woudstra <ericwouds at gmail.com>
-To: "David S. Miller" <davem at davemloft.net>,
-	Eric Dumazet <edumazet at google.com>,
-	Jakub Kicinski <kuba at kernel.org>,
-	Paolo Abeni <pabeni at redhat.com>,
-	Rob Herring <robh+dt at kernel.org>,
-	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
-	Conor Dooley <conor+dt at kernel.org>,
-	Andrew Lunn <andrew at lunn.ch>,
-	Heiner Kallweit <hkallweit1 at gmail.com>,
-	Russell King <linux at armlinux.org.uk>,
-	Matthias Brugger <matthias.bgg at gmail.com>,
-	AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>,
-	"Frank Wunderlich" <frank-w at public-files.de>,
-	Daniel Golle <daniel at makrotopia.org>,
-	Lucien Jheng  <lucien.jheng at airoha.com>,
-	Zhi-Jun You <hujy652 at protonmail.com>
-Cc: netdev at vger.kernel.org,
-	devicetree at vger.kernel.org,
-	Eric Woudstra <ericwouds at gmail.com>
-Subject: [PATCH net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H
- PHY driver
-Date: Tue,  6 Feb 2024 20:47:51 +0100
-Message-ID: <20240206194751.1901802-3-ericwouds at gmail.com>
-X-Mailer: git-send-email 2.42.1
-In-Reply-To: <20240206194751.1901802-1-ericwouds at gmail.com>
-References: <20240206194751.1901802-1-ericwouds at gmail.com>
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-X-Patchwork-Delegate: kuba at kernel.org
+Date: Tue, 26 Mar 2024 17:23:05 +0100
+Subject: [PATCH] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
 
-* Source originated from airoha's en8811h v1.2.1 driver
- * Moved air_en8811h.h to air_en8811h.c
- * Removed air_pbus_reg_write() as it writes to another device on mdio-bus
- * Load firmware from /lib/firmware/airoha/ instead of /lib/firmware/
- * Added .get_rate_matching()
- * Use generic phy_read/write() and phy_read/write_mmd()
- * Edited .get_features() to use generic C45 functions
- * Edited .config_aneg() and .read_status() to use a mix of generic C22/C45
- * Use led handling functions from mediatek-ge-soc.c
- * Simplified led handling by storing led rules
- * Cleanup macro definitions
- * Cleanup code to pass checkpatch.pl
- * General code cleanup
+Add the driver for the Airoha EN8811H 2.5 Gigabit PHY. The phy supports
+100/1000/2500 Mbps with auto negotiation only.
 
-Changes from original RFC patch:
+The driver uses two firmware files, for which updated versions are added to
+linux-firmware already.
 
- * Use the correct order in Kconfig and Makefile
- * Change some register naming to correspond with datasheet
- * Use phy_driver .read_page() and .write_page()
- * Use module_phy_driver()
- * Use get_unaligned_le16() instead of macro
- * In .config_aneg() and .read_status() use genphy_xxx() C22
- * Use another vendor register to read real speed
- * Load firmware only once and store firmware version
- * Apply 2.5G LPA work-around (firmware before 24011202)
- * Read 2.5G LPA from vendor register (firmware 24011202 and later)
-
-Changes to be committed:
-	modified:   drivers/net/phy/Kconfig
-	modified:   drivers/net/phy/Makefile
-	new file:   drivers/net/phy/air_en8811h.c
+Note: At phy-address + 8 there is another device on the mdio bus, that
+belongs to the EN881H. While the original driver writes to it, Airoha
+has confirmed this is not needed. Therefore, communication with this
+device is not included in this driver.
 
 Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240326162305.303598-3-ericwouds at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 ---
  drivers/net/phy/Kconfig       |    5 +
  drivers/net/phy/Makefile      |    1 +
- drivers/net/phy/air_en8811h.c | 1006 +++++++++++++++++++++++++++++++++
- 3 files changed, 1012 insertions(+)
+ drivers/net/phy/air_en8811h.c | 1086 +++++++++++++++++++++++++++++++++
+ 3 files changed, 1092 insertions(+)
  create mode 100644 drivers/net/phy/air_en8811h.c
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -69,6 +69,11 @@ config SFP
+@@ -63,6 +63,11 @@ config SFP
  
  comment "MII PHY device drivers"
  
@@ -92,7 +37,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	  Currently supports the Airoha EN8811H PHY.
 +
  config AMD_PHY
- 	tristate "AMD and Altima PHYs"
+ 	tristate "AMD PHYs"
  	help
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
@@ -106,12 +51,10 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
  obj-$(CONFIG_AX88796B_PHY)	+= ax88796b.o
 --- /dev/null
 +++ b/drivers/net/phy/air_en8811h.c
-@@ -0,0 +1,1006 @@
+@@ -0,0 +1,1086 @@
 +// SPDX-License-Identifier: GPL-2.0+
 +/*
-+ * Driver for Airoha Ethernet PHYs
-+ *
-+ * Currently supporting the EN8811H.
++ * Driver for the Airoha EN8811H 2.5 Gigabit PHY.
 + *
 + * Limitations of the EN8811H:
 + * - Only full duplex supported
@@ -125,6 +68,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#include <linux/phy.h>
 +#include <linux/firmware.h>
 +#include <linux/property.h>
++#include <linux/wordpart.h>
 +#include <asm/unaligned.h>
 +
 +#define EN8811H_PHY_ID		0x03a2a411
@@ -135,12 +79,8 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define AIR_FW_ADDR_DM	0x00000000
 +#define AIR_FW_ADDR_DSP	0x00100000
 +
-+/* u32 (DWORD) component macros */
-+#define LOWORD(d) ((u16)(u32)(d))
-+#define HIWORD(d) ((u16)(((u32)(d)) >> 16))
-+
 +/* MII Registers */
-+#define AIR_AUX_CTRL_STATUS	0x1d
++#define AIR_AUX_CTRL_STATUS		0x1d
 +#define   AIR_AUX_CTRL_STATUS_SPEED_MASK	GENMASK(4, 2)
 +#define   AIR_AUX_CTRL_STATUS_SPEED_100		0x4
 +#define   AIR_AUX_CTRL_STATUS_SPEED_1000	0x8
@@ -151,32 +91,32 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define   AIR_PHY_PAGE_EXTENDED_4		0x0004
 +
 +/* MII Registers Page 4*/
-+#define AIR_PBUS_MODE			0x10
-+#define   AIR_PBUS_MODE_ADDR_FIXED		0x0000
-+#define   AIR_PBUS_MODE_ADDR_INCR		BIT(15)
-+#define AIR_PBUS_WR_ADDR_HIGH		0x11
-+#define AIR_PBUS_WR_ADDR_LOW		0x12
-+#define AIR_PBUS_WR_DATA_HIGH		0x13
-+#define AIR_PBUS_WR_DATA_LOW		0x14
-+#define AIR_PBUS_RD_ADDR_HIGH		0x15
-+#define AIR_PBUS_RD_ADDR_LOW		0x16
-+#define AIR_PBUS_RD_DATA_HIGH		0x17
-+#define AIR_PBUS_RD_DATA_LOW		0x18
++#define AIR_BPBUS_MODE			0x10
++#define   AIR_BPBUS_MODE_ADDR_FIXED		0x0000
++#define   AIR_BPBUS_MODE_ADDR_INCR		BIT(15)
++#define AIR_BPBUS_WR_ADDR_HIGH		0x11
++#define AIR_BPBUS_WR_ADDR_LOW		0x12
++#define AIR_BPBUS_WR_DATA_HIGH		0x13
++#define AIR_BPBUS_WR_DATA_LOW		0x14
++#define AIR_BPBUS_RD_ADDR_HIGH		0x15
++#define AIR_BPBUS_RD_ADDR_LOW		0x16
++#define AIR_BPBUS_RD_DATA_HIGH		0x17
++#define AIR_BPBUS_RD_DATA_LOW		0x18
 +
 +/* Registers on MDIO_MMD_VEND1 */
 +#define EN8811H_PHY_FW_STATUS		0x8009
 +#define   EN8811H_PHY_READY			0x02
 +
-+#define AIR_PHY_HOST_CMD_1		0x800c
-+#define AIR_PHY_HOST_CMD_1_MODE1		0x0
-+#define AIR_PHY_HOST_CMD_2		0x800d
-+#define AIR_PHY_HOST_CMD_2_MODE1		0x0
-+#define AIR_PHY_HOST_CMD_3		0x800e
-+#define AIR_PHY_HOST_CMD_3_MODE1		0x1101
-+#define AIR_PHY_HOST_CMD_3_DOCMD		0x1100
-+#define AIR_PHY_HOST_CMD_4		0x800f
-+#define AIR_PHY_HOST_CMD_4_MODE1		0x0002
-+#define AIR_PHY_HOST_CMD_4_INTCLR		0x00e4
++#define AIR_PHY_MCU_CMD_1		0x800c
++#define AIR_PHY_MCU_CMD_1_MODE1			0x0
++#define AIR_PHY_MCU_CMD_2		0x800d
++#define AIR_PHY_MCU_CMD_2_MODE1			0x0
++#define AIR_PHY_MCU_CMD_3		0x800e
++#define AIR_PHY_MCU_CMD_3_MODE1			0x1101
++#define AIR_PHY_MCU_CMD_3_DOCMD			0x1100
++#define AIR_PHY_MCU_CMD_4		0x800f
++#define AIR_PHY_MCU_CMD_4_MODE1			0x0002
++#define AIR_PHY_MCU_CMD_4_INTCLR		0x00e4
 +
 +/* Registers on MDIO_MMD_VEND2 */
 +#define AIR_PHY_LED_BCR			0x021
@@ -235,28 +175,21 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define EN8811H_FW_CTRL_2		0x800000
 +#define EN8811H_FW_CTRL_2_LOADING		BIT(11)
 +
++/* Led definitions */
 +#define EN8811H_LED_COUNT	3
 +
-+/* GPIO5  <-> BASE_T_LED0
-+ * GPIO4  <-> BASE_T_LED1
-+ * GPIO3  <-> BASE_T_LED2
-+ *
-+ * Default setup suitable for 2 leds connected:
-+ *    100M link up triggers led0, only led0 blinking on traffic
-+ *   1000M link up triggers led1, only led1 blinking on traffic
-+ *   2500M link up triggers led0 and led1, both blinking on traffic
-+ * Also suitable for 1 led connected:
-+ *     any link up triggers led2
++/* Default LED setup:
++ * GPIO5 <-> LED0  On: Link detected, blink Rx/Tx
++ * GPIO4 <-> LED1  On: Link detected at 2500 or 1000 Mbps
++ * GPIO3 <-> LED2  On: Link detected at 2500 or  100 Mbps
 + */
-+#define AIR_DEFAULT_TRIGGER_LED0 (BIT(TRIGGER_NETDEV_LINK_2500) | \
-+				  BIT(TRIGGER_NETDEV_LINK_100)  | \
++#define AIR_DEFAULT_TRIGGER_LED0 (BIT(TRIGGER_NETDEV_LINK)      | \
 +				  BIT(TRIGGER_NETDEV_RX)        | \
 +				  BIT(TRIGGER_NETDEV_TX))
 +#define AIR_DEFAULT_TRIGGER_LED1 (BIT(TRIGGER_NETDEV_LINK_2500) | \
-+				  BIT(TRIGGER_NETDEV_LINK_1000) | \
-+				  BIT(TRIGGER_NETDEV_RX)        | \
-+				  BIT(TRIGGER_NETDEV_TX))
-+#define AIR_DEFAULT_TRIGGER_LED2  BIT(TRIGGER_NETDEV_LINK)
++				  BIT(TRIGGER_NETDEV_LINK_1000))
++#define AIR_DEFAULT_TRIGGER_LED2 (BIT(TRIGGER_NETDEV_LINK_2500) | \
++				  BIT(TRIGGER_NETDEV_LINK_100))
 +
 +struct led {
 +	unsigned long rules;
@@ -265,6 +198,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +
 +struct en8811h_priv {
 +	u32		firmware_version;
++	bool		mcu_needs_restart;
 +	struct led	led[EN8811H_LED_COUNT];
 +};
 +
@@ -274,12 +208,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +};
 +
 +enum {
-+	AIR_PHY_LED_DUR_BLINK_32M,
-+	AIR_PHY_LED_DUR_BLINK_64M,
-+	AIR_PHY_LED_DUR_BLINK_128M,
-+	AIR_PHY_LED_DUR_BLINK_256M,
-+	AIR_PHY_LED_DUR_BLINK_512M,
-+	AIR_PHY_LED_DUR_BLINK_1024M,
++	AIR_PHY_LED_DUR_BLINK_32MS,
++	AIR_PHY_LED_DUR_BLINK_64MS,
++	AIR_PHY_LED_DUR_BLINK_128MS,
++	AIR_PHY_LED_DUR_BLINK_256MS,
++	AIR_PHY_LED_DUR_BLINK_512MS,
++	AIR_PHY_LED_DUR_BLINK_1024MS,
 +};
 +
 +enum {
@@ -298,16 +232,16 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +};
 +
 +#define AIR_PHY_LED_DUR_UNIT	1024
-+#define AIR_PHY_LED_DUR (AIR_PHY_LED_DUR_UNIT << AIR_PHY_LED_DUR_BLINK_64M)
++#define AIR_PHY_LED_DUR (AIR_PHY_LED_DUR_UNIT << AIR_PHY_LED_DUR_BLINK_64MS)
 +
-+static const unsigned long en8811h_led_trig = (BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
-+					       BIT(TRIGGER_NETDEV_LINK)        |
-+					       BIT(TRIGGER_NETDEV_LINK_10)     |
-+					       BIT(TRIGGER_NETDEV_LINK_100)    |
-+					       BIT(TRIGGER_NETDEV_LINK_1000)   |
-+					       BIT(TRIGGER_NETDEV_LINK_2500)   |
-+					       BIT(TRIGGER_NETDEV_RX)          |
-+					       BIT(TRIGGER_NETDEV_TX));
++static const unsigned long en8811h_led_trig = BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
++					      BIT(TRIGGER_NETDEV_LINK)        |
++					      BIT(TRIGGER_NETDEV_LINK_10)     |
++					      BIT(TRIGGER_NETDEV_LINK_100)    |
++					      BIT(TRIGGER_NETDEV_LINK_1000)   |
++					      BIT(TRIGGER_NETDEV_LINK_2500)   |
++					      BIT(TRIGGER_NETDEV_RX)          |
++					      BIT(TRIGGER_NETDEV_TX);
 +
 +static int air_phy_read_page(struct phy_device *phydev)
 +{
@@ -324,23 +258,27 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	int ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_FIXED);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_HIGH, HIWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_LOW,  LOWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_DATA_HIGH, HIWORD(pbus_data));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH,
++			  upper_16_bits(pbus_data));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_DATA_LOW,  LOWORD(pbus_data));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW,
++			  lower_16_bits(pbus_data));
 +	if (ret < 0)
 +		return ret;
 +
@@ -350,17 +288,20 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_buckpbus_reg_write(struct phy_device *phydev,
 +				  u32 pbus_address, u32 pbus_data)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_buckpbus_reg_write(phydev, pbus_address, pbus_data);
-+	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   pbus_address, ret);
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_write(phydev, pbus_address,
++					       pbus_data);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
-+;
 +}
 +
 +static int __air_buckpbus_reg_read(struct phy_device *phydev,
@@ -369,41 +310,122 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	int pbus_data_low, pbus_data_high;
 +	int ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_FIXED);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_RD_ADDR_HIGH, HIWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_RD_ADDR_LOW,  LOWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_LOW,
++			  lower_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	pbus_data_high = __phy_read(phydev, AIR_PBUS_RD_DATA_HIGH);
++	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
 +	if (pbus_data_high < 0)
 +		return ret;
 +
-+	pbus_data_low = __phy_read(phydev, AIR_PBUS_RD_DATA_LOW);
++	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
 +	if (pbus_data_low < 0)
 +		return ret;
 +
-+	*pbus_data = (u16)pbus_data_low | ((u32)(u16)pbus_data_high << 16);
++	*pbus_data = pbus_data_low | (pbus_data_high << 16);
 +	return 0;
 +}
 +
 +static int air_buckpbus_reg_read(struct phy_device *phydev,
 +				 u32 pbus_address, u32 *pbus_data)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_buckpbus_reg_read(phydev, pbus_address, pbus_data);
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_read(phydev, pbus_address, pbus_data);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
++
++	return phy_restore_page(phydev, saved_page, ret);
++}
++
++static int __air_buckpbus_reg_modify(struct phy_device *phydev,
++				     u32 pbus_address, u32 mask, u32 set)
++{
++	int pbus_data_low, pbus_data_high;
++	u32 pbus_data_old, pbus_data_new;
++	int ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_LOW,
++			  lower_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
++	if (pbus_data_high < 0)
++		return ret;
++
++	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
++	if (pbus_data_low < 0)
++		return ret;
++
++	pbus_data_old = pbus_data_low | (pbus_data_high << 16);
++	pbus_data_new = (pbus_data_old & ~mask) | set;
++	if (pbus_data_new == pbus_data_old)
++		return 0;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   pbus_address, ret);
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH,
++			  upper_16_bits(pbus_data_new));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW,
++			  lower_16_bits(pbus_data_new));
++	if (ret < 0)
++		return ret;
++
++	return 0;
++}
++
++static int air_buckpbus_reg_modify(struct phy_device *phydev,
++				   u32 pbus_address, u32 mask, u32 set)
++{
++	int saved_page;
++	int ret = 0;
++
++	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
++
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_modify(phydev, pbus_address, mask,
++						set);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
 +}
@@ -415,26 +437,28 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	int ret;
 +	u16 val;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_INCR);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_INCR);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_HIGH, HIWORD(address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_LOW,  LOWORD(address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(address));
 +	if (ret < 0)
 +		return ret;
 +
 +	for (offset = 0; offset < fw->size; offset += 4) {
 +		val = get_unaligned_le16(&fw->data[offset + 2]);
-+		ret = __phy_write(phydev, AIR_PBUS_WR_DATA_HIGH, val);
++		ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH, val);
 +		if (ret < 0)
 +			return ret;
 +
 +		val = get_unaligned_le16(&fw->data[offset]);
-+		ret = __phy_write(phydev, AIR_PBUS_WR_DATA_LOW, val);
++		ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW, val);
 +		if (ret < 0)
 +			return ret;
 +	}
@@ -445,23 +469,43 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_write_buf(struct phy_device *phydev, u32 address,
 +			 const struct firmware *fw)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_write_buf(phydev, address, fw);
-+	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   address, ret);
++	if (saved_page >= 0) {
++		ret = __air_write_buf(phydev, address, fw);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
 +}
 +
++static int en8811h_wait_mcu_ready(struct phy_device *phydev)
++{
++	int ret, reg_value;
++
++	/* Because of mdio-lock, may have to wait for multiple loads */
++	ret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
++					EN8811H_PHY_FW_STATUS, reg_value,
++					reg_value == EN8811H_PHY_READY,
++					20000, 7500000, true);
++	if (ret) {
++		phydev_err(phydev, "MCU not ready: 0x%x\n", reg_value);
++		return -ENODEV;
++	}
++
++	return 0;
++}
++
 +static int en8811h_load_firmware(struct phy_device *phydev)
 +{
++	struct en8811h_priv *priv = phydev->priv;
 +	struct device *dev = &phydev->mdio.dev;
 +	const struct firmware *fw1, *fw2;
-+	u32 pbus_value;
 +	int ret;
 +
 +	ret = request_firmware_direct(&fw1, EN8811H_MD32_DM, dev);
@@ -477,11 +521,9 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_CTRL_2, &pbus_value);
-+	if (ret < 0)
-+		goto en8811h_load_firmware_out;
-+	pbus_value |= EN8811H_FW_CTRL_2_LOADING;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_2, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_FW_CTRL_2,
++				      EN8811H_FW_CTRL_2_LOADING,
++				      EN8811H_FW_CTRL_2_LOADING);
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
@@ -493,11 +535,8 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_CTRL_2, &pbus_value);
-+	if (ret < 0)
-+		goto en8811h_load_firmware_out;
-+	pbus_value &= ~EN8811H_FW_CTRL_2_LOADING;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_2, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_FW_CTRL_2,
++				      EN8811H_FW_CTRL_2_LOADING, 0);
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
@@ -506,7 +545,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = 0;
++	ret = en8811h_wait_mcu_ready(phydev);
++
++	air_buckpbus_reg_read(phydev, EN8811H_FW_VERSION,
++			      &priv->firmware_version);
++	phydev_info(phydev, "MD32 firmware version: %08x\n",
++		    priv->firmware_version);
 +
 +en8811h_load_firmware_out:
 +	release_firmware(fw2);
@@ -520,7 +564,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	return ret;
 +}
 +
-+static int en8811h_restart_host(struct phy_device *phydev)
++static int en8811h_restart_mcu(struct phy_device *phydev)
 +{
 +	int ret;
 +
@@ -529,8 +573,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		return ret;
 +
-+	return air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_1,
++	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_1,
 +				     EN8811H_FW_CTRL_1_FINISH);
++	if (ret < 0)
++		return ret;
++
++	return en8811h_wait_mcu_ready(phydev);
 +}
 +
 +static int air_hw_led_on_set(struct phy_device *phydev, u8 index, bool on)
@@ -664,68 +712,46 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	u16 on = 0, blink = 0;
 +	int ret;
 +
-+	priv->led[index].rules = rules;
-+
 +	if (index >= EN8811H_LED_COUNT)
 +		return -EINVAL;
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_10)   | BIT(TRIGGER_NETDEV_LINK))) {
++	priv->led[index].rules = rules;
++
++	if (rules & BIT(TRIGGER_NETDEV_FULL_DUPLEX))
++		on |= AIR_PHY_LED_ON_FDX;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_10) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK10;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_10RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_10TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_100)  | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_100) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK100;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_100RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_100TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_1000) | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_1000) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK1000;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_1000RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_1000TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_2500) | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_2500) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK2500;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_2500RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_2500TX;
-+	}
 +
-+	if (on == 0) {
-+		if (rules & BIT(TRIGGER_NETDEV_RX)) {
-+			blink |= AIR_PHY_LED_BLINK_10RX   |
-+				 AIR_PHY_LED_BLINK_100RX  |
-+				 AIR_PHY_LED_BLINK_1000RX |
-+				 AIR_PHY_LED_BLINK_2500RX;
-+		}
-+		if (rules & BIT(TRIGGER_NETDEV_TX)) {
-+			blink |= AIR_PHY_LED_BLINK_10TX   |
-+				 AIR_PHY_LED_BLINK_100TX  |
-+				 AIR_PHY_LED_BLINK_1000TX |
-+				 AIR_PHY_LED_BLINK_2500TX;
-+		}
++	if (rules & BIT(TRIGGER_NETDEV_RX)) {
++		blink |= AIR_PHY_LED_BLINK_10RX   |
++			 AIR_PHY_LED_BLINK_100RX  |
++			 AIR_PHY_LED_BLINK_1000RX |
++			 AIR_PHY_LED_BLINK_2500RX;
 +	}
 +
-+	if (rules & BIT(TRIGGER_NETDEV_FULL_DUPLEX))
-+		on |= AIR_PHY_LED_ON_FDX;
-+
-+	if (rules & BIT(TRIGGER_NETDEV_HALF_DUPLEX))
-+		on |= AIR_PHY_LED_ON_HDX;
++	if (rules & BIT(TRIGGER_NETDEV_TX)) {
++		blink |= AIR_PHY_LED_BLINK_10TX   |
++			 AIR_PHY_LED_BLINK_100TX  |
++			 AIR_PHY_LED_BLINK_1000TX |
++			 AIR_PHY_LED_BLINK_2500TX;
++	}
 +
 +	if (blink || on) {
 +		/* switch hw-control on, so led-on and led-blink are off */
-+		clear_bit(AIR_PHY_LED_STATE_FORCE_ON, &priv->led[index].state);
-+		clear_bit(AIR_PHY_LED_STATE_FORCE_BLINK, &priv->led[index].state);
++		clear_bit(AIR_PHY_LED_STATE_FORCE_ON,
++			  &priv->led[index].state);
++		clear_bit(AIR_PHY_LED_STATE_FORCE_BLINK,
++			  &priv->led[index].state);
 +	} else {
 +		priv->led[index].rules = 0;
 +	}
@@ -742,28 +768,26 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +
 +static int air_led_init(struct phy_device *phydev, u8 index, u8 state, u8 pol)
 +{
-+	int cl45_data;
++	int val = 0;
 +	int err;
 +
 +	if (index >= EN8811H_LED_COUNT)
 +		return -EINVAL;
 +
-+	cl45_data = phy_read_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index));
-+	if (cl45_data < 0)
-+		return cl45_data;
-+
 +	if (state == AIR_LED_ENABLE)
-+		cl45_data |= AIR_PHY_LED_ON_ENABLE;
++		val |= AIR_PHY_LED_ON_ENABLE;
 +	else
-+		cl45_data &= ~AIR_PHY_LED_ON_ENABLE;
++		val &= ~AIR_PHY_LED_ON_ENABLE;
 +
 +	if (pol == AIR_ACTIVE_HIGH)
-+		cl45_data |= AIR_PHY_LED_ON_POLARITY;
++		val |= AIR_PHY_LED_ON_POLARITY;
 +	else
-+		cl45_data &= ~AIR_PHY_LED_ON_POLARITY;
++		val &= ~AIR_PHY_LED_ON_POLARITY;
++
++	err = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index),
++			     AIR_PHY_LED_ON_ENABLE |
++			     AIR_PHY_LED_ON_POLARITY, val);
 +
-+	err = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index),
-+			    cl45_data);
 +	if (err < 0)
 +		return err;
 +
@@ -773,42 +797,40 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_leds_init(struct phy_device *phydev, int num, int dur, int mode)
 +{
 +	struct en8811h_priv *priv = phydev->priv;
-+	int cl45_data = dur;
 +	int ret, i;
 +
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_DUR_BLINK,
-+			    cl45_data);
++			    dur);
 +	if (ret < 0)
 +		return ret;
 +
-+	cl45_data >>= 1;
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_DUR_ON,
-+			    cl45_data);
++			    dur >> 1);
 +	if (ret < 0)
 +		return ret;
 +
-+	cl45_data = phy_read_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR);
-+	if (cl45_data < 0)
-+		return cl45_data;
-+
 +	switch (mode) {
 +	case AIR_LED_MODE_DISABLE:
-+		cl45_data &= ~AIR_PHY_LED_BCR_EXT_CTRL;
-+		cl45_data &= ~AIR_PHY_LED_BCR_MODE_MASK;
++		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_MODE_MASK, 0);
++		if (ret < 0)
++			return ret;
 +		break;
 +	case AIR_LED_MODE_USER_DEFINE:
-+		cl45_data |= AIR_PHY_LED_BCR_EXT_CTRL;
-+		cl45_data |= AIR_PHY_LED_BCR_CLK_EN;
++		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_CLK_EN,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_CLK_EN);
++		if (ret < 0)
++			return ret;
 +		break;
 +	default:
 +		phydev_err(phydev, "LED mode %d is not supported\n", mode);
 +		return -EINVAL;
 +	}
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR, cl45_data);
-+	if (ret < 0)
-+		return ret;
-+
 +	for (i = 0; i < num; ++i) {
 +		ret = air_led_init(phydev, i, AIR_LED_ENABLE, AIR_ACTIVE_HIGH);
 +		if (ret < 0) {
@@ -837,21 +859,42 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int en8811h_probe(struct phy_device *phydev)
 +{
 +	struct en8811h_priv *priv;
++	int ret;
 +
 +	priv = devm_kzalloc(&phydev->mdio.dev, sizeof(struct en8811h_priv),
 +			    GFP_KERNEL);
 +	if (!priv)
 +		return -ENOMEM;
++	phydev->priv = priv;
++
++	ret = en8811h_load_firmware(phydev);
++	if (ret < 0)
++		return ret;
++
++	/* mcu has just restarted after firmware load */
++	priv->mcu_needs_restart = false;
 +
 +	priv->led[0].rules = AIR_DEFAULT_TRIGGER_LED0;
 +	priv->led[1].rules = AIR_DEFAULT_TRIGGER_LED1;
 +	priv->led[2].rules = AIR_DEFAULT_TRIGGER_LED2;
 +
-+	phydev->priv = priv;
-+
 +	/* MDIO_DEVS1/2 empty, so set mmds_present bits here */
 +	phydev->c45_ids.mmds_present |= MDIO_DEVS_PMAPMD | MDIO_DEVS_AN;
 +
++	ret = air_leds_init(phydev, EN8811H_LED_COUNT, AIR_PHY_LED_DUR,
++			    AIR_LED_MODE_DISABLE);
++	if (ret < 0) {
++		phydev_err(phydev, "Failed to disable leds: %d\n", ret);
++		return ret;
++	}
++
++	/* Configure led gpio pins as output */
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_GPIO_OUTPUT,
++				      EN8811H_GPIO_OUTPUT_345,
++				      EN8811H_GPIO_OUTPUT_345);
++	if (ret < 0)
++		return ret;
++
 +	return 0;
 +}
 +
@@ -859,58 +902,41 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	struct en8811h_priv *priv = phydev->priv;
 +	struct device *dev = &phydev->mdio.dev;
-+	int ret, pollret, reg_value;
 +	u32 pbus_value;
++	int ret;
 +
-+	if (!priv->firmware_version)
-+		ret = en8811h_load_firmware(phydev);
-+	else
-+		ret = en8811h_restart_host(phydev);
-+	if (ret < 0)
-+		return ret;
-+
-+	/* Because of mdio-lock, may have to wait for multiple loads */
-+	pollret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
-+					    EN8811H_PHY_FW_STATUS, reg_value,
-+					    reg_value == EN8811H_PHY_READY,
-+					    20000, 7500000, true);
-+
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_VERSION, &pbus_value);
-+	if (ret < 0)
-+		return ret;
-+
-+	if (pollret || !pbus_value) {
-+		phydev_err(phydev, "Firmware not ready: 0x%x\n", reg_value);
-+		return -ENODEV;
-+	}
-+
-+	if (!priv->firmware_version) {
-+		phydev_info(phydev, "MD32 firmware version: %08x\n", pbus_value);
-+		priv->firmware_version = pbus_value;
++	/* If restart happened in .probe(), no need to restart now */
++	if (priv->mcu_needs_restart) {
++		ret = en8811h_restart_mcu(phydev);
++		if (ret < 0)
++			return ret;
++	} else {
++		/* Next calls to .config_init() mcu needs to restart */
++		priv->mcu_needs_restart = true;
 +	}
 +
-+	/* Select mode 1, the only mode supported */
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_1,
-+			    AIR_PHY_HOST_CMD_1_MODE1);
++	/* Select mode 1, the only mode supported.
++	 * Configures the SerDes for 2500Base-X with rate adaptation
++	 */
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_1,
++			    AIR_PHY_MCU_CMD_1_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_2,
-+			    AIR_PHY_HOST_CMD_2_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_2,
++			    AIR_PHY_MCU_CMD_2_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_3,
-+			    AIR_PHY_HOST_CMD_3_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_3,
++			    AIR_PHY_MCU_CMD_3_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_4,
-+			    AIR_PHY_HOST_CMD_4_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_4,
++			    AIR_PHY_MCU_CMD_4_MODE1);
 +	if (ret < 0)
 +		return ret;
 +
 +	/* Serdes polarity */
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_POLARITY, &pbus_value);
-+	if (ret < 0)
-+		return ret;
++	pbus_value = 0;
 +	if (device_property_read_bool(dev, "airoha,pnswap-rx"))
 +		pbus_value |=  EN8811H_POLARITY_RX_REVERSE;
 +	else
@@ -919,7 +945,9 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		pbus_value &= ~EN8811H_POLARITY_TX_NORMAL;
 +	else
 +		pbus_value |=  EN8811H_POLARITY_TX_NORMAL;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_POLARITY, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_POLARITY,
++				      EN8811H_POLARITY_RX_REVERSE |
++				      EN8811H_POLARITY_TX_NORMAL, pbus_value);
 +	if (ret < 0)
 +		return ret;
 +
@@ -930,14 +958,6 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		return ret;
 +	}
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_GPIO_OUTPUT, &pbus_value);
-+	if (ret < 0)
-+		return ret;
-+	pbus_value |= EN8811H_GPIO_OUTPUT_345;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_GPIO_OUTPUT, pbus_value);
-+	if (ret < 0)
-+		return ret;
-+
 +	return 0;
 +}
 +
@@ -959,17 +979,21 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int en8811h_config_aneg(struct phy_device *phydev)
 +{
 +	bool changed = false;
-+	int err, val;
-+
-+	val = 0;
-+	if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
-+			      phydev->advertising))
-+		val |= MDIO_AN_10GBT_CTRL_ADV2_5G;
-+	err =  phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
-+				      MDIO_AN_10GBT_CTRL_ADV2_5G, val);
-+	if (err < 0)
-+		return err;
-+	if (err > 0)
++	int ret;
++	u32 adv;
++
++	if (phydev->autoneg == AUTONEG_DISABLE) {
++		phydev_warn(phydev, "Disabling autoneg is not supported\n");
++		return -EINVAL;
++	}
++
++	adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising);
++
++	ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
++				     MDIO_AN_10GBT_CTRL_ADV2_5G, adv);
++	if (ret < 0)
++		return ret;
++	if (ret > 0)
 +		changed = true;
 +
 +	return __genphy_config_aneg(phydev, changed);
@@ -991,6 +1015,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	phydev->duplex = DUPLEX_UNKNOWN;
 +	phydev->pause = 0;
 +	phydev->asym_pause = 0;
++	phydev->rate_matching = RATE_MATCH_PAUSE;
 +
 +	ret = genphy_read_master_slave(phydev);
 +	if (ret < 0)
@@ -1008,7 +1033,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +			 phydev->lp_advertising,
 +			 pbus_value & EN8811H_2P5G_LPA_2P5G);
 +
-+	if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete)
++	if (phydev->autoneg_complete)
 +		phy_resolve_aneg_pause(phydev);
 +
 +	if (!phydev->link)
@@ -1030,8 +1055,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		break;
 +	}
 +
-+	/* BUG in PHY firmware: MDIO_AN_10GBT_STAT_LP2_5G does not get set.
-+	 * Firmware before version 24011202 has no vendor register 2P5G_LPA.
++	/* Firmware before version 24011202 has no vendor register 2P5G_LPA.
 +	 * Assume link partner advertised it if connected at 2500Mbps.
 +	 */
 +	if (priv->firmware_version < 0x24011202) {
@@ -1050,13 +1074,13 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	int ret;
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_3,
-+			    AIR_PHY_HOST_CMD_3_DOCMD);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_3,
++			    AIR_PHY_MCU_CMD_3_DOCMD);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_4,
-+			    AIR_PHY_HOST_CMD_4_INTCLR);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_4,
++			    AIR_PHY_MCU_CMD_4_INTCLR);
 +	if (ret < 0)
 +		return ret;
 +
@@ -1105,6 +1129,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	{ PHY_ID_MATCH_MODEL(EN8811H_PHY_ID) },
 +	{ }
 +};
++
 +MODULE_DEVICE_TABLE(mdio, en8811h_tbl);
 +MODULE_FIRMWARE(EN8811H_MD32_DM);
 +MODULE_FIRMWARE(EN8811H_MD32_DSP);
diff --git a/target/linux/generic/backport-6.1/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch b/target/linux/generic/backport-6.1/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch
new file mode 100644
index 0000000000..1bd0eefe77
--- /dev/null
+++ b/target/linux/generic/backport-6.1/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch
@@ -0,0 +1,47 @@
+From 87c33315af380ca12a2e59ac94edad4fe0481b4c Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter at linaro.org>
+Date: Fri, 5 Apr 2024 13:08:59 +0300
+Subject: [PATCH] net: phy: air_en8811h: fix some error codes
+
+These error paths accidentally return "ret" which is zero/success
+instead of the correct error code.
+
+Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
+Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://lore.kernel.org/r/7ef2e230-dfb7-4a77-8973-9e5be1a99fc2 at moroto.mountain
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/air_en8811h.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/phy/air_en8811h.c
++++ b/drivers/net/phy/air_en8811h.c
+@@ -272,11 +272,11 @@ static int __air_buckpbus_reg_read(struc
+ 
+ 	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
+ 	if (pbus_data_high < 0)
+-		return ret;
++		return pbus_data_high;
+ 
+ 	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
+ 	if (pbus_data_low < 0)
+-		return ret;
++		return pbus_data_low;
+ 
+ 	*pbus_data = pbus_data_low | (pbus_data_high << 16);
+ 	return 0;
+@@ -323,11 +323,11 @@ static int __air_buckpbus_reg_modify(str
+ 
+ 	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
+ 	if (pbus_data_high < 0)
+-		return ret;
++		return pbus_data_high;
+ 
+ 	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
+ 	if (pbus_data_low < 0)
+-		return ret;
++		return pbus_data_low;
+ 
+ 	pbus_data_old = pbus_data_low | (pbus_data_high << 16);
+ 	pbus_data_new = (pbus_data_old & ~mask) | set;
diff --git a/target/linux/generic/backport-6.1/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch b/target/linux/generic/backport-6.1/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
index 2969462838..e8e73c1e5f 100644
--- a/target/linux/generic/backport-6.1/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
+++ b/target/linux/generic/backport-6.1/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
@@ -16,8 +16,8 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -72,9 +72,9 @@ config SFP
- comment "MII PHY device drivers"
+@@ -77,9 +77,9 @@ config AIR_EN8811H_PHY
+ 	  Currently supports the Airoha EN8811H PHY.
  
  config AMD_PHY
 -	tristate "AMD PHYs"
diff --git a/target/linux/generic/backport-6.6/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch b/target/linux/generic/backport-6.6/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch
new file mode 100644
index 0000000000..adc924c09a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/301-v6.9-kernel.h-removed-REPEAT_BYTE-from-kernel.h.patch
@@ -0,0 +1,161 @@
+From 66a5c40f60f5d88ad8d47ba6a4ba05892853fa1f Mon Sep 17 00:00:00 2001
+From: Tanzir Hasan <tanzirh at google.com>
+Date: Tue, 26 Dec 2023 18:00:00 +0000
+Subject: [PATCH] kernel.h: removed REPEAT_BYTE from kernel.h
+
+This patch creates wordpart.h and includes it in asm/word-at-a-time.h
+for all architectures. WORD_AT_A_TIME_CONSTANTS depends on kernel.h
+because of REPEAT_BYTE. Moving this to another header and including it
+where necessary allows us to not include the bloated kernel.h. Making
+this implicit dependency on REPEAT_BYTE explicit allows for later
+improvements in the lib/string.c inclusion list.
+
+Suggested-by: Al Viro <viro at zeniv.linux.org.uk>
+Suggested-by: Andy Shevchenko <andy.shevchenko at gmail.com>
+Signed-off-by: Tanzir Hasan <tanzirh at google.com>
+Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
+Link: https://lore.kernel.org/r/20231226-libstringheader-v6-1-80aa08c7652c at google.com
+Signed-off-by: Kees Cook <keescook at chromium.org>
+---
+ arch/arm/include/asm/word-at-a-time.h     |  3 ++-
+ arch/arm64/include/asm/word-at-a-time.h   |  3 ++-
+ arch/powerpc/include/asm/word-at-a-time.h |  4 ++--
+ arch/riscv/include/asm/word-at-a-time.h   |  3 ++-
+ arch/s390/include/asm/word-at-a-time.h    |  3 ++-
+ arch/sh/include/asm/word-at-a-time.h      |  2 ++
+ arch/x86/include/asm/word-at-a-time.h     |  3 ++-
+ arch/x86/kvm/mmu/mmu.c                    |  1 +
+ fs/namei.c                                |  2 +-
+ include/asm-generic/word-at-a-time.h      |  3 ++-
+ include/linux/kernel.h                    |  8 --------
+ include/linux/wordpart.h                  | 13 +++++++++++++
+ 12 files changed, 31 insertions(+), 17 deletions(-)
+ create mode 100644 include/linux/wordpart.h
+
+--- a/arch/arm/include/asm/word-at-a-time.h
++++ b/arch/arm/include/asm/word-at-a-time.h
+@@ -8,7 +8,8 @@
+  * Little-endian word-at-a-time zero byte handling.
+  * Heavily based on the x86 algorithm.
+  */
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ struct word_at_a_time {
+ 	const unsigned long one_bits, high_bits;
+--- a/arch/arm64/include/asm/word-at-a-time.h
++++ b/arch/arm64/include/asm/word-at-a-time.h
+@@ -9,7 +9,8 @@
+ 
+ #ifndef __AARCH64EB__
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ struct word_at_a_time {
+ 	const unsigned long one_bits, high_bits;
+--- a/arch/powerpc/include/asm/word-at-a-time.h
++++ b/arch/powerpc/include/asm/word-at-a-time.h
+@@ -4,8 +4,8 @@
+ /*
+  * Word-at-a-time interfaces for PowerPC.
+  */
+-
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ #include <asm/asm-compat.h>
+ #include <asm/extable.h>
+ 
+--- a/arch/sh/include/asm/word-at-a-time.h
++++ b/arch/sh/include/asm/word-at-a-time.h
+@@ -5,6 +5,8 @@
+ #ifdef CONFIG_CPU_BIG_ENDIAN
+ # include <asm-generic/word-at-a-time.h>
+ #else
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ /*
+  * Little-endian version cribbed from x86.
+  */
+--- a/arch/x86/include/asm/word-at-a-time.h
++++ b/arch/x86/include/asm/word-at-a-time.h
+@@ -2,7 +2,8 @@
+ #ifndef _ASM_WORD_AT_A_TIME_H
+ #define _ASM_WORD_AT_A_TIME_H
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ 
+ /*
+  * This is largely generic for little-endian machines, but the
+--- a/arch/x86/kvm/mmu/mmu.c
++++ b/arch/x86/kvm/mmu/mmu.c
+@@ -47,6 +47,7 @@
+ #include <linux/kern_levels.h>
+ #include <linux/kstrtox.h>
+ #include <linux/kthread.h>
++#include <linux/wordpart.h>
+ 
+ #include <asm/page.h>
+ #include <asm/memtype.h>
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -17,8 +17,8 @@
+ 
+ #include <linux/init.h>
+ #include <linux/export.h>
+-#include <linux/kernel.h>
+ #include <linux/slab.h>
++#include <linux/wordpart.h>
+ #include <linux/fs.h>
+ #include <linux/filelock.h>
+ #include <linux/namei.h>
+--- a/include/asm-generic/word-at-a-time.h
++++ b/include/asm-generic/word-at-a-time.h
+@@ -2,7 +2,8 @@
+ #ifndef _ASM_WORD_AT_A_TIME_H
+ #define _ASM_WORD_AT_A_TIME_H
+ 
+-#include <linux/kernel.h>
++#include <linux/bitops.h>
++#include <linux/wordpart.h>
+ #include <asm/byteorder.h>
+ 
+ #ifdef __BIG_ENDIAN
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -38,14 +38,6 @@
+ 
+ #define STACK_MAGIC	0xdeadbeef
+ 
+-/**
+- * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
+- * @x: value to repeat
+- *
+- * NOTE: @x is not checked for > 0xff; larger values produce odd results.
+- */
+-#define REPEAT_BYTE(x)	((~0ul / 0xff) * (x))
+-
+ /* generic data direction definitions */
+ #define READ			0
+ #define WRITE			1
+--- /dev/null
++++ b/include/linux/wordpart.h
+@@ -0,0 +1,13 @@
++/* SPDX-License-Identifier: GPL-2.0 */
++
++#ifndef _LINUX_WORDPART_H
++#define _LINUX_WORDPART_H
++/**
++ * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
++ * @x: value to repeat
++ *
++ * NOTE: @x is not checked for > 0xff; larger values produce odd results.
++ */
++#define REPEAT_BYTE(x)	((~0ul / 0xff) * (x))
++
++#endif // _LINUX_WORDPART_H
diff --git a/target/linux/generic/backport-6.6/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch b/target/linux/generic/backport-6.6/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch
new file mode 100644
index 0000000000..b9c40e6206
--- /dev/null
+++ b/target/linux/generic/backport-6.6/302-v6.9-kernel.h-Move-upper_-_bits-and-lower_-_bits-to-wordp.patch
@@ -0,0 +1,107 @@
+From adeb04362d74188c1e22ccb824b15a0a7b3de2f4 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
+Date: Wed, 14 Feb 2024 19:26:32 +0200
+Subject: [PATCH] kernel.h: Move upper_*_bits() and lower_*_bits() to
+ wordpart.h
+
+The wordpart.h header is collecting APIs related to the handling
+parts of the word (usually in byte granularity). The upper_*_bits()
+and lower_*_bits() are good candidates to be moved to there.
+
+This helps to clean up header dependency hell with regard to kernel.h
+as the latter gathers completely unrelated stuff together and slows
+down compilation (especially when it's included into other header).
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
+Link: https://lore.kernel.org/r/20240214172752.3605073-1-andriy.shevchenko at linux.intel.com
+Reviewed-by: Randy Dunlap <rdunlap at infradead.org>
+Signed-off-by: Kees Cook <keescook at chromium.org>
+---
+ include/linux/kernel.h   | 30 ++----------------------------
+ include/linux/wordpart.h | 29 +++++++++++++++++++++++++++++
+ 2 files changed, 31 insertions(+), 28 deletions(-)
+
+--- a/include/linux/kernel.h
++++ b/include/linux/kernel.h
+@@ -32,6 +32,8 @@
+ #include <linux/sprintf.h>
+ #include <linux/static_call_types.h>
+ #include <linux/instruction_pointer.h>
++#include <linux/wordpart.h>
++
+ #include <asm/byteorder.h>
+ 
+ #include <uapi/linux/kernel.h>
+@@ -57,34 +59,6 @@
+ }					\
+ )
+ 
+-/**
+- * upper_32_bits - return bits 32-63 of a number
+- * @n: the number we're accessing
+- *
+- * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
+- * the "right shift count >= width of type" warning when that quantity is
+- * 32-bits.
+- */
+-#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
+-
+-/**
+- * lower_32_bits - return bits 0-31 of a number
+- * @n: the number we're accessing
+- */
+-#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
+-
+-/**
+- * upper_16_bits - return bits 16-31 of a number
+- * @n: the number we're accessing
+- */
+-#define upper_16_bits(n) ((u16)((n) >> 16))
+-
+-/**
+- * lower_16_bits - return bits 0-15 of a number
+- * @n: the number we're accessing
+- */
+-#define lower_16_bits(n) ((u16)((n) & 0xffff))
+-
+ struct completion;
+ struct user;
+ 
+--- a/include/linux/wordpart.h
++++ b/include/linux/wordpart.h
+@@ -2,6 +2,35 @@
+ 
+ #ifndef _LINUX_WORDPART_H
+ #define _LINUX_WORDPART_H
++
++/**
++ * upper_32_bits - return bits 32-63 of a number
++ * @n: the number we're accessing
++ *
++ * A basic shift-right of a 64- or 32-bit quantity.  Use this to suppress
++ * the "right shift count >= width of type" warning when that quantity is
++ * 32-bits.
++ */
++#define upper_32_bits(n) ((u32)(((n) >> 16) >> 16))
++
++/**
++ * lower_32_bits - return bits 0-31 of a number
++ * @n: the number we're accessing
++ */
++#define lower_32_bits(n) ((u32)((n) & 0xffffffff))
++
++/**
++ * upper_16_bits - return bits 16-31 of a number
++ * @n: the number we're accessing
++ */
++#define upper_16_bits(n) ((u16)((n) >> 16))
++
++/**
++ * lower_16_bits - return bits 0-15 of a number
++ * @n: the number we're accessing
++ */
++#define lower_16_bits(n) ((u16)((n) & 0xffff))
++
+ /**
+  * REPEAT_BYTE - repeat the value @x multiple times as an unsigned long value
+  * @x: value to repeat
diff --git a/target/linux/generic/pending-6.6/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch b/target/linux/generic/backport-6.6/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
similarity index 61%
rename from target/linux/generic/pending-6.6/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch
rename to target/linux/generic/backport-6.6/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
index c811e40d49..5b627cf449 100644
--- a/target/linux/generic/pending-6.6/750-net-phy-airoha-Add-the-Airoha-EN8811H-PHY-driver.patch
+++ b/target/linux/generic/backport-6.6/798-v6.10-net-phy-air_en8811h-Add-the-Airoha-EN8811H-PHY-drive.patch
@@ -1,83 +1,28 @@
-From patchwork Tue Feb  6 19:47:51 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Eric Woudstra <ericwouds at gmail.com>
-X-Patchwork-Id: 13547762
-X-Patchwork-Delegate: kuba at kernel.org
+From 71e79430117d56c409c5ea485a263bc0d8083390 Mon Sep 17 00:00:00 2001
 From: Eric Woudstra <ericwouds at gmail.com>
-To: "David S. Miller" <davem at davemloft.net>,
-	Eric Dumazet <edumazet at google.com>,
-	Jakub Kicinski <kuba at kernel.org>,
-	Paolo Abeni <pabeni at redhat.com>,
-	Rob Herring <robh+dt at kernel.org>,
-	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
-	Conor Dooley <conor+dt at kernel.org>,
-	Andrew Lunn <andrew at lunn.ch>,
-	Heiner Kallweit <hkallweit1 at gmail.com>,
-	Russell King <linux at armlinux.org.uk>,
-	Matthias Brugger <matthias.bgg at gmail.com>,
-	AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>,
-	"Frank Wunderlich" <frank-w at public-files.de>,
-	Daniel Golle <daniel at makrotopia.org>,
-	Lucien Jheng  <lucien.jheng at airoha.com>,
-	Zhi-Jun You <hujy652 at protonmail.com>
-Cc: netdev at vger.kernel.org,
-	devicetree at vger.kernel.org,
-	Eric Woudstra <ericwouds at gmail.com>
-Subject: [PATCH net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H
- PHY driver
-Date: Tue,  6 Feb 2024 20:47:51 +0100
-Message-ID: <20240206194751.1901802-3-ericwouds at gmail.com>
-X-Mailer: git-send-email 2.42.1
-In-Reply-To: <20240206194751.1901802-1-ericwouds at gmail.com>
-References: <20240206194751.1901802-1-ericwouds at gmail.com>
-Precedence: bulk
-X-Mailing-List: netdev at vger.kernel.org
-List-Id: <netdev.vger.kernel.org>
-List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-X-Patchwork-Delegate: kuba at kernel.org
+Date: Tue, 26 Mar 2024 17:23:05 +0100
+Subject: [PATCH] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
 
-* Source originated from airoha's en8811h v1.2.1 driver
- * Moved air_en8811h.h to air_en8811h.c
- * Removed air_pbus_reg_write() as it writes to another device on mdio-bus
- * Load firmware from /lib/firmware/airoha/ instead of /lib/firmware/
- * Added .get_rate_matching()
- * Use generic phy_read/write() and phy_read/write_mmd()
- * Edited .get_features() to use generic C45 functions
- * Edited .config_aneg() and .read_status() to use a mix of generic C22/C45
- * Use led handling functions from mediatek-ge-soc.c
- * Simplified led handling by storing led rules
- * Cleanup macro definitions
- * Cleanup code to pass checkpatch.pl
- * General code cleanup
+Add the driver for the Airoha EN8811H 2.5 Gigabit PHY. The phy supports
+100/1000/2500 Mbps with auto negotiation only.
 
-Changes from original RFC patch:
+The driver uses two firmware files, for which updated versions are added to
+linux-firmware already.
 
- * Use the correct order in Kconfig and Makefile
- * Change some register naming to correspond with datasheet
- * Use phy_driver .read_page() and .write_page()
- * Use module_phy_driver()
- * Use get_unaligned_le16() instead of macro
- * In .config_aneg() and .read_status() use genphy_xxx() C22
- * Use another vendor register to read real speed
- * Load firmware only once and store firmware version
- * Apply 2.5G LPA work-around (firmware before 24011202)
- * Read 2.5G LPA from vendor register (firmware 24011202 and later)
-
-Changes to be committed:
-	modified:   drivers/net/phy/Kconfig
-	modified:   drivers/net/phy/Makefile
-	new file:   drivers/net/phy/air_en8811h.c
+Note: At phy-address + 8 there is another device on the mdio bus, that
+belongs to the EN881H. While the original driver writes to it, Airoha
+has confirmed this is not needed. Therefore, communication with this
+device is not included in this driver.
 
 Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240326162305.303598-3-ericwouds at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 ---
  drivers/net/phy/Kconfig       |    5 +
  drivers/net/phy/Makefile      |    1 +
- drivers/net/phy/air_en8811h.c | 1006 +++++++++++++++++++++++++++++++++
- 3 files changed, 1012 insertions(+)
+ drivers/net/phy/air_en8811h.c | 1086 +++++++++++++++++++++++++++++++++
+ 3 files changed, 1092 insertions(+)
  create mode 100644 drivers/net/phy/air_en8811h.c
 
 --- a/drivers/net/phy/Kconfig
@@ -92,7 +37,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	  Currently supports the Airoha EN8811H PHY.
 +
  config AMD_PHY
- 	tristate "AMD and Altima PHYs"
+ 	tristate "AMD PHYs"
  	help
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
@@ -106,12 +51,10 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
  obj-$(CONFIG_AX88796B_PHY)	+= ax88796b.o
 --- /dev/null
 +++ b/drivers/net/phy/air_en8811h.c
-@@ -0,0 +1,1006 @@
+@@ -0,0 +1,1086 @@
 +// SPDX-License-Identifier: GPL-2.0+
 +/*
-+ * Driver for Airoha Ethernet PHYs
-+ *
-+ * Currently supporting the EN8811H.
++ * Driver for the Airoha EN8811H 2.5 Gigabit PHY.
 + *
 + * Limitations of the EN8811H:
 + * - Only full duplex supported
@@ -125,6 +68,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#include <linux/phy.h>
 +#include <linux/firmware.h>
 +#include <linux/property.h>
++#include <linux/wordpart.h>
 +#include <asm/unaligned.h>
 +
 +#define EN8811H_PHY_ID		0x03a2a411
@@ -135,12 +79,8 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define AIR_FW_ADDR_DM	0x00000000
 +#define AIR_FW_ADDR_DSP	0x00100000
 +
-+/* u32 (DWORD) component macros */
-+#define LOWORD(d) ((u16)(u32)(d))
-+#define HIWORD(d) ((u16)(((u32)(d)) >> 16))
-+
 +/* MII Registers */
-+#define AIR_AUX_CTRL_STATUS	0x1d
++#define AIR_AUX_CTRL_STATUS		0x1d
 +#define   AIR_AUX_CTRL_STATUS_SPEED_MASK	GENMASK(4, 2)
 +#define   AIR_AUX_CTRL_STATUS_SPEED_100		0x4
 +#define   AIR_AUX_CTRL_STATUS_SPEED_1000	0x8
@@ -151,32 +91,32 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define   AIR_PHY_PAGE_EXTENDED_4		0x0004
 +
 +/* MII Registers Page 4*/
-+#define AIR_PBUS_MODE			0x10
-+#define   AIR_PBUS_MODE_ADDR_FIXED		0x0000
-+#define   AIR_PBUS_MODE_ADDR_INCR		BIT(15)
-+#define AIR_PBUS_WR_ADDR_HIGH		0x11
-+#define AIR_PBUS_WR_ADDR_LOW		0x12
-+#define AIR_PBUS_WR_DATA_HIGH		0x13
-+#define AIR_PBUS_WR_DATA_LOW		0x14
-+#define AIR_PBUS_RD_ADDR_HIGH		0x15
-+#define AIR_PBUS_RD_ADDR_LOW		0x16
-+#define AIR_PBUS_RD_DATA_HIGH		0x17
-+#define AIR_PBUS_RD_DATA_LOW		0x18
++#define AIR_BPBUS_MODE			0x10
++#define   AIR_BPBUS_MODE_ADDR_FIXED		0x0000
++#define   AIR_BPBUS_MODE_ADDR_INCR		BIT(15)
++#define AIR_BPBUS_WR_ADDR_HIGH		0x11
++#define AIR_BPBUS_WR_ADDR_LOW		0x12
++#define AIR_BPBUS_WR_DATA_HIGH		0x13
++#define AIR_BPBUS_WR_DATA_LOW		0x14
++#define AIR_BPBUS_RD_ADDR_HIGH		0x15
++#define AIR_BPBUS_RD_ADDR_LOW		0x16
++#define AIR_BPBUS_RD_DATA_HIGH		0x17
++#define AIR_BPBUS_RD_DATA_LOW		0x18
 +
 +/* Registers on MDIO_MMD_VEND1 */
 +#define EN8811H_PHY_FW_STATUS		0x8009
 +#define   EN8811H_PHY_READY			0x02
 +
-+#define AIR_PHY_HOST_CMD_1		0x800c
-+#define AIR_PHY_HOST_CMD_1_MODE1		0x0
-+#define AIR_PHY_HOST_CMD_2		0x800d
-+#define AIR_PHY_HOST_CMD_2_MODE1		0x0
-+#define AIR_PHY_HOST_CMD_3		0x800e
-+#define AIR_PHY_HOST_CMD_3_MODE1		0x1101
-+#define AIR_PHY_HOST_CMD_3_DOCMD		0x1100
-+#define AIR_PHY_HOST_CMD_4		0x800f
-+#define AIR_PHY_HOST_CMD_4_MODE1		0x0002
-+#define AIR_PHY_HOST_CMD_4_INTCLR		0x00e4
++#define AIR_PHY_MCU_CMD_1		0x800c
++#define AIR_PHY_MCU_CMD_1_MODE1			0x0
++#define AIR_PHY_MCU_CMD_2		0x800d
++#define AIR_PHY_MCU_CMD_2_MODE1			0x0
++#define AIR_PHY_MCU_CMD_3		0x800e
++#define AIR_PHY_MCU_CMD_3_MODE1			0x1101
++#define AIR_PHY_MCU_CMD_3_DOCMD			0x1100
++#define AIR_PHY_MCU_CMD_4		0x800f
++#define AIR_PHY_MCU_CMD_4_MODE1			0x0002
++#define AIR_PHY_MCU_CMD_4_INTCLR		0x00e4
 +
 +/* Registers on MDIO_MMD_VEND2 */
 +#define AIR_PHY_LED_BCR			0x021
@@ -235,28 +175,21 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +#define EN8811H_FW_CTRL_2		0x800000
 +#define EN8811H_FW_CTRL_2_LOADING		BIT(11)
 +
++/* Led definitions */
 +#define EN8811H_LED_COUNT	3
 +
-+/* GPIO5  <-> BASE_T_LED0
-+ * GPIO4  <-> BASE_T_LED1
-+ * GPIO3  <-> BASE_T_LED2
-+ *
-+ * Default setup suitable for 2 leds connected:
-+ *    100M link up triggers led0, only led0 blinking on traffic
-+ *   1000M link up triggers led1, only led1 blinking on traffic
-+ *   2500M link up triggers led0 and led1, both blinking on traffic
-+ * Also suitable for 1 led connected:
-+ *     any link up triggers led2
++/* Default LED setup:
++ * GPIO5 <-> LED0  On: Link detected, blink Rx/Tx
++ * GPIO4 <-> LED1  On: Link detected at 2500 or 1000 Mbps
++ * GPIO3 <-> LED2  On: Link detected at 2500 or  100 Mbps
 + */
-+#define AIR_DEFAULT_TRIGGER_LED0 (BIT(TRIGGER_NETDEV_LINK_2500) | \
-+				  BIT(TRIGGER_NETDEV_LINK_100)  | \
++#define AIR_DEFAULT_TRIGGER_LED0 (BIT(TRIGGER_NETDEV_LINK)      | \
 +				  BIT(TRIGGER_NETDEV_RX)        | \
 +				  BIT(TRIGGER_NETDEV_TX))
 +#define AIR_DEFAULT_TRIGGER_LED1 (BIT(TRIGGER_NETDEV_LINK_2500) | \
-+				  BIT(TRIGGER_NETDEV_LINK_1000) | \
-+				  BIT(TRIGGER_NETDEV_RX)        | \
-+				  BIT(TRIGGER_NETDEV_TX))
-+#define AIR_DEFAULT_TRIGGER_LED2  BIT(TRIGGER_NETDEV_LINK)
++				  BIT(TRIGGER_NETDEV_LINK_1000))
++#define AIR_DEFAULT_TRIGGER_LED2 (BIT(TRIGGER_NETDEV_LINK_2500) | \
++				  BIT(TRIGGER_NETDEV_LINK_100))
 +
 +struct led {
 +	unsigned long rules;
@@ -265,6 +198,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +
 +struct en8811h_priv {
 +	u32		firmware_version;
++	bool		mcu_needs_restart;
 +	struct led	led[EN8811H_LED_COUNT];
 +};
 +
@@ -274,12 +208,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +};
 +
 +enum {
-+	AIR_PHY_LED_DUR_BLINK_32M,
-+	AIR_PHY_LED_DUR_BLINK_64M,
-+	AIR_PHY_LED_DUR_BLINK_128M,
-+	AIR_PHY_LED_DUR_BLINK_256M,
-+	AIR_PHY_LED_DUR_BLINK_512M,
-+	AIR_PHY_LED_DUR_BLINK_1024M,
++	AIR_PHY_LED_DUR_BLINK_32MS,
++	AIR_PHY_LED_DUR_BLINK_64MS,
++	AIR_PHY_LED_DUR_BLINK_128MS,
++	AIR_PHY_LED_DUR_BLINK_256MS,
++	AIR_PHY_LED_DUR_BLINK_512MS,
++	AIR_PHY_LED_DUR_BLINK_1024MS,
 +};
 +
 +enum {
@@ -298,16 +232,16 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +};
 +
 +#define AIR_PHY_LED_DUR_UNIT	1024
-+#define AIR_PHY_LED_DUR (AIR_PHY_LED_DUR_UNIT << AIR_PHY_LED_DUR_BLINK_64M)
++#define AIR_PHY_LED_DUR (AIR_PHY_LED_DUR_UNIT << AIR_PHY_LED_DUR_BLINK_64MS)
 +
-+static const unsigned long en8811h_led_trig = (BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
-+					       BIT(TRIGGER_NETDEV_LINK)        |
-+					       BIT(TRIGGER_NETDEV_LINK_10)     |
-+					       BIT(TRIGGER_NETDEV_LINK_100)    |
-+					       BIT(TRIGGER_NETDEV_LINK_1000)   |
-+					       BIT(TRIGGER_NETDEV_LINK_2500)   |
-+					       BIT(TRIGGER_NETDEV_RX)          |
-+					       BIT(TRIGGER_NETDEV_TX));
++static const unsigned long en8811h_led_trig = BIT(TRIGGER_NETDEV_FULL_DUPLEX) |
++					      BIT(TRIGGER_NETDEV_LINK)        |
++					      BIT(TRIGGER_NETDEV_LINK_10)     |
++					      BIT(TRIGGER_NETDEV_LINK_100)    |
++					      BIT(TRIGGER_NETDEV_LINK_1000)   |
++					      BIT(TRIGGER_NETDEV_LINK_2500)   |
++					      BIT(TRIGGER_NETDEV_RX)          |
++					      BIT(TRIGGER_NETDEV_TX);
 +
 +static int air_phy_read_page(struct phy_device *phydev)
 +{
@@ -324,23 +258,27 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	int ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_FIXED);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_HIGH, HIWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_LOW,  LOWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_DATA_HIGH, HIWORD(pbus_data));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH,
++			  upper_16_bits(pbus_data));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_DATA_LOW,  LOWORD(pbus_data));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW,
++			  lower_16_bits(pbus_data));
 +	if (ret < 0)
 +		return ret;
 +
@@ -350,17 +288,20 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_buckpbus_reg_write(struct phy_device *phydev,
 +				  u32 pbus_address, u32 pbus_data)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_buckpbus_reg_write(phydev, pbus_address, pbus_data);
-+	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   pbus_address, ret);
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_write(phydev, pbus_address,
++					       pbus_data);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
-+;
 +}
 +
 +static int __air_buckpbus_reg_read(struct phy_device *phydev,
@@ -369,41 +310,122 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	int pbus_data_low, pbus_data_high;
 +	int ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_FIXED);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_RD_ADDR_HIGH, HIWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_RD_ADDR_LOW,  LOWORD(pbus_address));
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_LOW,
++			  lower_16_bits(pbus_address));
 +	if (ret < 0)
 +		return ret;
 +
-+	pbus_data_high = __phy_read(phydev, AIR_PBUS_RD_DATA_HIGH);
++	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
 +	if (pbus_data_high < 0)
 +		return ret;
 +
-+	pbus_data_low = __phy_read(phydev, AIR_PBUS_RD_DATA_LOW);
++	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
 +	if (pbus_data_low < 0)
 +		return ret;
 +
-+	*pbus_data = (u16)pbus_data_low | ((u32)(u16)pbus_data_high << 16);
++	*pbus_data = pbus_data_low | (pbus_data_high << 16);
 +	return 0;
 +}
 +
 +static int air_buckpbus_reg_read(struct phy_device *phydev,
 +				 u32 pbus_address, u32 *pbus_data)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_buckpbus_reg_read(phydev, pbus_address, pbus_data);
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_read(phydev, pbus_address, pbus_data);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
++
++	return phy_restore_page(phydev, saved_page, ret);
++}
++
++static int __air_buckpbus_reg_modify(struct phy_device *phydev,
++				     u32 pbus_address, u32 mask, u32 set)
++{
++	int pbus_data_low, pbus_data_high;
++	u32 pbus_data_old, pbus_data_new;
++	int ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_FIXED);
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_RD_ADDR_LOW,
++			  lower_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
++	if (pbus_data_high < 0)
++		return ret;
++
++	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
++	if (pbus_data_low < 0)
++		return ret;
++
++	pbus_data_old = pbus_data_low | (pbus_data_high << 16);
++	pbus_data_new = (pbus_data_old & ~mask) | set;
++	if (pbus_data_new == pbus_data_old)
++		return 0;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(pbus_address));
 +	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   pbus_address, ret);
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(pbus_address));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH,
++			  upper_16_bits(pbus_data_new));
++	if (ret < 0)
++		return ret;
++
++	ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW,
++			  lower_16_bits(pbus_data_new));
++	if (ret < 0)
++		return ret;
++
++	return 0;
++}
++
++static int air_buckpbus_reg_modify(struct phy_device *phydev,
++				   u32 pbus_address, u32 mask, u32 set)
++{
++	int saved_page;
++	int ret = 0;
++
++	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
++
++	if (saved_page >= 0) {
++		ret = __air_buckpbus_reg_modify(phydev, pbus_address, mask,
++						set);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   pbus_address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
 +}
@@ -415,26 +437,28 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	int ret;
 +	u16 val;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_MODE, AIR_PBUS_MODE_ADDR_INCR);
++	ret = __phy_write(phydev, AIR_BPBUS_MODE, AIR_BPBUS_MODE_ADDR_INCR);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_HIGH, HIWORD(address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_HIGH,
++			  upper_16_bits(address));
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = __phy_write(phydev, AIR_PBUS_WR_ADDR_LOW,  LOWORD(address));
++	ret = __phy_write(phydev, AIR_BPBUS_WR_ADDR_LOW,
++			  lower_16_bits(address));
 +	if (ret < 0)
 +		return ret;
 +
 +	for (offset = 0; offset < fw->size; offset += 4) {
 +		val = get_unaligned_le16(&fw->data[offset + 2]);
-+		ret = __phy_write(phydev, AIR_PBUS_WR_DATA_HIGH, val);
++		ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_HIGH, val);
 +		if (ret < 0)
 +			return ret;
 +
 +		val = get_unaligned_le16(&fw->data[offset]);
-+		ret = __phy_write(phydev, AIR_PBUS_WR_DATA_LOW, val);
++		ret = __phy_write(phydev, AIR_BPBUS_WR_DATA_LOW, val);
 +		if (ret < 0)
 +			return ret;
 +	}
@@ -445,23 +469,43 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_write_buf(struct phy_device *phydev, u32 address,
 +			 const struct firmware *fw)
 +{
-+	int ret, saved_page;
++	int saved_page;
++	int ret = 0;
 +
 +	saved_page = phy_select_page(phydev, AIR_PHY_PAGE_EXTENDED_4);
 +
-+	ret = __air_write_buf(phydev, address, fw);
-+	if (ret < 0)
-+		phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
-+			   address, ret);
++	if (saved_page >= 0) {
++		ret = __air_write_buf(phydev, address, fw);
++		if (ret < 0)
++			phydev_err(phydev, "%s 0x%08x failed: %d\n", __func__,
++				   address, ret);
++	}
 +
 +	return phy_restore_page(phydev, saved_page, ret);
 +}
 +
++static int en8811h_wait_mcu_ready(struct phy_device *phydev)
++{
++	int ret, reg_value;
++
++	/* Because of mdio-lock, may have to wait for multiple loads */
++	ret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
++					EN8811H_PHY_FW_STATUS, reg_value,
++					reg_value == EN8811H_PHY_READY,
++					20000, 7500000, true);
++	if (ret) {
++		phydev_err(phydev, "MCU not ready: 0x%x\n", reg_value);
++		return -ENODEV;
++	}
++
++	return 0;
++}
++
 +static int en8811h_load_firmware(struct phy_device *phydev)
 +{
++	struct en8811h_priv *priv = phydev->priv;
 +	struct device *dev = &phydev->mdio.dev;
 +	const struct firmware *fw1, *fw2;
-+	u32 pbus_value;
 +	int ret;
 +
 +	ret = request_firmware_direct(&fw1, EN8811H_MD32_DM, dev);
@@ -477,11 +521,9 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_CTRL_2, &pbus_value);
-+	if (ret < 0)
-+		goto en8811h_load_firmware_out;
-+	pbus_value |= EN8811H_FW_CTRL_2_LOADING;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_2, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_FW_CTRL_2,
++				      EN8811H_FW_CTRL_2_LOADING,
++				      EN8811H_FW_CTRL_2_LOADING);
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
@@ -493,11 +535,8 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_CTRL_2, &pbus_value);
-+	if (ret < 0)
-+		goto en8811h_load_firmware_out;
-+	pbus_value &= ~EN8811H_FW_CTRL_2_LOADING;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_2, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_FW_CTRL_2,
++				      EN8811H_FW_CTRL_2_LOADING, 0);
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
@@ -506,7 +545,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		goto en8811h_load_firmware_out;
 +
-+	ret = 0;
++	ret = en8811h_wait_mcu_ready(phydev);
++
++	air_buckpbus_reg_read(phydev, EN8811H_FW_VERSION,
++			      &priv->firmware_version);
++	phydev_info(phydev, "MD32 firmware version: %08x\n",
++		    priv->firmware_version);
 +
 +en8811h_load_firmware_out:
 +	release_firmware(fw2);
@@ -520,7 +564,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	return ret;
 +}
 +
-+static int en8811h_restart_host(struct phy_device *phydev)
++static int en8811h_restart_mcu(struct phy_device *phydev)
 +{
 +	int ret;
 +
@@ -529,8 +573,12 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	if (ret < 0)
 +		return ret;
 +
-+	return air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_1,
++	ret = air_buckpbus_reg_write(phydev, EN8811H_FW_CTRL_1,
 +				     EN8811H_FW_CTRL_1_FINISH);
++	if (ret < 0)
++		return ret;
++
++	return en8811h_wait_mcu_ready(phydev);
 +}
 +
 +static int air_hw_led_on_set(struct phy_device *phydev, u8 index, bool on)
@@ -664,68 +712,46 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	u16 on = 0, blink = 0;
 +	int ret;
 +
-+	priv->led[index].rules = rules;
-+
 +	if (index >= EN8811H_LED_COUNT)
 +		return -EINVAL;
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_10)   | BIT(TRIGGER_NETDEV_LINK))) {
++	priv->led[index].rules = rules;
++
++	if (rules & BIT(TRIGGER_NETDEV_FULL_DUPLEX))
++		on |= AIR_PHY_LED_ON_FDX;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_10) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK10;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_10RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_10TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_100)  | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_100) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK100;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_100RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_100TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_1000) | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_1000) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK1000;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_1000RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_1000TX;
-+	}
 +
-+	if (rules & (BIT(TRIGGER_NETDEV_LINK_2500) | BIT(TRIGGER_NETDEV_LINK))) {
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_2500) | BIT(TRIGGER_NETDEV_LINK)))
 +		on |= AIR_PHY_LED_ON_LINK2500;
-+		if (rules & BIT(TRIGGER_NETDEV_RX))
-+			blink |= AIR_PHY_LED_BLINK_2500RX;
-+		if (rules & BIT(TRIGGER_NETDEV_TX))
-+			blink |= AIR_PHY_LED_BLINK_2500TX;
-+	}
 +
-+	if (on == 0) {
-+		if (rules & BIT(TRIGGER_NETDEV_RX)) {
-+			blink |= AIR_PHY_LED_BLINK_10RX   |
-+				 AIR_PHY_LED_BLINK_100RX  |
-+				 AIR_PHY_LED_BLINK_1000RX |
-+				 AIR_PHY_LED_BLINK_2500RX;
-+		}
-+		if (rules & BIT(TRIGGER_NETDEV_TX)) {
-+			blink |= AIR_PHY_LED_BLINK_10TX   |
-+				 AIR_PHY_LED_BLINK_100TX  |
-+				 AIR_PHY_LED_BLINK_1000TX |
-+				 AIR_PHY_LED_BLINK_2500TX;
-+		}
++	if (rules & BIT(TRIGGER_NETDEV_RX)) {
++		blink |= AIR_PHY_LED_BLINK_10RX   |
++			 AIR_PHY_LED_BLINK_100RX  |
++			 AIR_PHY_LED_BLINK_1000RX |
++			 AIR_PHY_LED_BLINK_2500RX;
 +	}
 +
-+	if (rules & BIT(TRIGGER_NETDEV_FULL_DUPLEX))
-+		on |= AIR_PHY_LED_ON_FDX;
-+
-+	if (rules & BIT(TRIGGER_NETDEV_HALF_DUPLEX))
-+		on |= AIR_PHY_LED_ON_HDX;
++	if (rules & BIT(TRIGGER_NETDEV_TX)) {
++		blink |= AIR_PHY_LED_BLINK_10TX   |
++			 AIR_PHY_LED_BLINK_100TX  |
++			 AIR_PHY_LED_BLINK_1000TX |
++			 AIR_PHY_LED_BLINK_2500TX;
++	}
 +
 +	if (blink || on) {
 +		/* switch hw-control on, so led-on and led-blink are off */
-+		clear_bit(AIR_PHY_LED_STATE_FORCE_ON, &priv->led[index].state);
-+		clear_bit(AIR_PHY_LED_STATE_FORCE_BLINK, &priv->led[index].state);
++		clear_bit(AIR_PHY_LED_STATE_FORCE_ON,
++			  &priv->led[index].state);
++		clear_bit(AIR_PHY_LED_STATE_FORCE_BLINK,
++			  &priv->led[index].state);
 +	} else {
 +		priv->led[index].rules = 0;
 +	}
@@ -742,28 +768,26 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +
 +static int air_led_init(struct phy_device *phydev, u8 index, u8 state, u8 pol)
 +{
-+	int cl45_data;
++	int val = 0;
 +	int err;
 +
 +	if (index >= EN8811H_LED_COUNT)
 +		return -EINVAL;
 +
-+	cl45_data = phy_read_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index));
-+	if (cl45_data < 0)
-+		return cl45_data;
-+
 +	if (state == AIR_LED_ENABLE)
-+		cl45_data |= AIR_PHY_LED_ON_ENABLE;
++		val |= AIR_PHY_LED_ON_ENABLE;
 +	else
-+		cl45_data &= ~AIR_PHY_LED_ON_ENABLE;
++		val &= ~AIR_PHY_LED_ON_ENABLE;
 +
 +	if (pol == AIR_ACTIVE_HIGH)
-+		cl45_data |= AIR_PHY_LED_ON_POLARITY;
++		val |= AIR_PHY_LED_ON_POLARITY;
 +	else
-+		cl45_data &= ~AIR_PHY_LED_ON_POLARITY;
++		val &= ~AIR_PHY_LED_ON_POLARITY;
++
++	err = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index),
++			     AIR_PHY_LED_ON_ENABLE |
++			     AIR_PHY_LED_ON_POLARITY, val);
 +
-+	err = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index),
-+			    cl45_data);
 +	if (err < 0)
 +		return err;
 +
@@ -773,42 +797,40 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int air_leds_init(struct phy_device *phydev, int num, int dur, int mode)
 +{
 +	struct en8811h_priv *priv = phydev->priv;
-+	int cl45_data = dur;
 +	int ret, i;
 +
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_DUR_BLINK,
-+			    cl45_data);
++			    dur);
 +	if (ret < 0)
 +		return ret;
 +
-+	cl45_data >>= 1;
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_DUR_ON,
-+			    cl45_data);
++			    dur >> 1);
 +	if (ret < 0)
 +		return ret;
 +
-+	cl45_data = phy_read_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR);
-+	if (cl45_data < 0)
-+		return cl45_data;
-+
 +	switch (mode) {
 +	case AIR_LED_MODE_DISABLE:
-+		cl45_data &= ~AIR_PHY_LED_BCR_EXT_CTRL;
-+		cl45_data &= ~AIR_PHY_LED_BCR_MODE_MASK;
++		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_MODE_MASK, 0);
++		if (ret < 0)
++			return ret;
 +		break;
 +	case AIR_LED_MODE_USER_DEFINE:
-+		cl45_data |= AIR_PHY_LED_BCR_EXT_CTRL;
-+		cl45_data |= AIR_PHY_LED_BCR_CLK_EN;
++		ret = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_CLK_EN,
++				     AIR_PHY_LED_BCR_EXT_CTRL |
++				     AIR_PHY_LED_BCR_CLK_EN);
++		if (ret < 0)
++			return ret;
 +		break;
 +	default:
 +		phydev_err(phydev, "LED mode %d is not supported\n", mode);
 +		return -EINVAL;
 +	}
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_BCR, cl45_data);
-+	if (ret < 0)
-+		return ret;
-+
 +	for (i = 0; i < num; ++i) {
 +		ret = air_led_init(phydev, i, AIR_LED_ENABLE, AIR_ACTIVE_HIGH);
 +		if (ret < 0) {
@@ -837,21 +859,42 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int en8811h_probe(struct phy_device *phydev)
 +{
 +	struct en8811h_priv *priv;
++	int ret;
 +
 +	priv = devm_kzalloc(&phydev->mdio.dev, sizeof(struct en8811h_priv),
 +			    GFP_KERNEL);
 +	if (!priv)
 +		return -ENOMEM;
++	phydev->priv = priv;
++
++	ret = en8811h_load_firmware(phydev);
++	if (ret < 0)
++		return ret;
++
++	/* mcu has just restarted after firmware load */
++	priv->mcu_needs_restart = false;
 +
 +	priv->led[0].rules = AIR_DEFAULT_TRIGGER_LED0;
 +	priv->led[1].rules = AIR_DEFAULT_TRIGGER_LED1;
 +	priv->led[2].rules = AIR_DEFAULT_TRIGGER_LED2;
 +
-+	phydev->priv = priv;
-+
 +	/* MDIO_DEVS1/2 empty, so set mmds_present bits here */
 +	phydev->c45_ids.mmds_present |= MDIO_DEVS_PMAPMD | MDIO_DEVS_AN;
 +
++	ret = air_leds_init(phydev, EN8811H_LED_COUNT, AIR_PHY_LED_DUR,
++			    AIR_LED_MODE_DISABLE);
++	if (ret < 0) {
++		phydev_err(phydev, "Failed to disable leds: %d\n", ret);
++		return ret;
++	}
++
++	/* Configure led gpio pins as output */
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_GPIO_OUTPUT,
++				      EN8811H_GPIO_OUTPUT_345,
++				      EN8811H_GPIO_OUTPUT_345);
++	if (ret < 0)
++		return ret;
++
 +	return 0;
 +}
 +
@@ -859,58 +902,41 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	struct en8811h_priv *priv = phydev->priv;
 +	struct device *dev = &phydev->mdio.dev;
-+	int ret, pollret, reg_value;
 +	u32 pbus_value;
++	int ret;
 +
-+	if (!priv->firmware_version)
-+		ret = en8811h_load_firmware(phydev);
-+	else
-+		ret = en8811h_restart_host(phydev);
-+	if (ret < 0)
-+		return ret;
-+
-+	/* Because of mdio-lock, may have to wait for multiple loads */
-+	pollret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1,
-+					    EN8811H_PHY_FW_STATUS, reg_value,
-+					    reg_value == EN8811H_PHY_READY,
-+					    20000, 7500000, true);
-+
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_FW_VERSION, &pbus_value);
-+	if (ret < 0)
-+		return ret;
-+
-+	if (pollret || !pbus_value) {
-+		phydev_err(phydev, "Firmware not ready: 0x%x\n", reg_value);
-+		return -ENODEV;
-+	}
-+
-+	if (!priv->firmware_version) {
-+		phydev_info(phydev, "MD32 firmware version: %08x\n", pbus_value);
-+		priv->firmware_version = pbus_value;
++	/* If restart happened in .probe(), no need to restart now */
++	if (priv->mcu_needs_restart) {
++		ret = en8811h_restart_mcu(phydev);
++		if (ret < 0)
++			return ret;
++	} else {
++		/* Next calls to .config_init() mcu needs to restart */
++		priv->mcu_needs_restart = true;
 +	}
 +
-+	/* Select mode 1, the only mode supported */
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_1,
-+			    AIR_PHY_HOST_CMD_1_MODE1);
++	/* Select mode 1, the only mode supported.
++	 * Configures the SerDes for 2500Base-X with rate adaptation
++	 */
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_1,
++			    AIR_PHY_MCU_CMD_1_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_2,
-+			    AIR_PHY_HOST_CMD_2_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_2,
++			    AIR_PHY_MCU_CMD_2_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_3,
-+			    AIR_PHY_HOST_CMD_3_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_3,
++			    AIR_PHY_MCU_CMD_3_MODE1);
 +	if (ret < 0)
 +		return ret;
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_4,
-+			    AIR_PHY_HOST_CMD_4_MODE1);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_4,
++			    AIR_PHY_MCU_CMD_4_MODE1);
 +	if (ret < 0)
 +		return ret;
 +
 +	/* Serdes polarity */
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_POLARITY, &pbus_value);
-+	if (ret < 0)
-+		return ret;
++	pbus_value = 0;
 +	if (device_property_read_bool(dev, "airoha,pnswap-rx"))
 +		pbus_value |=  EN8811H_POLARITY_RX_REVERSE;
 +	else
@@ -919,7 +945,9 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		pbus_value &= ~EN8811H_POLARITY_TX_NORMAL;
 +	else
 +		pbus_value |=  EN8811H_POLARITY_TX_NORMAL;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_POLARITY, pbus_value);
++	ret = air_buckpbus_reg_modify(phydev, EN8811H_POLARITY,
++				      EN8811H_POLARITY_RX_REVERSE |
++				      EN8811H_POLARITY_TX_NORMAL, pbus_value);
 +	if (ret < 0)
 +		return ret;
 +
@@ -930,14 +958,6 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		return ret;
 +	}
 +
-+	ret = air_buckpbus_reg_read(phydev, EN8811H_GPIO_OUTPUT, &pbus_value);
-+	if (ret < 0)
-+		return ret;
-+	pbus_value |= EN8811H_GPIO_OUTPUT_345;
-+	ret = air_buckpbus_reg_write(phydev, EN8811H_GPIO_OUTPUT, pbus_value);
-+	if (ret < 0)
-+		return ret;
-+
 +	return 0;
 +}
 +
@@ -959,17 +979,21 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +static int en8811h_config_aneg(struct phy_device *phydev)
 +{
 +	bool changed = false;
-+	int err, val;
-+
-+	val = 0;
-+	if (linkmode_test_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
-+			      phydev->advertising))
-+		val |= MDIO_AN_10GBT_CTRL_ADV2_5G;
-+	err =  phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
-+				      MDIO_AN_10GBT_CTRL_ADV2_5G, val);
-+	if (err < 0)
-+		return err;
-+	if (err > 0)
++	int ret;
++	u32 adv;
++
++	if (phydev->autoneg == AUTONEG_DISABLE) {
++		phydev_warn(phydev, "Disabling autoneg is not supported\n");
++		return -EINVAL;
++	}
++
++	adv = linkmode_adv_to_mii_10gbt_adv_t(phydev->advertising);
++
++	ret = phy_modify_mmd_changed(phydev, MDIO_MMD_AN, MDIO_AN_10GBT_CTRL,
++				     MDIO_AN_10GBT_CTRL_ADV2_5G, adv);
++	if (ret < 0)
++		return ret;
++	if (ret > 0)
 +		changed = true;
 +
 +	return __genphy_config_aneg(phydev, changed);
@@ -991,6 +1015,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	phydev->duplex = DUPLEX_UNKNOWN;
 +	phydev->pause = 0;
 +	phydev->asym_pause = 0;
++	phydev->rate_matching = RATE_MATCH_PAUSE;
 +
 +	ret = genphy_read_master_slave(phydev);
 +	if (ret < 0)
@@ -1008,7 +1033,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +			 phydev->lp_advertising,
 +			 pbus_value & EN8811H_2P5G_LPA_2P5G);
 +
-+	if (phydev->autoneg == AUTONEG_ENABLE && phydev->autoneg_complete)
++	if (phydev->autoneg_complete)
 +		phy_resolve_aneg_pause(phydev);
 +
 +	if (!phydev->link)
@@ -1030,8 +1055,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +		break;
 +	}
 +
-+	/* BUG in PHY firmware: MDIO_AN_10GBT_STAT_LP2_5G does not get set.
-+	 * Firmware before version 24011202 has no vendor register 2P5G_LPA.
++	/* Firmware before version 24011202 has no vendor register 2P5G_LPA.
 +	 * Assume link partner advertised it if connected at 2500Mbps.
 +	 */
 +	if (priv->firmware_version < 0x24011202) {
@@ -1050,13 +1074,13 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +{
 +	int ret;
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_3,
-+			    AIR_PHY_HOST_CMD_3_DOCMD);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_3,
++			    AIR_PHY_MCU_CMD_3_DOCMD);
 +	if (ret < 0)
 +		return ret;
 +
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_HOST_CMD_4,
-+			    AIR_PHY_HOST_CMD_4_INTCLR);
++	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, AIR_PHY_MCU_CMD_4,
++			    AIR_PHY_MCU_CMD_4_INTCLR);
 +	if (ret < 0)
 +		return ret;
 +
@@ -1105,6 +1129,7 @@ Signed-off-by: Eric Woudstra <ericwouds at gmail.com>
 +	{ PHY_ID_MATCH_MODEL(EN8811H_PHY_ID) },
 +	{ }
 +};
++
 +MODULE_DEVICE_TABLE(mdio, en8811h_tbl);
 +MODULE_FIRMWARE(EN8811H_MD32_DM);
 +MODULE_FIRMWARE(EN8811H_MD32_DSP);
diff --git a/target/linux/generic/backport-6.6/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch b/target/linux/generic/backport-6.6/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch
new file mode 100644
index 0000000000..1bd0eefe77
--- /dev/null
+++ b/target/linux/generic/backport-6.6/799-v6.10-net-phy-air_en8811h-fix-some-error-codes.patch
@@ -0,0 +1,47 @@
+From 87c33315af380ca12a2e59ac94edad4fe0481b4c Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter at linaro.org>
+Date: Fri, 5 Apr 2024 13:08:59 +0300
+Subject: [PATCH] net: phy: air_en8811h: fix some error codes
+
+These error paths accidentally return "ret" which is zero/success
+instead of the correct error code.
+
+Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
+Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://lore.kernel.org/r/7ef2e230-dfb7-4a77-8973-9e5be1a99fc2 at moroto.mountain
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/air_en8811h.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/phy/air_en8811h.c
++++ b/drivers/net/phy/air_en8811h.c
+@@ -272,11 +272,11 @@ static int __air_buckpbus_reg_read(struc
+ 
+ 	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
+ 	if (pbus_data_high < 0)
+-		return ret;
++		return pbus_data_high;
+ 
+ 	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
+ 	if (pbus_data_low < 0)
+-		return ret;
++		return pbus_data_low;
+ 
+ 	*pbus_data = pbus_data_low | (pbus_data_high << 16);
+ 	return 0;
+@@ -323,11 +323,11 @@ static int __air_buckpbus_reg_modify(str
+ 
+ 	pbus_data_high = __phy_read(phydev, AIR_BPBUS_RD_DATA_HIGH);
+ 	if (pbus_data_high < 0)
+-		return ret;
++		return pbus_data_high;
+ 
+ 	pbus_data_low = __phy_read(phydev, AIR_BPBUS_RD_DATA_LOW);
+ 	if (pbus_data_low < 0)
+-		return ret;
++		return pbus_data_low;
+ 
+ 	pbus_data_old = pbus_data_low | (pbus_data_high << 16);
+ 	pbus_data_new = (pbus_data_old & ~mask) | set;
diff --git a/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch b/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
index fa2056b69a..07287206f6 100644
--- a/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
+++ b/target/linux/generic/backport-6.6/832-v6.7-net-phy-amd-Support-the-Altima-AMI101L.patch
@@ -16,8 +16,8 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
 
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -69,9 +69,9 @@ config SFP
- comment "MII PHY device drivers"
+@@ -74,9 +74,9 @@ config AIR_EN8811H_PHY
+ 	  Currently supports the Airoha EN8811H PHY.
  
  config AMD_PHY
 -	tristate "AMD PHYs"
diff --git a/target/linux/generic/pending-6.1/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch b/target/linux/generic/pending-6.1/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch
new file mode 100644
index 0000000000..500567b4ed
--- /dev/null
+++ b/target/linux/generic/pending-6.1/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch
@@ -0,0 +1,45 @@
+From 9be9a00adfac8118b6d685e71696f83187308c66 Mon Sep 17 00:00:00 2001
+Message-ID: <9be9a00adfac8118b6d685e71696f83187308c66.1715125851.git.daniel at makrotopia.org>
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Tue, 7 May 2024 22:43:30 +0100
+Subject: [PATCH net] net: phy: air_en8811h: reset netdev rules when LED is set
+ manually
+To: Andrew Lunn <andrew at lunn.ch>,
+    Heiner Kallweit <hkallweit1 at gmail.com>,
+    Russell King <linux at armlinux.org.uk>,
+    David S. Miller <davem at davemloft.net>,
+    Eric Dumazet <edumazet at google.com>,
+    Jakub Kicinski <kuba at kernel.org>,
+    Paolo Abeni <pabeni at redhat.com>,
+    SkyLake Huang <skylake.huang at mediatek.com>,
+    Eric Woudstra <ericwouds at gmail.com>,
+    netdev at vger.kernel.org,
+    linux-kernel at vger.kernel.org
+
+Setting LED_OFF via the brightness_set should deactivate hw control,
+so make sure netdev trigger rules also get cleared in that case.
+
+Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+This is basically a stop-gap measure until unified LED handling has
+been implemented accross all MediaTek and Airoha PHYs.
+See also
+https://patchwork.kernel.org/project/netdevbpf/patch/20240425023325.15586-3-SkyLake.Huang at mediatek.com/
+
+ drivers/net/phy/air_en8811h.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/phy/air_en8811h.c
++++ b/drivers/net/phy/air_en8811h.c
+@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_
+ 
+ 	changed |= (priv->led[index].rules != 0);
+ 
++	/* clear netdev trigger rules in case LED_OFF has been set */
++	if (!on)
++		priv->led[index].rules = 0;
++
+ 	if (changed)
+ 		return phy_modify_mmd(phydev, MDIO_MMD_VEND2,
+ 				      AIR_PHY_LED_ON(index),
diff --git a/target/linux/generic/pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch b/target/linux/generic/pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch
new file mode 100644
index 0000000000..500567b4ed
--- /dev/null
+++ b/target/linux/generic/pending-6.6/742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch
@@ -0,0 +1,45 @@
+From 9be9a00adfac8118b6d685e71696f83187308c66 Mon Sep 17 00:00:00 2001
+Message-ID: <9be9a00adfac8118b6d685e71696f83187308c66.1715125851.git.daniel at makrotopia.org>
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Tue, 7 May 2024 22:43:30 +0100
+Subject: [PATCH net] net: phy: air_en8811h: reset netdev rules when LED is set
+ manually
+To: Andrew Lunn <andrew at lunn.ch>,
+    Heiner Kallweit <hkallweit1 at gmail.com>,
+    Russell King <linux at armlinux.org.uk>,
+    David S. Miller <davem at davemloft.net>,
+    Eric Dumazet <edumazet at google.com>,
+    Jakub Kicinski <kuba at kernel.org>,
+    Paolo Abeni <pabeni at redhat.com>,
+    SkyLake Huang <skylake.huang at mediatek.com>,
+    Eric Woudstra <ericwouds at gmail.com>,
+    netdev at vger.kernel.org,
+    linux-kernel at vger.kernel.org
+
+Setting LED_OFF via the brightness_set should deactivate hw control,
+so make sure netdev trigger rules also get cleared in that case.
+
+Fixes: 71e79430117d ("net: phy: air_en8811h: Add the Airoha EN8811H PHY driver")
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+This is basically a stop-gap measure until unified LED handling has
+been implemented accross all MediaTek and Airoha PHYs.
+See also
+https://patchwork.kernel.org/project/netdevbpf/patch/20240425023325.15586-3-SkyLake.Huang at mediatek.com/
+
+ drivers/net/phy/air_en8811h.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/phy/air_en8811h.c
++++ b/drivers/net/phy/air_en8811h.c
+@@ -544,6 +544,10 @@ static int air_hw_led_on_set(struct phy_
+ 
+ 	changed |= (priv->led[index].rules != 0);
+ 
++	/* clear netdev trigger rules in case LED_OFF has been set */
++	if (!on)
++		priv->led[index].rules = 0;
++
+ 	if (changed)
+ 		return phy_modify_mmd(phydev, MDIO_MMD_VEND2,
+ 				      AIR_PHY_LED_ON(index),



From lede-commits at lists.infradead.org  Wed May  8 06:23:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 09:23:10 -0400
Subject: [openwrt/openwrt]  mt76: update to the latest version
In-Reply-To: <171517459003.2724873.18219492238388479826@git-01.infra.openwrt.org>
References: <171517459003.2724873.18219492238388479826@git-01.infra.openwrt.org>
Message-ID: <mailman.34810.1715174599.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/5c4c9ae05953884a75e1c2b0afb14759b9e6d6f8

commit 5c4c9ae05953884a75e1c2b0afb14759b9e6d6f8
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 29 18:58:40 2024 +0200

    mt76: update to the latest version
    
    b5d13611d35e mt76: mt7915: fix monitor mode issues
    bbbac7deee3d wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup
    f1e1e67d97d1 wifi: mt76: fix race condition related to checking tx queue fill status
    b3f739a64e6b wifi: mt76: mt7996: add eht rx rate support
    ca4917062f17 wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power
    325a0c493199 wifi: mt76: mt7996: fill txd by host driver
    cd371fcc98d4 mt76: mt7996: sync with upstream
    d71f8d1b172b wifi: mt76: use atomic iface iteration for pre-TBTT work
    8d5ea32d4895 wifi: mt76: remove unused error path in mt76_connac_tx_complete_skb
    01860c02c505 wifi: mt76: add DMA mapping error check in mt76_alloc_txwi()
    62ddb6d46a97 wifi: mt76: connac: introduce helper for mt7925 chipset
    0837f37e998b wifi: mt76: mt792x: support mt7925 chip init
    899ff378082b wifi: mt76: connac: export functions for mt7925
    c3858b5bf347 wifi: mt76: connac: add eht support for phy mode config
    5df6b26a9fc5 wifi: mt76: connac: add eht support for tx power
    a8081345c636 wifi: mt76: connac: add data field in struct tlv
    9b38aebecf78 wifi: mt76: connac: add more unified command IDs
    84984e6dc87d wifi: mt76: connac: add more unified event IDs
    6fe92398c9ce wifi: mt76: mt7996: set correct wcid in txp
    2cfe2fb0bb80 wifi: mt76: mt7996: fix beamform mcu cmd configuration
    e512241bb5bb wifi: mt76: mt7996: fix beamformee ss subfield in EHT PHY cap
    719a98f832c7 wifi: mt76: mt7996: fix wmm queue mapping
    9723562f2a5b wifi: mt76: mt7996: fix rx rate report for CBW320-2
    1bb5a6a54943 wifi: mt76: mt7996: fix TWT command format
    751b054891f6 wifi: mt76: mt7996: only set vif teardown cmds at remove interface
    fea1e10c7741 wifi: mt76: mt7996: support more options for mt7996_set_bitrate_mask()
    d497ee8aa2f5 wifi: mt76: mt7996: support per-band LED control
    8ccc84111141 wifi: mt76: Use PTR_ERR_OR_ZERO() to simplify code
    161f70217edf wifi: mt76: mt7921e: Support MT7992 IP in Xiaomi Redmibook 15 Pro (2023)
    7d25bfc3f0cc wifi: mt76: fix clang-specific fortify warnings
    5971aa968401 wifi: mt76: connac: add MBSSID support for mt7996
    5a47dd323be1 wifi: mt76: update beacon size limitation
    d5b4b81dcc9e wifi: mt76: check sta rx control frame to multibss capability
    af0e1f6dafb5 wifi: mt76: fix potential memory leak of beacon commands
    65d91a833b01 wifi: mt76: get rid of false alamrs of tx emission issues
    29411e52059f wifi: mt76: fix per-band IEEE80211_CONF_MONITOR flag comparison
    4da62774038a wifi: mt76: check vif type before reporting cca and csa
    4a85678fe089 wifi: mt76: mt7915: update mpdu density capability
    791a45cffadf wifi: mt76: mt7915: fix beamforming availability check
    08e1e6cb7d41 wifi: mt76: Drop unnecessary error check for debugfs_create_dir()
    d1881b1b2bf6 wifi: mt76: move struct ieee80211_chanctx_conf up to struct mt76_vif
    66d5694e1898 wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver
    9fc37b0ac546 wifi: mt76: mt7921: fix the wrong rate selected in fw for the chanctx driver
    2afc7285f75d wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit ef8e2f66f563d0d1864be37075dacf3f13defdc7)
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile | 56 ++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 52 insertions(+), 4 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 500735303f..dd75390ee7 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,16 +1,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=2
+PKG_RELEASE=1
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-09-11
-PKG_SOURCE_VERSION:=f1e1e67d97d1e9a8bb01b59ab20c45ebc985a958
-PKG_MIRROR_HASH:=41fde79de5bec3aaafdb64658475a1fa99bc483b8122e6aad9b2aa8aa8edfce6
+PKG_SOURCE_DATE:=2023-09-18
+PKG_SOURCE_VERSION:=2afc7285f75dca5a0583fd917285bf33f1429cc6
+PKG_MIRROR_HASH:=2c9556b298246277ac2d65415e4449f98e6d5fdb99e0d0a92262f162df772bbc
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
@@ -315,6 +315,38 @@ define KernelPackage/mt7921e
   AUTOLOAD:=$(call AutoProbe,mt7921e)
 endef
 
+define KernelPackage/mt7996e
+  $(KernelPackage/mt76-default)
+  TITLE:=MediaTek MT7996E wireless driver
+  DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac
+  FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
+  AUTOLOAD:=$(call AutoProbe,mt7996e)
+endef
+
+define KernelPackage/mt7925-common
+  $(KernelPackage/mt76-default)
+  TITLE:=MediaTek MT7925 wireless driver common code
+  HIDDEN:=1
+  DEPENDS+=+kmod-mt792x-common + at DRIVER_11AX_SUPPORT +kmod-hwmon-core
+  FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925-common.ko
+endef
+
+define KernelPackage/mt7925u
+  $(KernelPackage/mt76-default)
+  TITLE:=MediaTek MT7925U wireless driver
+  DEPENDS+=+kmod-mt792x-usb +kmod-mt7925-common
+  FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925u.ko
+  AUTOLOAD:=$(call AutoProbe,mt7921u)
+endef
+
+define KernelPackage/mt7925e
+  $(KernelPackage/mt76-default)
+  TITLE:=MediaTek MT7925e wireless driver
+  DEPENDS+=@PCI_SUPPORT +kmod-mt7925-common
+  FILES:= $(PKG_BUILD_DIR)/mt7925/mt7925e.ko
+  AUTOLOAD:=$(call AutoProbe,mt7921e)
+endef
+
 define Package/mt76-test
   SECTION:=devel
   CATEGORY:=Development
@@ -423,6 +455,18 @@ endif
 ifdef CONFIG_PACKAGE_kmod-mt7921e
   PKG_MAKE_FLAGS += CONFIG_MT7921E=m
 endif
+ifdef CONFIG_PACKAGE_kmod-mt7996e
+  PKG_MAKE_FLAGS += CONFIG_MT7996E=m
+endif
+ifdef CONFIG_PACKAGE_kmod-mt7925-common
+  PKG_MAKE_FLAGS += CONFIG_MT7925_COMMON=m
+endif
+ifdef CONFIG_PACKAGE_kmod-mt7925u
+  PKG_MAKE_FLAGS += CONFIG_MT7925U=m
+endif
+ifdef CONFIG_PACKAGE_kmod-mt7925e
+  PKG_MAKE_FLAGS += CONFIG_MT7925E=m
+endif
 
 define Build/Compile
 	+$(KERNEL_MAKE) $(PKG_JOBS) \
@@ -603,8 +647,12 @@ $(eval $(call KernelPackage,mt7922-firmware))
 $(eval $(call KernelPackage,mt792x-common))
 $(eval $(call KernelPackage,mt792x-usb))
 $(eval $(call KernelPackage,mt7921-common))
+$(eval $(call KernelPackage,mt7925-common))
 $(eval $(call KernelPackage,mt7921u))
 $(eval $(call KernelPackage,mt7921s))
 $(eval $(call KernelPackage,mt7921e))
+$(eval $(call KernelPackage,mt7925u))
+$(eval $(call KernelPackage,mt7925e))
+$(eval $(call KernelPackage,mt7996e))
 $(eval $(call KernelPackage,mt76))
 $(eval $(call BuildPackage,mt76-test))



From lede-commits at lists.infradead.org  Wed May  8 06:23:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 09:23:11 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2023-12-08)
In-Reply-To: <171517459003.2724873.18219492238388479826@git-01.infra.openwrt.org>
References: <171517459003.2724873.18219492238388479826@git-01.infra.openwrt.org>
Message-ID: <mailman.34811.1715174599.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/06be957f86d037ed710a8b426aca493590c451de

commit 06be957f86d037ed710a8b426aca493590c451de
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 29 18:58:41 2024 +0200

    mt76: update to Git HEAD (2023-12-08)
    
    890ae4d717f1 wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling
    fcc2f3d82bc9 wifi: mt76: fix lock dependency problem for wed_lock
    77cc14596202 wifi: mt76: mt792x: move mt7921_skb_add_usb_sdio_hdr in mt792x module
    bc85355885d1 wifi: mt76: mt792x: move some common usb code in mt792x module
    c27f01c4c834 wifi: mt76: mt7996: get tx_retries and tx_failed from txfree
    30aba4c18307 wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic
    119bebff244b wifi: mt76: mt7996: enable PPDU-TxS to host
    a4005e0e83e7 wifi: mt76: mt7996: remove periodic MPDU TXS request
    d6cc20bf5913 wifi: mt76: reduce spin_lock_bh held up in mt76_dma_rx_cleanup
    5d94251d641c wifi: mt76: mt7921: move connac nic capability handling to mt7921
    266341b5019d wifi: mt76: mt7921: enable set txpower for UNII-4
    581449ac5274 wifi: mt76: mt7921: add 6GHz power type support for clc
    9bfd669e9477 wifi: mt76: mt7921: get regulatory information from the clc event
    4a0f839da0f1 wifi: mt76: mt7921: update the channel usage when the regd domain changed
    f4df423d3d56 wifi: mt76: add ability to explicitly forbid LED registration with DT
    54d369e79972 wifi: mt76: mt7921: support 5.9/6GHz channel config in acpi
    b39b6cba220f wifi: mt76: mt7996: fix uninitialized variable in parsing txfree
    77194e652885 wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function
    c37738fc9097 wifi: mt76: limit support of precal loading for mt7915 to MTD only
    d6e8aa634a19 wifi: mt76: make mt76_get_of_eeprom static again
    d1c671a90eba wifi: mt76: permit to use alternative cell name to eeprom NVMEM load
    5539001fe4e3 wifi: mt76: permit to load precal from NVMEM cell for mt7915
    48d413380685 wifi: mt76: Remove unnecessary (void*) conversions
    ea2814289147 wifi: mt76: mmio: move mt76_mmio_wed_{init,release}_rx_buf in common code
    9fb0277d7ee8 wifi: mt76: move mt76_mmio_wed_offload_{enable,disable} in common code
    4b47145ecf44 wifi: mt76: move mt76_net_setup_tc in common code
    d798d5d6f770 wifi: mt76: introduce mt76_queue_is_wed_tx_free utility routine
    48b0cedbf83f wifi: mt76: introduce wed pointer in mt76_queue
    c550204e347d wifi: mt76: increase MT_QFLAG_WED_TYPE size
    2e7f30f22cfd wifi: mt76: mt7996: add wed tx support
    ec8765a02fc8 wifi: mt76: dma: introduce __mt76_dma_queue_reset utility routine
    a469aaac9784 wifi: mt76: mt7996: use u16 for val field in mt7996_mcu_set_rro signature
    abca260a15c4 wifi: mt76: mt7996: add wed rx support
    be2e74c0c495 wifi: mt76: move wed reset common code in mt76 module
    7f17e164fbb4 wifi: mt76: mt7996: add wed reset support
    0f89bf58efda wifi: mt76: mt7996: add wed rro delete session garbage collector
    a58b75f863ca wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init()
    36d2ddd94eeb wifi: mt76: mt7996: add support for variants with auxiliary RX path
    cec7720c9341 wifi: mt76: mt7996: add TX statistics for EHT mode in debugfs
    9852093062e8 wifi: mt76: connac: add thermal protection support for mt7996
    955540a4df74 wifi: mt76: mt7996: add thermal sensor device support
    af41374a3b8e wifi: mt76: connac: add beacon duplicate TX mode support for mt7996
    3c98d7b7fa23 wifi: mt76: mt7996: fix the size of struct bss_rate_tlv
    ee2169c00539 wifi: mt76: mt7996: adjust WFDMA settings to improve performance
    0aead5de68a7 wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames
    ab5580ff5a4f wifi: mt76: mt7996: handle IEEE80211_RC_SMPS_CHANGED
    eed234afed7e wifi: mt76: mt7996: align the format of fixed rate command
    d9a855285b95 wifi: mt76: mt7996: fix rate usage of inband discovery frames
    47799aefe263 wifi: mt76: change txpower init to per-phy
    264e1ecfe1b4 wifi: mt76: mt7996: add txpower setting support
    c7b243b127eb wifi: mt76: use chainmask for power delta calculation
    05f433900a02 wifi: mt76: mt7996: switch to mcu command for TX GI report
    ae963198e605 wifi: mt76: mt7996: fix alignment of sta info event
    d0d2e03591d6 wifi: mt76: mt7996: rework ampdu params setting
    e87f4efc7638 wifi: mt76: connac: add beacon protection support for mt7996
    0dfcc53a8e5d wifi: mt76: connac: fix EHT phy mode check
    30c54a53bf8b wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981
    17297c97b737 wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band
    eeb48c081034 wifi: mt76: mt7996: fix mt7996_mcu_all_sta_info_event struct packing
    b74ad922659c wifi: mt76: mt7996: introduce mt7996_band_valid()
    51cb541c1e53 wifi: mt76: connac: add firmware support for mt7992
    c0eda4d96ec8 wifi: mt76: mt7996: add DMA support for mt7992
    f12471968a53 wifi: mt76: mt7996: rework register offsets for mt7992
    8d11dae73eb8 wifi: mt76: mt7996: support mt7992 eeprom loading
    6c2b2c37abd7 wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992
    df1d3b3c67e5 wifi: mt76: connac: add new definition of tx descriptor
    f997e759cea5 wifi: mt76: mt7996: add PCI IDs for mt7992
    94e3632e4e93 wifi: mt76: mt7925: remove iftype from mt7925_init_eht_caps signature
    9c7b98c03173 net: ethernet: mtk_wed: rename mtk_rxbm_desc in mtk_wed_bm_desc
    4423b4eb69fb wifi: mt76: mt7996: fix endianness in mt7996_mcu_wed_rro_event
    b97d899a7907 wifi: mt76: mt7921: fix kernel panic by accessing invalid 6GHz channel info
    9ef06028d4fe wifi: mt76: mt7921s: fix workqueue problem causes STA association fail
    95c14207d2a9 wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM
    dbea5151412b wifi: mt76: mt7921: reduce the size of MCU firmware download Rx queue
    a84a355d2e0a wifi: mt76: mt7921: fix country count limitation for CLC
    c498f27ad075 wifi: mt76: mt7921: fix CLC command timeout when suspend/resume
    3098d968abe4 wifi: mt76: mt7921: fix wrong 6Ghz power type
    7730fc91dd15 wifi: mt76: fix shift overflow warnings on 32 bit systems
    f559adf1849c wifi: mt76: fix crash with WED rx support enabled
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 8f782ed07dc23b64bb24f63ce31d939ee6afb5ad)
    [rmilecki: add patches/fixes for regressions from this commit]
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       |  8 +--
 ...t-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch | 24 ---------
 ...t7996-fix-shift-overflow-warning-on-32-bi.patch | 34 ++++++++++++
 ...t7921-fix-6GHz-disabled-by-the-missing-de.patch | 31 +++++++++++
 ...0003-wifi-mt76-mt7996-fix-fortify-warning.patch | 26 ++++++++++
 ...4-wifi-mt76-mt7996-fix-fw-loading-timeout.patch | 38 ++++++++++++++
 ...t7996-check-txs-format-before-getting-skb.patch | 60 ++++++++++++++++++++++
 ...t7921-fix-incorrect-type-conversion-for-C.patch | 38 ++++++++++++++
 ...ix-the-issue-of-missing-txpwr-settings-fr.patch | 28 ++++++++++
 ...76-mt7996-fix-size-of-txpower-MCU-command.patch | 56 ++++++++++++++++++++
 ...t7996-fix-uninitialized-variable-in-mt799.patch | 27 ++++++++++
 ...t7996-fix-potential-memory-leakage-when-r.patch | 39 ++++++++++++++
 12 files changed, 381 insertions(+), 28 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index dd75390ee7..762f474ce9 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-09-18
-PKG_SOURCE_VERSION:=2afc7285f75dca5a0583fd917285bf33f1429cc6
-PKG_MIRROR_HASH:=2c9556b298246277ac2d65415e4449f98e6d5fdb99e0d0a92262f162df772bbc
+PKG_SOURCE_DATE:=2023-12-08
+PKG_SOURCE_VERSION:=f559adf1849c8af91f5a5eb670f4ed2c24988898
+PKG_MIRROR_HASH:=74dde4478442d5f0edbae918636b40767b0e49181b732d4184feeccd8a8cc328
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
@@ -318,7 +318,7 @@ endef
 define KernelPackage/mt7996e
   $(KernelPackage/mt76-default)
   TITLE:=MediaTek MT7996E wireless driver
-  DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac
+  DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac +kmod-hwmon-core
   FILES:= $(PKG_BUILD_DIR)/mt7996/mt7996e.ko
   AUTOLOAD:=$(call AutoProbe,mt7996e)
 endef
diff --git a/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch b/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
deleted file mode 100644
index 15241c8195..0000000000
--- a/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 9c7b98c03173a1a201d74203a81b344a0cd637ac Mon Sep 17 00:00:00 2001
-From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Mon, 18 Sep 2023 12:29:07 +0200
-Subject: [PATCH] net: ethernet: mtk_wed: rename mtk_rxbm_desc in
- mtk_wed_bm_desc
-
-Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used
-even on tx side by MT7988 SoC.
-
-Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
-
---- a/mt7915/mmio.c
-+++ b/mt7915/mmio.c
-@@ -591,7 +591,7 @@ static void mt7915_mmio_wed_release_rx_b
- 
- static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
- {
--	struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
-+	struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc;
- 	struct mt76_txwi_cache *t = NULL;
- 	struct mt7915_dev *dev;
- 	struct mt76_queue *q;
diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch
new file mode 100644
index 0000000000..5acc9e88a5
--- /dev/null
+++ b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch
@@ -0,0 +1,34 @@
+From f63f87cd5b45c3779293e6062c6b26bdf57e851d Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 9 Dec 2023 22:44:57 +0100
+Subject: [PATCH] wifi: mt76: mt7996: fix shift overflow warning on 32 bit
+ systems
+
+Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c
+source.
+
+Fixes: 95c14207d2a9 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ mt7996/mac.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+--- a/mt7996/mac.c
++++ b/mt7996/mac.c
+@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_de
+ 
+ 	txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
+ 	for (i = 0; i < nbuf; i++) {
+-		u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) |
+-			  FIELD_PREP(MT_TXP_DMA_ADDR_H,
+-				     tx_info->buf[i + 1].addr >> 32);
++		u16 len;
++
++		len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len);
++#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
++		len |= FIELD_PREP(MT_TXP_DMA_ADDR_H,
++				  tx_info->buf[i + 1].addr >> 32);
++#endif
+ 
+ 		txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr);
+ 		txp->fw.len[i] = cpu_to_le16(len);
diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch
new file mode 100644
index 0000000000..3fff9caa3c
--- /dev/null
+++ b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch
@@ -0,0 +1,31 @@
+From bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b Mon Sep 17 00:00:00 2001
+From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Date: Mon, 30 Oct 2023 15:17:34 +0800
+Subject: [PATCH] wifi: mt76: mt7921: fix 6GHz disabled by the missing default
+ CLC config
+
+No matter CLC is enabled or disabled, the driver should initialize
+the default value 0xff for channel configuration of CLC. Otherwise,
+the zero value would disable channels.
+
+Reported-and-tested-by: Ben Greear <greearb at candelatech.com>
+Closes: https://lore.kernel.org/all/2fb78387-d226-3193-8ca7-90040561b9ad at candelatech.com/
+Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed")
+Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Signed-off-by: Deren Wu <deren.wu at mediatek.com>
+Signed-off-by: Kalle Valo <kvalo at kernel.org>
+Link: https://lore.kernel.org/r/5a976ddf1f636b5cb809373501d3cfdc6d8de3e4.1698648737.git.deren.wu at mediatek.com
+---
+ mt7921/mcu.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/mt7921/mcu.c
++++ b/mt7921/mcu.c
+@@ -375,6 +375,7 @@ static int mt7921_load_clc(struct mt792x
+ 	int ret, i, len, offset = 0;
+ 	u8 *clc_base = NULL, hw_encap = 0;
+ 
++	dev->phy.clc_chan_conf = 0xff;
+ 	if (mt7921_disable_clc ||
+ 	    mt76_is_usb(&dev->mt76))
+ 		return 0;
diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch
new file mode 100644
index 0000000000..f3cf9c10fa
--- /dev/null
+++ b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch
@@ -0,0 +1,26 @@
+From 786a339bac36d8e53eb8b540e79221d20011ab2a Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 3 Feb 2024 14:21:58 +0100
+Subject: [PATCH] wifi: mt76: mt7996: fix fortify warning
+
+Copy cck and ofdm separately in order to avoid __read_overflow2_field
+warning.
+
+Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/mcu.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt
+ 
+ 	skb_put_data(skb, &req, sizeof(req));
+ 	/* cck and ofdm */
+-	skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm));
++	skb_put_data(skb, &la.cck, sizeof(la.cck));
++	skb_put_data(skb, &la.ofdm, sizeof(la.ofdm));
+ 	/* ht20 */
+ 	skb_put_data(skb, &la.mcs[0], 8);
+ 	/* ht40 */
diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch
new file mode 100644
index 0000000000..9c2247b0c2
--- /dev/null
+++ b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch
@@ -0,0 +1,38 @@
+From bc37a7ebc267e400fc4e9886b7197b4b866763d1 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Thu, 21 Dec 2023 10:41:18 +0100
+Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout
+
+Fix the following firmware loading error due to a wrong dma register
+configuration if wed is disabled.
+
+[    8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128
+[    8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002)
+[    8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering
+[    8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126
+[    8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002)
+[    8.274551] mt7996e 0000:01:00.0: enabling bus mastering
+[   28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout
+[   28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore
+[   29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11
+
+Suggested-by: Sujuan Chen" <sujuan.chen at mediatek.com>
+Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/dma.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/mt7996/dma.c
++++ b/mt7996/dma.c
+@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev
+ 				 MT_WFDMA0_GLO_CFG_TX_DMA_EN |
+ 				 MT_WFDMA0_GLO_CFG_RX_DMA_EN |
+ 				 MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
+-				 MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
++				 MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 |
++				 MT_WFDMA0_GLO_CFG_EXT_EN);
+ 
+ 		if (dev->hif2)
+ 			mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch
new file mode 100644
index 0000000000..f72c76ec66
--- /dev/null
+++ b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch
@@ -0,0 +1,60 @@
+From 025d5734caba6fa1fd96b57c19c61e42e601815b Mon Sep 17 00:00:00 2001
+From: Peter Chiu <chui-hao.chiu at mediatek.com>
+Date: Fri, 26 Jan 2024 17:09:12 +0800
+Subject: [PATCH] wifi: mt76: mt7996: check txs format before getting skb by
+ pid
+
+The PPDU TXS does not include the error bit so it cannot use to report
+status to mac80211. This patch fixes issue that STA wrongly detects if AP
+is still alive.
+
+Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host")
+Signed-off-by: Peter Chiu <chui-hao.chiu at mediatek.com>
+Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/mac.c | 23 +++++++++++++----------
+ 1 file changed, 13 insertions(+), 10 deletions(-)
+
+--- a/mt7996/mac.c
++++ b/mt7996/mac.c
+@@ -1188,25 +1188,28 @@ mt7996_mac_add_txs_skb(struct mt7996_dev
+ 	struct ieee80211_tx_info *info;
+ 	struct sk_buff_head list;
+ 	struct rate_info rate = {};
+-	struct sk_buff *skb;
++	struct sk_buff *skb = NULL;
+ 	bool cck = false;
+ 	u32 txrate, txs, mode, stbc;
+ 
+ 	txs = le32_to_cpu(txs_data[0]);
+ 
+ 	mt76_tx_status_lock(mdev, &list);
+-	skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
+ 
+-	if (skb) {
+-		info = IEEE80211_SKB_CB(skb);
+-		if (!(txs & MT_TXS0_ACK_ERROR_MASK))
+-			info->flags |= IEEE80211_TX_STAT_ACK;
+-
+-		info->status.ampdu_len = 1;
+-		info->status.ampdu_ack_len =
+-			!!(info->flags & IEEE80211_TX_STAT_ACK);
++	/* only report MPDU TXS */
++	if (le32_get_bits(txs_data[0], MT_TXS0_TXS_FORMAT) == 0) {
++		skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
++		if (skb) {
++			info = IEEE80211_SKB_CB(skb);
++			if (!(txs & MT_TXS0_ACK_ERROR_MASK))
++				info->flags |= IEEE80211_TX_STAT_ACK;
++
++			info->status.ampdu_len = 1;
++			info->status.ampdu_ack_len =
++				!!(info->flags & IEEE80211_TX_STAT_ACK);
+ 
+-		info->status.rates[0].idx = -1;
++			info->status.rates[0].idx = -1;
++		}
+ 	}
+ 
+ 	if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) {
diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch
new file mode 100644
index 0000000000..a85dfb7f72
--- /dev/null
+++ b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch
@@ -0,0 +1,38 @@
+From d75eac9f5531e484fbbabf2652922976e15a7a7a Mon Sep 17 00:00:00 2001
+From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Date: Tue, 16 Jan 2024 10:48:54 +0800
+Subject: [PATCH] wifi: mt76: mt7921: fix incorrect type conversion for CLC
+ command
+
+clc->len is defined as 32 bits in length, so it must also be
+operated on with 32 bits, not 16 bits.
+
+Fixes: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC")
+Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Reported-by: kernel test robot <lkp at intel.com>
+Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp at intel.com/
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7921/mcu.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/mt7921/mcu.c
++++ b/mt7921/mcu.c
+@@ -1272,7 +1272,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d
+ 		.mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2),
+ 	};
+ 	int ret, valid_cnt = 0;
+-	u16 buf_len = 0;
++	u32 buf_len = 0;
+ 	u8 *pos;
+ 
+ 	if (!clc)
+@@ -1283,7 +1283,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d
+ 	if (mt76_find_power_limits_node(&dev->mt76))
+ 		req.cap |= CLC_CAP_DTS_EN;
+ 
+-	buf_len = le16_to_cpu(clc->len) - sizeof(*clc);
++	buf_len = le32_to_cpu(clc->len) - sizeof(*clc);
+ 	pos = clc->data;
+ 	while (buf_len > 16) {
+ 		struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos;
diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
new file mode 100644
index 0000000000..380bdfac38
--- /dev/null
+++ b/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
@@ -0,0 +1,28 @@
+From 841bf82e99581f648325bee570de98892cad894f Mon Sep 17 00:00:00 2001
+From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Date: Wed, 7 Feb 2024 11:31:23 +0800
+Subject: [PATCH] wifi: mt76: fix the issue of missing txpwr settings from
+ ch153 to ch177
+
+Because the number of channels to be configured is calculated using the %,
+and it results in 0 when there's an exact division, this leads to some
+channels not having their tx power configured.
+
+Fixes: 7801da338856 ("wifi: mt76: mt7921: enable set txpower for UNII-4")
+Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt76_connac_mcu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mt76_connac_mcu.c
++++ b/mt76_connac_mcu.c
+@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct
+ 		int j, msg_len, num_ch;
+ 		struct sk_buff *skb;
+ 
+-		num_ch = i == batch_size - 1 ? n_chan % batch_len : batch_len;
++		num_ch = i == batch_size - 1 ? n_chan - i * batch_len : batch_len;
+ 		msg_len = sizeof(tx_power_tlv) + num_ch * sizeof(sku_tlbv);
+ 		skb = mt76_mcu_msg_alloc(dev, NULL, msg_len);
+ 		if (!skb) {
diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch b/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
new file mode 100644
index 0000000000..f1d3af80b8
--- /dev/null
+++ b/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
@@ -0,0 +1,56 @@
+From b108dda7e201994f10c885362b07ff3b6e1e843d Mon Sep 17 00:00:00 2001
+From: Chad Monroe <chad at monroe.io>
+Date: Tue, 5 Mar 2024 17:55:35 +0000
+Subject: [PATCH] wifi: mt76: mt7996: fix size of txpower MCU command
+
+Fixes issues with scanning and low power output at some rates.
+
+Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
+Signed-off-by: Chad Monroe <chad at monroe.io>
+Signed-off-by: Ryder Lee <ryder.lee at mediatek.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/mcu.c    | 7 +++++--
+ mt7996/mt7996.h | 1 +
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -4456,7 +4456,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
+ 		u8 band_idx;
+ 	} __packed req = {
+ 		.tag = cpu_to_le16(UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL),
+-		.len = cpu_to_le16(sizeof(req) + MT7996_SKU_RATE_NUM - 4),
++		.len = cpu_to_le16(sizeof(req) + MT7996_SKU_PATH_NUM - 4),
+ 		.power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL,
+ 		.power_limit_type = TX_POWER_LIMIT_TABLE_RATE,
+ 		.band_idx = phy->mt76->band_idx,
+@@ -4471,7 +4471,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
+ 	mphy->txpower_cur = tx_power;
+ 
+ 	skb = mt76_mcu_msg_alloc(&dev->mt76, NULL,
+-				 sizeof(req) + MT7996_SKU_RATE_NUM);
++				 sizeof(req) + MT7996_SKU_PATH_NUM);
+ 	if (!skb)
+ 		return -ENOMEM;
+ 
+@@ -4495,6 +4495,9 @@ int mt7996_mcu_set_txpower_sku(struct mt
+ 	/* eht */
+ 	skb_put_data(skb, &la.eht[0], sizeof(la.eht));
+ 
++	/* padding */
++	skb_put_zero(skb, MT7996_SKU_PATH_NUM - MT7996_SKU_RATE_NUM);
++
+ 	return mt76_mcu_skb_send_msg(&dev->mt76, skb,
+ 				     MCU_WM_UNI_CMD(TXPOWER), true);
+ }
+--- a/mt7996/mt7996.h
++++ b/mt7996/mt7996.h
+@@ -50,6 +50,7 @@
+ #define MT7996_CFEND_RATE_11B		0x03	/* 11B LP, 11M */
+ 
+ #define MT7996_SKU_RATE_NUM		417
++#define MT7996_SKU_PATH_NUM		494
+ 
+ #define MT7996_MAX_TWT_AGRT		16
+ #define MT7996_MAX_STA_TWT_AGRT		8
diff --git a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
new file mode 100644
index 0000000000..b0b7a78e3c
--- /dev/null
+++ b/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
@@ -0,0 +1,27 @@
+From b96ab5e62010887a8abee43dbcccf6f4b3fcb269 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 19 Mar 2024 13:05:36 +0100
+Subject: [PATCH] wifi: mt76: mt7996: fix uninitialized variable in
+ mt7996_irq_tasklet()
+
+Set intr1 to 0 in mt7996_irq_tasklet() in order to avoid possible
+uninitialized variable usage if wed is not active for hif2.
+
+Fixes: 83eafc9251d6 ("wifi: mt76: mt7996: add wed tx support")
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/mmio.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mt7996/mmio.c
++++ b/mt7996/mmio.c
+@@ -499,7 +499,7 @@ static void mt7996_irq_tasklet(struct ta
+ 	struct mt7996_dev *dev = from_tasklet(dev, t, mt76.irq_tasklet);
+ 	struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
+ 	struct mtk_wed_device *wed_hif2 = &dev->mt76.mmio.wed_hif2;
+-	u32 i, intr, mask, intr1;
++	u32 i, intr, mask, intr1 = 0;
+ 
+ 	if (dev->hif2 && mtk_wed_device_active(wed_hif2)) {
+ 		mtk_wed_device_irq_set_mask(wed_hif2, 0);
diff --git a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch b/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
new file mode 100644
index 0000000000..a0d62dc5af
--- /dev/null
+++ b/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
@@ -0,0 +1,39 @@
+From 424e9df466cea3bb39a1e92bf95f3efe65472c27 Mon Sep 17 00:00:00 2001
+From: Howard Hsu <howard-yh.hsu at mediatek.com>
+Date: Wed, 20 Mar 2024 19:09:14 +0800
+Subject: [PATCH] wifi: mt76: mt7996: fix potential memory leakage when reading
+ chip temperature
+
+Without this commit, reading chip temperature will cause memory leakage.
+
+Fixes: 6879b2e94172 ("wifi: mt76: mt7996: add thermal sensor device support")
+Reported-by: Ryder Lee <ryder.lee at mediatek.com>
+Signed-off-by: Howard Hsu <howard-yh.hsu at mediatek.com>
+Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7996/mcu.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/mt7996/mcu.c
++++ b/mt7996/mcu.c
+@@ -3721,6 +3721,7 @@ int mt7996_mcu_get_temperature(struct mt
+ 	} __packed * res;
+ 	struct sk_buff *skb;
+ 	int ret;
++	u32 temp;
+ 
+ 	ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL),
+ 					&req, sizeof(req), true, &skb);
+@@ -3728,8 +3729,10 @@ int mt7996_mcu_get_temperature(struct mt
+ 		return ret;
+ 
+ 	res = (void *)skb->data;
++	temp = le32_to_cpu(res->temperature);
++	dev_kfree_skb(skb);
+ 
+-	return le32_to_cpu(res->temperature);
++	return temp;
+ }
+ 
+ int mt7996_mcu_set_thermal_throttling(struct mt7996_phy *phy, u8 state)



From lede-commits at lists.infradead.org  Wed May  8 14:28:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 17:28:18 -0400
Subject: [openwrt/openwrt]  mediatek: ASUS TUF-AX6000: fix phy-handle
 numbering
In-Reply-To: <171520369858.229547.13401463532976887654@git-01.infra.openwrt.org>
References: <171520369858.229547.13401463532976887654@git-01.infra.openwrt.org>
Message-ID: <mailman.34989.1715203705.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/54abf1cfc776cd7e6f7868abfa1cbbe141e9631c

commit 54abf1cfc776cd7e6f7868abfa1cbbe141e9631c
Author: Magnus Lindstr?m <magnus1089 at hotmail.com>
AuthorDate: Wed May 1 18:35:38 2024 +0200

    mediatek: ASUS TUF-AX6000: fix phy-handle numbering
    
    To fix issue #15304
    Correct br-lan ports 1-4 so that phy-handle matches reg nr not port label.
    
    Fixes: eb13076e77 ("mediatek: fix DTS defining mt7530 switch phys but not referencing them")
    Signed-off-by: Magnus Lindstr?m <magnus1089 at hotmail.com>
---
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index 1cdfb5f155..891d56853b 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -296,26 +296,26 @@
 		#size-cells = <0>;
 
 		port at 1 {
-			reg = <4>;
-			label = "lan1";
+			reg = <1>;
+			label = "lan4";
 			phy-handle = <&swphy1>;
 		};
 
 		port at 2 {
-			reg = <3>;
-			label = "lan2";
+			reg = <2>;
+			label = "lan3";
 			phy-handle = <&swphy2>;
 		};
 
 		port at 3 {
-			reg = <2>;
-			label = "lan3";
+			reg = <3>;
+			label = "lan2";
 			phy-handle = <&swphy3>;
 		};
 
 		port at 4 {
-			reg = <1>;
-			label = "lan4";
+			reg = <4>;
+			label = "lan1";
 			phy-handle = <&swphy4>;
 		};
 



From lede-commits at lists.infradead.org  Wed May  8 14:28:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 17:28:36 -0400
Subject: [openwrt/openwrt]  mediatek: mt7988a.dtsi: add interrupts to GE
 switch PHYs
In-Reply-To: <171520371695.230468.11964900701448360899@git-01.infra.openwrt.org>
References: <171520371695.230468.11964900701448360899@git-01.infra.openwrt.org>
Message-ID: <mailman.34990.1715203725.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3f4347fce0f6bcc57de94c5dc898e2a3967bf4a2

commit 3f4347fce0f6bcc57de94c5dc898e2a3967bf4a2
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed May 8 14:51:54 2024 +0100

    mediatek: mt7988a.dtsi: add interrupts to GE switch PHYs
    
    The way to register the switch MDIO bus and PHYs on the bus in upstream
    Linux is more strict and requires each PHY to explicitely state the
    interrupt instead of assuming it in case the 'interrupts' property in DT
    is missing.
    
    Add missing interrupts for the PHYs of the build-in 4x1GE switch of the
    MT7988 SoC.
    
    Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index db2b85c181..af4dcb3581 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -1282,6 +1282,7 @@
 				gsw_phy0: ethernet-phy at 0 {
 					compatible = "ethernet-phy-ieee802.3-c22";
 					reg = <0>;
+					interrupts = <0>;
 					phy-mode = "internal";
 					nvmem-cells = <&phy_calibration_p0>;
 					nvmem-cell-names = "phy-cal-data";
@@ -1307,6 +1308,7 @@
 				gsw_phy1: ethernet-phy at 1 {
 					compatible = "ethernet-phy-ieee802.3-c22";
 					reg = <1>;
+					interrupts = <1>;
 					phy-mode = "internal";
 					nvmem-cells = <&phy_calibration_p1>;
 					nvmem-cell-names = "phy-cal-data";
@@ -1332,6 +1334,7 @@
 				gsw_phy2: ethernet-phy at 2 {
 					compatible = "ethernet-phy-ieee802.3-c22";
 					reg = <2>;
+					interrupts = <2>;
 					phy-mode = "internal";
 					nvmem-cells = <&phy_calibration_p2>;
 					nvmem-cell-names = "phy-cal-data";
@@ -1357,6 +1360,7 @@
 				gsw_phy3: ethernet-phy at 3 {
 					compatible = "ethernet-phy-ieee802.3-c22";
 					reg = <3>;
+					interrupts = <3>;
 					phy-mode = "internal";
 					nvmem-cells = <&phy_calibration_p3>;
 					nvmem-cell-names = "phy-cal-data";



From lede-commits at lists.infradead.org  Wed May  8 14:28:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 17:28:37 -0400
Subject: [openwrt/openwrt]  mtd-utils: nand-tuils: build and package
 'nandbiterrs'
In-Reply-To: <171520371695.230468.11964900701448360899@git-01.infra.openwrt.org>
References: <171520371695.230468.11964900701448360899@git-01.infra.openwrt.org>
Message-ID: <mailman.34991.1715203725.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4e53a3f47ed1312e87b032a839e98813d9605aad

commit 4e53a3f47ed1312e87b032a839e98813d9605aad
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed May 8 22:05:00 2024 +0100

    mtd-utils: nand-tuils: build and package 'nandbiterrs'
    
    The 'nandbiterrs' tool is useful to find out of bit error correction of
    NAND is working as expected by deliberately introducing bit errors and
    telling up to which number they can be corrected.
    
    Enable build of the testing tools and package the 'nandbiterrs' tool as
    part of the nand-utils package.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/utils/mtd-utils/Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/utils/mtd-utils/Makefile b/package/utils/mtd-utils/Makefile
index fd1cb75e51..c0ea0abbcb 100644
--- a/package/utils/mtd-utils/Makefile
+++ b/package/utils/mtd-utils/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mtd-utils
 PKG_VERSION:=2.1.6
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
@@ -59,7 +59,7 @@ endef
 MAKE_FLAGS += LDLIBS+="$(LIBGCC_S)"
 
 CONFIGURE_ARGS += \
-	--disable-tests \
+	--enable-tests \
 	--without-crypto \
 	--without-xattr \
 	--without-zstd \
@@ -76,7 +76,8 @@ endef
 define Package/nand-utils/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) \
-	$(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} $(1)/usr/sbin/
+	$(PKG_INSTALL_DIR)/usr/sbin/{flash_erase,nanddump,nandwrite,nandtest,mtdinfo} \
+	$(PKG_INSTALL_DIR)/usr/lib/mtd-utils/nandbiterrs $(1)/usr/sbin/
 endef
 
 $(eval $(call BuildPackage,ubi-utils))



From lede-commits at lists.infradead.org  Wed May  8 15:57:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 08 May 2024 18:57:04 -0400
Subject: [openwrt/openwrt]  ucode: update to Git HEAD (2024-05-09)
In-Reply-To: <171520902461.524910.6633163643842789422@git-01.infra.openwrt.org>
References: <171520902461.524910.6633163643842789422@git-01.infra.openwrt.org>
Message-ID: <mailman.35022.1715209036.1280.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/51c70e459d0e5bd8e1c9df63b5fd3c0025e831d3

commit 51c70e459d0e5bd8e1c9df63b5fd3c0025e831d3
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Thu May 9 00:16:11 2024 +0200

    ucode: update to Git HEAD (2024-05-09)
    
    cfe137be068a uci: remove incorrectly documentated reorder() parameter
    e8d78a26da0c lib: introduce socket library
    a0ad1d127ae6 build: fix symbol and library detection
    674f65ee551d jsdoc: disable default module titles
    a33d16a86493 socket: rework error handling
    e2b81d869222 uloop: add documentation
    953f36c96e8a socket: make socket.send() accept non-string data
    f211d5ac666f ubus: fix uc_ubus_have_uloop for eloop+uloop combination
    0662de64bd1f socket: add AF_PACKET socket type support
    b594ff8a2841 socket: remove leftover debug code
    0d823e702bfe socket: fix addrinfo() with omitted service argument
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/utils/ucode/Makefile                       | 10 ++++++---
 ..._ubus_have_uloop-for-eloop-uloop-combinat.patch | 26 ----------------------
 2 files changed, 7 insertions(+), 29 deletions(-)

diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index f9db6b060e..ac23161c5e 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/jow-/ucode.git
-PKG_SOURCE_DATE:=2024-04-07
-PKG_SOURCE_VERSION:=5507654a498a339c44b642f62e203e1d5fb1f725
-PKG_MIRROR_HASH:=40d3df5308faaf3cddfca4ebbcd9ee7fff98cf7e7d406dc177972a7abf0ca16b
+PKG_SOURCE_DATE:=2024-05-09
+PKG_SOURCE_VERSION:=0d823e702bfe5f2bb5be694030a98afedf34aa6b
+PKG_MIRROR_HASH:=c52d499d2490e958e36ed80c32e8fd6d94cacf3b43b9d14c45c68a25bc44d536
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 
@@ -155,6 +155,10 @@ $(eval $(call UcodeModule, \
 	rtnl, RTNL_SUPPORT, +libnl-tiny +libubox, \
 	The rtnl plugin provides access to the Linux routing netlink API.))
 
+$(eval $(call UcodeModule, \
+	socket, SOCKET_SUPPORT, , \
+	The socket plugin provides access to IPv4, IPv6, Unix and packet socket APIs.))
+
 $(eval $(call UcodeModule, \
 	struct, STRUCT_SUPPORT, , \
 	The struct plugin implements Python 3 compatible struct.pack/unpack functionality.))
diff --git a/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch b/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
deleted file mode 100644
index a1659be3c8..0000000000
--- a/package/utils/ucode/patches/100-ubus-fix-uc_ubus_have_uloop-for-eloop-uloop-combinat.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Wed, 1 May 2024 18:40:19 +0200
-Subject: [PATCH] ubus: fix uc_ubus_have_uloop for eloop+uloop combination
-
-When uloop has been integrated with eloop (in hostapd/wpa_supplicant),
-uloop_cancelling will return false, since uloop_run is not being called.
-This leads to ubus.defer() calling uloop_run in a context where it can
-prevent the other event loop from running.
-
-Fix this by detecting event loop integration via uloop_fd_set_cb being set
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/lib/ubus.c
-+++ b/lib/ubus.c
-@@ -665,6 +665,9 @@ uc_ubus_have_uloop(void)
- 	bool prev = uloop_cancelled;
- 	bool active;
- 
-+	if (uloop_fd_set_cb)
-+		return true;
-+
- 	uloop_cancelled = true;
- 	active = uloop_cancelling();
- 	uloop_cancelled = prev;



From lede-commits at lists.infradead.org  Thu May  9 01:11:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:55 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for UART nodes
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35100.1715242319.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/625e912d758050390528b9fc285f5f8c53fe5f4e

commit 625e912d758050390528b9fc285f5f8c53fe5f4e
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:53:23 2024 +0200

    ipq40xx: use existing labels for UART nodes
    
    Some boards are still defininig UART nodes under soc instead of using the
    existing upstream labels to reference them so convert them.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 24 +++++++++++-----------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 24 +++++++++++-----------
 .../boot/dts/qcom/qcom-ipq4029-insect-common.dtsi  | 22 ++++++++++----------
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 80f187c89c..42648c9b00 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -53,18 +53,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		serial at 78af000 {
-			pinctrl-0 = <&serial_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-		};
-
-		serial at 78b0000 {
-			pinctrl-0 = <&serial_1_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-		};
-
 		i2c at 78b7000 { /* BLSP1 QUP2 */
 			pinctrl-0 = <&i2c_0_pins>;
 			pinctrl-names = "default";
@@ -200,6 +188,18 @@
 	};
 };
 
+&blsp1_uart1 {
+	pinctrl-0 = <&serial_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&blsp1_uart2 {
+	pinctrl-0 = <&serial_1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &usb3 {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 23dbf9f991..082b209bf8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -284,18 +284,6 @@
 			status = "okay";
 		};
 
-		serial at 78af000 {
-			pinctrl-0 = <&serial_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-		};
-
-		serial at 78b0000 {
-			pinctrl-0 = <&serial_1_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-		};
-
 		pcie0: pci at 40000000 {
 			status = "okay";
 			perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
@@ -318,6 +306,18 @@
 	status = "okay";
 };
 
+&blsp1_uart1 {
+	pinctrl-0 = <&serial_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&blsp1_uart2 {
+	pinctrl-0 = <&serial_1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index 0aee1716d6..bebad6f1e6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -63,17 +63,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		serial at 78b0000 {
-			pinctrl-0 = <&serial_1_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-
-			bluetooth {
-				compatible = "ti,cc2650";
-				enable-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
-			};
-		};
 	};
 
 	keys {
@@ -120,6 +109,17 @@
 	status = "okay";
 };
 
+&blsp1_uart2 {
+	pinctrl-0 = <&serial_1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	bluetooth {
+		compatible = "ti,cc2650";
+		enable-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
+	};
+};
+
 &cryptobam {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:56 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for I2C nodes
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35101.1715242319.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/90f9bc799f16ee1fa1d63befe6cde81a496c6718

commit 90f9bc799f16ee1fa1d63befe6cde81a496c6718
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:59:24 2024 +0200

    ipq40xx: use existing labels for I2C nodes
    
    Some boards are still defininig I2C nodes under soc instead of using the
    existing upstream labels to reference them so convert them.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 13 +++++------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 12 +++++-----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts |  2 +-
 .../dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi  | 26 +++++++++++-----------
 4 files changed, 26 insertions(+), 27 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 42648c9b00..e67d1ba7a8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -53,13 +53,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		i2c at 78b7000 { /* BLSP1 QUP2 */
-			pinctrl-0 = <&i2c_0_pins>;
-			pinctrl-names = "default";
-
-			status = "okay";
-		};
-
 		leds {
 			compatible = "gpio-leds";
 
@@ -200,6 +193,12 @@
 	status = "okay";
 };
 
+&blsp1_i2c3 { /* BLSP1 QUP2 */
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &usb3 {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 082b209bf8..74985b4b43 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -278,12 +278,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		i2c_0: i2c at 78b7000 {
-			pinctrl-0 = <&i2c_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-		};
-
 		pcie0: pci at 40000000 {
 			status = "okay";
 			perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
@@ -318,6 +312,12 @@
 	status = "okay";
 };
 
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts
index 3477dace72..6df788a745 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts
@@ -67,7 +67,7 @@
 	};
 };
 
-&i2c_0 {
+&blsp1_i2c3 {
 	power-monitor at 40 {
 		/* No driver */
 		compatible = "isl,isl28022";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index 991b93671b..a9fe56f537 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -44,19 +44,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		i2c_0: i2c at 78b7000 {
-			pinctrl-0 = <&i2c_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-
-			tpm at 29 {
-				/* No Driver */
-				compatible = "atmel,at97sc3203";
-				reg = <0x29>;
-				read-only;
-			};
-		};
 	};
 
 	keys {
@@ -99,6 +86,19 @@
 	status = "okay";
 };
 
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+
+	tpm at 29 {
+		/* No Driver */
+		compatible = "atmel,at97sc3203";
+		reg = <0x29>;
+		read-only;
+	};
+};
+
 &cryptobam {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:58 -0400
Subject: [openwrt/openwrt]  ipq40xx: wpj419: use existing label for PCIe node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35104.1715242322.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1f3fe4662e84120aff393decf56875fcaa106543

commit 1f3fe4662e84120aff393decf56875fcaa106543
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 14:19:17 2024 +0200

    ipq40xx: wpj419: use existing label for PCIe node
    
    WPJ419 is still manually defining PCIe node, so lets
    convert it to use the existing upstream labels for PCIe node and while we
    are here use the -gpios suffix instead.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 92b3fb399b..d8977fe117 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -269,12 +269,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		pcie0: pci at 40000000 {
-			status = "okay";
-			perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
-			wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
-		};
 	};
 
 	keys {
@@ -352,6 +346,12 @@
 	status = "okay";
 };
 
+&pcie0 {
+	status = "okay";
+	perst-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>;
+	wake-gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
+};
+
 &mdio {
 	status = "okay";
 	pinctrl-0 = <&mdio_pins>;



From lede-commits at lists.infradead.org  Thu May  9 01:11:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:54 -0400
Subject: [openwrt/openwrt]  ipq40xx: ncp-hg100-cellular: drop QPIC BAM node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35105.1715242322.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7359362a2e300cd84dfc60e71b988cb957b5be76

commit 7359362a2e300cd84dfc60e71b988cb957b5be76
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:46:06 2024 +0200

    ipq40xx: ncp-hg100-cellular: drop QPIC BAM node
    
    This device does not have NAND enabled at all and NAND is the only consumer
    of QPIC BAM DMA, so drop the node.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts        | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
index a23654e4c8..e115c211aa 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
@@ -56,10 +56,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		dma at 7984000 {
-			status = "okay";
-		};
 	};
 
 	keys-repeat {



From lede-commits at lists.infradead.org  Thu May  9 01:11:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:53 -0400
Subject: [openwrt/openwrt]  ipq40xx: wpj419: use existing labels for DMA nodes
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35106.1715242322.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b475e8f717163fd0cb070d83d6b0bbef1d5a614b

commit b475e8f717163fd0cb070d83d6b0bbef1d5a614b
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:45:05 2024 +0200

    ipq40xx: wpj419: use existing labels for DMA nodes
    
    WPJ419 is still manually defining dma nodes(And even some labels), so lets
    convert it to use the existing upstream labels for DMA nodes.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 24 +++++++++++-----------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 99875485a3..23dbf9f991 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -139,10 +139,6 @@
 			};
 		};
 
-		blsp_dma: dma at 7884000 {
-			status = "okay";
-		};
-
 		spi_0: spi at 78b5000 {
 			pinctrl-0 = <&spi_0_pins>;
 			pinctrl-names = "default";
@@ -300,14 +296,6 @@
 			status = "okay";
 		};
 
-		cryptobam: dma at 8e04000 {
-			status = "okay";
-		};
-
-		qpic_bam: dma at 7984000 {
-			status = "okay";
-		};
-
 		pcie0: pci at 40000000 {
 			status = "okay";
 			perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
@@ -326,6 +314,10 @@
 	};
 };
 
+&blsp_dma {
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
@@ -334,6 +326,10 @@
 	status = "okay";
 };
 
+&cryptobam {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -354,6 +350,10 @@
 	status = "okay";
 };
 
+&qpic_bam {
+	status = "okay";
+};
+
 &nand {
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";



From lede-commits at lists.infradead.org  Thu May  9 01:11:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:59 -0400
Subject: [openwrt/openwrt]  ipq40xx: wpj419: use existing label for pinctrl
 node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35107.1715242322.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c9743030e3d6f86a2cf2da8c4f08f76c67a9ef65

commit c9743030e3d6f86a2cf2da8c4f08f76c67a9ef65
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 14:24:16 2024 +0200

    ipq40xx: wpj419: use existing label for pinctrl node
    
    WPJ419 is still manually defining pinctrl node, so lets
    convert it to use the existing upstream labels for pinctrl node.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 172 ++++++++++-----------
 1 file changed, 86 insertions(+), 86 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index d8977fe117..9530824e93 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -53,92 +53,6 @@
 	};
 
 	soc {
-		pinctrl at 1000000 {
-			mdio_pins: mdio_pinmux {
-				mux_1 {
-					pins = "gpio6";
-					function = "mdio";
-					bias-pull-up;
-				};
-
-				mux_2 {
-					pins = "gpio7";
-					function = "mdc";
-					bias-pull-up;
-				};
-			};
-
-			serial_0_pins: serial_pinmux {
-				mux {
-					pins = "gpio16", "gpio17";
-					function = "blsp_uart0";
-					bias-disable;
-				};
-			};
-
-			serial_1_pins: serial1_pinmux {
-				mux {
-					pins = "gpio8", "gpio9", "gpio10", "gpio11";
-					function = "blsp_uart1";
-					bias-disable;
-				};
-			};
-
-			spi_0_pins: spi_0_pinmux {
-				pinmux {
-					function = "blsp_spi0";
-					pins = "gpio13", "gpio14", "gpio15";
-					bias-disable;
-				};
-
-				pinmux_cs {
-					function = "gpio";
-					pins = "gpio12";
-					bias-disable;
-					output-high;
-				};
-			};
-
-			i2c_0_pins: i2c_0_pinmux {
-				mux {
-					pins = "gpio20", "gpio21";
-					function = "blsp_i2c0";
-					bias-disable;
-				};
-			};
-
-			nand_pins: nand_pins {
-				pullups {
-					pins = "gpio52", "gpio53", "gpio58", "gpio59";
-					function = "qpic";
-					bias-pull-up;
-				};
-
-				pulldowns {
-					pins = "gpio54", "gpio55", "gpio56",
-					"gpio57", "gpio60", "gpio61",
-					"gpio62", "gpio63", "gpio64",
-					"gpio65", "gpio66", "gpio67",
-					"gpio68", "gpio69";
-					function = "qpic";
-					bias-pull-down;
-				};
-			};
-
-			led_0_pins: led0_pinmux {
-				mux_1 {
-					pins = "gpio36";
-					function = "led0";
-					bias-pull-down;
-				};
-				mux_2 {
-					pins = "gpio40";
-					function = "led4";
-					bias-pull-down;
-				};
-			};
-		};
-
 		spi_0: spi at 78b5000 {
 			pinctrl-0 = <&spi_0_pins>;
 			pinctrl-names = "default";
@@ -282,6 +196,92 @@
 	};
 };
 
+&tlmm {
+	mdio_pins: mdio_pinmux {
+		mux_1 {
+			pins = "gpio6";
+			function = "mdio";
+			bias-pull-up;
+		};
+
+		mux_2 {
+			pins = "gpio7";
+			function = "mdc";
+			bias-pull-up;
+		};
+	};
+
+	serial_0_pins: serial_pinmux {
+		mux {
+			pins = "gpio16", "gpio17";
+			function = "blsp_uart0";
+			bias-disable;
+		};
+	};
+
+	serial_1_pins: serial1_pinmux {
+		mux {
+			pins = "gpio8", "gpio9", "gpio10", "gpio11";
+			function = "blsp_uart1";
+			bias-disable;
+		};
+	};
+
+	spi_0_pins: spi_0_pinmux {
+		pinmux {
+			function = "blsp_spi0";
+			pins = "gpio13", "gpio14", "gpio15";
+			bias-disable;
+		};
+
+		pinmux_cs {
+			function = "gpio";
+			pins = "gpio12";
+			bias-disable;
+			output-high;
+		};
+	};
+
+	i2c_0_pins: i2c_0_pinmux {
+		mux {
+			pins = "gpio20", "gpio21";
+			function = "blsp_i2c0";
+			bias-disable;
+		};
+	};
+
+	nand_pins: nand_pins {
+		pullups {
+			pins = "gpio52", "gpio53", "gpio58", "gpio59";
+			function = "qpic";
+			bias-pull-up;
+		};
+
+		pulldowns {
+			pins = "gpio54", "gpio55", "gpio56",
+			"gpio57", "gpio60", "gpio61",
+			"gpio62", "gpio63", "gpio64",
+			"gpio65", "gpio66", "gpio67",
+			"gpio68", "gpio69";
+			function = "qpic";
+			bias-pull-down;
+		};
+	};
+
+	led_0_pins: led0_pinmux {
+		mux_1 {
+			pins = "gpio36";
+			function = "led0";
+			bias-pull-down;
+		};
+		mux_2 {
+			pins = "gpio40";
+			function = "led4";
+			bias-pull-down;
+		};
+	};
+};
+
 &blsp_dma {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:57 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for MDIO node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35108.1715242324.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/63c5d8bd726a7864673891ad0cff5520e6567acb

commit 63c5d8bd726a7864673891ad0cff5520e6567acb
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 14:16:48 2024 +0200

    ipq40xx: use existing labels for MDIO node
    
    Some boards are still defining MDIO nodes under soc instead of using the
    existing upstream labels to reference them so convert them.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts     | 14 +++++++-------
 .../boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts  |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts     |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts  |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi     |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts     |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi     | 13 ++++++-------
 .../boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts  |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts    |  4 ----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts  |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts     | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi | 12 ++++++------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts  | 10 ++++------
 .../arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts |  8 ++++----
 .../dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts     |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts  | 13 ++++++-------
 .../arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts     |  8 ++++----
 .../arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts    |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts    | 16 ++++++++--------
 .../arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts     | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts   | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts   | 12 ++++++------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi    | 13 ++++++-------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi  | 12 ++++++------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts  |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi   | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts   | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi   | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi  |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts   | 16 ++++++++--------
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts  | 18 +++++++++---------
 .../dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi    | 20 ++++++++++----------
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts |  8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts |  8 ++++----
 .../boot/dts/qcom/qcom-ipq4029-insect-common.dtsi    | 12 ++++++------
 .../arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts    | 12 ++++++------
 43 files changed, 238 insertions(+), 247 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
index f87fef32f3..f2e2ed3f7f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
@@ -58,13 +58,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -327,6 +320,13 @@
 	phy-names = "usb2-phy";
 };
 
+&mdio {
+	status = "okay";
+
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
index 121d3430ea..8d09bfd0b7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
@@ -18,14 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <5000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -245,6 +237,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <5000>;
+};
+
 &gmac {
 	status = "okay";
 	nvmem-cells = <&macaddr_art_0>;
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
index 52ed1a07b2..e80a540244 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -96,6 +92,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index 528f54cee4..52a96eae98 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -11,10 +11,6 @@
 	compatible = "engenius,eap1300";
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -230,6 +226,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &swport5 {
 	status = "okay";
 	label = "lan";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
index 7aa439912a..1ef63bdc98 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -201,6 +197,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	qcom,ath10k-calibration-variant = "EnGenius-EMD1";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
index 5c5a9f733d..9d70501cb7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
@@ -11,10 +11,6 @@
 	compatible = "engenius,emr3500";
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -202,6 +198,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	qcom,ath10k-calibration-variant = "EnGenius-EMR3500";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index 0ea20530da..ca064837c8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -26,10 +26,6 @@
 	compatible = "netgear,ex61x0v2";
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -334,6 +330,10 @@
 	nvmem-cells = <&precal_art_5000>, <&macaddr_dnidata_c>;
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
index 1f953ee16b..b3617eb45e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -244,6 +240,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &ethphy0 {
 	gpio-controller;
 	#gpio-cells = <2>;
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
index ff111d575f..bb197c2742 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
@@ -27,10 +27,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -269,6 +265,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
index c52af9b1df..9828b4b34e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
@@ -12,13 +12,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -226,6 +219,12 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
index ddbb5a7986..293bf3d20a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
@@ -15,14 +15,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		gpio_export {
 			compatible = "gpio-export";
 			#size-cells = <0>;
@@ -234,6 +226,14 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index 8575b504c8..f8e24ca53d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -273,6 +269,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index 882d565bd1..4f31c8f283 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -291,6 +287,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index fd797bd548..23e9457f02 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
index 211a45bde0..d59c41fab1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
@@ -37,10 +37,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -244,6 +240,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	qcom,ath10k-calibration-variant = "ZyXEL-WRE6606";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
index 64752805a0..3569d6e53a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
@@ -18,14 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <1000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -348,6 +340,14 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <1000>;
+};
+
 &gmac {
 	status = "okay";
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index e67d1ba7a8..119ba4b7fe 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -21,12 +21,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -243,3 +237,9 @@
 &usb2_hs_phy {
 	status = "okay";
 };
+
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
index 7ff350a22c..8bf86d40cd 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
@@ -68,12 +68,6 @@
 			gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-	};
 };
 
 &watchdog {
@@ -275,6 +269,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
index 6fd8b48874..2344ae7bf8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
@@ -22,10 +22,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -270,6 +266,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
index 6a81d96284..e8daef63f1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -253,6 +249,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
index bc0b5c47a3..89ba523e57 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
@@ -24,10 +24,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -356,6 +352,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
index 59dbf7f1b0..c25b9ecf5b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
@@ -20,13 +20,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -329,6 +322,12 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
index f0d1402c35..b3eb610b32 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
@@ -42,10 +42,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -245,6 +241,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &ethphy1 {
 	status = "disabled";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
index fd7cd014d6..7ec3c6a9ae 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -342,6 +338,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index e00385dbd7..7c0260ec3c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -97,14 +97,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -229,6 +221,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 	nvmem-cell-names = "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
index 523c484e91..a4606dd21c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
@@ -80,14 +80,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -212,6 +204,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 	nvmem-cell-names = "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
index 8f1a7f6551..06d65b8944 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
@@ -73,14 +73,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -205,6 +197,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 	nvmem-cell-names = "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
index 03b2f95965..752d714393 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
@@ -21,12 +21,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -278,6 +272,12 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
index 5cfed9faa0..bd7565ac02 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
@@ -16,13 +16,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -274,6 +267,12 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
index 11046db9bb..0463c61236 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
@@ -19,12 +19,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -282,6 +276,12 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &ethphy0 {
 	qcom,single-led-1000;
 	qcom,single-led-100;
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
index 5feebce485..3cd8997a92 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -269,6 +265,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
index da8b8a1feb..7a13241b66 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
@@ -138,10 +138,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -376,6 +372,10 @@
 	qcom,ath10k-calibration-variant = "cellc,rtl30vw";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
index 23030b5e58..67d9f21f71 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
@@ -9,14 +9,6 @@
 	compatible = "unielec,u4019","qcom,ipq4019";
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -204,6 +196,14 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 74985b4b43..92b3fb399b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -244,14 +244,6 @@
 			};
 		};
 
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <5000>;
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -360,6 +352,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <5000>;
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
index fd435dce8e..b494d0ab1c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
@@ -18,14 +18,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -204,6 +196,14 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
index 74d525afff..ae2d88da93 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
@@ -27,10 +27,6 @@
 
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -296,6 +292,10 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
index df562aa064..517d691d10 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
@@ -35,14 +35,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-			reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -259,6 +251,14 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index fbc1616d7c..823431dcf1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -22,15 +22,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-
-			reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
-			reset-delay-us = <2000>;
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -442,6 +433,15 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+
+	reset-gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <2000>;
+};
+
 &gmac {
 	status = "okay";
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index a9fe56f537..8c56c7d2f1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -12,16 +12,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-
-			ethphy: ethernet-phy at 5 {
-				reg = <0x5>;
-			};
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -214,6 +204,16 @@
 	};
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+
+	ethphy: ethernet-phy at 5 {
+		reg = <0x5>;
+	};
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
index d0f30eb86d..dfb639e2bb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
@@ -38,10 +38,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -283,6 +279,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &gmac {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
index 857a2a551f..e6d74da864 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -348,6 +344,10 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index bebad6f1e6..da22d4a671 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -33,12 +33,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		/* It is a 56-bit counter that supplies the count to the ARM arch
 		   timers and without upstream driver */
 		counter at 4a1000 {
@@ -403,6 +397,12 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 	nvmem-cells = <&mac_address 0>;
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
index 0d3bae2dfa..3bf9f8c42b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
@@ -17,12 +17,6 @@
 	};
 
 	soc {
-		mdio at 90000 {
-			status = "okay";
-			pinctrl-0 = <&mdio_pins>;
-			pinctrl-names = "default";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -124,6 +118,12 @@
 	status = "okay";
 };
 
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+};
+
 &gmac {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:50 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for watchdog node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35111.1715242327.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2e94536fc8caccf0b1b4f82dfa41dfe1badba0bb

commit 2e94536fc8caccf0b1b4f82dfa41dfe1badba0bb
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:16:18 2024 +0200

    ipq40xx: use existing labels for watchdog node
    
    Currently, a lot of boards are still not using the existing label to
    reference the watchdog node, so lets rectify this.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts      | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts         | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts | 8 ++++----
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts         | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts          | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi     | 7 +++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts  | 8 ++++----
 56 files changed, 223 insertions(+), 224 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
index 8ce530dbd5..6bcf0f8b50 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
@@ -47,10 +47,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -103,6 +99,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
index 07262f9ed5..00ee51f586 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
@@ -101,13 +101,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
index 388b2dd590..454ae8a966 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
@@ -58,10 +58,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -118,6 +114,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
index c388ceca27..424b72a0a6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
@@ -57,10 +57,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -96,6 +92,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
index fef549035d..ee73eb87c1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
@@ -43,10 +43,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -76,6 +72,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
index 396d4e5fea..16567e20f3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
@@ -53,10 +53,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -86,6 +82,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp1_uart1 {
 	pinctrl-0 = <&serial_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index bfbed30b90..0fbbf7c01e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -40,10 +40,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -95,6 +91,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
index 4f3d00c678..2ff07d6efc 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
@@ -92,13 +92,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_mdio {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
index bca85cf4ab..5950ad2f86 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
@@ -47,10 +47,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -91,6 +87,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
index 8f108a3f9f..5d272d3e1c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
@@ -40,10 +40,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -89,6 +85,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
index 17bac82bfe..5c4a083402 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
@@ -49,10 +49,6 @@
 			status = "okay";
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		/*
 		 * Disable the broken restart as a workaround for the buggy
 		 * 3.0.0/3.0.1 U-boots that ship with the device.
@@ -104,6 +100,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index 918224607a..722a891183 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -55,10 +55,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	aliases {
@@ -157,6 +153,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
index 572e6545c4..0fb3863ad5 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
@@ -54,10 +54,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -116,6 +112,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
index fb0175aeca..ba11eaae7e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
@@ -64,10 +64,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -98,6 +94,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index deee82b1a6..16b8a565c8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -66,10 +66,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -106,6 +102,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
index 581b939ae6..7daae8ee7a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
@@ -57,13 +57,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		pinmux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
index 501aed5467..4b73652d81 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
@@ -31,10 +31,6 @@
 			status = "okay";
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		gpio_export {
 			compatible = "gpio-export";
 			#size-cells = <0>;
@@ -88,6 +84,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	spi_0_pins: spi_0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index cb40b87e56..e8109ec6c4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -63,10 +63,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -129,6 +125,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
index cb847e7558..399d6b380c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
@@ -47,10 +47,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -95,6 +91,10 @@
 
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index ecf652368c..771bcd0b48 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -58,10 +58,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -132,6 +128,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index 252f9ad71a..2d720f7383 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -62,10 +62,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -121,6 +117,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
index 9bcfab4487..c1776d6211 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
@@ -54,10 +54,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -149,6 +145,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &qpic_bam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
index 7ce0b9e359..146dab6eeb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
@@ -66,10 +66,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -119,6 +115,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
index 26c8c0244a..5d8522a269 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
@@ -72,13 +72,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
index 463e1e171e..78a1091d80 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
@@ -47,10 +47,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -103,6 +99,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
index b4f536fdb8..6e30710849 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
@@ -57,10 +57,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	led_spi {
@@ -138,6 +134,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 6ea0eb2b55..6476512ec8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -80,10 +80,6 @@
 			status = "okay";
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		leds {
 			compatible = "gpio-leds";
 
@@ -133,6 +129,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
index 000acd196c..792c09a1a8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
@@ -81,13 +81,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
index 2c86cd57bc..ab92e7035b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
@@ -57,10 +57,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -123,6 +119,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
index 10f21a5947..17cb80fdfd 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
@@ -44,10 +44,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	key {
@@ -83,6 +79,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
index 2555984384..ec5fa286d5 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
@@ -47,10 +47,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	key {
@@ -89,6 +85,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
index 86daa58a3f..2a45dc8e6a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
@@ -65,10 +65,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -110,6 +106,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index 836ad44210..7690e6725d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -66,10 +66,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -160,6 +156,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
index 4f0eaa625b..97e22c2747 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
@@ -76,10 +76,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -136,6 +132,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
index 30101b0c3a..c2a5c51076 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
@@ -48,10 +48,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -71,6 +67,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &nand {
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index 9bc12be8ef..f9ae2f2834 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -138,13 +138,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
index ede92f7e22..cb39e80e44 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
@@ -121,13 +121,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
index cd1c3c732f..218ba7a442 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
@@ -114,13 +114,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
index f3f9395b41..7cf0960e26 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
@@ -56,10 +56,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	key {
@@ -110,6 +106,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
index 849df64201..a587c969b0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
@@ -61,10 +61,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -126,6 +122,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
index ed333c4990..8104432f0d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
@@ -39,10 +39,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -98,6 +94,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
index 0abc3aff55..c327046085 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
@@ -56,10 +56,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -99,6 +95,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
index 2854809bfe..ef9d166783 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
@@ -58,10 +58,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -149,6 +145,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
index e2d435133b..4b1ede666e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
@@ -175,13 +175,13 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
index e31f10f9d3..e785c75625 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
@@ -46,10 +46,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		aliases {
 			led-boot = &led_status;
 			led-failsafe = &led_status;
@@ -82,6 +78,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index d99cbdb608..91afed452c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -308,10 +308,6 @@
 			status = "okay";
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		qpic_bam: dma at 7984000 {
 			status = "okay";
 		};
@@ -334,6 +330,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
index 37383b015d..3d0f32cb8b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
@@ -68,10 +68,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -164,6 +160,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
index 8f0fd9a89f..a9b6e37513 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
@@ -56,10 +56,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		leds {
 			compatible = "gpio-leds";
 			pinctrl-0 = <&led_pins>;
@@ -84,6 +80,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
index 83574f89c7..e0e46b3fbe 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
@@ -62,10 +62,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	regulator-usb-vbus {
@@ -79,6 +75,9 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
 
 &blsp_dma {
 	status = "okay";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
index 88bcbb3101..71c9884f17 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
@@ -76,10 +76,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -118,6 +114,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 69d4810277..80f38ec951 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -67,10 +67,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -120,6 +116,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index 4b3b682260..3f85b1523d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -53,10 +53,6 @@
 			status = "okay";
 		};
 
-		watchdog at b017000 {
-			status = "okay";
-		};
-
 		i2c_0: i2c at 78b7000 {
 			pinctrl-0 = <&i2c_0_pins>;
 			pinctrl-names = "default";
@@ -82,6 +78,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
index e424a021b7..f2994b9ccc 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
@@ -75,10 +75,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -120,6 +116,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
index b7ff970b25..03d3cd1d61 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
@@ -60,10 +60,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -106,6 +102,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index 2b9f73eb24..a1da4bc832 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -82,10 +82,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -110,6 +106,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
index 8794d839a8..6f6c75c568 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
@@ -48,10 +48,6 @@
 		crypto at 8e3a000 {
 			status = "okay";
 		};
-
-		watchdog at b017000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -106,6 +102,10 @@
 	};
 };
 
+&watchdog {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:51 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for prng node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35114.1715242327.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/22e96cc3ff2b31a263c11a25fd5e0d72bb1c16a8

commit 22e96cc3ff2b31a263c11a25fd5e0d72bb1c16a8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:30:48 2024 +0200

    ipq40xx: use existing labels for prng node
    
    Currently, a lot of boards are still not using the existing label to
    reference the prng node, so lets rectify this.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi  | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi  | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts          | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts        | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts         | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts          | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi     | 9 ++++-----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts | 8 ++++----
 56 files changed, 224 insertions(+), 225 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
index 6bcf0f8b50..21013f4733 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
@@ -14,10 +14,6 @@
 	compatible = "openmesh,a42";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -103,6 +99,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
index 00ee51f586..76c4c62e98 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
@@ -58,10 +58,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 
@@ -108,6 +104,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
index 454ae8a966..fe5b99872c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -118,6 +114,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
index 424b72a0a6..e52a5ee469 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -96,6 +92,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
index ee73eb87c1..2b661dbc60 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
@@ -36,10 +36,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		rng at 22000 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -76,6 +72,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
index 16567e20f3..55474b6043 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -86,6 +82,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp1_uart1 {
 	pinctrl-0 = <&serial_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index 0fbbf7c01e..801fbe166d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -11,10 +11,6 @@
 	compatible = "engenius,eap1300";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -95,6 +91,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
index 2ff07d6efc..54806c2dd7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
@@ -56,10 +56,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -99,6 +95,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_mdio {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
index 5950ad2f86..3f9d57c349 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -91,6 +87,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
index 5d272d3e1c..4aaac0f298 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
@@ -11,10 +11,6 @@
 	compatible = "engenius,emr3500";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -89,6 +85,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
index 5c4a083402..4c57e36511 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -104,6 +100,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index 722a891183..aa0d0658d6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -26,10 +26,6 @@
 	compatible = "netgear,ex61x0v2";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -157,6 +153,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
index 0fb3863ad5..2fa3927af8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -116,6 +112,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
index ba11eaae7e..586926d0c4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
@@ -27,10 +27,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -98,6 +94,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index 16b8a565c8..66e1f34f88 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
index 7daae8ee7a..c0b369ddcc 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
@@ -12,10 +12,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 
@@ -64,6 +60,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		pinmux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
index 4b73652d81..dfbf454c13 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
@@ -15,10 +15,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -88,6 +84,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	spi_0_pins: spi_0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi
index 3784e62d0b..961b4be56b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi
@@ -59,10 +59,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -95,6 +91,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &watchdog {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index e8109ec6c4..3b178d7e88 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -129,6 +125,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
index 399d6b380c..2fe1b1ad58 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
@@ -14,10 +14,6 @@
 	compatible = "plasmacloud,pa1200";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -95,6 +91,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index 771bcd0b48..cde16665af 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -132,6 +128,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index 2d720f7383..aeb664285e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -121,6 +117,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
index c1776d6211..7499f4a82b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
@@ -24,10 +24,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -149,6 +145,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &qpic_bam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
index 146dab6eeb..b2fe56c62e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
@@ -37,10 +37,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -119,6 +115,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
index 5d8522a269..d671ea32d3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
@@ -41,10 +41,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -79,6 +75,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
index 78a1091d80..f051cbd948 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
@@ -14,10 +14,6 @@
 	compatible = "openmesh,a62";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -103,6 +99,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
index 6e30710849..baa6f76192 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -138,6 +134,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 6476512ec8..28450643d3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -21,10 +21,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -133,6 +129,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
index 792c09a1a8..cd0ffb0129 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
@@ -70,10 +70,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -88,6 +84,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
index ab92e7035b..3bad6c4862 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
@@ -22,10 +22,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -123,6 +119,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
index 17cb80fdfd..1b93b23cad 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -83,6 +79,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
index ec5fa286d5..a55ee262c8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
@@ -18,10 +18,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -89,6 +85,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
index 9f645dd657..82e3c5d1e3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
@@ -24,10 +24,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -106,6 +102,10 @@
 	};
 };
 
+&prng {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
index 2a45dc8e6a..781150f2be 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
@@ -20,10 +20,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 
@@ -110,6 +106,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index 7690e6725d..f1be7d7451 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -28,10 +28,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		counter at 4a1000 {
 			compatible = "qcom,qca-gcnt";
 			reg = <0x4a1000 0x4>;
@@ -160,6 +156,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
index 97e22c2747..15cfd85ed0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
@@ -42,10 +42,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -136,6 +132,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
index c2a5c51076..042d6ef239 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -71,6 +67,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &nand {
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index f9ae2f2834..95089c800c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -97,10 +97,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -145,6 +141,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
index cb39e80e44..5cea29fe14 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
@@ -80,10 +80,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -128,6 +124,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
index 218ba7a442..3168f8f8d4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
@@ -73,10 +73,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -121,6 +117,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
index a587c969b0..69361befdf 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
@@ -16,10 +16,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 
@@ -126,6 +122,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
index 8104432f0d..341e83aa03 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
@@ -14,10 +14,6 @@
 	compatible = "plasmacloud,pa2200";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -98,6 +94,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
index c327046085..f1751f9b08 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
@@ -19,10 +19,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -99,6 +95,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
index ef9d166783..c76eff7eda 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -149,6 +145,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
index 4b1ede666e..5131648cf0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
@@ -138,10 +138,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -182,6 +178,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
index e785c75625..23030b5e58 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
@@ -9,10 +9,6 @@
 	compatible = "unielec,u4019","qcom,ipq4019";
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -82,6 +78,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
index 3d0f32cb8b..14a55e164d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
@@ -36,10 +36,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		tcsr at 1949000 {
 			compatible = "qcom,tcsr";
 			reg = <0x1949000 0x100>;
@@ -164,6 +160,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
index a9b6e37513..fd435dce8e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
@@ -18,11 +18,6 @@
 	};
 
 	soc {
-
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -84,6 +79,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
index e0e46b3fbe..58c06978a6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
@@ -27,10 +27,6 @@
 
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -79,6 +75,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
index 71c9884f17..0313806263 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
@@ -35,10 +35,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -118,6 +114,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 80f38ec951..d8bbe4d57a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -22,10 +22,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -120,6 +116,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index 3f85b1523d..3528445fa2 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -12,10 +12,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -82,6 +78,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
index f2994b9ccc..71bbef45ee 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
@@ -38,10 +38,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -120,6 +116,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
index 03d3cd1d61..c5f91922ba 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
@@ -23,10 +23,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 		};
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index a1da4bc832..7256fc0090 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -33,10 +33,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -110,6 +106,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
index 6f6c75c568..4a952cc4cb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
@@ -17,10 +17,6 @@
 	};
 
 	soc {
-		rng at 22000 {
-			status = "okay";
-		};
-
 		mdio at 90000 {
 			status = "okay";
 			pinctrl-0 = <&mdio_pins>;
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&prng {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:11:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:11:52 -0400
Subject: [openwrt/openwrt]  ipq40xx: use existing labels for crypto node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35117.1715242327.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e54c9c156b94b1a5da5e1e508f5d4ee6c49a11ad

commit e54c9c156b94b1a5da5e1e508f5d4ee6c49a11ad
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 13:42:21 2024 +0200

    ipq40xx: use existing labels for crypto node
    
    Currently, a lot of boards are still not using the existing label to
    reference the crypto node, so lets rectify this.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts      | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts         | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi   | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts | 8 ++++----
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts         | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts          | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts  | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts      | 4 ----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi       | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi     | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts      | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts     | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi   | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts    | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts    | 8 ++++----
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi        | 8 ++++----
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts  | 8 ++++----
 55 files changed, 216 insertions(+), 220 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
index 21013f4733..c117a90538 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
@@ -39,10 +39,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -103,6 +99,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
index 76c4c62e98..f87fef32f3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
@@ -93,10 +93,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -108,6 +104,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
index fe5b99872c..b061428bb3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
@@ -50,10 +50,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -118,6 +114,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
index e52a5ee469..121d3430ea 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
@@ -49,10 +49,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -96,6 +92,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
index 2b661dbc60..df5d9331a1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
@@ -35,10 +35,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -76,6 +72,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
index 55474b6043..52ed1a07b2 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
@@ -45,10 +45,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -86,6 +82,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp1_uart1 {
 	pinctrl-0 = <&serial_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
index 801fbe166d..528f54cee4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
@@ -32,10 +32,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -95,6 +91,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
index 54806c2dd7..777788c59a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
@@ -84,10 +84,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -99,6 +95,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_mdio {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
index 3f9d57c349..7aa439912a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
@@ -39,10 +39,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -91,6 +87,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
index 4aaac0f298..5c5a9f733d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
@@ -32,10 +32,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -89,6 +85,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
index 4c57e36511..8b75a57074 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
@@ -41,10 +41,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		crypto at 8e3a000 {
-			status = "okay";
-		};
-
 		/*
 		 * Disable the broken restart as a workaround for the buggy
 		 * 3.0.0/3.0.1 U-boots that ship with the device.
@@ -104,6 +100,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index aa0d0658d6..0ea20530da 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -47,10 +47,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	aliases {
@@ -157,6 +153,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
index 2fa3927af8..1f953ee16b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
@@ -46,10 +46,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -116,6 +112,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
index 586926d0c4..ff111d575f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
@@ -56,10 +56,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -102,6 +98,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index 66e1f34f88..07ad4d3d52 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -58,10 +58,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
index c0b369ddcc..c52af9b1df 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
@@ -49,10 +49,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -64,6 +60,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		pinmux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
index dfbf454c13..ddbb5a7986 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
@@ -23,10 +23,6 @@
 			reset-delay-us = <2000>;
 		};
 
-		crypto at 8e3a000 {
-			status = "okay";
-		};
-
 		gpio_export {
 			compatible = "gpio-export";
 			#size-cells = <0>;
@@ -88,6 +84,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	spi_0_pins: spi_0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index 3b178d7e88..8575b504c8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -55,10 +55,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -129,6 +125,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
index 2fe1b1ad58..a353c7f9f3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
@@ -39,10 +39,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -95,6 +91,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index cde16665af..882d565bd1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -50,10 +50,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -132,6 +128,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index aeb664285e..fd797bd548 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -54,10 +54,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -121,6 +117,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
index 7499f4a82b..f895e2c110 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
@@ -46,10 +46,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -149,6 +145,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &qpic_bam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
index b2fe56c62e..211a45bde0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
@@ -58,10 +58,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -119,6 +115,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
index d671ea32d3..fc5a7a94aa 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
@@ -64,10 +64,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -79,6 +75,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
index f051cbd948..d8249236f0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
@@ -39,10 +39,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -103,6 +99,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
index baa6f76192..64752805a0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
@@ -49,10 +49,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	led_spi {
@@ -138,6 +134,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index 28450643d3..80f187c89c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -72,10 +72,6 @@
 			status = "okay";
 		};
 
-		crypto at 8e3a000 {
-			status = "okay";
-		};
-
 		leds {
 			compatible = "gpio-leds";
 
@@ -137,6 +133,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
index cd0ffb0129..7ff350a22c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
@@ -73,10 +73,6 @@
 		mdio at 90000 {
 			status = "okay";
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -88,6 +84,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
index 3bad6c4862..6fd8b48874 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
@@ -49,10 +49,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -123,6 +119,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
index 1b93b23cad..106c8031e3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
@@ -36,10 +36,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	key {
@@ -83,6 +79,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
index a55ee262c8..6a81d96284 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
@@ -39,10 +39,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	key {
@@ -89,6 +85,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
index 82e3c5d1e3..bc0b5c47a3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
@@ -53,10 +53,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
index 781150f2be..59dbf7f1b0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
@@ -57,10 +57,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -110,6 +106,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index f1be7d7451..4a3a323b5f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -58,10 +58,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -160,6 +156,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
index 15cfd85ed0..f0d1402c35 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
@@ -68,10 +68,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -136,6 +132,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
index 042d6ef239..fd7cd014d6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
@@ -40,10 +40,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -71,6 +67,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &nand {
 	pinctrl-0 = <&nand_pins>;
 	pinctrl-names = "default";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index 95089c800c..e00385dbd7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -130,10 +130,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -145,6 +141,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
index 5cea29fe14..523c484e91 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
@@ -113,10 +113,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -128,6 +124,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
index 3168f8f8d4..8f1a7f6551 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
@@ -106,10 +106,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -121,6 +117,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
index 7cf0960e26..03b2f95965 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
@@ -52,10 +52,6 @@
 			qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
 			status = "okay";
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	key {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
index 69361befdf..5cfed9faa0 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
@@ -53,10 +53,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -126,6 +122,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
index 341e83aa03..f87ab07416 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
@@ -31,10 +31,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -98,6 +94,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_pins: serial_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
index f1751f9b08..11046db9bb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
@@ -48,10 +48,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -99,6 +95,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
index c76eff7eda..5feebce485 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
@@ -50,10 +50,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -149,6 +145,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &cryptobam {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
index 5131648cf0..da8b8a1feb 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
@@ -167,10 +167,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 };
 
@@ -182,6 +178,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 91afed452c..99875485a3 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -304,10 +304,6 @@
 			status = "okay";
 		};
 
-		crypto at 8e3a000 {
-			status = "okay";
-		};
-
 		qpic_bam: dma at 7984000 {
 			status = "okay";
 		};
@@ -334,6 +330,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
index 14a55e164d..ab985dfce1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
@@ -60,10 +60,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -164,6 +160,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	serial_0_pins: serial0_pinmux {
 		mux {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
index 58c06978a6..74d525afff 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
@@ -54,10 +54,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	regulator-usb-vbus {
@@ -79,6 +75,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
index 0313806263..df562aa064 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
@@ -68,10 +68,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -118,6 +114,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &tlmm {
 	mdio_pins: mdio_pinmux {
 		mux_1 {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index d8bbe4d57a..fbc1616d7c 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -59,10 +59,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -120,6 +116,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index 3528445fa2..991b93671b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -45,10 +45,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		crypto at 8e3a000 {
-			status = "okay";
-		};
-
 		i2c_0: i2c at 78b7000 {
 			pinctrl-0 = <&i2c_0_pins>;
 			pinctrl-names = "default";
@@ -82,6 +78,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
index 71bbef45ee..d0f30eb86d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
@@ -67,10 +67,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -120,6 +116,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
index c5f91922ba..857a2a551f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
@@ -52,10 +52,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &vqmmc {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index 7256fc0090..0aee1716d6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -74,10 +74,6 @@
 				enable-gpios = <&tlmm 12 GPIO_ACTIVE_LOW>;
 			};
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	keys {
@@ -110,6 +106,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
index 4a952cc4cb..0d3bae2dfa 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
@@ -40,10 +40,6 @@
 			reg = <0x1957000 0x100>;
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
-
-		crypto at 8e3a000 {
-			status = "okay";
-		};
 	};
 
 	leds {
@@ -106,6 +102,10 @@
 	status = "okay";
 };
 
+&crypto {
+	status = "okay";
+};
+
 &blsp_dma {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:12:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:12:00 -0400
Subject: [openwrt/openwrt]  ipq40xx: wpj419: use existing label for SPI node
In-Reply-To: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
References: <171524231050.2683627.899824196001795597@git-01.infra.openwrt.org>
Message-ID: <mailman.35120.1715243681.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/592b6aabca48246e452b702496796fee258a8466

commit 592b6aabca48246e452b702496796fee258a8466
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 7 14:26:03 2024 +0200

    ipq40xx: wpj419: use existing label for SPI node
    
    WPJ419 is still manually defining SPI node, so lets
    convert it to use the existing upstream labels for SPI node.
    
    Link: https://github.com/openwrt/openwrt/pull/15415
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts | 210 ++++++++++-----------
 1 file changed, 105 insertions(+), 105 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
index 9530824e93..40819fd603 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
@@ -53,111 +53,6 @@
 	};
 
 	soc {
-		spi_0: spi at 78b5000 {
-			pinctrl-0 = <&spi_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-			cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>, <&tlmm 41 GPIO_ACTIVE_HIGH>;
-			num-cs = <2>;
-
-			flash0 at 0 {
-				reg = <0>;
-				compatible = "jedec,spi-nor";
-				spi-max-frequency = <24000000>;
-				broken-flash-reset;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition at 0 {
-						label = "0:SBL1";
-						reg = <0x000000 0x040000>;
-						read-only;
-					};
-
-					partition at 40000 {
-						label = "0:MIBIB";
-						reg = <0x040000 0x020000>;
-						read-only;
-					};
-
-					partition at 60000 {
-						label = "0:QSEE";
-						reg = <0x060000 0x060000>;
-						read-only;
-					};
-
-					partition at c0000 {
-						label = "0:CDT";
-						reg = <0x0c0000 0x010000>;
-						read-only;
-					};
-
-					partition at d0000 {
-						label = "0:DDRPARAMS";
-						reg = <0x0d0000 0x010000>;
-						read-only;
-					};
-
-					partition at e0000 {
-						label = "u-boot-env";
-						reg = <0x0e0000 0x010000>;
-					};
-
-					partition at f0000 {
-						label = "u-boot";
-						reg = <0x0f0000 0x080000>;
-						read-only;
-					};
-
-					partition at 170000 {
-						label = "0:ART";
-						reg = <0x170000 0x010000>;
-						read-only;
-
-						nvmem-layout {
-							compatible = "fixed-layout";
-							#address-cells = <1>;
-							#size-cells = <1>;
-
-							precal_art_1000: precal at 1000 {
-								reg = <0x1000 0x2f20>;
-							};
-
-							precal_art_5000: precal at 5000 {
-								reg = <0x5000 0x2f20>;
-							};
-						};
-					};
-				};
-			};
-
-			nand at 1 {
-				reg = <1>;
-				status = "okay";
-				compatible = "spi-nand";
-				spi-max-frequency = <24000000>;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					/* The device has 128MB, but we can only address
-					 * 64MB because of the bootloader's default settings.
-					 * This is due to the old mt29f driver,
-					 * which detected the deivce with only 64MB
-					 */
-					partition at 0 {
-						label = "ubi";
-						reg = <0x0000000 0x4000000>;
-					};
-				};
-			};
-		};
-
 		tcsr at 194b000 {
 			/* select hostmode */
 			compatible = "qcom,tcsr";
@@ -304,6 +199,111 @@
 	status = "okay";
 };
 
+&blsp1_spi1 {
+	pinctrl-0 = <&spi_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+	cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>, <&tlmm 41 GPIO_ACTIVE_HIGH>;
+	num-cs = <2>;
+
+	flash0 at 0 {
+		reg = <0>;
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <24000000>;
+		broken-flash-reset;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "0:SBL1";
+				reg = <0x000000 0x040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "0:MIBIB";
+				reg = <0x040000 0x020000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "0:QSEE";
+				reg = <0x060000 0x060000>;
+				read-only;
+			};
+
+			partition at c0000 {
+				label = "0:CDT";
+				reg = <0x0c0000 0x010000>;
+				read-only;
+			};
+
+			partition at d0000 {
+				label = "0:DDRPARAMS";
+				reg = <0x0d0000 0x010000>;
+				read-only;
+			};
+
+			partition at e0000 {
+				label = "u-boot-env";
+				reg = <0x0e0000 0x010000>;
+			};
+
+			partition at f0000 {
+				label = "u-boot";
+				reg = <0x0f0000 0x080000>;
+				read-only;
+			};
+
+			partition at 170000 {
+				label = "0:ART";
+				reg = <0x170000 0x010000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					precal_art_1000: precal at 1000 {
+						reg = <0x1000 0x2f20>;
+					};
+
+					precal_art_5000: precal at 5000 {
+						reg = <0x5000 0x2f20>;
+					};
+				};
+			};
+		};
+	};
+
+	nand at 1 {
+		reg = <1>;
+		status = "okay";
+		compatible = "spi-nand";
+		spi-max-frequency = <24000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			/* The device has 128MB, but we can only address
+			 * 64MB because of the bootloader's default settings.
+			 * This is due to the old mt29f driver,
+			 * which detected the deivce with only 64MB
+			 */
+			partition at 0 {
+				label = "ubi";
+				reg = <0x0000000 0x4000000>;
+			};
+		};
+	};
+};
+
 &watchdog {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Thu May  9 01:43:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:43:58 -0400
Subject: [openwrt/openwrt]  rockchip: switch to kernel 6.6
In-Reply-To: <171524423885.2840877.6405109850631602525@git-01.infra.openwrt.org>
References: <171524423885.2840877.6405109850631602525@git-01.infra.openwrt.org>
Message-ID: <mailman.35121.1715244246.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0341a06f1f22cf1d4de81bc5501364342a388e0f

commit 0341a06f1f22cf1d4de81bc5501364342a388e0f
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Thu May 9 16:03:08 2024 +0800

    rockchip: switch to kernel 6.6
    
    Switch to Linux kernel version 6.6 and drop configs, files and patches
    for Linux 6.1.
    
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
---
 target/linux/rockchip/Makefile                     |    3 +-
 target/linux/rockchip/armv8/config-6.1             |  709 -----------
 ...cmshc-Update-DLL-and-pre-change-delay-for.patch |   60 -
 ...f-dwcmshc-properly-determine-max-clock-on.patch |   52 -
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch |   70 --
 ...dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch |  407 -------
 ...rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch |   71 --
 ...-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch |  754 ------------
 ...ip-create-common-dtsi-for-NanoPi-R5-serie.patch | 1226 --------------------
 ...-rockchip-fix-gmac-support-for-NanoPi-R5S.patch |   49 -
 ...ip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch |   39 -
 ...4-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch |  152 ---
 ...kchip-fix-button-reset-pin-for-nanopi-r5c.patch |   37 -
 ...ip-configure-eth-pad-driver-strength-for-.patch |   33 -
 ...kchip-Add-Radxa-Compute-Module-3-IO-board.patch |  233 ----
 ...-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch |   63 -
 ...rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch |  131 ---
 ...p-Add-rk3566-based-Radxa-Compute-Module-3.patch |  386 ------
 ...chip-Enable-WiFi-BT-support-for-Radxa-CM3.patch |  134 ---
 ...kchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch |   32 -
 ...dts-rockchip-Fix-compatible-for-Radxa-CM3.patch |   45 -
 ...-rockchip-minor-whitespace-cleanup-around.patch |   28 -
 ...ernet0-alias-to-the-dts-for-RK3566-boards.patch |   28 -
 ...6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch |  689 -----------
 ...25-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch |   48 -
 ...-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch |   35 -
 ...chip-Correct-the-model-name-for-Radxa-E25.patch |   28 -
 ...rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch |   79 --
 ...m64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch |   41 -
 ...ockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch |   27 -
 ...ockchip-set-PHY-address-of-MT7531-switch-.patch |   40 -
 ...ockchip-regulator-for-sd-needs-to-be-alwa.patch |   33 -
 .../100-rockchip-use-system-LED-for-OpenWrt.patch  |   77 --
 ...hip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch |   24 -
 .../patches-6.1/105-nanopi-r4s-sd-signalling.patch |   36 -
 .../patches-6.1/106-r4s-openwrt-leds.patch         |   16 -
 ...ockchip-Update-LED-properties-for-Orange-.patch |   40 -
 ...ockchip-add-LED-configuration-to-Orange-P.patch |   24 -
 .../109-nanopc-t4-add-led-aliases.patch            |   16 -
 ...ockchip-Update-LED-properties-for-NanoPi-.patch |   45 -
 .../111-radxa-cm3-io-add-led-aliases.patch         |   36 -
 .../112-radxa-e25-add-led-aliases.patch            |   24 -
 .../300-hwrng-add-Rockchip-SoC-hwrng-driver.patch  |  339 ------
 ...s-rockchip-add-DT-entry-for-RNG-to-RK356x.patch |   56 -
 44 files changed, 1 insertion(+), 6494 deletions(-)

diff --git a/target/linux/rockchip/Makefile b/target/linux/rockchip/Makefile
index 75423f70ef..26af6855ac 100644
--- a/target/linux/rockchip/Makefile
+++ b/target/linux/rockchip/Makefile
@@ -7,8 +7,7 @@ BOARDNAME:=Rockchip
 FEATURES:=ext4 audio usb usbgadget display gpio fpu pci pcie rootfs-part boot-part squashfs
 SUBTARGETS:=armv8
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 define Target/Description
 	Build firmware image for Rockchip SoC devices.
diff --git a/target/linux/rockchip/armv8/config-6.1 b/target/linux/rockchip/armv8/config-6.1
deleted file mode 100644
index 6337245ff8..0000000000
--- a/target/linux/rockchip/armv8/config-6.1
+++ /dev/null
@@ -1,709 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
-CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=33
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ARCH_ROCKCHIP=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ARCH_WANTS_THP_SWAP=y
-CONFIG_ARC_EMAC_CORE=y
-CONFIG_ARM64=y
-CONFIG_ARM64_4K_PAGES=y
-CONFIG_ARM64_CNP=y
-CONFIG_ARM64_EPAN=y
-CONFIG_ARM64_ERRATUM_2051678=y
-CONFIG_ARM64_ERRATUM_2054223=y
-CONFIG_ARM64_ERRATUM_2067961=y
-CONFIG_ARM64_ERRATUM_2077057=y
-CONFIG_ARM64_ERRATUM_2658417=y
-CONFIG_ARM64_ERRATUM_819472=y
-CONFIG_ARM64_ERRATUM_824069=y
-CONFIG_ARM64_ERRATUM_826319=y
-CONFIG_ARM64_ERRATUM_827319=y
-CONFIG_ARM64_ERRATUM_832075=y
-CONFIG_ARM64_ERRATUM_843419=y
-CONFIG_ARM64_ERRATUM_858921=y
-CONFIG_ARM64_HW_AFDBM=y
-CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_PAGE_SHIFT=12
-CONFIG_ARM64_PAN=y
-CONFIG_ARM64_PA_BITS=48
-CONFIG_ARM64_PA_BITS_48=y
-CONFIG_ARM64_PTR_AUTH=y
-CONFIG_ARM64_PTR_AUTH_KERNEL=y
-CONFIG_ARM64_RAS_EXTN=y
-CONFIG_ARM64_SME=y
-CONFIG_ARM64_SVE=y
-CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_VA_BITS=48
-# CONFIG_ARM64_VA_BITS_39 is not set
-CONFIG_ARM64_VA_BITS_48=y
-CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
-CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_ARCH_TIMER=y
-CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_GIC_V2M=y
-CONFIG_ARM_GIC_V3=y
-CONFIG_ARM_GIC_V3_ITS=y
-CONFIG_ARM_GIC_V3_ITS_PCI=y
-CONFIG_ARM_MHU=y
-CONFIG_ARM_MHU_V2=y
-CONFIG_ARM_PSCI_CPUIDLE=y
-CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
-CONFIG_ARM_PSCI_FW=y
-# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set
-CONFIG_ARM_SCMI_CPUFREQ=y
-CONFIG_ARM_SCMI_HAVE_SHMEM=y
-CONFIG_ARM_SCMI_HAVE_TRANSPORT=y
-CONFIG_ARM_SCMI_POWER_CONTROL=y
-CONFIG_ARM_SCMI_POWER_DOMAIN=y
-CONFIG_ARM_SCMI_PROTOCOL=y
-CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y
-CONFIG_ARM_SCMI_TRANSPORT_SMC=y
-CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE=y
-CONFIG_ARM_SCPI_CPUFREQ=y
-CONFIG_ARM_SCPI_POWER_DOMAIN=y
-CONFIG_ARM_SCPI_PROTOCOL=y
-CONFIG_ARM_SMMU=y
-CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y
-# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
-CONFIG_ARM_SMMU_V3=y
-# CONFIG_ARM_SMMU_V3_SVA is not set
-CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_GPIO=y
-CONFIG_BACKLIGHT_PWM=y
-CONFIG_BLK_DEV_BSG=y
-CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BLK_DEV_BSG_COMMON=y
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_BLK_DEV_INTEGRITY=y
-CONFIG_BLK_DEV_INTEGRITY_T10=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_NVME=y
-CONFIG_BLK_DEV_PCIESSD_MTIP32XX=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_BLK_PM=y
-CONFIG_BRCMSTB_GISB_ARB=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_CC_HAVE_SHADOW_CALL_STACK=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
-CONFIG_CC_NO_ARRAY_BOUNDS=y
-CONFIG_CHARGER_GPIO=y
-# CONFIG_CHARGER_RK817 is not set
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLK_PX30=y
-CONFIG_CLK_RK3308=y
-CONFIG_CLK_RK3328=y
-CONFIG_CLK_RK3368=y
-CONFIG_CLK_RK3399=y
-CONFIG_CLK_RK3568=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-# CONFIG_CMA_SYSFS is not set
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_RK808=y
-CONFIG_COMMON_CLK_ROCKCHIP=y
-CONFIG_COMMON_CLK_SCMI=y
-CONFIG_COMMON_CLK_SCPI=y
-CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CONTEXT_TRACKING=y
-CONFIG_CONTEXT_TRACKING_IDLE=y
-CONFIG_CONTIG_ALLOC=y
-CONFIG_CPUFREQ_DT=y
-CONFIG_CPUFREQ_DT_PLATDEV=y
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
-CONFIG_CPU_FREQ_GOV_ATTR_SET=y
-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
-# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
-# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
-CONFIG_CPU_ISOLATION=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_THERMAL=y
-CONFIG_CRASH_CORE=y
-CONFIG_CRASH_DUMP=y
-CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
-CONFIG_CRC64=y
-CONFIG_CRC64_ROCKSOFT=y
-CONFIG_CRC_T10DIF=y
-CONFIG_CROSS_MEMORY_ATTACH=y
-CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_CE=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
-CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CRC64_ROCKSOFT=y
-CONFIG_CRYPTO_CRCT10DIF=y
-CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
-CONFIG_CRYPTO_CRYPTD=y
-# CONFIG_CRYPTO_DEV_ROCKCHIP is not set
-CONFIG_CRYPTO_GHASH_ARM64_CE=y
-CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_SHA1=y
-CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_POLYVAL=y
-CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_SM3=y
-CONFIG_CRYPTO_SM3_NEON=y
-CONFIG_CRYPTO_SM4=y
-CONFIG_CRYPTO_SM4_ARM64_CE_BLK=y
-CONFIG_CRYPTO_SM4_ARM64_NEON_BLK=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEVFREQ_GOV_PASSIVE is not set
-CONFIG_DEVFREQ_GOV_PERFORMANCE=y
-CONFIG_DEVFREQ_GOV_POWERSAVE=y
-CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
-CONFIG_DEVFREQ_GOV_USERSPACE=y
-# CONFIG_DEVFREQ_THERMAL is not set
-CONFIG_DEVMEM=y
-# CONFIG_DEVPORT is not set
-CONFIG_DMADEVICES=y
-CONFIG_DMA_CMA=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DNOTIFY=y
-CONFIG_DTC=y
-CONFIG_DT_IDLE_GENPD=y
-CONFIG_DT_IDLE_STATES=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_DWMAC_DWC_QOS_ETH=y
-CONFIG_DWMAC_GENERIC=y
-CONFIG_DWMAC_ROCKCHIP=y
-CONFIG_DW_WATCHDOG=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EEPROM_AT24=y
-CONFIG_EMAC_ROCKCHIP=y
-CONFIG_ENERGY_MODEL=y
-CONFIG_EXCLUSIVE_SYSTEM_RAM=y
-CONFIG_EXT4_FS=y
-CONFIG_EXT4_FS_POSIX_ACL=y
-CONFIG_EXTCON=y
-CONFIG_F2FS_FS=y
-CONFIG_FANOTIFY=y
-CONFIG_FHANDLE=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-# CONFIG_FORTIFY_SOURCE is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
-CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IOREMAP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PHY=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_DWAPB=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_GPIO_ROCKCHIP=y
-CONFIG_GPIO_SYSCON=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_HWMON=y
-CONFIG_HWSPINLOCK=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_ROCKCHIP=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_I2C_RK3X=y
-CONFIG_IIO=y
-# CONFIG_IIO_SCMI is not set
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-CONFIG_INDIRECT_PIO=y
-CONFIG_INPUT=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_LEDS=y
-CONFIG_INPUT_MATRIXKMAP=y
-CONFIG_INPUT_RK805_PWRKEY=y
-CONFIG_IOMMU_API=y
-# CONFIG_IOMMU_DEBUGFS is not set
-# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
-# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
-CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
-CONFIG_IOMMU_DMA=y
-CONFIG_IOMMU_IOVA=y
-CONFIG_IOMMU_IO_PGTABLE=y
-# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
-# CONFIG_IOMMU_IO_PGTABLE_DART is not set
-CONFIG_IOMMU_IO_PGTABLE_LPAE=y
-# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
-CONFIG_IOMMU_SUPPORT=y
-# CONFIG_IO_STRICT_DEVMEM is not set
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_MSI_IOMMU=y
-CONFIG_IRQ_TIME_ACCOUNTING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JUMP_LABEL=y
-CONFIG_KALLSYMS=y
-CONFIG_KCMP=y
-CONFIG_KEXEC_CORE=y
-CONFIG_KEXEC_FILE=y
-CONFIG_KSM=y
-# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_PWM=y
-CONFIG_LEDS_SYSCON=y
-CONFIG_LEDS_TRIGGER_CPU=y
-CONFIG_LEDS_TRIGGER_PANIC=y
-CONFIG_LIBCRC32C=y
-CONFIG_LIBFDT=y
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_LOG_BUF_SHIFT=19
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MAGIC_SYSRQ_SERIAL=y
-CONFIG_MAILBOX=y
-# CONFIG_MAILBOX_TEST is not set
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_BUS_MUX=y
-CONFIG_MDIO_BUS_MUX_GPIO=y
-CONFIG_MDIO_BUS_MUX_MMIOREG=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEDIATEK_GE_PHY=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY_ISOLATION=y
-CONFIG_MFD_CORE=y
-# CONFIG_MFD_KHADAS_MCU is not set
-CONFIG_MFD_RK808=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_BLOCK_MINORS=32
-CONFIG_MMC_CQHCI=y
-CONFIG_MMC_DW=y
-# CONFIG_MMC_DW_BLUEFIELD is not set
-# CONFIG_MMC_DW_EXYNOS is not set
-# CONFIG_MMC_DW_HI3798CV200 is not set
-# CONFIG_MMC_DW_K3 is not set
-# CONFIG_MMC_DW_PCI is not set
-CONFIG_MMC_DW_PLTFM=y
-CONFIG_MMC_DW_ROCKCHIP=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_OF_ARASAN=y
-CONFIG_MMC_SDHCI_OF_DWCMSHC=y
-# CONFIG_MMC_SDHCI_PCI is not set
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MODULES_USE_ELF_RELA=y
-CONFIG_MOTORCOMM_PHY=y
-CONFIG_MQ_IOSCHED_DEADLINE=y
-# CONFIG_MTD_CFI is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
-CONFIG_MTD_SPLIT_FIRMWARE=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_MT7530=y
-CONFIG_NET_DSA_MT7530_MDIO=y
-CONFIG_NET_DSA_MT7530_MMIO=y
-CONFIG_NET_DSA_TAG_MTK=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NET_SWITCHDEV=y
-CONFIG_NLS=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NR_CPUS=256
-CONFIG_NVMEM=y
-CONFIG_NVMEM_ROCKCHIP_EFUSE=y
-# CONFIG_NVMEM_ROCKCHIP_OTP is not set
-CONFIG_NVMEM_SYSFS=y
-CONFIG_NVME_CORE=y
-# CONFIG_NVME_HWMON is not set
-# CONFIG_NVME_MULTIPATH is not set
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_DYNAMIC=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IOMMU=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OF_OVERLAY=y
-CONFIG_OF_RESOLVE=y
-# CONFIG_OVERLAY_FS_XINO_AUTO is not set
-CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
-CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-# CONFIG_PANIC_ON_OOPS is not set
-CONFIG_PANIC_ON_OOPS_VALUE=0
-CONFIG_PANIC_TIMEOUT=0
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_PARTITION_PERCPU=y
-CONFIG_PCI=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_DW=y
-CONFIG_PCIE_DW_HOST=y
-CONFIG_PCIE_PME=y
-CONFIG_PCIE_ROCKCHIP=y
-CONFIG_PCIE_ROCKCHIP_DW_HOST=y
-CONFIG_PCIE_ROCKCHIP_HOST=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
-CONFIG_PCI_STUB=y
-CONFIG_PCS_MTK_LYNXI=y
-CONFIG_PCS_XPCS=y
-CONFIG_PGTABLE_LEVELS=4
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PHY_ROCKCHIP_DP=y
-# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
-CONFIG_PHY_ROCKCHIP_EMMC=y
-# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
-# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
-# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
-CONFIG_PHY_ROCKCHIP_INNO_USB2=y
-CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY=y
-CONFIG_PHY_ROCKCHIP_PCIE=y
-CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
-CONFIG_PHY_ROCKCHIP_TYPEC=y
-CONFIG_PHY_ROCKCHIP_USB=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_RK805=y
-CONFIG_PINCTRL_ROCKCHIP=y
-# CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PL330_DMA=y
-CONFIG_PLATFORM_MHU=y
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_DEVFREQ=y
-# CONFIG_PM_DEVFREQ_EVENT is not set
-CONFIG_PM_GENERIC_DOMAINS=y
-CONFIG_PM_GENERIC_DOMAINS_OF=y
-CONFIG_PM_OPP=y
-CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_POWER_SUPPLY_HWMON=y
-CONFIG_PPS=y
-CONFIG_PREEMPT=y
-CONFIG_PREEMPTION=y
-CONFIG_PREEMPT_BUILD=y
-CONFIG_PREEMPT_COUNT=y
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_RCU=y
-CONFIG_PRINTK_TIME=y
-# CONFIG_PRINT_QUOTA_WARNING is not set
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_ROCKCHIP=y
-CONFIG_PWM_SYSFS=y
-# CONFIG_QFMT_V2 is not set
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_QUOTA=y
-CONFIG_QUOTACTL=y
-CONFIG_RAID_ATTRS=y
-CONFIG_RANDOMIZE_BASE=y
-CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
-CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RAS=y
-CONFIG_RATIONAL=y
-# CONFIG_RAVE_SP_CORE is not set
-CONFIG_RCU_TRACE=y
-CONFIG_REALTEK_PHY=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_IRQ=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_ARM_SCMI=y
-CONFIG_REGULATOR_FAN53555=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_GPIO=y
-CONFIG_REGULATOR_PWM=y
-CONFIG_REGULATOR_RK808=y
-CONFIG_RELOCATABLE=y
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RESET_SCMI=y
-CONFIG_RFS_ACCEL=y
-CONFIG_ROCKCHIP_GRF=y
-CONFIG_ROCKCHIP_IODOMAIN=y
-CONFIG_ROCKCHIP_IOMMU=y
-CONFIG_ROCKCHIP_MBOX=y
-CONFIG_ROCKCHIP_PHY=y
-CONFIG_ROCKCHIP_PM_DOMAINS=y
-# CONFIG_ROCKCHIP_SARADC is not set
-CONFIG_ROCKCHIP_THERMAL=y
-CONFIG_ROCKCHIP_TIMER=y
-CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
-CONFIG_RPS=y
-CONFIG_RSEQ=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_HYM8563=y
-CONFIG_RTC_DRV_RK808=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RTC_NVMEM=y
-# CONFIG_RUNTIME_TESTING_MENU is not set
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-CONFIG_SCHED_MC=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-# CONFIG_SCSI_LOWLEVEL is not set
-# CONFIG_SCSI_PROC_FS is not set
-CONFIG_SCSI_SAS_ATTRS=y
-CONFIG_SCSI_SAS_HOST_SMP=y
-CONFIG_SCSI_SAS_LIBSAS=y
-# CONFIG_SECURITY_DMESG_RESTRICT is not set
-CONFIG_SENSORS_ARM_SCMI=y
-CONFIG_SENSORS_ARM_SCPI=y
-CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
-CONFIG_SERIAL_8250_DW=y
-CONFIG_SERIAL_8250_DWLIB=y
-CONFIG_SERIAL_8250_EXAR=y
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_FSL=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_SERIAL_DEV_BUS=y
-CONFIG_SERIAL_DEV_CTRL_TTYPORT=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIO=y
-CONFIG_SERIO_AMBAKMI=y
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SG_POOL=y
-CONFIG_SMP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SOFTIRQ_ON_OWN_STACK=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_DYNAMIC=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SPI_ROCKCHIP=y
-CONFIG_SPI_ROCKCHIP_SFC=y
-CONFIG_SPI_SPIDEV=y
-# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FILE_CACHE=y
-# CONFIG_SQUASHFS_FILE_DIRECT is not set
-CONFIG_SRAM=y
-CONFIG_SRCU=y
-CONFIG_STACKPROTECTOR=y
-CONFIG_STACKPROTECTOR_PER_TASK=y
-CONFIG_STACKPROTECTOR_STRONG=y
-CONFIG_STACKTRACE=y
-CONFIG_STMMAC_ETH=y
-CONFIG_STMMAC_PLATFORM=y
-CONFIG_STRICT_DEVMEM=y
-# CONFIG_STRIP_ASM_SYMS is not set
-# CONFIG_SWAP is not set
-CONFIG_SWIOTLB=y
-CONFIG_SWPHY=y
-CONFIG_SYNC_FILE=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYSFS_SYSCALL=y
-# CONFIG_TEXTSEARCH is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
-CONFIG_THERMAL_EMULATION=y
-CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y
-CONFIG_THERMAL_GOV_STEP_WISE=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_OF=y
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TRACE_CLOCK=y
-CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
-CONFIG_TRANSPARENT_HUGEPAGE=y
-CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
-# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
-CONFIG_TRANS_TABLE=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_TYPEC=y
-# CONFIG_TYPEC_ANX7411 is not set
-CONFIG_TYPEC_FUSB302=y
-# CONFIG_TYPEC_HD3SS3220 is not set
-# CONFIG_TYPEC_MUX_FSA4480 is not set
-# CONFIG_TYPEC_MUX_PI3USB30532 is not set
-# CONFIG_TYPEC_RT1719 is not set
-# CONFIG_TYPEC_STUSB160X is not set
-# CONFIG_TYPEC_TCPCI is not set
-CONFIG_TYPEC_TCPM=y
-# CONFIG_TYPEC_TPS6598X is not set
-# CONFIG_TYPEC_WUSB3801 is not set
-# CONFIG_UACCE is not set
-# CONFIG_UCLAMP_TASK is not set
-# CONFIG_UEVENT_HELPER is not set
-CONFIG_UNINLINE_SPIN_UNLOCK=y
-CONFIG_UNMAP_KERNEL_AT_EL0=y
-CONFIG_USB=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_DWC3=y
-CONFIG_USB_DWC3_HOST=y
-CONFIG_USB_DWC3_OF_SIMPLE=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_HCD_PLATFORM=y
-# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_HID=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_PLATFORM=y
-CONFIG_USB_PHY=y
-CONFIG_USB_ROLE_SWITCH=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_ULPI=y
-CONFIG_USB_ULPI_BUS=y
-CONFIG_USB_ULPI_VIEWPORT=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_PLATFORM=y
-# CONFIG_VIRTIO_MENU is not set
-CONFIG_VMAP_STACK=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XARRAY_MULTI=y
-CONFIG_XPS=y
-CONFIG_XXHASH=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_ARMTHUMB=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZONE_DMA32=y
diff --git a/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch b/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
deleted file mode 100644
index 2bb542be36..0000000000
--- a/target/linux/rockchip/patches-6.1/001-v6.3-mmc-sdhci-of-dwcmshc-Update-DLL-and-pre-change-delay-for.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From b75a52b0dda353aeefb4830a320589a363f49579 Mon Sep 17 00:00:00 2001
-From: Shawn Lin <shawn.lin at rock-chips.com>
-Date: Thu, 2 Feb 2023 08:35:16 +0800
-Subject: [PATCH] mmc: sdhci-of-dwcmshc: Update DLL and pre-change delay for
- rockchip platform
-
-For Rockchip platform, DLL bypass bit and start bit need to be set if
-DLL is not locked. And adjust pre-change delay to 0x3 for better signal
-test result.
-
-Signed-off-by: Shawn Lin <shawn.lin at rock-chips.com>
-Link: https://lore.kernel.org/r/1675298118-64243-2-git-send-email-shawn.lin at rock-chips.com
-Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -48,6 +48,7 @@
- #define DWCMSHC_EMMC_DLL_RXCLK_SRCSEL	29
- #define DWCMSHC_EMMC_DLL_START_POINT	16
- #define DWCMSHC_EMMC_DLL_INC		8
-+#define DWCMSHC_EMMC_DLL_BYPASS		BIT(24)
- #define DWCMSHC_EMMC_DLL_DLYENA		BIT(27)
- #define DLL_TXCLK_TAPNUM_DEFAULT	0x10
- #define DLL_TXCLK_TAPNUM_90_DEGREES	0xA
-@@ -60,6 +61,7 @@
- #define DLL_RXCLK_NO_INVERTER		1
- #define DLL_RXCLK_INVERTER		0
- #define DLL_CMDOUT_TAPNUM_90_DEGREES	0x8
-+#define DLL_RXCLK_ORI_GATE		BIT(31)
- #define DLL_CMDOUT_TAPNUM_FROM_SW	BIT(24)
- #define DLL_CMDOUT_SRC_CLK_NEG		BIT(28)
- #define DLL_CMDOUT_EN_SRC_CLK_NEG	BIT(29)
-@@ -234,9 +236,12 @@ static void dwcmshc_rk3568_set_clock(str
- 	sdhci_writel(host, extra, reg);
- 
- 	if (clock <= 52000000) {
--		/* Disable DLL and reset both of sample and drive clock */
--		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_CTRL);
--		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_RXCLK);
-+		/*
-+		 * Disable DLL and reset both of sample and drive clock.
-+		 * The bypass bit and start bit need to be set if DLL is not locked.
-+		 */
-+		sdhci_writel(host, DWCMSHC_EMMC_DLL_BYPASS | DWCMSHC_EMMC_DLL_START, DWCMSHC_EMMC_DLL_CTRL);
-+		sdhci_writel(host, DLL_RXCLK_ORI_GATE, DWCMSHC_EMMC_DLL_RXCLK);
- 		sdhci_writel(host, 0, DWCMSHC_EMMC_DLL_TXCLK);
- 		sdhci_writel(host, 0, DECMSHC_EMMC_DLL_CMDOUT);
- 		/*
-@@ -279,7 +284,7 @@ static void dwcmshc_rk3568_set_clock(str
- 	}
- 
- 	extra = 0x1 << 16 | /* tune clock stop en */
--		0x2 << 17 | /* pre-change delay */
-+		0x3 << 17 | /* pre-change delay */
- 		0x3 << 19;  /* post-change delay */
- 	sdhci_writel(host, extra, dwc_priv->vendor_specific_area1 + DWCMSHC_EMMC_ATCTRL);
- 
diff --git a/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch b/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
deleted file mode 100644
index 9d9c1b5c1c..0000000000
--- a/target/linux/rockchip/patches-6.1/002-v6.4-mmc-sdhci-of-dwcmshc-properly-determine-max-clock-on.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 49502408007b77ff290ce62e6218cefaeedcb31a Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul at gmail.com>
-Date: Thu, 9 Mar 2023 17:03:49 -0800
-Subject: [PATCH] mmc: sdhci-of-dwcmshc: properly determine max clock on
- Rockchip
-
-Currently .get_max_clock returns the current clock rate for cclk_emmc
-on rk35xx, thus max clock gets set to whatever bootloader set it to.
-
-In case of u-boot, it is intentionally reset to 50 MHz if it boots
-from eMMC, see mmc_deinit() in u-boot sources. As a result, HS200 and
-HS400 modes are never selected by Linux, because dwcmshc_rk35xx_postinit
-clears appropriate caps if host->mmc->f_max is < 52MHz
-
-cclk_emmc is not a fixed clock on rk35xx, so using
-sdhci_pltfm_clk_get_max_clock is not appropriate here.
-
-Implement rk35xx_get_max_clock that returns actual max clock for cclk_emmc.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Acked-by: Adrian Hunter <adrian.hunter at intel.com>
-Link: https://lore.kernel.org/r/20230310010349.509132-1-anarsoul at gmail.com
-Signed-off-by: Ulf Hansson <ulf.hansson at linaro.org>
----
- drivers/mmc/host/sdhci-of-dwcmshc.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
---- a/drivers/mmc/host/sdhci-of-dwcmshc.c
-+++ b/drivers/mmc/host/sdhci-of-dwcmshc.c
-@@ -126,6 +126,13 @@ static unsigned int dwcmshc_get_max_cloc
- 		return pltfm_host->clock;
- }
- 
-+static unsigned int rk35xx_get_max_clock(struct sdhci_host *host)
-+{
-+	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
-+
-+	return clk_round_rate(pltfm_host->clk, ULONG_MAX);
-+}
-+
- static void dwcmshc_check_auto_cmd23(struct mmc_host *mmc,
- 				     struct mmc_request *mrq)
- {
-@@ -343,7 +350,7 @@ static const struct sdhci_ops sdhci_dwcm
- 	.set_clock		= dwcmshc_rk3568_set_clock,
- 	.set_bus_width		= sdhci_set_bus_width,
- 	.set_uhs_signaling	= dwcmshc_set_uhs_signaling,
--	.get_max_clock		= sdhci_pltfm_clk_get_max_clock,
-+	.get_max_clock		= rk35xx_get_max_clock,
- 	.reset			= rk35xx_sdhci_reset,
- 	.adma_write_desc	= dwcmshc_adma_write_desc,
- };
diff --git a/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch b/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
deleted file mode 100644
index 049c8ad1af..0000000000
--- a/target/linux/rockchip/patches-6.1/006-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 004589ff9df5b75672a78b6c3c4cba93202b14c9 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 25 Mar 2023 15:40:20 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C
-
-The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC
-chip changed from rtl8211e to yt8521s, and otherwise identical to R2S.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230325074022.9818-3-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |  1 +
- .../boot/dts/rockchip/rk3328-nanopi-r2c.dts   | 40 +++++++++++++++++++
- 2 files changed, 41 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -10,6 +10,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3318-a9
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
-@@ -0,0 +1,40 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+/*
-+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
-+ * (http://www.friendlyarm.com)
-+ *
-+ * Copyright (c) 2021-2023 Tianling Shen <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include "rk3328-nanopi-r2s.dts"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R2C";
-+	compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
-+};
-+
-+&gmac2io {
-+	phy-handle = <&yt8521s>;
-+	tx_delay = <0x22>;
-+	rx_delay = <0x12>;
-+
-+	mdio {
-+		/delete-node/ ethernet-phy at 1;
-+
-+		yt8521s: ethernet-phy at 3 {
-+			compatible = "ethernet-phy-ieee802.3-c22";
-+			reg = <3>;
-+
-+			motorcomm,clk-out-frequency-hz = <125000000>;
-+			motorcomm,keep-pll-enabled;
-+			motorcomm,auto-sleep-disabled;
-+
-+			pinctrl-0 = <&eth_phy_reset_pin>;
-+			pinctrl-names = "default";
-+			reset-assert-us = <10000>;
-+			reset-deassert-us = <50000>;
-+			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch b/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
deleted file mode 100644
index 4e48218b89..0000000000
--- a/target/linux/rockchip/patches-6.1/007-v6.3-arm64-dts-rockchip-rk3328-Add-Orange-Pi-R1-Plus.patch
+++ /dev/null
@@ -1,407 +0,0 @@
-From 51712e1d014aaaa4c6e1e7e84932d58b5c0f59ed Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sat, 3 Dec 2022 15:41:49 +0800
-Subject: [PATCH] arm64: dts: rockchip: rk3328: Add 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.
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Link: https://lore.kernel.org/r/20221203074149.11543-3-amadeus at jmu.edu.cn
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../dts/rockchip/rk3328-orangepi-r1-plus.dts  | 373 ++++++++++++++++++
- 2 files changed, 374 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <mail at david-bauer.net>
-+ */
-+
-+/dts-v1/;
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+#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 = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-1 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "heartbeat";
-+		};
-+
-+		led-2 {
-+			function = LED_FUNCTION_WAN;
-+			color = <LED_COLOR_ID_GREEN>;
-+			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 at 1 {
-+			reg = <1>;
-+			pinctrl-0 = <&eth_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 at 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 at 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 at 2 {
-+		compatible = "usbbda,8153";
-+		reg = <2>;
-+	};
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host0_ohci {
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch b/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
deleted file mode 100644
index 78d3d51a17..0000000000
--- a/target/linux/rockchip/patches-6.1/008-v6.4-arm64-dts-rockchip-Add-Xunlong-OrangePi-R1-Plus-LTS.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 387b3bbac5ea6a0a105d685237f033ffe0f184f1 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 25 Mar 2023 15:40:22 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add Xunlong OrangePi 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 otherwise
-identical to OrangePi R1 Plus.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230325074022.9818-5-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |  1 +
- .../rockchip/rk3328-orangepi-r1-plus-lts.dts  | 40 +++++++++++++++++++
- 2 files changed, 41 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-ev
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
-+ */
-+
-+/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 at 1;
-+
-+		yt8531c: ethernet-phy at 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 = <&eth_phy_reset_pin>;
-+			pinctrl-names = "default";
-+			reset-assert-us = <15000>;
-+			reset-deassert-us = <50000>;
-+			reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch b/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
deleted file mode 100644
index 3d502a65b6..0000000000
--- a/target/linux/rockchip/patches-6.1/009-v6.4-arm64-dts-rockchip-Add-FriendlyElec-Nanopi-R5S.patch
+++ /dev/null
@@ -1,754 +0,0 @@
-From c6629b9a6738a64507478527da6c7b83c10a6d2c Mon Sep 17 00:00:00 2001
-From: Vasily Khoruzhick <anarsoul at gmail.com>
-Date: Tue, 7 Mar 2023 22:32:40 -0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyElec Nanopi R5S
-
-FriendlyElec 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
-
-Based on Tianling Shen's <cnsztl at gmail.com> work.
-
-Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>
-Link: https://lore.kernel.org/r/20230308063240.107178-2-anarsoul at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 713 ++++++++++++++++++
- 2 files changed, 714 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -74,4 +74,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -0,0 +1,713 @@
-+// 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 <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#include "rk3568.dtsi"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R5S";
-+	compatible = "friendlyarm,nanopi-r5s", "rockchip,rk3568";
-+
-+	aliases {
-+		ethernet0 = &gmac0;
-+		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>;
-+			};
-+		};
-+	};
-+
-+	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 = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			function-enumerator = <1>;
-+			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-lan2 {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			function-enumerator = <2>;
-+			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		power_led: led-power {
-+			color = <LED_COLOR_ID_RED>;
-+			function = LED_FUNCTION_POWER;
-+			linux,default-trigger = "heartbeat";
-+			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_WAN;
-+			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+
-+	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>;
-+};
-+
-+&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-id";
-+	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";
-+};
-+
-+&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 at 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 at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#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-always-on;
-+				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 at 51 {
-+		compatible = "haoyu,hym8563";
-+		reg = <0x51>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <0>;
-+		clock-output-names = "rtcic_32kout";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&hym8563_int>;
-+		wakeup-source;
-+	};
-+};
-+
-+&i2s0_8ch {
-+	status = "okay";
-+};
-+
-+&i2s1_8ch {
-+	rockchip,trcm-sync-tx-only;
-+	status = "okay";
-+};
-+
-+&mdio0 {
-+	rgmii_phy0: ethernet-phy at 1 {
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <1>;
-+		pinctrl-0 = <&eth_phy0_reset_pin>;
-+		pinctrl-names = "default";
-+		reset-assert-us = <10000>;
-+		reset-deassert-us = <50000>;
-+		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
-+	};
-+};
-+
-+&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_down>;
-+		};
-+	};
-+
-+	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>;
-+		};
-+	};
-+
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch b/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
deleted file mode 100644
index cf9fe06ad0..0000000000
--- a/target/linux/rockchip/patches-6.1/010-v6.4-arm64-dts-rockchip-create-common-dtsi-for-NanoPi-R5-serie.patch
+++ /dev/null
@@ -1,1226 +0,0 @@
-From c8ec73b05a95d9f0969ae0f28dd8799a54fcdfc7 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:41 +0800
-Subject: [PATCH] arm64: dts: rockchip: create common dtsi for NanoPi R5 series
-
-Create common dtsi for the FriendlyElec NanoPi R5 series.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-2-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dts   | 575 +----------------
- .../boot/dts/rockchip/rk3568-nanopi-r5s.dtsi  | 596 ++++++++++++++++++
- 2 files changed, 597 insertions(+), 574 deletions(-)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -7,12 +7,7 @@
-  */
- 
- /dts-v1/;
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/input/input.h>
--#include <dt-bindings/leds/common.h>
--#include <dt-bindings/pinctrl/rockchip.h>
--#include <dt-bindings/soc/rockchip,vop2.h>
--#include "rk3568.dtsi"
-+#include "rk3568-nanopi-r5s.dtsi"
- 
- / {
- 	model = "FriendlyElec NanoPi R5S";
-@@ -20,23 +15,6 @@
- 
- 	aliases {
- 		ethernet0 = &gmac0;
--		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>;
--			};
--		};
- 	};
- 
- 	gpio-leds {
-@@ -71,130 +49,6 @@
- 			gpios = <&gpio2 RK_PC1 GPIO_ACTIVE_HIGH>;
- 		};
- 	};
--
--	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>;
- };
- 
- &gmac0 {
-@@ -219,292 +73,6 @@
- 	status = "okay";
- };
- 
--&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 at 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 at 20 {
--		compatible = "rockchip,rk809";
--		reg = <0x20>;
--		interrupt-parent = <&gpio0>;
--		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
--		#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-always-on;
--				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 at 51 {
--		compatible = "haoyu,hym8563";
--		reg = <0x51>;
--		interrupt-parent = <&gpio0>;
--		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
--		#clock-cells = <0>;
--		clock-output-names = "rtcic_32kout";
--		pinctrl-names = "default";
--		pinctrl-0 = <&hym8563_int>;
--		wakeup-source;
--	};
--};
--
--&i2s0_8ch {
--	status = "okay";
--};
--
--&i2s1_8ch {
--	rockchip,trcm-sync-tx-only;
--	status = "okay";
--};
--
- &mdio0 {
- 	rgmii_phy0: ethernet-phy at 1 {
- 		compatible = "ethernet-phy-ieee802.3-c22";
-@@ -568,146 +136,5 @@
- 			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
- 		};
- 	};
--
--	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 at ROCKCHIP_VOP2_EP_HDMI0 {
--		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
--		remote-endpoint = <&hdmi_in_vp0>;
--	};
--};
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-@@ -0,0 +1,596 @@
-+// 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 <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#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 at 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 at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#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-always-on;
-+				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 at 51 {
-+		compatible = "haoyu,hym8563";
-+		reg = <0x51>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <0>;
-+		clock-output-names = "rtcic_32kout";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&hym8563_int>;
-+		wakeup-source;
-+	};
-+};
-+
-+&i2s0_8ch {
-+	status = "okay";
-+};
-+
-+&i2s1_8ch {
-+	rockchip,trcm-sync-tx-only;
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch b/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
deleted file mode 100644
index 47f76d54e7..0000000000
--- a/target/linux/rockchip/patches-6.1/011-v6.4-arm64-dts-rockchip-fix-gmac-support-for-NanoPi-R5S.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 31425b1fadb2040b359e52ffc24c049a78d56c96 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:44 +0800
-Subject: [PATCH] arm64: dts: rockchip: fix gmac support for NanoPi R5S
-
-- Changed phy-mode to rgmii.
-
-- Fixed pull type in pinctrl for gmac0.
-
-- Removed duplicate properties in mdio node.
-  These properties are defined in the gmac0 node already.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-5-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 7 ++-----
- 1 file changed, 2 insertions(+), 5 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -57,7 +57,7 @@
- 	assigned-clock-rates = <0>, <125000000>;
- 	clock_in_out = "output";
- 	phy-handle = <&rgmii_phy0>;
--	phy-mode = "rgmii-id";
-+	phy-mode = "rgmii";
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&gmac0_miim
- 		     &gmac0_tx_bus2
-@@ -79,9 +79,6 @@
- 		reg = <1>;
- 		pinctrl-0 = <&eth_phy0_reset_pin>;
- 		pinctrl-names = "default";
--		reset-assert-us = <10000>;
--		reset-deassert-us = <50000>;
--		reset-gpios = <&gpio0 RK_PC4 GPIO_ACTIVE_LOW>;
- 	};
- };
- 
-@@ -115,7 +112,7 @@
- &pinctrl {
- 	gmac0 {
- 		eth_phy0_reset_pin: eth-phy0-reset-pin {
--			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
-+			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
- 		};
- 	};
- 
diff --git a/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch b/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
deleted file mode 100644
index 48021b226a..0000000000
--- a/target/linux/rockchip/patches-6.1/012-v6.4-arm64-dts-rockchip-remove-I2S1-TDM-node-for-the-NanoPi-R5.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 975e9bbad11950fc8276f1fa260d8bf2c341aa41 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:45 +0800
-Subject: [PATCH] arm64: dts: rockchip: remove I2S1 TDM node for the NanoPi R5
- series
-
-This is for the audio output which does not exist on the boards.
-Also disable regulator-always-on for vccio_acodec since it's only
-used by the audio output.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-6-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi | 6 ------
- 1 file changed, 6 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-@@ -330,7 +330,6 @@
- 
- 			vccio_acodec: LDO_REG4 {
- 				regulator-name = "vccio_acodec";
--				regulator-always-on;
- 				regulator-min-microvolt = <3300000>;
- 				regulator-max-microvolt = <3300000>;
- 
-@@ -441,11 +440,6 @@
- 	status = "okay";
- };
- 
--&i2s1_8ch {
--	rockchip,trcm-sync-tx-only;
--	status = "okay";
--};
--
- &pcie30phy {
- 	data-lanes = <1 2>;
- 	status = "okay";
diff --git a/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch b/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
deleted file mode 100644
index 0465d80cba..0000000000
--- a/target/linux/rockchip/patches-6.1/013-v6.4-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R5C.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 05620031408ac6cfc6d5c048431827e49aa0ade1 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 18 Mar 2023 16:37:43 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add 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
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230318083745.6181-4-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-nanopi-r5c.dts   | 112 ++++++++++++++++++
- 2 files changed, 113 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -74,5 +74,6 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-ro
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/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 <cnsztl at gmail.com>
-+ */
-+
-+/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 = <KEY_RESTART>;
-+		};
-+	};
-+
-+	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 = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
-+			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		power_led: led-power {
-+			color = <LED_COLOR_ID_RED>;
-+			function = LED_FUNCTION_POWER;
-+			linux,default-trigger = "heartbeat";
-+			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_WAN;
-+			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-wlan {
-+			color = <LED_COLOR_ID_GREEN>;
-+			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>;
-+		};
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch b/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
deleted file mode 100644
index 0e59f0275b..0000000000
--- a/target/linux/rockchip/patches-6.1/014-v6.4-arm64-dts-rockchip-fix-button-reset-pin-for-nanopi-r5c.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 5325593377f07de31f7e473a9677a28a04c891f3 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Thu, 11 May 2023 00:18:50 +0800
-Subject: [PATCH] arm64: dts: rockchip: fix button reset pin for nanopi r5c
-
-The reset pin was wrongly assigned due to a copy/paste error,
-fix it to match actual gpio pin.
-
-While at it, remove a blank line from nanopi r5s dts.
-
-Fixes: 05620031408a ("arm64: dts: rockchip: Add FriendlyARM NanoPi R5C")
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230510161850.4866-1-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts | 2 +-
- arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 1 -
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-@@ -106,7 +106,7 @@
- 
- 	rockchip-key {
- 		reset_button_pin: reset-button-pin {
--			rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
-+			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_up>;
- 		};
- 	};
- };
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -134,4 +134,3 @@
- 		};
- 	};
- };
--
diff --git a/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch b/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
deleted file mode 100644
index 01efaa3a9d..0000000000
--- a/target/linux/rockchip/patches-6.1/015-v6.8-arm64-dts-rockchip-configure-eth-pad-driver-strength-for-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From fc5a80a432607d05e85bba37971712405f75c546 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 16 Dec 2023 12:07:23 +0800
-Subject: [PATCH] arm64: dts: rockchip: configure eth pad driver strength
- for orangepi r1 plus lts
-
-The default strength is not enough to provide stable connection
-under 3.3v LDO voltage.
-
-Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS")
-Cc: stable at vger.kernel.org # 6.6+
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20231216040723.17864-1-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
-@@ -26,9 +26,11 @@
- 			compatible = "ethernet-phy-ieee802.3-c22";
- 			reg = <0>;
- 
-+			motorcomm,auto-sleep-disabled;
- 			motorcomm,clk-out-frequency-hz = <125000000>;
- 			motorcomm,keep-pll-enabled;
--			motorcomm,auto-sleep-disabled;
-+			motorcomm,rx-clk-drv-microamp = <5020>;
-+			motorcomm,rx-data-drv-microamp = <5020>;
- 
- 			pinctrl-0 = <&eth_phy_reset_pin>;
- 			pinctrl-names = "default";
diff --git a/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch b/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
deleted file mode 100644
index b4a68d1558..0000000000
--- a/target/linux/rockchip/patches-6.1/016-v6.3-arm64-dts-rockchip-Add-Radxa-Compute-Module-3-IO-board.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From 096ebfb74b19f2d4bdcbc33ae02e857ff4b3e0a0 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Thu, 12 Jan 2023 16:29:02 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
-
-Radxa Compute Module 3(CM3) IO board is an application board from Radxa
-and is compatible with Raspberry Pi CM4 IO form factor.
-
-Specification:
-- 1x HDMI,
-- 2x MIPI DSI
-- 2x MIPI CSI2
-- 1x eDP
-- 1x PCIe card
-- 2x SATA
-- 2x USB 2.0 Host
-- 1x USB 3.0
-- 1x USB 2.0 OTG
-- Phone jack
-- microSD slot
-- 40-pin GPIO expansion header
-- 12V DC
-
-Radxa CM3 needs to mount on top of this IO board in order to create
-complete Radxa CM3 IO board platform.
-
-Add support for Radxa CM3 IO Board.
-
-Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
-Co-developed-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230112105902.192852-3-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 179 ++++++++++++++++++
- 2 files changed, 180 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -70,6 +70,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pi
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-radxa-cm3-io.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bpi-r2-pro.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -0,0 +1,179 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (c) 2022 Radxa Limited
-+ * Copyright (c) 2022 Amarula Solutions(India)
-+ */
-+
-+/dts-v1/;
-+#include <dt-bindings/soc/rockchip,vop2.h>
-+#include "rk3566.dtsi"
-+#include "rk3566-radxa-cm3.dtsi"
-+
-+/ {
-+	model = "Radxa Compute Module 3(CM3) IO Board";
-+	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
-+
-+	aliases {
-+		mmc1 = &sdmmc0;
-+	};
-+
-+	chosen: chosen {
-+		stdout-path = "serial2:1500000n8";
-+	};
-+
-+	hdmi-con {
-+		compatible = "hdmi-connector";
-+		type = "a";
-+
-+		port {
-+			hdmi_con_in: endpoint {
-+				remote-endpoint = <&hdmi_out_con>;
-+			};
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-1 {
-+			gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_ACTIVITY;
-+			linux,default-trigger = "heartbeat";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&pi_nled_activity>;
-+		};
-+	};
-+
-+	vcc5v0_usb30: vcc5v0-usb30-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc5v0_usb30";
-+		enable-active-high;
-+		gpio = <&gpio3 RK_PC2 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&vcc5v0_usb30_en_h>;
-+		regulator-always-on;
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc_sys>;
-+	};
-+
-+	vcca1v8_image: vcca1v8-image-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca1v8_image";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+
-+	vdda0v9_image: vdda0v9-image-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca0v9_image";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <900000>;
-+		regulator-max-microvolt = <900000>;
-+		vin-supply = <&vdda_0v9>;
-+	};
-+};
-+
-+&combphy1 {
-+	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";
-+};
-+
-+&pinctrl {
-+	leds {
-+		pi_nled_activity: pi-nled-activity {
-+			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	sdcard {
-+		sdmmc_pwren: sdmmc-pwren {
-+			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	usb {
-+		vcc5v0_usb30_en_h: vcc5v0-host-en-h {
-+			rockchip,pins = <3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&sdmmc0 {
-+	bus-width = <4>;
-+	cap-mmc-highspeed;
-+	cap-sd-highspeed;
-+	disable-wp;
-+	vqmmc-supply = <&vccio_sd>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_pwren>;
-+	status = "okay";
-+};
-+
-+&uart2 {
-+	status = "okay";
-+};
-+
-+&usb2phy0_host {
-+	phy-supply = <&vcc5v0_usb30>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_host {
-+	status = "okay";
-+};
-+
-+&usb2phy1_otg {
-+	status = "okay";
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host1_xhci {
-+	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 at ROCKCHIP_VOP2_EP_HDMI0 {
-+		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
-+		remote-endpoint = <&hdmi_in_vp0>;
-+	};
-+};
diff --git a/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch b/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
deleted file mode 100644
index d0a0aa1b69..0000000000
--- a/target/linux/rockchip/patches-6.1/016-v6.5-arm64-dts-rockchip-Add-FriendlyARM-NanoPi-R2C-Plus.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d211665c5a833873ee37e501af58adbf028e6b5f Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 13 May 2023 21:53:07 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C Plus
-
-The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
-eMMC flash (8G) included.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Link: https://lore.kernel.org/r/20230513135307.26554-2-cnsztl at gmail.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile              |  1 +
- .../boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts   | 33 ++++++++++++++++++++++
- 2 files changed, 34 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -11,6 +11,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-od
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c-plus.dts
-@@ -0,0 +1,33 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+/*
-+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
-+ * (http://www.friendlyarm.com)
-+ *
-+ * Copyright (c) 2023 Tianling Shen <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include "rk3328-nanopi-r2c.dts"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R2C Plus";
-+	compatible = "friendlyarm,nanopi-r2c-plus", "rockchip,rk3328";
-+
-+	aliases {
-+		mmc1 = &emmc;
-+	};
-+};
-+
-+&emmc {
-+	bus-width = <8>;
-+	cap-mmc-highspeed;
-+	max-frequency = <150000000>;
-+	mmc-ddr-1_8v;
-+	mmc-hs200-1_8v;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
-+	vmmc-supply = <&vcc_io_33>;
-+	vqmmc-supply = <&vcc18_emmc>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch b/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
deleted file mode 100644
index 305b5702d5..0000000000
--- a/target/linux/rockchip/patches-6.1/017-v6.3-arm64-dts-rockchip-Enable-Ethernet-for-Radxa-CM3-IO.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From cc52bfc04726a574fc4440bbbe0c710890e7040a Mon Sep 17 00:00:00 2001
-From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Date: Wed, 25 Jan 2023 21:40:22 +0530
-Subject: [PATCH] arm64: dts: rockchip: Enable Ethernet for Radxa CM3 IO
-
-Add ethernet nodes for enabling gmac1 on the Radxa CM3 IO board.
-
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230125161023.12115-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 93 +++++++++++++++++++
- 1 file changed, 93 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -21,6 +21,13 @@
- 		stdout-path = "serial2:1500000n8";
- 	};
- 
-+	gmac1_clkin: external-gmac1-clock {
-+		compatible = "fixed-clock";
-+		clock-frequency = <125000000>;
-+		clock-output-names = "gmac1_clkin";
-+		#clock-cells = <0>;
-+	};
-+
- 	hdmi-con {
- 		compatible = "hdmi-connector";
- 		type = "a";
-@@ -83,6 +90,29 @@
- 	status = "okay";
- };
- 
-+&gmac1 {
-+	assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
-+	assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
-+	assigned-clock-rates = <0>, <125000000>;
-+	clock_in_out = "input";
-+	phy-handle = <&rgmii_phy1>;
-+	phy-mode = "rgmii";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&gmac1m0_miim
-+		     &gmac1m0_tx_bus2
-+		     &gmac1m0_rx_bus2
-+		     &gmac1m0_rgmii_clk
-+		     &gmac1m0_rgmii_bus
-+		     &gmac1m0_clkinout>;
-+	snps,reset-gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
-+	snps,reset-active-low;
-+	/* Reset time is 20ms, 100ms for rtl8211f */
-+	snps,reset-delays-us = <0 20000 100000>;
-+	tx_delay = <0x46>;
-+	rx_delay = <0x2e>;
-+	status = "okay";
-+};
-+
- &hdmi {
- 	avdd-0v9-supply = <&vdda0v9_image>;
- 	avdd-1v8-supply = <&vcca1v8_image>;
-@@ -105,7 +135,70 @@
- 	status = "okay";
- };
- 
-+&mdio1 {
-+	rgmii_phy1: ethernet-phy at 0 {
-+		compatible="ethernet-phy-ieee802.3-c22";
-+		reg= <0x0>;
-+	};
-+};
-+
- &pinctrl {
-+	gmac1 {
-+		gmac1m0_miim: gmac1m0-miim {
-+			rockchip,pins =
-+				/* gmac1_mdcm0 */
-+				<3 RK_PC4 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_mdiom0 */
-+				<3 RK_PC5 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rx_bus2: gmac1m0-rx-bus2 {
-+			rockchip,pins =
-+				/* gmac1_rxd0m0 */
-+				<3 RK_PB1 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxd1m0 */
-+				<3 RK_PB2 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxdvcrsm0 */
-+				<3 RK_PB3 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_tx_bus2: gmac1m0-tx-bus2 {
-+			rockchip,pins =
-+				/* gmac1_txd0m0 */
-+				<3 RK_PB5 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd1m0 */
-+				<3 RK_PB6 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txenm0 */
-+				<3 RK_PB7 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rgmii_clk: gmac1m0-rgmii-clk {
-+			rockchip,pins =
-+				/* gmac1_rxclkm0 */
-+				<3 RK_PA7 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txclkm0 */
-+				<3 RK_PA6 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_rgmii_bus: gmac1m0-rgmii-bus {
-+			rockchip,pins =
-+				/* gmac1_rxd2m0 */
-+				<3 RK_PA4 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_rxd3m0 */
-+				<3 RK_PA5 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd2m0 */
-+				<3 RK_PA2 3 &pcfg_pull_none_drv_level_15>,
-+				/* gmac1_txd3m0 */
-+				<3 RK_PA3 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+
-+		gmac1m0_clkinout: gmac1m0-clkinout {
-+			rockchip,pins =
-+				/* gmac1_mclkinoutm0 */
-+				<3 RK_PC0 3 &pcfg_pull_none_drv_level_15>;
-+		};
-+	};
-+
- 	leds {
- 		pi_nled_activity: pi-nled-activity {
- 			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
diff --git a/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch b/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
deleted file mode 100644
index e53f7fa7e0..0000000000
--- a/target/linux/rockchip/patches-6.1/018-v6.3-arm64-dts-rockchip-Add-rk3566-based-Radxa-Compute-Module-3.patch
+++ /dev/null
@@ -1,386 +0,0 @@
-From 7469ab529bcad50490f6ff651c3e4f03bfa88fe0 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Thu, 12 Jan 2023 16:29:01 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Radxa Compute Module 3(CM3) is one of the modules from a series
-System On Module based on the Radxa ROCK 3 series and is compatible
-with Raspberry Pi CM4 pinout and form factor.
-
-Specification:
-- Rockchip RK3566
-- up to 8GB LPDDR4
-- up to 128GB high performance eMMC
-- Optional wireless LAN, 2.4GHz and 5.0GHz IEEE 802.11b/g/n/ac wireless,
-  BT 5.0, BLE with onboard and external antenna.
-- Gigabit Ethernet PHY
-
-Radxa CM3 needs to mount on top of this IO board in order to create
-complete Radxa CM3 IO board platform.
-
-Since Radxa CM3 is compatible with Raspberry Pi CM4 pinout so it is
-possible to mount Radxa CM3 on top of the?Rasberry Pi CM4 IO board.
-
-Add support for Radxa CM3.
-
-Co-developed-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230112105902.192852-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 345 ++++++++++++++++++
- 1 file changed, 345 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -0,0 +1,345 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright (c) 2022 Radxa Limited
-+ * Copyright (c) 2022 Amarula Solutions(India)
-+ */
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
-+
-+	aliases {
-+		mmc0 = &sdhci;
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-0 {
-+			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_STATUS;
-+			linux,default-trigger = "timer";
-+			default-state = "on";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&user_led2>;
-+		};
-+	};
-+
-+	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>;
-+	};
-+
-+	vcc_1v8: vcc-1v8-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc_1v8";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+
-+	vcc_3v3: vcc-3v3-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc_3v3";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_sys>;
-+	};
-+
-+	vcca_1v8: vcca-1v8-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcca_1v8";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <1800000>;
-+		regulator-max-microvolt = <1800000>;
-+		vin-supply = <&vcc_1v8_p>;
-+	};
-+};
-+
-+&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_npu>;
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+
-+	vdd_cpu: regulator at 1c {
-+		compatible = "tcs,tcs4525";
-+		reg = <0x1c>;
-+		fcs,suspend-voltage-selector = <1>;
-+		regulator-name = "vdd_cpu";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <712500>;
-+		regulator-max-microvolt = <1390000>;
-+		regulator-ramp-delay = <2300>;
-+		vin-supply = <&vcc_sys>;
-+
-+		regulator-state-mem {
-+			regulator-off-in-suspend;
-+		};
-+	};
-+
-+	rk817: pmic at 20 {
-+		compatible = "rockchip,rk817";
-+		reg = <0x20>;
-+		#clock-cells = <1>;
-+		clock-output-names = "rk817-clkout1", "rk817-clkout2";
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pmic_int_l>;
-+		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_sys>;
-+		vcc6-supply = <&vcc_sys>;
-+		vcc7-supply = <&vcc_sys>;
-+
-+		regulators {
-+			vdd_logic: DCDC_REG1 {
-+				regulator-name = "vdd_logic";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-initial-mode = <0x2>;
-+				regulator-min-microvolt = <500000>;
-+				regulator-max-microvolt = <1350000>;
-+				regulator-ramp-delay = <6001>;
-+				regulator-state-mem {
-+					regulator-on-in-suspend;
-+					regulator-suspend-microvolt = <900000>;
-+				};
-+			};
-+
-+			vdd_gpu_npu: DCDC_REG2 {
-+				regulator-name = "vdd_gpu_npu";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				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;
-+				};
-+			};
-+
-+			vcc3v3_sys: DCDC_REG4 {
-+				regulator-name = "vcc3v3_sys";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-initial-mode = <0x2>;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-state-mem {
-+					regulator-on-in-suspend;
-+					regulator-suspend-microvolt = <3300000>;
-+				};
-+			};
-+
-+			vcca1v8_pmu: LDO_REG1 {
-+				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>;
-+				};
-+			};
-+
-+			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-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vccio_sd: LDO_REG5 {
-+				regulator-name = "vccio_sd";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				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>;
-+				};
-+			};
-+
-+			vcc_1v8_p: LDO_REG7 {
-+				regulator-name = "vcc_1v8_p";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vcc1v8_dvp: LDO_REG8 {
-+				regulator-name = "vcc1v8_dvp";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+			vcc2v8_dvp: LDO_REG9 {
-+				regulator-name = "vcc2v8_dvp";
-+				regulator-always-on;
-+				regulator-boot-on;
-+				regulator-min-microvolt = <2800000>;
-+				regulator-max-microvolt = <2800000>;
-+				regulator-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+
-+		};
-+	};
-+};
-+
-+&pinctrl {
-+	pmic {
-+		pmic_int_l: pmic-int-l {
-+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-+		};
-+	};
-+
-+	leds {
-+		user_led2: user-led2 {
-+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&pmu_io_domains {
-+	pmuio1-supply = <&vcc3v3_pmu>;
-+	pmuio2-supply = <&vcc_3v3>;
-+	vccio1-supply = <&vccio_acodec>;
-+	vccio2-supply = <&vcc_1v8>;
-+	vccio3-supply = <&vccio_sd>;
-+	vccio4-supply = <&vcc_1v8>;
-+	vccio5-supply = <&vcc_3v3>;
-+	vccio6-supply = <&vcc_3v3>;
-+	vccio7-supply = <&vcc_3v3>;
-+	status = "okay";
-+};
-+
-+&saradc {
-+	vref-supply = <&vcca_1v8>;
-+	status = "okay";
-+};
-+
-+&sdhci {
-+	bus-width = <8>;
-+	max-frequency = <200000000>;
-+	mmc-hs200-1_8v;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&emmc_bus8 &emmc_clk &emmc_cmd &emmc_datastrobe>;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+};
-+
-+&usb2phy0 {
-+	status = "okay";
-+};
-+
-+&usb2phy1 {
-+	status = "okay";
-+};
-+
-+&tsadc {
-+	rockchip,hw-tshut-mode = <1>;
-+	rockchip,hw-tshut-polarity = <0>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
deleted file mode 100644
index 9855b9e1a6..0000000000
--- a/target/linux/rockchip/patches-6.1/019-v6.3-arm64-dts-rockchip-Enable-WiFi-BT-support-for-Radxa-CM3.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From af5a803bf212e077e5fb7a1d4cf6be02f74a74ca Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Wed, 25 Jan 2023 21:40:23 +0530
-Subject: [PATCH] arm64: dts: rockchip: rk3566: Enable WiFi, BT support for
- Radxa CM3
-
-Radxa Compute Module 3 has an onboard AW_CM256SM WiFi/BT module.
-
-Add nodes for enabling it.
-
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230125161023.12115-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 80 +++++++++++++++++++
- 1 file changed, 80 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -66,6 +66,15 @@
- 		regulator-max-microvolt = <1800000>;
- 		vin-supply = <&vcc_1v8_p>;
- 	};
-+
-+	sdio_pwrseq: pwrseq-sdio {
-+		compatible = "mmc-pwrseq-simple";
-+		clocks = <&rk817 1>;
-+		clock-names = "ext_clock";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&wifi_reg_on_h>;
-+		reset-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>;
-+	};
- };
- 
- &cpu0 {
-@@ -287,6 +296,20 @@
- };
- 
- &pinctrl {
-+	bluetooth {
-+		bt_host_wake_h: bt-host-wake-h {
-+			rockchip,pins = <2 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		bt_reg_on_h: bt-reg-on-h {
-+			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		bt_wake_host_h: bt-wake-host-h {
-+			rockchip,pins = <2 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
- 	pmic {
- 		pmic_int_l: pmic-int-l {
- 			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-@@ -298,6 +321,16 @@
- 			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
- 		};
- 	};
-+
-+	wifi {
-+		wifi_reg_on_h: wifi-reg-on-h {
-+			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		wifi_host_wake_h: wifi-host-wake-h {
-+			rockchip,pins = <2 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
- };
- 
- &pmu_io_domains {
-@@ -318,6 +351,34 @@
- 	status = "okay";
- };
- 
-+&sdmmc1 {
-+	#address-cells = <1>;
-+	#size-cells = <0>;
-+	bus-width = <4>;
-+	disable-wp;
-+	cap-sd-highspeed;
-+	cap-sdio-irq;
-+	keep-power-in-suspend;
-+	mmc-pwrseq = <&sdio_pwrseq>;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_clk &sdmmc1_cmd>;
-+	sd-uhs-sdr104;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+
-+	wifi at 1 {
-+		compatible = "brcm,bcm43455-fmac";
-+		reg = <1>;
-+		interrupt-parent = <&gpio2>;
-+		interrupts = <RK_PC1 IRQ_TYPE_LEVEL_HIGH>;
-+		interrupt-names = "host-wake";
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&wifi_host_wake_h>;
-+	};
-+};
-+
- &sdhci {
- 	bus-width = <8>;
- 	max-frequency = <200000000>;
-@@ -330,6 +391,25 @@
- 	status = "okay";
- };
- 
-+&uart1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart1m0_ctsn &uart1m0_rtsn &uart1m0_xfer>;
-+	status = "okay";
-+
-+	bluetooth {
-+		compatible = "brcm,bcm4345c5";
-+		clocks = <&rk817 1>;
-+		clock-names = "lpo";
-+		device-wakeup-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_HIGH>;
-+		host-wakeup-gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_HIGH>;
-+		reset-gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_LOW>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&bt_host_wake_h &bt_reg_on_h &bt_wake_host_h>;
-+		vbat-supply = <&vcc_3v3>;
-+		vddio-supply = <&vcc_1v8>;
-+	};
-+};
-+
- &usb2phy0 {
- 	status = "okay";
- };
diff --git a/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
deleted file mode 100644
index bfd6dbe0db..0000000000
--- a/target/linux/rockchip/patches-6.1/020-v6.4-arm64-dts-rockchip-Enable-USB-OTG-for-rk3566-Radxa-CM3.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 477ed3ade6a46e445b4e2348b710c51df4f6f4b1 Mon Sep 17 00:00:00 2001
-From: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Date: Thu, 23 Feb 2023 19:29:29 +0530
-Subject: [PATCH] arm64: dts: rockchip: Enable USB OTG for rk3566 Radxa CM3
-
-Enable USB OTG support for Radxa Compute Module 3 IO Board
-
-Signed-off-by: Manoj Sai <abbaraju.manojsai at amarulasolutions.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230223135929.630787-1-abbaraju.manojsai at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -254,6 +254,14 @@
- 	status = "okay";
- };
- 
-+&usb2phy0_otg {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	status = "okay";
-+};
-+
- &vop {
- 	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
- 	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
diff --git a/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch b/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
deleted file mode 100644
index e7e3ea0100..0000000000
--- a/target/linux/rockchip/patches-6.1/021-v6.3-arm64-dts-rockchip-Fix-compatible-for-Radxa-CM3.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 8f19828844f20b22182719cf53be64f8c955aee8 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:50 +0530
-Subject: [PATCH] arm64: dts: rockchip: Fix compatible for Radxa CM3
-
-The compatible string "radxa,radxa-cm3" referring the product name
-as "Radxa Radxa CM3" but the actual product name is "Radxa CM3".
-
-Fix the compatible strings.
-
-Fixes: 24a28d3eb07d ("dt-bindings: arm: rockchip: Add Radxa Compute Module 3")
-Fixes: 7469ab529bca ("arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3")
-Fixes: 096ebfb74b19 ("arm64: dts: rockchip: Add Radxa Compute Module 3 IO board")
-Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20230123071654.73139-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts | 2 +-
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi   | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -11,7 +11,7 @@
- 
- / {
- 	model = "Radxa Compute Module 3(CM3) IO Board";
--	compatible = "radxa,radxa-cm3-io", "radxa,radxa-cm3", "rockchip,rk3566";
-+	compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
- 
- 	aliases {
- 		mmc1 = &sdmmc0;
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -8,7 +8,7 @@
- #include <dt-bindings/leds/common.h>
- 
- / {
--	compatible = "radxa,radxa-cm3", "rockchip,rk3566";
-+	compatible = "radxa,cm3", "rockchip,rk3566";
- 
- 	aliases {
- 		mmc0 = &sdhci;
diff --git a/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch b/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
deleted file mode 100644
index 8342c14ea4..0000000000
--- a/target/linux/rockchip/patches-6.1/022-v6.5-arm64-dts-rockchip-minor-whitespace-cleanup-around.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f99a75f11f46a24dabb33e90893eebf61dca0566 Mon Sep 17 00:00:00 2001
-From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Date: Sun, 2 Jul 2023 20:52:42 +0200
-Subject: [PATCH] arm64: dts: rockchip: minor whitespace cleanup around '='
-
-The DTS code coding style expects exactly one space before and after '='
-sign.
-
-Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20230702185242.44421-1-krzysztof.kozlowski at linaro.org
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../boot/dts/rockchip/rk3566-radxa-cm3-io.dts    |  4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -137,8 +137,8 @@
- 
- &mdio1 {
- 	rgmii_phy1: ethernet-phy at 0 {
--		compatible="ethernet-phy-ieee802.3-c22";
--		reg= <0x0>;
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <0x0>;
- 	};
- };
- 
diff --git a/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch b/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
deleted file mode 100644
index fb5015cf6e..0000000000
--- a/target/linux/rockchip/patches-6.1/023-v6.8-arm64-dts-rockchip-Add-ethernet0-alias-to-the-dts-for-RK3566-boards.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 36d9b3ae708e865cdab95692db5a24c5d975383d Mon Sep 17 00:00:00 2001
-From: Dragan Simic <dsimic at manjaro.org>
-Date: Tue, 12 Dec 2023 09:01:39 +0100
-Subject: [PATCH] arm64: dts: rockchip: Add ethernet0 alias to the dts for
- RK3566 boards
-
-Add ethernet0 alias to the board dts files for a few supported RK3566 boards
-that had it missing.  Also, remove the ethernet0 alias from one RK3566 SoM
-dtsi file, which doesn't enable the GMAC, and add the ethernet0 alias back to
-the dependent board dts files, which actually enable the GMAC.
-
-Signed-off-by: Dragan Simic <dsimic at manjaro.org>
-Link: https://lore.kernel.org/r/d2a272e0ae0fff0adfab8bb0238243b11d348799.1702368023.git.dsimic at manjaro.org
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts     | 1 +
- 1 files changed, 1 insertions(+), 0 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -14,6 +14,7 @@
- 	compatible = "radxa,cm3-io", "radxa,cm3", "rockchip,rk3566";
- 
- 	aliases {
-+		ethernet0 = &gmac1;
- 		mmc1 = &sdmmc0;
- 	};
- 
diff --git a/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch b/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
deleted file mode 100644
index 354c546d7e..0000000000
--- a/target/linux/rockchip/patches-6.1/024-v6.3-arm64-dts-rockchip-Add-Radxa-CM3I-E25.patch
+++ /dev/null
@@ -1,689 +0,0 @@
-From 2bf2f4d9f673013a58109626b87329310537a611 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Fri, 9 Dec 2022 18:25:24 +0800
-Subject: [PATCH] arm64: dts: rockchip: Add Radxa CM3I E25
-
-Radxa E25 is a network application carrier board for the Radxa CM3
-Industrial (CM3I) SoM, which is based on the Rockchip RK3568 SoC.
-
-It has the following features:
-
-- MicroSD card socket, on board eMMC flash
-- 2x 2.5GbE Realtek RTL8125B Ethernet transceiver
-- 1x USB Type-C port (Power and Serial console)
-- 1x USB 3.0 OTG port
-- mini PCIe socket (USB or PCIe)
-- ngff PCIe socket (USB or SATA)
-- 1x User LED and 16x RGB LEDs
-- 26-pin expansion header
-
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Link: https://lore.kernel.org/r/20221209102524.129367-3-amadeus at jmu.edu.cn
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/Makefile         |   1 +
- .../boot/dts/rockchip/rk3568-radxa-cm3i.dtsi  | 416 ++++++++++++++++++
- .../boot/dts/rockchip/rk3568-radxa-e25.dts    | 229 ++++++++++
- 3 files changed, 646 insertions(+)
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
- create mode 100644 arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-
---- a/arch/arm64/boot/dts/rockchip/Makefile
-+++ b/arch/arm64/boot/dts/rockchip/Makefile
-@@ -78,4 +78,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-bp
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-evb1-v10.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5c.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-nanopi-r5s.dtb
-+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-radxa-e25.dtb
- dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3568-rock-3a.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
-@@ -0,0 +1,416 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/leds/common.h>
-+#include <dt-bindings/pinctrl/rockchip.h>
-+#include "rk3568.dtsi"
-+
-+/ {
-+	model = "Radxa CM3 Industrial Board";
-+	compatible = "radxa,cm3i", "rockchip,rk3568";
-+
-+	aliases {
-+		mmc0 = &sdhci;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial2:115200n8";
-+	};
-+
-+	gpio-leds {
-+		compatible = "gpio-leds";
-+
-+		led_user: led-0 {
-+			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
-+			function = LED_FUNCTION_HEARTBEAT;
-+			color = <LED_COLOR_ID_GREEN>;
-+			linux,default-trigger = "heartbeat";
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&led_user_en>;
-+		};
-+	};
-+
-+	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>;
-+	};
-+
-+	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 = <&vcc5v_input>;
-+	};
-+
-+	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 = <&vcc5v_input>;
-+	};
-+
-+	/* labeled +5v_input in schematic */
-+	vcc5v_input: vcc5v-input-regulator {
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc5v_input";
-+		regulator-always-on;
-+		regulator-boot-on;
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+	};
-+};
-+
-+&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>;
-+};
-+
-+&display_subsystem {
-+	status = "disabled";
-+};
-+
-+&gpu {
-+	mali-supply = <&vdd_gpu>;
-+	status = "okay";
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+
-+	vdd_cpu: regulator at 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 = <&vcc5v_input>;
-+
-+		regulator-state-mem {
-+			regulator-off-in-suspend;
-+		};
-+	};
-+
-+	rk809: pmic at 20 {
-+		compatible = "rockchip,rk809";
-+		reg = <0x20>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
-+		#clock-cells = <1>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pmic_int>;
-+		rockchip,system-power-controller;
-+		wakeup-source;
-+
-+		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>;
-+
-+		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 = <900000>;
-+				regulator-max-microvolt = <900000>;
-+
-+				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-always-on;
-+				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-state-mem {
-+					regulator-off-in-suspend;
-+				};
-+			};
-+		};
-+	};
-+};
-+
-+&pinctrl {
-+	leds {
-+		led_user_en: led_user_en {
-+			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	pmic {
-+		pmic_int: pmic_int {
-+			rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
-+		};
-+	};
-+};
-+
-+&pmu_io_domains {
-+	pmuio1-supply = <&vcc3v3_pmu>;
-+	pmuio2-supply = <&vcc3v3_pmu>;
-+	vccio1-supply = <&vccio_acodec>;
-+	vccio2-supply = <&vcc_1v8>;
-+	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 &emmc_datastrobe>;
-+	vmmc-supply = <&vcc_3v3>;
-+	vqmmc-supply = <&vcc_1v8>;
-+	status = "okay";
-+};
-+
-+&tsadc {
-+	rockchip,hw-tshut-mode = <1>;
-+	rockchip,hw-tshut-polarity = <0>;
-+	status = "okay";
-+};
-+
-+&uart2 {
-+	status = "okay";
-+};
-+
-+&usb2phy0 {
-+	status = "okay";
-+};
-+
-+&usb2phy1 {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	extcon = <&usb2phy0>;
-+};
---- /dev/null
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -0,0 +1,229 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+
-+/dts-v1/;
-+#include "rk3568-radxa-cm3i.dtsi"
-+
-+/ {
-+	model = "Radxa E25";
-+	compatible = "radxa,e25", "rockchip,rk3568";
-+
-+	aliases {
-+		mmc0 = &sdmmc0;
-+		mmc1 = &sdhci;
-+	};
-+
-+	pwm-leds {
-+		compatible = "pwm-leds-multicolor";
-+
-+		multi-led {
-+			color = <LED_COLOR_ID_RGB>;
-+			max-brightness = <255>;
-+
-+			led-red {
-+				color = <LED_COLOR_ID_RED>;
-+				pwms = <&pwm1 0 1000000 0>;
-+			};
-+
-+			led-green {
-+				color = <LED_COLOR_ID_GREEN>;
-+				pwms = <&pwm2 0 1000000 0>;
-+			};
-+
-+			led-blue {
-+				color = <LED_COLOR_ID_BLUE>;
-+				pwms = <&pwm12 0 1000000 0>;
-+			};
-+		};
-+	};
-+
-+	vbus_typec: vbus-typec-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&vbus_typec_en>;
-+		regulator-name = "vbus_typec";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio3 RK_PA7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&minipcie_enable_h>;
-+		regulator-name = "vcc3v3_minipcie";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	vcc3v3_ngff: vcc3v3-ngff-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&ngffpcie_enable_h>;
-+		regulator-name = "vcc3v3_ngff";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+
-+	/* actually fed by vcc5v0_sys, dependent
-+	 * on pi6c clock generator
-+	 */
-+	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pcie30x1_enable_h>;
-+		regulator-name = "vcc3v3_pcie30x1";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_pi6c_05>;
-+	};
-+
-+	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
-+		compatible = "regulator-fixed";
-+		enable-active-high;
-+		gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pcie_enable_h>;
-+		regulator-name = "vcc3v3_pcie";
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc5v0_sys>;
-+	};
-+};
-+
-+&pcie2x1 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie20_reset_h>;
-+	reset-gpios = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
-+	status = "okay";
-+};
-+
-+&pcie30phy {
-+	data-lanes = <1 2>;
-+	status = "okay";
-+};
-+
-+&pcie3x1 {
-+	num-lanes = <1>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie30x1m0_pins>;
-+	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
-+	status = "okay";
-+};
-+
-+&pcie3x2 {
-+	num-lanes = <1>;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pcie30x2_reset_h>;
-+	reset-gpios = <&gpio2 RK_PD6 GPIO_ACTIVE_HIGH>;
-+	vpcie3v3-supply = <&vcc3v3_pi6c_05>;
-+	status = "okay";
-+};
-+
-+&pinctrl {
-+	pcie {
-+		pcie20_reset_h: pcie20-reset-h {
-+			rockchip,pins = <1 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie30x1_enable_h: pcie30x1-enable-h {
-+			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie30x2_reset_h: pcie30x2-reset-h {
-+			rockchip,pins = <2 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		pcie_enable_h: pcie-enable-h {
-+			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+
-+	usb {
-+		minipcie_enable_h: minipcie-enable-h {
-+			rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		ngffpcie_enable_h: ngffpcie-enable-h {
-+			rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+
-+		vbus_typec_en: vbus_typec_en {
-+			rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
-+		};
-+	};
-+};
-+
-+&pwm1 {
-+	status = "okay";
-+};
-+
-+&pwm2 {
-+	status = "okay";
-+};
-+
-+&pwm12 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&pwm12m1_pins>;
-+	status = "okay";
-+};
-+
-+&sdmmc0 {
-+	bus-width = <4>;
-+	cap-sd-highspeed;
-+	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
-+	/* Also used in pcie30x1_clkreqnm0 */
-+	disable-wp;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd>;
-+	sd-uhs-sdr104;
-+	vmmc-supply = <&vcc3v3_sd>;
-+	vqmmc-supply = <&vccio_sd>;
-+	status = "okay";
-+};
-+
-+&usb_host0_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host0_ohci {
-+	status = "okay";
-+};
-+
-+&usb_host0_xhci {
-+	status = "okay";
-+};
-+
-+&usb_host1_ehci {
-+	status = "okay";
-+};
-+
-+&usb_host1_ohci {
-+	status = "okay";
-+};
-+
-+&usb2phy0_otg {
-+	phy-supply = <&vbus_typec>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_host {
-+	phy-supply = <&vcc3v3_minipcie>;
-+	status = "okay";
-+};
-+
-+&usb2phy1_otg {
-+	phy-supply = <&vcc3v3_ngff>;
-+	status = "okay";
-+};
diff --git a/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch b/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
deleted file mode 100644
index e556e2eb42..0000000000
--- a/target/linux/rockchip/patches-6.1/025-v6.3-arm64-dts-rockchip-Update-eMMC-SD.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From c80992abd2877590059e9cb254213c16824e2106 Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Wed, 18 Jan 2023 13:34:53 +0530
-Subject: [PATCH] arm64: dts: rockchip: Update eMMC, SD aliases for Radxa SoM
- boards
-
-Radxa has produced Compute Modules like RK3399pro VMARC and CM3i with
-onboarding eMMC flash, so the eMMC is the primary MMC device.
-
-On the other hand, Rockchip boot orders start from eMMC from an MMC
-device perspective.
-
-Mark, the eMMC has mmc0 to satisfy the above two conditions.
-
-Reported-by: FUKAUMI Naoki <naoki at radxa.com>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230118080454.11643-1-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi | 4 ++--
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts     | 3 +--
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3399pro-vmarc-som.dtsi
-@@ -13,8 +13,8 @@
- 	compatible = "vamrs,rk3399pro-vmarc-som", "rockchip,rk3399pro";
- 
- 	aliases {
--		mmc0 = &sdmmc;
--		mmc1 = &sdhci;
-+		mmc0 = &sdhci;
-+		mmc1 = &sdmmc;
- 	};
- 
- 	vcc3v3_pcie: vcc-pcie-regulator {
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -8,8 +8,7 @@
- 	compatible = "radxa,e25", "rockchip,rk3568";
- 
- 	aliases {
--		mmc0 = &sdmmc0;
--		mmc1 = &sdhci;
-+		mmc1 = &sdmmc0;
- 	};
- 
- 	pwm-leds {
diff --git a/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch b/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
deleted file mode 100644
index c1f1a09219..0000000000
--- a/target/linux/rockchip/patches-6.1/026-v6.3-arm64-dts-rockchip-Add-missing-CM3i.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c4d2b02d63ee38b381fbc886c02eecfec4f981cc Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:51 +0530
-Subject: [PATCH] arm64: dts: rockchip: Add missing CM3i fallback compatible
- for Radxa E25
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In order to function the Radxa E25 Carrier board, it is mandatory to
-mount the Radxa CM3i module.?
-
-Add Radxa CM3i compatible as fallback compatible to string to satisfy
-the Module and Carrier board topology.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Cc: Chukun Pan <amadeus at jmu.edu.cn>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230123071654.73139-2-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -5,7 +5,7 @@
- 
- / {
- 	model = "Radxa E25";
--	compatible = "radxa,e25", "rockchip,rk3568";
-+	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
- 
- 	aliases {
- 		mmc1 = &sdmmc0;
diff --git a/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
deleted file mode 100644
index 84e87bae05..0000000000
--- a/target/linux/rockchip/patches-6.1/027-v6.3-arm64-dts-rockchip-Correct-the-model-name-for-Radxa-E25.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From ef9134d9bbce071c9e4ebdcbb6f8fb1a5dd0a67e Mon Sep 17 00:00:00 2001
-From: Jagan Teki <jagan at amarulasolutions.com>
-Date: Mon, 23 Jan 2023 12:46:53 +0530
-Subject: [PATCH] arm64: dts: rockchip: Correct the model name for Radxa E25
-
-Radxa E25 is a Carrier board, so update the model name for Radxa E25
-as suggested by the Radxa website.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Cc: Chukun Pan <amadeus at jmu.edu.cn>
-Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
-Link: https://lore.kernel.org/r/20230123071654.73139-4-jagan at amarulasolutions.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -4,7 +4,7 @@
- #include "rk3568-radxa-cm3i.dtsi"
- 
- / {
--	model = "Radxa E25";
-+	model = "Radxa E25 Carrier Board";
- 	compatible = "radxa,e25", "radxa,cm3i", "rockchip,rk3568";
- 
- 	aliases {
diff --git a/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
deleted file mode 100644
index da02c4c001..0000000000
--- a/target/linux/rockchip/patches-6.1/028-v6.6-arm64-dts-rockchip-Fix-PCIe-regulators-on-Radxa-E25.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From a87852e37f782257ebc57cc44a0d3fbf806471f6 Mon Sep 17 00:00:00 2001
-From: Jonas Karlman <jonas at kwiboo.se>
-Date: Mon, 24 Jul 2023 14:52:16 +0000
-Subject: [PATCH] arm64: dts: rockchip: Fix PCIe regulators on Radxa E25
-
-Despite its name, the regulator vcc3v3_pcie30x1 has nothing to do with
-pcie30x1. Instead, it supply power to VBAT1-5 on the M.2 KEY B port as
-seen on page 8 of the schematic [1].
-
-pcie30x1 is used for the mini PCIe slot, and as seen on page 9 the
-vcc3v3_minipcie regulator is instead related to pcie30x1.
-
-The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
-
-Use correct regulator vcc3v3_minipcie for pcie30x1.
-
-[1] https://dl.radxa.com/cm3p/e25/radxa-e25-v1.4-sch.pdf
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
-Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- .../arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -47,6 +47,9 @@
- 		vin-supply = <&vcc5v0_sys>;
- 	};
- 
-+	/* actually fed by vcc5v0_sys, dependent
-+	 * on pi6c clock generator
-+	 */
- 	vcc3v3_minipcie: vcc3v3-minipcie-regulator {
- 		compatible = "regulator-fixed";
- 		enable-active-high;
-@@ -54,9 +57,9 @@
- 		pinctrl-names = "default";
- 		pinctrl-0 = <&minipcie_enable_h>;
- 		regulator-name = "vcc3v3_minipcie";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		vin-supply = <&vcc5v0_sys>;
-+		regulator-min-microvolt = <3300000>;
-+		regulator-max-microvolt = <3300000>;
-+		vin-supply = <&vcc3v3_pi6c_05>;
- 	};
- 
- 	vcc3v3_ngff: vcc3v3-ngff-regulator {
-@@ -71,9 +74,6 @@
- 		vin-supply = <&vcc5v0_sys>;
- 	};
- 
--	/* actually fed by vcc5v0_sys, dependent
--	 * on pi6c clock generator
--	 */
- 	vcc3v3_pcie30x1: vcc3v3-pcie30x1-regulator {
- 		compatible = "regulator-fixed";
- 		enable-active-high;
-@@ -83,7 +83,7 @@
- 		regulator-name = "vcc3v3_pcie30x1";
- 		regulator-min-microvolt = <3300000>;
- 		regulator-max-microvolt = <3300000>;
--		vin-supply = <&vcc3v3_pi6c_05>;
-+		vin-supply = <&vcc5v0_sys>;
- 	};
- 
- 	vcc3v3_pi6c_05: vcc3v3-pi6c-05-regulator {
-@@ -117,7 +117,7 @@
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&pcie30x1m0_pins>;
- 	reset-gpios = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
--	vpcie3v3-supply = <&vcc3v3_pcie30x1>;
-+	vpcie3v3-supply = <&vcc3v3_minipcie>;
- 	status = "okay";
- };
- 
diff --git a/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch b/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
deleted file mode 100644
index c0abdeb267..0000000000
--- a/target/linux/rockchip/patches-6.1/029-v6.6-arm64-dts-rockchip-Enable-SATA-on-Radxa-E25.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 2bdfe84fbd57a4ed9fd65a67210442559ce078f0 Mon Sep 17 00:00:00 2001
-From: Jonas Karlman <jonas at kwiboo.se>
-Date: Mon, 24 Jul 2023 14:52:16 +0000
-Subject: [PATCH] arm64: dts: rockchip: Enable SATA on Radxa E25
-
-The M.2 KEY B port can be used for WWAN USB2 modules or SATA drives.
-
-Enable sata1 node to fix use of SATA drives on the M.2 slot.
-
-Fixes: 2bf2f4d9f673 ("arm64: dts: rockchip: Add Radxa CM3I E25")
-Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
-Link: https://lore.kernel.org/r/20230724145213.3833099-1-jonas at kwiboo.se
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -99,6 +99,10 @@
- 	};
- };
- 
-+&combphy1 {
-+	phy-supply = <&vcc3v3_pcie30x1>;
-+};
-+
- &pcie2x1 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&pcie20_reset_h>;
-@@ -178,6 +182,10 @@
- 	status = "okay";
- };
- 
-+&sata1 {
-+	status = "okay";
-+};
-+
- &sdmmc0 {
- 	bus-width = <4>;
- 	cap-sd-highspeed;
diff --git a/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch b/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
deleted file mode 100644
index 9be609f661..0000000000
--- a/target/linux/rockchip/patches-6.1/030-v6.9-arm64-dts-rockchip-adjust-vendor-on-Banana-Pi-R2-Pro.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 437644753208092f642b7669c69da606aa07dfb4 Mon Sep 17 00:00:00 2001
-From: Tim Lunn <tim at feathertop.org>
-Date: Wed, 14 Feb 2024 15:07:30 +1100
-Subject: [PATCH] arm64: dts: rockchip: adjust vendor on Banana Pi R2 Pro board
-
-Adjust compatible string to match the board vendor of Sinovoip
-
-Signed-off-by: Tim Lunn <tim at feathertop.org>
-Reviewed-by: Dragan Simic <dsimic at manjaro.org>
-Acked-by: Conor Dooley <conor.dooley at microchip.com>
-Link: https://lore.kernel.org/r/20240214040731.3069111-4-tim at feathertop.org
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-@@ -13,7 +13,7 @@
- 
- / {
- 	model = "Bananapi-R2 Pro (RK3568) DDR4 Board";
--	compatible = "rockchip,rk3568-bpi-r2pro", "rockchip,rk3568";
-+	compatible = "sinovoip,rk3568-bpi-r2pro", "rockchip,rk3568";
- 
- 	aliases {
- 		ethernet0 = &gmac0;
diff --git a/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch b/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
deleted file mode 100644
index 6a5622b813..0000000000
--- a/target/linux/rockchip/patches-6.1/031-v6.10arm64-dts-rockchip-set-PHY-address-of-MT7531-switch-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From a2ac2a1b02590a22a236c43c455f421cdede45f5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Thu, 14 Mar 2024 15:24:35 +0300
-Subject: [PATCH] arm64: dts: rockchip: set PHY address of MT7531 switch to
- 0x1f
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The MT7531 switch listens on PHY address 0x1f on an MDIO bus. I've got two
-findings that support this. There's no bootstrapping option to change the
-PHY address of the switch. The Linux driver hardcodes 0x1f as the PHY
-address of the switch. So the reg property on the device tree is currently
-ignored by the Linux driver.
-
-Therefore, describe the correct PHY address on Banana Pi BPI-R2 Pro that
-has this switch.
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Fixes: c1804463e5c6 ("arm64: dts: rockchip: Add mt7531 dsa node to BPI-R2-Pro board")
-Link: https://lore.kernel.org/r/20240314-for-rockchip-mt7531-phy-address-v1-1-743b5873358f at arinc9.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-@@ -521,9 +521,9 @@
- 	#address-cells = <1>;
- 	#size-cells = <0>;
- 
--	switch at 0 {
-+	switch at 1f {
- 		compatible = "mediatek,mt7531";
--		reg = <0>;
-+		reg = <0x1f>;
- 
- 		ports {
- 			#address-cells = <1>;
diff --git a/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch b/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
deleted file mode 100644
index dca18f5c58..0000000000
--- a/target/linux/rockchip/patches-6.1/032-v6.10-arm64-dts-rockchip-regulator-for-sd-needs-to-be-alwa.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 433d54818f64a2fe0562f8c04c7a81f562368515 Mon Sep 17 00:00:00 2001
-From: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
-Date: Tue, 5 Mar 2024 15:32:18 +0100
-Subject: [PATCH] arm64: dts: rockchip: regulator for sd needs to be always on
- for BPI-R2Pro
-
-With default dts configuration for BPI-R2Pro, the regulator for sd card is
-powered off when reboot is commanded, and the only solution to detect the
-sd card again, and therefore, allow rebooting from there, is to do a
-hardware reset.
-
-Configure the regulator for sd to be always on for BPI-R2Pro in order to
-avoid this issue.
-
-Fixes: f901aaadaa2a ("arm64: dts: rockchip: Add Bananapi R2 Pro")
-Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
-Link: https://lore.kernel.org/r/20240305143222.189413-1-jtornosm at redhat.com
-Signed-off-by: Heiko Stuebner <heiko at sntech.de>
----
- arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
-@@ -412,6 +412,8 @@
- 
- 			vccio_sd: LDO_REG5 {
- 				regulator-name = "vccio_sd";
-+				regulator-always-on;
-+				regulator-boot-on;
- 				regulator-min-microvolt = <1800000>;
- 				regulator-max-microvolt = <3300000>;
- 
diff --git a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch b/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch
deleted file mode 100644
index 683e5347f7..0000000000
--- a/target/linux/rockchip/patches-6.1/100-rockchip-use-system-LED-for-OpenWrt.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 6731d2c9039fbe1ecf21915eab3acee0a999508a Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Fri, 10 Jul 2020 21:38:20 +0200
-Subject: [PATCH] rockchip: use system LED for OpenWrt
-
-Use the SYS LED on the casing for showing system status.
-
-This patch is kept separate from the NanoPi R2S support patch, as i plan
-on submitting the device support upstream.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-@@ -6,6 +6,7 @@
- /dts-v1/;
- 
- #include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
- #include <dt-bindings/gpio/gpio.h>
- #include "rk3328.dtsi"
- 
-@@ -16,6 +17,11 @@
- 	aliases {
- 		ethernet1 = &rtl8153;
- 		mmc0 = &sdmmc;
-+
-+		led-boot = &sys_led;
-+		led-failsafe = &sys_led;
-+		led-running = &sys_led;
-+		led-upgrade = &sys_led;
- 	};
- 
- 	chosen {
-@@ -48,19 +54,22 @@
- 		pinctrl-names = "default";
- 
- 		lan_led: led-0 {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_LAN;
- 			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
--			label = "nanopi-r2s:green:lan";
- 		};
- 
- 		sys_led: led-1 {
-+			color = <LED_COLOR_ID_RED>;
-+			function = LED_FUNCTION_STATUS;
- 			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
--			label = "nanopi-r2s:red:sys";
- 			default-state = "on";
- 		};
- 
- 		wan_led: led-2 {
-+			color = <LED_COLOR_ID_GREEN>;
-+			function = LED_FUNCTION_WAN;
- 			gpios = <&gpio2 RK_PC2 GPIO_ACTIVE_HIGH>;
--			label = "nanopi-r2s:green:wan";
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
-@@ -13,6 +13,11 @@
- 	aliases {
- 		mmc0 = &sdmmc;
- 		mmc1 = &emmc;
-+
-+		led-boot = &power_led;
-+		led-failsafe = &power_led;
-+		led-running = &power_led;
-+		led-upgrade = &power_led;
- 	};
- 
- 	chosen {
diff --git a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch b/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
deleted file mode 100644
index eeef0df014..0000000000
--- a/target/linux/rockchip/patches-6.1/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 2795c8b31a686bdb8338f9404d18ef7a154f0d75 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Sun, 26 Jul 2020 13:32:59 +0200
-Subject: [PATCH] arm64: rockchip: add OF node for USB eth on NanoPi R2S
-
-This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
-NanoPi R2S. Add the correct value for the RTL8153 LED configuration
-register to match the blink behavior of the other port on the device.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts | 7 +++++++
- 1 file changed, 1 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-@@ -406,6 +406,7 @@
- 	rtl8153: device at 2 {
- 		compatible = "usbbda,8153";
- 		reg = <2>;
-+		realtek,led-data = <0x87>;
- 	};
- };
- 
diff --git a/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch b/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch
deleted file mode 100644
index b3c941821a..0000000000
--- a/target/linux/rockchip/patches-6.1/105-nanopi-r4s-sd-signalling.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Subject: arm64: dts: rockchip: disable UHS modes for NanoPi R4S
-
-The NanoPi R4S leaves the SD card in 1.8V signalling when rebooting
-while U-Boot requires the card to be in 3.3V mode.
-
-Remove UHS support from the SD controller so the card remains in 3.3V
-mode. This reduces transfer speeds but ensures a reboot whether from
-userspace or following a kernel panic is always working.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
-@@ -335,7 +335,6 @@
- 	sd-uhs-sdr12;
- 	sd-uhs-sdr25;
- 	sd-uhs-sdr50;
--	sd-uhs-sdr104;
- 	vmmc-supply = <&vcc_sd>;
- 	vqmmc-supply = <&vcc_sdio>;
- 	status = "okay";
---- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-@@ -112,6 +112,11 @@
- 	status = "disabled";
- };
- 
-+&sdmmc {
-+	/delete-property/ sd-uhs-sdr104;
-+	cap-sd-highspeed;
-+};
-+
- &u2phy0_host {
- 	phy-supply = <&vdd_5v>;
- };
diff --git a/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch b/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch
deleted file mode 100644
index d7579d61e9..0000000000
--- a/target/linux/rockchip/patches-6.1/106-r4s-openwrt-leds.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
-@@ -19,6 +19,13 @@
- 	model = "FriendlyElec NanoPi R4S";
- 	compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
- 
-+	aliases {
-+		led-boot = &sys_led;
-+		led-failsafe = &sys_led;
-+		led-running = &sys_led;
-+		led-upgrade = &sys_led;
-+	};
-+
- 	/delete-node/ display-subsystem;
- 
- 	gpio-leds {
diff --git a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch b/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
deleted file mode 100644
index 3aff37d096..0000000000
--- a/target/linux/rockchip/patches-6.1/107-arm64-dts-rockchip-Update-LED-properties-for-Orange-.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d2166e3b3680bd2b206aebf1e1ce4c0d346f3c50 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Fri, 19 May 2023 12:10:52 +0800
-Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Orange Pi R1
- Plus
-
-Add OpenWrt's LED aliases for showing system status.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
----
- .../dts/rockchip/rk3328-orangepi-r1-plus.dts    | 17 +++++++++--------
- 1 file changed, 9 insertions(+), 8 deletions(-)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-@@ -17,6 +17,11 @@
- 	aliases {
- 		ethernet1 = &rtl8153;
- 		mmc0 = &sdmmc;
-+
-+		led-boot = &status_led;
-+		led-failsafe = &status_led;
-+		led-running = &status_led;
-+		led-upgrade = &status_led;
- 	};
- 
- 	chosen {
-@@ -41,11 +46,10 @@
- 			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
- 		};
- 
--		led-1 {
-+		status_led: led-1 {
- 			function = LED_FUNCTION_STATUS;
- 			color = <LED_COLOR_ID_RED>;
- 			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
--			linux,default-trigger = "heartbeat";
- 		};
- 
- 		led-2 {
diff --git a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch b/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
deleted file mode 100644
index af8f8b16ba..0000000000
--- a/target/linux/rockchip/patches-6.1/108-arm64-dts-rockchip-add-LED-configuration-to-Orange-P.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From b46a530d12ada422b9d5b2b97059e0d3ed950b40 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Fri, 19 May 2023 12:38:04 +0800
-Subject: [PATCH] arm64: dts: rockchip: add LED configuration to Orange Pi R1
- Plus
-
-Add the correct value for the RTL8153 LED configuration register to
-match the blink behavior of the other port on the device.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
----
- arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus.dts
-@@ -365,6 +365,7 @@
- 	rtl8153: device at 2 {
- 		compatible = "usbbda,8153";
- 		reg = <2>;
-+		realtek,led-data = <0x87>;
- 	};
- };
- 
diff --git a/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch
deleted file mode 100644
index 1a80dadd48..0000000000
--- a/target/linux/rockchip/patches-6.1/109-nanopc-t4-add-led-aliases.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopc-t4.dts
-@@ -15,6 +15,13 @@
- 	model = "FriendlyElec NanoPC-T4";
- 	compatible = "friendlyarm,nanopc-t4", "rockchip,rk3399";
- 
-+	aliases {
-+		led-boot = &status_led;
-+		led-failsafe = &status_led;
-+		led-running = &status_led;
-+		led-upgrade = &status_led;
-+	};
-+
- 	vcc12v0_sys: vcc12v0-sys {
- 		compatible = "regulator-fixed";
- 		regulator-always-on;
diff --git a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch b/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
deleted file mode 100644
index c22fdd52b8..0000000000
--- a/target/linux/rockchip/patches-6.1/110-arm64-dts-rockchip-Update-LED-properties-for-NanoPi-.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Tue Jun 20 16:45:27 2023 +0800
-Subject: [PATCH] arm64: dts: rockchip: Update LED properties for NanoPi R5
- series
-
-Add OpenWrt's LED aliases for showing system status.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
----
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dts
-@@ -40,7 +40,6 @@
- 		power_led: led-power {
- 			color = <LED_COLOR_ID_RED>;
- 			function = LED_FUNCTION_POWER;
--			linux,default-trigger = "heartbeat";
- 			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
- 		};
- 
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts
-@@ -39,7 +39,6 @@
- 		power_led: led-power {
- 			color = <LED_COLOR_ID_RED>;
- 			function = LED_FUNCTION_POWER;
--			linux,default-trigger = "heartbeat";
- 			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
- 		};
- 
---- a/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dtsi
-@@ -18,6 +18,11 @@
- 	aliases {
- 		mmc0 = &sdmmc0;
- 		mmc1 = &sdhci;
-+
-+		led-boot = &power_led;
-+		led-failsafe = &power_led;
-+		led-running = &power_led;
-+		led-upgrade = &power_led;
- 	};
- 
- 	chosen: chosen {
diff --git a/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch
deleted file mode 100644
index c8183a2b8a..0000000000
--- a/target/linux/rockchip/patches-6.1/111-radxa-cm3-io-add-led-aliases.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Marius Durbaca <mariusd84 at gmail.com>
-Date: Tue Feb 20 15:05:27 2024 +0200
-Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa 
-CM3 IO board
-
-Add OpenWrt's LED aliases for showing system status.
-
-Suggested-by: Tianling Shen <cnsztl at immortalwrt.org>
-Signed-off-by: Marius Durbaca <mariusd84 at gmail.com>
----
-
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts
-@@ -16,6 +16,10 @@
- 	aliases {
- 		ethernet0 = &gmac1;
- 		mmc1 = &sdmmc0;
-+		led-boot = &status_led;
-+		led-failsafe = &status_led;
-+		led-running = &status_led;
-+		led-upgrade = &status_led;
- 	};
- 
- 	chosen: chosen {
---- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi
-@@ -17,7 +17,7 @@
- 	leds {
- 		compatible = "gpio-leds";
- 
--		led-0 {
-+		status_led: led-0 {
- 			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
- 			color = <LED_COLOR_ID_GREEN>;
- 			function = LED_FUNCTION_STATUS;
diff --git a/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch b/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch
deleted file mode 100644
index 75038c7f39..0000000000
--- a/target/linux/rockchip/patches-6.1/112-radxa-e25-add-led-aliases.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Marius Durbaca <mariusd84 at gmail.com>
-Date: Tue Feb 27 16:25:27 2024 +0200
-Subject: [PATCH] arm64: dts: rockchip: Update LED properties for Radxa 
-E25
-
-Add OpenWrt's LED aliases for showing system status.
-
-Signed-off-by: Marius Durbaca <mariusd84 at gmail.com>
----
-
---- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
-@@ -9,6 +9,10 @@
- 
- 	aliases {
- 		mmc1 = &sdmmc0;
-+		led-boot = &led_user;
-+		led-failsafe = &led_user;
-+		led-running = &led_user;
-+		led-upgrade = &led_user;
- 	};
- 
- 	pwm-leds {
diff --git a/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch b/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
deleted file mode 100644
index 6a2d35889b..0000000000
--- a/target/linux/rockchip/patches-6.1/300-hwrng-add-Rockchip-SoC-hwrng-driver.patch
+++ /dev/null
@@ -1,339 +0,0 @@
-From patchwork Sat Nov 12 14:10:58 2022
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
-X-Patchwork-Id: 13041222
-Return-Path: 
- <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org at lists.infradead.org>
-X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
-	aws-us-west-2-korg-lkml-1.web.codeaurora.org
-From: Aurelien Jarno <aurelien at aurel32.net>
-To: Olivia Mackall <olivia at selenic.com>,
-	Herbert Xu <herbert at gondor.apana.org.au>,
-	Rob Herring <robh+dt at kernel.org>,
-	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
-	Heiko Stuebner <heiko at sntech.de>,
-	Philipp Zabel <p.zabel at pengutronix.de>,
-	Lin Jinhan <troy.lin at rock-chips.com>
-Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
- CORE),
-	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
- BINDINGS),
-	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
- support),
-	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
-	linux-kernel at vger.kernel.org (open list),
-	Aurelien Jarno <aurelien at aurel32.net>
-Subject: [PATCH v1 2/3] hwrng: add Rockchip SoC hwrng driver
-Date: Sat, 12 Nov 2022 15:10:58 +0100
-Message-Id: <20221112141059.3802506-3-aurelien at aurel32.net>
-In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
-References: <20221112141059.3802506-1-aurelien at aurel32.net>
-MIME-Version: 1.0
-List-Id: <linux-arm-kernel.lists.infradead.org>
-
-Rockchip SoCs used to have a random number generator as part of their
-crypto device, and support for it has to be added to the corresponding
-driver. However newer Rockchip SoCs like the RK356x have an independent
-True Random Number Generator device. This patch adds a driver for it,
-greatly inspired from the downstream driver.
-
-The TRNG device does not seem to have a signal conditionner and the FIPS
-140-2 test returns a lot of failures. They can be reduced by increasing
-RK_RNG_SAMPLE_CNT, in a tradeoff between quality and speed. This value
-has been adjusted to get ~90% of successes and the quality value has
-been set accordingly.
-
-Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
----
- drivers/char/hw_random/Kconfig        |  14 ++
- drivers/char/hw_random/Makefile       |   1 +
- drivers/char/hw_random/rockchip-rng.c | 251 ++++++++++++++++++++++++++
- 3 files changed, 266 insertions(+)
- create mode 100644 drivers/char/hw_random/rockchip-rng.c
-
---- a/drivers/char/hw_random/Kconfig
-+++ b/drivers/char/hw_random/Kconfig
-@@ -549,6 +549,20 @@ config HW_RANDOM_CN10K
- 	 To compile this driver as a module, choose M here.
- 	 The module will be called cn10k_rng. If unsure, say Y.
- 
-+config HW_RANDOM_ROCKCHIP
-+        tristate "Rockchip True Random Number Generator"
-+        depends on HW_RANDOM && (ARCH_ROCKCHIP || COMPILE_TEST)
-+        depends on HAS_IOMEM
-+        default HW_RANDOM
-+        help
-+          This driver provides kernel-side support for the True Random Number
-+          Generator hardware found on some Rockchip SoC like RK3566 or RK3568.
-+
-+          To compile this driver as a module, choose M here: the
-+          module will be called rockchip-rng.
-+
-+          If unsure, say Y.
-+
- endif # HW_RANDOM
- 
- config UML_RANDOM
---- a/drivers/char/hw_random/Makefile
-+++ b/drivers/char/hw_random/Makefile
-@@ -47,3 +47,4 @@ obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphe
- obj-$(CONFIG_HW_RANDOM_ARM_SMCCC_TRNG) += arm_smccc_trng.o
- obj-$(CONFIG_HW_RANDOM_CN10K) += cn10k-rng.o
- obj-$(CONFIG_HW_RANDOM_POLARFIRE_SOC) += mpfs-rng.o
-+obj-$(CONFIG_HW_RANDOM_ROCKCHIP) += rockchip-rng.o
---- /dev/null
-+++ b/drivers/char/hw_random/rockchip-rng.c
-@@ -0,0 +1,251 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/*
-+ * rockchip-rng.c True Random Number Generator driver for Rockchip SoCs
-+ *
-+ * Copyright (c) 2018, Fuzhou Rockchip Electronics Co., Ltd.
-+ * Copyright (c) 2022, Aurelien Jarno
-+ * Authors:
-+ *  Lin Jinhan <troy.lin at rock-chips.com>
-+ *  Aurelien Jarno <aurelien at aurel32.net>
-+ */
-+#include <linux/clk.h>
-+#include <linux/hw_random.h>
-+#include <linux/io.h>
-+#include <linux/iopoll.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/of_platform.h>
-+#include <linux/pm_runtime.h>
-+#include <linux/reset.h>
-+#include <linux/slab.h>
-+
-+#define RK_RNG_AUTOSUSPEND_DELAY	100
-+#define RK_RNG_MAX_BYTE			32
-+#define RK_RNG_POLL_PERIOD_US		100
-+#define RK_RNG_POLL_TIMEOUT_US		10000
-+
-+/*
-+ * TRNG collects osc ring output bit every RK_RNG_SAMPLE_CNT time. The value is
-+ * a tradeoff between speed and quality and has been adjusted to get a quality
-+ * of ~900 (~90% of FIPS 140-2 successes).
-+ */
-+#define RK_RNG_SAMPLE_CNT		1000
-+
-+/* TRNG registers from RK3568 TRM-Part2, section 5.4.1 */
-+#define TRNG_RST_CTL			0x0004
-+#define TRNG_RNG_CTL			0x0400
-+#define TRNG_RNG_CTL_LEN_64_BIT		(0x00 << 4)
-+#define TRNG_RNG_CTL_LEN_128_BIT	(0x01 << 4)
-+#define TRNG_RNG_CTL_LEN_192_BIT	(0x02 << 4)
-+#define TRNG_RNG_CTL_LEN_256_BIT	(0x03 << 4)
-+#define TRNG_RNG_CTL_OSC_RING_SPEED_0	(0x00 << 2)
-+#define TRNG_RNG_CTL_OSC_RING_SPEED_1	(0x01 << 2)
-+#define TRNG_RNG_CTL_OSC_RING_SPEED_2	(0x02 << 2)
-+#define TRNG_RNG_CTL_OSC_RING_SPEED_3	(0x03 << 2)
-+#define TRNG_RNG_CTL_ENABLE		BIT(1)
-+#define TRNG_RNG_CTL_START		BIT(0)
-+#define TRNG_RNG_SAMPLE_CNT		0x0404
-+#define TRNG_RNG_DOUT_0			0x0410
-+#define TRNG_RNG_DOUT_1			0x0414
-+#define TRNG_RNG_DOUT_2			0x0418
-+#define TRNG_RNG_DOUT_3			0x041c
-+#define TRNG_RNG_DOUT_4			0x0420
-+#define TRNG_RNG_DOUT_5			0x0424
-+#define TRNG_RNG_DOUT_6			0x0428
-+#define TRNG_RNG_DOUT_7			0x042c
-+
-+struct rk_rng {
-+	struct hwrng rng;
-+	void __iomem *base;
-+	struct reset_control *rst;
-+	int clk_num;
-+	struct clk_bulk_data *clk_bulks;
-+};
-+
-+/* The mask determine the bits that are updated */
-+static void rk_rng_write_ctl(struct rk_rng *rng, u32 val, u32 mask)
-+{
-+	writel_relaxed((mask << 16) | val, rng->base + TRNG_RNG_CTL);
-+}
-+
-+static int rk_rng_init(struct hwrng *rng)
-+{
-+	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
-+	u32 reg;
-+	int ret;
-+
-+	/* start clocks */
-+	ret = clk_bulk_prepare_enable(rk_rng->clk_num, rk_rng->clk_bulks);
-+	if (ret < 0) {
-+		dev_err((struct device *) rk_rng->rng.priv,
-+			"Failed to enable clks %d\n", ret);
-+		return ret;
-+	}
-+
-+	/* set the sample period */
-+	writel(RK_RNG_SAMPLE_CNT, rk_rng->base + TRNG_RNG_SAMPLE_CNT);
-+
-+	/* set osc ring speed and enable it */
-+	reg = TRNG_RNG_CTL_LEN_256_BIT |
-+		   TRNG_RNG_CTL_OSC_RING_SPEED_0 |
-+		   TRNG_RNG_CTL_ENABLE;
-+	rk_rng_write_ctl(rk_rng, reg, 0xffff);
-+
-+	return 0;
-+}
-+
-+static void rk_rng_cleanup(struct hwrng *rng)
-+{
-+	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
-+	u32 reg;
-+
-+	/* stop TRNG */
-+	reg = 0;
-+	rk_rng_write_ctl(rk_rng, reg, 0xffff);
-+
-+	/* stop clocks */
-+	clk_bulk_disable_unprepare(rk_rng->clk_num, rk_rng->clk_bulks);
-+}
-+
-+static int rk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
-+{
-+	struct rk_rng *rk_rng = container_of(rng, struct rk_rng, rng);
-+	u32 reg;
-+	int ret = 0;
-+	int i;
-+
-+	pm_runtime_get_sync((struct device *) rk_rng->rng.priv);
-+
-+	/* Start collecting random data */
-+	reg = TRNG_RNG_CTL_START;
-+	rk_rng_write_ctl(rk_rng, reg, reg);
-+
-+	ret = readl_poll_timeout(rk_rng->base + TRNG_RNG_CTL, reg,
-+				 !(reg & TRNG_RNG_CTL_START),
-+				 RK_RNG_POLL_PERIOD_US,
-+				 RK_RNG_POLL_TIMEOUT_US);
-+	if (ret < 0)
-+		goto out;
-+
-+	/* Read random data stored in big endian in the registers */
-+	ret = min_t(size_t, max, RK_RNG_MAX_BYTE);
-+	for (i = 0; i < ret; i += 4) {
-+		reg = readl_relaxed(rk_rng->base + TRNG_RNG_DOUT_0 + i);
-+		*(u32 *)(buf + i) = be32_to_cpu(reg);
-+	}
-+
-+out:
-+	pm_runtime_mark_last_busy((struct device *) rk_rng->rng.priv);
-+	pm_runtime_put_sync_autosuspend((struct device *) rk_rng->rng.priv);
-+
-+	return ret;
-+}
-+
-+static int rk_rng_probe(struct platform_device *pdev)
-+{
-+	struct device *dev = &pdev->dev;
-+	struct rk_rng *rk_rng;
-+	int ret;
-+
-+	rk_rng = devm_kzalloc(dev, sizeof(struct rk_rng), GFP_KERNEL);
-+	if (!rk_rng)
-+		return -ENOMEM;
-+
-+	rk_rng->base = devm_platform_ioremap_resource(pdev, 0);
-+	if (IS_ERR(rk_rng->base))
-+		return PTR_ERR(rk_rng->base);
-+
-+	rk_rng->clk_num = devm_clk_bulk_get_all(dev, &rk_rng->clk_bulks);
-+	if (rk_rng->clk_num < 0)
-+		return dev_err_probe(dev, rk_rng->clk_num,
-+				     "Failed to get clks property\n");
-+
-+	rk_rng->rst = devm_reset_control_array_get(&pdev->dev, false, false);
-+	if (IS_ERR(rk_rng->rst))
-+		return dev_err_probe(dev, PTR_ERR(rk_rng->rst),
-+				     "Failed to get reset property\n");
-+
-+	reset_control_assert(rk_rng->rst);
-+	udelay(2);
-+	reset_control_deassert(rk_rng->rst);
-+
-+	platform_set_drvdata(pdev, rk_rng);
-+
-+	rk_rng->rng.name = dev_driver_string(dev);
-+#ifndef CONFIG_PM
-+	rk_rng->rng.init = rk_rng_init;
-+	rk_rng->rng.cleanup = rk_rng_cleanup;
-+#endif
-+	rk_rng->rng.read = rk_rng_read;
-+	rk_rng->rng.priv = (unsigned long) dev;
-+	rk_rng->rng.quality = 900;
-+
-+	pm_runtime_set_autosuspend_delay(dev, RK_RNG_AUTOSUSPEND_DELAY);
-+	pm_runtime_use_autosuspend(dev);
-+	pm_runtime_enable(dev);
-+
-+	ret = devm_hwrng_register(dev, &rk_rng->rng);
-+	if (ret)
-+		return dev_err_probe(&pdev->dev, ret, "Failed to register Rockchip hwrng\n");
-+
-+	dev_info(&pdev->dev, "Registered Rockchip hwrng\n");
-+
-+	return 0;
-+}
-+
-+static int rk_rng_remove(struct platform_device *pdev)
-+{
-+	pm_runtime_disable(&pdev->dev);
-+
-+	return 0;
-+}
-+
-+#ifdef CONFIG_PM
-+static int rk_rng_runtime_suspend(struct device *dev)
-+{
-+	struct rk_rng *rk_rng = dev_get_drvdata(dev);
-+
-+	rk_rng_cleanup(&rk_rng->rng);
-+
-+	return 0;
-+}
-+
-+static int rk_rng_runtime_resume(struct device *dev)
-+{
-+	struct rk_rng *rk_rng = dev_get_drvdata(dev);
-+
-+	return rk_rng_init(&rk_rng->rng);
-+}
-+#endif
-+
-+static const struct dev_pm_ops rk_rng_pm_ops = {
-+	SET_RUNTIME_PM_OPS(rk_rng_runtime_suspend,
-+				rk_rng_runtime_resume, NULL)
-+	SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
-+				pm_runtime_force_resume)
-+};
-+
-+static const struct of_device_id rk_rng_dt_match[] = {
-+	{
-+		.compatible = "rockchip,rk3568-rng",
-+	},
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(of, rk_rng_dt_match);
-+
-+static struct platform_driver rk_rng_driver = {
-+	.driver	= {
-+		.name	= "rockchip-rng",
-+		.pm	= &rk_rng_pm_ops,
-+		.of_match_table = rk_rng_dt_match,
-+	},
-+	.probe	= rk_rng_probe,
-+	.remove = rk_rng_remove,
-+};
-+
-+module_platform_driver(rk_rng_driver);
-+
-+MODULE_DESCRIPTION("Rockchip True Random Number Generator driver");
-+MODULE_AUTHOR("Lin Jinhan <troy.lin at rock-chips.com>, Aurelien Jarno <aurelien at aurel32.net>");
-+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch b/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
deleted file mode 100644
index bb34ba76e0..0000000000
--- a/target/linux/rockchip/patches-6.1/301-arm64-dts-rockchip-add-DT-entry-for-RNG-to-RK356x.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From patchwork Sat Nov 12 14:10:59 2022
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Aurelien Jarno <aurelien at aurel32.net>
-X-Patchwork-Id: 13041221
-From: Aurelien Jarno <aurelien at aurel32.net>
-To: Olivia Mackall <olivia at selenic.com>,
-	Herbert Xu <herbert at gondor.apana.org.au>,
-	Rob Herring <robh+dt at kernel.org>,
-	Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>,
-	Heiko Stuebner <heiko at sntech.de>,
-	Philipp Zabel <p.zabel at pengutronix.de>,
-	Lin Jinhan <troy.lin at rock-chips.com>
-Cc: linux-crypto at vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR
- CORE),
-	devicetree at vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE
- BINDINGS),
-	linux-arm-kernel at lists.infradead.org (moderated list:ARM/Rockchip SoC
- support),
-	linux-rockchip at lists.infradead.org (open list:ARM/Rockchip SoC support),
-	linux-kernel at vger.kernel.org (open list),
-	Aurelien Jarno <aurelien at aurel32.net>
-Subject: [PATCH v1 3/3] arm64: dts: rockchip: add DT entry for RNG to RK356x
-Date: Sat, 12 Nov 2022 15:10:59 +0100
-Message-Id: <20221112141059.3802506-4-aurelien at aurel32.net>
-In-Reply-To: <20221112141059.3802506-1-aurelien at aurel32.net>
-References: <20221112141059.3802506-1-aurelien at aurel32.net>
-MIME-Version: 1.0
-List-Id: <linux-arm-kernel.lists.infradead.org>
-
-Enable the just added Rockchip RNG driver for RK356x SoCs.
-
-Signed-off-by: Aurelien Jarno <aurelien at aurel32.net>
----
- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
-+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
-@@ -1773,6 +1773,15 @@
- 		};
- 	};
- 
-+	rng: rng at fe388000 {
-+		compatible = "rockchip,rk3568-rng";
-+		reg = <0x0 0xfe388000 0x0 0x4000>;
-+		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
-+		clock-names = "trng_clk", "trng_hclk";
-+		resets = <&cru SRST_TRNG_NS>;
-+		reset-names = "reset";
-+	};
-+
- 	pinctrl: pinctrl {
- 		compatible = "rockchip,rk3568-pinctrl";
- 		rockchip,grf = <&grf>;



From lede-commits at lists.infradead.org  Thu May  9 01:45:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 04:45:33 -0400
Subject: [openwrt/openwrt]  tools: mold: update to 2.31.0
In-Reply-To: <171524433341.2849345.10750104421558868460@git-01.infra.openwrt.org>
References: <171524433341.2849345.10750104421558868460@git-01.infra.openwrt.org>
Message-ID: <mailman.35124.1715244337.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d03b567b668d14020396def542c0fc829c65d208

commit d03b567b668d14020396def542c0fc829c65d208
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Mon May 6 12:09:09 2024 -0400

    tools: mold: update to 2.31.0
    
    New:
    - mold is now up to 10% faster when linking very large, debug
      info-enabled executables such as Blender (~1.8 GiB) or Clang (~3.8
      GiB), thanks to several improvements we've made to the string merging
      algorithm. (53ebcd8, d714301, 40f6b17, c9faf3d)
    - -z start-stop-visibility=hidden is now supported so that
      linker-synthesized __start_<section-name> and __stop_<section-name>
      symbols can be completely hidden from other ELF modules. Previously,
      only -z start-stop-visibility=protected was supported. (99a5b15)
    - -Bsymbolic-non-weak and -Bsymbolic-non-weak-functions options are now
      supported for compatibility with LLVM lld. Just like lld, these options
      control which symbols are exported as dynamic symbols.
      -Bsymbolic-non-weak makes the linker to export only weak symbols,
      whereas -Bsymbolic-non-weak-functions makes it to export only weak
      function symbols. (7d17aa8)
    
    Bug fixes and compatibility improvements:
    
    - Previously, if a linker script contains a newline character in the
      beginning four bytes of a file, it was not recognized as a linker
      script by mold. Now, mold allows newlines at the beginning of a file.
      (ea054cc)
    - Under rare circumstances, the INPUT linker script command may have
      found a different file than GNU ld would. Now, mold's behavior aligns
      with GNU ld's. (163975d)
    - Previously, the --repro option produced corrupted tar files. Now the
      bug has been fixed. (32c4a09)
    - mold generally guarantees that its output is reproducible, meaning that
      if you run the linker with the exact same command line options and
      input files, the output is guaranteed to be bit-for-bit identical to
      the previous outputs. However, under rare circumstances, it might
      produce different output due to a bug. It's reported that this
      nondeterminism caused random crashes for some programs (#1247). This
      bug has been fixed. (6463a7c)
    - mold no longer sets the address of the .text section as the entry point
      address if --entry option is not given, just like LLVM lld. (020b1a7)
    - [RISC-V] __global_pointer$ symbol is now exported from executables as
      required by the processor-specific ABI. (3df7c8e)
    - [ARM32] --long-plt option is now recognized as known option by mold.
      mold ignores the option, though, because the PLTs generated by our
      linker is always long. (d432e98)
    
    Release Notes:
    https://github.com/rui314/mold/releases/tag/v2.31.0
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15403
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/mold/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mold/Makefile b/tools/mold/Makefile
index b2a3231e67..7a7e2321b1 100644
--- a/tools/mold/Makefile
+++ b/tools/mold/Makefile
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mold
-PKG_VERSION:=2.30.0
+PKG_VERSION:=2.31.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags
-PKG_HASH:=6e5178ccafe828fdb4ba0dd841d083ff6004d3cb41e56485143eb64c716345fd
+PKG_HASH:=3dc3af83a5d22a4b29971bfad17261851d426961c665480e2ca294e5c74aa1e5
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Thu May  9 08:01:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 11:01:02 -0400
Subject: [openwrt/openwrt]  generic: 6.6: backport patch adding support for
 rgmii-id in stmmac-ipq806x
In-Reply-To: <171526686258.248934.2468047673097145126@git-01.infra.openwrt.org>
References: <171526686258.248934.2468047673097145126@git-01.infra.openwrt.org>
Message-ID: <mailman.35205.1715266870.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9001014a24e4211a83246653b96721b79f4a92f7

commit 9001014a24e4211a83246653b96721b79f4a92f7
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu May 9 16:32:03 2024 +0200

    generic: 6.6: backport patch adding support for rgmii-id in stmmac-ipq806x
    
    Backport patch merged upstream for rgmii-id support in stmmac-ipq806x.
    
    This is needed for some device that directly connets PHY to the gmac
    port and require rgmii-id phy-modes.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...dwmac-ipq806x-account-for-rgmii-txid-rxid.patch | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/target/linux/generic/backport-6.6/740-v6.10-net-stmmac-dwmac-ipq806x-account-for-rgmii-txid-rxid.patch b/target/linux/generic/backport-6.6/740-v6.10-net-stmmac-dwmac-ipq806x-account-for-rgmii-txid-rxid.patch
new file mode 100644
index 0000000000..ab8e9ffab5
--- /dev/null
+++ b/target/linux/generic/backport-6.6/740-v6.10-net-stmmac-dwmac-ipq806x-account-for-rgmii-txid-rxid.patch
@@ -0,0 +1,68 @@
+From abb45a2477f533cd4aab3085defdff131e2e8c4f Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Mon, 6 May 2024 14:32:46 +0200
+Subject: [PATCH] net: stmmac: dwmac-ipq806x: account for rgmii-txid/rxid/id
+ phy-mode
+
+Currently the ipq806x dwmac driver is almost always used attached to the
+CPU port of a switch and phy-mode was always set to "rgmii" or "sgmii".
+
+Some device came up with a special configuration where the PHY is
+directly attached to the GMAC port and in those case phy-mode needs to
+be set to "rgmii-id" to make the PHY correctly work and receive packets.
+
+Since the driver supports only "rgmii" and "sgmii" mode, when "rgmii-id"
+(or variants) mode is set, the mode is rejected and probe fails.
+
+Add support also for these phy-modes to correctly setup PHYs that requires
+delay applied to tx/rx.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
++++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+@@ -171,6 +171,9 @@ static int ipq806x_gmac_set_speed(struct
+ 
+ 	switch (gmac->phy_mode) {
+ 	case PHY_INTERFACE_MODE_RGMII:
++	case PHY_INTERFACE_MODE_RGMII_ID:
++	case PHY_INTERFACE_MODE_RGMII_RXID:
++	case PHY_INTERFACE_MODE_RGMII_TXID:
+ 		div = get_clk_div_rgmii(gmac, speed);
+ 		clk_bits = NSS_COMMON_CLK_GATE_RGMII_RX_EN(gmac->id) |
+ 			   NSS_COMMON_CLK_GATE_RGMII_TX_EN(gmac->id);
+@@ -412,6 +415,9 @@ static int ipq806x_gmac_probe(struct pla
+ 	val |= NSS_COMMON_GMAC_CTL_CSYS_REQ;
+ 	switch (gmac->phy_mode) {
+ 	case PHY_INTERFACE_MODE_RGMII:
++	case PHY_INTERFACE_MODE_RGMII_ID:
++	case PHY_INTERFACE_MODE_RGMII_RXID:
++	case PHY_INTERFACE_MODE_RGMII_TXID:
+ 		val |= NSS_COMMON_GMAC_CTL_PHY_IFACE_SEL;
+ 		break;
+ 	case PHY_INTERFACE_MODE_SGMII:
+@@ -427,6 +433,9 @@ static int ipq806x_gmac_probe(struct pla
+ 	val &= ~(1 << NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id));
+ 	switch (gmac->phy_mode) {
+ 	case PHY_INTERFACE_MODE_RGMII:
++	case PHY_INTERFACE_MODE_RGMII_ID:
++	case PHY_INTERFACE_MODE_RGMII_RXID:
++	case PHY_INTERFACE_MODE_RGMII_TXID:
+ 		val |= NSS_COMMON_CLK_SRC_CTRL_RGMII(gmac->id) <<
+ 			NSS_COMMON_CLK_SRC_CTRL_OFFSET(gmac->id);
+ 		break;
+@@ -444,6 +453,9 @@ static int ipq806x_gmac_probe(struct pla
+ 	val |= NSS_COMMON_CLK_GATE_PTP_EN(gmac->id);
+ 	switch (gmac->phy_mode) {
+ 	case PHY_INTERFACE_MODE_RGMII:
++	case PHY_INTERFACE_MODE_RGMII_ID:
++	case PHY_INTERFACE_MODE_RGMII_RXID:
++	case PHY_INTERFACE_MODE_RGMII_TXID:
+ 		val |= NSS_COMMON_CLK_GATE_RGMII_RX_EN(gmac->id) |
+ 			NSS_COMMON_CLK_GATE_RGMII_TX_EN(gmac->id);
+ 		break;



From lede-commits at lists.infradead.org  Thu May  9 10:37:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 13:37:57 -0400
Subject: [openwrt/openwrt]  dropbear: clarify DROPBEAR_MODERN_ONLY option
In-Reply-To: <171527627676.889750.14257043348432416978@git-01.infra.openwrt.org>
References: <171527627676.889750.14257043348432416978@git-01.infra.openwrt.org>
Message-ID: <mailman.35230.1715276285.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2cd414c33e511235db6d339e1268faf9749a14e1

commit 2cd414c33e511235db6d339e1268faf9749a14e1
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Mon May 6 16:20:16 2024 +0300

    dropbear: clarify DROPBEAR_MODERN_ONLY option
    
    don't mention SHA1 in order to not confuse users - SHA1 support is already disabled (except RSA-SHA1 signagures).
    
    ref: https://github.com/openwrt/openwrt/issues/15281
    
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
---
 package/network/services/dropbear/Config.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in
index 7ffe7684d4..0d012b21b0 100644
--- a/package/network/services/dropbear/Config.in
+++ b/package/network/services/dropbear/Config.in
@@ -186,7 +186,6 @@ config DROPBEAR_MODERN_ONLY
 		and disables:
 		 - AES
 		 - RSA
-		 - SHA1
 
 		Reduces binary size by about 64 kB (MIPS) from default
 		configuration.



From lede-commits at lists.infradead.org  Thu May  9 10:37:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 13:37:56 -0400
Subject: [openwrt/openwrt]  dropbear: bump to 2024.85
In-Reply-To: <171527627676.889750.14257043348432416978@git-01.infra.openwrt.org>
References: <171527627676.889750.14257043348432416978@git-01.infra.openwrt.org>
Message-ID: <mailman.35231.1715276288.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f230d00e64187ad7c2d91dc8275e9fba28bb9df5

commit f230d00e64187ad7c2d91dc8275e9fba28bb9df5
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Mon May 6 16:20:16 2024 +0300

    dropbear: bump to 2024.85
    
    - update dropbear to latest stable 2024.85;
      for the changes see https://matt.ucc.asn.au/dropbear/CHANGES
    - drop cherry-picked patches (merged in release 2024.84)
    - refresh remaining patches
    
    Tested-by: Stijn Segers <foss at volatilesystems.org>
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
---
 package/network/services/dropbear/Makefile         |  12 +-
 .../network/services/dropbear/files/dropbear.init  |   4 +-
 .../patches/001-add-if-DROPBEAR_RSA-guards.patch   | 104 ----------
 .../dropbear/patches/002-fix-y2038-issues.patch    | 198 -------------------
 .../dropbear/patches/003-fix-DROPBEAR_DSS.patch    |  25 ---
 ...w-users-s-own-gid-in-pty-permission-check.patch |  24 ---
 .../patches/005-const-parameter-mp_int.patch       | 123 ------------
 ...6-dropbearkey-add-missing-break-in-switch.patch |  21 --
 .../007-fix-building-only-client-or-server.patch   |  29 ---
 ...isable-rsa-signatures-when-no-rsa-hostkey.patch |  94 ---------
 ...write-rather-than-fprintf-in-segv-handler.patch |  27 ---
 .../dropbear/patches/010-remove-SO_LINGER.patch    |  39 ----
 .../011-add-option-to-bind-to-interface.patch      | 147 --------------
 .../012-add-ifdef-guards-for-SO_BINDTODEVICE.patch |  50 -----
 ...013-make-banner-reading-failure-non-fatal.patch |  74 -------
 ...ey-ignore-unsupported-command-line-option.patch |  60 ------
 ...-libtommath-fix-possible-integer-overflow.patch | 121 ------------
 ...6-src-svr-tcpfwd-Fix-noremotetcp-behavior.patch |  35 ----
 .../patches/017-Don-t-try-to-shutdown-a-pty.patch  |  32 ---
 .../018-dropbearkey-add-alias-to-ssh-keygen.patch  |  33 ----
 .../patches/019-Allow-inetd-with-non-syslog.patch  |  34 ----
 .../020-Fix-test-for-multiuser-kernels.patch       |  33 ----
 .../patches/021-Implement-Strict-KEX-mode.patch    | 216 ---------------------
 .../dropbear/patches/100-pubkey_path.patch         |   4 +-
 .../dropbear/patches/110-change_user.patch         |   6 +-
 .../dropbear/patches/130-ssh_ignore_x_args.patch   |   6 +-
 .../dropbear/patches/140-disable_assert.patch      |   4 +-
 .../dropbear/patches/160-lto-jobserver.patch       |   4 +-
 .../patches/600-allow-blank-root-password.patch    |   4 +-
 .../dropbear/patches/900-configure-hardening.patch |   2 +-
 .../dropbear/patches/901-bundled-libs-cflags.patch |   2 +-
 ...0-signkey-fix-use-of-rsa-sha2-256-pubkeys.patch |   4 +-
 32 files changed, 26 insertions(+), 1545 deletions(-)

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index abb46157ea..3812602b35 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -8,14 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
-PKG_VERSION:=2022.83
-PKG_RELEASE:=2
+PKG_VERSION:=2024.85
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
 	https://matt.ucc.asn.au/dropbear/releases/ \
 	https://dropbear.nl/mirror/releases/
-PKG_HASH:=bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b
+PKG_HASH:=86b036c433a69d89ce51ebae335d65c47738ccf90d13e5eb0fea832e556da502
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
@@ -103,7 +103,7 @@ CONFIGURE_ARGS += \
 ##############################################################################
 #
 #   option,value - add option to localoptions.h
-# !!option,value - replace option in sysoptions.h
+# !!option,value - replace option in src/sysoptions.h
 #
 ##############################################################################
 
@@ -132,7 +132,7 @@ DB_OPT_COMMON = \
 ##############################################################################
 #
 #   option,config,enabled,disabled = add option to localoptions.h
-# !!option,config,enabled,disabled = replace option in sysoptions.h
+# !!option,config,enabled,disabled = replace option in src/sysoptions.h
 #
 #   option := (config) ? enabled : disabled
 #
@@ -164,7 +164,7 @@ TARGET_CFLAGS += -DARGTYPE=3
 xsedx:=$(shell printf '\027')
 
 db_opt_add     =echo '\#define $(1) $(2)' >> $(PKG_BUILD_DIR)/localoptions.h
-db_opt_replace =$(ESED) '/^\#define $(1) .*$$$$/{h;:a;$$$$!n;/^\#.+$$$$/bb;/^$$$$/bb;H;ba;:b;x;s$(xsedx)^.+$$$$$(xsedx)\#define $(1) $(2)$(xsedx)p;x};p' -n $(PKG_BUILD_DIR)/sysoptions.h
+db_opt_replace =$(ESED) '/^\#define $(1) .*$$$$/{h;:a;$$$$!n;/^\#.+$$$$/bb;/^$$$$/bb;H;ba;:b;x;s$(xsedx)^.+$$$$$(xsedx)\#define $(1) $(2)$(xsedx)p;x};p' -n $(PKG_BUILD_DIR)/src/sysoptions.h
 
 define Build/Configure/dropbear_headers
 	$(strip $(foreach s,$(DB_OPT_COMMON), \
diff --git a/package/network/services/dropbear/files/dropbear.init b/package/network/services/dropbear/files/dropbear.init
index 21570987c4..708fabd326 100755
--- a/package/network/services/dropbear/files/dropbear.init
+++ b/package/network/services/dropbear/files/dropbear.init
@@ -261,7 +261,7 @@ dropbear_instance()
 		esac
 
 		local c=0
-		# sysoptions.h
+		# src/sysoptions.h
 		local DROPBEAR_MAX_PORTS=10
 
 		local a n if_ipaddrs
@@ -341,7 +341,7 @@ dropbear_instance()
 		# ref: validate_section_dropbear()
 		# default receive window size is 24576 (DEFAULT_RECV_WINDOW in default_options.h)
 
-		# sysoptions.h
+		# src/sysoptions.h
 		local MAX_RECV_WINDOW=10485760
 		if [ "${RecvWindowSize}" -gt ${MAX_RECV_WINDOW} ] ; then
 			# separate logging is required because syslog misses dropbear's message
diff --git a/package/network/services/dropbear/patches/001-add-if-DROPBEAR_RSA-guards.patch b/package/network/services/dropbear/patches/001-add-if-DROPBEAR_RSA-guards.patch
deleted file mode 100644
index ad1a20c520..0000000000
--- a/package/network/services/dropbear/patches/001-add-if-DROPBEAR_RSA-guards.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 36a03132634a17c667c0fac0a8e1519b3d1b71c6 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Mon, 28 Nov 2022 21:12:23 +0800
-Subject: Add #if DROPBEAR_RSA guards
-
-Fixes building with DROPBEAR_RSA disabled.
-Closes #197
----
- signkey.c    | 8 +++++++-
- signkey.h    | 2 ++
- sysoptions.h | 5 +----
- 3 files changed, 10 insertions(+), 5 deletions(-)
-
---- a/signkey.c
-+++ b/signkey.c
-@@ -120,6 +120,7 @@ enum signkey_type signkey_type_from_name
- /* Special case for rsa-sha2-256. This could be generalised if more 
-    signature names are added that aren't 1-1 with public key names */
- const char* signature_name_from_type(enum signature_type type, unsigned int *namelen) {
-+#if DROPBEAR_RSA
- #if DROPBEAR_RSA_SHA256
- 	if (type == DROPBEAR_SIGNATURE_RSA_SHA256) {
- 		if (namelen) {
-@@ -136,11 +137,13 @@ const char* signature_name_from_type(enu
- 		return SSH_SIGNKEY_RSA;
- 	}
- #endif
-+#endif /* DROPBEAR_RSA */
- 	return signkey_name_from_type((enum signkey_type)type, namelen);
- }
- 
- /* Returns DROPBEAR_SIGNATURE_NONE if none match */
- enum signature_type signature_type_from_name(const char* name, unsigned int namelen) {
-+#if DROPBEAR_RSA
- #if DROPBEAR_RSA_SHA256
- 	if (namelen == strlen(SSH_SIGNATURE_RSA_SHA256) 
- 		&& memcmp(name, SSH_SIGNATURE_RSA_SHA256, namelen) == 0) {
-@@ -153,10 +156,11 @@ enum signature_type signature_type_from_
- 		return DROPBEAR_SIGNATURE_RSA_SHA1;
- 	}
- #endif
-+#endif /* DROPBEAR_RSA */
- 	return (enum signature_type)signkey_type_from_name(name, namelen);
- }
- 
--/* Returns the signature type from a key type. Must not be called 
-+/* Returns the signature type from a key type. Must not be called
-    with RSA keytype */
- enum signature_type signature_type_from_signkey(enum signkey_type keytype) {
- #if DROPBEAR_RSA
-@@ -167,6 +171,7 @@ enum signature_type signature_type_from_
- }
- 
- enum signkey_type signkey_type_from_signature(enum signature_type sigtype) {
-+#if DROPBEAR_RSA
- #if DROPBEAR_RSA_SHA256
- 	if (sigtype == DROPBEAR_SIGNATURE_RSA_SHA256) {
- 		return DROPBEAR_SIGNKEY_RSA;
-@@ -177,6 +182,7 @@ enum signkey_type signkey_type_from_sign
- 		return DROPBEAR_SIGNKEY_RSA;
- 	}
- #endif
-+#endif /* DROPBEAR_RSA */
- 	assert((int)sigtype < (int)DROPBEAR_SIGNKEY_NUM_NAMED);
- 	return (enum signkey_type)sigtype;
- }
---- a/signkey.h
-+++ b/signkey.h
-@@ -79,12 +79,14 @@ enum signature_type {
- 	DROPBEAR_SIGNATURE_SK_ED25519 = DROPBEAR_SIGNKEY_SK_ED25519,
- #endif
- #endif
-+#if DROPBEAR_RSA
- #if DROPBEAR_RSA_SHA1
- 	DROPBEAR_SIGNATURE_RSA_SHA1 = 100, /* ssh-rsa signature (sha1) */
- #endif
- #if DROPBEAR_RSA_SHA256
- 	DROPBEAR_SIGNATURE_RSA_SHA256 = 101, /* rsa-sha2-256 signature. has a ssh-rsa key */
- #endif
-+#endif /* DROPBEAR_RSA */
- 	DROPBEAR_SIGNATURE_NONE = DROPBEAR_SIGNKEY_NONE,
- };
- 
---- a/sysoptions.h
-+++ b/sysoptions.h
-@@ -137,7 +137,7 @@
- 
- /* Debian doesn't define this in system headers */
- #if !defined(LTM_DESC) && (DROPBEAR_ECC)
--#define LTM_DESC 
-+#define LTM_DESC
- #endif
- 
- #define DROPBEAR_ECC_256 (DROPBEAR_ECC)
-@@ -151,9 +151,6 @@
-  * signing operations slightly slower. */
- #define DROPBEAR_RSA_BLINDING 1
- 
--#ifndef DROPBEAR_RSA_SHA1
--#define DROPBEAR_RSA_SHA1 DROPBEAR_RSA
--#endif
- #ifndef DROPBEAR_RSA_SHA256
- #define DROPBEAR_RSA_SHA256 DROPBEAR_RSA
- #endif
diff --git a/package/network/services/dropbear/patches/002-fix-y2038-issues.patch b/package/network/services/dropbear/patches/002-fix-y2038-issues.patch
deleted file mode 100644
index 0654e3b98b..0000000000
--- a/package/network/services/dropbear/patches/002-fix-y2038-issues.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From ec2215726cffb976019d08ebf569edd2229e9dba Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Thu, 1 Dec 2022 11:34:43 +0800
-Subject: Fix y2038 issues with time_t conversion
-
-These changes were identified by building with and without
--D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64
-on 32-bit arm, logging warnings to files.
--Wconversion was added to CFLAGS in both builds.
-
-Then a "diff -I Wconversion log1 log2" shows new warnings that appear
-with the 64-bit time_t. There are a few false positives that have been
-fixed for quietness.
-
-struct logininfo and struct wtmp are still problematic, those will
-need to be handled by libc.
----
- common-session.c | 43 +++++++++++++++++++++++++++----------------
- dbutil.c         |  2 +-
- loginrec.c       |  2 ++
- loginrec.h       |  4 ++--
- runopts.h        |  4 ++--
- svr-auth.c       |  2 +-
- 6 files changed, 35 insertions(+), 22 deletions(-)
-
---- a/common-session.c
-+++ b/common-session.c
-@@ -519,15 +519,24 @@ static void send_msg_keepalive() {
- 	ses.last_packet_time_idle = old_time_idle;
- }
- 
-+/* Returns the difference in seconds, clamped to LONG_MAX */
-+static long elapsed(time_t now, time_t prev) {
-+	time_t del = now - prev;
-+	if (del > LONG_MAX) {
-+		return LONG_MAX;
-+	}
-+	return (long)del;
-+}
-+
- /* Check all timeouts which are required. Currently these are the time for
-  * user authentication, and the automatic rekeying. */
- static void checktimeouts() {
- 
- 	time_t now;
- 	now = monotonic_now();
--	
-+
- 	if (IS_DROPBEAR_SERVER && ses.connect_time != 0
--		&& now - ses.connect_time >= AUTH_TIMEOUT) {
-+		&& elapsed(now, ses.connect_time) >= AUTH_TIMEOUT) {
- 			dropbear_close("Timeout before auth");
- 	}
- 
-@@ -537,45 +546,47 @@ static void checktimeouts() {
- 	}
- 
- 	if (!ses.kexstate.sentkexinit
--			&& (now - ses.kexstate.lastkextime >= KEX_REKEY_TIMEOUT
-+			&& (elapsed(now, ses.kexstate.lastkextime) >= KEX_REKEY_TIMEOUT
- 			|| ses.kexstate.datarecv+ses.kexstate.datatrans >= KEX_REKEY_DATA)) {
- 		TRACE(("rekeying after timeout or max data reached"))
- 		send_msg_kexinit();
- 	}
--	
-+
- 	if (opts.keepalive_secs > 0 && ses.authstate.authdone) {
- 		/* Avoid sending keepalives prior to auth - those are
- 		not valid pre-auth packet types */
- 
- 		/* Send keepalives if we've been idle */
--		if (now - ses.last_packet_time_any_sent >= opts.keepalive_secs) {
-+		if (elapsed(now, ses.last_packet_time_any_sent) >= opts.keepalive_secs) {
- 			send_msg_keepalive();
- 		}
- 
- 		/* Also send an explicit keepalive message to trigger a response
- 		if the remote end hasn't sent us anything */
--		if (now - ses.last_packet_time_keepalive_recv >= opts.keepalive_secs
--			&& now - ses.last_packet_time_keepalive_sent >= opts.keepalive_secs) {
-+		if (elapsed(now, ses.last_packet_time_keepalive_recv) >= opts.keepalive_secs
-+			&& elapsed(now, ses.last_packet_time_keepalive_sent) >= opts.keepalive_secs) {
- 			send_msg_keepalive();
- 		}
- 
--		if (now - ses.last_packet_time_keepalive_recv 
-+		if (elapsed(now, ses.last_packet_time_keepalive_recv)
- 			>= opts.keepalive_secs * DEFAULT_KEEPALIVE_LIMIT) {
- 			dropbear_exit("Keepalive timeout");
- 		}
- 	}
- 
--	if (opts.idle_timeout_secs > 0 
--			&& now - ses.last_packet_time_idle >= opts.idle_timeout_secs) {
-+	if (opts.idle_timeout_secs > 0
-+			&& elapsed(now, ses.last_packet_time_idle) >= opts.idle_timeout_secs) {
- 		dropbear_close("Idle timeout");
- 	}
- }
- 
--static void update_timeout(long limit, long now, long last_event, long * timeout) {
--	TRACE2(("update_timeout limit %ld, now %ld, last %ld, timeout %ld",
--		limit, now, last_event, *timeout))
-+static void update_timeout(long limit, time_t now, time_t last_event, long * timeout) {
-+	TRACE2(("update_timeout limit %ld, now %llu, last %llu, timeout %ld",
-+		limit,
-+		(unsigned long long)now,
-+		(unsigned long long)last_event, *timeout))
- 	if (last_event > 0 && limit > 0) {
--		*timeout = MIN(*timeout, last_event+limit-now);
-+		*timeout = MIN(*timeout, elapsed(now, last_event) + limit);
- 		TRACE2(("new timeout %ld", *timeout))
- 	}
- }
-@@ -584,7 +595,7 @@ static long select_timeout() {
- 	/* determine the minimum timeout that might be required, so
- 	as to avoid waking when unneccessary */
- 	long timeout = KEX_REKEY_TIMEOUT;
--	long now = monotonic_now();
-+	time_t now = monotonic_now();
- 
- 	if (!ses.kexstate.sentkexinit) {
- 		update_timeout(KEX_REKEY_TIMEOUT, now, ses.kexstate.lastkextime, &timeout);
-@@ -596,7 +607,7 @@ static long select_timeout() {
- 	}
- 
- 	if (ses.authstate.authdone) {
--		update_timeout(opts.keepalive_secs, now, 
-+		update_timeout(opts.keepalive_secs, now,
- 			MAX(ses.last_packet_time_keepalive_recv, ses.last_packet_time_keepalive_sent),
- 			&timeout);
- 	}
---- a/dbutil.c
-+++ b/dbutil.c
-@@ -724,7 +724,7 @@ void gettime_wrapper(struct timespec *no
- 	/* Fallback for everything else - this will sometimes go backwards */
- 	gettimeofday(&tv, NULL);
- 	now->tv_sec = tv.tv_sec;
--	now->tv_nsec = 1000*tv.tv_usec;
-+	now->tv_nsec = 1000*(long)tv.tv_usec;
- }
- 
- /* second-resolution monotonic timestamp */
---- a/loginrec.c
-+++ b/loginrec.c
-@@ -459,6 +459,7 @@ line_abbrevname(char *dst, const char *s
- void
- set_utmp_time(struct logininfo *li, struct utmp *ut)
- {
-+	/* struct utmp in glibc isn't y2038 safe yet */
- # ifdef HAVE_STRUCT_UTMP_UT_TV
- 	ut->ut_tv.tv_sec = li->tv_sec;
- 	ut->ut_tv.tv_usec = li->tv_usec;
-@@ -1272,6 +1273,7 @@ lastlog_construct(struct logininfo *li,
- 	(void)line_stripname(last->ll_line, li->line, sizeof(last->ll_line));
- 	strlcpy(last->ll_host, li->hostname,
- 		MIN_SIZEOF(last->ll_host, li->hostname));
-+	/* struct lastlog in glibc isn't y2038 safe yet */
- 	last->ll_time = li->tv_sec;
- }
- 
---- a/loginrec.h
-+++ b/loginrec.h
-@@ -139,8 +139,8 @@ struct logininfo {
- 	/* struct timeval (sys/time.h) isn't always available, if it isn't we'll
- 	 * use time_t's value as tv_sec and set tv_usec to 0
- 	 */
--	unsigned int tv_sec;
--	unsigned int tv_usec;
-+	time_t tv_sec;
-+	suseconds_t tv_usec;
- 	union login_netinfo hostaddr;       /* caller's host address(es) */
- }; /* struct logininfo */
- 
---- a/runopts.h
-+++ b/runopts.h
-@@ -39,8 +39,8 @@ typedef struct runopts {
- 	int listen_fwd_all;
- #endif
- 	unsigned int recv_window;
--	time_t keepalive_secs; /* Time between sending keepalives. 0 is off */
--	time_t idle_timeout_secs; /* Exit if no traffic is sent/received in this time */
-+	long keepalive_secs; /* Time between sending keepalives. 0 is off */
-+	long idle_timeout_secs; /* Exit if no traffic is sent/received in this time */
- 	int usingsyslog;
- 
- #ifndef DISABLE_ZLIB
---- a/svr-auth.c
-+++ b/svr-auth.c
-@@ -389,7 +389,7 @@ void send_msg_userauth_failure(int parti
- 		Beware of integer overflow if increasing these values */
- 		const unsigned int mindelay = 250000000;
- 		const unsigned int vardelay = 100000000;
--		unsigned int rand_delay;
-+		suseconds_t rand_delay;
- 		struct timespec delay;
- 
- 		gettime_wrapper(&delay);
diff --git a/package/network/services/dropbear/patches/003-fix-DROPBEAR_DSS.patch b/package/network/services/dropbear/patches/003-fix-DROPBEAR_DSS.patch
deleted file mode 100644
index 6789800e12..0000000000
--- a/package/network/services/dropbear/patches/003-fix-DROPBEAR_DSS.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From c043efb47c3173072fa636ca0da0d19875d4511f Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Tue, 6 Dec 2022 22:34:11 +0800
-Subject: Fix so DROPBEAR_DSS is only forced for fuzzing
-
-Regression from 787391ea3b5af2acf5e3c83372510f0c79477ad7,
-was missing fuzzing conditional
----
- sysoptions.h | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/sysoptions.h
-+++ b/sysoptions.h
-@@ -380,9 +380,11 @@
- #endif
- 
- /* Fuzzing expects all key types to be enabled */
-+#if DROPBEAR_FUZZ
- #if defined(DROPBEAR_DSS)
- #undef DROPBEAR_DSS
- #endif
- #define DROPBEAR_DSS 1
-+#endif
- 
- /* no include guard for this file */
diff --git a/package/network/services/dropbear/patches/004-allow-users-s-own-gid-in-pty-permission-check.patch b/package/network/services/dropbear/patches/004-allow-users-s-own-gid-in-pty-permission-check.patch
deleted file mode 100644
index bcb43aed2a..0000000000
--- a/package/network/services/dropbear/patches/004-allow-users-s-own-gid-in-pty-permission-check.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 860721558837441ab45019858e710a2625ffa46e Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Wed, 7 Dec 2022 13:04:10 +0800
-Subject: Allow users's own gid in pty permission check
-
-This allows non-root Dropbear to work even without devpts gid=5 mount
-option on Linux.
----
- sshpty.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/sshpty.c
-+++ b/sshpty.c
-@@ -380,7 +380,9 @@ pty_setowner(struct passwd *pw, const ch
- 				tty_name, strerror(errno));
- 	}
- 
--	if (st.st_uid != pw->pw_uid || st.st_gid != gid) {
-+	/* Allow either "tty" gid or user's own gid. On Linux with openpty()
-+	 * this varies depending on the devpts mount options */
-+	if (st.st_uid != pw->pw_uid || !(st.st_gid == gid || st.st_gid == pw->pw_gid)) {
- 		if (chown(tty_name, pw->pw_uid, gid) < 0) {
- 			if (errno == EROFS &&
- 			    (st.st_uid == pw->pw_uid || st.st_uid == 0)) {
diff --git a/package/network/services/dropbear/patches/005-const-parameter-mp_int.patch b/package/network/services/dropbear/patches/005-const-parameter-mp_int.patch
deleted file mode 100644
index 0d23c9c416..0000000000
--- a/package/network/services/dropbear/patches/005-const-parameter-mp_int.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 01415ef8269e594a647f67ea0729ca8b590679de Mon Sep 17 00:00:00 2001
-From: Francois Perrad <francois.perrad at gadz.org>
-Date: Thu, 22 Dec 2022 10:19:54 +0100
-Subject: const parameter mp_int
-
----
- bignum.c   | 2 +-
- bignum.h   | 2 +-
- buffer.c   | 2 +-
- buffer.h   | 2 +-
- dbrandom.c | 2 +-
- dbrandom.h | 2 +-
- dbutil.c   | 2 +-
- dbutil.h   | 2 +-
- genrsa.c   | 4 ++--
- 9 files changed, 10 insertions(+), 10 deletions(-)
-
---- a/bignum.c
-+++ b/bignum.c
-@@ -93,7 +93,7 @@ void bytes_to_mp(mp_int *mp, const unsig
- 
- /* hash the ssh representation of the mp_int mp */
- void hash_process_mp(const struct ltc_hash_descriptor *hash_desc, 
--				hash_state *hs, mp_int *mp) {
-+				hash_state *hs, const mp_int *mp) {
- 	buffer * buf;
- 
- 	buf = buf_new(512 + 20); /* max buffer is a 4096 bit key, 
---- a/bignum.h
-+++ b/bignum.h
-@@ -33,6 +33,6 @@ void m_mp_alloc_init_multi(mp_int **mp,
- void m_mp_free_multi(mp_int **mp, ...)  ATTRIB_SENTINEL;
- void bytes_to_mp(mp_int *mp, const unsigned char* bytes, unsigned int len);
- void hash_process_mp(const struct ltc_hash_descriptor *hash_desc, 
--				hash_state *hs, mp_int *mp);
-+				hash_state *hs, const mp_int *mp);
- 
- #endif /* DROPBEAR_BIGNUM_H_ */
---- a/buffer.c
-+++ b/buffer.c
-@@ -299,7 +299,7 @@ void buf_putbytes(buffer *buf, const uns
- 
- /* for our purposes we only need positive (or 0) numbers, so will
-  * fail if we get negative numbers */
--void buf_putmpint(buffer* buf, mp_int * mp) {
-+void buf_putmpint(buffer* buf, const mp_int * mp) {
- 	size_t written;
- 	unsigned int len, pad = 0;
- 	TRACE2(("enter buf_putmpint"))
---- a/buffer.h
-+++ b/buffer.h
-@@ -65,7 +65,7 @@ void buf_putint(buffer* buf, unsigned in
- void buf_putstring(buffer* buf, const char* str, unsigned int len);
- void buf_putbufstring(buffer *buf, const buffer* buf_str);
- void buf_putbytes(buffer *buf, const unsigned char *bytes, unsigned int len);
--void buf_putmpint(buffer* buf, mp_int * mp);
-+void buf_putmpint(buffer* buf, const mp_int * mp);
- int buf_getmpint(buffer* buf, mp_int* mp);
- unsigned int buf_getint(buffer* buf);
- 
---- a/dbrandom.c
-+++ b/dbrandom.c
-@@ -347,7 +347,7 @@ void genrandom(unsigned char* buf, unsig
-  * rand must be an initialised *mp_int for the result.
-  * the result rand satisfies:  0 < rand < max 
-  * */
--void gen_random_mpint(mp_int *max, mp_int *rand) {
-+void gen_random_mpint(const mp_int *max, mp_int *rand) {
- 
- 	unsigned char *randbuf = NULL;
- 	unsigned int len = 0;
---- a/dbrandom.h
-+++ b/dbrandom.h
-@@ -30,6 +30,6 @@
- void seedrandom(void);
- void genrandom(unsigned char* buf, unsigned int len);
- void addrandom(const unsigned char * buf, unsigned int len);
--void gen_random_mpint(mp_int *max, mp_int *rand);
-+void gen_random_mpint(const mp_int *max, mp_int *rand);
- 
- #endif /* DROPBEAR_RANDOM_H_ */
---- a/dbutil.c
-+++ b/dbutil.c
-@@ -442,7 +442,7 @@ void printhex(const char * label, const
- 	}
- }
- 
--void printmpint(const char *label, mp_int *mp) {
-+void printmpint(const char *label, const mp_int *mp) {
- 	buffer *buf = buf_new(1000);
- 	buf_putmpint(buf, mp);
- 	fprintf(stderr, "%d bits ", mp_count_bits(mp));
---- a/dbutil.h
-+++ b/dbutil.h
-@@ -53,7 +53,7 @@ void dropbear_trace3(const char* format,
- void dropbear_trace4(const char* format, ...) ATTRIB_PRINTF(1,2);
- void dropbear_trace5(const char* format, ...) ATTRIB_PRINTF(1,2);
- void printhex(const char * label, const unsigned char * buf, int len);
--void printmpint(const char *label, mp_int *mp);
-+void printmpint(const char *label, const mp_int *mp);
- void debug_start_net(void);
- extern int debug_trace;
- #endif
---- a/genrsa.c
-+++ b/genrsa.c
-@@ -34,7 +34,7 @@
- #if DROPBEAR_RSA
- 
- static void getrsaprime(mp_int* prime, mp_int *primeminus, 
--		mp_int* rsa_e, unsigned int size_bytes);
-+		const mp_int* rsa_e, unsigned int size_bytes);
- 
- /* mostly taken from libtomcrypt's rsa key generation routine */
- dropbear_rsa_key * gen_rsa_priv_key(unsigned int size) {
-@@ -89,7 +89,7 @@ dropbear_rsa_key * gen_rsa_priv_key(unsi
- 
- /* return a prime suitable for p or q */
- static void getrsaprime(mp_int* prime, mp_int *primeminus, 
--		mp_int* rsa_e, unsigned int size_bytes) {
-+		const mp_int* rsa_e, unsigned int size_bytes) {
- 
- 	unsigned char *buf;
- 	int trials;
diff --git a/package/network/services/dropbear/patches/006-dropbearkey-add-missing-break-in-switch.patch b/package/network/services/dropbear/patches/006-dropbearkey-add-missing-break-in-switch.patch
deleted file mode 100644
index c7011021c1..0000000000
--- a/package/network/services/dropbear/patches/006-dropbearkey-add-missing-break-in-switch.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-From 39d955c49f31fc155e885447ee2be61c869d8c2d Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Tue, 3 Jan 2023 22:05:14 +0800
-Subject: Add missing break in switch
-
-Has no effect on execution, the fallthrough does nothing
-Closes #208
----
- dropbearkey.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/dropbearkey.c
-+++ b/dropbearkey.c
-@@ -139,6 +139,7 @@ static void check_signkey_bits(enum sign
- 				dropbear_exit("DSS keys have a fixed size of 1024 bits\n");
- 				exit(EXIT_FAILURE);
- 			}
-+			break;
- #endif
- 		default:
- 			(void)0; /* quiet, compiler. ecdsa handles checks itself */
diff --git a/package/network/services/dropbear/patches/007-fix-building-only-client-or-server.patch b/package/network/services/dropbear/patches/007-fix-building-only-client-or-server.patch
deleted file mode 100644
index 5fcfaad180..0000000000
--- a/package/network/services/dropbear/patches/007-fix-building-only-client-or-server.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 7a53c7f0f4b3eb23e002819553cb45558642c01d Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Wed, 4 Jan 2023 20:32:23 +0800
-Subject: Fix building only client or server
-
-Regressed when -Wundef was added
-
-Fixes #210
----
- sysoptions.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/sysoptions.h
-+++ b/sysoptions.h
-@@ -10,6 +10,14 @@
- #define LOCAL_IDENT "SSH-2.0-dropbear_" DROPBEAR_VERSION
- #define PROGNAME "dropbear"
- 
-+#ifndef DROPBEAR_CLIENT
-+#define DROPBEAR_CLIENT 0
-+#endif
-+
-+#ifndef DROPBEAR_SERVER
-+#define DROPBEAR_SERVER 0
-+#endif
-+
- /* Spec recommends after one hour or 1 gigabyte of data. One hour
-  * is a bit too verbose, so we try 8 hours */
- #ifndef KEX_REKEY_TIMEOUT
diff --git a/package/network/services/dropbear/patches/008-disable-rsa-signatures-when-no-rsa-hostkey.patch b/package/network/services/dropbear/patches/008-disable-rsa-signatures-when-no-rsa-hostkey.patch
deleted file mode 100644
index 4f675234ff..0000000000
--- a/package/network/services/dropbear/patches/008-disable-rsa-signatures-when-no-rsa-hostkey.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From a113381c12a2da3c9b7bd594f47a1b2657bdfdf2 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Sun, 12 Feb 2023 22:44:32 +0800
-Subject: Disable rsa signatures when no rsa hostkey
-
-Otherwise Dropbear will offer RSA as a hostkey signature option, but the
-session will exit with an assertion or NULL pointer dereference once
-that algorithm is negotiated.
-
-This likely regressed in 2020.79 when signature vs key type enums were
-split, for rsa-sha256.
-
-Fixes #219 on github
----
- svr-runopts.c | 21 +++++++++++----------
- 1 file changed, 11 insertions(+), 10 deletions(-)
-
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -505,11 +505,11 @@ static void addportandaddress(const char
- 	svr_opts.portcount++;
- }
- 
--static void disablekey(int type) {
-+static void disablekey(enum signature_type type) {
- 	int i;
- 	TRACE(("Disabling key type %d", type))
- 	for (i = 0; sigalgs[i].name != NULL; i++) {
--		if (sigalgs[i].val == type) {
-+		if ((int)sigalgs[i].val == (int)type) {
- 			sigalgs[i].usable = 0;
- 			break;
- 		}
-@@ -624,7 +624,8 @@ void load_all_hostkeys() {
- 
- #if DROPBEAR_RSA
- 	if (!svr_opts.delay_hostkey && !svr_opts.hostkey->rsakey) {
--		disablekey(DROPBEAR_SIGNKEY_RSA);
-+		disablekey(DROPBEAR_SIGNATURE_RSA_SHA256);
-+		disablekey(DROPBEAR_SIGNATURE_RSA_SHA1);
- 	} else {
- 		any_keys = 1;
- 	}
-@@ -632,7 +633,7 @@ void load_all_hostkeys() {
- 
- #if DROPBEAR_DSS
- 	if (!svr_opts.delay_hostkey && !svr_opts.hostkey->dsskey) {
--		disablekey(DROPBEAR_SIGNKEY_DSS);
-+		disablekey(DROPBEAR_SIGNATURE_DSS);
- 	} else {
- 		any_keys = 1;
- 	}
-@@ -666,35 +667,35 @@ void load_all_hostkeys() {
- #if DROPBEAR_ECC_256
- 	if (!svr_opts.hostkey->ecckey256
- 		&& (!svr_opts.delay_hostkey || loaded_any_ecdsa || ECDSA_DEFAULT_SIZE != 256 )) {
--		disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP256);
-+		disablekey(DROPBEAR_SIGNATURE_ECDSA_NISTP256);
- 	}
- #endif
- #if DROPBEAR_ECC_384
- 	if (!svr_opts.hostkey->ecckey384
- 		&& (!svr_opts.delay_hostkey || loaded_any_ecdsa || ECDSA_DEFAULT_SIZE != 384 )) {
--		disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP384);
-+		disablekey(DROPBEAR_SIGNATURE_ECDSA_NISTP384);
- 	}
- #endif
- #if DROPBEAR_ECC_521
- 	if (!svr_opts.hostkey->ecckey521
- 		&& (!svr_opts.delay_hostkey || loaded_any_ecdsa || ECDSA_DEFAULT_SIZE != 521 )) {
--		disablekey(DROPBEAR_SIGNKEY_ECDSA_NISTP521);
-+		disablekey(DROPBEAR_SIGNATURE_ECDSA_NISTP521);
- 	}
- #endif
- #endif /* DROPBEAR_ECDSA */
- 
- #if DROPBEAR_ED25519
- 	if (!svr_opts.delay_hostkey && !svr_opts.hostkey->ed25519key) {
--		disablekey(DROPBEAR_SIGNKEY_ED25519);
-+		disablekey(DROPBEAR_SIGNATURE_ED25519);
- 	} else {
- 		any_keys = 1;
- 	}
- #endif
- #if DROPBEAR_SK_ECDSA
--	disablekey(DROPBEAR_SIGNKEY_SK_ECDSA_NISTP256);
-+	disablekey(DROPBEAR_SIGNATURE_SK_ECDSA_NISTP256);
- #endif 
- #if DROPBEAR_SK_ED25519
--	disablekey(DROPBEAR_SIGNKEY_SK_ED25519);
-+	disablekey(DROPBEAR_SIGNATURE_SK_ED25519);
- #endif
- 
- 	if (!any_keys) {
diff --git a/package/network/services/dropbear/patches/009-use-write-rather-than-fprintf-in-segv-handler.patch b/package/network/services/dropbear/patches/009-use-write-rather-than-fprintf-in-segv-handler.patch
deleted file mode 100644
index e1538a4c1f..0000000000
--- a/package/network/services/dropbear/patches/009-use-write-rather-than-fprintf-in-segv-handler.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 3292b8c6f1e5fcc405fa0f7a20e90a60f74037b2 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Sun, 12 Feb 2023 23:00:00 +0800
-Subject: Use write() rather than fprintf() in segv handler
-
-fprintf isn't guaranteed safe (though hasn't had any problems reported).
----
- svr-main.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
---- a/svr-main.c
-+++ b/svr-main.c
-@@ -420,8 +420,12 @@ static void sigchld_handler(int UNUSED(u
- 
- /* catch any segvs */
- static void sigsegv_handler(int UNUSED(unused)) {
--	fprintf(stderr, "Aiee, segfault! You should probably report "
--			"this as a bug to the developer\n");
-+	int i;
-+	const char *msg = "Aiee, segfault! You should probably report "
-+			"this as a bug to the developer\n";
-+	i = write(STDERR_FILENO, msg, strlen(msg));
-+	/* ignore short writes */
-+	(void)i;
- 	_exit(EXIT_FAILURE);
- }
- 
diff --git a/package/network/services/dropbear/patches/010-remove-SO_LINGER.patch b/package/network/services/dropbear/patches/010-remove-SO_LINGER.patch
deleted file mode 100644
index 12b1843ee2..0000000000
--- a/package/network/services/dropbear/patches/010-remove-SO_LINGER.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 5040f21cb4ee6ade966e60c6d5a3c270d03de1f1 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Mon, 1 May 2023 22:05:43 +0800
-Subject: Remove SO_LINGER
-
-It could cause channels to take up to 5 seconds to close(), which would block
-the entire process. On busy TCP forwarding sessions this would result in
-channels seeming stuck and new connections not being accepted.
-
-We don't need to monitor for flushing failures since we can't report errors, so
-SO_LINGER wasn't useful.
-
-Thanks to GektorUA for reporting and testing
-
-Fixes #230
----
- netio.c | 4 ----
- 1 file changed, 4 deletions(-)
-
---- a/netio.c
-+++ b/netio.c
-@@ -472,7 +472,6 @@ int dropbear_listen(const char* address,
- 	struct addrinfo hints, *res = NULL, *res0 = NULL;
- 	int err;
- 	unsigned int nsock;
--	struct linger linger;
- 	int val;
- 	int sock;
- 	uint16_t *allocated_lport_p = NULL;
-@@ -551,9 +550,6 @@ int dropbear_listen(const char* address,
- 		val = 1;
- 		/* set to reuse, quick timeout */
- 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));
--		linger.l_onoff = 1;
--		linger.l_linger = 5;
--		setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&linger, sizeof(linger));
- 
- #if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
- 		if (res->ai_family == AF_INET6) {
diff --git a/package/network/services/dropbear/patches/011-add-option-to-bind-to-interface.patch b/package/network/services/dropbear/patches/011-add-option-to-bind-to-interface.patch
deleted file mode 100644
index d1c1fa4cce..0000000000
--- a/package/network/services/dropbear/patches/011-add-option-to-bind-to-interface.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From fb64db9eac3fdc6434f2dc7b5ea407fe5df76e6f Mon Sep 17 00:00:00 2001
-From: Diederik De Coninck <diederik.deconinck_ext at softathome.com>
-Date: Tue, 11 Apr 2023 15:38:04 +0200
-Subject: Add option to bind to interface
-
----
- netio.c       | 13 +++++++++++--
- netio.h       |  2 +-
- runopts.h     |  1 +
- svr-main.c    |  2 +-
- svr-runopts.c |  9 +++++++++
- svr-tcpfwd.c  |  1 +
- tcp-accept.c  |  2 +-
- tcpfwd.h      |  1 +
- 8 files changed, 26 insertions(+), 5 deletions(-)
-
---- a/netio.c
-+++ b/netio.c
-@@ -467,7 +467,7 @@ int get_sock_port(int sock) {
-  * failure, if errstring wasn't NULL, it'll be a newly malloced error
-  * string.*/
- int dropbear_listen(const char* address, const char* port,
--		int *socks, unsigned int sockcount, char **errstring, int *maxfd) {
-+		int *socks, unsigned int sockcount, char **errstring, int *maxfd, const char* interface) {
- 
- 	struct addrinfo hints, *res = NULL, *res0 = NULL;
- 	int err;
-@@ -497,7 +497,11 @@ int dropbear_listen(const char* address,
- 		TRACE(("dropbear_listen: local loopback"))
- 	} else {
- 		if (address[0] == '\0') {
--			TRACE(("dropbear_listen: all interfaces"))
-+			if (interface) {
-+				TRACE(("dropbear_listen: %s", interface))
-+			} else {
-+				TRACE(("dropbear_listen: all interfaces"))
-+			}
- 			address = NULL;
- 		}
- 		hints.ai_flags = AI_PASSIVE;
-@@ -551,6 +555,11 @@ int dropbear_listen(const char* address,
- 		/* set to reuse, quick timeout */
- 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));
- 
-+		if(interface && setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, interface, strlen(interface)) < 0) {
-+			dropbear_log(LOG_WARNING, "Couldn't set SO_BINDTODEVICE");
-+			TRACE(("Failed setsockopt with errno failure, %d %s", errno, strerror(errno)))
-+		}
-+
- #if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
- 		if (res->ai_family == AF_INET6) {
- 			int on = 1;
---- a/netio.h
-+++ b/netio.h
-@@ -19,7 +19,7 @@ void get_socket_address(int fd, char **l
- void getaddrstring(struct sockaddr_storage* addr, 
- 		char **ret_host, char **ret_port, int host_lookup);
- int dropbear_listen(const char* address, const char* port,
--		int *socks, unsigned int sockcount, char **errstring, int *maxfd);
-+		int *socks, unsigned int sockcount, char **errstring, int *maxfd, const char* interface);
- 
- struct dropbear_progress_connection;
- 
---- a/runopts.h
-+++ b/runopts.h
-@@ -128,6 +128,7 @@ typedef struct svr_runopts {
- 	char * pidfile;
- 
- 	char * forced_command;
-+	char* interface;
- 
- #if DROPBEAR_PLUGIN 
- 	/* malloced */
---- a/svr-main.c
-+++ b/svr-main.c
-@@ -488,7 +488,7 @@ static size_t listensockets(int *socks,
- 
- 		nsock = dropbear_listen(svr_opts.addresses[i], svr_opts.ports[i], &socks[sockpos], 
- 				sockcount - sockpos,
--				&errstring, maxfd);
-+				&errstring, maxfd, svr_opts.interface);
- 
- 		if (nsock < 0) {
- 			dropbear_log(LOG_WARNING, "Failed listening on '%s': %s", 
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -98,6 +98,8 @@ static void printhelp(const char * progn
- 					"		(default port is %s if none specified)\n"
- 					"-P PidFile	Create pid file PidFile\n"
- 					"		(default %s)\n"
-+					"-l <interface>\n"
-+					"		interface to bind on\n"
- #if INETD_MODE
- 					"-i		Start for inetd\n"
- #endif
-@@ -265,6 +267,9 @@ void svr_getopts(int argc, char ** argv)
- 				case 'P':
- 					next = &svr_opts.pidfile;
- 					break;
-+				case 'l':
-+					next = &svr_opts.interface;
-+					break;
- #if DO_MOTD
- 				/* motd is displayed by default, -m turns it off */
- 				case 'm':
-@@ -438,6 +443,10 @@ void svr_getopts(int argc, char ** argv)
- 		dropbear_log(LOG_INFO, "Forced command set to '%s'", svr_opts.forced_command);
- 	}
- 
-+	if (svr_opts.interface) {
-+		dropbear_log(LOG_INFO, "Binding to interface '%s'", svr_opts.interface);
-+	}
-+
- 	if (reexec_fd_arg) {
- 		if (m_str_to_uint(reexec_fd_arg, &svr_opts.reexec_childpipe) == DROPBEAR_FAILURE
- 			|| svr_opts.reexec_childpipe < 0) {
---- a/svr-tcpfwd.c
-+++ b/svr-tcpfwd.c
-@@ -205,6 +205,7 @@ static int svr_remotetcpreq(int *allocat
- 	tcpinfo->listenport = port;
- 	tcpinfo->chantype = &svr_chan_tcpremote;
- 	tcpinfo->tcp_type = forwarded;
-+	tcpinfo->interface = svr_opts.interface;
- 
- 	tcpinfo->request_listenaddr = request_addr;
- 	if (!opts.listen_fwd_all || (strcmp(request_addr, "localhost") == 0) ) {
---- a/tcp-accept.c
-+++ b/tcp-accept.c
-@@ -117,7 +117,7 @@ int listen_tcpfwd(struct TCPListener* tc
- 	snprintf(portstring, sizeof(portstring), "%u", tcpinfo->listenport);
- 
- 	nsocks = dropbear_listen(tcpinfo->listenaddr, portstring, socks, 
--			DROPBEAR_MAX_SOCKS, &errstring, &ses.maxfd);
-+			DROPBEAR_MAX_SOCKS, &errstring, &ses.maxfd, tcpinfo->interface);
- 	if (nsocks < 0) {
- 		dropbear_log(LOG_INFO, "TCP forward failed: %s", errstring);
- 		m_free(errstring);
---- a/tcpfwd.h
-+++ b/tcpfwd.h
-@@ -42,6 +42,7 @@ struct TCPListener {
- 	unsigned int listenport;
- 	/* The address that the remote host asked to listen on */
- 	char *request_listenaddr;
-+	char* interface;
- 
- 	const struct ChanType *chantype;
- 	enum {direct, forwarded} tcp_type;
diff --git a/package/network/services/dropbear/patches/012-add-ifdef-guards-for-SO_BINDTODEVICE.patch b/package/network/services/dropbear/patches/012-add-ifdef-guards-for-SO_BINDTODEVICE.patch
deleted file mode 100644
index 11f902bf90..0000000000
--- a/package/network/services/dropbear/patches/012-add-ifdef-guards-for-SO_BINDTODEVICE.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 031d09b47912b2401f4934667c0b6f857ede61ee Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Tue, 18 Jul 2023 23:20:16 +0800
-Subject: Add ifdef guards for SO_BINDTODEVICE
-
----
- netio.c       | 2 ++
- svr-runopts.c | 4 ++++
- 2 files changed, 6 insertions(+)
-
---- a/netio.c
-+++ b/netio.c
-@@ -555,10 +555,12 @@ int dropbear_listen(const char* address,
- 		/* set to reuse, quick timeout */
- 		setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));
- 
-+#ifdef SO_BINDTODEVICE
- 		if(interface && setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, interface, strlen(interface)) < 0) {
- 			dropbear_log(LOG_WARNING, "Couldn't set SO_BINDTODEVICE");
- 			TRACE(("Failed setsockopt with errno failure, %d %s", errno, strerror(errno)))
- 		}
-+#endif
- 
- #if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
- 		if (res->ai_family == AF_INET6) {
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -98,8 +98,10 @@ static void printhelp(const char * progn
- 					"		(default port is %s if none specified)\n"
- 					"-P PidFile	Create pid file PidFile\n"
- 					"		(default %s)\n"
-+#ifdef SO_BINDTODEVICE
- 					"-l <interface>\n"
- 					"		interface to bind on\n"
-+#endif
- #if INETD_MODE
- 					"-i		Start for inetd\n"
- #endif
-@@ -267,9 +269,11 @@ void svr_getopts(int argc, char ** argv)
- 				case 'P':
- 					next = &svr_opts.pidfile;
- 					break;
-+#ifdef SO_BINDTODEVICE
- 				case 'l':
- 					next = &svr_opts.interface;
- 					break;
-+#endif
- #if DO_MOTD
- 				/* motd is displayed by default, -m turns it off */
- 				case 'm':
diff --git a/package/network/services/dropbear/patches/013-make-banner-reading-failure-non-fatal.patch b/package/network/services/dropbear/patches/013-make-banner-reading-failure-non-fatal.patch
deleted file mode 100644
index 531215c757..0000000000
--- a/package/network/services/dropbear/patches/013-make-banner-reading-failure-non-fatal.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 62a06cd95f58060a59359f8769c3f35cd680d4fd Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Sun, 23 Jul 2023 21:01:48 +0800
-Subject: Make banner reading failure non-fatal
-
----
- svr-runopts.c | 45 ++++++++++++++++++++++++++++-----------------
- 1 file changed, 28 insertions(+), 17 deletions(-)
-
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -38,6 +38,7 @@ static void printhelp(const char * progn
- static void addportandaddress(const char* spec);
- static void loadhostkey(const char *keyfile, int fatal_duplicate);
- static void addhostkey(const char *keyfile);
-+static void load_banner();
- 
- static void printhelp(const char * progname) {
- 
-@@ -382,23 +383,7 @@ void svr_getopts(int argc, char ** argv)
- 	}
- 
- 	if (svr_opts.bannerfile) {
--		struct stat buf;
--		if (stat(svr_opts.bannerfile, &buf) != 0) {
--			dropbear_exit("Error opening banner file '%s'",
--					svr_opts.bannerfile);
--		}
--		
--		if (buf.st_size > MAX_BANNER_SIZE) {
--			dropbear_exit("Banner file too large, max is %d bytes",
--					MAX_BANNER_SIZE);
--		}
--
--		svr_opts.banner = buf_new(buf.st_size);
--		if (buf_readfile(svr_opts.banner, svr_opts.bannerfile)!=DROPBEAR_SUCCESS) {
--			dropbear_exit("Error reading banner file '%s'",
--					svr_opts.bannerfile);
--		}
--		buf_setpos(svr_opts.banner, 0);
-+		load_banner();
- 	}
- 
- #ifdef HAVE_GETGROUPLIST
-@@ -715,3 +700,29 @@ void load_all_hostkeys() {
- 		dropbear_exit("No hostkeys available. 'dropbear -R' may be useful or run dropbearkey.");
- 	}
- }
-+
-+static void load_banner() {
-+	struct stat buf;
-+	if (stat(svr_opts.bannerfile, &buf) != 0) {
-+		dropbear_log(LOG_WARNING, "Error opening banner file '%s'",
-+				svr_opts.bannerfile);
-+		return;
-+	}
-+
-+	if (buf.st_size > MAX_BANNER_SIZE) {
-+		dropbear_log(LOG_WARNING, "Banner file too large, max is %d bytes",
-+				MAX_BANNER_SIZE);
-+		return;
-+	}
-+
-+	svr_opts.banner = buf_new(buf.st_size);
-+	if (buf_readfile(svr_opts.banner, svr_opts.bannerfile) != DROPBEAR_SUCCESS) {
-+		dropbear_log(LOG_WARNING, "Error reading banner file '%s'",
-+				svr_opts.bannerfile);
-+		buf_free(svr_opts.banner);
-+		svr_opts.banner = NULL;
-+		return;
-+	}
-+	buf_setpos(svr_opts.banner, 0);
-+
-+}
diff --git a/package/network/services/dropbear/patches/014-dropbearkey-ignore-unsupported-command-line-option.patch b/package/network/services/dropbear/patches/014-dropbearkey-ignore-unsupported-command-line-option.patch
deleted file mode 100644
index ff130f8be0..0000000000
--- a/package/network/services/dropbear/patches/014-dropbearkey-ignore-unsupported-command-line-option.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From ec26975d442163b66d1646a48e022bc8c2f1607a Mon Sep 17 00:00:00 2001
-From: Sergey Ponomarev <stokito at gmail.com>
-Date: Sun, 27 Aug 2023 00:07:05 +0300
-Subject: dropbearkey.c Ignore unsupported command line options
-
-To generate non interactively a key with OpenSSH the simplest command is:
-
-ssh-keygen -t ed25519 -q -N '' -f ~/.ssh/id_ed25519
-
-The command has two options -q quiet and -N passphrase which aren't supported by the dropbearkey.
-
-To improve interoperability add explicit ignoring of the -q and -N with empty passphrase.
-Also ignore the -v even if the DEBUG_TRACE is not set.
-
-Signed-off-by: Sergey Ponomarev <stokito at gmail.com>
----
- dropbearkey.c | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
---- a/dropbearkey.c
-+++ b/dropbearkey.c
-@@ -159,6 +159,7 @@ int main(int argc, char ** argv) {
- 	enum signkey_type keytype = DROPBEAR_SIGNKEY_NONE;
- 	char * typetext = NULL;
- 	char * sizetext = NULL;
-+	char * passphrase = NULL;
- 	unsigned int bits = 0, genbits;
- 	int printpub = 0;
- 
-@@ -194,11 +195,16 @@ int main(int argc, char ** argv) {
- 					printhelp(argv[0]);
- 					exit(EXIT_SUCCESS);
- 					break;
--#if DEBUG_TRACE
- 				case 'v':
-+#if DEBUG_TRACE
- 					debug_trace = DROPBEAR_VERBOSE_LEVEL;
--					break;
- #endif
-+					break;
-+				case 'q':
-+					break;  /* quiet is default */
-+				case 'N':
-+					next = &passphrase;
-+					break;
- 				default:
- 					fprintf(stderr, "Unknown argument %s\n", argv[i]);
- 					printhelp(argv[0]);
-@@ -266,6 +272,11 @@ int main(int argc, char ** argv) {
- 		check_signkey_bits(keytype, bits);;
- 	}
- 
-+	if (passphrase && *passphrase != '\0') {
-+		fprintf(stderr, "Only empty passphrase is supported\n");
-+		exit(EXIT_FAILURE);
-+	}
-+
- 	genbits = signkey_generate_get_bits(keytype, bits);
- 	fprintf(stderr, "Generating %u bit %s key, this may take a while...\n", genbits, typetext);
- 	if (signkey_generate(keytype, bits, filename, 0) == DROPBEAR_FAILURE)
diff --git a/package/network/services/dropbear/patches/015-libtommath-fix-possible-integer-overflow.patch b/package/network/services/dropbear/patches/015-libtommath-fix-possible-integer-overflow.patch
deleted file mode 100644
index f39417adb7..0000000000
--- a/package/network/services/dropbear/patches/015-libtommath-fix-possible-integer-overflow.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 3b576d95dcf791d7b945e75f639da8f89c1685a2 Mon Sep 17 00:00:00 2001
-From: czurnieden <czurnieden at gmx.de>
-Date: Tue, 9 May 2023 17:17:12 +0200
-Subject: Fix possible integer overflow
-
----
- libtommath/bn_mp_2expt.c                | 4 ++++
- libtommath/bn_mp_grow.c                 | 4 ++++
- libtommath/bn_mp_init_size.c            | 5 +++++
- libtommath/bn_mp_mul_2d.c               | 4 ++++
- libtommath/bn_s_mp_mul_digs.c           | 4 ++++
- libtommath/bn_s_mp_mul_digs_fast.c      | 4 ++++
- libtommath/bn_s_mp_mul_high_digs.c      | 4 ++++
- libtommath/bn_s_mp_mul_high_digs_fast.c | 4 ++++
- 8 files changed, 33 insertions(+)
-
---- a/libtommath/bn_mp_2expt.c
-+++ b/libtommath/bn_mp_2expt.c
-@@ -12,6 +12,10 @@ mp_err mp_2expt(mp_int *a, int b)
- {
-    mp_err    err;
- 
-+   if (b < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* zero a as per default */
-    mp_zero(a);
- 
---- a/libtommath/bn_mp_grow.c
-+++ b/libtommath/bn_mp_grow.c
-@@ -9,6 +9,10 @@ mp_err mp_grow(mp_int *a, int size)
-    int     i;
-    mp_digit *tmp;
- 
-+   if (size < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* if the alloc size is smaller alloc more ram */
-    if (a->alloc < size) {
-       /* reallocate the array a->dp
---- a/libtommath/bn_mp_init_size.c
-+++ b/libtommath/bn_mp_init_size.c
-@@ -6,6 +6,11 @@
- /* init an mp_init for a given size */
- mp_err mp_init_size(mp_int *a, int size)
- {
-+
-+   if (size < 0) {
-+      return MP_VAL;
-+   }
-+
-    size = MP_MAX(MP_MIN_PREC, size);
- 
-    /* alloc mem */
---- a/libtommath/bn_mp_mul_2d.c
-+++ b/libtommath/bn_mp_mul_2d.c
-@@ -9,6 +9,10 @@ mp_err mp_mul_2d(const mp_int *a, int b,
-    mp_digit d;
-    mp_err   err;
- 
-+   if (b < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* copy */
-    if (a != c) {
-       if ((err = mp_copy(a, c)) != MP_OKAY) {
---- a/libtommath/bn_s_mp_mul_digs.c
-+++ b/libtommath/bn_s_mp_mul_digs.c
-@@ -16,6 +16,10 @@ mp_err s_mp_mul_digs(const mp_int *a, co
-    mp_word r;
-    mp_digit tmpx, *tmpt, *tmpy;
- 
-+   if (digs < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* can we use the fast multiplier? */
-    if ((digs < MP_WARRAY) &&
-        (MP_MIN(a->used, b->used) < MP_MAXFAST)) {
---- a/libtommath/bn_s_mp_mul_digs_fast.c
-+++ b/libtommath/bn_s_mp_mul_digs_fast.c
-@@ -26,6 +26,10 @@ mp_err s_mp_mul_digs_fast(const mp_int *
-    mp_digit W[MP_WARRAY];
-    mp_word  _W;
- 
-+   if (digs < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* grow the destination as required */
-    if (c->alloc < digs) {
-       if ((err = mp_grow(c, digs)) != MP_OKAY) {
---- a/libtommath/bn_s_mp_mul_high_digs.c
-+++ b/libtommath/bn_s_mp_mul_high_digs.c
-@@ -15,6 +15,10 @@ mp_err s_mp_mul_high_digs(const mp_int *
-    mp_word  r;
-    mp_digit tmpx, *tmpt, *tmpy;
- 
-+   if (digs < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* can we use the fast multiplier? */
-    if (MP_HAS(S_MP_MUL_HIGH_DIGS_FAST)
-        && ((a->used + b->used + 1) < MP_WARRAY)
---- a/libtommath/bn_s_mp_mul_high_digs_fast.c
-+++ b/libtommath/bn_s_mp_mul_high_digs_fast.c
-@@ -19,6 +19,10 @@ mp_err s_mp_mul_high_digs_fast(const mp_
-    mp_digit W[MP_WARRAY];
-    mp_word  _W;
- 
-+   if (digs < 0) {
-+      return MP_VAL;
-+   }
-+
-    /* grow the destination as required */
-    pa = a->used + b->used;
-    if (c->alloc < pa) {
diff --git a/package/network/services/dropbear/patches/016-src-svr-tcpfwd-Fix-noremotetcp-behavior.patch b/package/network/services/dropbear/patches/016-src-svr-tcpfwd-Fix-noremotetcp-behavior.patch
deleted file mode 100644
index b6933120e6..0000000000
--- a/package/network/services/dropbear/patches/016-src-svr-tcpfwd-Fix-noremotetcp-behavior.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 3cf8344769eda55e26eee53c1898b2c66544f188 Mon Sep 17 00:00:00 2001
-From: Justin Chen <justin.chen at broadcom.com>
-Date: Fri, 8 Sep 2023 11:35:18 -0700
-Subject: src: svr-tcpfwd: Fix noremotetcp behavior
-
-If noremotetcp is set, we should still reply with
-send_msg_request_failed. This matches the behavior
-of !DROPBEAR_SVR_REMOTETCPFWD.
-
-We were seeing keepalive packets being ignored when
-the "-k" option was used.
----
- svr-tcpfwd.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/svr-tcpfwd.c
-+++ b/svr-tcpfwd.c
-@@ -79,14 +79,14 @@ void recv_msg_global_request_remotetcp()
- 
- 	TRACE(("enter recv_msg_global_request_remotetcp"))
- 
-+	reqname = buf_getstring(ses.payload, &namelen);
-+	wantreply = buf_getbool(ses.payload);
-+
- 	if (svr_opts.noremotetcp || !svr_pubkey_allows_tcpfwd()) {
- 		TRACE(("leave recv_msg_global_request_remotetcp: remote tcp forwarding disabled"))
- 		goto out;
- 	}
- 
--	reqname = buf_getstring(ses.payload, &namelen);
--	wantreply = buf_getbool(ses.payload);
--
- 	if (namelen > MAX_NAME_LEN) {
- 		TRACE(("name len is wrong: %d", namelen))
- 		goto out;
diff --git a/package/network/services/dropbear/patches/017-Don-t-try-to-shutdown-a-pty.patch b/package/network/services/dropbear/patches/017-Don-t-try-to-shutdown-a-pty.patch
deleted file mode 100644
index 603c61d6fb..0000000000
--- a/package/network/services/dropbear/patches/017-Don-t-try-to-shutdown-a-pty.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e28ba1b9975eab48799aa3ed77d3cd91627d7b27 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Sat, 9 Dec 2023 23:10:41 +0800
-Subject: Don't try to shutdown() a pty
-
-shutdown() of a pty doesn't work (ENOTSOCK), so we should close
-it instead.
-
-This will ensure that PTY controlling terminals are closed when a
-session exits, including when multiple sessions run over a single SSH
-connection.  In the normal case of a single session, the PTY controlling
-terminal would be closed when the Dropbear server process exits anyway.
-
-This possibly fixes #264 on github
-
-It is possible that there could be subtle changes to PTY flushing
-behaviour, though nothing caught by tests at present.
----
- svr-chansession.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/svr-chansession.c
-+++ b/svr-chansession.c
-@@ -910,7 +910,7 @@ static int ptycommand(struct Channel *ch
- 		channel->readfd = chansess->master;
- 		/* don't need to set stderr here */
- 		ses.maxfd = MAX(ses.maxfd, chansess->master);
--		channel->bidir_fd = 1;
-+		channel->bidir_fd = 0;
- 
- 		setnonblocking(chansess->master);
- 
diff --git a/package/network/services/dropbear/patches/018-dropbearkey-add-alias-to-ssh-keygen.patch b/package/network/services/dropbear/patches/018-dropbearkey-add-alias-to-ssh-keygen.patch
deleted file mode 100644
index 9c70c3141c..0000000000
--- a/package/network/services/dropbear/patches/018-dropbearkey-add-alias-to-ssh-keygen.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 806586b585806cbe32013bcd3af3847278972060 Mon Sep 17 00:00:00 2001
-From: Sergey Ponomarev <stokito at gmail.com>
-Date: Sun, 10 Dec 2023 10:31:56 +0200
-Subject: dropbearkey: add alias to ssh-keygen
-
-The dropbearkey is partially compatible with ssh-keygen and can be used as an alias.
-
-Closes: #263
----
- dbmulti.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/dbmulti.c
-+++ b/dbmulti.c
-@@ -41,7 +41,8 @@ static int runprog(const char *multipath
- 		}
- #endif
- #ifdef DBMULTI_dropbearkey
--		if (strcmp(progname, "dropbearkey") == 0) {
-+		if (strcmp(progname, "dropbearkey") == 0
-+				|| strcmp(progname, "ssh-keygen") == 0) {
- 			return dropbearkey_main(argc, argv);
- 		}
- #endif
-@@ -88,7 +89,7 @@ int main(int argc, char ** argv) {
- 			"'dbclient' or 'ssh' - the Dropbear client\n"
- #endif
- #ifdef DBMULTI_dropbearkey
--			"'dropbearkey' - the key generator\n"
-+			"'dropbearkey' or 'ssh-keygen' - the key generator\n"
- #endif
- #ifdef DBMULTI_dropbearconvert
- 			"'dropbearconvert' - the key converter\n"
diff --git a/package/network/services/dropbear/patches/019-Allow-inetd-with-non-syslog.patch b/package/network/services/dropbear/patches/019-Allow-inetd-with-non-syslog.patch
deleted file mode 100644
index 3544f2123c..0000000000
--- a/package/network/services/dropbear/patches/019-Allow-inetd-with-non-syslog.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 383cc8c97a9420aad9cf93d88e77ec636b183a9d Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Mon, 11 Dec 2023 23:18:09 +0800
-Subject: Allow inetd with non-syslog
-
-An inetd-alike should be able to distinguish stdout and stderr, so
-it's a valid configuration.
-
-Fixes #218 on github
----
- svr-runopts.c | 12 ------------
- 1 file changed, 12 deletions(-)
-
---- a/svr-runopts.c
-+++ b/svr-runopts.c
-@@ -443,18 +443,6 @@ void svr_getopts(int argc, char ** argv)
- 		}
- 	}
- 
--#if INETD_MODE
--	if (svr_opts.inetdmode && (
--		opts.usingsyslog == 0
--#if DEBUG_TRACE
--		|| debug_trace
--#endif
--		)) {
--		/* log output goes to stderr which would get sent over the inetd network socket */
--		dropbear_exit("Dropbear inetd mode is incompatible with debug -v or non-syslog");
--	}
--#endif
--
- 	if (svr_opts.multiauthmethod && svr_opts.noauthpass) {
- 		dropbear_exit("-t and -s are incompatible");
- 	}
diff --git a/package/network/services/dropbear/patches/020-Fix-test-for-multiuser-kernels.patch b/package/network/services/dropbear/patches/020-Fix-test-for-multiuser-kernels.patch
deleted file mode 100644
index 8d016faa9c..0000000000
--- a/package/network/services/dropbear/patches/020-Fix-test-for-multiuser-kernels.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9ac650401ffc2fb05c9328d26e76a5e7ae39152a Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Mon, 11 Dec 2023 23:31:22 +0800
-Subject: Fix test for multiuser kernels
-
-getuid() succeeds even on non-multiuser kernels. Instead
-getgroups() is a valid test.
-
-Fixes #214 on github
----
- common-session.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
---- a/common-session.c
-+++ b/common-session.c
-@@ -71,10 +71,13 @@ void common_session_init(int sock_in, in
- #if !DROPBEAR_SVR_MULTIUSER
- 	/* A sanity check to prevent an accidental configuration option
- 	   leaving multiuser systems exposed */
--	errno = 0;
--	getuid();
--	if (errno != ENOSYS) {
--		dropbear_exit("Non-multiuser Dropbear requires a non-multiuser kernel");
-+	{
-+		int ret;
-+		errno = 0;
-+		ret = getgroups(0, NULL);
-+		if (!(ret == -1 && errno == ENOSYS)) {
-+			dropbear_exit("Non-multiuser Dropbear requires a non-multiuser kernel");
-+		}
- 	}
- #endif
- 
diff --git a/package/network/services/dropbear/patches/021-Implement-Strict-KEX-mode.patch b/package/network/services/dropbear/patches/021-Implement-Strict-KEX-mode.patch
deleted file mode 100644
index d490d9545a..0000000000
--- a/package/network/services/dropbear/patches/021-Implement-Strict-KEX-mode.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 6e43be5c7b99dbee49dc72b6f989f29fdd7e9356 Mon Sep 17 00:00:00 2001
-From: Matt Johnston <matt at ucc.asn.au>
-Date: Mon, 20 Nov 2023 14:02:47 +0800
-Subject: Implement Strict KEX mode
-
-As specified by OpenSSH with kex-strict-c-v00 at openssh.com and
-kex-strict-s-v00 at openssh.com.
----
- cli-session.c    | 11 +++++++++++
- common-algo.c    |  6 ++++++
- common-kex.c     | 26 +++++++++++++++++++++++++-
- kex.h            |  3 +++
- process-packet.c | 34 +++++++++++++++++++---------------
- ssh.h            |  4 ++++
- svr-session.c    |  3 +++
- 7 files changed, 71 insertions(+), 16 deletions(-)
-
---- a/cli-session.c
-+++ b/cli-session.c
-@@ -46,6 +46,7 @@ static void cli_finished(void) ATTRIB_NO
- static void recv_msg_service_accept(void);
- static void cli_session_cleanup(void);
- static void recv_msg_global_request_cli(void);
-+static void cli_algos_initialise(void);
- 
- struct clientsession cli_ses; /* GLOBAL */
- 
-@@ -117,6 +118,7 @@ void cli_session(int sock_in, int sock_o
- 	}
- 
- 	chaninitialise(cli_chantypes);
-+	cli_algos_initialise();
- 
- 	/* Set up cli_ses vars */
- 	cli_session_init(proxy_cmd_pid);
-@@ -487,3 +489,12 @@ void cli_dropbear_log(int priority, cons
- 	fflush(stderr);
- }
- 
-+static void cli_algos_initialise(void) {
-+	algo_type *algo;
-+	for (algo = sshkex; algo->name; algo++) {
-+		if (strcmp(algo->name, SSH_STRICT_KEX_S) == 0) {
-+			algo->usable = 0;
-+		}
-+	}
-+}
-+
---- a/common-algo.c
-+++ b/common-algo.c
-@@ -308,6 +308,12 @@ algo_type sshkex[] = {
- 	{SSH_EXT_INFO_C, 0, NULL, 1, NULL},
- #endif
- #endif
-+#if DROPBEAR_CLIENT
-+	{SSH_STRICT_KEX_C, 0, NULL, 1, NULL},
-+#endif
-+#if DROPBEAR_SERVER
-+	{SSH_STRICT_KEX_S, 0, NULL, 1, NULL},
-+#endif
- 	{NULL, 0, NULL, 0, NULL}
- };
- 
---- a/common-kex.c
-+++ b/common-kex.c
-@@ -183,6 +183,10 @@ void send_msg_newkeys() {
- 	gen_new_keys();
- 	switch_keys();
- 
-+	if (ses.kexstate.strict_kex) {
-+		ses.transseq = 0;
-+	}
-+
- 	TRACE(("leave send_msg_newkeys"))
- }
- 
-@@ -193,7 +197,11 @@ void recv_msg_newkeys() {
- 
- 	ses.kexstate.recvnewkeys = 1;
- 	switch_keys();
--	
-+
-+	if (ses.kexstate.strict_kex) {
-+		ses.recvseq = 0;
-+	}
-+
- 	TRACE(("leave recv_msg_newkeys"))
- }
- 
-@@ -550,6 +558,10 @@ void recv_msg_kexinit() {
- 
- 	ses.kexstate.recvkexinit = 1;
- 
-+	if (ses.kexstate.strict_kex && !ses.kexstate.donefirstkex && ses.recvseq != 1) {
-+		dropbear_exit("First packet wasn't kexinit");
-+	}
-+
- 	TRACE(("leave recv_msg_kexinit"))
- }
- 
-@@ -859,6 +871,18 @@ static void read_kex_algos() {
- 	}
- #endif
- 
-+	if (!ses.kexstate.donefirstkex) {
-+		const char* strict_name;
-+		if (IS_DROPBEAR_CLIENT) {
-+			strict_name = SSH_STRICT_KEX_S;
-+		} else {
-+			strict_name = SSH_STRICT_KEX_C;
-+		}
-+		if (buf_has_algo(ses.payload, strict_name) == DROPBEAR_SUCCESS) {
-+			ses.kexstate.strict_kex = 1;
-+		}
-+	}
-+
- 	algo = buf_match_algo(ses.payload, sshkex, kexguess2, &goodguess);
- 	allgood &= goodguess;
- 	if (algo == NULL || algo->data == NULL) {
---- a/kex.h
-+++ b/kex.h
-@@ -83,6 +83,9 @@ struct KEXState {
- 
- 	unsigned our_first_follows_matches : 1;
- 
-+	/* Boolean indicating that strict kex mode is in use */
-+	unsigned int strict_kex;
-+
- 	time_t lastkextime; /* time of the last kex */
- 	unsigned int datatrans; /* data transmitted since last kex */
- 	unsigned int datarecv; /* data received since last kex */
---- a/process-packet.c
-+++ b/process-packet.c
-@@ -44,6 +44,7 @@ void process_packet() {
- 
- 	unsigned char type;
- 	unsigned int i;
-+	unsigned int first_strict_kex = ses.kexstate.strict_kex && !ses.kexstate.donefirstkex;
- 	time_t now;
- 
- 	TRACE2(("enter process_packet"))
-@@ -54,22 +55,24 @@ void process_packet() {
- 	now = monotonic_now();
- 	ses.last_packet_time_keepalive_recv = now;
- 
--	/* These packets we can receive at any time */
--	switch(type) {
- 
--		case SSH_MSG_IGNORE:
--			goto out;
--		case SSH_MSG_DEBUG:
--			goto out;
--
--		case SSH_MSG_UNIMPLEMENTED:
--			/* debugging XXX */
--			TRACE(("SSH_MSG_UNIMPLEMENTED"))
--			goto out;
--			
--		case SSH_MSG_DISCONNECT:
--			/* TODO cleanup? */
--			dropbear_close("Disconnect received");
-+	if (type == SSH_MSG_DISCONNECT) {
-+		/* Allowed at any time */
-+		dropbear_close("Disconnect received");
-+	}
-+
-+	/* These packets may be received at any time,
-+	   except during first kex with strict kex */
-+	if (!first_strict_kex) {
-+		switch(type) {
-+			case SSH_MSG_IGNORE:
-+				goto out;
-+			case SSH_MSG_DEBUG:
-+				goto out;
-+			case SSH_MSG_UNIMPLEMENTED:
-+				TRACE(("SSH_MSG_UNIMPLEMENTED"))
-+				goto out;
-+		}
- 	}
- 
- 	/* Ignore these packet types so that keepalives don't interfere with
-@@ -98,7 +101,8 @@ void process_packet() {
- 			if (type >= 1 && type <= 49
- 				&& type != SSH_MSG_SERVICE_REQUEST
- 				&& type != SSH_MSG_SERVICE_ACCEPT
--				&& type != SSH_MSG_KEXINIT)
-+				&& type != SSH_MSG_KEXINIT
-+				&& !first_strict_kex)
- 			{
- 				TRACE(("unknown allowed packet during kexinit"))
- 				recv_unimplemented();
---- a/ssh.h
-+++ b/ssh.h
-@@ -100,6 +100,10 @@
- #define SSH_EXT_INFO_C "ext-info-c"
- #define SSH_SERVER_SIG_ALGS "server-sig-algs"
- 
-+/* OpenSSH strict KEX feature */
-+#define SSH_STRICT_KEX_S "kex-strict-s-v00 at openssh.com"
-+#define SSH_STRICT_KEX_C "kex-strict-c-v00 at openssh.com"
-+
- /* service types */
- #define SSH_SERVICE_USERAUTH "ssh-userauth"
- #define SSH_SERVICE_USERAUTH_LEN 12
---- a/svr-session.c
-+++ b/svr-session.c
-@@ -370,6 +370,9 @@ static void svr_algos_initialise(void) {
- 			algo->usable = 0;
- 		}
- #endif
-+		if (strcmp(algo->name, SSH_STRICT_KEX_C) == 0) {
-+			algo->usable = 0;
-+		}
- 	}
- }
- 
diff --git a/package/network/services/dropbear/patches/100-pubkey_path.patch b/package/network/services/dropbear/patches/100-pubkey_path.patch
index b1075f8464..0ecca900b4 100644
--- a/package/network/services/dropbear/patches/100-pubkey_path.patch
+++ b/package/network/services/dropbear/patches/100-pubkey_path.patch
@@ -1,5 +1,5 @@
---- a/svr-authpubkey.c
-+++ b/svr-authpubkey.c
+--- a/src/svr-authpubkey.c
++++ b/src/svr-authpubkey.c
 @@ -78,6 +78,13 @@ static void send_msg_userauth_pk_ok(cons
  		const unsigned char* keyblob, unsigned int keybloblen);
  static int checkfileperm(char * filename);
diff --git a/package/network/services/dropbear/patches/110-change_user.patch b/package/network/services/dropbear/patches/110-change_user.patch
index 04d1df3fde..9cb073cf94 100644
--- a/package/network/services/dropbear/patches/110-change_user.patch
+++ b/package/network/services/dropbear/patches/110-change_user.patch
@@ -1,6 +1,6 @@
---- a/svr-chansession.c
-+++ b/svr-chansession.c
-@@ -985,12 +985,12 @@ static void execchild(const void *user_d
+--- a/src/svr-chansession.c
++++ b/src/svr-chansession.c
+@@ -987,12 +987,12 @@ static void execchild(const void *user_d
  	/* We can only change uid/gid as root ... */
  	if (getuid() == 0) {
  
diff --git a/package/network/services/dropbear/patches/130-ssh_ignore_x_args.patch b/package/network/services/dropbear/patches/130-ssh_ignore_x_args.patch
index a26f33dfbc..de0e5f2725 100644
--- a/package/network/services/dropbear/patches/130-ssh_ignore_x_args.patch
+++ b/package/network/services/dropbear/patches/130-ssh_ignore_x_args.patch
@@ -1,6 +1,6 @@
---- a/cli-runopts.c
-+++ b/cli-runopts.c
-@@ -329,6 +329,10 @@ void cli_getopts(int argc, char ** argv)
+--- a/src/cli-runopts.c
++++ b/src/cli-runopts.c
+@@ -340,6 +340,10 @@ void cli_getopts(int argc, char ** argv)
  				case 'z':
  					opts.disable_ip_tos = 1;
  					break;
diff --git a/package/network/services/dropbear/patches/140-disable_assert.patch b/package/network/services/dropbear/patches/140-disable_assert.patch
index af01573dee..eb590a3895 100644
--- a/package/network/services/dropbear/patches/140-disable_assert.patch
+++ b/package/network/services/dropbear/patches/140-disable_assert.patch
@@ -1,5 +1,5 @@
---- a/dbutil.h
-+++ b/dbutil.h
+--- a/src/dbutil.h
++++ b/src/dbutil.h
 @@ -80,7 +80,11 @@ int m_snprintf(char *str, size_t size, c
  #define DEF_MP_INT(X) mp_int X = {0, 0, 0, NULL}
  
diff --git a/package/network/services/dropbear/patches/160-lto-jobserver.patch b/package/network/services/dropbear/patches/160-lto-jobserver.patch
index fd80b986ae..1f3b298f35 100644
--- a/package/network/services/dropbear/patches/160-lto-jobserver.patch
+++ b/package/network/services/dropbear/patches/160-lto-jobserver.patch
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -200,17 +200,17 @@ dropbearkey: $(dropbearkeyobjs)
+@@ -220,17 +220,17 @@ dropbearkey: $(dropbearkeyobjs)
  dropbearconvert: $(dropbearconvertobjs)
  
  dropbear: $(HEADERS) $(LIBTOM_DEPS) Makefile
@@ -22,7 +22,7 @@
  
  
  # multi-binary compilation.
-@@ -221,7 +221,7 @@ ifeq ($(MULTI),1)
+@@ -241,7 +241,7 @@ ifeq ($(MULTI),1)
  endif
  
  dropbearmulti$(EXEEXT): $(HEADERS) $(MULTIOBJS) $(LIBTOM_DEPS) Makefile
diff --git a/package/network/services/dropbear/patches/600-allow-blank-root-password.patch b/package/network/services/dropbear/patches/600-allow-blank-root-password.patch
index 07ae022763..e72458dd6e 100644
--- a/package/network/services/dropbear/patches/600-allow-blank-root-password.patch
+++ b/package/network/services/dropbear/patches/600-allow-blank-root-password.patch
@@ -1,5 +1,5 @@
---- a/svr-auth.c
-+++ b/svr-auth.c
+--- a/src/svr-auth.c
++++ b/src/svr-auth.c
 @@ -124,7 +124,7 @@ void recv_msg_userauth_request() {
  				AUTH_METHOD_NONE_LEN) == 0) {
  		TRACE(("recv_msg_userauth_request: 'none' request"))
diff --git a/package/network/services/dropbear/patches/900-configure-hardening.patch b/package/network/services/dropbear/patches/900-configure-hardening.patch
index 5dc84849be..746694f48d 100644
--- a/package/network/services/dropbear/patches/900-configure-hardening.patch
+++ b/package/network/services/dropbear/patches/900-configure-hardening.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -87,54 +87,6 @@ AC_ARG_ENABLE(harden,
+@@ -86,54 +86,6 @@ AC_ARG_ENABLE(harden,
  
  if test "$hardenbuild" -eq 1; then
  	AC_MSG_NOTICE(Checking for available hardened build flags:)
diff --git a/package/network/services/dropbear/patches/901-bundled-libs-cflags.patch b/package/network/services/dropbear/patches/901-bundled-libs-cflags.patch
index a9a441ce76..4da01c9edb 100644
--- a/package/network/services/dropbear/patches/901-bundled-libs-cflags.patch
+++ b/package/network/services/dropbear/patches/901-bundled-libs-cflags.patch
@@ -1,6 +1,6 @@
 --- a/configure.ac
 +++ b/configure.ac
-@@ -45,11 +45,8 @@ fi
+@@ -44,11 +44,8 @@ fi
  # LTM_CFLAGS is given to ./configure by the user, 
  # DROPBEAR_LTM_CFLAGS is substituted in the LTM Makefile.in
  DROPBEAR_LTM_CFLAGS="$LTM_CFLAGS"
diff --git a/package/network/services/dropbear/patches/910-signkey-fix-use-of-rsa-sha2-256-pubkeys.patch b/package/network/services/dropbear/patches/910-signkey-fix-use-of-rsa-sha2-256-pubkeys.patch
index 059177a1c5..43dd1426b1 100644
--- a/package/network/services/dropbear/patches/910-signkey-fix-use-of-rsa-sha2-256-pubkeys.patch
+++ b/package/network/services/dropbear/patches/910-signkey-fix-use-of-rsa-sha2-256-pubkeys.patch
@@ -19,8 +19,8 @@ Signed-off-by: Petr ?tetiar <ynezz at true.cz>
  signkey.c | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)
 
---- a/signkey.c
-+++ b/signkey.c
+--- a/src/signkey.c
++++ b/src/signkey.c
 @@ -652,10 +652,18 @@ int buf_verify(buffer * buf, sign_key *k
  	sigtype = signature_type_from_name(type_name, type_name_len);
  	m_free(type_name);



From lede-commits at lists.infradead.org  Thu May  9 10:45:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 13:45:35 -0400
Subject: [openwrt/openwrt]  mediatek: correct address of MT753x switch IC
In-Reply-To: <171527673547.913784.10087928733830653404@git-01.infra.openwrt.org>
References: <171527673547.913784.10087928733830653404@git-01.infra.openwrt.org>
Message-ID: <mailman.35236.1715276740.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9dae0ac0bc61385b77639fa1397c0fc302a0abeb

commit 9dae0ac0bc61385b77639fa1397c0fc302a0abeb
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu May 9 13:11:16 2024 +0200

    mediatek: correct address of MT753x switch IC
    
    Continuation of commit 8b66f1a. Set the switch address on the MDIO bus to 31.
    This is required for all boards currently working with the mt7530 DSA driver.
    
    Fixes: #15419
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/mediatek/dts/mt7622-netgear-wax206.dts     | 4 ++--
 target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
index ce1cd46d2d..524a498740 100644
--- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
+++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
@@ -143,13 +143,13 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch at 0 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
+			reg = <31>;
 			#interrupt-cells = <1>;
 			interrupt-controller;
 			interrupt-parent = <&pio>;
 			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
-			reg = <0>;
 			reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
 			ports {
diff --git a/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi b/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi
index a4e443a0fb..fedf8b8596 100644
--- a/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi
+++ b/target/linux/mediatek/dts/mt7623a-unielec-u7623-02.dtsi
@@ -121,17 +121,16 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		mt7530: switch at 0 {
-			compatible = "mediatek,mt7530";
+		mt7530: switch at 1f {
 		};
 	};
 };
 
 &mt7530 {
 	compatible = "mediatek,mt7530";
+	reg = <31>;
 	#address-cells = <1>;
 	#size-cells = <0>;
-	reg = <0>;
 	pinctrl-names = "default";
 	mediatek,mcm;
 	resets = <&ethsys 2>;



From lede-commits at lists.infradead.org  Thu May  9 13:27:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 16:27:09 -0400
Subject: [openwrt/openwrt]  ramips: rename include file to a more suitable
 name
In-Reply-To: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
References: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
Message-ID: <mailman.35266.1715286436.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8d7fa0918143cf09049d4631a0cdef7962554147

commit 8d7fa0918143cf09049d4631a0cdef7962554147
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Apr 27 07:41:51 2024 +0200

    ramips: rename include file to a more suitable name
    
    Rename from mt7621_dlink_dir-xx60-a1.dtsi to mt7621_dlink_dir_nand_128m.dtsi
    and associated group name when creating the mt7621.mk image
    
    Co-authored-by: Alan Luck <luckyhome2008 at gmail.com>
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts       |  2 +-
 target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts       |  2 +-
 target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts       |  2 +-
 target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts       |  2 +-
 ...nk_dir-xx60-a1.dtsi => mt7621_dlink_dir_nand_128m.dtsi} |  0
 target/linux/ramips/image/mt7621.mk                        | 14 +++++++-------
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
index 13883f9f74..531076216d 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
@@ -2,7 +2,7 @@
 
 #include <dt-bindings/leds/common.h>
 
-#include "mt7621_dlink_dir-xx60-a1.dtsi"
+#include "mt7621_dlink_dir_nand_128m.dtsi"
 
 / {
 	compatible = "dlink,dir-1960-a1", "mediatek,mt7621-soc";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
index d4b8069a33..fd25b94e8d 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "mt7621_dlink_dir-xx60-a1.dtsi"
+#include "mt7621_dlink_dir_nand_128m.dtsi"
 
 / {
 	compatible = "dlink,dir-2640-a1", "mediatek,mt7621-soc";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
index a4590cb35f..d8c347198b 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "mt7621_dlink_dir-xx60-a1.dtsi"
+#include "mt7621_dlink_dir_nand_128m.dtsi"
 
 / {
 	compatible = "dlink,dir-2660-a1", "mediatek,mt7621-soc";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
index 4bb35a948d..0bcfa022fa 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "mt7621_dlink_dir-xx60-a1.dtsi"
+#include "mt7621_dlink_dir_nand_128m.dtsi"
 
 / {
 	compatible = "dlink,dir-3040-a1", "mediatek,mt7621-soc";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi
similarity index 100%
rename from target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
rename to target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 10e7857614..dbb69e0fae 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -742,7 +742,7 @@ define Device/dlink_dir-8xx-r1
 	check-size | append-metadata
 endef
 
-define Device/dlink_dir-xx60-a1
+define Device/dlink_dir_nand_128m
   $(Device/nand)
   IMAGE_SIZE := 40960k
   DEVICE_VENDOR := D-Link
@@ -763,35 +763,35 @@ endef
 TARGET_DEVICES += dlink_dir-1935-a1
 
 define Device/dlink_dir-1960-a1
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-1960
   DEVICE_VARIANT := A1
 endef
 TARGET_DEVICES += dlink_dir-1960-a1
 
 define Device/dlink_dir-2640-a1
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-2640
   DEVICE_VARIANT := A1
 endef
 TARGET_DEVICES += dlink_dir-2640-a1
 
 define Device/dlink_dir-2660-a1
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-2660
   DEVICE_VARIANT := A1
 endef
 TARGET_DEVICES += dlink_dir-2660-a1
 
 define Device/dlink_dir-3040-a1
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-3040
   DEVICE_VARIANT := A1
 endef
 TARGET_DEVICES += dlink_dir-3040-a1
 
 define Device/dlink_dir-3060-a1
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-3060
   DEVICE_VARIANT := A1
 endef
@@ -806,7 +806,7 @@ endef
 TARGET_DEVICES += dlink_dir-853-a1
 
 define Device/dlink_dir-853-a3
-  $(Device/dlink_dir-xx60-a1)
+  $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-853
   DEVICE_VARIANT := A3
   IMAGES += factory.bin



From lede-commits at lists.infradead.org  Thu May  9 13:27:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 16:27:11 -0400
Subject: [openwrt/openwrt]  ramips: use led,
 function/color syntax for some tp-link archer routers
In-Reply-To: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
References: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
Message-ID: <mailman.35267.1715286436.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/474b108dfe79dd9a068bd8a592ee1b8a75d525e4

commit 474b108dfe79dd9a068bd8a592ee1b8a75d525e4
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Mon Apr 29 19:10:59 2024 +0200

    ramips: use led, function/color syntax for some tp-link archer routers
    
    Setting the LED name and abandoning the label and using the
    function/color syntax for some TP-Link Archer series routers:
    Archer C2 v1, Archer C20 v1, Archer C20i and Archer C50 v1
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../ramips/dts/mt7620a_tplink_archer-c2-v1.dts     | 10 +++++-----
 .../ramips/dts/mt7620a_tplink_archer-c20-v1.dts    | 22 ++++++++++++----------
 .../ramips/dts/mt7620a_tplink_archer-c20i.dts      | 10 +++++-----
 .../ramips/dts/mt7620a_tplink_archer-c50-v1.dts    | 22 ++++++++++++----------
 4 files changed, 34 insertions(+), 30 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
index 10756e3b3c..b134398f44 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -19,13 +19,13 @@
 	leds {
 		compatible = "gpio-leds";
 
-		lan {
+		led-0 {
 			function = LED_FUNCTION_LAN;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
-		usb {
+		led-1 {
 			function = LED_FUNCTION_USB;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
@@ -33,19 +33,19 @@
 			linux,default-trigger = "usbport";
 		};
 
-		led_wps: wps {
+		led_wps: led-2 {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
-		wan {
+		led-3 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan {
+		led-4 {
 			function = LED_FUNCTION_WLAN;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
index 285e27c357..6b49fa6793 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -16,20 +16,20 @@
 	leds {
 		compatible = "gpio-leds";
 
-		lan {
+		led-0 {
 			function = LED_FUNCTION_LAN;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
-		led_power: power {
+		led_power: led-1 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "keep";
 		};
 
-		usb {
+		led-2 {
 			function = LED_FUNCTION_USB;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
@@ -37,31 +37,33 @@
 			linux,default-trigger = "usbport";
 		};
 
-		wan {
+		led-3 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
 		};
 
-		wan_orange {
+		led-4 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
 		};
 
-		wlan5g {
-			label = "blue:wlan5g";
+		led-5 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
-		wlan2g {
-			label = "blue:wlan2g";
+		led-6 {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};
 
-		wps {
+		led-7 {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index 12141a6e59..0e461ceba5 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -17,13 +17,13 @@
 	leds {
 		compatible = "gpio-leds";
 
-		lan {
+		led-0 {
 			function = LED_FUNCTION_LAN;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
-		usb {
+		led-1 {
 			function = LED_FUNCTION_USB;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
@@ -31,19 +31,19 @@
 			linux,default-trigger = "usbport";
 		};
 
-		led_wps: wps {
+		led_wps: led-2 {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 		};
 
-		wan {
+		led-3 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan {
+		led-4 {
 			function = LED_FUNCTION_WLAN;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
index 97b803470d..8581bbe49b 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -16,20 +16,20 @@
 	leds {
 		compatible = "gpio-leds";
 
-		lan {
+		led-0 {
 			function = LED_FUNCTION_LAN;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
 		};
 
-		led_power: power {
+		led_power: led-1 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
 			default-state = "on";
 		};
 
-		usb {
+		led-2 {
 			function = LED_FUNCTION_USB;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
@@ -37,31 +37,33 @@
 			linux,default-trigger = "usbport";
 		};
 
-		wan {
+		led-3 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
 		};
 
-		wan_orange {
+		led-4 {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan5g {
-			label = "green:wlan5g";
+		led-5 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 
-		wlan2g {
-			label = "green:wlan2g";
+		led-6 {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};
 
-		wps {
+		led-7 {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_GREEN>;
 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;



From lede-commits at lists.infradead.org  Thu May  9 13:27:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 16:27:10 -0400
Subject: [openwrt/openwrt]  ramips: use function/color syntax for some dlink
 dir routers
In-Reply-To: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
References: <171528642953.1516759.17361646632884380565@git-01.infra.openwrt.org>
Message-ID: <mailman.35268.1715286437.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d646ea8a00aab7998e4d7bf80ba256cd65347d2c

commit d646ea8a00aab7998e4d7bf80ba256cd65347d2c
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed May 8 20:32:03 2024 +0200

    ramips: use function/color syntax for some dlink dir routers
    
    Abandoning the label and using the function/color syntax for some dlink
    dir series routers: dir-1960-a1, dir-2660-a1, dir-2640-a1, dir-3040-a1
    and dir-3060-a1
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts  |  2 -
 .../linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts  | 12 ++++--
 .../linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts  | 12 ++++--
 .../linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts  | 14 +++----
 .../linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts  | 43 ++++++++++++++--------
 .../ramips/dts/mt7621_dlink_dir_nand_128m.dtsi     | 14 ++++---
 .../ramips/mt7621/base-files/etc/board.d/01_leds   |  6 +--
 .../base-files/etc/uci-defaults/04_led_migration   |  7 ++++
 8 files changed, 68 insertions(+), 42 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
index 531076216d..a818400342 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
@@ -1,7 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include <dt-bindings/leds/common.h>
-
 #include "mt7621_dlink_dir_nand_128m.dtsi"
 
 / {
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
index fd25b94e8d..ba7b9a88dc 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
@@ -8,15 +8,19 @@
 };
 
 &leds {
-	usb2_white {
-		label = "white:usb2";
+	led-4 {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <2>;
 		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&ehci_port2>;
 		linux,default-trigger = "usbport";
 	};
 
-	usb3_white {
-		label = "white:usb3";
+	led-5 {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <3>;
 		gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&xhci_ehci_port1>;
 		linux,default-trigger = "usbport";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
index d8c347198b..2ee0b8a5c3 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
@@ -8,15 +8,19 @@
 };
 
 &leds {
-	usb2_white {
-		label = "white:usb2";
+	led-4 {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <2>;
 		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&ehci_port2>;
 		linux,default-trigger = "usbport";
 	};
 
-	usb3_white {
-		label = "white:usb3";
+	led-5 {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <3>;
 		gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&xhci_ehci_port1>;
 		linux,default-trigger = "usbport";
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
index 0bcfa022fa..5044ba3bdc 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
@@ -12,32 +12,32 @@
 };
 
 &leds {
-	usb2_white {
+	led-4 {
 		function = LED_FUNCTION_USB;
 		color = <LED_COLOR_ID_WHITE>;
-		function-enumerator = <0>;
+		function-enumerator = <2>;
 		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&ehci_port2>;
 		linux,default-trigger = "usbport";
 	};
 
-	usb3_white {
+	led-5 {
 		function = LED_FUNCTION_USB;
 		color = <LED_COLOR_ID_WHITE>;
-		function-enumerator = <1>;
+		function-enumerator = <3>;
 		gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 		trigger-sources = <&xhci_ehci_port1>;
 		linux,default-trigger = "usbport";
 	};
 
-	wlan2g {
+	led-6 {
 		function = LED_FUNCTION_WLAN_2GHZ;
 		color = <LED_COLOR_ID_WHITE>;
 		gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 		linux,default-trigger = "phy0radio";
 	};
 
-	wlan5glb {
+	led-7 {
 		function = LED_FUNCTION_WLAN_5GHZ;
 		color = <LED_COLOR_ID_WHITE>;
 		function-enumerator = <0>;
@@ -45,7 +45,7 @@
 		linux,default-trigger = "phy1radio";
 	};
 
-	wlan5ghb {
+	led-8 {
 		function = LED_FUNCTION_WLAN_5GHZ;
 		color = <LED_COLOR_ID_WHITE>;
 		function-enumerator = <1>;
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts
index f581095a81..89e1189cf7 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-3060-a1.dts
@@ -37,56 +37,67 @@
 	leds {
 		compatible = "gpio-leds";
 
-		led_power_orange: power_orange {
+		led_power_orange: led-0 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
 		};
 
-		led_power_white: power_white {
+		led_power_white: led-1 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
-		led_net_orange: net_orange {
-			label = "orange:net";
+		led_net_orange: led-2 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 
-		net_white {
-			label = "white:net";
+		led-3 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 
-		usb2_white {
-			label = "white:usb2";
+		led-4 {
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_WHITE>;
+			function-enumerator = <2>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&ehci_port2>;
 			linux,default-trigger = "usbport";
 		};
 
-		usb3_white {
-			label = "white:usb3";
+		led-5 {
+			function = LED_FUNCTION_USB;
+			color = <LED_COLOR_ID_WHITE>;
+			function-enumerator = <3>;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			trigger-sources = <&xhci_ehci_port1>;
 			linux,default-trigger = "usbport";
 		};
 
-		wlan2g {
-			label = "white:wlan2g";
+		led-6 {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy0radio";
 		};
 
-		wlan5glb {
-			label = "white:wlan5glb";
+		led-7 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_WHITE>;
+			function-enumerator = <0>;
 			gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy1radio";
 		};
 
-		wlan5ghb {
-			label = "white:wlan5ghb";
+		led-8 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_WHITE>;
+			function-enumerator = <1>;
 			gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
 			linux,default-trigger = "phy2radio";
 		};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi
index d5adb8728c..147d64c4b0 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi
+++ b/target/linux/ramips/dts/mt7621_dlink_dir_nand_128m.dtsi
@@ -34,25 +34,27 @@
 	leds: leds {
 		compatible = "gpio-leds";
 
-		led_power_orange: power_orange {
+		led_power_orange: led-0 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
 		};
 
-		led_power_white: power_white {
+		led_power_white: led-1 {
 			function = LED_FUNCTION_POWER;
 			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
 		};
 
-		led_net_orange: net_orange {
-			label = "orange:net";
+		led_net_orange: led-2 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
 			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
 		};
 
-		net_white {
-			label = "white:net";
+		led-3 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_WHITE>;
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 	};
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index 6848bebd00..d8beee9f0e 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -94,12 +94,12 @@ dlink,dap-x1860-a1)
 dlink,dir-1960-a1|\
 dlink,dir-2640-a1|\
 dlink,dir-2660-a1)
-	ucidef_set_led_netdev "wan" "wan" "white:net" "wan"
+	ucidef_set_led_netdev "wan" "wan" "white:wan" "wan"
 	;;
 dlink,dir-3040-a1|\
 dlink,dir-3060-a1)
-	ucidef_set_led_netdev "net_white" "WAN Link" "white:net" "wan" "link"
-	ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:net" "wan" "tx rx"
+	ucidef_set_led_netdev "net_white" "WAN Link" "white:wan" "wan" "link"
+	ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:wan" "wan" "tx rx"
 	;;
 dlink,dir-853-a1|\
 dlink,dir-853-a3)
diff --git a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration
index b595ae6fd1..30860346f4 100644
--- a/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ramips/mt7621/base-files/etc/uci-defaults/04_led_migration
@@ -4,6 +4,13 @@
 board=$(board_name)
 
 case "$board" in
+dlink,dir-1960-a1|\
+dlink,dir-2640-a1|\
+dlink,dir-2660-a1|\
+dlink,dir-3040-a1|\
+dlink,dir-3060-a1)
+	migrate_leds ':net=:wan'
+	;;
 tplink,archer-a6-v3|\
 tplink,archer-c6-v3)
 	migrate_leds ':wifi2g$=:wlan-2' ':wifi5g$=:wlan-5'



From lede-commits at lists.infradead.org  Thu May  9 13:34:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 16:34:18 -0400
Subject: [openwrt/openwrt]  ramips: Add support for D-Link DIR-2150-A1
In-Reply-To: <171528685811.1539216.10850959764367046728@git-01.infra.openwrt.org>
References: <171528685811.1539216.10850959764367046728@git-01.infra.openwrt.org>
Message-ID: <mailman.35271.1715286862.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/30e8fd73ec54865ea7db4e6e08560e6a16dd4272

commit 30e8fd73ec54865ea7db4e6e08560e6a16dd4272
Author: Alan Luck <luckyhome2008 at gmail.com>
AuthorDate: Sat Apr 27 19:25:49 2024 +1000

    ramips: Add support for D-Link DIR-2150-A1
    
    Hardware Specification:
    SoC: Mediatek MT7621DAT (MIPS1004Kc 880 MHz, dual core)
    RAM: 128 MB
    Storage: 128 MB NAND flash
    Ethernet: 5x 10/100/1000 Mbps LAN1,LAN2,LAN3,LAN4 & WAN
    Wireless: 2.4GHz: Mediatek MT7603EN up to 300Mbps (802.11b/g/n MIMO 2x2)
    Wireless: 5GHz: Mediatek MT7615N up to 1733Mbps (802.11n/ac MU-MIMO 4x4)
    LEDs: Power (white & amber), Internet (white & amber)
    LEDs: 2.4G (White), 5Ghz (White)
    Buttons: WPS, Reset
    
    MAC Table
    Label xx:xx:xx:xx:xx:EB
    LAN xx:xx:xx:xx:xx:EB
    2.4Ghz xx:xx:xx:xx:xx:EC
    5Ghz xx:xx:xx:xx:xx:ED
    WAN xx:xx:xx:xx:xx:EE
    
    Flash instructions:
    D-Link normal OEM firmware update page
    1. upload OpenWRT factory.bin like any D-Link upgrade image
    
    D-Link Recovery GUI:
    1. Push and hold reset button (on the bottom of the device) until power led starts flashing (about 10 secs or so) while plugging in the power cable.
    2. Give it ~30 seconds, to boot the recovery mode GUI
    3. Connect your client computer to LAN1 of the device
    4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0
    5. Call the recovery page for the device at http://192.168.0.1/
    6. Use the provided emergency web GUI to upload the recovery.bin to the device
    
    Firefox on Windows in a Private Window (incognito) works me
    Internet Explorer mode in Microsoft Edge works for others
    seems to not work in Linux or virtual machine on Linux for most
    some see success using 'curl -v -i -F "firmware=@file.bin" 192.168.0.1'
    
    Thanks to @frkca and @rodneyrod for testing and pushing for its creation
    
    Signed-off-by: Alan Luck <luckyhome2008 at gmail.com>
---
 target/linux/ramips/dts/mt7621_dlink_dir-2150-a1.dts          |  8 ++++++++
 target/linux/ramips/image/mt7621.mk                           | 10 ++++++++++
 target/linux/ramips/mt7621/base-files/etc/board.d/01_leds     |  1 +
 target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh |  1 +
 4 files changed, 20 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2150-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2150-a1.dts
new file mode 100755
index 0000000000..90a76de8ff
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2150-a1.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir_nand_128m.dtsi"
+
+/ {
+	compatible = "dlink,dir-2150-a1", "mediatek,mt7621-soc";
+	model = "D-Link DIR-2150 A1";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index dbb69e0fae..4c6b7057d5 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -769,6 +769,16 @@ define Device/dlink_dir-1960-a1
 endef
 TARGET_DEVICES += dlink_dir-1960-a1
 
+define Device/dlink_dir-2150-a1
+  $(Device/dlink_dir_nand_128m)
+  DEVICE_MODEL := DIR-2150
+  DEVICE_VARIANT := A1
+  DEVICE_PACKAGES += kmod-mt7603 -kmod-usb3 -kmod-usb-ledtrig-usbport
+  IMAGES += factory.bin
+  IMAGE/factory.bin := $$(IMAGE/recovery.bin) | dlink-sge-image $$(DEVICE_MODEL)
+endef
+TARGET_DEVICES += dlink_dir-2150-a1
+
 define Device/dlink_dir-2640-a1
   $(Device/dlink_dir_nand_128m)
   DEVICE_MODEL := DIR-2640
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index d8beee9f0e..36c7d9e97a 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -92,6 +92,7 @@ dlink,dap-x1860-a1)
 	ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan1" "76" "100"
 	;;
 dlink,dir-1960-a1|\
+dlink,dir-2150-a1|\
 dlink,dir-2640-a1|\
 dlink,dir-2660-a1)
 	ucidef_set_led_netdev "wan" "wan" "white:wan" "wan"
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 93fbc470ad..258bb1fe96 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -71,6 +71,7 @@ platform_do_upgrade() {
 	dlink,covr-x1860-a1|\
 	dlink,dap-x1860-a1|\
 	dlink,dir-1960-a1|\
+	dlink,dir-2150-a1|\
 	dlink,dir-2640-a1|\
 	dlink,dir-2660-a1|\
 	dlink,dir-3040-a1|\



From lede-commits at lists.infradead.org  Thu May  9 14:37:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:37:36 -0400
Subject: [openwrt/openwrt]  mediatek: add support for Cudy TR3000 v1
In-Reply-To: <171529065656.1745892.17631461606821593803@git-01.infra.openwrt.org>
References: <171529065656.1745892.17631461606821593803@git-01.infra.openwrt.org>
Message-ID: <mailman.35285.1715290666.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/63b8d98dd0d2f7797ea5b5f25978590982bbbb5d

commit 63b8d98dd0d2f7797ea5b5f25978590982bbbb5d
Author: Luis Mita <luis at luismita.com>
AuthorDate: Tue May 7 11:48:37 2024 -0400

    mediatek: add support for Cudy TR3000 v1
    
    Hardware:
     - SoC: MediaTek MT7981B
     - CPU: 2x 1.3 GHz Cortex-A53
     - Flash: 128 MiB SPI NAND
     - RAM: 512 MiB
     - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
     - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
     - USB 3.0 port
     - Buttons: 1 Reset button, 1 slider button
     - LEDs: 1x Red, 1x White
     - Serial console: internal test points, 115200 8n1
     - Power: 5 VDC, 3 A
    
    MAC addresses:
    +---------+-------------------+-----------+
    |         | MAC               | Algorithm |
    +---------+-------------------+-----------+
    | WAN     | 80:af:ca:xx:xx:x1 | label+1   |
    | LAN     | 80:af:ca:xx:xx:x0 | label     |
    | WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
    | WLAN 5g | 82:af:ca:xx:xx:x0 |           |
    +---------+-------------------+-----------+
    
    Installation:
    The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below.
    
    To install using TFTP:
    1. Connect to UART.
    2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
    3. A u-boot shell will automatically open.
    4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
    5. Run these steps in u-boot using the name of your file.
    
    setenv bootfile initramfs-kernel.bin
    tftpboot
    bootm
    
    6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off.
    
    Signed-off-by: Luis Mita <luis at luismita.com>
---
 .../base-files/lib/preinit/05_set_preinit_iface    |   1 +
 .../linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts  | 232 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/02_network      |   1 +
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   1 +
 target/linux/mediatek/image/filogic.mk             |  17 ++
 5 files changed, 252 insertions(+)

diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index 2bff09b2b2..9351ffd492 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -5,6 +5,7 @@ set_preinit_iface() {
 		ip link set lan up
 		ifname=lan
 		;;
+	cudy,tr3000-v1|\
 	glinet,gl-mt3000)
 		ip link set eth1 up
 		ifname=eth1
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts
new file mode 100644
index 0000000000..2d18af860e
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts
@@ -0,0 +1,232 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "Cudy TR3000 v1";
+	compatible = "cudy,tr3000-v1", "mediatek,mt7981-spim-snand-rfb";
+
+	aliases {
+		label-mac-device = &gmac1;
+		led-boot = &led_status;
+		led-failsafe = &led_status;
+		led-running = &led_status;
+		led-upgrade = &led_status;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		mode {
+			label = "mode";
+			linux,input-type = <EV_SW>;
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status: led_0 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		led_1 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+	};
+
+	usb_vbus: regulator-usb {
+		compatible = "regulator-fixed";
+
+		regulator-name = "usb-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&pio 9 GPIO_ACTIVE_LOW>;
+		regulator-boot-on;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+		phy-handle = <&phy1>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 1>;
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 0>;
+	};
+};
+
+&mdio_bus {
+	phy1: phy at 1 {
+		reg = <1>;
+		compatible = "ethernet-phy-ieee802.3-c45";
+		phy-mode = "2500base-x";
+		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+		interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+		reset-assert-us = <100000>;
+		reset-deassert-us = <100000>;
+		realtek,aldps-enable;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+				read-only;
+			};
+
+			factory: partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x0200000>;
+				read-only;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "bdinfo";
+				reg = <0x380000 0x0040000>;
+				read-only;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_bdinfo_de00: macaddr at de00 {
+						compatible = "mac-base";
+						reg = <0xde00 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+
+			};
+
+			partition at 3C0000 {
+				label = "FIP";
+				reg = <0x3C0000 0x0200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x5C0000 0x4000000>;
+				compatible = "linux,ubi";
+			};
+		};
+	};
+};
+
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+	vbus-supply = <&usb_vbus>;
+};
+
+&wifi {
+	status = "okay";
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};
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 a161a86462..648ecb9289 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
@@ -56,6 +56,7 @@ mediatek_setup_interfaces()
 	dlink,aquila-pro-ai-m30-a1)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet
 		;;
+	cudy,tr3000-v1|\
 	glinet,gl-mt2500|\
 	glinet,gl-mt3000|\
 	glinet,gl-x3000|\
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 0c5f66c029..75c3d25ed9 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -69,6 +69,7 @@ case "$board" in
 		addr=$(mtd_get_mac_binary "Factory" 0x8000)
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
 		;;
+	cudy,tr3000-v1|\
 	cudy,re3000-v1)
 		addr=$(mtd_get_mac_binary bdinfo 0xde00)
 		[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 13426f4f3a..dbe027265a 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -485,6 +485,23 @@ define Device/cudy_re3000-v1
 endef
 TARGET_DEVICES += cudy_re3000-v1
 
+define Device/cudy_tr3000-v1
+  DEVICE_VENDOR := Cudy
+  DEVICE_MODEL := TR3000
+  DEVICE_VARIANT := v1
+  DEVICE_DTS := mt7981b-cudy-tr3000-v1
+  DEVICE_DTS_DIR := ../dts
+  SUPPORTED_DEVICES += R47
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  DEVICE_PACKAGES := kmod-usb3 kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += cudy_tr3000-v1
+
 define Device/cudy_wr3000-v1
   DEVICE_VENDOR := Cudy
   DEVICE_MODEL := WR3000



From lede-commits at lists.infradead.org  Thu May  9 14:58:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:52 -0400
Subject: [openwrt/openwrt]  ath79: enable 6.6 testing kernel
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35297.1715291929.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eb48dae81e59d2f2efed3b66b83ff488e1af7187

commit eb48dae81e59d2f2efed3b66b83ff488e1af7187
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: enable 6.6 testing kernel
    
    The ath79 target now supports the vanilla 6.6 kernel. Enjoy it!
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ath79/Makefile b/target/linux/ath79/Makefile
index 3ef4b32c72..821b096772 100644
--- a/target/linux/ath79/Makefile
+++ b/target/linux/ath79/Makefile
@@ -9,6 +9,7 @@ SUBTARGETS:=generic mikrotik nand tiny
 FEATURES:=ramdisk squashfs usbgadget
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Thu May  9 14:58:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:45 -0400
Subject: [openwrt/openwrt]  ath79: fix build error for downstream gpio drivers
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35298.1715291929.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/24693ac7e54d913153ec6e89a13903937e33ff4d

commit 24693ac7e54d913153ec6e89a13903937e33ff4d
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon Apr 29 20:26:17 2024 +0000

    ath79: fix build error for downstream gpio drivers
    
    Initialize fwnode instead of the deprecated of_node.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/files/drivers/gpio/gpio-latch.c     | 4 ++--
 target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
index 68f9290b2a..5518184caa 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-latch.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
@@ -110,7 +110,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
 	struct gpio_latch_chip *glc;
 	struct gpio_chip *gc;
 	struct device *dev = &pdev->dev;
-	struct device_node *of_node = dev->of_node;
+	struct fwnode_handle *fwnode = dev->fwnode;
 	int i, n;
 
 	glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
@@ -158,7 +158,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
 	gc->get = gpio_latch_get;
 	gc->set = gpio_latch_set;
 	gc->direction_output = gpio_latch_direction_output;
-	gc->of_node = of_node;
+	gc->fwnode = fwnode;
 
 	platform_set_drvdata(pdev, glc);
 
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c b/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
index ee8359e774..8996b2a906 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
@@ -144,7 +144,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	struct gpio_rb91x_key *drvdata;
 	struct gpio_chip *gc;
 	struct device *dev = &pdev->dev;
-	struct device_node *of_node = dev->of_node;
+	struct fwnode_handle *fwnode = dev->fwnode;
 	int r;
 
 	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
@@ -172,7 +172,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	gc->set = gpio_rb91x_key_set;
 	gc->direction_output = gpio_rb91x_key_direction_output;
 	gc->direction_input = gpio_rb91x_key_direction_input;
-	gc->of_node = of_node;
+	gc->fwnode = fwnode;
 
 	platform_set_drvdata(pdev, drvdata);
 



From lede-commits at lists.infradead.org  Thu May  9 14:58:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:46 -0400
Subject: [openwrt/openwrt]  ath79: add MikroTik suffix to the local GPIO latch
 driver
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35299.1715291931.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e155e3bd093109744f77f884fa731e51fb2edb42

commit e155e3bd093109744f77f884fa731e51fb2edb42
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: add MikroTik suffix to the local GPIO latch driver
    
    The upcoming 6.6 kernel will introduce a new upstream generic
    "gpio-latch" driver. It will conflict with the downstream MikroTik
    GPIO latch driver. Let's rename it to avoid any potential issues.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/config-6.1                                         | 2 +-
 target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi          | 2 +-
 .../ath79/files/drivers/gpio/{gpio-latch.c => gpio-latch-mikrotik.c}  | 2 +-
 target/linux/ath79/mikrotik/config-default                            | 2 +-
 target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch               | 4 ++--
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/ath79/config-6.1 b/target/linux/ath79/config-6.1
index f2a6969aa1..87f520228f 100644
--- a/target/linux/ath79/config-6.1
+++ b/target/linux/ath79/config-6.1
@@ -81,7 +81,7 @@ CONFIG_GPIO_74X164=y
 CONFIG_GPIO_ATH79=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_GENERIC=y
-# CONFIG_GPIO_LATCH is not set
+# CONFIG_GPIO_LATCH_MIKROTIK is not set
 # CONFIG_GPIO_RB91X_KEY is not set
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
index 5f9d8e42fb..0c98a6634e 100644
--- a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-911g.dtsi
@@ -22,7 +22,7 @@
 	};
 
 	gpio_latch: gpio_latch {
-		compatible = "gpio-latch";
+		compatible = "gpio-latch-mikrotik";
 		gpio-controller;
 		#gpio-cells = <2>;
 		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
similarity index 98%
rename from target/linux/ath79/files/drivers/gpio/gpio-latch.c
rename to target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
index 5518184caa..8f53974e46 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-latch.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
@@ -15,7 +15,7 @@
 #include <linux/of_platform.h>
 #include <linux/of_gpio.h>
 
-#define GPIO_LATCH_DRIVER_NAME  "gpio-latch"
+#define GPIO_LATCH_DRIVER_NAME  "gpio-latch-mikrotik"
 #define GPIO_LATCH_LINES 9
 
 struct gpio_latch_chip {
diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default
index a231188c83..3fe5cd4979 100644
--- a/target/linux/ath79/mikrotik/config-default
+++ b/target/linux/ath79/mikrotik/config-default
@@ -3,7 +3,7 @@ CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_ZSTD=y
-CONFIG_GPIO_LATCH=y
+CONFIG_GPIO_LATCH_MIKROTIK=y
 CONFIG_GPIO_RB4XX=y
 CONFIG_GPIO_RB91X_KEY=y
 CONFIG_GPIO_WATCHDOG=y
diff --git a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
index 768ab6fb49..677428fa65 100644
--- a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
+++ b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
@@ -33,7 +33,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  
  	  If unsure, say N.
  
-+config GPIO_LATCH
++config GPIO_LATCH_MIKROTIK
 +	tristate "MikroTik RouterBOARD GPIO latch support"
 +	depends on ATH79
 +	help
@@ -59,7 +59,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4xx.o
  obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
  obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
-+obj-$(CONFIG_GPIO_LATCH)		+= gpio-latch.o
++obj-$(CONFIG_GPIO_LATCH_MIKROTIK)	+= gpio-latch-mikrotik.o
  obj-$(CONFIG_GPIO_LOGICVC)		+= gpio-logicvc.o
  obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
  obj-$(CONFIG_GPIO_LOONGSON)		+= gpio-loongson.o



From lede-commits at lists.infradead.org  Thu May  9 14:58:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:51 -0400
Subject: [openwrt/openwrt]  ath79: skip reset control for syscon devices
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35300.1715291931.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/26390b536165205d10d0583b8b52c33c225433c4

commit 26390b536165205d10d0583b8b52c33c225433c4
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: skip reset control for syscon devices
    
    Fix the issue of exclusive reset controller acquisition failure on
    kernel 6.6.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/dts/ath79.dtsi                  |  2 ++
 ...ort-skip-reset-control-for-syscon-devices.patch | 37 ++++++++++++++++++++++
 2 files changed, 39 insertions(+)

diff --git a/target/linux/ath79/dts/ath79.dtsi b/target/linux/ath79/dts/ath79.dtsi
index 89d9058414..8849d729ac 100644
--- a/target/linux/ath79/dts/ath79.dtsi
+++ b/target/linux/ath79/dts/ath79.dtsi
@@ -52,6 +52,7 @@
 
 			interrupts = <4>;
 			phy-mode = "mii";
+			syscon-no-reset;
 
 			mdio0: mdio {
 				status = "disabled";
@@ -75,6 +76,7 @@
 
 			interrupts = <5>;
 			phy-mode = "mii";
+			syscon-no-reset;
 
 			mdio1: mdio {
 				status = "disabled";
diff --git a/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch b/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
new file mode 100644
index 0000000000..c73c8443b9
--- /dev/null
+++ b/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
@@ -0,0 +1,37 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Wed, 13 Mar 2024 22:36:31 +0800
+Subject: [PATCH] mfd: syscon: support skip reset control for syscon devices
+
+Some platform device drivers(e.g. ag71xx) expect exclusive reset
+control. Fetching reset controller for syscon[1] will break these
+drivers. This patch introduces a new property 'syscon-no-reset'
+to skip it.
+
+[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=7d1e3bd94828ad9fc86f55253cd6fec8edd65394
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ drivers/mfd/syscon.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/mfd/syscon.c
++++ b/drivers/mfd/syscon.c
+@@ -52,7 +52,7 @@ static struct syscon *of_syscon_register
+ 	int ret;
+ 	struct regmap_config syscon_config = syscon_regmap_config;
+ 	struct resource res;
+-	struct reset_control *reset;
++	struct reset_control *reset = NULL;
+ 
+ 	syscon = kzalloc(sizeof(*syscon), GFP_KERNEL);
+ 	if (!syscon)
+@@ -134,7 +134,8 @@ static struct syscon *of_syscon_register
+ 				goto err_attach_clk;
+ 		}
+ 
+-		reset = of_reset_control_get_optional_exclusive(np, NULL);
++		if (!of_property_read_bool(np, "syscon-no-reset"))
++			reset = of_reset_control_get_optional_exclusive(np, NULL);
+ 		if (IS_ERR(reset)) {
+ 			ret = PTR_ERR(reset);
+ 			goto err_attach_clk;



From lede-commits at lists.infradead.org  Thu May  9 14:58:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:50 -0400
Subject: [openwrt/openwrt]  ath79: refresh 6.6 kernel config files
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35303.1715291931.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e938d68074272d9eb02aa1dfe057c9c0a8a8dd4c

commit e938d68074272d9eb02aa1dfe057c9c0a8a8dd4c
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: refresh 6.6 kernel config files
    
    All kernel config files are refreshed by
    `make kernel_oldconfig CONFIG_TARGET={subtarget_target,subtarget}`
    
    "CONFIG_SQUASHFS_DECOMP_SINGLE=y" is manually selected as all ath79
    SoCs are single core processors.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/config-6.6 | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/target/linux/ath79/config-6.6 b/target/linux/ath79/config-6.6
index 87f520228f..290f5b833e 100644
--- a/target/linux/ath79/config-6.6
+++ b/target/linux/ath79/config-6.6
@@ -38,10 +38,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DMA_NONCOHERENT=y
@@ -50,6 +50,8 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
@@ -60,6 +62,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -86,6 +89,7 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -103,7 +107,6 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MDIO_GPIO=y
-CONFIG_MEMFD_CREATE=y
 # CONFIG_MFD_RB4XX_CPLD is not set
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
@@ -115,10 +118,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
@@ -140,7 +143,10 @@ CONFIG_MTD_SPLIT_WRGG_FW=y
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_SELFTESTS=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -194,7 +200,9 @@ CONFIG_SPI_GPIO=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 # CONFIG_SPI_RB4XX is not set
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWCONFIG_LEDS=y
 CONFIG_SWPHY=y



From lede-commits at lists.infradead.org  Thu May  9 14:58:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:47 -0400
Subject: [openwrt/openwrt]  ath79: rename patches directory and kernel config
 from 6.1 to 6.6
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35304.1715291931.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7d01a0b436ac242e618f86d4eede141968e2e2f8

commit 7d01a0b436ac242e618f86d4eede141968e2e2f8
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: rename patches directory and kernel config from 6.1 to 6.6
    
    This is preparation for 6.6 kernel support. Renaming files allows
    us to better track their git history.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/{config-6.1 => config-6.6}                             | 0
 .../010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch               | 0
 .../100-reset-ath79-read-back-reset-register.patch                        | 0
 .../300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch        | 0
 .../301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch                   | 0
 .../310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch                | 0
 .../{patches-6.1 => patches-6.6}/311-MIPS-pci-ar71xx-convert-to-OF.patch  | 0
 .../312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch                | 0
 .../{patches-6.1 => patches-6.6}/313-MIPS-pci-ar724x-convert-to-OF.patch  | 0
 .../314-MIPS-ath79-remove-irq-code-from-pci.patch                         | 0
 .../315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch                  | 0
 .../316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch                   | 0
 .../linux/ath79/{patches-6.1 => patches-6.6}/330-missing-registers.patch  | 0
 .../331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch               | 0
 .../linux/ath79/{patches-6.1 => patches-6.6}/332-ath79-sgmii-config.patch | 0
 .../{patches-6.1 => patches-6.6}/340-register_gpio_driver_earlier.patch   | 0
 .../ath79/{patches-6.1 => patches-6.6}/350-MIPS-ath79-ath9k-exports.patch | 0
 .../{patches-6.1 => patches-6.6}/351-MIPS-ath79-common-exports.patch      | 0
 .../360-MIPS-ath79-export-UART1-reference-clock.patch                     | 0
 .../{patches-6.1 => patches-6.6}/370-MIPS-ath79-sanitize-symbols.patch    | 0
 .../400-mtd-nor-support-mtd-name-from-device-tree.patch                   | 0
 .../ath79/{patches-6.1 => patches-6.6}/410-mtd-cybertan-trx-parser.patch  | 0
 .../{patches-6.1 => patches-6.6}/420-drivers-link-spi-before-mtd.patch    | 0
 .../ath79/{patches-6.1 => patches-6.6}/430-mtd-ar934x-nand-driver.patch   | 0
 .../ath79/{patches-6.1 => patches-6.6}/700-phy-add-ath79-usb-phys.patch   | 0
 .../701-usb-add-more-OF-quirk-properties.patch                            | 0
 .../{patches-6.1 => patches-6.6}/710-net-use-downstream-ag71xx.patch      | 0
 .../{patches-6.1 => patches-6.6}/720-mdio_bitbang_ignore_ta_value.patch   | 0
 .../721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch        | 0
 .../{patches-6.1 => patches-6.6}/730-ar8216-make-reg-access-atomic.patch  | 0
 .../800-leds-add-reset-controller-based-driver.patch                      | 0
 .../810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch          | 0
 .../ath79/{patches-6.1 => patches-6.6}/900-unaligned_access_hacks.patch   | 0
 target/linux/ath79/{patches-6.1 => patches-6.6}/910-mikrotik-rb4xx.patch  | 0
 target/linux/ath79/{patches-6.1 => patches-6.6}/911-mikrotik-rb91x.patch  | 0
 35 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/ath79/config-6.1 b/target/linux/ath79/config-6.6
similarity index 100%
rename from target/linux/ath79/config-6.1
rename to target/linux/ath79/config-6.6
diff --git a/target/linux/ath79/patches-6.1/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch b/target/linux/ath79/patches-6.6/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
rename to target/linux/ath79/patches-6.6/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
diff --git a/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch b/target/linux/ath79/patches-6.6/100-reset-ath79-read-back-reset-register.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch
rename to target/linux/ath79/patches-6.6/100-reset-ath79-read-back-reset-register.patch
diff --git a/target/linux/ath79/patches-6.1/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch b/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
rename to target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
diff --git a/target/linux/ath79/patches-6.1/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch b/target/linux/ath79/patches-6.6/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
rename to target/linux/ath79/patches-6.6/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
diff --git a/target/linux/ath79/patches-6.1/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch b/target/linux/ath79/patches-6.6/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
rename to target/linux/ath79/patches-6.6/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
diff --git a/target/linux/ath79/patches-6.1/311-MIPS-pci-ar71xx-convert-to-OF.patch b/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/311-MIPS-pci-ar71xx-convert-to-OF.patch
rename to target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch
diff --git a/target/linux/ath79/patches-6.1/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch b/target/linux/ath79/patches-6.6/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
rename to target/linux/ath79/patches-6.6/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
diff --git a/target/linux/ath79/patches-6.1/313-MIPS-pci-ar724x-convert-to-OF.patch b/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/313-MIPS-pci-ar724x-convert-to-OF.patch
rename to target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch
diff --git a/target/linux/ath79/patches-6.1/314-MIPS-ath79-remove-irq-code-from-pci.patch b/target/linux/ath79/patches-6.6/314-MIPS-ath79-remove-irq-code-from-pci.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/314-MIPS-ath79-remove-irq-code-from-pci.patch
rename to target/linux/ath79/patches-6.6/314-MIPS-ath79-remove-irq-code-from-pci.patch
diff --git a/target/linux/ath79/patches-6.1/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch b/target/linux/ath79/patches-6.6/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
rename to target/linux/ath79/patches-6.6/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
diff --git a/target/linux/ath79/patches-6.1/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch b/target/linux/ath79/patches-6.6/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
rename to target/linux/ath79/patches-6.6/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
diff --git a/target/linux/ath79/patches-6.1/330-missing-registers.patch b/target/linux/ath79/patches-6.6/330-missing-registers.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/330-missing-registers.patch
rename to target/linux/ath79/patches-6.6/330-missing-registers.patch
diff --git a/target/linux/ath79/patches-6.1/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch b/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
rename to target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
diff --git a/target/linux/ath79/patches-6.1/332-ath79-sgmii-config.patch b/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/332-ath79-sgmii-config.patch
rename to target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch
diff --git a/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch
rename to target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
diff --git a/target/linux/ath79/patches-6.1/350-MIPS-ath79-ath9k-exports.patch b/target/linux/ath79/patches-6.6/350-MIPS-ath79-ath9k-exports.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/350-MIPS-ath79-ath9k-exports.patch
rename to target/linux/ath79/patches-6.6/350-MIPS-ath79-ath9k-exports.patch
diff --git a/target/linux/ath79/patches-6.1/351-MIPS-ath79-common-exports.patch b/target/linux/ath79/patches-6.6/351-MIPS-ath79-common-exports.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/351-MIPS-ath79-common-exports.patch
rename to target/linux/ath79/patches-6.6/351-MIPS-ath79-common-exports.patch
diff --git a/target/linux/ath79/patches-6.1/360-MIPS-ath79-export-UART1-reference-clock.patch b/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/360-MIPS-ath79-export-UART1-reference-clock.patch
rename to target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch
diff --git a/target/linux/ath79/patches-6.1/370-MIPS-ath79-sanitize-symbols.patch b/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/370-MIPS-ath79-sanitize-symbols.patch
rename to target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
diff --git a/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
rename to target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
diff --git a/target/linux/ath79/patches-6.1/410-mtd-cybertan-trx-parser.patch b/target/linux/ath79/patches-6.6/410-mtd-cybertan-trx-parser.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/410-mtd-cybertan-trx-parser.patch
rename to target/linux/ath79/patches-6.6/410-mtd-cybertan-trx-parser.patch
diff --git a/target/linux/ath79/patches-6.1/420-drivers-link-spi-before-mtd.patch b/target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/420-drivers-link-spi-before-mtd.patch
rename to target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch
diff --git a/target/linux/ath79/patches-6.1/430-mtd-ar934x-nand-driver.patch b/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/430-mtd-ar934x-nand-driver.patch
rename to target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
diff --git a/target/linux/ath79/patches-6.1/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/700-phy-add-ath79-usb-phys.patch
rename to target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
diff --git a/target/linux/ath79/patches-6.1/701-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-6.6/701-usb-add-more-OF-quirk-properties.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/701-usb-add-more-OF-quirk-properties.patch
rename to target/linux/ath79/patches-6.6/701-usb-add-more-OF-quirk-properties.patch
diff --git a/target/linux/ath79/patches-6.1/710-net-use-downstream-ag71xx.patch b/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/710-net-use-downstream-ag71xx.patch
rename to target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
diff --git a/target/linux/ath79/patches-6.1/720-mdio_bitbang_ignore_ta_value.patch b/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/720-mdio_bitbang_ignore_ta_value.patch
rename to target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
diff --git a/target/linux/ath79/patches-6.1/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch b/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
rename to target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
diff --git a/target/linux/ath79/patches-6.1/730-ar8216-make-reg-access-atomic.patch b/target/linux/ath79/patches-6.6/730-ar8216-make-reg-access-atomic.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/730-ar8216-make-reg-access-atomic.patch
rename to target/linux/ath79/patches-6.6/730-ar8216-make-reg-access-atomic.patch
diff --git a/target/linux/ath79/patches-6.1/800-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/800-leds-add-reset-controller-based-driver.patch
rename to target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
diff --git a/target/linux/ath79/patches-6.1/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch b/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
rename to target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
rename to target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
diff --git a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
rename to target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
diff --git a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
similarity index 100%
rename from target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
rename to target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch



From lede-commits at lists.infradead.org  Thu May  9 14:58:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:49 -0400
Subject: [openwrt/openwrt]  ath79: refresh 6.6 kernel patches
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35305.1715291936.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/872fe7e9f9fbf857963728bd267ef982143cddde

commit 872fe7e9f9fbf857963728bd267ef982143cddde
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: refresh 6.6 kernel patches
    
    Some APIs have been changed. Porting them to the new kernel 6.6
    version to fix the compile error.
    
    Removed upstreamed:
            010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch[1]
    
    Manually rebased:
            700-phy-add-ath79-usb-phys.patch
            721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch. ref:[2]
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=b11ce7e48121a02ceedec9f4dfcab4f2bee8f35f
    [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=002dd3de097c778a74ae9e47e598bea6ad055af0
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 ...-gpio-ath79-Convert-to-immutable-irq_chip.patch | 60 -----------------
 .../340-register_gpio_driver_earlier.patch         |  2 +-
 .../370-MIPS-ath79-sanitize-symbols.patch          | 20 +-----
 ...mtd-nor-support-mtd-name-from-device-tree.patch |  4 +-
 .../420-drivers-link-spi-before-mtd.patch          |  2 +-
 .../patches-6.6/430-mtd-ar934x-nand-driver.patch   |  4 +-
 .../patches-6.6/700-phy-add-ath79-usb-phys.patch   | 14 ++--
 .../720-mdio_bitbang_ignore_ta_value.patch         |  8 +--
 ...tbang-prevent-rescheduling-during-command.patch | 75 ++++++++++++++++------
 ...00-leds-add-reset-controller-based-driver.patch |  4 +-
 .../patches-6.6/900-unaligned_access_hacks.patch   | 50 +++++++--------
 .../ath79/patches-6.6/910-mikrotik-rb4xx.patch     | 12 ++--
 .../ath79/patches-6.6/911-mikrotik-rb91x.patch     | 16 ++---
 13 files changed, 112 insertions(+), 159 deletions(-)

diff --git a/target/linux/ath79/patches-6.6/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch b/target/linux/ath79/patches-6.6/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
deleted file mode 100644
index 942380fc7b..0000000000
--- a/target/linux/ath79/patches-6.6/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From b11ce7e48121a02ceedec9f4dfcab4f2bee8f35f Mon Sep 17 00:00:00 2001
-From: Linus Walleij <linus.walleij at linaro.org>
-Date: Thu, 9 Mar 2023 08:45:54 +0100
-Subject: gpio: ath79: Convert to immutable irq_chip
-
-Convert the driver to immutable irq-chip with a bit of
-intuition.
-
-Cc: Marc Zyngier <maz at kernel.org>
-Acked-by: Marc Zyngier <maz at kernel.org>
-Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
-Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
----
- drivers/gpio/gpio-ath79.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
---- a/drivers/gpio/gpio-ath79.c
-+++ b/drivers/gpio/gpio-ath79.c
-@@ -71,6 +71,7 @@ static void ath79_gpio_irq_unmask(struct
- 	u32 mask = BIT(irqd_to_hwirq(data));
- 	unsigned long flags;
- 
-+	gpiochip_enable_irq(&ctrl->gc, irqd_to_hwirq(data));
- 	raw_spin_lock_irqsave(&ctrl->lock, flags);
- 	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, mask);
- 	raw_spin_unlock_irqrestore(&ctrl->lock, flags);
-@@ -85,6 +86,7 @@ static void ath79_gpio_irq_mask(struct i
- 	raw_spin_lock_irqsave(&ctrl->lock, flags);
- 	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, 0);
- 	raw_spin_unlock_irqrestore(&ctrl->lock, flags);
-+	gpiochip_disable_irq(&ctrl->gc, irqd_to_hwirq(data));
- }
- 
- static void ath79_gpio_irq_enable(struct irq_data *data)
-@@ -169,13 +171,15 @@ static int ath79_gpio_irq_set_type(struc
- 	return 0;
- }
- 
--static struct irq_chip ath79_gpio_irqchip = {
-+static const struct irq_chip ath79_gpio_irqchip = {
- 	.name = "gpio-ath79",
- 	.irq_enable = ath79_gpio_irq_enable,
- 	.irq_disable = ath79_gpio_irq_disable,
- 	.irq_mask = ath79_gpio_irq_mask,
- 	.irq_unmask = ath79_gpio_irq_unmask,
- 	.irq_set_type = ath79_gpio_irq_set_type,
-+	.flags = IRQCHIP_IMMUTABLE,
-+	GPIOCHIP_IRQ_RESOURCE_HELPERS,
- };
- 
- static void ath79_gpio_irq_handler(struct irq_desc *desc)
-@@ -274,7 +278,7 @@ static int ath79_gpio_probe(struct platf
- 	/* Optional interrupt setup */
- 	if (!np || of_property_read_bool(np, "interrupt-controller")) {
- 		girq = &ctrl->gc.irq;
--		girq->chip = &ath79_gpio_irqchip;
-+		gpio_irq_chip_set_chip(girq, &ath79_gpio_irqchip);
- 		girq->parent_handler = ath79_gpio_irq_handler;
- 		girq->num_parents = 1;
- 		girq->parents = devm_kcalloc(dev, 1, sizeof(*girq->parents),
diff --git a/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
index 48ce7e1d71..32c90ef2fc 100644
--- a/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
+++ b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
@@ -11,7 +11,7 @@ Submitted-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/gpio/gpio-ath79.c
 +++ b/drivers/gpio/gpio-ath79.c
-@@ -301,7 +301,11 @@ static struct platform_driver ath79_gpio
+@@ -302,7 +302,11 @@ static struct platform_driver ath79_gpio
  	.probe = ath79_gpio_probe,
  };
  
diff --git a/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch b/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
index eac17c2b50..e6aeef5115 100644
--- a/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
+++ b/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
@@ -15,7 +15,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -257,6 +257,8 @@ config ATH79
+@@ -255,6 +255,8 @@ config ATH79
  	select SYS_SUPPORTS_BIG_ENDIAN
  	select SYS_SUPPORTS_MIPS16
  	select SYS_SUPPORTS_ZBOOT_UART_PROM
@@ -26,7 +26,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	help
 --- a/arch/mips/ath79/Kconfig
 +++ b/arch/mips/ath79/Kconfig
-@@ -1,48 +1,14 @@
+@@ -1,32 +1,14 @@
  # SPDX-License-Identifier: GPL-2.0
  if ATH79
  
@@ -59,22 +59,6 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	def_bool n
  
  config PCI_AR724X
--	def_bool n
--
--config ATH79_DEV_GPIO_BUTTONS
--	def_bool n
--
--config ATH79_DEV_LEDS_GPIO
--	def_bool n
--
--config ATH79_DEV_SPI
--	def_bool n
--
--config ATH79_DEV_USB
--	def_bool n
--
--config ATH79_DEV_WMAC
--	depends on (SOC_AR913X || SOC_AR933X || SOC_AR934X || SOC_QCA955X)
 +	bool "PCI support for AR724x type SoCs"
 +	depends on PCI
  	def_bool n
diff --git a/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
index ebb240d4ae..62d402625d 100644
--- a/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
+++ b/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
 
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2964,12 +2964,19 @@ static void spi_nor_set_mtd_info(struct
+@@ -3420,12 +3420,19 @@ static void spi_nor_set_mtd_info(struct
  {
  	struct mtd_info *mtd = &nor->mtd;
  	struct device *dev = nor->dev;
@@ -33,7 +33,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
  	mtd->flags = MTD_CAP_NORFLASH;
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -863,6 +863,17 @@ out_error:
+@@ -870,6 +870,17 @@ out_error:
   */
  static void mtd_set_dev_defaults(struct mtd_info *mtd)
  {
diff --git a/target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch b/target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch
index 0cd96909eb..2e9d3c3e94 100644
--- a/target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch
+++ b/target/linux/ath79/patches-6.6/420-drivers-link-spi-before-mtd.patch
@@ -8,7 +8,7 @@ SVN-Revision: 22863
 
 --- a/drivers/Makefile
 +++ b/drivers/Makefile
-@@ -80,8 +80,8 @@ obj-y				+= scsi/
+@@ -87,8 +87,8 @@ obj-y				+= scsi/
  obj-y				+= nvme/
  obj-$(CONFIG_ATA)		+= ata/
  obj-$(CONFIG_TARGET_CORE)	+= target/
diff --git a/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch b/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
index 184c39d469..603750cbe9 100644
--- a/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
+++ b/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
@@ -9,7 +9,7 @@ SVN-Revision: 33385
 
 --- a/drivers/mtd/nand/raw/Kconfig
 +++ b/drivers/mtd/nand/raw/Kconfig
-@@ -557,4 +557,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
+@@ -543,4 +543,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
  	  load time (assuming you build diskonchip as a module) with the module
  	  parameter "inftl_bbt_write=1".
  
@@ -24,7 +24,7 @@ SVN-Revision: 33385
  endif # MTD_RAW_NAND
 --- a/drivers/mtd/nand/raw/Makefile
 +++ b/drivers/mtd/nand/raw/Makefile
-@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM)	+= inte
+@@ -57,6 +57,7 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM)	+= inte
  obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rockchip-nand-controller.o
  obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
  obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
diff --git a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
index 21b655a109..0a9de68a39 100644
--- a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
+++ b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
@@ -15,7 +15,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/phy/Kconfig
 +++ b/drivers/phy/Kconfig
-@@ -24,6 +24,22 @@ config GENERIC_PHY_MIPI_DPHY
+@@ -25,6 +25,22 @@ config GENERIC_PHY_MIPI_DPHY
  	  Provides a number of helpers a core functions for MIPI D-PHY
  	  drivers to us.
  
@@ -154,15 +154,15 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +		return PTR_ERR(priv->phy);
 +	}
 +
-+	priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
-+	if (priv->gpio >= 0) {
++	priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0);
++	if (gpio_is_valid(priv->gpio)) {
 +		int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
 +
 +		if (ret) {
 +			dev_err(&pdev->dev, "failed to request gpio\n");
 +			return ret;
 +		}
-+		gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
++		gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev));
 +		gpio_set_value(priv->gpio, 1);
 +	}
 +
@@ -294,15 +294,15 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +		return PTR_ERR(priv->phy);
 +	}
 +
-+	priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
-+	if (priv->gpio >= 0) {
++	priv->gpio = of_get_named_gpio(pdev->dev.of_node, "gpios", 0);
++	if (gpio_is_valid(priv->gpio)) {
 +		int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
 +
 +		if (ret) {
 +			dev_err(&pdev->dev, "failed to request gpio\n");
 +			return ret;
 +		}
-+		gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
++		gpio_export_with_name(gpio_to_desc(priv->gpio), 0, dev_name(&pdev->dev));
 +		gpio_set_value(priv->gpio, 1);
 +	}
 +
diff --git a/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch b/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
index 5363bb37b0..ce6b16c34e 100644
--- a/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
+++ b/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
@@ -12,17 +12,13 @@ SVN-Revision: 28422
 
 --- a/drivers/net/mdio/mdio-bitbang.c
 +++ b/drivers/net/mdio/mdio-bitbang.c
-@@ -152,7 +152,7 @@ static int mdiobb_cmd_addr(struct mdiobb
- int mdiobb_read(struct mii_bus *bus, int phy, int reg)
+@@ -148,23 +148,11 @@ static void mdiobb_cmd_addr(struct mdiob
+ static int mdiobb_read_common(struct mii_bus *bus, int phy)
  {
  	struct mdiobb_ctrl *ctrl = bus->priv;
 -	int ret, i;
 +	int ret;
  
- 	if (reg & MII_ADDR_C45) {
- 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
-@@ -162,19 +162,7 @@ int mdiobb_read(struct mii_bus *bus, int
- 
  	ctrl->ops->set_mdio_dir(ctrl, 0);
  
 -	/* check the turnaround bit: the PHY should be driving it to zero, if this
diff --git a/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch b/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
index e37d9a1f63..26c40e132b 100644
--- a/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
+++ b/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
@@ -22,40 +22,73 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  #include <linux/delay.h>
  #include <linux/mdio-bitbang.h>
  #include <linux/module.h>
-@@ -153,7 +154,9 @@ int mdiobb_read(struct mii_bus *bus, int
+@@ -161,22 +162,32 @@ static int mdiobb_read_common(struct mii
+ 
+ int mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
  {
++	int ret;
++	unsigned long flags;
  	struct mdiobb_ctrl *ctrl = bus->priv;
- 	int ret;
+ 
++	local_irq_save(flags);
+ 	mdiobb_cmd(ctrl, ctrl->op_c22_read, phy, reg);
+ 
+-	return mdiobb_read_common(bus, phy);
++	ret = mdiobb_read_common(bus, phy);
++	local_irq_restore(flags);
++	return ret;
+ }
+ EXPORT_SYMBOL(mdiobb_read_c22);
+ 
+ int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg)
+ {
++	int ret;
 +	unsigned long flags;
+ 	struct mdiobb_ctrl *ctrl = bus->priv;
  
 +	local_irq_save(flags);
- 	if (reg & MII_ADDR_C45) {
- 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
- 		mdiobb_cmd(ctrl, MDIO_C45_READ, phy, reg);
-@@ -166,6 +169,7 @@ int mdiobb_read(struct mii_bus *bus, int
+ 	mdiobb_cmd_addr(ctrl, phy, devad, reg);
+ 	mdiobb_cmd(ctrl, MDIO_C45_READ, phy, devad);
  
- 	ret = mdiobb_get_num(ctrl, 16);
- 	mdiobb_get_bit(ctrl);
+-	return mdiobb_read_common(bus, phy);
++	ret = mdiobb_read_common(bus, phy);
 +	local_irq_restore(flags);
- 	return ret;
++	return ret;
  }
- EXPORT_SYMBOL(mdiobb_read);
-@@ -173,7 +177,9 @@ EXPORT_SYMBOL(mdiobb_read);
- int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
+ EXPORT_SYMBOL(mdiobb_read_c45);
+ 
+@@ -197,22 +208,32 @@ static int mdiobb_write_common(struct mi
+ 
+ int mdiobb_write_c22(struct mii_bus *bus, int phy, int reg, u16 val)
  {
++	int ret;
++	unsigned long flags;
  	struct mdiobb_ctrl *ctrl = bus->priv;
+ 
++	local_irq_save(flags);
+ 	mdiobb_cmd(ctrl, ctrl->op_c22_write, phy, reg);
+ 
+-	return mdiobb_write_common(bus, val);
++	ret = mdiobb_write_common(bus, val);
++	local_irq_restore(flags);
++	return ret;
+ }
+ EXPORT_SYMBOL(mdiobb_write_c22);
+ 
+ int mdiobb_write_c45(struct mii_bus *bus, int phy, int devad, int reg, u16 val)
+ {
++	int ret;
 +	unsigned long flags;
+ 	struct mdiobb_ctrl *ctrl = bus->priv;
  
 +	local_irq_save(flags);
- 	if (reg & MII_ADDR_C45) {
- 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
- 		mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, reg);
-@@ -188,6 +194,8 @@ int mdiobb_write(struct mii_bus *bus, in
+ 	mdiobb_cmd_addr(ctrl, phy, devad, reg);
+ 	mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, devad);
  
- 	ctrl->ops->set_mdio_dir(ctrl, 0);
- 	mdiobb_get_bit(ctrl);
+-	return mdiobb_write_common(bus, val);
++	ret = mdiobb_write_common(bus, val);
 +	local_irq_restore(flags);
-+
- 	return 0;
++	return ret;
  }
- EXPORT_SYMBOL(mdiobb_write);
+ EXPORT_SYMBOL(mdiobb_write_c45);
+ 
diff --git a/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
index 0002b9b95b..fa958e767b 100644
--- a/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
+++ b/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -874,6 +874,17 @@ source "drivers/leds/flash/Kconfig"
+@@ -901,6 +901,17 @@ source "drivers/leds/flash/Kconfig"
  comment "RGB LED drivers"
  source "drivers/leds/rgb/Kconfig"
  
@@ -176,7 +176,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 +MODULE_ALIAS("platform:leds-reset");
 --- a/drivers/leds/Makefile
 +++ b/drivers/leds/Makefile
-@@ -86,6 +86,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA)		+= leds
+@@ -88,6 +88,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA)		+= leds
  obj-$(CONFIG_LEDS_WM831X_STATUS)	+= leds-wm831x-status.o
  obj-$(CONFIG_LEDS_WM8350)		+= leds-wm8350.o
  obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
diff --git a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
index 6c97bc307c..0190da85de 100644
--- a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
@@ -216,7 +216,7 @@ SVN-Revision: 35130
  #define UDP_CORK	1	/* Never send partially complete segments */
 --- a/net/netfilter/nf_conntrack_core.c
 +++ b/net/netfilter/nf_conntrack_core.c
-@@ -308,8 +308,8 @@ nf_ct_get_tuple(const struct sk_buff *sk
+@@ -298,8 +298,8 @@ nf_ct_get_tuple(const struct sk_buff *sk
  
  	switch (l3num) {
  	case NFPROTO_IPV4:
@@ -259,7 +259,7 @@ SVN-Revision: 35130
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -901,10 +902,10 @@ static void tcp_v6_send_response(const s
+@@ -897,10 +898,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
@@ -286,7 +286,7 @@ SVN-Revision: 35130
   */
 --- a/net/ipv6/datagram.c
 +++ b/net/ipv6/datagram.c
-@@ -497,7 +497,7 @@ int ipv6_recv_error(struct sock *sk, str
+@@ -499,7 +499,7 @@ int ipv6_recv_error(struct sock *sk, str
  				ipv6_iface_scope_id(&sin->sin6_addr,
  						    IP6CB(skb)->iif);
  		} else {
@@ -295,7 +295,7 @@ SVN-Revision: 35130
  					       &sin->sin6_addr);
  			sin->sin6_scope_id = 0;
  		}
-@@ -851,12 +851,12 @@ int ip6_datagram_send_ctl(struct net *ne
+@@ -853,12 +853,12 @@ int ip6_datagram_send_ctl(struct net *ne
  			}
  
  			if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
@@ -312,7 +312,7 @@ SVN-Revision: 35130
  		case IPV6_2292HOPOPTS:
 --- a/net/ipv6/exthdrs.c
 +++ b/net/ipv6/exthdrs.c
-@@ -1013,7 +1013,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+@@ -982,7 +982,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
  		goto drop;
  	}
  
@@ -323,7 +323,7 @@ SVN-Revision: 35130
  					 SKB_DROP_REASON_IP_INHDR);
 --- a/include/linux/types.h
 +++ b/include/linux/types.h
-@@ -232,5 +232,11 @@ typedef void (*swap_func_t)(void *a, voi
+@@ -244,5 +244,11 @@ typedef void (*swap_func_t)(void *a, voi
  typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
  typedef int (*cmp_func_t)(const void *a, const void *b);
  
@@ -337,10 +337,10 @@ SVN-Revision: 35130
  #endif /* _LINUX_TYPES_H */
 --- a/net/ipv4/af_inet.c
 +++ b/net/ipv4/af_inet.c
-@@ -1515,8 +1515,8 @@ struct sk_buff *inet_gro_receive(struct
- 	if (unlikely(ip_fast_csum((u8 *)iph, 5)))
+@@ -1506,8 +1506,8 @@ struct sk_buff *inet_gro_receive(struct
  		goto out;
  
+ 	NAPI_GRO_CB(skb)->proto = proto;
 -	id = ntohl(*(__be32 *)&iph->id);
 -	flush = (u16)((ntohl(*(__be32 *)iph) ^ skb_gro_len(skb)) | (id & ~IP_DF));
 +	id = ntohl(net_hdr_word(&iph->id));
@@ -350,7 +350,7 @@ SVN-Revision: 35130
  	list_for_each_entry(p, head, list) {
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -612,48 +612,53 @@ static void tcp_options_write(struct tcp
+@@ -620,48 +620,53 @@ static void tcp_options_write(struct tcp
  	u16 options = opts->options;	/* mungable copy */
  
  	if (unlikely(OPTION_MD5 & options)) {
@@ -427,7 +427,7 @@ SVN-Revision: 35130
  	}
  
  	if (unlikely(opts->num_sack_blocks)) {
-@@ -661,16 +666,17 @@ static void tcp_options_write(struct tcp
+@@ -669,16 +674,17 @@ static void tcp_options_write(struct tcp
  			tp->duplicate_sack : tp->selective_acks;
  		int this_sack;
  
@@ -451,7 +451,7 @@ SVN-Revision: 35130
  		}
  
  		tp->rx_opt.dsack = 0;
-@@ -683,13 +689,14 @@ static void tcp_options_write(struct tcp
+@@ -691,13 +697,14 @@ static void tcp_options_write(struct tcp
  
  		if (foc->exp) {
  			len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@@ -509,7 +509,7 @@ SVN-Revision: 35130
  #define IGMP_HOST_MEMBERSHIP_REPORT	0x12	/* Ditto */
 --- a/net/core/flow_dissector.c
 +++ b/net/core/flow_dissector.c
-@@ -131,7 +131,7 @@ __be32 __skb_flow_get_ports(const struct
+@@ -132,7 +132,7 @@ __be32 __skb_flow_get_ports(const struct
  		ports = __skb_header_pointer(skb, thoff + poff,
  					     sizeof(_ports), data, hlen, &_ports);
  		if (ports)
@@ -557,7 +557,7 @@ SVN-Revision: 35130
  static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey)
 --- a/net/sched/cls_u32.c
 +++ b/net/sched/cls_u32.c
-@@ -155,7 +155,7 @@ next_knode:
+@@ -157,7 +157,7 @@ next_knode:
  			data = skb_header_pointer(skb, toff, 4, &hdata);
  			if (!data)
  				goto out;
@@ -566,7 +566,7 @@ SVN-Revision: 35130
  				n = rcu_dereference_bh(n->next);
  				goto next_knode;
  			}
-@@ -206,8 +206,8 @@ check_terminal:
+@@ -208,8 +208,8 @@ check_terminal:
  						  &hdata);
  			if (!data)
  				goto out;
@@ -579,7 +579,7 @@ SVN-Revision: 35130
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -290,7 +290,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+@@ -273,7 +273,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
@@ -624,7 +624,7 @@ SVN-Revision: 35130
  
  /*
   * Jumbo payload option, as described in RFC 2675 2.
-@@ -615,8 +615,8 @@ static inline void __ipv6_addr_set_half(
+@@ -649,8 +649,8 @@ static inline void __ipv6_addr_set_half(
  	}
  #endif
  #endif
@@ -635,7 +635,7 @@ SVN-Revision: 35130
  }
  
  static inline void ipv6_addr_set(struct in6_addr *addr,
-@@ -675,6 +675,8 @@ static inline bool ipv6_prefix_equal(con
+@@ -709,6 +709,8 @@ static inline bool ipv6_prefix_equal(con
  	const __be32 *a1 = addr1->s6_addr32;
  	const __be32 *a2 = addr2->s6_addr32;
  	unsigned int pdw, pbi;
@@ -644,7 +644,7 @@ SVN-Revision: 35130
  
  	/* check complete u32 in prefix */
  	pdw = prefixlen >> 5;
-@@ -683,7 +685,9 @@ static inline bool ipv6_prefix_equal(con
+@@ -717,7 +719,9 @@ static inline bool ipv6_prefix_equal(con
  
  	/* check incomplete u32 in prefix */
  	pbi = prefixlen & 0x1f;
@@ -655,7 +655,7 @@ SVN-Revision: 35130
  		return false;
  
  	return true;
-@@ -805,13 +809,13 @@ static inline void ipv6_addr_set_v4mappe
+@@ -839,13 +843,13 @@ static inline void ipv6_addr_set_v4mappe
   */
  static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
  {
@@ -671,7 +671,7 @@ SVN-Revision: 35130
  		if (xb)
  			return i * 32 + 31 - __fls(ntohl(xb));
  	}
-@@ -1005,17 +1009,18 @@ static inline u32 ip6_multipath_hash_fie
+@@ -1040,17 +1044,18 @@ static inline u32 ip6_multipath_hash_fie
  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
  				__be32 flowlabel)
  {
@@ -716,7 +716,7 @@ SVN-Revision: 35130
  #define IP_TOS		1
 --- a/net/ipv6/ip6_fib.c
 +++ b/net/ipv6/ip6_fib.c
-@@ -142,7 +142,7 @@ static __be32 addr_bit_set(const void *t
+@@ -141,7 +141,7 @@ static __be32 addr_bit_set(const void *t
  	 * See include/asm-generic/bitops/le.h.
  	 */
  	return (__force __be32)(1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) &
@@ -751,7 +751,7 @@ SVN-Revision: 35130
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -4183,14 +4183,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -4188,14 +4188,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
@@ -858,7 +858,7 @@ SVN-Revision: 35130
  
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -62,7 +62,7 @@ static struct sk_buff *__tcpv4_gso_segme
+@@ -63,7 +63,7 @@ static struct sk_buff *__tcpv4_gso_segme
  	th2 = tcp_hdr(seg->next);
  	iph2 = ip_hdr(seg->next);
  
@@ -867,7 +867,7 @@ SVN-Revision: 35130
  	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
  		return segs;
  
-@@ -254,7 +254,7 @@ struct sk_buff *tcp_gro_lookup(struct li
+@@ -255,7 +255,7 @@ struct sk_buff *tcp_gro_lookup(struct li
  			continue;
  
  		th2 = tcp_hdr(p);
@@ -876,7 +876,7 @@ SVN-Revision: 35130
  			NAPI_GRO_CB(p)->same_flow = 0;
  			continue;
  		}
-@@ -320,8 +320,8 @@ struct sk_buff *tcp_gro_receive(struct l
+@@ -321,8 +321,8 @@ struct sk_buff *tcp_gro_receive(struct l
  		  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
  	flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
  	for (i = sizeof(*th); i < thlen; i += 4)
diff --git a/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
index 536d7abf6b..980f29eef1 100644
--- a/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
@@ -45,7 +45,7 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
 
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
-@@ -2209,6 +2209,14 @@ config RAVE_SP_CORE
+@@ -2261,6 +2261,14 @@ config RAVE_SP_CORE
  	  Select this to get support for the Supervisory Processor
  	  device found on several devices in RAVE line of hardware.
  
@@ -69,10 +69,10 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
 +obj-$(CONFIG_MFD_RB4XX_CPLD)	+= rb4xx-cpld.o
  obj-$(CONFIG_SGI_MFD_IOC3)	+= ioc3.o
  obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
- obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
+ obj-$(CONFIG_MFD_SMPRO)		+= smpro-core.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1594,6 +1594,12 @@ config GPIO_SODAVILLE
+@@ -1696,6 +1696,12 @@ config GPIO_SODAVILLE
  	help
  	  Say Y here to support Intel Sodaville GPIO.
  
@@ -87,7 +87,7 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
  menu "SPI GPIO expanders"
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -123,6 +123,7 @@ obj-$(CONFIG_GPIO_PL061)		+= gpio-pl061.
+@@ -131,6 +131,7 @@ obj-$(CONFIG_GPIO_PL061)		+= gpio-pl061.
  obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio-pmic-eic-sprd.o
  obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
  obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
@@ -97,7 +97,7 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
  obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
 --- a/drivers/mtd/nand/raw/Kconfig
 +++ b/drivers/mtd/nand/raw/Kconfig
-@@ -565,4 +565,11 @@ config MTD_NAND_AR934X
+@@ -551,4 +551,11 @@ config MTD_NAND_AR934X
  	  Enables support for NAND controller on Qualcomm Atheros SoCs.
  	  This controller is found on AR934x and QCA955x SoCs.
  
@@ -111,7 +111,7 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
  endif # MTD_RAW_NAND
 --- a/drivers/mtd/nand/raw/Makefile
 +++ b/drivers/mtd/nand/raw/Makefile
-@@ -60,6 +60,7 @@ obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rock
+@@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rock
  obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
  obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
  obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
diff --git a/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
index 677428fa65..e610a4ff14 100644
--- a/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
+++ b/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
@@ -29,7 +29,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
 
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -368,6 +368,12 @@ config GPIO_IXP4XX
+@@ -371,6 +371,12 @@ config GPIO_IXP4XX
  
  	  If unsure, say N.
  
@@ -42,7 +42,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  config GPIO_LOGICVC
  	tristate "Xylon LogiCVC GPIO support"
  	depends on MFD_SYSCON && OF
-@@ -544,6 +550,10 @@ config GPIO_ROCKCHIP
+@@ -553,6 +559,10 @@ config GPIO_ROCKCHIP
  	help
  	  Say yes here to support GPIO on Rockchip SoCs.
  
@@ -55,15 +55,15 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  	depends on MFD_SYSCON
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -76,6 +76,7 @@ obj-$(CONFIG_GPIO_IT87)			+= gpio-it87.o
- obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4xx.o
+@@ -81,6 +81,7 @@ obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4x
  obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
  obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
+ obj-$(CONFIG_GPIO_LATCH)		+= gpio-latch.o
 +obj-$(CONFIG_GPIO_LATCH_MIKROTIK)	+= gpio-latch-mikrotik.o
+ obj-$(CONFIG_GPIO_LJCA) 		+= gpio-ljca.o
  obj-$(CONFIG_GPIO_LOGICVC)		+= gpio-logicvc.o
  obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
- obj-$(CONFIG_GPIO_LOONGSON)		+= gpio-loongson.o
-@@ -124,6 +125,7 @@ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio
+@@ -132,6 +133,7 @@ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio
  obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
  obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
  obj-$(CONFIG_GPIO_RB4XX)		+= gpio-rb4xx.o
@@ -73,7 +73,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
 --- a/drivers/mtd/nand/raw/Kconfig
 +++ b/drivers/mtd/nand/raw/Kconfig
-@@ -572,4 +572,10 @@ config MTD_NAND_RB4XX
+@@ -558,4 +558,10 @@ config MTD_NAND_RB4XX
  	  Enables support for the NAND flash chip on Mikrotik Routerboard
  	  RB4xx series.
  
@@ -86,7 +86,7 @@ Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
  endif # MTD_RAW_NAND
 --- a/drivers/mtd/nand/raw/Makefile
 +++ b/drivers/mtd/nand/raw/Makefile
-@@ -61,6 +61,7 @@ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-n
+@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-n
  obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
  obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
  obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o



From lede-commits at lists.infradead.org  Thu May  9 14:58:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 17:58:48 -0400
Subject: [openwrt/openwrt]  ath79: restore kernel 6.1 config files and patches
In-Reply-To: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
References: <171529192505.1824548.6726855420028810455@git-01.infra.openwrt.org>
Message-ID: <mailman.35308.1715291936.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d123330aa93a2d09f7dff039a2351d947d4fd8f7

commit d123330aa93a2d09f7dff039a2351d947d4fd8f7
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Sat Mar 16 08:39:16 2024 +0800

    ath79: restore kernel 6.1 config files and patches
    
    Copy patches and kernel configs from kernel 6.6 to restore the
    default 6.1 kernel support files.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/config-6.1                      | 215 +++++
 ...-gpio-ath79-Convert-to-immutable-irq_chip.patch |  60 ++
 .../100-reset-ath79-read-back-reset-register.patch |  33 +
 ...-ath79-intc-add-irq-cascade-driver-for-QC.patch | 168 ++++
 ...irqchip-irq-ath79-cpu-drop-OF-init-helper.patch |  23 +
 ...bindings-PCI-qcom-ar7100-adds-binding-doc.patch |  57 ++
 .../311-MIPS-pci-ar71xx-convert-to-OF.patch        | 206 +++++
 ...bindings-PCI-qcom-ar7240-adds-binding-doc.patch |  61 ++
 .../313-MIPS-pci-ar724x-convert-to-OF.patch        | 213 +++++
 .../314-MIPS-ath79-remove-irq-code-from-pci.patch  | 149 ++++
 ...IPS-pci-ar724x-add-QCA9550-reset-sequence.patch | 130 +++
 ...MIPS-ath79-swizzle-pci-address-for-ar71xx.patch | 109 +++
 .../ath79/patches-6.1/330-missing-registers.patch  |  20 +
 ...-ath79-add-missing-QCA955x-GMAC-registers.patch |  90 ++
 .../ath79/patches-6.1/332-ath79-sgmii-config.patch |  30 +
 .../340-register_gpio_driver_earlier.patch         |  26 +
 .../patches-6.1/350-MIPS-ath79-ath9k-exports.patch |  36 +
 .../351-MIPS-ath79-common-exports.patch            |  26 +
 ...0-MIPS-ath79-export-UART1-reference-clock.patch |  67 ++
 .../370-MIPS-ath79-sanitize-symbols.patch          |  93 +++
 ...mtd-nor-support-mtd-name-from-device-tree.patch |  53 ++
 .../patches-6.1/410-mtd-cybertan-trx-parser.patch  |  45 +
 .../420-drivers-link-spi-before-mtd.patch          |  20 +
 .../patches-6.1/430-mtd-ar934x-nand-driver.patch   |  34 +
 .../patches-6.1/700-phy-add-ath79-usb-phys.patch   | 333 ++++++++
 .../701-usb-add-more-OF-quirk-properties.patch     |  24 +
 .../710-net-use-downstream-ag71xx.patch            |  42 +
 .../720-mdio_bitbang_ignore_ta_value.patch         |  44 +
 ...tbang-prevent-rescheduling-during-command.patch |  61 ++
 .../730-ar8216-make-reg-access-atomic.patch        |  59 ++
 ...00-leds-add-reset-controller-based-driver.patch | 186 +++++
 ...ore-the-abused-interrupt-map-on-pcie-node.patch |  33 +
 .../patches-6.1/900-unaligned_access_hacks.patch   | 909 +++++++++++++++++++++
 .../ath79/patches-6.1/910-mikrotik-rb4xx.patch     | 121 +++
 .../ath79/patches-6.1/911-mikrotik-rb91x.patch     |  96 +++
 35 files changed, 3872 insertions(+)

diff --git a/target/linux/ath79/config-6.1 b/target/linux/ath79/config-6.1
new file mode 100644
index 0000000000..87f520228f
--- /dev/null
+++ b/target/linux/ath79/config-6.1
@@ -0,0 +1,215 @@
+CONFIG_AG71XX=y
+# CONFIG_AG71XX_DEBUG is not set
+CONFIG_AG71XX_DEBUG_FS=y
+CONFIG_AR8216_PHY=y
+CONFIG_AR8216_PHY_LEDS=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_AT803X_PHY=y
+CONFIG_ATH79=y
+CONFIG_ATH79_WDT=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_MIPS32=y
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_74X164=y
+CONFIG_GPIO_ATH79=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+# CONFIG_GPIO_LATCH_MIKROTIK is not set
+# CONFIG_GPIO_RB91X_KEY is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_RESET is not set
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MDIO_GPIO=y
+CONFIG_MEMFD_CREATE=y
+# CONFIG_MFD_RB4XX_CPLD is not set
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_GEOMETRY=y
+# CONFIG_MTD_CFI_I2 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+CONFIG_MTD_PARSER_CYBERTAN=y
+# CONFIG_MTD_PARSER_TPLINK_SAFELOADER is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_ELF_FW=y
+CONFIG_MTD_SPLIT_LZMA_FW=y
+CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_TPLINK_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_SPLIT_WRGG_FW=y
+CONFIG_MTD_VIRT_CONCAT=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PCI=y
+CONFIG_PCI_AR71XX=y
+CONFIG_PCI_AR724X=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_AR7100_USB is not set
+# CONFIG_PHY_AR7200_USB is not set
+# CONFIG_PHY_ATH79_USB is not set
+CONFIG_PINCTRL=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QCOM_NET_PHYLIB=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_RESET_ATH79=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_SERIAL_8250_NR_UARTS=1
+CONFIG_SERIAL_8250_RUNTIME_UARTS=1
+CONFIG_SERIAL_AR933X=y
+CONFIG_SERIAL_AR933X_CONSOLE=y
+CONFIG_SERIAL_AR933X_NR_UARTS=2
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SPI=y
+CONFIG_SPI_AR934X=y
+CONFIG_SPI_ATH79=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_RB4XX is not set
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWCONFIG_LEDS=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ath79/patches-6.1/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch b/target/linux/ath79/patches-6.1/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
new file mode 100644
index 0000000000..942380fc7b
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/010-v6.4-gpio-ath79-Convert-to-immutable-irq_chip.patch
@@ -0,0 +1,60 @@
+From b11ce7e48121a02ceedec9f4dfcab4f2bee8f35f Mon Sep 17 00:00:00 2001
+From: Linus Walleij <linus.walleij at linaro.org>
+Date: Thu, 9 Mar 2023 08:45:54 +0100
+Subject: gpio: ath79: Convert to immutable irq_chip
+
+Convert the driver to immutable irq-chip with a bit of
+intuition.
+
+Cc: Marc Zyngier <maz at kernel.org>
+Acked-by: Marc Zyngier <maz at kernel.org>
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
+---
+ drivers/gpio/gpio-ath79.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpio/gpio-ath79.c
++++ b/drivers/gpio/gpio-ath79.c
+@@ -71,6 +71,7 @@ static void ath79_gpio_irq_unmask(struct
+ 	u32 mask = BIT(irqd_to_hwirq(data));
+ 	unsigned long flags;
+ 
++	gpiochip_enable_irq(&ctrl->gc, irqd_to_hwirq(data));
+ 	raw_spin_lock_irqsave(&ctrl->lock, flags);
+ 	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, mask);
+ 	raw_spin_unlock_irqrestore(&ctrl->lock, flags);
+@@ -85,6 +86,7 @@ static void ath79_gpio_irq_mask(struct i
+ 	raw_spin_lock_irqsave(&ctrl->lock, flags);
+ 	ath79_gpio_update_bits(ctrl, AR71XX_GPIO_REG_INT_MASK, mask, 0);
+ 	raw_spin_unlock_irqrestore(&ctrl->lock, flags);
++	gpiochip_disable_irq(&ctrl->gc, irqd_to_hwirq(data));
+ }
+ 
+ static void ath79_gpio_irq_enable(struct irq_data *data)
+@@ -169,13 +171,15 @@ static int ath79_gpio_irq_set_type(struc
+ 	return 0;
+ }
+ 
+-static struct irq_chip ath79_gpio_irqchip = {
++static const struct irq_chip ath79_gpio_irqchip = {
+ 	.name = "gpio-ath79",
+ 	.irq_enable = ath79_gpio_irq_enable,
+ 	.irq_disable = ath79_gpio_irq_disable,
+ 	.irq_mask = ath79_gpio_irq_mask,
+ 	.irq_unmask = ath79_gpio_irq_unmask,
+ 	.irq_set_type = ath79_gpio_irq_set_type,
++	.flags = IRQCHIP_IMMUTABLE,
++	GPIOCHIP_IRQ_RESOURCE_HELPERS,
+ };
+ 
+ static void ath79_gpio_irq_handler(struct irq_desc *desc)
+@@ -274,7 +278,7 @@ static int ath79_gpio_probe(struct platf
+ 	/* Optional interrupt setup */
+ 	if (!np || of_property_read_bool(np, "interrupt-controller")) {
+ 		girq = &ctrl->gc.irq;
+-		girq->chip = &ath79_gpio_irqchip;
++		gpio_irq_chip_set_chip(girq, &ath79_gpio_irqchip);
+ 		girq->parent_handler = ath79_gpio_irq_handler;
+ 		girq->num_parents = 1;
+ 		girq->parents = devm_kcalloc(dev, 1, sizeof(*girq->parents),
diff --git a/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch b/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch
new file mode 100644
index 0000000000..7aa501514d
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/100-reset-ath79-read-back-reset-register.patch
@@ -0,0 +1,33 @@
+From 661edfc3dab943a67c8821353b63cc23057f7ce9 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Tue, 9 Jan 2024 20:48:46 +0100
+Subject: [PATCH] reset: ath79: read back reset register
+
+Read back the reset register in order to flush the cache. This fixes
+spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
+DRAM chips.
+
+This issue was fixed in the past, but switching to the reset-driver
+specific implementation removed the old fix.
+
+Link: https://github.com/freifunk-gluon/gluon/issues/2904
+Link: https://github.com/openwrt/openwrt/issues/13043
+Link: https://dev.archive.openwrt.org/ticket/17839
+Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ drivers/reset/reset-ath79.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/reset/reset-ath79.c
++++ b/drivers/reset/reset-ath79.c
+@@ -37,6 +37,8 @@ static int ath79_reset_update(struct res
+ 	else
+ 		val &= ~BIT(id);
+ 	writel(val, ath79_reset->base);
++	/* Flush cache */
++	readl(ath79_reset->base);
+ 	spin_unlock_irqrestore(&ath79_reset->lock, flags);
+ 
+ 	return 0;
diff --git a/target/linux/ath79/patches-6.1/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch b/target/linux/ath79/patches-6.1/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
new file mode 100644
index 0000000000..ceda511c21
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
@@ -0,0 +1,168 @@
+From f3eacff2310a60348a755c50a8da6fc251fc8587 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Tue, 6 Mar 2018 09:55:13 +0100
+Subject: [PATCH 07/33] irqchip/irq-ath79-intc: add irq cascade driver for
+ QCA9556 SoCs
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/irqchip/Makefile         |   1 +
+ drivers/irqchip/irq-ath79-intc.c | 142 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 143 insertions(+)
+ create mode 100644 drivers/irqchip/irq-ath79-intc.c
+
+--- a/drivers/irqchip/Makefile
++++ b/drivers/irqchip/Makefile
+@@ -4,6 +4,7 @@ obj-$(CONFIG_IRQCHIP)			+= irqchip.o
+ obj-$(CONFIG_AL_FIC)			+= irq-al-fic.o
+ obj-$(CONFIG_ALPINE_MSI)		+= irq-alpine-msi.o
+ obj-$(CONFIG_ATH79)			+= irq-ath79-cpu.o
++obj-$(CONFIG_ATH79)			+= irq-ath79-intc.o
+ obj-$(CONFIG_ATH79)			+= irq-ath79-misc.o
+ obj-$(CONFIG_ARCH_BCM2835)		+= irq-bcm2835.o
+ obj-$(CONFIG_ARCH_BCM2835)		+= irq-bcm2836.o
+--- /dev/null
++++ b/drivers/irqchip/irq-ath79-intc.c
+@@ -0,0 +1,142 @@
++/*
++ *  Atheros AR71xx/AR724x/AR913x specific interrupt handling
++ *
++ *  Copyright (C) 2018 John Crispin <john at phrozen.org>
++ *
++ *  This program is free software; you can redistribute it and/or modify it
++ *  under the terms of the GNU General Public License version 2 as published
++ *  by the Free Software Foundation.
++ */
++
++#include <linux/interrupt.h>
++#include <linux/irqchip.h>
++#include <linux/of.h>
++#include <linux/of_irq.h>
++#include <linux/irqdomain.h>
++
++#include <asm/irq_cpu.h>
++#include <asm/mach-ath79/ath79.h>
++#include <asm/mach-ath79/ar71xx_regs.h>
++
++#define ATH79_MAX_INTC_CASCADE	3
++
++struct ath79_intc {
++	struct irq_chip chip;
++	u32 irq;
++	u32 pending_mask;
++	u32 int_status;
++	u32 irq_mask[ATH79_MAX_INTC_CASCADE];
++	u32 irq_wb_chan[ATH79_MAX_INTC_CASCADE];
++};
++
++static void ath79_intc_irq_handler(struct irq_desc *desc)
++{
++	struct irq_domain *domain = irq_desc_get_handler_data(desc);
++	struct ath79_intc *intc = domain->host_data;
++	u32 pending;
++
++	pending = ath79_reset_rr(intc->int_status);
++	pending &= intc->pending_mask;
++
++	if (pending) {
++		int i;
++
++		for (i = 0; i < domain->hwirq_max; i++)
++			if (pending & intc->irq_mask[i]) {
++				if (intc->irq_wb_chan[i] != 0xffffffff)
++					ath79_ddr_wb_flush(intc->irq_wb_chan[i]);
++				generic_handle_irq(irq_find_mapping(domain, i));
++			}
++	} else {
++		spurious_interrupt();
++	}
++}
++
++static void ath79_intc_irq_enable(struct irq_data *d)
++{
++	struct ath79_intc *intc = d->domain->host_data;
++	enable_irq(intc->irq);
++}
++
++static void ath79_intc_irq_disable(struct irq_data *d)
++{
++	struct ath79_intc *intc = d->domain->host_data;
++	disable_irq(intc->irq);
++}
++
++static int ath79_intc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
++{
++	struct ath79_intc *intc = d->host_data;
++
++	irq_set_chip_and_handler(irq, &intc->chip, handle_level_irq);
++
++	return 0;
++}
++
++static const struct irq_domain_ops ath79_irq_domain_ops = {
++	.xlate = irq_domain_xlate_onecell,
++	.map = ath79_intc_map,
++};
++
++static int __init ath79_intc_of_init(
++	struct device_node *node, struct device_node *parent)
++{
++	struct irq_domain *domain;
++	struct ath79_intc *intc;
++	int cnt, cntwb, i, err;
++
++	cnt = of_property_count_u32_elems(node, "qca,pending-bits");
++	if (cnt > ATH79_MAX_INTC_CASCADE)
++		panic("Too many INTC pending bits\n");
++
++	intc = kzalloc(sizeof(*intc), GFP_KERNEL);
++	if (!intc)
++		panic("Failed to allocate INTC memory\n");
++	intc->chip = dummy_irq_chip;
++	intc->chip.name = "INTC";
++	intc->chip.irq_disable = ath79_intc_irq_disable;
++	intc->chip.irq_enable = ath79_intc_irq_enable;
++
++	if (of_property_read_u32(node, "qca,int-status-addr", &intc->int_status) < 0) {
++		panic("Missing address of interrupt status register\n");
++	}
++
++	of_property_read_u32_array(node, "qca,pending-bits", intc->irq_mask, cnt);
++	for (i = 0; i < cnt; i++) {
++		intc->pending_mask |= intc->irq_mask[i];
++		intc->irq_wb_chan[i] = 0xffffffff;
++	}
++
++	cntwb = of_count_phandle_with_args(
++		node, "qca,ddr-wb-channels", "#qca,ddr-wb-channel-cells");
++
++	for (i = 0; i < cntwb; i++) {
++		struct of_phandle_args args;
++		u32 irq = i;
++
++		of_property_read_u32_index(
++			node, "qca,ddr-wb-channel-interrupts", i, &irq);
++		if (irq >= ATH79_MAX_INTC_CASCADE)
++			continue;
++
++		err = of_parse_phandle_with_args(
++			node, "qca,ddr-wb-channels",
++			"#qca,ddr-wb-channel-cells",
++			i, &args);
++		if (err)
++			return err;
++
++		intc->irq_wb_chan[irq] = args.args[0];
++	}
++
++	intc->irq = irq_of_parse_and_map(node, 0);
++	if (!intc->irq)
++		panic("Failed to get INTC IRQ");
++
++	domain = irq_domain_add_linear(node, cnt, &ath79_irq_domain_ops, intc);
++	irq_set_chained_handler_and_data(intc->irq, ath79_intc_irq_handler, domain);
++
++	return 0;
++}
++IRQCHIP_DECLARE(ath79_intc, "qca,ar9340-intc",
++		ath79_intc_of_init);
diff --git a/target/linux/ath79/patches-6.1/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch b/target/linux/ath79/patches-6.1/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
new file mode 100644
index 0000000000..13117d9a8e
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
@@ -0,0 +1,23 @@
+From e029f998594f151008ecbfa024e2957edd2a5189 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Tue, 6 Mar 2018 09:58:19 +0100
+Subject: [PATCH 08/33] irqchip/irq-ath79-cpu: drop !OF init helper
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/irqchip/irq-ath79-cpu.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/irqchip/irq-ath79-cpu.c
++++ b/drivers/irqchip/irq-ath79-cpu.c
+@@ -85,10 +85,3 @@ static int __init ar79_cpu_intc_of_init(
+ }
+ IRQCHIP_DECLARE(ar79_cpu_intc, "qca,ar7100-cpu-intc",
+ 		ar79_cpu_intc_of_init);
+-
+-void __init ath79_cpu_irq_init(unsigned irq_wb_chan2, unsigned irq_wb_chan3)
+-{
+-	irq_wb_chan[2] = irq_wb_chan2;
+-	irq_wb_chan[3] = irq_wb_chan3;
+-	mips_cpu_irq_init();
+-}
diff --git a/target/linux/ath79/patches-6.1/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch b/target/linux/ath79/patches-6.1/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
new file mode 100644
index 0000000000..cf0a75c791
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
@@ -0,0 +1,57 @@
+From 4a4f869ec58ed8910b9b2e68d0eee50957e9bb20 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Mon, 25 Jun 2018 15:52:10 +0200
+Subject: [PATCH 17/33] dt-bindings: PCI: qcom,ar7100: adds binding doc
+
+With the driver being converted from platform_data to pure OF, we need to
+also add some docs.
+
+Cc: Rob Herring <robh+dt at kernel.org>
+Cc: devicetree at vger.kernel.org
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ .../devicetree/bindings/pci/qcom,ar7100-pci.txt    | 38 ++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
+
+--- /dev/null
++++ b/Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
+@@ -0,0 +1,38 @@
++* Qualcomm Atheros AR7100 PCI express root complex
++
++Required properties:
++- compatible: should contain "qcom,ar7100-pci" to identify the core.
++- reg: Should contain the register ranges as listed in the reg-names property.
++- reg-names: Definition: Must include the following entries
++	- "cfg_base"	IO Memory
++- #address-cells: set to <3>
++- #size-cells: set to <2>
++- ranges: ranges for the PCI memory and I/O regions
++- interrupt-map-mask and interrupt-map: standard PCI
++	properties to define the mapping of the PCIe interface to interrupt
++	numbers.
++- #interrupt-cells: set to <1>
++- interrupt-controller: define to enable the builtin IRQ cascade.
++
++Optional properties:
++- interrupt-parent: phandle to the MIPS IRQ controller
++
++* Example for ar7100
++	pcie at 180c0000 {
++		compatible = "qca,ar7100-pci";
++		#address-cells = <3>;
++		#size-cells = <2>;
++		bus-range = <0x0 0x0>;
++		reg = <0x17010000 0x100>;
++		reg-names = "cfg_base";
++		ranges = <0x2000000 0 0x10000000 0x10000000 0 0x07000000
++			  0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
++		interrupt-parent = <&cpuintc>;
++		interrupts = <2>;
++
++		interrupt-controller;
++		#interrupt-cells = <1>;
++
++		interrupt-map-mask = <0 0 0 1>;
++		interrupt-map = <0 0 0 0 &pcie0 0>;
++	};
diff --git a/target/linux/ath79/patches-6.1/311-MIPS-pci-ar71xx-convert-to-OF.patch b/target/linux/ath79/patches-6.1/311-MIPS-pci-ar71xx-convert-to-OF.patch
new file mode 100644
index 0000000000..9a315aed0b
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/311-MIPS-pci-ar71xx-convert-to-OF.patch
@@ -0,0 +1,206 @@
+From 1855ab6b1d27f5b38a648baf57ff6a534afec26d Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Sat, 23 Jun 2018 15:07:23 +0200
+Subject: [PATCH 18/33] MIPS: pci-ar71xx: convert to OF
+
+With the ath79 target getting converted to pure OF, we can drop all the
+platform data code and add the missing OF bits to the driver. We also add
+a irq domain for the PCI/e controllers cascade, thus making it usable from
+dts files.
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ arch/mips/pci/pci-ar71xx.c | 82 +++++++++++++++++++++++-----------------------
+ 1 file changed, 41 insertions(+), 41 deletions(-)
+
+--- a/arch/mips/pci/pci-ar71xx.c
++++ b/arch/mips/pci/pci-ar71xx.c
+@@ -15,8 +15,11 @@
+ #include <linux/pci.h>
+ #include <linux/pci_regs.h>
+ #include <linux/interrupt.h>
++#include <linux/irqchip/chained_irq.h>
+ #include <linux/init.h>
+ #include <linux/platform_device.h>
++#include <linux/of_irq.h>
++#include <linux/of_pci.h>
+ 
+ #include <asm/mach-ath79/ar71xx_regs.h>
+ #include <asm/mach-ath79/ath79.h>
+@@ -46,12 +49,13 @@
+ #define AR71XX_PCI_IRQ_COUNT		5
+ 
+ struct ar71xx_pci_controller {
++	struct device_node *np;
+ 	void __iomem *cfg_base;
+ 	int irq;
+-	int irq_base;
+ 	struct pci_controller pci_ctrl;
+ 	struct resource io_res;
+ 	struct resource mem_res;
++	struct irq_domain *domain;
+ };
+ 
+ /* Byte lane enable bits */
+@@ -225,29 +229,30 @@ static struct pci_ops ar71xx_pci_ops = {
+ 
+ static void ar71xx_pci_irq_handler(struct irq_desc *desc)
+ {
+-	struct ar71xx_pci_controller *apc;
+ 	void __iomem *base = ath79_reset_base;
++	struct irq_chip *chip = irq_desc_get_chip(desc);
++	struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
+ 	u32 pending;
+ 
+-	apc = irq_desc_get_handler_data(desc);
+-
++	chained_irq_enter(chip, desc);
+ 	pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
+ 		  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+ 
+ 	if (pending & AR71XX_PCI_INT_DEV0)
+-		generic_handle_irq(apc->irq_base + 0);
++		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
+ 
+ 	else if (pending & AR71XX_PCI_INT_DEV1)
+-		generic_handle_irq(apc->irq_base + 1);
++		generic_handle_irq(irq_linear_revmap(apc->domain, 2));
+ 
+ 	else if (pending & AR71XX_PCI_INT_DEV2)
+-		generic_handle_irq(apc->irq_base + 2);
++		generic_handle_irq(irq_linear_revmap(apc->domain, 3));
+ 
+ 	else if (pending & AR71XX_PCI_INT_CORE)
+-		generic_handle_irq(apc->irq_base + 4);
++		generic_handle_irq(irq_linear_revmap(apc->domain, 4));
+ 
+ 	else
+ 		spurious_interrupt();
++	chained_irq_exit(chip, desc);
+ }
+ 
+ static void ar71xx_pci_irq_unmask(struct irq_data *d)
+@@ -258,7 +263,7 @@ static void ar71xx_pci_irq_unmask(struct
+ 	u32 t;
+ 
+ 	apc = irq_data_get_irq_chip_data(d);
+-	irq = d->irq - apc->irq_base;
++	irq = irq_linear_revmap(apc->domain, d->irq);
+ 
+ 	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+ 	__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+@@ -275,7 +280,7 @@ static void ar71xx_pci_irq_mask(struct i
+ 	u32 t;
+ 
+ 	apc = irq_data_get_irq_chip_data(d);
+-	irq = d->irq - apc->irq_base;
++	irq = irq_linear_revmap(apc->domain, d->irq);
+ 
+ 	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+ 	__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+@@ -291,24 +296,31 @@ static struct irq_chip ar71xx_pci_irq_ch
+ 	.irq_mask_ack	= ar71xx_pci_irq_mask,
+ };
+ 
++static int ar71xx_pci_irq_map(struct irq_domain *d,
++			      unsigned int irq, irq_hw_number_t hw)
++{
++	struct ar71xx_pci_controller *apc = d->host_data;
++
++	irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
++	irq_set_chip_data(irq, apc);
++
++	return 0;
++}
++
++static const struct irq_domain_ops ar71xx_pci_domain_ops = {
++	.xlate = irq_domain_xlate_onecell,
++	.map = ar71xx_pci_irq_map,
++};
++
+ static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
+ {
+ 	void __iomem *base = ath79_reset_base;
+-	int i;
+ 
+ 	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+ 	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
+ 
+-	BUILD_BUG_ON(ATH79_PCI_IRQ_COUNT < AR71XX_PCI_IRQ_COUNT);
+-
+-	apc->irq_base = ATH79_PCI_IRQ_BASE;
+-	for (i = apc->irq_base;
+-	     i < apc->irq_base + AR71XX_PCI_IRQ_COUNT; i++) {
+-		irq_set_chip_and_handler(i, &ar71xx_pci_irq_chip,
+-					 handle_level_irq);
+-		irq_set_chip_data(i, apc);
+-	}
+-
++	apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
++					    &ar71xx_pci_domain_ops, apc);
+ 	irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
+ 					 apc);
+ }
+@@ -325,10 +337,14 @@ static void ar71xx_pci_reset(void)
+ 	mdelay(100);
+ }
+ 
++static const struct of_device_id ar71xx_pci_ids[] = {
++	{ .compatible = "qca,ar7100-pci" },
++	{},
++};
++
+ static int ar71xx_pci_probe(struct platform_device *pdev)
+ {
+ 	struct ar71xx_pci_controller *apc;
+-	struct resource *res;
+ 	u32 t;
+ 
+ 	apc = devm_kzalloc(&pdev->dev, sizeof(struct ar71xx_pci_controller),
+@@ -345,26 +361,6 @@ static int ar71xx_pci_probe(struct platf
+ 	if (apc->irq < 0)
+ 		return -EINVAL;
+ 
+-	res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
+-	if (!res)
+-		return -EINVAL;
+-
+-	apc->io_res.parent = res;
+-	apc->io_res.name = "PCI IO space";
+-	apc->io_res.start = res->start;
+-	apc->io_res.end = res->end;
+-	apc->io_res.flags = IORESOURCE_IO;
+-
+-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
+-	if (!res)
+-		return -EINVAL;
+-
+-	apc->mem_res.parent = res;
+-	apc->mem_res.name = "PCI memory space";
+-	apc->mem_res.start = res->start;
+-	apc->mem_res.end = res->end;
+-	apc->mem_res.flags = IORESOURCE_MEM;
+-
+ 	ar71xx_pci_reset();
+ 
+ 	/* setup COMMAND register */
+@@ -377,9 +373,11 @@ static int ar71xx_pci_probe(struct platf
+ 
+ 	ar71xx_pci_irq_init(apc);
+ 
++	apc->np = pdev->dev.of_node;
+ 	apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
+ 	apc->pci_ctrl.mem_resource = &apc->mem_res;
+ 	apc->pci_ctrl.io_resource = &apc->io_res;
++	pci_load_of_ranges(&apc->pci_ctrl, pdev->dev.of_node);
+ 
+ 	register_pci_controller(&apc->pci_ctrl);
+ 
+@@ -390,6 +388,7 @@ static struct platform_driver ar71xx_pci
+ 	.probe = ar71xx_pci_probe,
+ 	.driver = {
+ 		.name = "ar71xx-pci",
++		.of_match_table = of_match_ptr(ar71xx_pci_ids),
+ 	},
+ };
+ 
diff --git a/target/linux/ath79/patches-6.1/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch b/target/linux/ath79/patches-6.1/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
new file mode 100644
index 0000000000..a32c9bdcde
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
@@ -0,0 +1,61 @@
+From ea27764bc3ef2a05decf3ae05edffc289cd0d93c Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Mon, 25 Jun 2018 15:52:02 +0200
+Subject: [PATCH 19/33] dt-bindings: PCI: qcom,ar7240: adds binding doc
+
+With the driver being converted from platform_data to pure OF, we need to
+also add some docs.
+
+Cc: Rob Herring <robh+dt at kernel.org>
+Cc: devicetree at vger.kernel.org
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ .../devicetree/bindings/pci/qcom,ar7240-pci.txt    | 42 ++++++++++++++++++++++
+ 1 file changed, 42 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
+
+--- /dev/null
++++ b/Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
+@@ -0,0 +1,42 @@
++* Qualcomm Atheros AR724X PCI express root complex
++
++Required properties:
++- compatible: should contain "qcom,ar7240-pci" to identify the core.
++- reg: Should contain the register ranges as listed in the reg-names property.
++- reg-names: Definition: Must include the following entries
++	- "crp_base"	Configuration registers
++	- "ctrl_base"	Control registers
++	- "cfg_base"	IO Memory
++- #address-cells: set to <3>
++- #size-cells: set to <2>
++- ranges: ranges for the PCI memory and I/O regions
++- interrupt-map-mask and interrupt-map: standard PCI
++	properties to define the mapping of the PCIe interface to interrupt
++	numbers.
++- #interrupt-cells: set to <1>
++- interrupt-parent: phandle to the MIPS IRQ controller
++
++Optional properties:
++- interrupt-controller: define to enable the builtin IRQ cascade.
++
++* Example for qca9557
++	pcie at 180c0000 {
++		compatible = "qcom,ar7240-pci";
++		#address-cells = <3>;
++		#size-cells = <2>;
++		bus-range = <0x0 0x0>;
++		reg = <0x180c0000 0x1000>,
++		      <0x180f0000 0x100>,
++		      <0x14000000 0x1000>;
++		reg-names = "crp_base", "ctrl_base", "cfg_base";
++		ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000
++			  0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
++		interrupt-parent = <&intc2>;
++		interrupts = <1>;
++
++		interrupt-controller;
++		#interrupt-cells = <1>;
++
++		interrupt-map-mask = <0 0 0 1>;
++		interrupt-map = <0 0 0 0 &pcie0 0>;
++	};
diff --git a/target/linux/ath79/patches-6.1/313-MIPS-pci-ar724x-convert-to-OF.patch b/target/linux/ath79/patches-6.1/313-MIPS-pci-ar724x-convert-to-OF.patch
new file mode 100644
index 0000000000..7927c1cbf5
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/313-MIPS-pci-ar724x-convert-to-OF.patch
@@ -0,0 +1,213 @@
+From a522ee0199d5d3ea114ca2e211f6ac398d3e8e0b Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Sat, 23 Jun 2018 15:07:37 +0200
+Subject: [PATCH 20/33] MIPS: pci-ar724x: convert to OF
+
+With the ath79 target getting converted to pure OF, we can drop all the
+platform data code and add the missing OF bits to the driver. We also add
+a irq domain for the PCI/e controllers cascade, thus making it usable from
+dts files.
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ arch/mips/pci/pci-ar724x.c | 88 ++++++++++++++++++++++------------------------
+ 1 file changed, 42 insertions(+), 46 deletions(-)
+
+--- a/arch/mips/pci/pci-ar724x.c
++++ b/arch/mips/pci/pci-ar724x.c
+@@ -11,8 +11,11 @@
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/platform_device.h>
++#include <linux/irqchip/chained_irq.h>
+ #include <asm/mach-ath79/ath79.h>
+ #include <asm/mach-ath79/ar71xx_regs.h>
++#include <linux/of_irq.h>
++#include <linux/of_pci.h>
+ 
+ #define AR724X_PCI_REG_APP		0x00
+ #define AR724X_PCI_REG_RESET		0x18
+@@ -42,17 +45,20 @@ struct ar724x_pci_controller {
+ 	void __iomem *crp_base;
+ 
+ 	int irq;
+-	int irq_base;
+ 
+ 	bool link_up;
+ 	bool bar0_is_cached;
+ 	u32  bar0_value;
+ 
++	struct device_node *np;
+ 	struct pci_controller pci_controller;
++	struct irq_domain *domain;
+ 	struct resource io_res;
+ 	struct resource mem_res;
+ };
+ 
++static struct irq_chip ar724x_pci_irq_chip;
++
+ static inline bool ar724x_pci_check_link(struct ar724x_pci_controller *apc)
+ {
+ 	u32 reset;
+@@ -228,35 +234,31 @@ static struct pci_ops ar724x_pci_ops = {
+ 
+ static void ar724x_pci_irq_handler(struct irq_desc *desc)
+ {
+-	struct ar724x_pci_controller *apc;
+-	void __iomem *base;
++	struct irq_chip *chip = irq_desc_get_chip(desc);
++	struct ar724x_pci_controller *apc = irq_desc_get_handler_data(desc);
+ 	u32 pending;
+ 
+-	apc = irq_desc_get_handler_data(desc);
+-	base = apc->ctrl_base;
+-
+-	pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
+-		  __raw_readl(base + AR724X_PCI_REG_INT_MASK);
++	chained_irq_enter(chip, desc);
++	pending = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_STATUS) &
++		  __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_MASK);
+ 
+ 	if (pending & AR724X_PCI_INT_DEV0)
+-		generic_handle_irq(apc->irq_base + 0);
+-
++		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
+ 	else
+ 		spurious_interrupt();
++	chained_irq_exit(chip, desc);
+ }
+ 
+ static void ar724x_pci_irq_unmask(struct irq_data *d)
+ {
+ 	struct ar724x_pci_controller *apc;
+ 	void __iomem *base;
+-	int offset;
+ 	u32 t;
+ 
+ 	apc = irq_data_get_irq_chip_data(d);
+ 	base = apc->ctrl_base;
+-	offset = apc->irq_base - d->irq;
+ 
+-	switch (offset) {
++	switch (irq_linear_revmap(apc->domain, d->irq)) {
+ 	case 0:
+ 		t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
+ 		__raw_writel(t | AR724X_PCI_INT_DEV0,
+@@ -270,14 +272,12 @@ static void ar724x_pci_irq_mask(struct i
+ {
+ 	struct ar724x_pci_controller *apc;
+ 	void __iomem *base;
+-	int offset;
+ 	u32 t;
+ 
+ 	apc = irq_data_get_irq_chip_data(d);
+ 	base = apc->ctrl_base;
+-	offset = apc->irq_base - d->irq;
+ 
+-	switch (offset) {
++	switch (irq_linear_revmap(apc->domain, d->irq)) {
+ 	case 0:
+ 		t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
+ 		__raw_writel(t & ~AR724X_PCI_INT_DEV0,
+@@ -302,26 +302,34 @@ static struct irq_chip ar724x_pci_irq_ch
+ 	.irq_mask_ack	= ar724x_pci_irq_mask,
+ };
+ 
++static int ar724x_pci_irq_map(struct irq_domain *d,
++			      unsigned int irq, irq_hw_number_t hw)
++{
++	struct ar724x_pci_controller *apc = d->host_data;
++
++	irq_set_chip_and_handler(irq, &ar724x_pci_irq_chip, handle_level_irq);
++	irq_set_chip_data(irq, apc);
++
++	return 0;
++}
++
++static const struct irq_domain_ops ar724x_pci_domain_ops = {
++	.xlate = irq_domain_xlate_onecell,
++	.map = ar724x_pci_irq_map,
++};
++
+ static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc,
+ 				int id)
+ {
+ 	void __iomem *base;
+-	int i;
+ 
+ 	base = apc->ctrl_base;
+ 
+ 	__raw_writel(0, base + AR724X_PCI_REG_INT_MASK);
+ 	__raw_writel(0, base + AR724X_PCI_REG_INT_STATUS);
+ 
+-	apc->irq_base = ATH79_PCI_IRQ_BASE + (id * AR724X_PCI_IRQ_COUNT);
+-
+-	for (i = apc->irq_base;
+-	     i < apc->irq_base + AR724X_PCI_IRQ_COUNT; i++) {
+-		irq_set_chip_and_handler(i, &ar724x_pci_irq_chip,
+-					 handle_level_irq);
+-		irq_set_chip_data(i, apc);
+-	}
+-
++	apc->domain = irq_domain_add_linear(apc->np, 2,
++					    &ar724x_pci_domain_ops, apc);
+ 	irq_set_chained_handler_and_data(apc->irq, ar724x_pci_irq_handler,
+ 					 apc);
+ }
+@@ -360,7 +368,6 @@ static void ar724x_pci_hw_init(struct ar
+ static int ar724x_pci_probe(struct platform_device *pdev)
+ {
+ 	struct ar724x_pci_controller *apc;
+-	struct resource *res;
+ 	int id;
+ 
+ 	id = pdev->id;
+@@ -388,29 +395,11 @@ static int ar724x_pci_probe(struct platf
+ 	if (apc->irq < 0)
+ 		return -EINVAL;
+ 
+-	res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
+-	if (!res)
+-		return -EINVAL;
+-
+-	apc->io_res.parent = res;
+-	apc->io_res.name = "PCI IO space";
+-	apc->io_res.start = res->start;
+-	apc->io_res.end = res->end;
+-	apc->io_res.flags = IORESOURCE_IO;
+-
+-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
+-	if (!res)
+-		return -EINVAL;
+-
+-	apc->mem_res.parent = res;
+-	apc->mem_res.name = "PCI memory space";
+-	apc->mem_res.start = res->start;
+-	apc->mem_res.end = res->end;
+-	apc->mem_res.flags = IORESOURCE_MEM;
+-
++	apc->np = pdev->dev.of_node;
+ 	apc->pci_controller.pci_ops = &ar724x_pci_ops;
+ 	apc->pci_controller.io_resource = &apc->io_res;
+ 	apc->pci_controller.mem_resource = &apc->mem_res;
++	pci_load_of_ranges(&apc->pci_controller, pdev->dev.of_node);
+ 
+ 	/*
+ 	 * Do the full PCIE Root Complex Initialization Sequence if the PCIe
+@@ -432,10 +421,16 @@ static int ar724x_pci_probe(struct platf
+ 	return 0;
+ }
+ 
++static const struct of_device_id ar724x_pci_ids[] = {
++	{ .compatible = "qcom,ar7240-pci" },
++	{},
++};
++
+ static struct platform_driver ar724x_pci_driver = {
+ 	.probe = ar724x_pci_probe,
+ 	.driver = {
+ 		.name = "ar724x-pci",
++		.of_match_table = of_match_ptr(ar724x_pci_ids),
+ 	},
+ };
+ 
diff --git a/target/linux/ath79/patches-6.1/314-MIPS-ath79-remove-irq-code-from-pci.patch b/target/linux/ath79/patches-6.1/314-MIPS-ath79-remove-irq-code-from-pci.patch
new file mode 100644
index 0000000000..01549eec68
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/314-MIPS-ath79-remove-irq-code-from-pci.patch
@@ -0,0 +1,149 @@
+From: John Crispin <john at phrozen.org>
+Subject: ath79: fix remove irq code from pci driver patch
+
+This patch got mangled in the void while rebasing it.
+
+Submitted-by: John Crispin <john at phrozen.org>
+---
+ arch/mips/pci/pci-ar71xx.c                    | 107 ------------------
+ 1 file changed, 141 deletions(-)
+
+--- a/arch/mips/pci/pci-ar71xx.c
++++ b/arch/mips/pci/pci-ar71xx.c
+@@ -51,11 +51,9 @@
+ struct ar71xx_pci_controller {
+ 	struct device_node *np;
+ 	void __iomem *cfg_base;
+-	int irq;
+ 	struct pci_controller pci_ctrl;
+ 	struct resource io_res;
+ 	struct resource mem_res;
+-	struct irq_domain *domain;
+ };
+ 
+ /* Byte lane enable bits */
+@@ -227,104 +225,6 @@ static struct pci_ops ar71xx_pci_ops = {
+ 	.write	= ar71xx_pci_write_config,
+ };
+ 
+-static void ar71xx_pci_irq_handler(struct irq_desc *desc)
+-{
+-	void __iomem *base = ath79_reset_base;
+-	struct irq_chip *chip = irq_desc_get_chip(desc);
+-	struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
+-	u32 pending;
+-
+-	chained_irq_enter(chip, desc);
+-	pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
+-		  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-
+-	if (pending & AR71XX_PCI_INT_DEV0)
+-		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
+-
+-	else if (pending & AR71XX_PCI_INT_DEV1)
+-		generic_handle_irq(irq_linear_revmap(apc->domain, 2));
+-
+-	else if (pending & AR71XX_PCI_INT_DEV2)
+-		generic_handle_irq(irq_linear_revmap(apc->domain, 3));
+-
+-	else if (pending & AR71XX_PCI_INT_CORE)
+-		generic_handle_irq(irq_linear_revmap(apc->domain, 4));
+-
+-	else
+-		spurious_interrupt();
+-	chained_irq_exit(chip, desc);
+-}
+-
+-static void ar71xx_pci_irq_unmask(struct irq_data *d)
+-{
+-	struct ar71xx_pci_controller *apc;
+-	unsigned int irq;
+-	void __iomem *base = ath79_reset_base;
+-	u32 t;
+-
+-	apc = irq_data_get_irq_chip_data(d);
+-	irq = irq_linear_revmap(apc->domain, d->irq);
+-
+-	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-	__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-
+-	/* flush write */
+-	__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-}
+-
+-static void ar71xx_pci_irq_mask(struct irq_data *d)
+-{
+-	struct ar71xx_pci_controller *apc;
+-	unsigned int irq;
+-	void __iomem *base = ath79_reset_base;
+-	u32 t;
+-
+-	apc = irq_data_get_irq_chip_data(d);
+-	irq = irq_linear_revmap(apc->domain, d->irq);
+-
+-	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-	__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-
+-	/* flush write */
+-	__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-}
+-
+-static struct irq_chip ar71xx_pci_irq_chip = {
+-	.name		= "AR71XX PCI",
+-	.irq_mask	= ar71xx_pci_irq_mask,
+-	.irq_unmask	= ar71xx_pci_irq_unmask,
+-	.irq_mask_ack	= ar71xx_pci_irq_mask,
+-};
+-
+-static int ar71xx_pci_irq_map(struct irq_domain *d,
+-			      unsigned int irq, irq_hw_number_t hw)
+-{
+-	struct ar71xx_pci_controller *apc = d->host_data;
+-
+-	irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
+-	irq_set_chip_data(irq, apc);
+-
+-	return 0;
+-}
+-
+-static const struct irq_domain_ops ar71xx_pci_domain_ops = {
+-	.xlate = irq_domain_xlate_onecell,
+-	.map = ar71xx_pci_irq_map,
+-};
+-
+-static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
+-{
+-	void __iomem *base = ath79_reset_base;
+-
+-	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
+-	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
+-
+-	apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
+-					    &ar71xx_pci_domain_ops, apc);
+-	irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
+-					 apc);
+-}
+-
+ static void ar71xx_pci_reset(void)
+ {
+ 	ath79_device_reset_set(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
+@@ -357,10 +257,6 @@ static int ar71xx_pci_probe(struct platf
+ 	if (IS_ERR(apc->cfg_base))
+ 		return PTR_ERR(apc->cfg_base);
+ 
+-	apc->irq = platform_get_irq(pdev, 0);
+-	if (apc->irq < 0)
+-		return -EINVAL;
+-
+ 	ar71xx_pci_reset();
+ 
+ 	/* setup COMMAND register */
+@@ -371,8 +267,6 @@ static int ar71xx_pci_probe(struct platf
+ 	/* clear bus errors */
+ 	ar71xx_pci_check_error(apc, 1);
+ 
+-	ar71xx_pci_irq_init(apc);
+-
+ 	apc->np = pdev->dev.of_node;
+ 	apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
+ 	apc->pci_ctrl.mem_resource = &apc->mem_res;
diff --git a/target/linux/ath79/patches-6.1/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch b/target/linux/ath79/patches-6.1/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
new file mode 100644
index 0000000000..375dec8ba2
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
@@ -0,0 +1,130 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Sat, 11 Apr 2020 14:03:12 +0200
+Subject: MIPS: pci-ar724x: add QCA9550 reset sequence
+
+The QCA9550 family of SoCs have a slightly different reset
+sequence compared to older chips.
+
+Normally the bootloader performs this sequence, however
+some bootloader implementation expect the operating system
+to clear the reset.
+
+Also get the resets from OF to support handling of the second
+PCIe root-complex on the QCA9558.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -390,6 +390,7 @@
+ #define QCA955X_PLL_CPU_CONFIG_REG		0x00
+ #define QCA955X_PLL_DDR_CONFIG_REG		0x04
+ #define QCA955X_PLL_CLK_CTRL_REG		0x08
++#define QCA955X_PLL_PCIE_CONFIG_REG		0x0c
+ #define QCA955X_PLL_ETH_XMII_CONTROL_REG	0x28
+ #define QCA955X_PLL_ETH_SGMII_CONTROL_REG	0x48
+ #define QCA955X_PLL_ETH_SGMII_SERDES_REG	0x4c
+@@ -475,6 +476,9 @@
+ #define QCA956X_PLL_CLK_CTRL_CPU_DDRCLK_FROM_CPUPLL	BIT(21)
+ #define QCA956X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL		BIT(24)
+ 
++#define QCA955X_PLL_PCIE_CONFIG_PLL_PWD			BIT(30)
++#define QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS		BIT(16)
++
+ #define QCA956X_PLL_SWITCH_CLOCK_SPARE_I2C_CLK_SELB		BIT(5)
+ #define QCA956X_PLL_SWITCH_CLOCK_SPARE_MDIO_CLK_SEL0_1		BIT(6)
+ #define QCA956X_PLL_SWITCH_CLOCK_SPARE_UART1_CLK_SEL		BIT(7)
+--- a/arch/mips/pci/pci-ar724x.c
++++ b/arch/mips/pci/pci-ar724x.c
+@@ -8,6 +8,7 @@
+ 
+ #include <linux/irq.h>
+ #include <linux/pci.h>
++#include <linux/reset.h>
+ #include <linux/init.h>
+ #include <linux/delay.h>
+ #include <linux/platform_device.h>
+@@ -55,6 +56,9 @@ struct ar724x_pci_controller {
+ 	struct irq_domain *domain;
+ 	struct resource io_res;
+ 	struct resource mem_res;
++
++	struct reset_control *hc_reset;
++	struct reset_control *phy_reset;
+ };
+ 
+ static struct irq_chip ar724x_pci_irq_chip;
+@@ -340,18 +344,30 @@ static void ar724x_pci_hw_init(struct ar
+ 	int wait = 0;
+ 
+ 	/* deassert PCIe host controller and PCIe PHY reset */
+-	ath79_device_reset_clear(AR724X_RESET_PCIE);
+-	ath79_device_reset_clear(AR724X_RESET_PCIE_PHY);
++	reset_control_deassert(apc->hc_reset);
++	reset_control_deassert(apc->phy_reset);
+ 
+-	/* remove the reset of the PCIE PLL */
+-	ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
+-	ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
+-	ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
+-
+-	/* deassert bypass for the PCIE PLL */
+-	ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
+-	ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
+-	ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
++	if (of_device_is_compatible(apc->np, "qcom,qca9550-pci")) {
++		/* remove the reset of the PCIE PLL */
++		ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
++		ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_PWD;
++		ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
++
++		/* deassert bypass for the PCIE PLL */
++		ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
++		ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS;
++		ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
++	} else {
++		/* remove the reset of the PCIE PLL */
++		ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
++		ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
++		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
++
++		/* deassert bypass for the PCIE PLL */
++		ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
++		ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
++		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
++	}
+ 
+ 	/* set PCIE Application Control to ready */
+ 	app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP);
+@@ -395,6 +411,14 @@ static int ar724x_pci_probe(struct platf
+ 	if (apc->irq < 0)
+ 		return -EINVAL;
+ 
++	apc->hc_reset = devm_reset_control_get_exclusive(&pdev->dev, "hc");
++	if (IS_ERR(apc->hc_reset))
++		return PTR_ERR(apc->hc_reset);
++
++	apc->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, "phy");
++	if (IS_ERR(apc->phy_reset))
++		return PTR_ERR(apc->phy_reset);
++
+ 	apc->np = pdev->dev.of_node;
+ 	apc->pci_controller.pci_ops = &ar724x_pci_ops;
+ 	apc->pci_controller.io_resource = &apc->io_res;
+@@ -405,7 +429,7 @@ static int ar724x_pci_probe(struct platf
+ 	 * Do the full PCIE Root Complex Initialization Sequence if the PCIe
+ 	 * host controller is in reset.
+ 	 */
+-	if (ath79_reset_rr(AR724X_RESET_REG_RESET_MODULE) & AR724X_RESET_PCIE)
++	if (reset_control_status(apc->hc_reset))
+ 		ar724x_pci_hw_init(apc);
+ 
+ 	apc->link_up = ar724x_pci_check_link(apc);
+@@ -423,6 +447,7 @@ static int ar724x_pci_probe(struct platf
+ 
+ static const struct of_device_id ar724x_pci_ids[] = {
+ 	{ .compatible = "qcom,ar7240-pci" },
++	{ .compatible = "qcom,qca9550-pci" },
+ 	{},
+ };
+ 
diff --git a/target/linux/ath79/patches-6.1/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch b/target/linux/ath79/patches-6.1/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
new file mode 100644
index 0000000000..1e2715b84c
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
@@ -0,0 +1,109 @@
+From: Gabor Juhos <juhosg at openwrt.org>
+Subject: [PATCH] ar71xx: swizzle address for PCI byte/word access on AR71xx
+
+Closes #11683.
+
+SVN-Revision: 32639
+---
+ .../mips/include/asm/mach-ath79/mangle-port.h | 111 ++++++++++++++++++
+ 1 file changed, 111 insertions(+)
+ create mode 100644 arch/mips/include/asm/mach-ath79/mangle-port.h
+
+--- /dev/null
++++ b/arch/mips/include/asm/mach-ath79/mangle-port.h
+@@ -0,0 +1,37 @@
++/*
++ *  Copyright (C) 2012 Gabor Juhos <juhosg at openwrt.org>
++ *
++ *  This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
++ *      Copyright (C) 2003, 2004 Ralf Baechle
++ *
++ *  This program is free software; you can redistribute it and/or modify it
++ *  under the terms of the GNU General Public License version 2 as published
++ *  by the Free Software Foundation.
++ */
++
++#ifndef __ASM_MACH_ATH79_MANGLE_PORT_H
++#define __ASM_MACH_ATH79_MANGLE_PORT_H
++
++#ifdef CONFIG_PCI_AR71XX
++extern unsigned long (ath79_pci_swizzle_b)(unsigned long port);
++extern unsigned long (ath79_pci_swizzle_w)(unsigned long port);
++#else
++#define ath79_pci_swizzle_b(port) (port)
++#define ath79_pci_swizzle_w(port) (port)
++#endif
++
++#define __swizzle_addr_b(port)	ath79_pci_swizzle_b(port)
++#define __swizzle_addr_w(port)	ath79_pci_swizzle_w(port)
++#define __swizzle_addr_l(port)	(port)
++#define __swizzle_addr_q(port)	(port)
++
++# define ioswabb(a, x)           (x)
++# define __mem_ioswabb(a, x)     (x)
++# define ioswabw(a, x)           (x)
++# define __mem_ioswabw(a, x)     cpu_to_le16(x)
++# define ioswabl(a, x)           (x)
++# define __mem_ioswabl(a, x)     cpu_to_le32(x)
++# define ioswabq(a, x)           (x)
++# define __mem_ioswabq(a, x)     cpu_to_le64(x)
++
++#endif /* __ASM_MACH_ATH79_MANGLE_PORT_H */
+--- a/arch/mips/pci/pci-ar71xx.c
++++ b/arch/mips/pci/pci-ar71xx.c
+@@ -68,6 +68,45 @@ static const u32 ar71xx_pci_read_mask[8]
+ 	0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0
+ };
+ 
++static unsigned long (*__ath79_pci_swizzle_b)(unsigned long port);
++static unsigned long (*__ath79_pci_swizzle_w)(unsigned long port);
++
++static inline bool ar71xx_is_pci_addr(unsigned long port)
++{
++	unsigned long phys = CPHYSADDR(port);
++
++	return (phys >= AR71XX_PCI_MEM_BASE &&
++		phys < AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE);
++}
++
++static unsigned long ar71xx_pci_swizzle_b(unsigned long port)
++{
++	return ar71xx_is_pci_addr(port) ? port ^ 3 : port;
++}
++
++static unsigned long ar71xx_pci_swizzle_w(unsigned long port)
++{
++	return ar71xx_is_pci_addr(port) ? port ^ 2 : port;
++}
++
++unsigned long ath79_pci_swizzle_b(unsigned long port)
++{
++	if (__ath79_pci_swizzle_b)
++		return __ath79_pci_swizzle_b(port);
++
++	return port;
++}
++EXPORT_SYMBOL(ath79_pci_swizzle_b);
++
++unsigned long ath79_pci_swizzle_w(unsigned long port)
++{
++	if (__ath79_pci_swizzle_w)
++		return __ath79_pci_swizzle_w(port);
++
++	return port;
++}
++EXPORT_SYMBOL(ath79_pci_swizzle_w);
++
+ static inline u32 ar71xx_pci_get_ble(int where, int size, int local)
+ {
+ 	u32 t;
+@@ -275,6 +314,9 @@ static int ar71xx_pci_probe(struct platf
+ 
+ 	register_pci_controller(&apc->pci_ctrl);
+ 
++	__ath79_pci_swizzle_b = ar71xx_pci_swizzle_b;
++	__ath79_pci_swizzle_w = ar71xx_pci_swizzle_w;
++
+ 	return 0;
+ }
+ 
diff --git a/target/linux/ath79/patches-6.1/330-missing-registers.patch b/target/linux/ath79/patches-6.1/330-missing-registers.patch
new file mode 100644
index 0000000000..74789437ec
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/330-missing-registers.patch
@@ -0,0 +1,20 @@
+From: Christian Lamparter <chunkeey at gmail.com>
+Subject: [PATCH] ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for
+
+    ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for AR9344
+
+    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
+
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -1231,6 +1231,10 @@
+ #define AR934X_ETH_CFG_RDV_DELAY        BIT(16)
+ #define AR934X_ETH_CFG_RDV_DELAY_MASK   0x3
+ #define AR934X_ETH_CFG_RDV_DELAY_SHIFT  16
++#define AR934X_ETH_CFG_TXD_DELAY_MASK   0x3
++#define AR934X_ETH_CFG_TXD_DELAY_SHIFT  18
++#define AR934X_ETH_CFG_TXE_DELAY_MASK   0x3
++#define AR934X_ETH_CFG_TXE_DELAY_SHIFT  20
+ 
+ /*
+  * QCA953X GMAC Interface
diff --git a/target/linux/ath79/patches-6.1/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch b/target/linux/ath79/patches-6.1/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
new file mode 100644
index 0000000000..c2f228dfe1
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
@@ -0,0 +1,90 @@
+From 60efe35257b063ce584968f9f80b437030ce6ba6 Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Mon, 18 Mar 2019 00:54:06 +0100
+Subject: [PATCH] MIPS: ath79: add missing QCA955x GMAC registers
+
+This adds missing GMAC register definitions for the Qualcomm Atheros
+QCA955X series MIPS SoCs.
+
+They originate from the platforms U-Boot code and the AVM FRITZ!WLAN
+Repeater 450E's GPL tarball.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ .../mips/include/asm/mach-ath79/ar71xx_regs.h | 54 +++++++++++++++++++
+ 1 file changed, 54 insertions(+)
+
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -1251,7 +1251,12 @@
+  */
+ 
+ #define QCA955X_GMAC_REG_ETH_CFG	0x00
++#define QCA955X_GMAC_REG_SGMII_RESET	0x14
+ #define QCA955X_GMAC_REG_SGMII_SERDES	0x18
++#define QCA955X_GMAC_REG_MR_AN_CONTROL	0x1c
++#define QCA955X_GMAC_REG_MR_AN_STATUS	0x20
++#define QCA955X_GMAC_REG_SGMII_CONFIG	0x34
++#define QCA955X_GMAC_REG_SGMII_DEBUG	0x58
+ 
+ #define QCA955X_ETH_CFG_RGMII_EN	BIT(0)
+ #define QCA955X_ETH_CFG_MII_GE0		BIT(1)
+@@ -1273,9 +1278,58 @@
+ #define QCA955X_ETH_CFG_TXE_DELAY_MASK	0x3
+ #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT	20
+ 
++#define QCA955X_SGMII_RESET_RX_CLK_N_RESET	0
++#define QCA955X_SGMII_RESET_RX_CLK_N		BIT(0)
++#define QCA955X_SGMII_RESET_TX_CLK_N		BIT(1)
++#define QCA955X_SGMII_RESET_RX_125M_N		BIT(2)
++#define QCA955X_SGMII_RESET_TX_125M_N		BIT(3)
++#define QCA955X_SGMII_RESET_HW_RX_125M_N	BIT(4)
++
+ #define QCA955X_SGMII_SERDES_LOCK_DETECT_STATUS	BIT(15)
+ #define QCA955X_SGMII_SERDES_RES_CALIBRATION_SHIFT 23
+ #define QCA955X_SGMII_SERDES_RES_CALIBRATION_MASK 0xf
++
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL1	BIT(6)
++#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE	BIT(8)
++#define QCA955X_MR_AN_CONTROL_RESTART_AN	BIT(9)
++#define QCA955X_MR_AN_CONTROL_POWER_DOWN	BIT(11)
++#define QCA955X_MR_AN_CONTROL_AN_ENABLE		BIT(12)
++#define QCA955X_MR_AN_CONTROL_SPEED_SEL0	BIT(13)
++#define QCA955X_MR_AN_CONTROL_LOOPBACK		BIT(14)
++#define QCA955X_MR_AN_CONTROL_PHY_RESET		BIT(15)
++
++#define QCA955X_MR_AN_STATUS_EXT_CAP		BIT(0)
++#define QCA955X_MR_AN_STATUS_LINK_UP		BIT(2)
++#define QCA955X_MR_AN_STATUS_AN_ABILITY		BIT(3)
++#define QCA955X_MR_AN_STATUS_REMOTE_FAULT	BIT(4)
++#define QCA955X_MR_AN_STATUS_AN_COMPLETE	BIT(5)
++#define QCA955X_MR_AN_STATUS_NO_PREAMBLE	BIT(6)
++#define QCA955X_MR_AN_STATUS_BASE_PAGE		BIT(7)
++
++#define QCA955X_SGMII_CONFIG_MODE_CTRL_SHIFT		0
++#define QCA955X_SGMII_CONFIG_MODE_CTRL_MASK		0x7
++#define QCA955X_SGMII_CONFIG_ENABLE_SGMII_TX_PAUSE	BIT(3)
++#define QCA955X_SGMII_CONFIG_MR_REG4_CHANGED		BIT(4)
++#define QCA955X_SGMII_CONFIG_FORCE_SPEED		BIT(5)
++#define QCA955X_SGMII_CONFIG_SPEED_SHIFT		6
++#define QCA955X_SGMII_CONFIG_SPEED_MASK			0xc0
++#define QCA955X_SGMII_CONFIG_REMOTE_PHY_LOOPBACK	BIT(8)
++#define QCA955X_SGMII_CONFIG_NEXT_PAGE_LOADED		BIT(9)
++#define QCA955X_SGMII_CONFIG_MDIO_ENABLE		BIT(10)
++#define QCA955X_SGMII_CONFIG_MDIO_PULSE			BIT(11)
++#define QCA955X_SGMII_CONFIG_MDIO_COMPLETE		BIT(12)
++#define QCA955X_SGMII_CONFIG_PRBS_ENABLE		BIT(13)
++#define QCA955X_SGMII_CONFIG_BERT_ENABLE		BIT(14)
++
++#define QCA955X_SGMII_DEBUG_TX_STATE_MASK	0xff
++#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT	0
++#define QCA955X_SGMII_DEBUG_RX_STATE_MASK	0xff00
++#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT	8
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK	0xff0000
++#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT	16
++#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK	0xf000000
++#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT	24
++
+ /*
+  * QCA956X GMAC Interface
+  */
diff --git a/target/linux/ath79/patches-6.1/332-ath79-sgmii-config.patch b/target/linux/ath79/patches-6.1/332-ath79-sgmii-config.patch
new file mode 100644
index 0000000000..a6a50e4a8a
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/332-ath79-sgmii-config.patch
@@ -0,0 +1,30 @@
+From: David Bauer <mail at david-bauer.net>
+Subject: [PATCH] ath79: force SGMII SerDes mode to MAC operation
+
+The mode on the SGMII SerDes on the QCA9563 is 1000 Base-X by default.
+This only allows for 1000 Mbit/s links, however when used with an SGMII
+PHY in 100 Mbit/s link mode, the link remains dead.
+
+This strictly has nothing to do with the SerDes calibration, however it
+is done at the same point in the QCA reference U-Boot which is the
+blueprint for everything happening here. As the current state is more or
+less a hack, this should be fine.
+
+This fixes the issues outlined above on a TP-Link EAP-225 Outdoor.
+
+Reported-by: Tom Herbers <freifunk at tomherbers.de>
+Tested-by: Tom Herbers <freifunk at tomherbers.de>
+Submitted-by: David Bauer <mail at david-bauer.net>
+---
+ arch/mips/include/asm/mach-ath79/ar71xx_regs.h           | 1 +
+ 1 files changed, 1 insertion(+)
+
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -1380,5 +1380,6 @@
+ 
+ #define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT	0
+ #define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK	0x7
++#define QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC	0x2
+ 
+ #endif /* __ASM_MACH_AR71XX_REGS_H */
diff --git a/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch
new file mode 100644
index 0000000000..48ce7e1d71
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch
@@ -0,0 +1,26 @@
+From: John Crispin <john at phrozen.org>
+Subject: ath79: Register GPIO driver earlier
+
+HACK: register the GPIO driver earlier to ensure that gpio_request calls
+from mach files succeed.
+
+Submitted-by: John Crispin <john at phrozen.org>
+---
+ drivers/gpio/gpio-ath79.c                     | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/gpio/gpio-ath79.c
++++ b/drivers/gpio/gpio-ath79.c
+@@ -301,7 +301,11 @@ static struct platform_driver ath79_gpio
+ 	.probe = ath79_gpio_probe,
+ };
+ 
+-module_platform_driver(ath79_gpio_driver);
++static int __init ath79_gpio_init(void)
++{
++	return platform_driver_register(&ath79_gpio_driver);
++}
++postcore_initcall(ath79_gpio_init);
+ 
+ MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
+ MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ath79/patches-6.1/350-MIPS-ath79-ath9k-exports.patch b/target/linux/ath79/patches-6.1/350-MIPS-ath79-ath9k-exports.patch
new file mode 100644
index 0000000000..e460fe58f3
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/350-MIPS-ath79-ath9k-exports.patch
@@ -0,0 +1,36 @@
+From: John Crispin <john at phrozen.org>
+Subject: [PATCH] ath79: make ahb wifi work
+
+Submitted-by: John Crispin <john at phrozen.org>
+---
+ arch/mips/ath79/common.c                      | 3 +++
+ mips/include/asm/mach-ath79/ath79.h           | 1+
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/mips/ath79/common.c
++++ b/arch/mips/ath79/common.c
+@@ -31,11 +31,13 @@ EXPORT_SYMBOL_GPL(ath79_ddr_freq);
+ 
+ enum ath79_soc_type ath79_soc;
+ unsigned int ath79_soc_rev;
++EXPORT_SYMBOL_GPL(ath79_soc_rev);
+ 
+ void __iomem *ath79_pll_base;
+ void __iomem *ath79_reset_base;
+ EXPORT_SYMBOL_GPL(ath79_reset_base);
+-static void __iomem *ath79_ddr_base;
++void __iomem *ath79_ddr_base;
++EXPORT_SYMBOL_GPL(ath79_ddr_base);
+ static void __iomem *ath79_ddr_wb_flush_base;
+ static void __iomem *ath79_ddr_pci_win_base;
+ 
+--- a/arch/mips/include/asm/mach-ath79/ath79.h
++++ b/arch/mips/include/asm/mach-ath79/ath79.h
+@@ -149,6 +149,7 @@ void ath79_ddr_wb_flush(unsigned int reg
+ void ath79_ddr_set_pci_windows(void);
+ 
+ extern void __iomem *ath79_pll_base;
++extern void __iomem *ath79_ddr_base;
+ extern void __iomem *ath79_reset_base;
+ 
+ static inline void ath79_pll_wr(unsigned reg, u32 val)
diff --git a/target/linux/ath79/patches-6.1/351-MIPS-ath79-common-exports.patch b/target/linux/ath79/patches-6.1/351-MIPS-ath79-common-exports.patch
new file mode 100644
index 0000000000..befcf2d50f
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/351-MIPS-ath79-common-exports.patch
@@ -0,0 +1,26 @@
+From: Luiz Angelo Daros de Luca <luizluca at gmail.com>
+Subject: [PATCH] ath79: export ath79_pll_base
+
+This symbol is declared as extern but nobody exported it.
+Any module including arch/mips/include/asm/mach-ath79/ath79.h
+will not build. Without this export, ag71xx.ko will not build
+as a module and the build will fail like this:
+
+ERROR: modpost: "ath79_pll_base" [drivers/net/ethernet/atheros/ag71xx/ag71xx.ko] undefined!
+
+The ath79_pll_base symbol is accessed in the ath79_pll_wr() inline function.
+
+---
+ arch/mips/ath79/common.c                      | 1 +
+ 1 file changed, 1 insertions(+)
+
+--- a/arch/mips/ath79/common.c
++++ b/arch/mips/ath79/common.c
+@@ -34,6 +34,7 @@ unsigned int ath79_soc_rev;
+ EXPORT_SYMBOL_GPL(ath79_soc_rev);
+ 
+ void __iomem *ath79_pll_base;
++EXPORT_SYMBOL_GPL(ath79_pll_base);
+ void __iomem *ath79_reset_base;
+ EXPORT_SYMBOL_GPL(ath79_reset_base);
+ void __iomem *ath79_ddr_base;
diff --git a/target/linux/ath79/patches-6.1/360-MIPS-ath79-export-UART1-reference-clock.patch b/target/linux/ath79/patches-6.1/360-MIPS-ath79-export-UART1-reference-clock.patch
new file mode 100644
index 0000000000..b24ff21692
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/360-MIPS-ath79-export-UART1-reference-clock.patch
@@ -0,0 +1,67 @@
+From: Daniel Golle <daniel at makrotopia.org>
+Subject: [PATCH] ath79: add support for Atheros AR934x HS UART
+
+AR934x chips also got the 'old' qca,ar9330-uart in addition to the
+'new' ns16550a compatible one. Add support for UART1 clock selector as
+well as device-tree bindings in ar934x.dtsi to make use of that uart.
+
+Reported-by: Piotr Dymacz <pepe2k at gmail.com>
+Submitted-by: Daniel Golle <daniel at makrotopia.org>
+---
+ arch/mips/ath79/clock.c                       | 7 +++++++
+ .../mips/include/asm/mach-ath79/ar71xx_regs.h | 1 +
+ include/dt-bindings/clock/ath79-clk.h         | 3 ++-
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+--- a/arch/mips/ath79/clock.c
++++ b/arch/mips/ath79/clock.c
+@@ -40,6 +40,7 @@ static const char * const clk_names[ATH7
+ 	[ATH79_CLK_AHB] = "ahb",
+ 	[ATH79_CLK_REF] = "ref",
+ 	[ATH79_CLK_MDIO] = "mdio",
++	[ATH79_CLK_UART1] = "uart1",
+ };
+ 
+ static const char * __init ath79_clk_name(int type)
+@@ -344,6 +345,9 @@ static void __init ar934x_clocks_init(vo
+ 	if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL)
+ 		ath79_set_clk(ATH79_CLK_MDIO, 100 * 1000 * 1000);
+ 
++	if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL)
++		ath79_set_clk(ATH79_CLK_UART1, 100 * 1000 * 1000);
++
+ 	iounmap(dpll_base);
+ }
+ 
+@@ -649,6 +653,9 @@ static void __init ath79_clocks_init_dt(
+ 	if (!clks[ATH79_CLK_MDIO])
+ 		clks[ATH79_CLK_MDIO] = clks[ATH79_CLK_REF];
+ 
++	if (!clks[ATH79_CLK_UART1])
++		clks[ATH79_CLK_UART1] = clks[ATH79_CLK_REF];
++
+ 	if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
+ 		pr_err("%pOF: could not register clk provider\n", np);
+ 		goto err_iounmap;
+--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+@@ -348,6 +348,7 @@
+ #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL	BIT(24)
+ 
+ #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL	BIT(6)
++#define AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL	BIT(7)
+ 
+ #define QCA953X_PLL_CPU_CONFIG_REG		0x00
+ #define QCA953X_PLL_DDR_CONFIG_REG		0x04
+--- a/include/dt-bindings/clock/ath79-clk.h
++++ b/include/dt-bindings/clock/ath79-clk.h
+@@ -11,7 +11,8 @@
+ #define ATH79_CLK_AHB		2
+ #define ATH79_CLK_REF		3
+ #define ATH79_CLK_MDIO		4
++#define ATH79_CLK_UART1		5
+ 
+-#define ATH79_CLK_END		5
++#define ATH79_CLK_END		6
+ 
+ #endif /* __DT_BINDINGS_ATH79_CLK_H */
diff --git a/target/linux/ath79/patches-6.1/370-MIPS-ath79-sanitize-symbols.patch b/target/linux/ath79/patches-6.1/370-MIPS-ath79-sanitize-symbols.patch
new file mode 100644
index 0000000000..eac17c2b50
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/370-MIPS-ath79-sanitize-symbols.patch
@@ -0,0 +1,93 @@
+From 3fc8585cf76022dba7496627074d42af88c30718 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Sat, 23 Jun 2018 15:16:55 +0200
+Subject: [PATCH 32/33] MIPS: ath79: sanitize symbols
+
+We no longer need to select which SoCs are supported as the whole arch
+code is always built. So lets drop all the SoC symbols
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ arch/mips/Kconfig       |  2 ++
+ arch/mips/ath79/Kconfig | 44 +++++---------------------------------------
+ arch/mips/pci/Makefile  |  2 +-
+ 3 files changed, 8 insertions(+), 40 deletions(-)
+
+--- a/arch/mips/Kconfig
++++ b/arch/mips/Kconfig
+@@ -257,6 +257,8 @@ config ATH79
+ 	select SYS_SUPPORTS_BIG_ENDIAN
+ 	select SYS_SUPPORTS_MIPS16
+ 	select SYS_SUPPORTS_ZBOOT_UART_PROM
++	select HAVE_PCI
++	select USB_ARCH_HAS_EHCI
+ 	select USE_OF
+ 	select USB_EHCI_ROOT_HUB_TT if USB_EHCI_HCD_PLATFORM
+ 	help
+--- a/arch/mips/ath79/Kconfig
++++ b/arch/mips/ath79/Kconfig
+@@ -1,48 +1,14 @@
+ # SPDX-License-Identifier: GPL-2.0
+ if ATH79
+ 
+-config SOC_AR71XX
+-	select HAVE_PCI
+-	def_bool n
+-
+-config SOC_AR724X
+-	select HAVE_PCI
+-	select PCI_AR724X if PCI
+-	def_bool n
+-
+-config SOC_AR913X
+-	def_bool n
+-
+-config SOC_AR933X
+-	def_bool n
+-
+-config SOC_AR934X
+-	select HAVE_PCI
+-	select PCI_AR724X if PCI
+-	def_bool n
+-
+-config SOC_QCA955X
+-	select HAVE_PCI
+-	select PCI_AR724X if PCI
++config PCI_AR71XX
++	bool "PCI support for AR7100 type SoCs"
++	depends on PCI
+ 	def_bool n
+ 
+ config PCI_AR724X
+-	def_bool n
+-
+-config ATH79_DEV_GPIO_BUTTONS
+-	def_bool n
+-
+-config ATH79_DEV_LEDS_GPIO
+-	def_bool n
+-
+-config ATH79_DEV_SPI
+-	def_bool n
+-
+-config ATH79_DEV_USB
+-	def_bool n
+-
+-config ATH79_DEV_WMAC
+-	depends on (SOC_AR913X || SOC_AR933X || SOC_AR934X || SOC_QCA955X)
++	bool "PCI support for AR724x type SoCs"
++	depends on PCI
+ 	def_bool n
+ 
+ endif
+--- a/arch/mips/pci/Makefile
++++ b/arch/mips/pci/Makefile
+@@ -19,7 +19,7 @@ obj-$(CONFIG_BCM63XX)		+= pci-bcm63xx.o
+ 					ops-bcm63xx.o
+ obj-$(CONFIG_MIPS_ALCHEMY)	+= pci-alchemy.o
+ obj-$(CONFIG_PCI_AR2315)	+= pci-ar2315.o
+-obj-$(CONFIG_SOC_AR71XX)	+= pci-ar71xx.o
++obj-$(CONFIG_PCI_AR71XX)	+= pci-ar71xx.o
+ obj-$(CONFIG_PCI_AR724X)	+= pci-ar724x.o
+ obj-$(CONFIG_PCI_XTALK_BRIDGE)	+= pci-xtalk-bridge.o
+ #
diff --git a/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
new file mode 100644
index 0000000000..ebb240d4ae
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -0,0 +1,53 @@
+From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
+From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
+Date: Sat, 25 Feb 2017 16:42:50 +0000
+Subject: mtd: nor: support mtd name from device tree
+
+Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/mtd/spi-nor/core.c
++++ b/drivers/mtd/spi-nor/core.c
+@@ -2964,12 +2964,19 @@ static void spi_nor_set_mtd_info(struct
+ {
+ 	struct mtd_info *mtd = &nor->mtd;
+ 	struct device *dev = nor->dev;
++	struct device_node *np = spi_nor_get_flash_node(nor);
++	const char __maybe_unused *of_mtd_name = NULL;
+ 
+ 	spi_nor_set_mtd_locking_ops(nor);
+ 	spi_nor_set_mtd_otp_ops(nor);
+ 
+ 	mtd->dev.parent = dev;
+-	if (!mtd->name)
++#ifdef CONFIG_MTD_OF_PARTS
++	of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
++#endif
++	if (of_mtd_name)
++		mtd->name = of_mtd_name;
++	else if (!mtd->name)
+ 		mtd->name = dev_name(dev);
+ 	mtd->type = MTD_NORFLASH;
+ 	mtd->flags = MTD_CAP_NORFLASH;
+--- a/drivers/mtd/mtdcore.c
++++ b/drivers/mtd/mtdcore.c
+@@ -863,6 +863,17 @@ out_error:
+  */
+ static void mtd_set_dev_defaults(struct mtd_info *mtd)
+ {
++#ifdef CONFIG_MTD_OF_PARTS
++	const char __maybe_unused *of_mtd_name = NULL;
++	struct device_node *np;
++
++	np = mtd_get_of_node(mtd);
++	if (np && !mtd->name) {
++		of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
++		if (of_mtd_name)
++			mtd->name = of_mtd_name;
++	} else
++#endif
+ 	if (mtd->dev.parent) {
+ 		if (!mtd->owner && mtd->dev.parent->driver)
+ 			mtd->owner = mtd->dev.parent->driver->owner;
diff --git a/target/linux/ath79/patches-6.1/410-mtd-cybertan-trx-parser.patch b/target/linux/ath79/patches-6.1/410-mtd-cybertan-trx-parser.patch
new file mode 100644
index 0000000000..d0e8aec0d5
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/410-mtd-cybertan-trx-parser.patch
@@ -0,0 +1,45 @@
+From: Christian Lamparter <chunkeey at gmail.com>
+Subject: [PATCH] ath79: port cybertan_part from ar71xx
+
+This patch ports the cybertan_part code from ar71xx and converts the
+driver to a DT-supported mtd parser. As a result, it will no longer
+add the u-boot, nvram and art partitions, which were never part of
+the special Cybertan header.
+
+Instead these partitions have to be specified in the DT, which has the
+upside of making it possible to add properties (i.e.: read-only), labels
+and references to these important partitions.
+
+Submitted-by: Christian Lamparter <chunkeey at gmail.com>
+---
+ drivers/mtd/parsers/Makefile                  | 1 +
+ drivers/mtd/parsers/Kconfig                   | 8 ++++++++
+ 2 files changed, 9 insertions(+)
+
+--- a/drivers/mtd/parsers/Makefile
++++ b/drivers/mtd/parsers/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_MTD_OF_PARTS)		+= ofpart.o
+ ofpart-y				+= ofpart_core.o
+ ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908)	+= ofpart_bcm4908.o
+ ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
++obj-$(CONFIG_MTD_PARSER_CYBERTAN)	+= parser_cybertan.o
+ obj-$(CONFIG_MTD_PARSER_IMAGETAG)	+= parser_imagetag.o
+ obj-$(CONFIG_MTD_AFS_PARTS)		+= afs.o
+ obj-$(CONFIG_MTD_PARSER_TPLINK_SAFELOADER)	+= tplink_safeloader.o
+--- a/drivers/mtd/parsers/Kconfig
++++ b/drivers/mtd/parsers/Kconfig
+@@ -112,6 +112,14 @@ config MTD_OF_PARTS_LINKSYS_NS
+ 	  two "firmware" partitions. Currently used firmware has to be detected
+ 	  using CFE environment variable.
+ 
++config MTD_PARSER_CYBERTAN
++	tristate "Parser for Cybertan format partitions"
++	depends on MTD && (ATH79 || COMPILE_TEST)
++	help
++	  Cybertan has a proprietory header than encompasses a Broadcom trx
++	  header. This driver will parse the header and take care of the
++	  special offsets that result in the extra headers.
++
+ config MTD_PARSER_IMAGETAG
+ 	tristate "Parser for BCM963XX Image Tag format partitions"
+ 	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
diff --git a/target/linux/ath79/patches-6.1/420-drivers-link-spi-before-mtd.patch b/target/linux/ath79/patches-6.1/420-drivers-link-spi-before-mtd.patch
new file mode 100644
index 0000000000..0cd96909eb
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/420-drivers-link-spi-before-mtd.patch
@@ -0,0 +1,20 @@
+From: Gabor Juhos <juhosg at openwrt.org>
+Subject: [PATCH] ar71xx: Link SPI before MTD
+
+SVN-Revision: 22863
+---
+ drivers/Makefile                              |   2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/Makefile
++++ b/drivers/Makefile
+@@ -80,8 +80,8 @@ obj-y				+= scsi/
+ obj-y				+= nvme/
+ obj-$(CONFIG_ATA)		+= ata/
+ obj-$(CONFIG_TARGET_CORE)	+= target/
+-obj-$(CONFIG_MTD)		+= mtd/
+ obj-$(CONFIG_SPI)		+= spi/
++obj-$(CONFIG_MTD)		+= mtd/
+ obj-$(CONFIG_SPMI)		+= spmi/
+ obj-$(CONFIG_HSI)		+= hsi/
+ obj-$(CONFIG_SLIMBUS)		+= slimbus/
diff --git a/target/linux/ath79/patches-6.1/430-mtd-ar934x-nand-driver.patch b/target/linux/ath79/patches-6.1/430-mtd-ar934x-nand-driver.patch
new file mode 100644
index 0000000000..184c39d469
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/430-mtd-ar934x-nand-driver.patch
@@ -0,0 +1,34 @@
+From: Gabor Juhos <juhosg at openwrt.org>
+Subject: ar71xx: ar934x_nfc: experimental NAND Flash Controller driver for AR934x
+
+SVN-Revision: 33385
+---
+ drivers/mtd/nand/raw/Kconfig                  | 8 ++++++++
+ drivers/mtd/nand/raw/Makefile                 | 1 +
+ 2 files changed, 9 insertions(+)
+
+--- a/drivers/mtd/nand/raw/Kconfig
++++ b/drivers/mtd/nand/raw/Kconfig
+@@ -557,4 +557,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
+ 	  load time (assuming you build diskonchip as a module) with the module
+ 	  parameter "inftl_bbt_write=1".
+ 
++config MTD_NAND_AR934X
++	tristate "Support for NAND controller on Qualcomm Atheros AR934x/QCA955x SoCs"
++	depends on ATH79 || COMPILE_TEST
++	depends on HAS_IOMEM
++	help
++	  Enables support for NAND controller on Qualcomm Atheros SoCs.
++	  This controller is found on AR934x and QCA955x SoCs.
++
+ endif # MTD_RAW_NAND
+--- a/drivers/mtd/nand/raw/Makefile
++++ b/drivers/mtd/nand/raw/Makefile
+@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM)	+= inte
+ obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rockchip-nand-controller.o
+ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
+ obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
++obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
+ 
+ nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
+ nand-objs += nand_onfi.o
diff --git a/target/linux/ath79/patches-6.1/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.1/700-phy-add-ath79-usb-phys.patch
new file mode 100644
index 0000000000..21b655a109
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/700-phy-add-ath79-usb-phys.patch
@@ -0,0 +1,333 @@
+From 08c9d6ceef01893678a5d2e8a15517c745417f21 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Tue, 6 Mar 2018 10:04:05 +0100
+Subject: [PATCH 04/27] phy: add ath79 usb phys
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/phy/Kconfig          |  16 ++++++
+ drivers/phy/Makefile         |   2 +
+ drivers/phy/phy-ar7100-usb.c | 124 +++++++++++++++++++++++++++++++++++++++++++
+ drivers/phy/phy-ar7200-usb.c | 108 +++++++++++++++++++++++++++++++++++++
+ 4 files changed, 250 insertions(+)
+ create mode 100644 drivers/phy/phy-ar7100-usb.c
+ create mode 100644 drivers/phy/phy-ar7200-usb.c
+
+--- a/drivers/phy/Kconfig
++++ b/drivers/phy/Kconfig
+@@ -24,6 +24,22 @@ config GENERIC_PHY_MIPI_DPHY
+ 	  Provides a number of helpers a core functions for MIPI D-PHY
+ 	  drivers to us.
+ 
++config PHY_AR7100_USB
++	tristate "Atheros AR7100 USB PHY driver"
++	depends on ATH79 || COMPILE_TEST
++	default y if USB_EHCI_HCD_PLATFORM
++	select GENERIC_PHY
++	help
++	  Enable this to support the USB PHY on Atheros AR7100 SoCs.
++
++config PHY_AR7200_USB
++	tristate "Atheros AR7200 USB PHY driver"
++	depends on ATH79 || COMPILE_TEST
++	default y if USB_EHCI_HCD_PLATFORM
++	select GENERIC_PHY
++	help
++	  Enable this to support the USB PHY on Atheros AR7200 SoCs.
++
+ config PHY_LPC18XX_USB_OTG
+ 	tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver"
+ 	depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
+--- a/drivers/phy/Makefile
++++ b/drivers/phy/Makefile
+@@ -4,6 +4,8 @@
+ #
+ 
+ obj-$(CONFIG_GENERIC_PHY)		+= phy-core.o
++obj-$(CONFIG_PHY_AR7100_USB)		+= phy-ar7100-usb.o
++obj-$(CONFIG_PHY_AR7200_USB)		+= phy-ar7200-usb.o
+ obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY)	+= phy-core-mipi-dphy.o
+ obj-$(CONFIG_PHY_CAN_TRANSCEIVER)	+= phy-can-transceiver.o
+ obj-$(CONFIG_PHY_LPC18XX_USB_OTG)	+= phy-lpc18xx-usb-otg.o
+--- /dev/null
++++ b/drivers/phy/phy-ar7100-usb.c
+@@ -0,0 +1,140 @@
++/*
++ * Copyright (C) 2018 John Crispin <john at phrozen.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/phy/phy.h>
++#include <linux/delay.h>
++#include <linux/reset.h>
++#include <linux/of_gpio.h>
++
++#include <asm/mach-ath79/ath79.h>
++#include <asm/mach-ath79/ar71xx_regs.h>
++
++struct ar7100_usb_phy {
++	struct reset_control	*rst_phy;
++	struct reset_control	*rst_host;
++	struct reset_control	*rst_ohci_dll;
++	void __iomem		*io_base;
++	struct phy		*phy;
++	int			gpio;
++};
++
++static int ar7100_usb_phy_power_off(struct phy *phy)
++{
++	struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
++	int err = 0;
++
++	err |= reset_control_assert(priv->rst_host);
++	err |= reset_control_assert(priv->rst_phy);
++	err |= reset_control_assert(priv->rst_ohci_dll);
++
++	return err;
++}
++
++static int ar7100_usb_phy_power_on(struct phy *phy)
++{
++	struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
++	int err = 0;
++
++	err |= ar7100_usb_phy_power_off(phy);
++	mdelay(100);
++	err |= reset_control_deassert(priv->rst_ohci_dll);
++	err |= reset_control_deassert(priv->rst_phy);
++	err |= reset_control_deassert(priv->rst_host);
++	mdelay(500);
++	iowrite32(0xf0000, priv->io_base + AR71XX_USB_CTRL_REG_CONFIG);
++	iowrite32(0x20c00, priv->io_base + AR71XX_USB_CTRL_REG_FLADJ);
++
++	return err;
++}
++
++static const struct phy_ops ar7100_usb_phy_ops = {
++	.power_on	= ar7100_usb_phy_power_on,
++	.power_off	= ar7100_usb_phy_power_off,
++	.owner		= THIS_MODULE,
++};
++
++static int ar7100_usb_phy_probe(struct platform_device *pdev)
++{
++	struct phy_provider *phy_provider;
++	struct resource *res;
++	struct ar7100_usb_phy *priv;
++
++	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
++	if (!priv)
++		return -ENOMEM;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	priv->io_base = devm_ioremap_resource(&pdev->dev, res);
++	if (IS_ERR(priv->io_base))
++		return PTR_ERR(priv->io_base);
++
++	priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
++	if (IS_ERR(priv->rst_phy)) {
++		dev_err(&pdev->dev, "phy reset is missing\n");
++		return PTR_ERR(priv->rst_phy);
++	}
++
++	priv->rst_host = devm_reset_control_get(&pdev->dev, "usb-host");
++	if (IS_ERR(priv->rst_host)) {
++		dev_err(&pdev->dev, "host reset is missing\n");
++		return PTR_ERR(priv->rst_host);
++	}
++
++	priv->rst_ohci_dll = devm_reset_control_get(&pdev->dev, "usb-ohci-dll");
++	if (IS_ERR(priv->rst_ohci_dll)) {
++		dev_err(&pdev->dev, "ohci-dll reset is missing\n");
++		return PTR_ERR(priv->rst_host);
++	}
++
++	priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7100_usb_phy_ops);
++	if (IS_ERR(priv->phy)) {
++		dev_err(&pdev->dev, "failed to create PHY\n");
++		return PTR_ERR(priv->phy);
++	}
++
++	priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
++	if (priv->gpio >= 0) {
++		int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
++
++		if (ret) {
++			dev_err(&pdev->dev, "failed to request gpio\n");
++			return ret;
++		}
++		gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
++		gpio_set_value(priv->gpio, 1);
++	}
++
++	phy_set_drvdata(priv->phy, priv);
++
++	phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
++
++
++	return PTR_ERR_OR_ZERO(phy_provider);
++}
++
++static const struct of_device_id ar7100_usb_phy_of_match[] = {
++	{ .compatible = "qca,ar7100-usb-phy" },
++	{}
++};
++MODULE_DEVICE_TABLE(of, ar7100_usb_phy_of_match);
++
++static struct platform_driver ar7100_usb_phy_driver = {
++	.probe	= ar7100_usb_phy_probe,
++	.driver = {
++		.of_match_table	= ar7100_usb_phy_of_match,
++		.name		= "ar7100-usb-phy",
++	}
++};
++module_platform_driver(ar7100_usb_phy_driver);
++
++MODULE_DESCRIPTION("ATH79 USB PHY driver");
++MODULE_AUTHOR("Alban Bedel <albeu at free.fr>");
++MODULE_LICENSE("GPL");
+--- /dev/null
++++ b/drivers/phy/phy-ar7200-usb.c
+@@ -0,0 +1,136 @@
++/*
++ * Copyright (C) 2015 Alban Bedel <albeu at free.fr>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/phy/phy.h>
++#include <linux/reset.h>
++#include <linux/of_gpio.h>
++
++struct ar7200_usb_phy {
++	struct reset_control	*rst_phy;
++	struct reset_control	*rst_phy_analog;
++	struct reset_control	*suspend_override;
++	struct phy		*phy;
++	int			gpio;
++};
++
++static int ar7200_usb_phy_power_on(struct phy *phy)
++{
++	struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
++	int err = 0;
++
++	if (priv->suspend_override)
++		err = reset_control_assert(priv->suspend_override);
++	if (priv->rst_phy)
++		err |= reset_control_deassert(priv->rst_phy);
++	if (priv->rst_phy_analog)
++		err |= reset_control_deassert(priv->rst_phy_analog);
++
++	return err;
++}
++
++static int ar7200_usb_phy_power_off(struct phy *phy)
++{
++	struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
++	int err = 0;
++
++	if (priv->suspend_override)
++		err = reset_control_deassert(priv->suspend_override);
++	if (priv->rst_phy)
++		err |= reset_control_assert(priv->rst_phy);
++	if (priv->rst_phy_analog)
++		err |= reset_control_assert(priv->rst_phy_analog);
++
++	return err;
++}
++
++static const struct phy_ops ar7200_usb_phy_ops = {
++	.power_on	= ar7200_usb_phy_power_on,
++	.power_off	= ar7200_usb_phy_power_off,
++	.owner		= THIS_MODULE,
++};
++
++static int ar7200_usb_phy_probe(struct platform_device *pdev)
++{
++	struct phy_provider *phy_provider;
++	struct ar7200_usb_phy *priv;
++
++	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
++	if (!priv)
++		return -ENOMEM;
++
++	priv->rst_phy = devm_reset_control_get(&pdev->dev, "usb-phy");
++	if (IS_ERR(priv->rst_phy)) {
++		if (PTR_ERR(priv->rst_phy) != -EPROBE_DEFER)
++			dev_err(&pdev->dev, "phy reset is missing\n");
++		return PTR_ERR(priv->rst_phy);
++	}
++
++	priv->rst_phy_analog = devm_reset_control_get_optional(
++		&pdev->dev, "usb-phy-analog");
++	if (IS_ERR(priv->rst_phy_analog)) {
++		if (PTR_ERR(priv->rst_phy_analog) == -ENOENT)
++			priv->rst_phy_analog = NULL;
++		else
++			return PTR_ERR(priv->rst_phy_analog);
++	}
++
++	priv->suspend_override = devm_reset_control_get_optional(
++		&pdev->dev, "usb-suspend-override");
++	if (IS_ERR(priv->suspend_override)) {
++		if (PTR_ERR(priv->suspend_override) == -ENOENT)
++			priv->suspend_override = NULL;
++		else
++			return PTR_ERR(priv->suspend_override);
++	}
++
++	priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7200_usb_phy_ops);
++	if (IS_ERR(priv->phy)) {
++		dev_err(&pdev->dev, "failed to create PHY\n");
++		return PTR_ERR(priv->phy);
++	}
++
++	priv->gpio = of_get_gpio(pdev->dev.of_node, 0);
++	if (priv->gpio >= 0) {
++		int ret = devm_gpio_request(&pdev->dev, priv->gpio, dev_name(&pdev->dev));
++
++		if (ret) {
++			dev_err(&pdev->dev, "failed to request gpio\n");
++			return ret;
++		}
++		gpio_export_with_name(priv->gpio, 0, dev_name(&pdev->dev));
++		gpio_set_value(priv->gpio, 1);
++	}
++
++	phy_set_drvdata(priv->phy, priv);
++
++	phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
++
++	return PTR_ERR_OR_ZERO(phy_provider);
++}
++
++static const struct of_device_id ar7200_usb_phy_of_match[] = {
++	{ .compatible = "qca,ar7200-usb-phy" },
++	{}
++};
++MODULE_DEVICE_TABLE(of, ar7200_usb_phy_of_match);
++
++static struct platform_driver ar7200_usb_phy_driver = {
++	.probe	= ar7200_usb_phy_probe,
++	.driver = {
++		.of_match_table	= ar7200_usb_phy_of_match,
++		.name		= "ar7200-usb-phy",
++	}
++};
++module_platform_driver(ar7200_usb_phy_driver);
++
++MODULE_DESCRIPTION("ATH79 USB PHY driver");
++MODULE_AUTHOR("Alban Bedel <albeu at free.fr>");
++MODULE_LICENSE("GPL");
diff --git a/target/linux/ath79/patches-6.1/701-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-6.1/701-usb-add-more-OF-quirk-properties.patch
new file mode 100644
index 0000000000..293a359884
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/701-usb-add-more-OF-quirk-properties.patch
@@ -0,0 +1,24 @@
+From 2201818e5bd33f389beceb3943fdfcf5a698fc5b Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Tue, 6 Mar 2018 10:01:43 +0100
+Subject: [PATCH 05/27] usb: add more OF/quirk properties
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/usb/host/ehci-platform.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/usb/host/ehci-platform.c
++++ b/drivers/usb/host/ehci-platform.c
+@@ -274,6 +274,11 @@ static int ehci_platform_probe(struct pl
+ 	ehci = hcd_to_ehci(hcd);
+ 
+ 	if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
++		of_property_read_u32(dev->dev.of_node, "caps-offset", &pdata->caps_offset);
++
++		if (of_property_read_bool(dev->dev.of_node, "has-synopsys-hc-bug"))
++			pdata->has_synopsys_hc_bug = 1;
++
+ 		if (of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
+ 			ehci->big_endian_mmio = 1;
+ 
diff --git a/target/linux/ath79/patches-6.1/710-net-use-downstream-ag71xx.patch b/target/linux/ath79/patches-6.1/710-net-use-downstream-ag71xx.patch
new file mode 100644
index 0000000000..54e64fb11c
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/710-net-use-downstream-ag71xx.patch
@@ -0,0 +1,42 @@
+From: John Crispin <john at phrozen.org>
+Subject: [PATCH] ath79: add new OF only target for QCA MIPS silicon
+
+This target aims to replace ar71xx mid-term. The big part that is still
+missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
+subtargets will follow.
+
+Submitted-by: John Crispin <john at phrozen.org>
+---
+ drivers/net/ethernet/atheros/Kconfig          | 8 +-------
+ drivers/net/ethernet/atheros/Makefile         | 2 +-
+ 2 files changed, 2 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/atheros/Kconfig
++++ b/drivers/net/ethernet/atheros/Kconfig
+@@ -17,14 +17,7 @@ config NET_VENDOR_ATHEROS
+ 
+ if NET_VENDOR_ATHEROS
+ 
+-config AG71XX
+-	tristate "Atheros AR7XXX/AR9XXX built-in ethernet mac support"
+-	depends on ATH79
+-	select PHYLINK
+-	imply NET_SELFTESTS
+-	help
+-	  If you wish to compile a kernel for AR7XXX/91XXX and enable
+-	  ethernet support, then you should always answer Y to this.
++source "drivers/net/ethernet/atheros/ag71xx/Kconfig"
+ 
+ config ATL2
+ 	tristate "Atheros L2 Fast Ethernet support"
+--- a/drivers/net/ethernet/atheros/Makefile
++++ b/drivers/net/ethernet/atheros/Makefile
+@@ -3,7 +3,7 @@
+ # Makefile for the Atheros network device drivers.
+ #
+ 
+-obj-$(CONFIG_AG71XX) += ag71xx.o
++obj-$(CONFIG_AG71XX) += ag71xx/
+ obj-$(CONFIG_ATL1) += atlx/
+ obj-$(CONFIG_ATL2) += atlx/
+ obj-$(CONFIG_ATL1E) += atl1e/
diff --git a/target/linux/ath79/patches-6.1/720-mdio_bitbang_ignore_ta_value.patch b/target/linux/ath79/patches-6.1/720-mdio_bitbang_ignore_ta_value.patch
new file mode 100644
index 0000000000..5363bb37b0
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/720-mdio_bitbang_ignore_ta_value.patch
@@ -0,0 +1,44 @@
+From: Jonas Gorski <jogo at openwrt.org>
+Subject: ar71xx: add a workaround for ar8316 not always driving the TA bit to low
+
+AR8316 behind a GPIO bitbanged MDIO bus fails to drive the turnaround bit
+to low despite returning a valid value. Ignore it and just use the
+returned value anyway.
+
+SVN-Revision: 28422
+---
+ drivers/net/mdio/mdio-bitbang.c               | 16 ++-----------------
+ 1 file changed, 2 insertions(+), 14 deletions(-)
+
+--- a/drivers/net/mdio/mdio-bitbang.c
++++ b/drivers/net/mdio/mdio-bitbang.c
+@@ -152,7 +152,7 @@ static int mdiobb_cmd_addr(struct mdiobb
+ int mdiobb_read(struct mii_bus *bus, int phy, int reg)
+ {
+ 	struct mdiobb_ctrl *ctrl = bus->priv;
+-	int ret, i;
++	int ret;
+ 
+ 	if (reg & MII_ADDR_C45) {
+ 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
+@@ -162,19 +162,7 @@ int mdiobb_read(struct mii_bus *bus, int
+ 
+ 	ctrl->ops->set_mdio_dir(ctrl, 0);
+ 
+-	/* check the turnaround bit: the PHY should be driving it to zero, if this
+-	 * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
+-	 */
+-	if (mdiobb_get_bit(ctrl) != 0 &&
+-	    !(bus->phy_ignore_ta_mask & (1 << phy))) {
+-		/* PHY didn't drive TA low -- flush any bits it
+-		 * may be trying to send.
+-		 */
+-		for (i = 0; i < 32; i++)
+-			mdiobb_get_bit(ctrl);
+-
+-		return 0xffff;
+-	}
++	mdiobb_get_bit(ctrl);
+ 
+ 	ret = mdiobb_get_num(ctrl, 16);
+ 	mdiobb_get_bit(ctrl);
diff --git a/target/linux/ath79/patches-6.1/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch b/target/linux/ath79/patches-6.1/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
new file mode 100644
index 0000000000..e37d9a1f63
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
@@ -0,0 +1,61 @@
+From 66e584435ac0de6e0abeb6d7166fe4fe25d6bb73 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jogo at openwrt.org>
+Date: Tue, 16 Jun 2015 13:15:08 +0200
+Subject: [PATCH] phy/mdio-bitbang: prevent rescheduling during command
+
+It seems some phys have some maximum timings for accessing the MDIO line,
+resulting in bit errors under cpu stress. Prevent this from happening by
+disabling interrupts when sending commands.
+
+Signed-off-by: Jonas Gorski <jogo at openwrt.org>
+---
+ drivers/net/mdio/mdio-bitbang.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/net/mdio/mdio-bitbang.c
++++ b/drivers/net/mdio/mdio-bitbang.c
+@@ -14,6 +14,7 @@
+  * Vitaly Bordug <vbordug at ru.mvista.com>
+  */
+ 
++#include <linux/irqflags.h>
+ #include <linux/delay.h>
+ #include <linux/mdio-bitbang.h>
+ #include <linux/module.h>
+@@ -153,7 +154,9 @@ int mdiobb_read(struct mii_bus *bus, int
+ {
+ 	struct mdiobb_ctrl *ctrl = bus->priv;
+ 	int ret;
++	unsigned long flags;
+ 
++	local_irq_save(flags);
+ 	if (reg & MII_ADDR_C45) {
+ 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
+ 		mdiobb_cmd(ctrl, MDIO_C45_READ, phy, reg);
+@@ -166,6 +169,7 @@ int mdiobb_read(struct mii_bus *bus, int
+ 
+ 	ret = mdiobb_get_num(ctrl, 16);
+ 	mdiobb_get_bit(ctrl);
++	local_irq_restore(flags);
+ 	return ret;
+ }
+ EXPORT_SYMBOL(mdiobb_read);
+@@ -173,7 +177,9 @@ EXPORT_SYMBOL(mdiobb_read);
+ int mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
+ {
+ 	struct mdiobb_ctrl *ctrl = bus->priv;
++	unsigned long flags;
+ 
++	local_irq_save(flags);
+ 	if (reg & MII_ADDR_C45) {
+ 		reg = mdiobb_cmd_addr(ctrl, phy, reg);
+ 		mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, reg);
+@@ -188,6 +194,8 @@ int mdiobb_write(struct mii_bus *bus, in
+ 
+ 	ctrl->ops->set_mdio_dir(ctrl, 0);
+ 	mdiobb_get_bit(ctrl);
++	local_irq_restore(flags);
++
+ 	return 0;
+ }
+ EXPORT_SYMBOL(mdiobb_write);
diff --git a/target/linux/ath79/patches-6.1/730-ar8216-make-reg-access-atomic.patch b/target/linux/ath79/patches-6.1/730-ar8216-make-reg-access-atomic.patch
new file mode 100644
index 0000000000..02f763534e
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/730-ar8216-make-reg-access-atomic.patch
@@ -0,0 +1,59 @@
+From b3797d1a92afe97c173b00fdb7824cedba24eef0 Mon Sep 17 00:00:00 2001
+From: Chuanhong Guo <gch981213 at gmail.com>
+Date: Sun, 20 Sep 2020 01:00:45 +0800
+Subject: [PATCH] ath79: ar8216: make switch register access atomic
+
+due to some unknown reason these register accesses sometimes fail
+on the integrated switch without this patch.
+
+THIS ONLY WORKS ON ATH79 AND MAY BREAK THE DRIVER ON OTHER PLATFORMS!
+The mdio bus on ath79 works in polling mode and doesn't rely on
+any interrupt. This patch breaks the driver on any mdio master
+with interrupts used.
+
+---
+--- a/drivers/net/phy/ar8216.c
++++ b/drivers/net/phy/ar8216.c
+@@ -252,6 +252,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p
+ u32
+ ar8xxx_read(struct ar8xxx_priv *priv, int reg)
+ {
++	unsigned long flags;
+ 	struct mii_bus *bus = priv->mii_bus;
+ 	u16 r1, r2, page;
+ 	u32 val;
+@@ -259,11 +260,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
+ 	split_addr((u32) reg, &r1, &r2, &page);
+ 
+ 	mutex_lock(&bus->mdio_lock);
++	local_irq_save(flags);
+ 
+ 	bus->write(bus, 0x18, 0, page);
+ 	wait_for_page_switch();
+ 	val = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
+ 
++	local_irq_restore(flags);
+ 	mutex_unlock(&bus->mdio_lock);
+ 
+ 	return val;
+@@ -272,17 +275,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
+ void
+ ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
+ {
++	unsigned long flags;
+ 	struct mii_bus *bus = priv->mii_bus;
+ 	u16 r1, r2, page;
+ 
+ 	split_addr((u32) reg, &r1, &r2, &page);
+ 
+ 	mutex_lock(&bus->mdio_lock);
++	local_irq_save(flags);
+ 
+ 	bus->write(bus, 0x18, 0, page);
+ 	wait_for_page_switch();
+ 	ar8xxx_mii_write32(priv, 0x10 | r2, r1, val);
+ 
++	local_irq_restore(flags);
+ 	mutex_unlock(&bus->mdio_lock);
+ }
+ 
diff --git a/target/linux/ath79/patches-6.1/800-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-6.1/800-leds-add-reset-controller-based-driver.patch
new file mode 100644
index 0000000000..0002b9b95b
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/800-leds-add-reset-controller-based-driver.patch
@@ -0,0 +1,186 @@
+From ecbd9c87f073f097d9fe56390353e64e963e866a Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Tue, 6 Mar 2018 10:03:03 +0100
+Subject: [PATCH 03/27] leds: add reset-controller based driver
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/leds/Kconfig      |  11 ++++
+ drivers/leds/Makefile     |   1 +
+ drivers/leds/leds-reset.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 149 insertions(+)
+ create mode 100644 drivers/leds/leds-reset.c
+
+--- a/drivers/leds/Kconfig
++++ b/drivers/leds/Kconfig
+@@ -874,6 +874,17 @@ source "drivers/leds/flash/Kconfig"
+ comment "RGB LED drivers"
+ source "drivers/leds/rgb/Kconfig"
+ 
++config LEDS_RESET
++	tristate "LED support for reset-controller API"
++	depends on LEDS_CLASS
++	depends on RESET_CONTROLLER
++	help
++	  This option enables support for LEDs connected to pins driven by reset
++	  controllers. Yes, DNI actual built HW like that.
++
++	  To compile this driver as a module, choose M here: the module
++	  will be called leds-reset.
++
+ comment "LED Triggers"
+ source "drivers/leds/trigger/Kconfig"
+ 
+--- /dev/null
++++ b/drivers/leds/leds-reset.c
+@@ -0,0 +1,140 @@
++/*
++ * Copyright (C) 2018 John Crispin <john at phrozen.org>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++#include <linux/err.h>
++#include <linux/reset.h>
++#include <linux/kernel.h>
++#include <linux/leds.h>
++#include <linux/module.h>
++#include <linux/of.h>
++#include <linux/platform_device.h>
++#include <linux/reset.h>
++
++struct reset_led_data {
++	struct led_classdev cdev;
++	struct reset_control *rst;
++};
++
++static inline struct reset_led_data *
++			cdev_to_reset_led_data(struct led_classdev *led_cdev)
++{
++	return container_of(led_cdev, struct reset_led_data, cdev);
++}
++
++static void reset_led_set(struct led_classdev *led_cdev,
++	enum led_brightness value)
++{
++	struct reset_led_data *led_dat = cdev_to_reset_led_data(led_cdev);
++
++	if (value == LED_OFF)
++		reset_control_assert(led_dat->rst);
++	else
++		reset_control_deassert(led_dat->rst);
++}
++
++struct reset_leds_priv {
++	int num_leds;
++	struct reset_led_data leds[];
++};
++
++static inline int sizeof_reset_leds_priv(int num_leds)
++{
++	return sizeof(struct reset_leds_priv) +
++		(sizeof(struct reset_led_data) * num_leds);
++}
++
++static struct reset_leds_priv *reset_leds_create(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct fwnode_handle *child;
++	struct reset_leds_priv *priv;
++	int count, ret;
++
++	count = device_get_child_node_count(dev);
++	if (!count)
++		return ERR_PTR(-ENODEV);
++
++	priv = devm_kzalloc(dev, sizeof_reset_leds_priv(count), GFP_KERNEL);
++	if (!priv)
++		return ERR_PTR(-ENOMEM);
++
++	device_for_each_child_node(dev, child) {
++		struct reset_led_data *led = &priv->leds[priv->num_leds];
++		struct device_node *np = to_of_node(child);
++
++		ret = fwnode_property_read_string(child, "label", &led->cdev.name);
++		if (!led->cdev.name) {
++			fwnode_handle_put(child);
++			return ERR_PTR(-EINVAL);
++		}
++		led->rst = __of_reset_control_get(np, NULL, 0, 0, 0, true);
++		if (IS_ERR(led->rst))
++			return ERR_PTR(-EINVAL);
++
++		fwnode_property_read_string(child, "linux,default-trigger",
++						&led->cdev.default_trigger);
++
++		led->cdev.brightness_set = reset_led_set;
++		ret = devm_led_classdev_register(&pdev->dev, &led->cdev);
++		if (ret < 0)
++			return ERR_PTR(ret);
++		led->cdev.dev->of_node = np;
++		priv->num_leds++;
++	}
++
++	return priv;
++}
++
++static const struct of_device_id of_reset_leds_match[] = {
++	{ .compatible = "reset-leds", },
++	{},
++};
++
++MODULE_DEVICE_TABLE(of, of_reset_leds_match);
++
++static int reset_led_probe(struct platform_device *pdev)
++{
++	struct reset_leds_priv *priv;
++
++	priv = reset_leds_create(pdev);
++	if (IS_ERR(priv))
++		return PTR_ERR(priv);
++
++	platform_set_drvdata(pdev, priv);
++
++	return 0;
++}
++
++static void reset_led_shutdown(struct platform_device *pdev)
++{
++	struct reset_leds_priv *priv = platform_get_drvdata(pdev);
++	int i;
++
++	for (i = 0; i < priv->num_leds; i++) {
++		struct reset_led_data *led = &priv->leds[i];
++
++		if (!(led->cdev.flags & LED_RETAIN_AT_SHUTDOWN))
++			reset_led_set(&led->cdev, LED_OFF);
++	}
++}
++
++static struct platform_driver reset_led_driver = {
++	.probe		= reset_led_probe,
++	.shutdown	= reset_led_shutdown,
++	.driver		= {
++		.name	= "leds-reset",
++		.of_match_table = of_reset_leds_match,
++	},
++};
++
++module_platform_driver(reset_led_driver);
++
++MODULE_AUTHOR("John Crispin <john at phrozen.org>");
++MODULE_DESCRIPTION("reset controller LED driver");
++MODULE_LICENSE("GPL");
++MODULE_ALIAS("platform:leds-reset");
+--- a/drivers/leds/Makefile
++++ b/drivers/leds/Makefile
+@@ -86,6 +86,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA)		+= leds
+ obj-$(CONFIG_LEDS_WM831X_STATUS)	+= leds-wm831x-status.o
+ obj-$(CONFIG_LEDS_WM8350)		+= leds-wm8350.o
+ obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
++obj-$(CONFIG_LEDS_RESET)		+= leds-reset.o
+ 
+ # LED SPI Drivers
+ obj-$(CONFIG_LEDS_CR0014114)		+= leds-cr0014114.o
diff --git a/target/linux/ath79/patches-6.1/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch b/target/linux/ath79/patches-6.1/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
new file mode 100644
index 0000000000..980c265fe6
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
@@ -0,0 +1,33 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Wed, 31 May 2023 00:15:23 +0000
+Subject: [PATCH] ath79: ignore the abused interrupt-map on pcie node
+
+ath79 PCIe interrupt controller has stopped working correctly. This
+is because the DT exposing a non-sensical interrupt-map property,
+and their drivers relying on the kernel ignoring this property[1].
+
+This patch fix the pcie init error:
+ath9k 0000:00:00.0: of_irq_parse_pci: failed with rc=-14
+
+Notice:
+This is just a workaround, not a fix. PCIe driver and related dts
+node need to be rewritten.
+
+[1] https://lore.kernel.org/all/20211201114102.13446-1-maz at kernel.org/
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ drivers/of/irq.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/of/irq.c
++++ b/drivers/of/irq.c
+@@ -86,6 +86,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent);
+  * drawing board.
+  */
+ static const char * const of_irq_imap_abusers[] = {
++	"qca,ar7100-pci",
++	"qcom,ar7240-pci",
+ 	"CBEA,platform-spider-pic",
+ 	"sti,platform-spider-pic",
+ 	"realtek,rtl-intc",
diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
new file mode 100644
index 0000000000..6c97bc307c
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
@@ -0,0 +1,909 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Subject: [PATCH] ar71xx: fix unaligned access in a few more places
+
+SVN-Revision: 35130
+---
+ arch/mips/include/asm/checksum.h              | 83 +++---------------
+ include/uapi/linux/ip.h                       |  2 +-
+ include/uapi/linux/ipv6.h                     |  2 +-
+ include/uapi/linux/tcp.h                      |  4 ++--
+ include/uapi/linux/udp.h                      |  2 +-
+ net/netfilter/nf_conntrack_core.c             |  4 ++--
+ include/uapi/linux/icmp.h                     |  2 +-
+ include/uapi/linux/in6.h                      |  2 +-
+ net/ipv6/tcp_ipv6.c                           |  9 +++--
+ net/ipv6/datagram.c                           |  6 ++--
+ net/ipv6/exthdrs.c                            |  2 +-
+ include/linux/types.h                         |  5 +++
+ net/ipv4/af_inet.c                            |  4 ++--
+ net/ipv4/tcp_output.c                         | 69 +++++++++--------
+ include/uapi/linux/igmp.h                     |  8 +++---
+ net/core/flow_dissector.c                     |  2 +-
+ include/uapi/linux/icmpv6.h                   |  2 +-
+ include/net/ndisc.h                           | 10 ++++----
+ net/sched/cls_u32.c                           |  6 +++---
+ net/ipv6/ip6_offload.c                        |  2 +-
+ include/net/addrconf.h                        |  2 +-
+ include/net/inet_ecn.h                        |  4 ++--
+ include/net/ipv6.h                            | 23 +++++----
+ include/net/secure_seq.h                      |  1 +
+ include/uapi/linux/in.h                       |  2 +-
+ net/ipv6/ip6_fib.h                            |  2 +-
+ net/netfilter/nf_conntrack_proto_tcp.c        |  2 +-
+ net/xfrm/xfrm_input.c                         |  4 ++--
+ net/ipv4/tcp_input.c                          | 12 ++++---
+ include/uapi/linux/if_pppox.h                 |  1 +
+ net/ipv6/netfilter/nf_log_ipv6.c              |  4 ++--
+ include/net/neighbour.h                       |  6 +++--
+ include/uapi/linux/netfilter_arp/arp_tables.h |  2 +-
+ net/core/utils.c                              | 10 +++++--
+ include/linux/etherdevice.h                   | 11 ++++---
+ net/ipv4/tcp_offload.c                        |  6 +++---
+ net/ipv6/netfilter/ip6table_mangle.c          |  4 ++--
+ 37 file changed, 171 insertions(+), 141 deletions(-)
+
+--- a/arch/mips/include/asm/checksum.h
++++ b/arch/mips/include/asm/checksum.h
+@@ -100,26 +100,30 @@ static inline __sum16 ip_fast_csum(const
+ 	const unsigned int *stop = word + ihl;
+ 	unsigned int csum;
+ 	int carry;
++	unsigned int w;
+ 
+-	csum = word[0];
+-	csum += word[1];
+-	carry = (csum < word[1]);
++	csum = net_hdr_word(word++);
++
++	w = net_hdr_word(word++);
++	csum += w;
++	carry = (csum < w);
+ 	csum += carry;
+ 
+-	csum += word[2];
+-	carry = (csum < word[2]);
++	w = net_hdr_word(word++);
++	csum += w;
++	carry = (csum < w);
+ 	csum += carry;
+ 
+-	csum += word[3];
+-	carry = (csum < word[3]);
++	w = net_hdr_word(word++);
++	csum += w;
++	carry = (csum < w);
+ 	csum += carry;
+ 
+-	word += 4;
+ 	do {
+-		csum += *word;
+-		carry = (csum < *word);
++		w = net_hdr_word(word++);
++		csum += w;
++		carry = (csum < w);
+ 		csum += carry;
+-		word++;
+ 	} while (word != stop);
+ 
+ 	return csum_fold(csum);
+@@ -179,74 +183,6 @@ static inline __sum16 ip_compute_csum(co
+ 	return csum_fold(csum_partial(buff, len, 0));
+ }
+ 
+-#define _HAVE_ARCH_IPV6_CSUM
+-static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
+-					  const struct in6_addr *daddr,
+-					  __u32 len, __u8 proto,
+-					  __wsum sum)
+-{
+-	__wsum tmp;
+-
+-	__asm__(
+-	"	.set	push		# csum_ipv6_magic\n"
+-	"	.set	noreorder	\n"
+-	"	.set	noat		\n"
+-	"	addu	%0, %5		# proto (long in network byte order)\n"
+-	"	sltu	$1, %0, %5	\n"
+-	"	addu	%0, $1		\n"
+-
+-	"	addu	%0, %6		# csum\n"
+-	"	sltu	$1, %0, %6	\n"
+-	"	lw	%1, 0(%2)	# four words source address\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 4(%2)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 8(%2)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 12(%2)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 0(%3)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 4(%3)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 8(%3)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	lw	%1, 12(%3)	\n"
+-	"	addu	%0, $1		\n"
+-	"	addu	%0, %1		\n"
+-	"	sltu	$1, %0, %1	\n"
+-
+-	"	addu	%0, $1		# Add final carry\n"
+-	"	.set	pop"
+-	: "=&r" (sum), "=&r" (tmp)
+-	: "r" (saddr), "r" (daddr),
+-	  "0" (htonl(len)), "r" (htonl(proto)), "r" (sum)
+-	: "memory");
+-
+-	return csum_fold(sum);
+-}
+-
+ #include <asm-generic/checksum.h>
+ #endif /* CONFIG_GENERIC_CSUM */
+ 
+--- a/include/uapi/linux/ip.h
++++ b/include/uapi/linux/ip.h
+@@ -106,7 +106,7 @@ struct iphdr {
+ 		__be32	daddr;
+ 	);
+ 	/*The options start here. */
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ 
+ struct ip_auth_hdr {
+--- a/include/uapi/linux/ipv6.h
++++ b/include/uapi/linux/ipv6.h
+@@ -135,7 +135,7 @@ struct ipv6hdr {
+ 		struct	in6_addr	saddr;
+ 		struct	in6_addr	daddr;
+ 	);
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ 
+ /* index values for the variables in ipv6_devconf */
+--- a/include/uapi/linux/tcp.h
++++ b/include/uapi/linux/tcp.h
+@@ -55,7 +55,7 @@ struct tcphdr {
+ 	__be16	window;
+ 	__sum16	check;
+ 	__be16	urg_ptr;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ /*
+  *	The union cast uses a gcc extension to avoid aliasing problems
+@@ -65,7 +65,7 @@ struct tcphdr {
+ union tcp_word_hdr {
+ 	struct tcphdr hdr;
+ 	__be32        words[5];
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3])
+ 
+--- a/include/uapi/linux/udp.h
++++ b/include/uapi/linux/udp.h
+@@ -25,7 +25,7 @@ struct udphdr {
+ 	__be16	dest;
+ 	__be16	len;
+ 	__sum16	check;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ /* UDP socket options */
+ #define UDP_CORK	1	/* Never send partially complete segments */
+--- a/net/netfilter/nf_conntrack_core.c
++++ b/net/netfilter/nf_conntrack_core.c
+@@ -308,8 +308,8 @@ nf_ct_get_tuple(const struct sk_buff *sk
+ 
+ 	switch (l3num) {
+ 	case NFPROTO_IPV4:
+-		tuple->src.u3.ip = ap[0];
+-		tuple->dst.u3.ip = ap[1];
++		tuple->src.u3.ip = net_hdr_word(ap++);
++		tuple->dst.u3.ip = net_hdr_word(ap);
+ 		break;
+ 	case NFPROTO_IPV6:
+ 		memcpy(tuple->src.u3.ip6, ap, sizeof(tuple->src.u3.ip6));
+--- a/include/uapi/linux/icmp.h
++++ b/include/uapi/linux/icmp.h
+@@ -102,7 +102,7 @@ struct icmphdr {
+ 	} frag;
+ 	__u8	reserved[4];
+   } un;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ 
+ /*
+--- a/include/uapi/linux/in6.h
++++ b/include/uapi/linux/in6.h
+@@ -43,7 +43,7 @@ struct in6_addr {
+ #define s6_addr16		in6_u.u6_addr16
+ #define s6_addr32		in6_u.u6_addr32
+ #endif
+-};
++} __attribute__((packed, aligned(2)));
+ #endif /* __UAPI_DEF_IN6_ADDR */
+ 
+ #if __UAPI_DEF_SOCKADDR_IN6
+--- a/net/ipv6/tcp_ipv6.c
++++ b/net/ipv6/tcp_ipv6.c
+@@ -35,6 +35,7 @@
+ #include <linux/ipsec.h>
+ #include <linux/times.h>
+ #include <linux/slab.h>
++#include <asm/unaligned.h>
+ #include <linux/uaccess.h>
+ #include <linux/ipv6.h>
+ #include <linux/icmpv6.h>
+@@ -901,10 +902,10 @@ static void tcp_v6_send_response(const s
+ 	topt = (__be32 *)(t1 + 1);
+ 
+ 	if (tsecr) {
+-		*topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
+-				(TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
+-		*topt++ = htonl(tsval);
+-		*topt++ = htonl(tsecr);
++		put_unaligned_be32((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
++				(TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP, topt++);
++		put_unaligned_be32(tsval, topt++);
++		put_unaligned_be32(tsecr, topt++);
+ 	}
+ 
+ 	if (mrst)
+--- a/include/linux/ipv6.h
++++ b/include/linux/ipv6.h
+@@ -6,6 +6,7 @@
+ 
+ #define ipv6_optlen(p)  (((p)->hdrlen+1) << 3)
+ #define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
++
+ /*
+  * This structure contains configuration options per IPv6 link.
+  */
+--- a/net/ipv6/datagram.c
++++ b/net/ipv6/datagram.c
+@@ -497,7 +497,7 @@ int ipv6_recv_error(struct sock *sk, str
+ 				ipv6_iface_scope_id(&sin->sin6_addr,
+ 						    IP6CB(skb)->iif);
+ 		} else {
+-			ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset),
++			ipv6_addr_set_v4mapped(net_hdr_word(nh + serr->addr_offset),
+ 					       &sin->sin6_addr);
+ 			sin->sin6_scope_id = 0;
+ 		}
+@@ -851,12 +851,12 @@ int ip6_datagram_send_ctl(struct net *ne
+ 			}
+ 
+ 			if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
+-				if ((fl6->flowlabel^*(__be32 *)CMSG_DATA(cmsg))&~IPV6_FLOWINFO_MASK) {
++				if ((fl6->flowlabel^net_hdr_word(CMSG_DATA(cmsg)))&~IPV6_FLOWINFO_MASK) {
+ 					err = -EINVAL;
+ 					goto exit_f;
+ 				}
+ 			}
+-			fl6->flowlabel = IPV6_FLOWINFO_MASK & *(__be32 *)CMSG_DATA(cmsg);
++			fl6->flowlabel = IPV6_FLOWINFO_MASK & net_hdr_word(CMSG_DATA(cmsg));
+ 			break;
+ 
+ 		case IPV6_2292HOPOPTS:
+--- a/net/ipv6/exthdrs.c
++++ b/net/ipv6/exthdrs.c
+@@ -1013,7 +1013,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+ 		goto drop;
+ 	}
+ 
+-	pkt_len = ntohl(*(__be32 *)(nh + optoff + 2));
++	pkt_len = ntohl(net_hdr_word(nh + optoff + 2));
+ 	if (pkt_len <= IPV6_MAXPLEN) {
+ 		icmpv6_param_prob_reason(skb, ICMPV6_HDR_FIELD, optoff + 2,
+ 					 SKB_DROP_REASON_IP_INHDR);
+--- a/include/linux/types.h
++++ b/include/linux/types.h
+@@ -232,5 +232,11 @@ typedef void (*swap_func_t)(void *a, voi
+ typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
+ typedef int (*cmp_func_t)(const void *a, const void *b);
+ 
++struct net_hdr_word {
++       u32 words[1];
++} __attribute__((packed, aligned(2)));
++
++#define net_hdr_word(_p) (((struct net_hdr_word *) (_p))->words[0])
++
+ #endif /*  __ASSEMBLY__ */
+ #endif /* _LINUX_TYPES_H */
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1515,8 +1515,8 @@ struct sk_buff *inet_gro_receive(struct
+ 	if (unlikely(ip_fast_csum((u8 *)iph, 5)))
+ 		goto out;
+ 
+-	id = ntohl(*(__be32 *)&iph->id);
+-	flush = (u16)((ntohl(*(__be32 *)iph) ^ skb_gro_len(skb)) | (id & ~IP_DF));
++	id = ntohl(net_hdr_word(&iph->id));
++	flush = (u16)((ntohl(net_hdr_word(iph)) ^ skb_gro_len(skb)) | (id & ~IP_DF));
+ 	id >>= 16;
+ 
+ 	list_for_each_entry(p, head, list) {
+--- a/net/ipv4/tcp_output.c
++++ b/net/ipv4/tcp_output.c
+@@ -612,48 +612,53 @@ static void tcp_options_write(struct tcp
+ 	u16 options = opts->options;	/* mungable copy */
+ 
+ 	if (unlikely(OPTION_MD5 & options)) {
+-		*ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
+-			       (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
++		net_hdr_word(ptr++) =
++			htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
++			      (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
+ 		/* overload cookie hash location */
+ 		opts->hash_location = (__u8 *)ptr;
+ 		ptr += 4;
+ 	}
+ 
+ 	if (unlikely(opts->mss)) {
+-		*ptr++ = htonl((TCPOPT_MSS << 24) |
+-			       (TCPOLEN_MSS << 16) |
+-			       opts->mss);
++		net_hdr_word(ptr++) =
++			htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) |
++			      opts->mss);
+ 	}
+ 
+ 	if (likely(OPTION_TS & options)) {
+ 		if (unlikely(OPTION_SACK_ADVERTISE & options)) {
+-			*ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
+-				       (TCPOLEN_SACK_PERM << 16) |
+-				       (TCPOPT_TIMESTAMP << 8) |
+-				       TCPOLEN_TIMESTAMP);
++			net_hdr_word(ptr++) =
++				htonl((TCPOPT_SACK_PERM << 24) |
++				      (TCPOLEN_SACK_PERM << 16) |
++				      (TCPOPT_TIMESTAMP << 8) |
++				      TCPOLEN_TIMESTAMP);
+ 			options &= ~OPTION_SACK_ADVERTISE;
+ 		} else {
+-			*ptr++ = htonl((TCPOPT_NOP << 24) |
+-				       (TCPOPT_NOP << 16) |
+-				       (TCPOPT_TIMESTAMP << 8) |
+-				       TCPOLEN_TIMESTAMP);
++			net_hdr_word(ptr++) =
++				htonl((TCPOPT_NOP << 24) |
++				      (TCPOPT_NOP << 16) |
++				      (TCPOPT_TIMESTAMP << 8) |
++				      TCPOLEN_TIMESTAMP);
+ 		}
+-		*ptr++ = htonl(opts->tsval);
+-		*ptr++ = htonl(opts->tsecr);
++		net_hdr_word(ptr++) = htonl(opts->tsval);
++		net_hdr_word(ptr++) = htonl(opts->tsecr);
+ 	}
+ 
+ 	if (unlikely(OPTION_SACK_ADVERTISE & options)) {
+-		*ptr++ = htonl((TCPOPT_NOP << 24) |
+-			       (TCPOPT_NOP << 16) |
+-			       (TCPOPT_SACK_PERM << 8) |
+-			       TCPOLEN_SACK_PERM);
++		net_hdr_word(ptr++) =
++			htonl((TCPOPT_NOP << 24) |
++			      (TCPOPT_NOP << 16) |
++			      (TCPOPT_SACK_PERM << 8) |
++			      TCPOLEN_SACK_PERM);
+ 	}
+ 
+ 	if (unlikely(OPTION_WSCALE & options)) {
+-		*ptr++ = htonl((TCPOPT_NOP << 24) |
+-			       (TCPOPT_WINDOW << 16) |
+-			       (TCPOLEN_WINDOW << 8) |
+-			       opts->ws);
++		net_hdr_word(ptr++) =
++			htonl((TCPOPT_NOP << 24) |
++			      (TCPOPT_WINDOW << 16) |
++			      (TCPOLEN_WINDOW << 8) |
++			      opts->ws);
+ 	}
+ 
+ 	if (unlikely(opts->num_sack_blocks)) {
+@@ -661,16 +666,17 @@ static void tcp_options_write(struct tcp
+ 			tp->duplicate_sack : tp->selective_acks;
+ 		int this_sack;
+ 
+-		*ptr++ = htonl((TCPOPT_NOP  << 24) |
+-			       (TCPOPT_NOP  << 16) |
+-			       (TCPOPT_SACK <<  8) |
+-			       (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
++		net_hdr_word(ptr++) =
++			htonl((TCPOPT_NOP << 24) |
++			      (TCPOPT_NOP << 16) |
++			      (TCPOPT_SACK << 8) |
++			      (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
+ 						     TCPOLEN_SACK_PERBLOCK)));
+ 
+ 		for (this_sack = 0; this_sack < opts->num_sack_blocks;
+ 		     ++this_sack) {
+-			*ptr++ = htonl(sp[this_sack].start_seq);
+-			*ptr++ = htonl(sp[this_sack].end_seq);
++			net_hdr_word(ptr++) = htonl(sp[this_sack].start_seq);
++			net_hdr_word(ptr++) = htonl(sp[this_sack].end_seq);
+ 		}
+ 
+ 		tp->rx_opt.dsack = 0;
+@@ -683,13 +689,14 @@ static void tcp_options_write(struct tcp
+ 
+ 		if (foc->exp) {
+ 			len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
+-			*ptr = htonl((TCPOPT_EXP << 24) | (len << 16) |
++			net_hdr_word(ptr) =
++				htonl((TCPOPT_EXP << 24) | (len << 16) |
+ 				     TCPOPT_FASTOPEN_MAGIC);
+ 			p += TCPOLEN_EXP_FASTOPEN_BASE;
+ 		} else {
+ 			len = TCPOLEN_FASTOPEN_BASE + foc->len;
+-			*p++ = TCPOPT_FASTOPEN;
+-			*p++ = len;
++			net_hdr_word(p++) = TCPOPT_FASTOPEN;
++			net_hdr_word(p++) = len;
+ 		}
+ 
+ 		memcpy(p, foc->val, foc->len);
+--- a/include/uapi/linux/igmp.h
++++ b/include/uapi/linux/igmp.h
+@@ -33,7 +33,7 @@ struct igmphdr {
+ 	__u8 code;		/* For newer IGMP */
+ 	__sum16 csum;
+ 	__be32 group;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ /* V3 group record types [grec_type] */
+ #define IGMPV3_MODE_IS_INCLUDE		1
+@@ -49,7 +49,7 @@ struct igmpv3_grec {
+ 	__be16	grec_nsrcs;
+ 	__be32	grec_mca;
+ 	__be32	grec_src[];
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ struct igmpv3_report {
+ 	__u8 type;
+@@ -58,7 +58,7 @@ struct igmpv3_report {
+ 	__be16 resv2;
+ 	__be16 ngrec;
+ 	struct igmpv3_grec grec[];
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ struct igmpv3_query {
+ 	__u8 type;
+@@ -79,7 +79,7 @@ struct igmpv3_query {
+ 	__u8 qqic;
+ 	__be16 nsrcs;
+ 	__be32 srcs[];
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ #define IGMP_HOST_MEMBERSHIP_QUERY	0x11	/* From RFC1112 */
+ #define IGMP_HOST_MEMBERSHIP_REPORT	0x12	/* Ditto */
+--- a/net/core/flow_dissector.c
++++ b/net/core/flow_dissector.c
+@@ -131,7 +131,7 @@ __be32 __skb_flow_get_ports(const struct
+ 		ports = __skb_header_pointer(skb, thoff + poff,
+ 					     sizeof(_ports), data, hlen, &_ports);
+ 		if (ports)
+-			return *ports;
++			return (__be32)net_hdr_word(ports);
+ 	}
+ 
+ 	return 0;
+--- a/include/uapi/linux/icmpv6.h
++++ b/include/uapi/linux/icmpv6.h
+@@ -78,7 +78,7 @@ struct icmp6hdr {
+ #define icmp6_addrconf_other	icmp6_dataun.u_nd_ra.other
+ #define icmp6_rt_lifetime	icmp6_dataun.u_nd_ra.rt_lifetime
+ #define icmp6_router_pref	icmp6_dataun.u_nd_ra.router_pref
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ 
+ #define ICMPV6_ROUTER_PREF_LOW		0x3
+--- a/include/net/ndisc.h
++++ b/include/net/ndisc.h
+@@ -93,7 +93,7 @@ struct ra_msg {
+         struct icmp6hdr		icmph;
+ 	__be32			reachable_time;
+ 	__be32			retrans_timer;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ struct rd_msg {
+ 	struct icmp6hdr icmph;
+@@ -372,10 +372,10 @@ static inline u32 ndisc_hashfn(const voi
+ {
+ 	const u32 *p32 = pkey;
+ 
+-	return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) +
+-		(p32[1] * hash_rnd[1]) +
+-		(p32[2] * hash_rnd[2]) +
+-		(p32[3] * hash_rnd[3]));
++	return (((net_hdr_word(&p32[0]) ^ hash32_ptr(dev)) * hash_rnd[0]) +
++		(net_hdr_word(&p32[1]) * hash_rnd[1]) +
++		(net_hdr_word(&p32[2]) * hash_rnd[2]) +
++		(net_hdr_word(&p32[3]) * hash_rnd[3]));
+ }
+ 
+ static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey)
+--- a/net/sched/cls_u32.c
++++ b/net/sched/cls_u32.c
+@@ -155,7 +155,7 @@ next_knode:
+ 			data = skb_header_pointer(skb, toff, 4, &hdata);
+ 			if (!data)
+ 				goto out;
+-			if ((*data ^ key->val) & key->mask) {
++			if ((net_hdr_word(data) ^ key->val) & key->mask) {
+ 				n = rcu_dereference_bh(n->next);
+ 				goto next_knode;
+ 			}
+@@ -206,8 +206,8 @@ check_terminal:
+ 						  &hdata);
+ 			if (!data)
+ 				goto out;
+-			sel = ht->divisor & u32_hash_fold(*data, &n->sel,
+-							  n->fshift);
++			sel = ht->divisor & u32_hash_fold(net_hdr_word(data),
++							  &n->sel, n->fshift);
+ 		}
+ 		if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT)))
+ 			goto next_ht;
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -290,7 +290,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+ 			continue;
+ 
+ 		iph2 = (struct ipv6hdr *)(p->data + off);
+-		first_word = *(__be32 *)iph ^ *(__be32 *)iph2;
++		first_word = net_hdr_word(iph) ^ net_hdr_word(iph2);
+ 
+ 		/* All fields must match except length and Traffic Class.
+ 		 * XXX skbs on the gro_list have all been parsed and pulled
+--- a/include/net/addrconf.h
++++ b/include/net/addrconf.h
+@@ -52,7 +52,7 @@ struct prefix_info {
+ 	__be32			reserved2;
+ 
+ 	struct in6_addr		prefix;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ /* rfc4861 4.6.2: IPv6 PIO is 32 bytes in size */
+ static_assert(sizeof(struct prefix_info) == 32);
+--- a/include/net/inet_ecn.h
++++ b/include/net/inet_ecn.h
+@@ -138,9 +138,9 @@ static inline int IP6_ECN_set_ce(struct
+ 	if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
+ 		return 0;
+ 
+-	from = *(__be32 *)iph;
++	from = net_hdr_word(iph);
+ 	to = from | htonl(INET_ECN_CE << 20);
+-	*(__be32 *)iph = to;
++	net_hdr_word(iph) = to;
+ 	if (skb->ip_summed == CHECKSUM_COMPLETE)
+ 		skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
+ 				     (__force __wsum)to);
+--- a/include/net/ipv6.h
++++ b/include/net/ipv6.h
+@@ -149,7 +149,7 @@ struct frag_hdr {
+ 	__u8	reserved;
+ 	__be16	frag_off;
+ 	__be32	identification;
+-};
++} __attribute__((packed, aligned(2)));
+ 
+ /*
+  * Jumbo payload option, as described in RFC 2675 2.
+@@ -615,8 +615,8 @@ static inline void __ipv6_addr_set_half(
+ 	}
+ #endif
+ #endif
+-	addr[0] = wh;
+-	addr[1] = wl;
++	net_hdr_word(&addr[0]) = wh;
++	net_hdr_word(&addr[1]) = wl;
+ }
+ 
+ static inline void ipv6_addr_set(struct in6_addr *addr,
+@@ -675,6 +675,8 @@ static inline bool ipv6_prefix_equal(con
+ 	const __be32 *a1 = addr1->s6_addr32;
+ 	const __be32 *a2 = addr2->s6_addr32;
+ 	unsigned int pdw, pbi;
++	/* Used for last <32-bit fraction of prefix */
++	u32 pbia1, pbia2;
+ 
+ 	/* check complete u32 in prefix */
+ 	pdw = prefixlen >> 5;
+@@ -683,7 +685,9 @@ static inline bool ipv6_prefix_equal(con
+ 
+ 	/* check incomplete u32 in prefix */
+ 	pbi = prefixlen & 0x1f;
+-	if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi))))
++	pbia1 = net_hdr_word(&a1[pdw]);
++	pbia2 = net_hdr_word(&a2[pdw]);
++	if (pbi && ((pbia1 ^ pbia2) & htonl((0xffffffff) << (32 - pbi))))
+ 		return false;
+ 
+ 	return true;
+@@ -805,13 +809,13 @@ static inline void ipv6_addr_set_v4mappe
+  */
+ static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
+ {
+-	const __be32 *a1 = token1, *a2 = token2;
++	const struct in6_addr *a1 = token1, *a2 = token2;
+ 	int i;
+ 
+ 	addrlen >>= 2;
+ 
+ 	for (i = 0; i < addrlen; i++) {
+-		__be32 xb = a1[i] ^ a2[i];
++		__be32 xb = a1->s6_addr32[i] ^ a2->s6_addr32[i];
+ 		if (xb)
+ 			return i * 32 + 31 - __fls(ntohl(xb));
+ 	}
+@@ -1005,17 +1009,18 @@ static inline u32 ip6_multipath_hash_fie
+ static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
+ 				__be32 flowlabel)
+ {
+-	*(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel;
++	net_hdr_word((__be32 *)hdr) =
++		htonl(0x60000000 | (tclass << 20)) | flowlabel;
+ }
+ 
+ static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)
+ {
+-	return *(__be32 *)hdr & IPV6_FLOWINFO_MASK;
++	return net_hdr_word((__be32 *)hdr) & IPV6_FLOWINFO_MASK;
+ }
+ 
+ static inline __be32 ip6_flowlabel(const struct ipv6hdr *hdr)
+ {
+-	return *(__be32 *)hdr & IPV6_FLOWLABEL_MASK;
++	return net_hdr_word((__be32 *)hdr) & IPV6_FLOWLABEL_MASK;
+ }
+ 
+ static inline u8 ip6_tclass(__be32 flowinfo)
+--- a/include/net/secure_seq.h
++++ b/include/net/secure_seq.h
+@@ -3,6 +3,7 @@
+ #define _NET_SECURE_SEQ
+ 
+ #include <linux/types.h>
++#include <linux/in6.h>
+ 
+ struct net;
+ 
+--- a/include/uapi/linux/in.h
++++ b/include/uapi/linux/in.h
+@@ -91,7 +91,7 @@ enum {
+ /* Internet address. */
+ struct in_addr {
+ 	__be32	s_addr;
+-};
++} __attribute__((packed, aligned(2)));
+ #endif
+ 
+ #define IP_TOS		1
+--- a/net/ipv6/ip6_fib.c
++++ b/net/ipv6/ip6_fib.c
+@@ -142,7 +142,7 @@ static __be32 addr_bit_set(const void *t
+ 	 * See include/asm-generic/bitops/le.h.
+ 	 */
+ 	return (__force __be32)(1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) &
+-	       addr[fn_bit >> 5];
++	       net_hdr_word(&addr[fn_bit >> 5]);
+ }
+ 
+ struct fib6_info *fib6_info_alloc(gfp_t gfp_flags, bool with_fib6_nh)
+--- a/net/netfilter/nf_conntrack_proto_tcp.c
++++ b/net/netfilter/nf_conntrack_proto_tcp.c
+@@ -406,7 +406,7 @@ static void tcp_sack(const struct sk_buf
+ 
+ 	/* Fast path for timestamp-only option */
+ 	if (length == TCPOLEN_TSTAMP_ALIGNED
+-	    && *(__be32 *)ptr == htonl((TCPOPT_NOP << 24)
++	    && net_hdr_word(ptr) == htonl((TCPOPT_NOP << 24)
+ 				       | (TCPOPT_NOP << 16)
+ 				       | (TCPOPT_TIMESTAMP << 8)
+ 				       | TCPOLEN_TIMESTAMP))
+--- a/net/xfrm/xfrm_input.c
++++ b/net/xfrm/xfrm_input.c
+@@ -168,8 +168,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
+ 	if (!pskb_may_pull(skb, hlen))
+ 		return -EINVAL;
+ 
+-	*spi = *(__be32 *)(skb_transport_header(skb) + offset);
+-	*seq = *(__be32 *)(skb_transport_header(skb) + offset_seq);
++	*spi = net_hdr_word(skb_transport_header(skb) + offset);
++	*seq = net_hdr_word(skb_transport_header(skb) + offset_seq);
+ 	return 0;
+ }
+ EXPORT_SYMBOL(xfrm_parse_spi);
+--- a/net/ipv4/tcp_input.c
++++ b/net/ipv4/tcp_input.c
+@@ -4183,14 +4183,16 @@ static bool tcp_parse_aligned_timestamp(
+ {
+ 	const __be32 *ptr = (const __be32 *)(th + 1);
+ 
+-	if (*ptr == htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16)
+-			  | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
++	if (net_hdr_word(ptr) ==
++	    htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
++		  (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
+ 		tp->rx_opt.saw_tstamp = 1;
+ 		++ptr;
+-		tp->rx_opt.rcv_tsval = ntohl(*ptr);
++		tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
+ 		++ptr;
+-		if (*ptr)
+-			tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
++		if (net_hdr_word(ptr))
++			tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
++					       tp->tsoffset;
+ 		else
+ 			tp->rx_opt.rcv_tsecr = 0;
+ 		return true;
+--- a/include/uapi/linux/if_pppox.h
++++ b/include/uapi/linux/if_pppox.h
+@@ -51,6 +51,7 @@ struct pppoe_addr {
+  */
+ struct pptp_addr {
+ 	__u16		call_id;
++	__u16		pad;
+ 	struct in_addr	sin_addr;
+ };
+ 
+--- a/include/net/neighbour.h
++++ b/include/net/neighbour.h
+@@ -286,8 +286,10 @@ static inline bool neigh_key_eq128(const
+ 	const u32 *n32 = (const u32 *)n->primary_key;
+ 	const u32 *p32 = pkey;
+ 
+-	return ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) |
+-		(n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0;
++	return ((n32[0] ^ net_hdr_word(&p32[0])) |
++		(n32[1] ^ net_hdr_word(&p32[1])) |
++		(n32[2] ^ net_hdr_word(&p32[2])) |
++		(n32[3] ^ net_hdr_word(&p32[3]))) == 0;
+ }
+ 
+ static inline struct neighbour *___neigh_lookup_noref(
+--- a/include/uapi/linux/netfilter_arp/arp_tables.h
++++ b/include/uapi/linux/netfilter_arp/arp_tables.h
+@@ -70,7 +70,7 @@ struct arpt_arp {
+ 	__u8 flags;
+ 	/* Inverse flags */
+ 	__u16 invflags;
+-};
++} __attribute__((aligned(4)));
+ 
+ /* Values for "flag" field in struct arpt_ip (general arp structure).
+  * No flags defined yet.
+--- a/net/core/utils.c
++++ b/net/core/utils.c
+@@ -460,8 +460,14 @@ void inet_proto_csum_replace16(__sum16 *
+ 			       bool pseudohdr)
+ {
+ 	__be32 diff[] = {
+-		~from[0], ~from[1], ~from[2], ~from[3],
+-		to[0], to[1], to[2], to[3],
++		~net_hdr_word(&from[0]),
++		~net_hdr_word(&from[1]),
++		~net_hdr_word(&from[2]),
++		~net_hdr_word(&from[3]),
++		net_hdr_word(&to[0]),
++		net_hdr_word(&to[1]),
++		net_hdr_word(&to[2]),
++		net_hdr_word(&to[3]),
+ 	};
+ 	if (skb->ip_summed != CHECKSUM_PARTIAL) {
+ 		*sum = csum_fold(csum_partial(diff, sizeof(diff),
+--- a/include/linux/etherdevice.h
++++ b/include/linux/etherdevice.h
+@@ -555,7 +555,7 @@ static inline bool is_etherdev_addr(cons
+  * @b: Pointer to Ethernet header
+  *
+  * Compare two Ethernet headers, returns 0 if equal.
+- * This assumes that the network header (i.e., IP header) is 4-byte
++ * This assumes that the network header (i.e., IP header) is 2-byte
+  * aligned OR the platform can handle unaligned access.  This is the
+  * case for all packets coming into netif_receive_skb or similar
+  * entry points.
+@@ -578,11 +578,12 @@ static inline unsigned long compare_ethe
+ 	fold |= *(unsigned long *)(a + 6) ^ *(unsigned long *)(b + 6);
+ 	return fold;
+ #else
+-	u32 *a32 = (u32 *)((u8 *)a + 2);
+-	u32 *b32 = (u32 *)((u8 *)b + 2);
++	const u16 *a16 = a;
++	const u16 *b16 = b;
+ 
+-	return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) |
+-	       (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]);
++	return (a16[0] ^ b16[0]) | (a16[1] ^ b16[1]) | (a16[2] ^ b16[2]) |
++	       (a16[3] ^ b16[3]) | (a16[4] ^ b16[4]) | (a16[5] ^ b16[5]) |
++	       (a16[6] ^ b16[6]);
+ #endif
+ }
+ 
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -62,7 +62,7 @@ static struct sk_buff *__tcpv4_gso_segme
+ 	th2 = tcp_hdr(seg->next);
+ 	iph2 = ip_hdr(seg->next);
+ 
+-	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
++	if (!(net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) &&
+ 	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
+ 		return segs;
+ 
+@@ -254,7 +254,7 @@ struct sk_buff *tcp_gro_lookup(struct li
+ 			continue;
+ 
+ 		th2 = tcp_hdr(p);
+-		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
++		if (net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) {
+ 			NAPI_GRO_CB(p)->same_flow = 0;
+ 			continue;
+ 		}
+@@ -320,8 +320,8 @@ struct sk_buff *tcp_gro_receive(struct l
+ 		  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
+ 	flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
+ 	for (i = sizeof(*th); i < thlen; i += 4)
+-		flush |= *(u32 *)((u8 *)th + i) ^
+-			 *(u32 *)((u8 *)th2 + i);
++		flush |= net_hdr_word((u8 *)th + i) ^
++			 net_hdr_word((u8 *)th2 + i);
+ 
+ 	/* When we receive our second frame we can made a decision on if we
+ 	 * continue this flow as an atomic flow with a fixed ID or if we use
+--- a/net/ipv6/netfilter/ip6table_mangle.c
++++ b/net/ipv6/netfilter/ip6table_mangle.c
+@@ -44,7 +44,7 @@ ip6t_mangle_out(void *priv, struct sk_bu
+ 	hop_limit = ipv6_hdr(skb)->hop_limit;
+ 
+ 	/* flowlabel and prio (includes version, which shouldn't change either */
+-	flowlabel = *((u_int32_t *)ipv6_hdr(skb));
++	flowlabel = net_hdr_word(ipv6_hdr(skb));
+ 
+ 	ret = ip6t_do_table(priv, skb, state);
+ 
+@@ -53,7 +53,7 @@ ip6t_mangle_out(void *priv, struct sk_bu
+ 	     !ipv6_addr_equal(&ipv6_hdr(skb)->daddr, &daddr) ||
+ 	     skb->mark != mark ||
+ 	     ipv6_hdr(skb)->hop_limit != hop_limit ||
+-	     flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
++	     flowlabel != net_hdr_word(ipv6_hdr(skb)))) {
+ 		err = ip6_route_me_harder(state->net, state->sk, skb);
+ 		if (err < 0)
+ 			ret = NF_DROP_ERR(err);
diff --git a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
new file mode 100644
index 0000000000..536d7abf6b
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
@@ -0,0 +1,121 @@
+From: Christopher Hill <ch6574 at gmail.com>
+Subject: [PATCH] ath79: add Mikrotik rb4xx series drivers
+
+This adds 3 Mikrotik rb4xx series drivers as follows:
+
+rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device
+that interfaces between the SoC SPI bus and its two children below.
+rb4xx-gpio: This is the GPIO expander.
+rb4xx-nand: This is the NAND driver.
+
+The history of this code comes in three phases.
+
+1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx
+drivers upstream. See https://lore.kernel.org/patchwork/patch/940880/.
+
+Module-author: Gabor Juhos <juhosg at openwrt.org>
+Module-author: Imre Kaloz <kaloz at openwrt.org>
+Module-author: Bert Vermeulen <bert at biot.com>
+
+2. Next several ar71xx patches were applied bringing the code current.
+
+commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c
+Submitted-by: Hauke Mehrtens <hauke at hauke-m.de>
+
+commit af79fdbe4af32a287798b579141204bda056b8aa
+commit 889272d92db689fd9c910243635e44c9d8323095
+commit e21cb649a235180563363b8af5ba8296b9ac0baa
+commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f
+Submitted-by: Felix Fietkau <nbd at nbd.name>
+
+3. Finally a heavy refactor to split the driver into the three new
+subsystems, and updated to work with the device tree configuration, plus
+updates and review feedback incorporated
+
+Reviewed-by: Thibaut VAR?NE <hacks at slashdirt.org>
+Submitted-by: Christopher Hill <ch6574 at gmail.com>
+---
+ drivers/mfd/Kconfig                           | 8 ++++++++
+ drivers/mfd/Makefile                          | 1 +
+ drivers/gpio/Kconfig                          | 6 ++++++
+ drivers/gpio/Makefile                         | 1 +
+ drivers/mtd/nand/raw/Kconfig                  | 7 +++++++
+ drivers/mtd/nand/raw/Makefile                 | 1 +
+ 6 files changed, 24 insertions(+)
+
+--- a/drivers/mfd/Kconfig
++++ b/drivers/mfd/Kconfig
+@@ -2209,6 +2209,14 @@ config RAVE_SP_CORE
+ 	  Select this to get support for the Supervisory Processor
+ 	  device found on several devices in RAVE line of hardware.
+ 
++config MFD_RB4XX_CPLD
++	tristate "CPLD driver for Mikrotik RB4xx series boards"
++	select MFD_CORE
++	depends on ATH79 || COMPILE_TEST
++	help
++	  Enables support for the CPLD chip (NAND & GPIO) on Mikrotik
++	  Routerboard RB4xx series.
++
+ config SGI_MFD_IOC3
+ 	bool "SGI IOC3 core driver"
+ 	depends on PCI && MIPS && 64BIT
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -269,6 +269,7 @@ obj-$(CONFIG_MFD_KHADAS_MCU) 	+= khadas-
+ obj-$(CONFIG_MFD_ACER_A500_EC)	+= acer-ec-a500.o
+ obj-$(CONFIG_MFD_QCOM_PM8008)	+= qcom-pm8008.o
+ 
++obj-$(CONFIG_MFD_RB4XX_CPLD)	+= rb4xx-cpld.o
+ obj-$(CONFIG_SGI_MFD_IOC3)	+= ioc3.o
+ obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
+ obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -1594,6 +1594,12 @@ config GPIO_SODAVILLE
+ 	help
+ 	  Say Y here to support Intel Sodaville GPIO.
+ 
++config GPIO_RB4XX
++	tristate "GPIO expander for Mikrotik RB4xx series boards"
++	depends on MFD_RB4XX_CPLD
++	help
++	  GPIO driver for Mikrotik Routerboard RB4xx series.
++
+ endmenu
+ 
+ menu "SPI GPIO expanders"
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -123,6 +123,7 @@ obj-$(CONFIG_GPIO_PL061)		+= gpio-pl061.
+ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio-pmic-eic-sprd.o
+ obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
+ obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
++obj-$(CONFIG_GPIO_RB4XX)		+= gpio-rb4xx.o
+ obj-$(CONFIG_GPIO_RC5T583)		+= gpio-rc5t583.o
+ obj-$(CONFIG_GPIO_RCAR)			+= gpio-rcar.o
+ obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
+--- a/drivers/mtd/nand/raw/Kconfig
++++ b/drivers/mtd/nand/raw/Kconfig
+@@ -565,4 +565,11 @@ config MTD_NAND_AR934X
+ 	  Enables support for NAND controller on Qualcomm Atheros SoCs.
+ 	  This controller is found on AR934x and QCA955x SoCs.
+ 
++config MTD_NAND_RB4XX
++	tristate "Support for NAND driver for Mikrotik RB4xx series boards"
++	depends on MFD_RB4XX_CPLD
++	help
++	  Enables support for the NAND flash chip on Mikrotik Routerboard
++	  RB4xx series.
++
+ endif # MTD_RAW_NAND
+--- a/drivers/mtd/nand/raw/Makefile
++++ b/drivers/mtd/nand/raw/Makefile
+@@ -60,6 +60,7 @@ obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rock
+ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
+ obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
+ obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
++obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o
+ 
+ nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
+ nand-objs += nand_onfi.o
diff --git a/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
new file mode 100644
index 0000000000..677428fa65
--- /dev/null
+++ b/target/linux/ath79/patches-6.1/911-mikrotik-rb91x.patch
@@ -0,0 +1,96 @@
+From: Denis Kalashnikov <denis281089 at gmail.com>
+Subject: [PATCH] ath79: add support for reset key on MikroTik RB912UAG-2HPnD
+
+On MikroTik RB91x board series a reset key shares SoC gpio
+line #15 with NAND ALE and NAND IO7. So we need a custom
+gpio driver to manage this non-trivial connection schema.
+Also rb91x-nand needs to have an ability to disable a polling
+of the key while it works with NAND.
+
+While we've been integrating rb91x-key into a firmware, we've
+figured out that:
+* In the gpio-latch driver we need to add a "cansleep" suffix to
+several gpiolib calls,
+* When gpio-latch and rb91x-nand fail to get a gpio and an error
+is -EPROBE_DEFER, they shouldn't report about this, since this
+actually is not an error and occurs when the gpio-latch probe
+function is called before the rb91x-key probe.
+We fix these related things here too.
+
+Submitted-by: Denis Kalashnikov <denis281089 at gmail.com>
+Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
+Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
+---
+ drivers/gpio/Kconfig                          | 11 +++++++++++
+ drivers/gpio/Makefile                         |  2 ++
+ drivers/mtd/nand/raw/Kconfig                  |  6 ++++++
+ drivers/mtd/nand/raw/Makefile                 |  1 +
+ 7 files changed, 20 insertions(+)
+
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -368,6 +368,12 @@ config GPIO_IXP4XX
+ 
+ 	  If unsure, say N.
+ 
++config GPIO_LATCH_MIKROTIK
++	tristate "MikroTik RouterBOARD GPIO latch support"
++	depends on ATH79
++	help
++	  GPIO driver for latch on some MikroTik RouterBOARDs.
++
+ config GPIO_LOGICVC
+ 	tristate "Xylon LogiCVC GPIO support"
+ 	depends on MFD_SYSCON && OF
+@@ -544,6 +550,10 @@ config GPIO_ROCKCHIP
+ 	help
+ 	  Say yes here to support GPIO on Rockchip SoCs.
+ 
++config GPIO_RB91X_KEY
++	tristate "MikroTik RB91x board series reset key support"
++	depends on ATH79
++
+ config GPIO_SAMA5D2_PIOBU
+ 	tristate "SAMA5D2 PIOBU GPIO support"
+ 	depends on MFD_SYSCON
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -76,6 +76,7 @@ obj-$(CONFIG_GPIO_IT87)			+= gpio-it87.o
+ obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4xx.o
+ obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
+ obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
++obj-$(CONFIG_GPIO_LATCH_MIKROTIK)	+= gpio-latch-mikrotik.o
+ obj-$(CONFIG_GPIO_LOGICVC)		+= gpio-logicvc.o
+ obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
+ obj-$(CONFIG_GPIO_LOONGSON)		+= gpio-loongson.o
+@@ -124,6 +125,7 @@ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio
+ obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
+ obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
+ obj-$(CONFIG_GPIO_RB4XX)		+= gpio-rb4xx.o
++obj-$(CONFIG_GPIO_RB91X_KEY)		+= gpio-rb91x-key.o
+ obj-$(CONFIG_GPIO_RC5T583)		+= gpio-rc5t583.o
+ obj-$(CONFIG_GPIO_RCAR)			+= gpio-rcar.o
+ obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
+--- a/drivers/mtd/nand/raw/Kconfig
++++ b/drivers/mtd/nand/raw/Kconfig
+@@ -572,4 +572,10 @@ config MTD_NAND_RB4XX
+ 	  Enables support for the NAND flash chip on Mikrotik Routerboard
+ 	  RB4xx series.
+ 
++config MTD_NAND_RB91X
++	tristate "MikroTik RB91x NAND driver support"
++	depends on ATH79 && MTD_RAW_NAND
++	help
++	  Enables support for the NAND flash chip on MikroTik RB91x series.
++
+ endif # MTD_RAW_NAND
+--- a/drivers/mtd/nand/raw/Makefile
++++ b/drivers/mtd/nand/raw/Makefile
+@@ -61,6 +61,7 @@ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-n
+ obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
+ obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
+ obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o
++obj-$(CONFIG_MTD_NAND_RB91X)		+= rb91x_nand.o
+ 
+ nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
+ nand-objs += nand_onfi.o



From lede-commits at lists.infradead.org  Thu May  9 15:09:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 18:09:05 -0400
Subject: [openwrt/openwrt]  ramips: add support for Wavlink WL-WN531G3
In-Reply-To: <171529254525.1860209.3650553967590618368@git-01.infra.openwrt.org>
References: <171529254525.1860209.3650553967590618368@git-01.infra.openwrt.org>
Message-ID: <mailman.35313.1715292556.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/803c00e9b8facb11e2c908e2fef90e765ebf5c27

commit 803c00e9b8facb11e2c908e2fef90e765ebf5c27
Author: Eros Brigmann <erosbrigmann at gmail.com>
AuthorDate: Mon Apr 8 21:36:57 2024 +0200

    ramips: add support for Wavlink WL-WN531G3
    
    This device is similiar to the Wavlink WL-WN531A3.
    Hardware
    --------
    SoC:   Mediatek MT7620A
    RAM:   64MB
    FLASH: 8MB NOR (GigaDevice GD25Q64CS)
    ETH:
      - 2x 10/100/1000 Mbps Ethernet (RTL8211F)
      - 3x 10/100 Mbps Ethernet (integrated in SOC)
    WIFI:
      - 2.4GHz: 1x (integrated in SOC) (2x2:2)
      - 5GHz:   1x MT7612E (2x2:2)
      - 4 external antennas
    BTN:
      - 1x Reset button
      - 1x Touchlink button
      - 1x Turbo button
      - 1x Wps button
      - 1x ON/OFF switch
    LEDS:
      - 1x Red led (system status)
      - 1x Blue led (system status)
      - 5x Blue leds (ethernet ports)
      - 1x Power led
      - 1x Wifi led
    UART:
      - 57600-8-N-1
    Everything works correctly.
    
    Installation
    ------------
    Flash the initramfs image in the OEM firmware interface
    When Openwrt boots, flash the sysupgrade image otherwise you won't be
    able to keep configuration between reboots.
    In my case the whole device was locked and there was no way
    to flash the image, except for flashing directly to the flash
    via an spi-flasher. You need to put the sysupgrade image file at
    the beginning of 0x60000.
    
    Notes
    -----
    1) Router mac addresses:
       LAN XX:XX:XX:XX:XX:F0 (factory @ 0x28)
       WAN XX:XX:XX:XX:XX:F1 (factory @ 0x2e)
       WIFI 2G XX:XX:XX:XX:XX:F2 (factory @ 0x04)
       WIFI 5G XX:XX:XX:XX:XX:F3 (factory @ 0x8004)
    
       LABEL XX:XX:XX:XX:XX:F2
    
    Signed-off-by: Eros Brigmann <erosbrigmann at gmail.com>
---
 .../ramips/dts/mt7620a_wavlink_wl-wn531g3.dts      | 207 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |   9 +
 .../mt7620/base-files/etc/board.d/02_network       |  11 +-
 3 files changed, 224 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3.dts
new file mode 100644
index 0000000000..d48f27fdc7
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn531g3.dts
@@ -0,0 +1,207 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7620a.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "wavlink,wl-wn531g3", "ralink,mt7620a-soc";
+	model = "Wavlink WL-WN531G3";
+
+	aliases {
+		led-boot = &led_status_blue;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_blue;
+		led-upgrade = &led_status_red;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		turbo {
+			label = "turbo";
+			gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_1>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		touchlink {
+			label = "touchlink";
+			gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_blue: led_status_blue {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_status_red: led_status_red {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&ehci {
+	status = "okay";
+};
+
+&ohci {
+	status = "okay";
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			factory: partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_factory_28: macaddr at 28 {
+						reg = <0x28 0x6>;
+					};
+
+					macaddr_factory_2e: macaddr at 2e {
+						reg = <0x2e 0x6>;
+					};
+
+					eeprom_radio_0: eeprom at 0 {
+						reg = <0x0 0x200>;
+					};
+
+					eeprom_radio_8000: eeprom at 8000 {
+						reg = <0x8000 0x200>;
+					};
+				};
+			};
+
+			partition at 50000 {
+				label = "params";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x60000 0x7a0000>;
+			};
+		};
+	};
+};
+
+&ethernet {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii1_pins>, <&rgmii2_pins>, <&mdio_pins>;
+
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+
+	mediatek,portmap = "llllw";
+
+	port at 4 {
+		status = "okay";
+		phy-handle = <&phy4>;
+		phy-mode = "rgmii";
+
+		nvmem-cells = <&macaddr_factory_2e>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	port at 5 {
+		status = "okay";
+		phy-handle = <&phy5>;
+		phy-mode = "rgmii";
+	};
+
+	mdio-bus {
+		status = "okay";
+
+		phy4: ethernet-phy at 4 {
+			reg = <4>;
+			phy-mode = "rgmii";
+		};
+
+		phy5: ethernet-phy at 5 {
+			reg = <5>;
+			phy-mode = "rgmii";
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	mt76 at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&eeprom_radio_8000>;
+		nvmem-cell-names = "eeprom";
+		ieee80211-freq-limit = <5000000 6000000>;
+	};
+};
+
+&gsw {
+	mediatek,port4-gmac;
+};
+
+&wmac {
+	nvmem-cells = <&eeprom_radio_0>;
+	nvmem-cell-names = "eeprom";
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "uartf";
+		function = "gpio";
+	};
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index f7238c2b1f..cb41e9bb5a 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -1340,6 +1340,15 @@ define Device/wavlink_wl-wn530hg4
 endef
 TARGET_DEVICES += wavlink_wl-wn530hg4
 
+define Device/wavlink_wl-wn531g3
+  SOC := mt7620a
+  IMAGE_SIZE := 7808k
+  DEVICE_VENDOR := Wavlink
+  DEVICE_MODEL := WL-WN531G3
+  DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek kmod-usb2 kmod-usb-ohci
+endef
+TARGET_DEVICES += wavlink_wl-wn531g3
+
 define Device/wavlink_wl-wn535k1
   SOC := mt7620a
   IMAGE_SIZE := 7360k
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index 63f7e41ac2..d23ec76327 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -253,6 +253,10 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch1" \
 			"0:lan:3" "1:lan:2" "2:lan:1" "4:lan:4" "3:wan" "7 at eth0"
 		;;
+	wavlink,wl-wn531g3)
+		ucidef_add_switch "switch0" \
+			"0:lan:4" "1:lan:3" "2:lan:2" "5:lan:1" "4:wan" "6 at eth0"
+		;;
 	wavlink,wl-wn535k1)
 		ucidef_add_switch "switch0" \
 			"2:lan:2" "5:lan:1" "4:wan" "6 at eth0"
@@ -426,13 +430,14 @@ ramips_setup_macs()
 	tplink,ec220-g5-v2)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1)
 		;;
+	wavlink,wl-wn531g3|\
+	zbtlink,zbt-we1026-5g-16m)
+		label_mac=$(mtd_get_mac_binary factory 0x4)
+		;;
 	wavlink,wl-wn535k1)
 		wan_mac=$(mtd_get_mac_binary factory 0x2e)
 		label_mac=$(mtd_get_mac_binary factory 0x8004)
 		;;
-	zbtlink,zbt-we1026-5g-16m)
-		label_mac=$(mtd_get_mac_binary factory 0x4)
-		;;
 	zyxel,keenetic-lite-iii-a)
 		lan_mac=$(mtd_get_mac_binary RF-EEPROM 0x4)
 		wan_mac=$(mtd_get_mac_binary RF-EEPROM 0x28)



From lede-commits at lists.infradead.org  Thu May  9 15:11:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 09 May 2024 18:11:48 -0400
Subject: [openwrt/openwrt]  gperf: build as C++11
In-Reply-To: <171529270884.1873255.18283452038084048713@git-01.infra.openwrt.org>
References: <171529270884.1873255.18283452038084048713@git-01.infra.openwrt.org>
Message-ID: <mailman.35314.1715292712.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/39f595d1d85099233e96e4531f583200e0df8438

commit 39f595d1d85099233e96e4531f583200e0df8438
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Apr 27 14:57:50 2024 -0700

    gperf: build as C++11
    
    Newer compilers default to building with C++17 as default, which has the
    register keyword removed and thus errors.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 package/devel/gperf/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/devel/gperf/Makefile b/package/devel/gperf/Makefile
index f0f794ee2d..9cf4dbc02b 100644
--- a/package/devel/gperf/Makefile
+++ b/package/devel/gperf/Makefile
@@ -17,6 +17,8 @@ include $(INCLUDE_DIR)/package.mk
 HOST_CPPFLAGS:=-I$(HOST_BUILD_DIR)/lib -I$(HOST_BUILD_DIR)/src $(HOST_CPPFLAGS)
 TARGET_CPPFLAGS:=-I$(PKG_BUILD_DIR)/lib -I$(PKG_BUILD_DIR)/src $(TARGET_CPPFLAGS)
 
+HOST_CXXFLAGS += -std=c++11
+
 define Package/gperf
   SECTION:=devel
   CATEGORY:=Development



From lede-commits at lists.infradead.org  Fri May 10 01:56:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 04:56:18 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: change LED color for 'running'
 state to blue
In-Reply-To: <171533137770.4185842.3126232204773538678@git-01.infra.openwrt.org>
References: <171533137770.4185842.3126232204773538678@git-01.infra.openwrt.org>
Message-ID: <mailman.35389.1715331391.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/567af392b6d465a413b698ab6a245c30b7e6458f

commit 567af392b6d465a413b698ab6a245c30b7e6458f
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Thu May 9 21:15:47 2024 -0300

    ipq40xx: whw03v2: change LED color for 'running' state to blue
    
    Change the RGB indicator LED color for the running state from green to
    blue. There are various reasons for this change:
    
    - In stock firmware, green means internet connection is up, red means it
      is down, and blue means indeterminate. To track stock behavior as
      closely as possible, OpenWrt should indicate blue by default.
    
    - In the current 23.x OpenWrt releases for this router, the led glows
      blue all the time -not green- because the bootloader sets it blue
      and there is an OpenWrt bug that makes it unable to control the LED.
      The bug is fixed in master, so without this commit there would be an
      unexpected change of behavior for this device in the next release.
    
    - The ports other closely related Linksys devices (such as EA8300 and
      MR8300) get this right and use blue for the running state.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    (cherry picked from commit c2f52e42b1e9f736edd6e4545ebe3435db6605ee)
    Link: https://github.com/openwrt/openwrt/pull/15438
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index aba7cb8bea..ab4dd9de8e 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -13,7 +13,7 @@
 	aliases {
 		led-boot = &led_blue;
 		led-failsafe = &led_red;
-		led-running = &led_green;
+		led-running = &led_blue;
 		led-upgrade = &led_red;
 	};
 



From lede-commits at lists.infradead.org  Fri May 10 01:56:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 04:56:17 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: fix handling of RGB LED
In-Reply-To: <171533137770.4185842.3126232204773538678@git-01.infra.openwrt.org>
References: <171533137770.4185842.3126232204773538678@git-01.infra.openwrt.org>
Message-ID: <mailman.35390.1715331392.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/3704eb3c3f5063f42d6128160f191b86e2c42437

commit 3704eb3c3f5063f42d6128160f191b86e2c42437
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Thu May 9 21:11:09 2024 -0300

    ipq40xx: whw03v2: fix handling of RGB LED
    
    The RGB LED should glow green in the 'running' state, but it
    was glowing cyan because the blue component defaulted to 'on'.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    (cherry picked from commit fc62d66c20b9e9f52ed787d2079baab06108b959)
    Link: https://github.com/openwrt/openwrt/pull/15438
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index e01be0ae4b..aba7cb8bea 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -278,7 +278,6 @@
 			label = "red";
 			color = <LED_COLOR_ID_RED>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <0>;
 		};
 
@@ -286,7 +285,6 @@
 			label = "green";
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <1>;
 		};
 
@@ -294,7 +292,6 @@
 			label = "blue";
 			color = <LED_COLOR_ID_BLUE>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "default-on";
 			reg = <2>;
 		};
 	};



From lede-commits at lists.infradead.org  Fri May 10 02:47:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 05:47:27 -0400
Subject: [openwrt/openwrt]  bcm27xx-utils: update to latest version
In-Reply-To: <171533444623.157136.15690050672864465923@git-01.infra.openwrt.org>
References: <171533444623.157136.15690050672864465923@git-01.infra.openwrt.org>
Message-ID: <mailman.35415.1715334450.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/752f6bf64ee6e7cdcc5273b7d03d1b2943945967

commit 752f6bf64ee6e7cdcc5273b7d03d1b2943945967
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Fri May 10 09:17:52 2024 +0200

    bcm27xx-utils: update to latest version
    
    Full changelog:
    https://github.com/raspberrypi/utils/compare/e65f5ec102e74218cda7da9fdc8b1caa0fd1127d...451b9881b72cb994c102724b5a7d9b93f97dc315
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 package/utils/bcm27xx-utils/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/utils/bcm27xx-utils/Makefile b/package/utils/bcm27xx-utils/Makefile
index 9e113914e7..04dd6b8d62 100644
--- a/package/utils/bcm27xx-utils/Makefile
+++ b/package/utils/bcm27xx-utils/Makefile
@@ -3,13 +3,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bcm27xx-utils
-PKG_VERSION:=2024-01-18
+PKG_VERSION:=2024-04-24
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
-PKG_SOURCE_VERSION:=e65f5ec102e74218cda7da9fdc8b1caa0fd1127d
-PKG_MIRROR_HASH:=ea946fc4a86875c5d1efc35b2bc80f6b5482afc3d1ea13853b69abc2b4a2eee6
+PKG_SOURCE_VERSION:=451b9881b72cb994c102724b5a7d9b93f97dc315
+PKG_MIRROR_HASH:=b453976171187e0ffe7cacfdcab36cec6b5d02db8b6d978cb9afbbcafcfcff9d
 
 PKG_FLAGS:=nonshared
 PKG_BUILD_FLAGS:=no-lto



From lede-commits at lists.infradead.org  Fri May 10 02:47:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 05:47:26 -0400
Subject: [openwrt/openwrt]  bcm27xx-gpu-fw: update to v1.20240424
In-Reply-To: <171533444623.157136.15690050672864465923@git-01.infra.openwrt.org>
References: <171533444623.157136.15690050672864465923@git-01.infra.openwrt.org>
Message-ID: <mailman.35416.1715334451.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eee2300026c07ba3539c1f33a73da3e3a329e0d1

commit eee2300026c07ba3539c1f33a73da3e3a329e0d1
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Fri May 10 09:15:15 2024 +0200

    bcm27xx-gpu-fw: update to v1.20240424
    
    This includes multiple updates for BCM2711 and BCM2712.
    
    Full changelog:
    https://github.com/raspberrypi/firmware/compare/0968de28716a9b1f106b8492646d0ed0a2800152...1.20240424
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 package/kernel/bcm27xx-gpu-fw/Makefile | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/package/kernel/bcm27xx-gpu-fw/Makefile b/package/kernel/bcm27xx-gpu-fw/Makefile
index 048dd0d3a9..878574ea5c 100644
--- a/package/kernel/bcm27xx-gpu-fw/Makefile
+++ b/package/kernel/bcm27xx-gpu-fw/Makefile
@@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=bcm27xx-gpu-fw
-PKG_VERSION:=2024-01-11
-PKG_RELEASE:=0968de28716a9b1f106b8492646d0ed0a2800152
+PKG_VERSION:=2024-04-24
+PKG_RELEASE:=969420b4121b522ab33c5001074cc4c2547dafaf
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_RELEASE)
 
@@ -34,7 +34,7 @@ define Download/fixup_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup.dat
-  HASH:=c28ea955e672e374016dca61d63afa026490f0473a98115908586ab48e324aeb
+  HASH:=94ae3ff8363a6a2832f173241597b6500cf67044d34155a1251fe58671dd6ce7
 endef
 $(eval $(call Download,fixup_dat))
 
@@ -42,7 +42,7 @@ define Download/fixup_cd_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup_cd.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup_cd.dat
-  HASH:=3cf1aef5f596ca106203ed5dac9ad45e85929ec55ce44c813588645e174442ec
+  HASH:=2d7c19e46780ef29867f8ed200a94bb77a7982f5bc41219afe864d2303ba3084
 endef
 $(eval $(call Download,fixup_cd_dat))
 
@@ -50,7 +50,7 @@ define Download/fixup_x_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup_x.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup_x.dat
-  HASH:=56525c8feabde1ab86f36bb09bc55171659b2993f94132cf81ffc4293d62269d
+  HASH:=692393562d0650f7d1891ba0143ad0500ccf07129947d386d56350e7ca204d16
 endef
 $(eval $(call Download,fixup_x_dat))
 
@@ -58,7 +58,7 @@ define Download/fixup4_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup4.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup4.dat
-  HASH:=615f8595801bf52373039f73ad5ad9513f83400d355eb1b2c075c7ae907e927c
+  HASH:=63a4a8f356e2b8ed2850d68b9adf21008ef1dfa7743b22ddc26987e4d3171302
 endef
 $(eval $(call Download,fixup4_dat))
 
@@ -66,7 +66,7 @@ define Download/fixup4cd_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup4cd.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup4cd.dat
-  HASH:=3cf1aef5f596ca106203ed5dac9ad45e85929ec55ce44c813588645e174442ec
+  HASH:=2d7c19e46780ef29867f8ed200a94bb77a7982f5bc41219afe864d2303ba3084
 endef
 $(eval $(call Download,fixup4cd_dat))
 
@@ -74,7 +74,7 @@ define Download/fixup4x_dat
   FILE:=$(RPI_FIRMWARE_FILE)-fixup4x.dat
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=fixup4x.dat
-  HASH:=6d27a4b8ecb78cef9e1f03751b4aaec5ce8749d36988f381145a8a41dbf164ae
+  HASH:=41328f6587c0cd47ae7fa7edab4bf62730dda54caf52ffaa3bfb24ff93b8348b
 endef
 $(eval $(call Download,fixup4x_dat))
 
@@ -82,7 +82,7 @@ define Download/start_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start.elf
-  HASH:=e8348e88522e7a1d0e2b0944ab66d7d8f4f30da98f326e2b3c123522e45f71b2
+  HASH:=8637fb847ff62f69fbb8b98b1beff685b47cf4095580e830724f6a27fb20fee0
 endef
 $(eval $(call Download,start_elf))
 
@@ -90,7 +90,7 @@ define Download/start_cd_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start_cd.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start_cd.elf
-  HASH:=c9b4de3f12bec7808868b898c49f656b5378ddc315f12ccab83d6519bad51680
+  HASH:=6832f57236f6c453cd72eac1f0ab53e265037fb75fc41301448fedb8d505f2b3
 endef
 $(eval $(call Download,start_cd_elf))
 
@@ -98,7 +98,7 @@ define Download/start_x_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start_x.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start_x.elf
-  HASH:=0b5c06c109984361eeed0ab14d146f686d8aa8da2025689b887e9cb098636db9
+  HASH:=6f72a3fda8cbdacb340676e18a8468b9edd89458173b5ecf3c12b00c147dce40
 endef
 $(eval $(call Download,start_x_elf))
 
@@ -106,7 +106,7 @@ define Download/start4_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start4.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start4.elf
-  HASH:=fedc4ecd72c9d21018e210240dcd2e41a8bb5f936fb5674c3351f2a447a22203
+  HASH:=badf4cd8822d1b85ad56ddb9e32e9b4220c88099c8cc0c3e70ae77190571c8ef
 endef
 $(eval $(call Download,start4_elf))
 
@@ -114,7 +114,7 @@ define Download/start4cd_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start4cd.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start4cd.elf
-  HASH:=ea22282a77666801378137a651e7e0b17cc186f63cdbdc8b9bb98749cd12b256
+  HASH:=7d3f13c8412c6b0efdbd3b53439776f3552621cc28ee887caaac539fb063ad8a
 endef
 $(eval $(call Download,start4cd_elf))
 
@@ -122,7 +122,7 @@ define Download/start4x_elf
   FILE:=$(RPI_FIRMWARE_FILE)-start4x.elf
   URL:=$(RPI_FIRMWARE_URL)
   URL_FILE:=start4x.elf
-  HASH:=c509e73a9cba7af3223dea885f58294bd04845e822aa3d6278500fa4dcdb112f
+  HASH:=c30fbdfedad7180245ff567ccdea953fc1816d0da3ff4701b15071c6f8b47a89
 endef
 $(eval $(call Download,start4x_elf))
 



From lede-commits at lists.infradead.org  Fri May 10 02:49:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 05:49:11 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2023-12-18)
In-Reply-To: <171533455093.163590.1689286575681563084@git-01.infra.openwrt.org>
References: <171533455093.163590.1689286575681563084@git-01.infra.openwrt.org>
Message-ID: <mailman.35419.1715334566.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/4be4d20662403d543256e0a5ef9959180135b383

commit 4be4d20662403d543256e0a5ef9959180135b383
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Dec 18 18:54:55 2023 +0100

    mt76: update to Git HEAD (2023-12-18)
    
    bebd9cffc2ae wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 1a57d758f229a1e8d9085cd4775ebe7e1ec5d9b2)
    [rmilecki: it's a no-change for 23.05 as we had that fix backported]
---
 package/kernel/mt76/Makefile                       |  6 ++---
 ...t7921-fix-6GHz-disabled-by-the-missing-de.patch | 31 ----------------------
 2 files changed, 3 insertions(+), 34 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 38a92c953e..65f6ca1e8e 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-12-11
-PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d
-PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914
+PKG_SOURCE_DATE:=2023-12-18
+PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b
+PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch
deleted file mode 100644
index 3fff9caa3c..0000000000
--- a/package/kernel/mt76/patches/0002-wifi-mt76-mt7921-fix-6GHz-disabled-by-the-missing-de.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b Mon Sep 17 00:00:00 2001
-From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
-Date: Mon, 30 Oct 2023 15:17:34 +0800
-Subject: [PATCH] wifi: mt76: mt7921: fix 6GHz disabled by the missing default
- CLC config
-
-No matter CLC is enabled or disabled, the driver should initialize
-the default value 0xff for channel configuration of CLC. Otherwise,
-the zero value would disable channels.
-
-Reported-and-tested-by: Ben Greear <greearb at candelatech.com>
-Closes: https://lore.kernel.org/all/2fb78387-d226-3193-8ca7-90040561b9ad at candelatech.com/
-Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed")
-Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
-Signed-off-by: Deren Wu <deren.wu at mediatek.com>
-Signed-off-by: Kalle Valo <kvalo at kernel.org>
-Link: https://lore.kernel.org/r/5a976ddf1f636b5cb809373501d3cfdc6d8de3e4.1698648737.git.deren.wu at mediatek.com
----
- mt7921/mcu.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/mt7921/mcu.c
-+++ b/mt7921/mcu.c
-@@ -375,6 +375,7 @@ static int mt7921_load_clc(struct mt792x
- 	int ret, i, len, offset = 0;
- 	u8 *clc_base = NULL, hw_encap = 0;
- 
-+	dev->phy.clc_chan_conf = 0xff;
- 	if (mt7921_disable_clc ||
- 	    mt76_is_usb(&dev->mt76))
- 		return 0;



From lede-commits at lists.infradead.org  Fri May 10 02:49:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 05:49:10 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2023-12-11)
In-Reply-To: <171533455093.163590.1689286575681563084@git-01.infra.openwrt.org>
References: <171533455093.163590.1689286575681563084@git-01.infra.openwrt.org>
Message-ID: <mailman.35420.1715334569.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/e32782b2df1243183ed057f272f176dc2601cc33

commit e32782b2df1243183ed057f272f176dc2601cc33
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Dec 11 13:15:09 2023 +0100

    mt76: update to Git HEAD (2023-12-11)
    
    f63f87cd5b45 wifi: mt76: mt7996: fix shift overflow warning on 32 bit systems
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit da7b0351fce5dd59b79ea78d34c90c66b8bd6f6e)
    [rmilecki: it's a no-change for 23.05 as we had that fix backported]
---
 package/kernel/mt76/Makefile                       |  6 ++--
 ...t7996-fix-shift-overflow-warning-on-32-bi.patch | 34 ----------------------
 2 files changed, 3 insertions(+), 37 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 762f474ce9..38a92c953e 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-12-08
-PKG_SOURCE_VERSION:=f559adf1849c8af91f5a5eb670f4ed2c24988898
-PKG_MIRROR_HASH:=74dde4478442d5f0edbae918636b40767b0e49181b732d4184feeccd8a8cc328
+PKG_SOURCE_DATE:=2023-12-11
+PKG_SOURCE_VERSION:=f63f87cd5b45c3779293e6062c6b26bdf57e851d
+PKG_MIRROR_HASH:=43f1b1fb75dfb4756aa1767983b338bd63154f0f6c45554029e69af49d55b914
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch b/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch
deleted file mode 100644
index 5acc9e88a5..0000000000
--- a/package/kernel/mt76/patches/0001-wifi-mt76-mt7996-fix-shift-overflow-warning-on-32-bi.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f63f87cd5b45c3779293e6062c6b26bdf57e851d Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sat, 9 Dec 2023 22:44:57 +0100
-Subject: [PATCH] wifi: mt76: mt7996: fix shift overflow warning on 32 bit
- systems
-
-Fix additional shift overflow warning on 32 bit systems for mt7996 mac.c
-source.
-
-Fixes: 95c14207d2a9 ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- mt7996/mac.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
---- a/mt7996/mac.c
-+++ b/mt7996/mac.c
-@@ -942,9 +942,13 @@ int mt7996_tx_prepare_skb(struct mt76_de
- 
- 	txp = (struct mt76_connac_txp_common *)(txwi + MT_TXD_SIZE);
- 	for (i = 0; i < nbuf; i++) {
--		u16 len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len) |
--			  FIELD_PREP(MT_TXP_DMA_ADDR_H,
--				     tx_info->buf[i + 1].addr >> 32);
-+		u16 len;
-+
-+		len = FIELD_PREP(MT_TXP_BUF_LEN, tx_info->buf[i + 1].len);
-+#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
-+		len |= FIELD_PREP(MT_TXP_DMA_ADDR_H,
-+				  tx_info->buf[i + 1].addr >> 32);
-+#endif
- 
- 		txp->fw.buf[i] = cpu_to_le32(tx_info->buf[i + 1].addr);
- 		txp->fw.len[i] = cpu_to_le16(len);



From lede-commits at lists.infradead.org  Fri May 10 07:07:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 10:07:17 -0400
Subject: [openwrt/openwrt]  realtek: Trap LLDP packets to the CPU
In-Reply-To: <171535003670.771869.14070495066953151675@git-01.infra.openwrt.org>
References: <171535003670.771869.14070495066953151675@git-01.infra.openwrt.org>
Message-ID: <mailman.35481.1715350042.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460

commit 5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460
Author: Kevin Jilissen <info at kevinjilissen.nl>
AuthorDate: Sat May 4 16:12:20 2024 +0200

    realtek: Trap LLDP packets to the CPU
    
    We should setup the registers for trapping LLDP packets to the CPU.
    Currently, these packets are forwarded to all ports which is not desired
    behaviour.
    
    Signed-off-by: Kevin Jilissen <info at kevinjilissen.nl>
---
 target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index ff81a4c77b..9eb444515f 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -155,6 +155,12 @@ static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
 		priv->r->set_receive_management_action(i, BPDU, TRAP2CPU);
 }
 
+static void rtl83xx_setup_lldp_traps(struct rtl838x_switch_priv *priv)
+{
+	for (int i = 0; i < priv->cpu_port; i++)
+		priv->r->set_receive_management_action(i, LLDP, TRAP2CPU);
+}
+
 static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv,
 				   int port, bool enable)
 {
@@ -207,6 +213,7 @@ static int rtl83xx_setup(struct dsa_switch *ds)
 	rtl83xx_vlan_setup(priv);
 
 	rtl83xx_setup_bpdu_traps(priv);
+	rtl83xx_setup_lldp_traps(priv);
 
 	ds->configure_vlan_while_not_filtering = true;
 



From lede-commits at lists.infradead.org  Fri May 10 07:07:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 10:07:16 -0400
Subject: [openwrt/openwrt]  realtek: Change LLTP register to LLDP
In-Reply-To: <171535003670.771869.14070495066953151675@git-01.infra.openwrt.org>
References: <171535003670.771869.14070495066953151675@git-01.infra.openwrt.org>
Message-ID: <mailman.35482.1715350042.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/81ab9ef2d166f9914a33d54d4dfd00429511ccb2

commit 81ab9ef2d166f9914a33d54d4dfd00429511ccb2
Author: Kevin Jilissen <info at kevinjilissen.nl>
AuthorDate: Sat May 4 16:11:00 2024 +0200

    realtek: Change LLTP register to LLDP
    
    These registers control the handling of Link Layer Discovery Protocol
    (LLDP) packets. This seems to be a typo in the naming.
    
    Signed-off-by: Kevin Jilissen <info at kevinjilissen.nl>
---
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c |  4 ++--
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h | 10 +++++-----
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c |  4 ++--
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
index adff404fdd..d93087f5b1 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
@@ -1678,9 +1678,9 @@ void rtl838x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
 			    RTL838X_RMA_PTP_CTRL + ((port >> 4) << 2));
 		break;
-	case LLTP:
+	case LLDP:
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
-			    RTL838X_RMA_LLTP_CTRL + ((port >> 4) << 2));
+			    RTL838X_RMA_LLDP_CTRL + ((port >> 4) << 2));
 		break;
 	default:
 		break;
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
index a642c74775..261af32bb4 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -425,7 +425,7 @@ typedef enum {
 	PTP,
 	PTP_UDP,
 	PTP_ETH2,
-	LLTP,
+	LLDP,
 	EAPOL,
 	GRATARP,
 } rma_ctrl_t;
@@ -449,10 +449,10 @@ typedef enum {
 #define RTL930X_RMA_PTP_CTRL			(0x9E88)
 #define RTL931X_RMA_PTP_CTRL			(0x8834)
 
-#define RTL838X_RMA_LLTP_CTRL			(0x4340)
-#define RTL839X_RMA_LLTP_CTRL			(0x124C)
-#define RTL930X_RMA_LLTP_CTRL			(0x9EFC)
-#define RTL931X_RMA_LLTP_CTRL			(0x8918)
+#define RTL838X_RMA_LLDP_CTRL			(0x4340)
+#define RTL839X_RMA_LLDP_CTRL			(0x124C)
+#define RTL930X_RMA_LLDP_CTRL			(0x9EFC)
+#define RTL931X_RMA_LLDP_CTRL			(0x8918)
 
 #define RTL930X_RMA_EAPOL_CTRL			(0x9F08)
 #define RTL931X_RMA_EAPOL_CTRL			(0x8930)
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
index ff80a9074e..5889cea6d6 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
@@ -1814,9 +1814,9 @@ void rtl839x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
 			    RTL839X_RMA_PTP_CTRL + ((port >> 4) << 2));
 		break;
-	case LLTP:
+	case LLDP:
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
-			    RTL839X_RMA_LLTP_CTRL + ((port >> 4) << 2));
+			    RTL839X_RMA_LLDP_CTRL + ((port >> 4) << 2));
 		break;
 	default:
 		break;
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
index 07ac25c743..25ad4eaa11 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -516,8 +516,8 @@ void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 	case PTP_ETH2:
 		sw_w32_mask(3, value, RTL931X_RMA_PTP_CTRL + (port << 2));
 	break;
-	case LLTP:
-		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLTP_CTRL + ((port / 10) << 2));
+	case LLDP:
+		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLDP_CTRL + ((port / 10) << 2));
 	break;
 	case EAPOL:
 		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_EAPOL_CTRL + ((port / 10) << 2));



From lede-commits at lists.infradead.org  Fri May 10 07:08:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 10:08:42 -0400
Subject: [openwrt/openwrt]  realtek: Trap LLDP packets to the CPU
In-Reply-To: <171535012135.776088.10775990013667418777@git-01.infra.openwrt.org>
References: <171535012135.776088.10775990013667418777@git-01.infra.openwrt.org>
Message-ID: <mailman.35483.1715350124.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/5b7240c07056ccdde606cea8e832d76f0d4e8002

commit 5b7240c07056ccdde606cea8e832d76f0d4e8002
Author: Kevin Jilissen <info at kevinjilissen.nl>
AuthorDate: Sat May 4 16:12:20 2024 +0200

    realtek: Trap LLDP packets to the CPU
    
    We should setup the registers for trapping LLDP packets to the CPU.
    Currently, these packets are forwarded to all ports which is not desired
    behaviour.
    
    Signed-off-by: Kevin Jilissen <info at kevinjilissen.nl>
    (cherry picked from commit 5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460)
---
 target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
index 063ce9b8c5..6d8b155245 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/dsa.c
@@ -155,6 +155,12 @@ static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
 		priv->r->set_receive_management_action(i, BPDU, TRAP2CPU);
 }
 
+static void rtl83xx_setup_lldp_traps(struct rtl838x_switch_priv *priv)
+{
+	for (int i = 0; i < priv->cpu_port; i++)
+		priv->r->set_receive_management_action(i, LLDP, TRAP2CPU);
+}
+
 static void rtl83xx_port_set_salrn(struct rtl838x_switch_priv *priv,
 				   int port, bool enable)
 {
@@ -207,6 +213,7 @@ static int rtl83xx_setup(struct dsa_switch *ds)
 	rtl83xx_vlan_setup(priv);
 
 	rtl83xx_setup_bpdu_traps(priv);
+	rtl83xx_setup_lldp_traps(priv);
 
 	ds->configure_vlan_while_not_filtering = true;
 



From lede-commits at lists.infradead.org  Fri May 10 07:08:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 10:08:41 -0400
Subject: [openwrt/openwrt]  realtek: Change LLTP register to LLDP
In-Reply-To: <171535012135.776088.10775990013667418777@git-01.infra.openwrt.org>
References: <171535012135.776088.10775990013667418777@git-01.infra.openwrt.org>
Message-ID: <mailman.35484.1715350127.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c5ed115104ce35c0c5a6853b50889f8b777a759b

commit c5ed115104ce35c0c5a6853b50889f8b777a759b
Author: Kevin Jilissen <info at kevinjilissen.nl>
AuthorDate: Sat May 4 16:11:00 2024 +0200

    realtek: Change LLTP register to LLDP
    
    These registers control the handling of Link Layer Discovery Protocol
    (LLDP) packets. This seems to be a typo in the naming.
    
    Signed-off-by: Kevin Jilissen <info at kevinjilissen.nl>
    (cherry picked from commit 81ab9ef2d166f9914a33d54d4dfd00429511ccb2)
---
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c |  4 ++--
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h | 10 +++++-----
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c |  4 ++--
 .../linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c |  4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
index adff404fdd..d93087f5b1 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.c
@@ -1678,9 +1678,9 @@ void rtl838x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
 			    RTL838X_RMA_PTP_CTRL + ((port >> 4) << 2));
 		break;
-	case LLTP:
+	case LLDP:
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
-			    RTL838X_RMA_LLTP_CTRL + ((port >> 4) << 2));
+			    RTL838X_RMA_LLDP_CTRL + ((port >> 4) << 2));
 		break;
 	default:
 		break;
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
index 24d18d61fa..6d29e437af 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -425,7 +425,7 @@ typedef enum {
 	PTP,
 	PTP_UDP,
 	PTP_ETH2,
-	LLTP,
+	LLDP,
 	EAPOL,
 	GRATARP,
 } rma_ctrl_t;
@@ -449,10 +449,10 @@ typedef enum {
 #define RTL930X_RMA_PTP_CTRL			(0x9E88)
 #define RTL931X_RMA_PTP_CTRL			(0x8834)
 
-#define RTL838X_RMA_LLTP_CTRL			(0x4340)
-#define RTL839X_RMA_LLTP_CTRL			(0x124C)
-#define RTL930X_RMA_LLTP_CTRL			(0x9EFC)
-#define RTL931X_RMA_LLTP_CTRL			(0x8918)
+#define RTL838X_RMA_LLDP_CTRL			(0x4340)
+#define RTL839X_RMA_LLDP_CTRL			(0x124C)
+#define RTL930X_RMA_LLDP_CTRL			(0x9EFC)
+#define RTL931X_RMA_LLDP_CTRL			(0x8918)
 
 #define RTL930X_RMA_EAPOL_CTRL			(0x9F08)
 #define RTL931X_RMA_EAPOL_CTRL			(0x8930)
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
index ff80a9074e..5889cea6d6 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl839x.c
@@ -1814,9 +1814,9 @@ void rtl839x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
 			    RTL839X_RMA_PTP_CTRL + ((port >> 4) << 2));
 		break;
-	case LLTP:
+	case LLDP:
 		sw_w32_mask(3 << ((port & 0xf) << 1), (action & 0x3) << ((port & 0xf) << 1),
-			    RTL839X_RMA_LLTP_CTRL + ((port >> 4) << 2));
+			    RTL839X_RMA_LLDP_CTRL + ((port >> 4) << 2));
 		break;
 	default:
 		break;
diff --git a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
index 3221109c18..0f1852abd0 100644
--- a/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-5.15/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -516,8 +516,8 @@ void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_typ
 	case PTP_ETH2:
 		sw_w32_mask(3, value, RTL931X_RMA_PTP_CTRL + (port << 2));
 	break;
-	case LLTP:
-		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLTP_CTRL + ((port / 10) << 2));
+	case LLDP:
+		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_LLDP_CTRL + ((port / 10) << 2));
 	break;
 	case EAPOL:
 		sw_w32_mask(7 << ((port % 10) * 3), value << ((port % 10) * 3), RTL931X_RMA_EAPOL_CTRL + ((port / 10) << 2));



From lede-commits at lists.infradead.org  Fri May 10 10:23:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 13:23:26 -0400
Subject: [openwrt/openwrt]  mpc85xx: convert WS-AP3710i to simpleImage wrapper
In-Reply-To: <171536180600.1273663.9908866634859933457@git-01.infra.openwrt.org>
References: <171536180600.1273663.9908866634859933457@git-01.infra.openwrt.org>
Message-ID: <mailman.35534.1715361811.1280.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/447eef2063cce1ad472a07af3e368826158b1da3

commit 447eef2063cce1ad472a07af3e368826158b1da3
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Apr 25 16:53:55 2024 +0200

    mpc85xx: convert WS-AP3710i to simpleImage wrapper
    
    Convert the Enterasys WS-AP3710i access point to use the simpleImage
    wrapper.
    
    This is necessary, as the bootlaoder does not align the DTB correctly
    (and does not support altering the FDT loadaddress). Booting images with
    kernels 5.15 and later can break depending on the alignment on the DTB
    within the FIT image.
    
    Compared with the patch applied to master, this compiles the loader at
    the changed offset used in OpenWrt master. This is required, as U-Boot
    loads the uImage at the offset the loader is currently compiled for.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit eec18118d02fa5d095cb4035c42187e487d0e68c)
---
 .../files/arch/powerpc/boot/dts/ws-ap3710i.dts     | 104 ++++++++++++++++++++-
 target/linux/mpc85xx/image/p1020.mk                |   6 +-
 target/linux/mpc85xx/p1020/target.mk               |   2 +-
 .../106-powerpc-85xx-ws-ap3710i-support.patch      |  30 ++++++
 .../107-powerpc-85xx-add-ws-ap3825i-support.patch  |  22 ++---
 .../109-powerpc-85xx-add-ws-ap3715i-support.patch  |  14 +--
 .../110-powerpc-85xx-br200-wp-support.patch        |   8 +-
 7 files changed, 158 insertions(+), 28 deletions(-)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
index 5d81da4686..2eb6f6e21e 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
@@ -9,6 +9,8 @@
 	compatible = "enterasys,ws-ap3710i";
 
 	aliases {
+		ethernet0 = &enet0;
+		ethernet1 = &enet2;
 		led-boot = &led_power_green;
 		led-failsafe = &led_power_red;
 		led-running = &led_power_green;
@@ -16,6 +18,11 @@
 		label-mac-device = &enet0;
 	};
 
+	chosen {
+		bootargs-override = "console=ttyS0,115200";
+		stdout-path = &serial0;
+	};
+
 	memory {
 		device_type = "memory";
 	};
@@ -74,7 +81,7 @@
 				#size-cells = <1>;
 
 				partition at 0 {
-					compatible = "denx,fit";
+					compatible = "denx,uimage";
 					reg = <0x0 0x1d80000>;
 					label = "firmware";
 				};
@@ -145,6 +152,13 @@
 		ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
 			  0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
 		reg = <0 0xffe09000 0 0x1000>;
+
+		/* Filled by U-Boot */
+		bus-range = <0x00 0x01>;
+		dma-ranges = <0x2000000 0x00 0xfff00000 0x00 0xffe00000
+			      0x00 0x100000 0x42000000 0x00 0x00 0x00
+			      0x00 0x00 0x10000000>;
+
 		pcie at 0 {
 			ranges = <0x2000000 0x0 0xa0000000
 				  0x2000000 0x0 0xa0000000
@@ -160,6 +174,13 @@
 		reg = <0 0xffe0a000 0 0x1000>;
 		ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
 			  0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
+
+		/* Filled by U-Boot */
+		bus-range = <0x00 0x01>;
+		dma-ranges = <0x2000000 0x00 0xfff00000 0x00
+			      0xffe00000 0x00 0x100000 0x42000000
+			      0x00 0x00 0x00 0x00 0x00 0x10000000>;
+
 		pcie at 0 {
 			ranges = <0x2000000 0x0 0x80000000
 				  0x2000000 0x0 0x80000000
@@ -174,6 +195,87 @@
 };
 /include/ "fsl/p1020si-post.dtsi"
 
+/ {
+	cpus {
+		PowerPC,P1020 at 0 {
+			bus-frequency = <399999996>;
+			timebase-frequency = <50000000>;
+			clock-frequency = <799999992>;
+			d-cache-block-size = <0x20>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <0x80>;
+			i-cache-block-size = <0x20>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <0x80>;
+			cpu-release-addr = <0x0 0x0ffff280>;
+			status = "okay";
+			enable-method = "spin-table";
+		};
+
+		PowerPC,P1020 at 1 {
+			bus-frequency = <399999996>;
+			timebase-frequency = <50000000>;
+			clock-frequency = <799999992>;
+			d-cache-block-size = <0x20>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <0x80>;
+			i-cache-block-size = <0x20>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <0x80>;
+			cpu-release-addr = <0x0 0x0ffff2a0>;
+			status = "disabled";
+			enable-method = "spin-table";
+		};
+	};
+
+	memory {
+		reg = <0x0 0x0 0x0 0x10000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		cpu1-bootpage at ff00000 {
+			/* Reserve upper 1 MB for second-core-bootpage */
+			reg = <0x0 0xff00000 0x0 0x100000>;
+		};
+	};
+
+	soc at ffe00000 {
+		bus-frequency = <399999996>;
+
+		serial at 4600 {
+			clock-frequency = <399999996>;
+		};
+
+		serial at 4500 {
+			clock-frequency = <399999996>;
+		};
+
+		pic at 40000 {
+			clock-frequency = <399999996>;
+		};
+	};
+
+	localbus at ffe05000 {
+		bus-frequency = <24999999>;
+	};
+};
+
+&enet0 {
+	rx-stash-idx = <0x00>;
+	rx-stash-len = <0x60>;
+	bd-stash;
+};
+
+&enet2 {
+	rx-stash-idx = <0x00>;
+	rx-stash-len = <0x60>;
+	bd-stash;
+};
+
 /*
  * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses
  * aliases to determine PCI domain numbers, drop aliases so as not to
diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk
index d3d7f93ddd..e5bfabf8ce 100644
--- a/target/linux/mpc85xx/image/p1020.mk
+++ b/target/linux/mpc85xx/image/p1020.mk
@@ -62,7 +62,11 @@ define Device/enterasys_ws-ap3710i
   DEVICE_VENDOR := Enterasys
   DEVICE_MODEL := WS-AP3710i
   BLOCKSIZE := 128k
-  KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb
+  KERNEL_NAME := simpleImage.ws-ap3710i
+  KERNEL_ENTRY := 0x1000000
+  KERNEL_LOADADDR := 0x1000000
+  KERNEL = kernel-bin | uImage none
+  KERNEL_INITRAMFS := kernel-bin | uImage none
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
 endef
diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk
index 8770edb9a9..d0d919cb1d 100644
--- a/target/linux/mpc85xx/p1020/target.mk
+++ b/target/linux/mpc85xx/p1020/target.mk
@@ -1,5 +1,5 @@
 BOARDNAME:=P1020
-KERNEL_IMAGES:=simpleImage.ws-ap3825i
+KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i
 
 define Target/Description
 	Build firmware images for Freescale P1020 based boards.
diff --git a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch
index 124376ffd9..1edc2aa56b 100644
--- a/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch
+++ b/target/linux/mpc85xx/patches-5.15/106-powerpc-85xx-ws-ap3710i-support.patch
@@ -28,3 +28,33 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
  obj-$(CONFIG_FB_FSL_DIU)	+= t1042rdb_diu.o
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie
+ src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S
+ src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
+ src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
++src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
+ 
+ src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
+ 
+@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm
+ image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
+ image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+ image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
++image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
+ # Board ports in arch/powerpc/platform/86xx/Kconfig
+ image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
+ 
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -326,7 +326,8 @@ adder875-redboot)
+     platformo="$object/fixed-head.o $object/redboot-8xx.o"
+     binary=y
+     ;;
+-simpleboot-tl-wdr4900-v1)
++simpleboot-tl-wdr4900-v1|\
++simpleboot-ws-ap3710i)
+     platformo="$object/fixed-head.o $object/simpleboot.o"
+     link_address='0x1000000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch
index b211f3cb30..3f05c906af 100644
--- a/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch
+++ b/target/linux/mpc85xx/patches-5.15/107-powerpc-85xx-add-ws-ap3825i-support.patch
@@ -37,29 +37,23 @@ WS-AP3825i AP.
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -164,6 +164,7 @@ src-plat-$(CONFIG_PPC_POWERNV) += pserie
- src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S
- src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
- src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
-+src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
- 
- src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
- 
-@@ -345,6 +346,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm
- image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
+@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
  
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
-@@ -326,6 +326,7 @@ adder875-redboot)
-     platformo="$object/fixed-head.o $object/redboot-8xx.o"
+@@ -327,7 +327,8 @@ adder875-redboot)
      binary=y
      ;;
-+simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
+ simpleboot-tl-wdr4900-v1|\
+-simpleboot-ws-ap3710i)
++simpleboot-ws-ap3710i|\
++simpleboot-ws-ap3825i)
      platformo="$object/fixed-head.o $object/simpleboot.o"
      link_address='0x1000000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch
index 8272d9dd2a..fe9abbb1e2 100644
--- a/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch
+++ b/target/linux/mpc85xx/patches-5.15/109-powerpc-85xx-add-ws-ap3715i-support.patch
@@ -30,21 +30,21 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -346,6 +346,7 @@ image-$(CONFIG_TQM8555)			+= cuImage.tqm
- image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
+@@ -347,6 +347,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
  image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
-@@ -326,6 +326,7 @@ adder875-redboot)
-     platformo="$object/fixed-head.o $object/redboot-8xx.o"
-     binary=y
+@@ -328,6 +328,7 @@ adder875-redboot)
      ;;
+ simpleboot-tl-wdr4900-v1|\
+ simpleboot-ws-ap3710i|\
 +simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
+ simpleboot-ws-ap3825i)
      platformo="$object/fixed-head.o $object/simpleboot.o"
+     link_address='0x1000000'
diff --git a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch
index 8d510759dc..ef05df3430 100644
--- a/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch
+++ b/target/linux/mpc85xx/patches-5.15/110-powerpc-85xx-br200-wp-support.patch
@@ -35,7 +35,7 @@
  src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
 +src-plat-$(CONFIG_BR200_WP) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
- src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
  
 @@ -345,6 +346,7 @@ image-$(CONFIG_TQM8548)			+= cuImage.tqm
  image-$(CONFIG_TQM8555)			+= cuImage.tqm8555
@@ -43,8 +43,8 @@
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
 +image-$(CONFIG_BR200_WP)		+= simpleImage.br200-wp
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
  image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
- image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
 @@ -326,6 +326,7 @@ adder875-redboot)
@@ -52,6 +52,6 @@
      binary=y
      ;;
 +simpleboot-br200-wp|\
+ simpleboot-tl-wdr4900-v1|\
+ simpleboot-ws-ap3710i|\
  simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)



From lede-commits at lists.infradead.org  Fri May 10 12:03:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 15:03:51 -0400
Subject: [openwrt/openwrt]  kernel: add missing kernel 6.6 symbols
In-Reply-To: <171536783059.1539619.17793521949391395339@git-01.infra.openwrt.org>
References: <171536783059.1539619.17793521949391395339@git-01.infra.openwrt.org>
Message-ID: <mailman.35555.1715367840.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/72cdba7b1a5a573d6b34c8fe462788ee9c951f99

commit 72cdba7b1a5a573d6b34c8fe462788ee9c951f99
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Fri May 10 19:49:21 2024 +0200

    kernel: add missing kernel 6.6 symbols
    
    Add missing kernel 6.6 symbols for bcm27xx.
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 target/linux/generic/config-6.6 | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index 1e9a82e8f0..d6836ebfb8 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -1693,12 +1693,14 @@ CONFIG_DQL=y
 # CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set
 # CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set
 # CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set
+# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set
 # CONFIG_DRM_PANEL_ILITEK_IL9322 is not set
 # CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set
 # CONFIG_DRM_PANEL_ILITEK_ILI9806E is not set
 # CONFIG_DRM_PANEL_ILITEK_ILI9881C is not set
 # CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set
 # CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set
+# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set
 # CONFIG_DRM_PANEL_JDI_LT070ME05000 is not set
 # CONFIG_DRM_PANEL_JDI_R63452 is not set
 # CONFIG_DRM_PANEL_KHADAS_TS050 is not set
@@ -1708,13 +1710,16 @@ CONFIG_DQL=y
 # CONFIG_DRM_PANEL_LG_LB035Q02 is not set
 # CONFIG_DRM_PANEL_LG_LG4573 is not set
 # CONFIG_DRM_PANEL_LVDS is not set
+# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set
 # CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set
 # CONFIG_DRM_PANEL_MIPI_DBI is not set
 # CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set
 # CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set
+# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set
 # CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set
 # CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set
 # CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set
+# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set
 # CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set
 # CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set
 # CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set
@@ -1750,14 +1755,18 @@ CONFIG_DQL=y
 # CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set
 # CONFIG_DRM_PANEL_SONY_ACX424AKP is not set
 # CONFIG_DRM_PANEL_SONY_ACX565AKM is not set
+# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set
 # CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set
+# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set
 # CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set
 # CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set
 # CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set
 # CONFIG_DRM_PANEL_TPO_TPG110 is not set
 # CONFIG_DRM_PANEL_TPO_Y17P is not set
 # CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set
+# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set
 # CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set
+# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set
 # CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN is not set
 # CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set
 # CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set
@@ -5361,6 +5370,7 @@ CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY=3
 # CONFIG_REGULATOR_QCOM_REFGEN is not set
 # CONFIG_REGULATOR_RAA215300 is not set
 # CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set
+# CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2 is not set
 # CONFIG_REGULATOR_RT4801 is not set
 # CONFIG_REGULATOR_RT4803 is not set
 # CONFIG_REGULATOR_RT5190A is not set



From lede-commits at lists.infradead.org  Fri May 10 12:03:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 15:03:50 -0400
Subject: [openwrt/openwrt]  image: add missing DTC include-prefixes directory
In-Reply-To: <171536783059.1539619.17793521949391395339@git-01.infra.openwrt.org>
References: <171536783059.1539619.17793521949391395339@git-01.infra.openwrt.org>
Message-ID: <mailman.35556.1715367840.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c45289702b900f31a60bdae995ce0d44430d487a

commit c45289702b900f31a60bdae995ce0d44430d487a
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Fri May 10 13:39:07 2024 +0200

    image: add missing DTC include-prefixes directory
    
    include-prefixes were moved to a common directory in linux v4.12, see
    https://github.com/torvalds/linux/commit/d5d332d3f7e8435e264a71b90178dee69428d630
    
    This is needed for bcm27xx kernel v6.6 support.
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 include/image.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/image.mk b/include/image.mk
index 284298e5ed..0dd18dbd82 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -185,6 +185,7 @@ define Image/BuildDTB/sub
 		-I$(DTS_DIR) \
 		-I$(DTS_DIR)/include \
 		-I$(LINUX_DIR)/include/ \
+		-I$(LINUX_DIR)/scripts/dtc/include-prefixes \
 		-undef -D__DTS__ $(3) \
 		-o $(2).tmp $(1)
 	$(LINUX_DIR)/scripts/dtc/dtc -O dtb \



From lede-commits at lists.infradead.org  Fri May 10 13:41:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 16:41:48 -0400
Subject: [openwrt/openwrt]  base-files: fix uid/gid auto-enumeration to avoid
 16-bit limit
In-Reply-To: <171537370883.1766152.4561398644347259548@git-01.infra.openwrt.org>
References: <171537370883.1766152.4561398644347259548@git-01.infra.openwrt.org>
Message-ID: <mailman.35569.1715373714.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/140b48a9e93909873bee777ca5bdf49fe4f01271

commit 140b48a9e93909873bee777ca5bdf49fe4f01271
Author: Thomas Winkler <tewinkler86 at gmail.com>
AuthorDate: Fri Nov 10 22:48:59 2023 +0100

    base-files: fix uid/gid auto-enumeration to avoid 16-bit limit
    
    uid/gid range should be limited to 16bit unsigned integer range to
    avoid "wraparound" issues with permissions where jffs2
    is employed for storage and chown 65536 (first auto-created user)
    becomes equivalent to chown 0
    
    Fixes: #13927
    
    Signed-off-by: Thomas Winkler <tewinkler86 at gmail.com>
---
 package/base-files/files/lib/functions.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 7b3203f55a..82ee58f642 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -408,7 +408,7 @@ group_add_next() {
 		return
 	fi
 	gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
-	gid=65536
+	gid=32768
 	while echo "$gids" | grep -q "^$gid$"; do
 		gid=$((gid + 1))
 	done
@@ -439,7 +439,7 @@ user_add() {
 	local rc
 	[ -z "$uid" ] && {
 		uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
-		uid=65536
+		uid=32768
 		while echo "$uids" | grep -q "^$uid$"; do
 			uid=$((uid + 1))
 		done



From lede-commits at lists.infradead.org  Fri May 10 18:12:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 10 May 2024 21:12:23 -0400
Subject: [openwrt/openwrt]  mediatek: fix PWM fan on BPi-R4
In-Reply-To: <171538994312.2120828.1633098801982304171@git-01.infra.openwrt.org>
References: <171538994312.2120828.1633098801982304171@git-01.infra.openwrt.org>
Message-ID: <mailman.35590.1715389950.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8113169cadce2e298a6a6b973132bd40a996f2f4

commit 8113169cadce2e298a6a6b973132bd40a996f2f4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu May 9 22:35:47 2024 +0100

    mediatek: fix PWM fan on BPi-R4
    
    Add additional PWM fan cooling step and enable fan on BPi-R4.
    
    Suggested-by: Frank Wunderlich <frank-w at public-files.de>
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi    | 9 +++++++++
 .../mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi | 4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index c4c05fd419..14c615b67c 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -297,6 +297,15 @@
 	status = "okay";
 };
 
+&pwm {
+	status = "okay";
+};
+
+&fan {
+	pwms = <&pwm 0 50000>;
+	status = "okay";
+};
+
 &ssusb1 {
 	status = "okay";
 };
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index af4dcb3581..9ad068fe05 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -149,8 +149,8 @@
 
 	fan: pwm-fan {
 		compatible = "pwm-fan";
-		/* cooling level (0, 1, 2) : (0% duty, 50% duty, 100% duty) */
-		cooling-levels = <0 128 255>;
+		/* cooling level (0, 1, 2, 3) : (0% duty, 30% duty, 50% duty, 100% duty) */
+		cooling-levels = <0 80 128 255>;
 		#cooling-cells = <2>;
 		#thermal-sensor-cells = <1>;
 		status = "disabled";



From lede-commits at lists.infradead.org  Sat May 11 03:38:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 06:38:16 -0400
Subject: [openwrt/openwrt]  ubnt-ledbar: adapt for kernel v6.6
In-Reply-To: <171542389658.3664857.7482451848569771370@git-01.infra.openwrt.org>
References: <171542389658.3664857.7482451848569771370@git-01.infra.openwrt.org>
Message-ID: <mailman.35610.1715423904.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0162174e7e384a615eb7682b978d6489de556fa1

commit 0162174e7e384a615eb7682b978d6489de556fa1
Author: Sven Wegener <sven.wegener at stealer.net>
AuthorDate: Fri May 10 13:52:00 2024 +0200

    ubnt-ledbar: adapt for kernel v6.6
    
    Linux kernel commit torvalds/linux at b8a1a4cd5a98a2adf8dfd6902cd98e57d910ee12
    added a temporary probe_new member to struct i2c_driver, to drop the
    rarely used second parameter of the probe function and not break API for
    out of tree drivers. With torvalds/linux at 5eb1e6e459cfa025f79c43014f66ff62a55542f1,
    which is part of v6.6, this probe_new member is dropped and the
    signature of the probe function is updated.
    
    ubnt-ledbar is used by the mediatek and ramips targets and both have
    been updated to v6.6, so adapt the probe function signature and remove
    other compat code for versions before v6.6.
    
    Signed-off-by: Sven Wegener <sven.wegener at stealer.net>
    Link: https://github.com/openwrt/openwrt/pull/15443
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c b/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c
index ee9d34601c..e0516322dc 100644
--- a/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c
+++ b/package/kernel/ubnt-ledbar/src/leds-ubnt-ledbar.c
@@ -9,7 +9,6 @@
 #include <linux/of.h>
 #include <linux/of_gpio.h>
 #include <linux/gpio/consumer.h>
-#include <linux/version.h>
 
 /**
  * Driver for the Ubiquiti RGB LED controller (LEDBAR).
@@ -167,9 +166,7 @@ static int ubnt_ledbar_init_led(struct device_node *np, struct ubnt_ledbar *ledb
 	return ret;
 }
 
-
-static int ubnt_ledbar_probe(struct i2c_client *client,
-			     const struct i2c_device_id *id)
+static int ubnt_ledbar_probe(struct i2c_client *client)
 {
 	struct device_node *np = client->dev.of_node;
 	struct ubnt_ledbar *ledbar;
@@ -219,19 +216,11 @@ static int ubnt_ledbar_probe(struct i2c_client *client,
 	return ubnt_ledbar_apply_state(ledbar);
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
-static int ubnt_ledbar_remove(struct i2c_client *client)
-#else
 static void ubnt_ledbar_remove(struct i2c_client *client)
-#endif
 {
 	struct ubnt_ledbar *ledbar = i2c_get_clientdata(client);
 
 	mutex_destroy(&ledbar->lock);
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 1, 0)
-	return 0;
-#endif
 }
 
 static const struct i2c_device_id ubnt_ledbar_id[] = {



From lede-commits at lists.infradead.org  Sat May 11 08:00:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 11:00:45 -0400
Subject: [openwrt/openwrt]  ath79: add support for Senao Engenius ENS1750
In-Reply-To: <171543964525.49998.6986812426254508709@git-01.infra.openwrt.org>
References: <171543964525.49998.6986812426254508709@git-01.infra.openwrt.org>
Message-ID: <mailman.35619.1715439655.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1dd036a659ddb47aeb5e6e077e99fab79bb4d8f2

commit 1dd036a659ddb47aeb5e6e077e99fab79bb4d8f2
Author: Kevin Abraham <kevin at westhousefarm.com>
AuthorDate: Sat Apr 27 01:56:21 2024 -0400

    ath79: add support for Senao Engenius ENS1750
    
    FCC ID: A8J-EWS660AP
    
    Engenius ENS1750 is an outdoor wireless access point with
    2 gigabit ethernet ports, dual-band wireless,
    internal antenna plates, and 802.3at PoE+
    
    Engenius EWS660AP, ENS1750, and ENS1200 are "electrically identical,
    different model names are for marketing purpose" according to docs
    provided by Engenius to the FCC.
    
    **Specification:**
    
      - QCA9558 SOC         2.4 GHz, 3x3
      - QCA9880 WLAN        mini PCIe card, 5 GHz, 3x3, 26dBm
      - AR8035-A PHY        RGMII GbE with PoE+ IN
      - AR8033 PHY          SGMII GbE with PoE+ OUT
      - 40 MHz clock
      - 16 MB FLASH         MX25L12845EMI-10G
      - 2x 64 MB RAM
      - UART at J1          populated, RX grounded
      - 6 internal antenna plates (5 dbi, omni-directional)
      - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset)
    
    **MAC addresses:**
    
      Base MAC addressed labeled as "MAC"
      Only one Vendor MAC address in flash
    
      eth0 *:d4 MAC art 0x0
      eth1 *:d5 --- art 0x0 +1
      phy1 *:d6 --- art 0x0 +2
      phy0 *:d7 --- art 0x0 +3
    
    **Serial Access:**
    
      the RX line on the board for UART is shorted to ground by resistor R176
      therefore it must be removed to use the console
      but it is not necessary to remove to view boot log
    
      optionally, R175 can be replaced with a solder bridge short
    
      the resistors R175 and R176 are next to the UART RX pin
    
    **Installation:**
    
      2 ways to flash factory.bin from OEM:
    
      Method 1: Firmware upgrade page:
    
        OEM webpage at 192.168.1.1
        username and password "admin"
        Navigate to "Firmware Upgrade" page from left pane
        Click Browse and select the factory.bin image
        Upload and verify checksum
        Click Continue to confirm and wait 3 minutes
    
      Method 2: Serial to load Failsafe webpage:
    
        After connecting to serial console and rebooting...
        Interrupt uboot with any key pressed rapidly
        execute `run failsafe_boot` OR `bootm 0x9fd70000`
        wait a minute
        connect to ethernet and navigate to
        "192.168.1.1/index.htm"
        Select the factory.bin image and upload
        wait about 3 minutes
    
    **Return to OEM:**
    
      If you have a serial cable, see Serial Failsafe instructions
      otherwise, uboot-env can be used to make uboot load the failsafe image
    
      ssh into openwrt and run
      `fw_setenv rootfs_checksum 0`
      reboot, wait 3 minutes
      connect to ethernet and navigate to 192.168.1.1/index.htm
      select OEM firmware image from Engenius and click upgrade
    
    **TFTP recovery:**
    
      Requires serial console, reset button does nothing
    
      rename initramfs.bin to '0101A8C0.img'
      make available on TFTP server at 192.168.1.101
      power board, interrupt boot
      execute tftpboot and bootm 0x81000000
    
    **Format of OEM firmware image:**
    
      The OEM software of ENS1750 is a heavily modified version
      of Openwrt Kamikaze. One of the many modifications
      is to the sysupgrade program. Image verification is performed
      simply by the successful ungzip and untar of the supplied file
      and name check and header verification of the resulting contents.
      To form a factory.bin that is accepted by OEM Openwrt build,
      the kernel and rootfs must have specific names...
    
        openwrt-ar71xx-generic-ens1750-uImage-lzma.bin
        openwrt-ar71xx-generic-ens1750-root.squashfs
    
      and begin with the respective headers (uImage, squashfs).
      Then the files must be tarballed and gzipped.
      The resulting binary is actually a tar.gz file in disguise.
      This can be verified by using binwalk on the OEM firmware images,
      ungzipping then untaring.
    
      Newer EnGenius software requires more checks but their script
      includes a way to skip them, otherwise the tar must include
      a text file with the version and md5sums in a deprecated format.
    
      The OEM upgrade script is at /etc/fwupgrade.sh.
    
      OKLI kernel loader is required because the OEM software
      expects the kernel to be no greater than 1536k
      and the factory.bin upgrade procedure would otherwise
      overwrite part of the kernel when writing rootfs.
    
    Note on PLL-data cells:
    
      The default PLL register values will not work
      because of the external AR8035 switch between
      the SOC and the ethernet port.
    
      For QCA955x series, the PLL registers for eth0 and eth1
      can be see in the DTSI as 0x28 and 0x48 respectively.
      Therefore the PLL registers can be read from uboot
      for each link speed after attempting tftpboot
      or another network action using that link speed
      with `md 0x18050028 1` and `md 0x18050048 1`.
    
      The clock delay required for RGMII can be applied
      at the PHY side, using the at803x driver `phy-mode`.
      Therefore the PLL registers for GMAC0
      do not need the bits for delay on the MAC side.
      This is possible due to fixes in at803x driver
      since Linux 5.1 and 5.3
    
    Tested-by: Kevin Abraham <kevin at westhousefarm.com>
    Signed-off-by: Kevin Abraham <kevin at westhousefarm.com>
---
 package/boot/uboot-envtools/files/ath79            |  1 +
 ..._ews660ap.dts => qca9558_engenius_dual_ap.dtsi} | 44 ----------
 .../linux/ath79/dts/qca9558_engenius_ens1750.dts   | 48 +++++++++++
 .../linux/ath79/dts/qca9558_engenius_ews660ap.dts  | 97 ++--------------------
 .../generic/base-files/etc/board.d/02_network      |  1 +
 .../generic/base-files/lib/upgrade/platform.sh     |  1 +
 target/linux/ath79/image/generic.mk                | 15 +++-
 7 files changed, 70 insertions(+), 137 deletions(-)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 567bf9824d..5104c5fe9b 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -41,6 +41,7 @@ engenius,ecb1750|\
 engenius,ecb350-v1|\
 engenius,ecb600|\
 engenius,enh202-v1|\
+engenius,ens1750|\
 engenius,ens202ext-v1|\
 engenius,enstationac-v1|\
 engenius,ews660ap|\
diff --git a/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts b/target/linux/ath79/dts/qca9558_engenius_dual_ap.dtsi
similarity index 65%
copy from target/linux/ath79/dts/qca9558_engenius_ews660ap.dts
copy to target/linux/ath79/dts/qca9558_engenius_dual_ap.dtsi
index 9fa1927c1d..1f8a4a2364 100644
--- a/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts
+++ b/target/linux/ath79/dts/qca9558_engenius_dual_ap.dtsi
@@ -2,48 +2,6 @@
 
 #include "qca955x_senao_loader.dtsi"
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-
-/ {
-	compatible = "engenius,ews660ap", "qca,qca9558";
-	model = "EnGenius EWS660AP";
-
-	aliases {
-		label-mac-device = &eth0;
-		led-boot = &led_wifi5g;
-		led-failsafe = &led_wifi5g;
-		led-upgrade = &led_wifi5g;
-	};
-
-	keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
-			debounce-interval = <60>;
-			linux,code = <KEY_RESTART>;
-		};
-	};
-
-	leds {
-		compatible = "gpio-leds";
-
-		wifi2g {
-			label = "green:wifi2g";
-			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-
-		led_wifi5g: wifi5g {
-			label = "green:wifi5g";
-			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy0tpt";
-		};
-	};
-};
-
 &partitions {
 	partition at ff0000 {
 		label = "art";
@@ -122,8 +80,6 @@
 };
 
 &ath10k_1 {
-	status = "okay";
-
 	nvmem-cells = <&macaddr_art_0 3>, <&calibration_art_5000>;
 	nvmem-cell-names = "mac-address", "calibration";
 };
diff --git a/target/linux/ath79/dts/qca9558_engenius_ens1750.dts b/target/linux/ath79/dts/qca9558_engenius_ens1750.dts
new file mode 100644
index 0000000000..45215d31b5
--- /dev/null
+++ b/target/linux/ath79/dts/qca9558_engenius_ens1750.dts
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9558_engenius_dual_ap.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "engenius,ens1750", "qca,qca9558";
+	model = "EnGenius ENS1750";
+
+	aliases {
+		label-mac-device = &eth0;
+		led-boot = &led_wifi5g;
+		led-failsafe = &led_wifi5g;
+		led-upgrade = &led_wifi5g;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		wifi2g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led_wifi5g: wifi5g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts b/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts
index 9fa1927c1d..01a3804fcb 100644
--- a/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts
+++ b/target/linux/ath79/dts/qca9558_engenius_ews660ap.dts
@@ -1,9 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "qca955x_senao_loader.dtsi"
+#include "qca9558_engenius_dual_ap.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 
 / {
 	compatible = "engenius,ews660ap", "qca,qca9558";
@@ -31,103 +32,17 @@
 		compatible = "gpio-leds";
 
 		wifi2g {
-			label = "green:wifi2g";
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
 			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy1tpt";
 		};
 
 		led_wifi5g: wifi5g {
-			label = "green:wifi5g";
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
 			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 	};
 };
-
-&partitions {
-	partition at ff0000 {
-		label = "art";
-		reg = <0xff0000 0x010000>;
-		read-only;
-
-		nvmem-layout {
-			compatible = "fixed-layout";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			macaddr_art_0: macaddr at 0 {
-				compatible = "mac-base";
-				reg = <0x0 0x6>;
-				#nvmem-cell-cells = <1>;
-			};
-
-			calibration_art_1000: calibration at 1000 {
-				reg = <0x1000 0x440>;
-			};
-
-			calibration_art_5000: calibration at 5000 {
-				reg = <0x5000 0x844>;
-			};
-		};
-	};
-};
-
-&mdio0 {
-	status = "okay";
-
-	phy1: ethernet-phy at 1 {
-		reg = <1>;
-		eee-broken-100tx;
-		eee-broken-1000t;
-	};
-
-	phy2: ethernet-phy at 2 {
-		reg = <2>;
-		eee-broken-100tx;
-		eee-broken-1000t;
-		at803x-override-sgmii-link-check;
-	};
-};
-
-&eth0 {
-	status = "okay";
-
-	nvmem-cells = <&macaddr_art_0 0>;
-	nvmem-cell-names = "mac-address";
-
-	phy-handle = <&phy1>;
-	phy-mode = "rgmii-id";
-
-	pll-data = <0x82000000 0x80000101 0x80001313>;
-};
-
-&eth1 {
-	status = "okay";
-
-	nvmem-cells = <&macaddr_art_0 1>;
-	nvmem-cell-names = "mac-address";
-
-	phy-handle = <&phy2>;
-
-	pll-data = <0x03000000 0x00000101 0x00001313>;
-
-	qca955x-sgmii-fixup;
-};
-
-&wmac {
-	status = "okay";
-
-	nvmem-cells = <&macaddr_art_0 2>, <&calibration_art_1000>;
-	nvmem-cell-names = "mac-address", "calibration";
-};
-
-&ath10k_1 {
-	status = "okay";
-
-	nvmem-cells = <&macaddr_art_0 3>, <&calibration_art_5000>;
-	nvmem-cell-names = "mac-address", "calibration";
-};
-
-&pcie1 {
-	status = "okay";
-};
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 6823c333b6..bf93dc8ba8 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
@@ -146,6 +146,7 @@ ath79_setup_interfaces()
 	elecom,wab-i1750-ps|\
 	elecom,wab-s1167-ps|\
 	elecom,wab-s600-ps|\
+	engenius,ens1750|\
 	engenius,enstationac-v1|\
 	engenius,ews511ap|\
 	engenius,ews660ap|\
diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
index cb93c1b5ab..076a785cbf 100644
--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
@@ -40,6 +40,7 @@ platform_do_upgrade() {
 	engenius,eap300-v2|\
 	engenius,eap600|\
 	engenius,ecb600|\
+	engenius,ens1750|\
 	engenius,ens202ext-v1|\
 	engenius,enstationac-v1|\
 	engenius,ews660ap|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index bf300dd18d..90270a7a4e 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1528,18 +1528,29 @@ define Device/engenius_ews511ap
 endef
 TARGET_DEVICES += engenius_ews511ap
 
-define Device/engenius_ews660ap
+define Device/engenius_ews_dual_ap
   $(Device/senao_loader_okli)
   SOC := qca9558
   DEVICE_VENDOR := EnGenius
-  DEVICE_MODEL := EWS660AP
   DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
   IMAGE_SIZE := 11584k
   LOADER_FLASH_OFFS := 0x220000
+endef
+
+define Device/engenius_ews660ap
+  $(Device/engenius_ews_dual_ap)
+  DEVICE_MODEL := EWS660AP
   SENAO_IMGNAME := ar71xx-generic-ews660ap
 endef
 TARGET_DEVICES += engenius_ews660ap
 
+define Device/engenius_ens1750
+  $(Device/engenius_ews_dual_ap)
+  DEVICE_MODEL := ENS1750
+  SENAO_IMGNAME := ar71xx-generic-ens1750
+endef
+TARGET_DEVICES += engenius_ens1750
+
 define Device/enterasys_ws-ap3705i
   SOC := ar9344
   DEVICE_VENDOR := Enterasys



From lede-commits at lists.infradead.org  Sat May 11 08:00:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 11:00:46 -0400
Subject: [openwrt/openwrt]  uboot-envtools: ath79: remove env config for Senao
 Loader devices
In-Reply-To: <171543964525.49998.6986812426254508709@git-01.infra.openwrt.org>
References: <171543964525.49998.6986812426254508709@git-01.infra.openwrt.org>
Message-ID: <mailman.35622.1715439655.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1045bd4a041e469ed218652cdaf2879c74e6de08

commit 1045bd4a041e469ed218652cdaf2879c74e6de08
Author: Kevin Abraham <kevin at westhousefarm.com>
AuthorDate: Sat Apr 27 13:44:58 2024 -0400

    uboot-envtools: ath79: remove env config for Senao Loader devices
    
    uboot-envtools can automatically parse the 'u-boot,env' compatible string from the dts.
    
    Signed-off-by: Kevin Abraham <kevin at westhousefarm.com>
---
 package/boot/uboot-envtools/files/ath79          | 9 ---------
 target/linux/ath79/dts/qca955x_senao_loader.dtsi | 1 +
 2 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 5104c5fe9b..4a6e7e4d0a 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -20,10 +20,7 @@ alfa-network,n5q|\
 alfa-network,pi-wifi4|\
 alfa-network,r36a|\
 alfa-network,tube-2hq|\
-allnet,all-wap02860ac|\
 araknis,an-300-ap-i-n|\
-araknis,an-500-ap-i-ac|\
-araknis,an-700-ap-i-ac|\
 arduino,yun|\
 asus,rt-ac59u|\
 asus,rt-ac59u-v2|\
@@ -31,8 +28,6 @@ asus,zenwifi-cd6n|\
 asus,zenwifi-cd6r|\
 buffalo,bhr-4grv2|\
 devolo,magic-2-wifi|\
-engenius,eap1200h|\
-engenius,eap1750h|\
 engenius,eap300-v2|\
 engenius,eap350-v1|\
 engenius,eap600|\
@@ -41,10 +36,7 @@ engenius,ecb1750|\
 engenius,ecb350-v1|\
 engenius,ecb600|\
 engenius,enh202-v1|\
-engenius,ens1750|\
 engenius,ens202ext-v1|\
-engenius,enstationac-v1|\
-engenius,ews660ap|\
 etactica,eg200|\
 glinet,gl-ar750s-nor|\
 glinet,gl-ar750s-nor-nand|\
@@ -85,7 +77,6 @@ ubnt,powerbridge-m|\
 ubnt,rocket-m|\
 watchguard,ap100|\
 watchguard,ap200|\
-watchguard,ap300|\
 yuncore,a770|\
 yuncore,a782|\
 yuncore,a930|\
diff --git a/target/linux/ath79/dts/qca955x_senao_loader.dtsi b/target/linux/ath79/dts/qca955x_senao_loader.dtsi
index 31e00ce063..7cf64bd965 100644
--- a/target/linux/ath79/dts/qca955x_senao_loader.dtsi
+++ b/target/linux/ath79/dts/qca955x_senao_loader.dtsi
@@ -59,6 +59,7 @@
 			};
 
 			partition at 40000 {
+				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x040000 0x010000>;
 			};



From lede-commits at lists.infradead.org  Sat May 11 08:21:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 11:21:26 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: add support for Cudy M3000 v1
In-Reply-To: <171544088616.110779.13285700579834981525@git-01.infra.openwrt.org>
References: <171544088616.110779.13285700579834981525@git-01.infra.openwrt.org>
Message-ID: <mailman.35623.1715440890.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20e4a18feb3f766b0f6ebec1afc154b345398a7a

commit 20e4a18feb3f766b0f6ebec1afc154b345398a7a
Author: Leon M. Busch-George <leon at georgemail.eu>
AuthorDate: Fri Jan 12 16:10:40 2024 +0100

    mediatek: filogic: add support for Cudy M3000 v1
    
    Hardware:
      SoC:     MT7981b
      RAM:     256 MB
      Flash:   128 MB SPI NAND
      Ethernet:
        1x 2.5Gbps (rtl8221b)
        1x 1Gbps (integrated phy)
      WiFi:    2x2 MT7981
      Buttons: Reset, WPS
      LED:     1x multicolor
    
    Solder on UART:
      - remove rubber ring on the bottom
      - remove screws
      - pull up the cylinder, maybe help by push on an ethernet socket with a screwdriver
      - remove the (3) screws holding the board in the frame
      - remove the board from the frame to get to the screws for the silver, flat heat shield
      - remove the (3) screws holding the heat shield
      - solder UART pins to the back of the board
        - make sure to have the pins point out on side with the black, finned heat spread
        - the markings for the pins are going to be below the silver heat shield
        - Vcc is not needed
    
    If you don't intend on using the UART outside of the installation process, you might not
    want to solder:
    
      - carefully scrape off the thin layer of epoxy on the holes (not the copper)
      - place your pin header with the UART attached in the holes
      - the pins, starting with the one closest to the socket:
        - Vcc (not required)
        - GND
        - RX
        - TX
      - either wedge the header or hold it with your fingers so that the pins stay in contact with the board
    
    Installation (UART):
      - attach an Ethernet cable to the 1Gbps port (black) on the router
      - hold the reset button while powering the router
      - press CTRL-C or wait for the timeout to get to the U-Boot prompt
      - prepare a TFTP server on the network to supply ..-initramfs-kernel.bin
      - use 'tftpboot' in the U-Boot shell to pull the image
      - boot the image using 'bootm'
      - push the ..-sysupgrade to the router using your preferred method
      - perform the upgrade with 'sysupgrade -n'
    
    There is a recovery mechanism that involves fetching a file called 'recovery.bin' but that is not understood yet.
    
    Signed-off-by: Leon M. Busch-George <leon at georgemail.eu>
---
 .../base-files/lib/preinit/05_set_preinit_iface    |  11 +-
 .../linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts   | 214 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/02_network      |  10 +-
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   1 +
 target/linux/mediatek/image/filogic.mk             |  22 +++
 5 files changed, 250 insertions(+), 8 deletions(-)

diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index 9351ffd492..6dfa52c291 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -1,10 +1,6 @@
 set_preinit_iface() {
 	case $(board_name) in
-	smartrg,sdg-8622|\
-	smartrg,sdg-8632)
-		ip link set lan up
-		ifname=lan
-		;;
+	cudy,m3000-v1|\
 	cudy,tr3000-v1|\
 	glinet,gl-mt3000)
 		ip link set eth1 up
@@ -16,6 +12,11 @@ set_preinit_iface() {
 		ip link set eth0 up
 		ifname=eth0
 		;;
+	smartrg,sdg-8622|\
+	smartrg,sdg-8632)
+		ip link set lan up
+		ifname=lan
+		;;
 	xiaomi,mi-router-ax3000t|\
 	xiaomi,mi-router-ax3000t-ubootmod|\
 	xiaomi,mi-router-wr30u-stock|\
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
new file mode 100644
index 0000000000..e700d3728a
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
@@ -0,0 +1,214 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "Cudy M3000 v1";
+	compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb";
+
+	aliases {
+		ethernet0 = &gmac0;
+		label-mac-device = &gmac0;
+		led-boot = &led_status;
+		led-failsafe = &led_status;
+		led-running = &led_status;
+		led-upgrade = &led_status;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status: internet-white {
+			function = LED_FUNCTION_WAN_ONLINE;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		internet-red {
+			function = LED_FUNCTION_WAN_ONLINE;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
+		};
+
+		wan {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		lan {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+		phy-handle = <&rtl8221b_phy>;
+
+		/* the MAC address assignment using nvmem-cells doesn't work, so it's done through 02_network */
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 0>;
+	};
+};
+
+&mdio_bus {
+	rtl8221b_phy: ethernet-phy at 1 {
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <1>;
+
+		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+
+		interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+		reset-assert-us = <100000>;
+		reset-deassert-us = <100000>;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+
+	status = "okay";
+
+	spi_nand: spi_nand at 0 {
+		compatible = "spi-nand";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-buswidth = <4>;
+		spi-rx-buswidth = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			mediatek,nmbm;
+			mediatek,bmt-max-ratio = <1>;
+			mediatek,bmt-max-reserved-blocks = <64>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x0000000 0x0100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+			};
+
+			factory: partition at 180000 {
+				label = "Factory";
+				reg = <0x0180000 0x0200000>;
+				read-only;
+			};
+
+			bdinfo: partition at 380000 {
+				label = "bdinfo";
+				reg = <0x0380000 0x0040000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_bdinfo_de00: macaddr at de00 {
+						#nvmem-cell-cells = <1>;
+						compatible = "mac-base";
+						reg = <0xde00 0x6>;
+					};
+				};
+			};
+
+			partition at 3c0000 {
+				label = "FIP";
+				reg = <0x03c0000 0x0200000>;
+			};
+
+			partition at 5c0000 {
+				label = "ubi";
+				reg = <0x05c0000 0x4000000>;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+};
+
+&wifi {
+	status = "okay";
+	mediatek,mtd-eeprom = <&factory 0x0>;
+};
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 648ecb9289..4de3cf044d 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
@@ -53,9 +53,7 @@ mediatek_setup_interfaces()
 	comfast,cf-e393ax)
 		ucidef_set_interfaces_lan_wan "lan1" eth1
 		;;
-	dlink,aquila-pro-ai-m30-a1)
-		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet
-		;;
+	cudy,m3000-v1|\
 	cudy,tr3000-v1|\
 	glinet,gl-mt2500|\
 	glinet,gl-mt3000|\
@@ -64,6 +62,9 @@ mediatek_setup_interfaces()
 	openembed,som7981)
 		ucidef_set_interfaces_lan_wan eth1 eth0
 		;;
+	dlink,aquila-pro-ai-m30-a1)
+		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" internet
+		;;
 	glinet,gl-mt6000|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6088)
@@ -135,6 +136,9 @@ mediatek_setup_macs()
 		;;
 		esac
 		;;
+	cudy,m3000-v1)
+		wan_mac=$(macaddr_add $(cat /sys/class/net/eth1/address) 1)
+		;;
 	h3c,magic-nx30-pro)
 		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
 		lan_mac=$(macaddr_add "$wan_mac" 1)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 75c3d25ed9..e0e1e1f1fc 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -75,6 +75,7 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
 		;;
+	cudy,m3000-v1|\
 	cudy,wr3000-v1)
 		addr=$(mtd_get_mac_binary bdinfo 0xde00)
 		# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index dbe027265a..7948955842 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -466,6 +466,28 @@ define Device/confiabits_mt7981
 endef
 TARGET_DEVICES += confiabits_mt7981
 
+define Device/cudy_m3000-v1
+  DEVICE_VENDOR := Cudy
+  DEVICE_MODEL := M3000
+  DEVICE_VARIANT := v1
+  DEVICE_DTS := mt7981b-cudy-m3000-v1
+  DEVICE_DTS_DIR := ../dts
+  SUPPORTED_DEVICES += R37
+  DEVICE_DTS_LOADADDR := 0x44000000
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  KERNEL := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  IMAGES := sysupgrade.bin
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += cudy_m3000-v1
+
 define Device/cudy_re3000-v1
   DEVICE_VENDOR := Cudy
   DEVICE_MODEL := RE3000



From lede-commits at lists.infradead.org  Sat May 11 08:30:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 11:30:03 -0400
Subject: [openwrt/openwrt]  ramips: add support for JDCloud RE-CP-02
In-Reply-To: <171544140376.133536.10788109437522241016@git-01.infra.openwrt.org>
References: <171544140376.133536.10788109437522241016@git-01.infra.openwrt.org>
Message-ID: <mailman.35624.1715441408.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/985af21123a02ff764156aafff2be4e9cc6e640e

commit 985af21123a02ff764156aafff2be4e9cc6e640e
Author: Sheng Huang <shenghuang147 at gmail.com>
AuthorDate: Mon May 6 13:51:27 2024 +0800

    ramips: add support for JDCloud RE-CP-02
    
    - Soc: MediaTek MT7621AT
    - RAM: 512 MB (DDR3)
    - Flash: 16 MB (SPI NOR)
    - WiFi: MediaTek MT7905DAN, MediaTek MT7975DN
    - Ethernet: 1 WAN, 3 LAN (Gigabit)
    - Buttons: Reset, Joylink
    - LEDs: (red, blue, green), routed to one indicator in the top of the
      device
    - Power: DC 12V 1A tip positive
    - 1 TF Card Slot
    
    The pins for the serial console are already labeled on the board
    J4(V, R, T, G). Serial settings: 3.3V, 115200
    
    MAC addresses:
    
    |         | MAC               | Algorithm |
    | ------- | ----------------- | --------- |
    | label   | dc:d8:xx:xx:xx:01 | label     |
    | LAN     | dc:d8:xx:xx:xx:01 | label     |
    | WAN     | dc:d8:xx:xx:xx:02 | label+1   |
    | WLAN 2g | dc:d8:xx:xx:xx:03 | label+2   |
    | WLAN 5g | de:d8:xx:xx:xx:04 | label+3   |
    
    1. rename the
       openwrt-ramips-mt7621-jdcloud_re-cp-02-squashfs-sysupgrade.bin
       to JDCOS.bin
    
    2. start a TFTP server from IP address 192.168.68.10 and serve the
       image named JDCOS.bin
    
    3. connect your device to the LAN port
    
    4. power up the router and press any key on the console to interrupt
       the boot process.
    
    5. enter the following commands on the router console
    
       1. setenv bootcount 6
    
       2. saveenv
    
       3. reset
    
          > NOTE: wait for the restart, it will automatically fetch the
          > image named JDCOS.bin from the TFTP server and write it into
          > the flash. After the writing is completed, the router will be
          > automatically restarted.
    
    Unable to recognize large-capacity TF card, see #14042. But the patch
    https://github.com/openwrt/openwrt/issues/14042#issuecomment-1910769942
    works
    
    Co-Authored-By: Jianti Chen <clbcjt at outlook.com>
    Signed-off-by: Sheng Huang <shenghuang147 at gmail.com>
---
 .../linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts   | 186 +++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |   9 +
 .../ramips/mt7621/base-files/etc/init.d/bootcount  |   3 +
 3 files changed, 198 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts b/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts
new file mode 100644
index 0000000000..8512ff96b0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_jdcloud_re-cp-02.dts
@@ -0,0 +1,186 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "jdcloud,re-cp-02", "mediatek,mt7621-soc";
+	model = "JDCloud RE-CP-02";
+
+	aliases {
+		label-mac-device = &gmac0;
+		led-boot = &led_status_blue;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_blue;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_red: led-0 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+		};
+
+		led_status_blue: led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		led_status_green: led-2 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		wps {
+			label = "wps";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "U-Boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				compatible = "u-boot,env";
+				label = "Config";
+				reg = <0x40000 0x10000>;
+			};
+
+			partition at 50000 {
+				label = "Factory";
+				reg = <0x50000 0x40000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0xe00>;
+					};
+
+					macaddr_factory_3fff4: macaddr at 3fff4 {
+						reg = <0x3fff4 0x6>;
+					};
+
+					macaddr_factory_3fffa: macaddr at 3fffa {
+						reg = <0x3fffa 0x6>;
+					};
+				};
+			};
+
+			partition at 90000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x90000 0xf70000>;
+			};
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "uart3", "jtag", "wdt";
+		function = "gpio";
+	};
+};
+
+&sdhci {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie1 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&eeprom_factory_0>;
+		nvmem-cell-names = "eeprom";
+		mediatek,disable-radar-background;
+	};
+};
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_3fff4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	status = "okay";
+	label = "wan";
+	phy-handle = <&ethphy4>;
+
+	nvmem-cells = <&macaddr_factory_3fffa>;
+	nvmem-cell-names = "mac-address";
+};
+
+&ethphy4 {
+	/delete-property/ interrupts;
+};
+
+&switch0 {
+	ports {
+		port at 1 {
+			status = "okay";
+			label = "lan1";
+		};
+
+		port at 2 {
+			status = "okay";
+			label = "lan2";
+		};
+
+		port at 3 {
+			status = "okay";
+			label = "lan3";
+		};
+	};
+};
+
+&xhci {
+	status = "disabled";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 4c6b7057d5..cbaf6a9c59 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -1534,6 +1534,15 @@ define Device/jcg_y2
 endef
 TARGET_DEVICES += jcg_y2
 
+define Device/jdcloud_re-cp-02
+  $(Device/dsa-migration)
+  IMAGE_SIZE := 16000k
+  DEVICE_VENDOR := JD-Cloud
+  DEVICE_MODEL := RE-CP-02
+  DEVICE_PACKAGES := kmod-mt7915-firmware kmod-sdhci-mt7620
+endef
+TARGET_DEVICES += jdcloud_re-cp-02
+
 define Device/keenetic_kn-3010
   $(Device/dsa-migration)
   $(Device/uimage-lzma-loader)
diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
index c558247341..06846cd4ca 100755
--- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
+++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
@@ -15,6 +15,9 @@ boot() {
 			$((0xff)) ]] || printf '\xff' | dd of=/dev/mtdblock3 \
 			count=1 bs=1 seek=$((0x20001))
 		;;
+	jdcloud,re-cp-02)
+		echo -e "bootcount 0\nbootlimit 5\nupgrade_available 1"  | /usr/sbin/fw_setenv -s -
+		;;
 	linksys,e5600|\
 	linksys,ea6350-v4|\
 	linksys,ea7300-v1|\



From lede-commits at lists.infradead.org  Sat May 11 09:59:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 12:59:42 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.156
In-Reply-To: <171544678249.401979.1804579045281483001@git-01.infra.openwrt.org>
References: <171544678249.401979.1804579045281483001@git-01.infra.openwrt.org>
Message-ID: <mailman.35628.1715446790.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1fbe41f4899aa05fceeb58100c9353b7d60cccca

commit 1fbe41f4899aa05fceeb58100c9353b7d60cccca
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 28 12:58:23 2024 +0200

    kernel: bump 5.15 to 5.15.156
    
    No manual changes needed.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.15                                |  4 +--
 ...530-iterate-using-dsa_switch_for_each_use.patch |  4 +--
 ...530-populate-supported_interfaces-and-mac.patch | 18 +++++-----
 ...19-net-dsa-mt7530-remove-interface-checks.patch | 18 +++++-----
 ...530-drop-use-of-phylink_helper_basex_spee.patch |  2 +-
 ...530-only-indicate-linkmodes-that-can-be-s.patch |  8 ++---
 ...t7530-switch-to-use-phylink_get_linkmodes.patch | 12 +++----
 ...a-mt7530-partially-convert-to-phylink_pcs.patch | 38 +++++++++++-----------
 ...530-move-autoneg-handling-to-PCS-validati.patch |  6 ++--
 ...9-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch |  2 +-
 ...-dsa-mt753x-fix-pcs-conversion-regression.patch |  4 +--
 ...dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch |  6 ++--
 ...530-get-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++++-----
 ...t7530-add-support-for-in-band-link-status.patch | 14 ++++----
 ....3-net-dsa-mt7530-use-external-PCS-driver.patch | 24 +++++++-------
 ...et-dsa-mt7530-refactor-SGMII-PCS-creation.patch |  4 +--
 ...-dsa-mt7530-use-unlocked-regmap-accessors.patch |  6 ++--
 ...530-use-regmap-to-access-switch-register-.patch | 14 ++++----
 ...530-move-SGMII-PCS-creation-to-mt7530_pro.patch |  6 ++--
 ...06-net-dsa-mt7530-introduce-mutex-helpers.patch | 12 +++----
 ...530-move-p5_intf_modes-function-to-mt7530.patch |  2 +-
 ...530-introduce-mt7530_probe_common-helper-.patch |  6 ++--
 ...530-introduce-mt7530_remove_common-helper.patch |  4 +--
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch | 14 ++++----
 ...530-introduce-driver-for-MT7988-built-in-.patch | 20 ++++++------
 ...4-net-dsa-mt7530-fix-support-for-MT7531BE.patch |  8 ++---
 ...610-netfilter_match_bypass_default_checks.patch |  2 +-
 ...ensure-all-MACs-are-powered-down-before-r.patch |  4 +--
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  4 +--
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  2 +-
 30 files changed, 142 insertions(+), 142 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 4a82b9c9b3..5436913e05 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .155
-LINUX_KERNEL_HASH-5.15.155 = c85859b86d2e6d1fc91ca1be8b44f24a9b5bb9f86869b04a8665a3a6559126e4
+LINUX_VERSION-5.15 = .156
+LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778
diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
index 3f7f328247..bdb4a8315a 100644
--- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
+++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1243,27 +1243,31 @@ static int
+@@ -1404,27 +1404,31 @@ static int
  mt7530_port_bridge_join(struct dsa_switch *ds, int port,
  			struct net_device *bridge)
  {
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Add the all other ports to this port matrix. */
-@@ -1368,24 +1372,28 @@ static void
+@@ -1529,24 +1533,28 @@ static void
  mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
  			 struct net_device *bridge)
  {
diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
index c3902bb9c5..3f5b953a2a 100644
--- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
+++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2499,6 +2499,32 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -2535,6 +2561,37 @@ static bool mt7531_is_rgmii_port(struct
+@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -3011,6 +3068,18 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
  			 unsigned long *supported)
-@@ -3246,6 +3315,7 @@ static const struct dsa_switch_ops mt753
+@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_del		= mt7530_port_vlan_del,
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_validate	= mt753x_phylink_validate,
  	.phylink_mac_link_state	= mt753x_phylink_mac_link_state,
  	.phylink_mac_config	= mt753x_phylink_mac_config,
-@@ -3263,6 +3333,7 @@ static const struct mt753x_info mt753x_t
+@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3274,6 +3345,7 @@ static const struct mt753x_info mt753x_t
+@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3286,6 +3358,7 @@ static const struct mt753x_info mt753x_t
+@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7531_ind_phy_write,
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7531_phy_mode_supported,
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
-@@ -3348,6 +3421,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	 */
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
@@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	    !priv->info->mac_port_get_state || !priv->info->mac_port_config)
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -796,6 +796,8 @@ struct mt753x_info {
+@@ -801,6 +801,8 @@ struct mt753x_info {
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
  	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
index d1d56f5aa8..60634aa0d9 100644
--- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
+++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
@@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2525,37 +2525,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
  {
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
-@@ -2592,44 +2561,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2884,9 +2815,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
  		if (state->interface != PHY_INTERFACE_MODE_GMII)
-@@ -3102,12 +3030,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
  	struct mt7530_priv *priv = ds->priv;
  
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set_port_modes(mask);
  
  	if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
-@@ -3334,7 +3256,6 @@ static const struct mt753x_info mt753x_t
+@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3346,7 +3267,6 @@ static const struct mt753x_info mt753x_t
+@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3359,7 +3279,6 @@ static const struct mt753x_info mt753x_t
+@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
-@@ -3422,7 +3341,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EINVAL;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -798,8 +798,6 @@ struct mt753x_info {
+@@ -803,8 +803,6 @@ struct mt753x_info {
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
index 19b44d35ed..f98cf4c793 100644
--- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
+++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3054,11 +3054,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
index 5e55f92fc7..a499b8e5b1 100644
--- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
+++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2632,12 +2632,13 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7
  }
  
  static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		phylink_set(supported, 2500baseX_Full);
  		phylink_set(supported, 2500baseT_Full);
  	}
-@@ -3010,16 +3011,18 @@ static void mt753x_phylink_get_caps(stru
+@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru
  
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
@@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -3042,12 +3045,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc
  	}
  
  	/* This switch only supports 1G full-duplex. */
@@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set(mask, Asym_Pause);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -799,6 +799,7 @@ struct mt753x_info {
+@@ -804,6 +804,7 @@ struct mt753x_info {
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
index ddf368fa1a..b7fc061060 100644
--- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
+++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2631,19 +2631,6 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
  			   unsigned int mode, phy_interface_t interface,
-@@ -3010,51 +2997,21 @@ static void mt753x_phylink_get_caps(stru
+@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru
  }
  
  static void
@@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
-@@ -3255,7 +3212,6 @@ static const struct mt753x_info mt753x_t
+@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3266,7 +3222,6 @@ static const struct mt753x_info mt753x_t
+@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3278,7 +3233,6 @@ static const struct mt753x_info mt753x_t
+@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
  		.mac_pcs_an_restart = mt7531_sgmii_restart_an,
-@@ -3340,7 +3294,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
index 7f69ea2fb4..7afa5be3d4 100644
--- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
+++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* String, offset, and register size in bytes if different from 4 bytes */
  static const struct mt7530_mib_desc mt7530_mib[] = {
  	MIB_DESC(1, 0x00, "TxDrop"),
-@@ -2631,12 +2636,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	unsigned int val;
  
  	/* For adjusting speed and duplex of SGMII force mode. */
-@@ -2662,6 +2666,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
+@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
  
  	/* MT7531 SGMII 1G force mode can only work in full duplex mode,
  	 * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	 */
  	if ((speed == SPEED_10 || speed == SPEED_100) &&
  	    duplex != DUPLEX_FULL)
-@@ -2737,9 +2744,10 @@ static int mt7531_sgmii_setup_mode_an(st
+@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st
  	return 0;
  }
  
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 val;
  
  	/* Only restart AN when AN is enabled */
-@@ -2796,6 +2804,24 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds,
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  			  const struct phylink_link_state *state)
-@@ -2857,17 +2883,6 @@ unsupported:
+@@ -3018,17 +3044,6 @@ unsupported:
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
  
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
  					 unsigned int mode,
  					 phy_interface_t interface)
-@@ -2877,16 +2892,13 @@ static void mt753x_phylink_mac_link_down
+@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -2899,8 +2911,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr;
  
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
-@@ -2978,6 +2988,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
@@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
  				   speed, DUPLEX_FULL, true, true);
  
-@@ -3017,16 +3029,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc
  	linkmode_and(state->advertising, state->advertising, mask);
  }
  
@@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
  
  	state->link = (pmsr & PMSR_LINK);
-@@ -3053,8 +3062,6 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa
  		state->pause |= MLO_PAUSE_RX;
  	if (pmsr & PMSR_TX_FC)
  		state->pause |= MLO_PAUSE_TX;
@@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -3096,32 +3103,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (ret)
  		return ret;
-@@ -3134,6 +3158,13 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return ret;
  }
  
-@@ -3195,9 +3226,8 @@ static const struct dsa_switch_ops mt753
+@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
  	.phylink_validate	= mt753x_phylink_validate,
@@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
-@@ -3207,36 +3237,34 @@ static const struct dsa_switch_ops mt753
+@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753
  static const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
@@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  
-@@ -3294,7 +3322,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	priv->id = priv->info->id;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -768,6 +768,12 @@ static const char *p5_intf_modes(unsigne
+@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne
  
  struct mt7530_priv;
  
@@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* struct mt753x_info -	This is the main data structure for holding the specific
   *			part for each supported device
   * @sw_setup:		Holding the handler to a device initialization
-@@ -779,18 +785,14 @@ struct mt7530_priv;
+@@ -784,18 +790,14 @@ struct mt7530_priv;
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
   *			certan MAC port
@@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
-@@ -801,15 +803,9 @@ struct mt753x_info {
+@@ -806,15 +808,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
@@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
  
  /* struct mt7530_priv -	This is the main data structure for holding the state
-@@ -851,6 +847,7 @@ struct mt7530_priv {
+@@ -856,6 +852,7 @@ struct mt7530_priv {
  	u8			mirror_tx;
  
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
index 565a5d0bc5..7731c16c96 100644
--- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
+++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3008,25 +3008,16 @@ static void mt753x_phylink_get_caps(stru
+@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru
  	priv->info->mac_port_get_caps(ds, port, config);
  }
  
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
-@@ -3128,12 +3119,14 @@ static void mt7530_pcs_an_restart(struct
+@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct
  }
  
  static const struct phylink_pcs_ops mt7530_pcs_ops = {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.pcs_get_state = mt7531_pcs_get_state,
  	.pcs_config = mt753x_pcs_config,
  	.pcs_an_restart = mt7531_pcs_an_restart,
-@@ -3225,7 +3218,6 @@ static const struct dsa_switch_ops mt753
+@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
index da9fe699e3..bd35cb1043 100644
--- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
+++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3005,6 +3005,12 @@ static void mt753x_phylink_get_caps(stru
+@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
index eea598a7f4..cff22b5eac 100644
--- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
+++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3143,9 +3143,16 @@ static int
+@@ -3304,9 +3304,16 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (ret)
  		return ret;
  
-@@ -3157,13 +3164,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
index c0dce51a2a..c9f830381e 100644
--- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
+++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1589,11 +1589,11 @@ static void
+@@ -1750,11 +1750,11 @@ static void
  mt7530_hw_vlan_add(struct mt7530_priv *priv,
  		   struct mt7530_hw_vlan_entry *entry)
  {
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* Validate the entry with independent learning, create egress tag per
  	 * VLAN and joining the port as one of the port members.
-@@ -1604,22 +1604,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
+@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
  
  	/* Decide whether adding tag or not for those outgoing packets from the
  	 * port inside the VLAN.
@@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static void
-@@ -1638,11 +1636,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
+@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
  		return;
  	}
  
diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
index 7a4ee56cf9..bb36302f24 100644
--- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
+++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1093,6 +1093,7 @@ static int
+@@ -1254,6 +1254,7 @@ static int
  mt7530_port_enable(struct dsa_switch *ds, int port,
  		   struct phy_device *phy)
  {
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1101,7 +1102,11 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds
  	 * restore the port matrix if the port is the member of a certain
  	 * bridge.
  	 */
@@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
-@@ -1249,7 +1254,8 @@ mt7530_port_bridge_join(struct dsa_switc
+@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc
  			struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1326,9 +1332,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	 * the CPU port get out of VLAN filtering mode.
  	 */
  	if (all_user_ports_removed) {
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
  	}
  }
-@@ -1378,6 +1387,7 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit
  			 struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1406,8 +1416,8 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit
  	 */
  	if (priv->ports[port].enable)
  		mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* When a port is removed from the bridge, the port would be set up
  	 * back to the default as is at initial boot which is a VLAN-unaware
-@@ -1570,6 +1580,9 @@ static int
+@@ -1731,6 +1741,9 @@ static int
  mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
  			   struct netlink_ext_ack *extack)
  {
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (vlan_filtering) {
  		/* The port is being kept as VLAN-unaware port when bridge is
  		 * set up with vlan_filtering not being set, Otherwise, the
-@@ -1577,7 +1590,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
+@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
  		 * for becoming a VLAN-aware port.
  		 */
  		mt7530_port_set_vlan_aware(ds, port);
diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
index 7b89dbc206..acb67ab161 100644
--- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
+++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2791,9 +2791,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	case PHY_INTERFACE_MODE_NA:
  	case PHY_INTERFACE_MODE_1000BASEX:
  	case PHY_INTERFACE_MODE_2500BASEX:
@@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return mt7531_sgmii_setup_mode_force(priv, port, interface);
  	default:
  		return -EINVAL;
-@@ -2869,13 +2866,6 @@ unsupported:
+@@ -3030,13 +3027,6 @@ unsupported:
  		return;
  	}
  
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -3012,6 +3002,9 @@ static void mt753x_phylink_get_caps(stru
+@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* This driver does not make use of the speed, duplex, pause or the
  	 * advertisement in its mac_config, so it is safe to mark this driver
  	 * as non-legacy.
-@@ -3077,6 +3070,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  
  	status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
  	state->link = !!(status & MT7531_SGMII_LINK_STATUS);
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (state->interface == PHY_INTERFACE_MODE_SGMII &&
  	    (status & MT7531_SGMII_AN_ENABLE)) {
  		val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
-@@ -3107,16 +3101,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
-@@ -3157,6 +3179,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	ret = priv->info->sw_setup(ds);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -400,6 +400,7 @@ enum mt7530_vlan_port_acc_frm {
+@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm {
  #define  MT7531_SGMII_LINK_STATUS	BIT(18)
  #define  MT7531_SGMII_AN_ENABLE		BIT(12)
  #define  MT7531_SGMII_AN_RESTART	BIT(9)
diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
index b9d3018f11..d8386fc3cb 100644
--- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2643,128 +2644,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2787,11 +2671,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return -EINVAL;
  	}
-@@ -2816,11 +2700,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return NULL;
  	}
-@@ -3061,86 +2945,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3160,18 +2964,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3179,8 +3022,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3195,6 +3036,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	return ret;
  }
  
-@@ -3286,7 +3137,7 @@ static const struct mt753x_info mt753x_t
+@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3394,7 +3245,7 @@ static void
+@@ -3555,7 +3406,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  	if (!priv)
  		return;
-@@ -3413,6 +3264,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	dev_set_drvdata(&mdiodev->dev, NULL);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -730,13 +691,13 @@ struct mt7530_fdb {
+@@ -735,13 +696,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index 34db4fce0b..8311aaa0bf 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2996,26 +2996,56 @@ static const struct regmap_bus mt7531_re
+@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3037,15 +3067,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 04060b48ba..7271f1023b 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2969,7 +2969,7 @@ static int mt7530_regmap_read(void *cont
+@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -2977,23 +2977,25 @@ static int mt7530_regmap_write(void *con
+@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -3019,6 +3021,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index 48854fd234..2f761c2fad 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2965,22 +2986,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -2993,7 +2998,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -3026,7 +3031,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3191,6 +3196,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3270,6 +3276,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -774,6 +774,7 @@ struct mt753x_info {
+@@ -779,6 +779,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -794,6 +795,7 @@ struct mt7530_priv {
+@@ -799,6 +800,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index b4bcdd0c9d..16feba1daf 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3077,12 +3077,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3199,6 +3193,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3291,6 +3286,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
index b9507e6d9b..dc4b40b824 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1162,7 +1162,6 @@ static int
+@@ -1323,7 +1323,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1173,7 +1172,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1194,7 +1193,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -1990,10 +1989,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -2029,7 +2028,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2038,7 +2037,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index b04a84965b..265cf1fdac 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -709,24 +709,6 @@ enum p5_interface_select {
+@@ -714,24 +714,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index 3f656c7a67..10e2c6a184 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3205,44 +3205,21 @@ static const struct of_device_id mt7530_
+@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3256,23 +3233,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3281,12 +3288,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index efbabf668c..4e754b1002 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3323,6 +3323,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3341,16 +3352,11 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index ee944a6fc5..e970ec3804 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -3003,72 +2954,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3127,7 +3012,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -498,7 +498,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
  	.get_strings		= mt7530_get_strings,
-@@ -3161,8 +3046,9 @@ static const struct dsa_switch_ops mt753
+@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3195,16 +3081,9 @@ static const struct mt753x_info mt753x_t
+@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3241,88 +3120,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3333,57 +3133,6 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv
  	mutex_destroy(&priv->reg_mutex);
  }
  
@@ -679,7 +679,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index e6c1b941dd..3d94295eee 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2037,6 +2037,47 @@ static const struct irq_domain_ops mt753
+@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2070,8 +2111,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2566,6 +2614,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2642,6 +2709,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2711,7 +2789,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2789,7 +2868,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -2869,6 +2949,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3014,6 +3109,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3082,6 +3198,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index 071680f100..49ac8d9780 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3076,6 +3076,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -768,10 +768,10 @@ struct mt753x_info {
+@@ -773,10 +773,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -790,7 +790,6 @@ struct mt7530_priv {
+@@ -795,7 +795,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -798,6 +797,7 @@ struct mt7530_priv {
+@@ -803,6 +802,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
index b17196d3a9..8b1e70bd0e 100644
--- a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
index f10fa057d5..9ae65b8711 100644
--- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
@@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2467,7 +2467,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds)
  	struct mt7530_priv *priv = ds->priv;
  	struct mt7530_dummy_poll p;
  	u32 val, id;
@@ -24,7 +24,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
  
  	/* Reset whole chip through gpio pin or memory-mapped registers for
  	 * different type of hardware
-@@ -2499,6 +2499,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
index b0c0185335..06546b79e3 100644
--- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2174,10 +2174,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  {
  	struct dsa_switch *ds = priv->ds;
  	struct device *dev = priv->dev;
@@ -30,7 +30,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bus = devm_mdiobus_alloc(dev);
  	if (!bus)
  		return -ENOMEM;
-@@ -2194,7 +2197,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	if (priv->irq)
  		mt7530_setup_mdio_irq(priv);
  
diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
index 0f97033db6..a3e3f1185a 100644
--- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2877,8 +2877,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */



From lede-commits at lists.infradead.org  Sat May 11 09:59:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 12:59:43 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.157
In-Reply-To: <171544678249.401979.1804579045281483001@git-01.infra.openwrt.org>
References: <171544678249.401979.1804579045281483001@git-01.infra.openwrt.org>
Message-ID: <mailman.35631.1715446790.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/84d0b0b925997f8c2d1a21a60c79f76d3070ae3e

commit 84d0b0b925997f8c2d1a21a60c79f76d3070ae3e
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 28 21:35:55 2024 +0200

    kernel: bump 5.15 to 5.15.157
    
    Removed because they are upstream:
       generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433
    
    Removed because they are upstream:
       generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56
    
    Manual adapted the following patches:
       generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
       generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.15                                |  4 +-
 ...ntroduce-tagger-owned-storage-for-private.patch | 12 +--
 ...-protocols-connect-to-individual-switches.patch | 10 +--
 ...530-iterate-using-dsa_switch_for_each_use.patch |  4 +-
 ...530-populate-supported_interfaces-and-mac.patch | 18 ++---
 ...19-net-dsa-mt7530-remove-interface-checks.patch | 18 ++---
 ...530-drop-use-of-phylink_helper_basex_spee.patch |  2 +-
 ...530-only-indicate-linkmodes-that-can-be-s.patch |  8 +-
 ...t7530-switch-to-use-phylink_get_linkmodes.patch | 12 +--
 ...a-mt7530-partially-convert-to-phylink_pcs.patch | 38 +++++-----
 ...530-move-autoneg-handling-to-PCS-validati.patch |  6 +-
 ...9-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch |  2 +-
 ...-dsa-mt753x-fix-pcs-conversion-regression.patch |  4 +-
 ...dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch |  6 +-
 ...530-get-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++--
 ...netfilter-flowtable-validate-pppoe-header.patch | 85 ----------------------
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch | 24 ------
 ...d-rtnl_mutex-when-calling-dsa_master_-set.patch |  6 +-
 ...st-set-up-shared-ports-then-non-shared-po.patch |  8 +-
 ...et-next-net-dsa-setup-master-before-ports.patch | 10 +--
 ...vide-switch-operations-for-tracking-the-m.patch |  4 +-
 ...lay-master-state-events-in-dsa_tree_-setu.patch |  4 +-
 ...t7530-add-support-for-in-band-link-status.patch | 14 ++--
 ....3-net-dsa-mt7530-use-external-PCS-driver.patch | 24 +++---
 ...et-dsa-mt7530-refactor-SGMII-PCS-creation.patch |  4 +-
 ...-dsa-mt7530-use-unlocked-regmap-accessors.patch |  6 +-
 ...530-use-regmap-to-access-switch-register-.patch | 14 ++--
 ...530-move-SGMII-PCS-creation-to-mt7530_pro.patch |  6 +-
 ...06-net-dsa-mt7530-introduce-mutex-helpers.patch | 28 +++----
 ...530-move-p5_intf_modes-function-to-mt7530.patch |  4 +-
 ...530-introduce-mt7530_probe_common-helper-.patch |  6 +-
 ...530-introduce-mt7530_remove_common-helper.patch |  4 +-
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch | 16 ++--
 ...530-introduce-driver-for-MT7988-built-in-.patch | 24 +++---
 ...4-net-dsa-mt7530-fix-support-for-MT7531BE.patch |  8 +-
 target/linux/generic/config-5.15                   |  1 +
 .../generic/hack-5.15/250-netfilter_depends.patch  |  2 +-
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |  4 +-
 .../780-usb-net-MeigLink_modem_support.patch       |  4 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |  4 +-
 ...ft_flow_offload-handle-netdevice-events-f.patch | 32 ++++----
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...ge-add-knob-for-filtering-rx-tx-BPDU-pack.patch |  2 +-
 ...ensure-all-MACs-are-powered-down-before-r.patch | 11 +--
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  4 +-
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  2 +-
 .../generic/pending-5.15/920-mangle_bootargs.patch |  2 +-
 47 files changed, 208 insertions(+), 321 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 5436913e05..3289f828be 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .156
-LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778
+LINUX_VERSION-5.15 = .157
+LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414
diff --git a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
index f56a968589..8e5c718042 100644
--- a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
+++ b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
@@ -124,7 +124,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_del(&dst->list);
  	kfree(dst);
  }
-@@ -805,7 +809,7 @@ static int dsa_switch_setup_tag_protocol
+@@ -827,7 +831,7 @@ static int dsa_switch_setup_tag_protocol
  	int port, err;
  
  	if (tag_ops->proto == dst->default_proto)
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (port = 0; port < ds->num_ports; port++) {
  		if (!dsa_is_cpu_port(ds, port))
-@@ -821,6 +825,17 @@ static int dsa_switch_setup_tag_protocol
+@@ -843,6 +847,17 @@ static int dsa_switch_setup_tag_protocol
  		}
  	}
  
@@ -151,7 +151,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  }
  
-@@ -1132,6 +1147,46 @@ static void dsa_tree_teardown(struct dsa
+@@ -1154,6 +1169,46 @@ static void dsa_tree_teardown(struct dsa
  	dst->setup = false;
  }
  
@@ -198,7 +198,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  /* Since the dsa/tagging sysfs device attribute is per master, the assumption
   * is that all DSA switches within a tree share the same tagger, otherwise
   * they would have formed disjoint trees (different "dsa,member" values).
-@@ -1164,12 +1219,15 @@ int dsa_tree_change_tag_proto(struct dsa
+@@ -1186,12 +1241,15 @@ int dsa_tree_change_tag_proto(struct dsa
  			goto out_unlock;
  	}
  
@@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	rtnl_unlock();
  
-@@ -1257,6 +1315,7 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1279,6 +1337,7 @@ static int dsa_port_parse_cpu(struct dsa
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_switch_tree *dst = ds->dst;
  	enum dsa_tag_protocol default_proto;
@@ -224,7 +224,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Find out which protocol the switch would prefer. */
  	default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1311,6 +1370,12 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1333,6 +1392,12 @@ static int dsa_port_parse_cpu(struct dsa
  		 */
  		dsa_tag_driver_put(tag_ops);
  	} else {
diff --git a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
index 0c50ae6fb9..8c81ebc7f5 100644
--- a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
+++ b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_del(&dst->list);
  	kfree(dst);
  }
-@@ -826,17 +822,29 @@ static int dsa_switch_setup_tag_protocol
+@@ -848,17 +844,29 @@ static int dsa_switch_setup_tag_protocol
  	}
  
  connect:
@@ -132,7 +132,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int dsa_switch_setup(struct dsa_switch *ds)
-@@ -1156,13 +1164,6 @@ static int dsa_tree_bind_tag_proto(struc
+@@ -1178,13 +1186,6 @@ static int dsa_tree_bind_tag_proto(struc
  
  	dst->tag_ops = tag_ops;
  
@@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* Notify the switches from this tree about the connection
  	 * to the new tagger
  	 */
-@@ -1172,16 +1173,14 @@ static int dsa_tree_bind_tag_proto(struc
+@@ -1194,16 +1195,14 @@ static int dsa_tree_bind_tag_proto(struc
  		goto out_disconnect;
  
  	/* Notify the old tagger about the disconnection from this tree */
@@ -167,7 +167,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	dst->tag_ops = old_tag_ops;
  
  	return err;
-@@ -1315,7 +1314,6 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1337,7 +1336,6 @@ static int dsa_port_parse_cpu(struct dsa
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_switch_tree *dst = ds->dst;
  	enum dsa_tag_protocol default_proto;
@@ -175,7 +175,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Find out which protocol the switch would prefer. */
  	default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1370,12 +1368,6 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1392,12 +1390,6 @@ static int dsa_port_parse_cpu(struct dsa
  		 */
  		dsa_tag_driver_put(tag_ops);
  	} else {
diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
index bdb4a8315a..f65b0cafa8 100644
--- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
+++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1404,27 +1404,31 @@ static int
+@@ -1425,27 +1425,31 @@ static int
  mt7530_port_bridge_join(struct dsa_switch *ds, int port,
  			struct net_device *bridge)
  {
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Add the all other ports to this port matrix. */
-@@ -1529,24 +1533,28 @@ static void
+@@ -1550,24 +1554,28 @@ static void
  mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
  			 struct net_device *bridge)
  {
diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
index 3f5b953a2a..e04bb11e80 100644
--- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
+++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2687,6 +2687,32 @@ mt7531_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct
+@@ -2723,6 +2749,37 @@ static bool mt7531_is_rgmii_port(struct
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3199,6 +3256,18 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
  			 unsigned long *supported)
-@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753
+@@ -3435,6 +3504,7 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_del		= mt7530_port_vlan_del,
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_validate	= mt753x_phylink_validate,
  	.phylink_mac_link_state	= mt753x_phylink_mac_link_state,
  	.phylink_mac_config	= mt753x_phylink_mac_config,
-@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t
+@@ -3452,6 +3522,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t
+@@ -3463,6 +3534,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t
+@@ -3475,6 +3547,7 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7531_ind_phy_write,
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7531_phy_mode_supported,
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
-@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3537,6 +3610,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	 */
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
@@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	    !priv->info->mac_port_get_state || !priv->info->mac_port_config)
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -801,6 +801,8 @@ struct mt753x_info {
+@@ -807,6 +807,8 @@ struct mt753x_info {
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
  	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
index 60634aa0d9..31be0e7be3 100644
--- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
+++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
@@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2713,37 +2713,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
  {
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
-@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2780,44 +2749,6 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -3072,9 +3003,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
  		if (state->interface != PHY_INTERFACE_MODE_GMII)
-@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3290,12 +3218,6 @@ mt753x_phylink_validate(struct dsa_switc
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
  	struct mt7530_priv *priv = ds->priv;
  
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set_port_modes(mask);
  
  	if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
-@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t
+@@ -3523,7 +3445,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t
+@@ -3535,7 +3456,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t
+@@ -3548,7 +3468,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
-@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3611,7 +3530,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EINVAL;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -803,8 +803,6 @@ struct mt753x_info {
+@@ -809,8 +809,6 @@ struct mt753x_info {
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
index f98cf4c793..2a5d5ae9d9 100644
--- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
+++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3242,11 +3242,6 @@ mt753x_phylink_validate(struct dsa_switc
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
index a499b8e5b1..ad672312e4 100644
--- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
+++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2820,12 +2820,13 @@ static int mt7531_rgmii_setup(struct mt7
  }
  
  static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		phylink_set(supported, 2500baseX_Full);
  		phylink_set(supported, 2500baseT_Full);
  	}
-@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru
+@@ -3198,16 +3199,18 @@ static void mt753x_phylink_get_caps(stru
  
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
@@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3230,12 +3233,13 @@ mt753x_phylink_validate(struct dsa_switc
  	}
  
  	/* This switch only supports 1G full-duplex. */
@@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set(mask, Asym_Pause);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -804,6 +804,7 @@ struct mt753x_info {
+@@ -810,6 +810,7 @@ struct mt753x_info {
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
index b7fc061060..8d9802f1ee 100644
--- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
+++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2819,19 +2819,6 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
  			   unsigned int mode, phy_interface_t interface,
-@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru
+@@ -3198,51 +3185,21 @@ static void mt753x_phylink_get_caps(stru
  }
  
  static void
@@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
-@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t
+@@ -3444,7 +3401,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t
+@@ -3455,7 +3411,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t
+@@ -3467,7 +3422,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
  		.mac_pcs_an_restart = mt7531_sgmii_restart_an,
-@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3529,7 +3483,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
index 7afa5be3d4..149c12c1fb 100644
--- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
+++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* String, offset, and register size in bytes if different from 4 bytes */
  static const struct mt7530_mib_desc mt7530_mib[] = {
  	MIB_DESC(1, 0x00, "TxDrop"),
-@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2819,12 +2824,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	unsigned int val;
  
  	/* For adjusting speed and duplex of SGMII force mode. */
-@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
+@@ -2850,6 +2854,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
  
  	/* MT7531 SGMII 1G force mode can only work in full duplex mode,
  	 * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	 */
  	if ((speed == SPEED_10 || speed == SPEED_100) &&
  	    duplex != DUPLEX_FULL)
-@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st
+@@ -2925,9 +2932,10 @@ static int mt7531_sgmii_setup_mode_an(st
  	return 0;
  }
  
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 val;
  
  	/* Only restart AN when AN is enabled */
-@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2984,6 +2992,24 @@ mt753x_mac_config(struct dsa_switch *ds,
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  			  const struct phylink_link_state *state)
-@@ -3018,17 +3044,6 @@ unsupported:
+@@ -3045,17 +3071,6 @@ unsupported:
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
  
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
  					 unsigned int mode,
  					 phy_interface_t interface)
-@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down
+@@ -3065,16 +3080,13 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3087,8 +3099,6 @@ static void mt753x_phylink_mac_link_up(s
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr;
  
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
-@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3166,6 +3176,8 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
@@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
  				   speed, DUPLEX_FULL, true, true);
  
-@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3205,16 +3217,13 @@ mt753x_phylink_validate(struct dsa_switc
  	linkmode_and(state->advertising, state->advertising, mask);
  }
  
@@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
  
  	state->link = (pmsr & PMSR_LINK);
-@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -3241,8 +3250,6 @@ mt7530_phylink_mac_link_state(struct dsa
  		state->pause |= MLO_PAUSE_RX;
  	if (pmsr & PMSR_TX_FC)
  		state->pause |= MLO_PAUSE_TX;
@@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3284,32 +3291,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (ret)
  		return ret;
-@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3322,6 +3346,13 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return ret;
  }
  
-@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753
+@@ -3384,9 +3415,8 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
  	.phylink_validate	= mt753x_phylink_validate,
@@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
-@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753
+@@ -3396,36 +3426,34 @@ static const struct dsa_switch_ops mt753
  static const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
@@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  
-@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3483,7 +3511,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	priv->id = priv->info->id;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne
+@@ -779,6 +779,12 @@ static const char *p5_intf_modes(unsigne
  
  struct mt7530_priv;
  
@@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* struct mt753x_info -	This is the main data structure for holding the specific
   *			part for each supported device
   * @sw_setup:		Holding the handler to a device initialization
-@@ -784,18 +790,14 @@ struct mt7530_priv;
+@@ -790,18 +796,14 @@ struct mt7530_priv;
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
   *			certan MAC port
@@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
-@@ -806,15 +808,9 @@ struct mt753x_info {
+@@ -812,15 +814,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
@@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
  
  /* struct mt7530_priv -	This is the main data structure for holding the state
-@@ -856,6 +852,7 @@ struct mt7530_priv {
+@@ -862,6 +858,7 @@ struct mt7530_priv {
  	u8			mirror_tx;
  
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
index 7731c16c96..6e406ace0d 100644
--- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
+++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru
+@@ -3196,25 +3196,16 @@ static void mt753x_phylink_get_caps(stru
  	priv->info->mac_port_get_caps(ds, port, config);
  }
  
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
-@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct
+@@ -3316,12 +3307,14 @@ static void mt7530_pcs_an_restart(struct
  }
  
  static const struct phylink_pcs_ops mt7530_pcs_ops = {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.pcs_get_state = mt7531_pcs_get_state,
  	.pcs_config = mt753x_pcs_config,
  	.pcs_an_restart = mt7531_pcs_an_restart,
-@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753
+@@ -3414,7 +3407,6 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
index bd35cb1043..afcfcaba34 100644
--- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
+++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru
+@@ -3193,6 +3193,12 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
index cff22b5eac..bf2938d03b 100644
--- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
+++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3304,9 +3304,16 @@ static int
+@@ -3331,9 +3331,16 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (ret)
  		return ret;
  
-@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3345,13 +3352,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
index c9f830381e..320b5c1ef9 100644
--- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
+++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1750,11 +1750,11 @@ static void
+@@ -1771,11 +1771,11 @@ static void
  mt7530_hw_vlan_add(struct mt7530_priv *priv,
  		   struct mt7530_hw_vlan_entry *entry)
  {
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* Validate the entry with independent learning, create egress tag per
  	 * VLAN and joining the port as one of the port members.
-@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
+@@ -1786,22 +1786,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
  
  	/* Decide whether adding tag or not for those outgoing packets from the
  	 * port inside the VLAN.
@@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static void
-@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
+@@ -1820,11 +1818,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
  		return;
  	}
  
diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
index bb36302f24..eef19b4cb5 100644
--- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
+++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1254,6 +1254,7 @@ static int
+@@ -1275,6 +1275,7 @@ static int
  mt7530_port_enable(struct dsa_switch *ds, int port,
  		   struct phy_device *phy)
  {
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1283,7 +1284,11 @@ mt7530_port_enable(struct dsa_switch *ds
  	 * restore the port matrix if the port is the member of a certain
  	 * bridge.
  	 */
@@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
-@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc
+@@ -1431,7 +1436,8 @@ mt7530_port_bridge_join(struct dsa_switc
  			struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1508,9 +1514,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	 * the CPU port get out of VLAN filtering mode.
  	 */
  	if (all_user_ports_removed) {
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
  	}
  }
-@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1560,6 +1569,7 @@ mt7530_port_bridge_leave(struct dsa_swit
  			 struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1588,8 +1598,8 @@ mt7530_port_bridge_leave(struct dsa_swit
  	 */
  	if (priv->ports[port].enable)
  		mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* When a port is removed from the bridge, the port would be set up
  	 * back to the default as is at initial boot which is a VLAN-unaware
-@@ -1731,6 +1741,9 @@ static int
+@@ -1752,6 +1762,9 @@ static int
  mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
  			   struct netlink_ext_ack *extack)
  {
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (vlan_filtering) {
  		/* The port is being kept as VLAN-unaware port when bridge is
  		 * set up with vlan_filtering not being set, Otherwise, the
-@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
+@@ -1759,7 +1772,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
  		 * for becoming a VLAN-aware port.
  		 */
  		mt7530_port_set_vlan_aware(ds, port);
diff --git a/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
deleted file mode 100644
index 02407da8a8..0000000000
--- a/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:28:59 +0200
-Subject: [PATCH] netfilter: flowtable: validate pppoe header
-
-Ensure there is sufficient room to access the protocol field of the
-PPPoe header. Validate it once before the flowtable lookup, then use a
-helper function to access protocol field.
-
-Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/include/net/netfilter/nf_flow_table.h
-+++ b/include/net/netfilter/nf_flow_table.h
-@@ -318,7 +318,7 @@ int nf_flow_rule_route_ipv6(struct net *
- int nf_flow_table_offload_init(void);
- void nf_flow_table_offload_exit(void);
- 
--static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
-+static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
- {
- 	__be16 proto;
- 
-@@ -334,4 +334,14 @@ static inline __be16 nf_flow_pppoe_proto
- 	return 0;
- }
- 
-+static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
-+{
-+	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
-+		return false;
-+
-+	*inner_proto = __nf_flow_pppoe_proto(skb);
-+
-+	return true;
-+}
-+
- #endif /* _NF_FLOW_TABLE_H */
---- a/net/netfilter/nf_flow_table_inet.c
-+++ b/net/netfilter/nf_flow_table_inet.c
-@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
- 		proto = veth->h_vlan_encapsulated_proto;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		proto = nf_flow_pppoe_proto(skb);
-+		if (!nf_flow_pppoe_proto(skb, &proto))
-+			return NF_ACCEPT;
- 		break;
- 	default:
- 		proto = skb->protocol;
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -246,10 +246,11 @@ static unsigned int nf_flow_xmit_xfrm(st
- 	return NF_STOLEN;
- }
- 
--static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
-+static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
- 				       u32 *offset)
- {
- 	struct vlan_ethhdr *veth;
-+	__be16 inner_proto;
- 
- 	switch (skb->protocol) {
- 	case htons(ETH_P_8021Q):
-@@ -260,7 +261,8 @@ static bool nf_flow_skb_encap_protocol(c
- 		}
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		if (nf_flow_pppoe_proto(skb) == proto) {
-+		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
-+		    inner_proto == proto) {
- 			*offset += PPPOE_SES_HLEN;
- 			return true;
- 		}
-@@ -289,7 +291,7 @@ static void nf_flow_encap_pop(struct sk_
- 			skb_reset_network_header(skb);
- 			break;
- 		case htons(ETH_P_PPP_SES):
--			skb->protocol = nf_flow_pppoe_proto(skb);
-+			skb->protocol = __nf_flow_pppoe_proto(skb);
- 			skb_pull(skb, PPPOE_SES_HLEN);
- 			skb_reset_network_header(skb);
- 			break;
diff --git a/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
deleted file mode 100644
index 3b822b169d..0000000000
--- a/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:29:00 +0200
-Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
-
-pppoe traffic reaching ingress path does not match the flowtable entry
-because the pppoe header is expected to be at the network header offset.
-This bug causes a mismatch in the flow table lookup, so pppoe packets
-enter the classical forwarding path.
-
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct s
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
-+		phdr = (struct pppoe_hdr *)skb_network_header(skb);
- 		tuple->encap[i].id = ntohs(phdr->sid);
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
diff --git a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
index e331226fc4..dbc28efc94 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -1034,6 +1034,8 @@ static int dsa_tree_setup_master(struct
+@@ -1056,6 +1056,8 @@ static int dsa_tree_setup_master(struct
  	struct dsa_port *dp;
  	int err;
  
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_for_each_entry(dp, &dst->ports, list) {
  		if (dsa_port_is_cpu(dp)) {
  			err = dsa_master_setup(dp->master, dp);
-@@ -1042,6 +1044,8 @@ static int dsa_tree_setup_master(struct
+@@ -1064,6 +1066,8 @@ static int dsa_tree_setup_master(struct
  		}
  	}
  
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  }
  
-@@ -1049,9 +1053,13 @@ static void dsa_tree_teardown_master(str
+@@ -1071,9 +1075,13 @@ static void dsa_tree_teardown_master(str
  {
  	struct dsa_port *dp;
  
diff --git a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
index e6472c61da..fbb9c94ec1 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -999,23 +999,28 @@ static void dsa_tree_teardown_switches(s
+@@ -1021,23 +1021,28 @@ static void dsa_tree_teardown_switches(s
  		dsa_switch_teardown(dp->ds);
  }
  
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  	}
  
-@@ -1024,7 +1029,21 @@ static int dsa_tree_setup_switches(struc
+@@ -1046,7 +1051,21 @@ static int dsa_tree_setup_switches(struc
  teardown:
  	dsa_tree_teardown_ports(dst);
  
@@ -89,7 +89,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return err;
  }
-@@ -1111,10 +1130,14 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1133,10 +1152,14 @@ static int dsa_tree_setup(struct dsa_swi
  	if (err)
  		goto teardown_cpu_ports;
  
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	err = dsa_tree_setup_lags(dst);
  	if (err)
  		goto teardown_master;
-@@ -1127,8 +1150,9 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1149,8 +1172,9 @@ static int dsa_tree_setup(struct dsa_swi
  
  teardown_master:
  	dsa_tree_teardown_master(dst);
diff --git a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
index 93cad0c98a..a46e06ef8b 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -545,6 +545,7 @@ static void dsa_port_teardown(struct dsa
+@@ -567,6 +567,7 @@ static void dsa_port_teardown(struct dsa
  	struct devlink_port *dlp = &dp->devlink_port;
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_mac_addr *a, *tmp;
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (!dp->setup)
  		return;
-@@ -566,9 +567,11 @@ static void dsa_port_teardown(struct dsa
+@@ -588,9 +589,11 @@ static void dsa_port_teardown(struct dsa
  		dsa_port_link_unregister_of(dp);
  		break;
  	case DSA_PORT_TYPE_USER:
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  		break;
  	}
-@@ -1130,17 +1133,17 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1152,17 +1155,17 @@ static int dsa_tree_setup(struct dsa_swi
  	if (err)
  		goto teardown_cpu_ports;
  
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dst->setup = true;
  
-@@ -1148,10 +1151,10 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1170,10 +1173,10 @@ static int dsa_tree_setup(struct dsa_swi
  
  	return 0;
  
@@ -100,7 +100,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  teardown_switches:
  	dsa_tree_teardown_switches(dst);
  teardown_cpu_ports:
-@@ -1169,10 +1172,10 @@ static void dsa_tree_teardown(struct dsa
+@@ -1191,10 +1194,10 @@ static void dsa_tree_teardown(struct dsa
  
  	dsa_tree_teardown_lags(dst);
  
diff --git a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
index bffdcb2881..15122950ce 100644
--- a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
+++ b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
@@ -68,7 +68,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p)
  {
  	return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED;
-@@ -949,6 +959,13 @@ struct dsa_switch_ops {
+@@ -957,6 +967,13 @@ struct dsa_switch_ops {
  	int	(*tag_8021q_vlan_add)(struct dsa_switch *ds, int port, u16 vid,
  				      u16 flags);
  	int	(*tag_8021q_vlan_del)(struct dsa_switch *ds, int port, u16 vid);
@@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  #define DSA_DEVLINK_PARAM_DRIVER(_id, _name, _type, _cmodes)		\
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -1275,6 +1275,52 @@ out_unlock:
+@@ -1297,6 +1297,52 @@ out_unlock:
  	return err;
  }
  
diff --git a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
index 6478d580c0..c55c5271d4 100644
--- a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
+++ b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  #include "dsa_priv.h"
  
-@@ -1060,9 +1061,18 @@ static int dsa_tree_setup_master(struct
+@@ -1082,9 +1083,18 @@ static int dsa_tree_setup_master(struct
  
  	list_for_each_entry(dp, &dst->ports, list) {
  		if (dsa_port_is_cpu(dp)) {
@@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  	}
  
-@@ -1077,9 +1087,19 @@ static void dsa_tree_teardown_master(str
+@@ -1099,9 +1109,19 @@ static void dsa_tree_teardown_master(str
  
  	rtnl_lock();
  
diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
index acb67ab161..7f16b936cd 100644
--- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
+++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2979,9 +2979,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	case PHY_INTERFACE_MODE_NA:
  	case PHY_INTERFACE_MODE_1000BASEX:
  	case PHY_INTERFACE_MODE_2500BASEX:
@@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return mt7531_sgmii_setup_mode_force(priv, port, interface);
  	default:
  		return -EINVAL;
-@@ -3030,13 +3027,6 @@ unsupported:
+@@ -3057,13 +3054,6 @@ unsupported:
  		return;
  	}
  
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru
+@@ -3200,6 +3190,9 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* This driver does not make use of the speed, duplex, pause or the
  	 * advertisement in its mac_config, so it is safe to mark this driver
  	 * as non-legacy.
-@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3265,6 +3258,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  
  	status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
  	state->link = !!(status & MT7531_SGMII_LINK_STATUS);
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (state->interface == PHY_INTERFACE_MODE_SGMII &&
  	    (status & MT7531_SGMII_AN_ENABLE)) {
  		val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
-@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3295,16 +3289,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
-@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3345,6 +3367,8 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	ret = priv->info->sw_setup(ds);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm {
+@@ -410,6 +410,7 @@ enum mt7530_vlan_port_acc_frm {
  #define  MT7531_SGMII_LINK_STATUS	BIT(18)
  #define  MT7531_SGMII_AN_ENABLE		BIT(12)
  #define  MT7531_SGMII_AN_RESTART	BIT(9)
diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
index d8386fc3cb..8060ad5afc 100644
--- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2831,128 +2832,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2975,11 +2859,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return -EINVAL;
  	}
-@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -3004,11 +2888,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return NULL;
  	}
-@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3249,86 +3133,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3348,18 +3152,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3367,8 +3210,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3383,6 +3224,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	return ret;
  }
  
-@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t
+@@ -3475,7 +3326,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3555,7 +3406,7 @@ static void
+@@ -3583,7 +3434,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  	if (!priv)
  		return;
-@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3602,6 +3453,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	dev_set_drvdata(&mdiodev->dev, NULL);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -401,47 +401,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -735,13 +696,13 @@ struct mt7530_fdb {
+@@ -741,13 +702,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index 8311aaa0bf..62d9c78cca 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re
+@@ -3184,26 +3184,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3225,15 +3255,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 7271f1023b..e9f69a8777 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont
+@@ -3157,7 +3157,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con
+@@ -3165,23 +3165,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3207,6 +3209,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index 2f761c2fad..a2dcc08b02 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3153,22 +3174,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -3181,7 +3186,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3214,7 +3219,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3380,6 +3385,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3459,6 +3465,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -779,6 +779,7 @@ struct mt753x_info {
+@@ -785,6 +785,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -799,6 +800,7 @@ struct mt7530_priv {
+@@ -805,6 +806,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index 16feba1daf..abbecd5e40 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3265,12 +3265,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3388,6 +3382,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3480,6 +3475,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
index dc4b40b824..ef02d46938 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -646,14 +650,13 @@ static int
+@@ -660,14 +664,13 @@ static int
  mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad,
  			int regnum)
  {
@@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -686,7 +689,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
+@@ -700,7 +703,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -695,14 +698,13 @@ static int
+@@ -709,14 +712,13 @@ static int
  mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad,
  			 int regnum, u32 data)
  {
@@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -734,7 +736,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
+@@ -748,7 +750,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
  	}
  
  out:
@@ -164,7 +164,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -742,14 +744,13 @@ out:
+@@ -756,14 +758,13 @@ out:
  static int
  mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum)
  {
@@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -772,7 +773,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
+@@ -786,7 +787,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -189,7 +189,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -781,14 +782,13 @@ static int
+@@ -795,14 +796,13 @@ static int
  mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum,
  			 u16 data)
  {
@@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, reg,
  				 !(reg & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -810,7 +810,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
+@@ -824,7 +824,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
  	}
  
  out:
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1323,7 +1323,6 @@ static int
+@@ -1344,7 +1344,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1376,7 +1375,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -2172,10 +2171,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2211,7 +2210,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2220,7 +2219,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index 265cf1fdac..2e1ed2e652 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -951,6 +951,24 @@ mt7530_set_ageing_time(struct dsa_switch
+@@ -965,6 +965,24 @@ mt7530_set_ageing_time(struct dsa_switch
  	return 0;
  }
  
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -714,24 +714,6 @@ enum p5_interface_select {
+@@ -720,24 +720,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index 10e2c6a184..c9ff26ff20 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_
+@@ -3394,44 +3394,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3445,23 +3422,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3470,12 +3477,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index 4e754b1002..7c1c80e7bc 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3512,6 +3512,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3530,16 +3541,11 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index e970ec3804..84883147ac 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3191,72 +3142,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3315,7 +3200,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -497,8 +497,8 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
- 	.get_strings		= mt7530_get_strings,
-@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753
+ 	.preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port,
+@@ -3350,8 +3235,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t
+@@ -3384,16 +3270,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3430,88 +3309,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3522,57 +3322,6 @@ mt7530_remove_common(struct mt7530_priv
  	mutex_destroy(&priv->reg_mutex);
  }
  
@@ -679,7 +679,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -845,4 +845,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 3d94295eee..c8417091f9 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753
+@@ -2219,6 +2219,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2252,8 +2293,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2754,6 +2802,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2830,6 +2897,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2899,7 +2977,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2977,7 +3056,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3057,6 +3137,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3202,6 +3297,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3271,6 +3387,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -392,9 +392,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  #define	NUM_TRGMII_CTRL			5
-@@ -54,11 +55,11 @@ enum mt753x_id {
- #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
+@@ -59,11 +60,11 @@ enum mt753x_id {
  #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
+ #define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
  
 -#define MT753X_MIRROR_REG(id)		(((id) == ID_MT7531) ? \
 +#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -332,9 +333,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index 49ac8d9780..2689647319 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3264,6 +3264,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -773,10 +773,10 @@ struct mt753x_info {
+@@ -779,10 +779,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -795,7 +795,6 @@ struct mt7530_priv {
+@@ -801,7 +801,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -803,6 +802,7 @@ struct mt7530_priv {
+@@ -809,6 +808,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index 50973e906d..cba00711ca 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -4328,6 +4328,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_DUP_IPV4 is not set
 # CONFIG_NF_DUP_IPV6 is not set
 # CONFIG_NF_FLOW_TABLE is not set
+# CONFIG_NF_FLOW_TABLE_PROCFS is not set
 # CONFIG_NF_LOG_ARP is not set
 # CONFIG_NF_LOG_BRIDGE is not set
 # CONFIG_NF_LOG_IPV4 is not set
diff --git a/target/linux/generic/hack-5.15/250-netfilter_depends.patch b/target/linux/generic/hack-5.15/250-netfilter_depends.patch
index d9a2b81d74..1f8af6dbe8 100644
--- a/target/linux/generic/hack-5.15/250-netfilter_depends.patch
+++ b/target/linux/generic/hack-5.15/250-netfilter_depends.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	depends on NETFILTER_ADVANCED
  	help
  	  H.323 is a VoIP signalling protocol from ITU-T. As one of the most
-@@ -1105,7 +1104,6 @@ config NETFILTER_XT_TARGET_SECMARK
+@@ -1114,7 +1113,6 @@ config NETFILTER_XT_TARGET_SECMARK
  
  config NETFILTER_XT_TARGET_TCPMSS
  	tristate '"TCPMSS" target support'
diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 49f339bddc..d22b9f909b 100644
--- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	help
  	  This option adds the flow table core infrastructure.
  
-@@ -1010,6 +1009,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -1019,6 +1018,15 @@ config NETFILTER_XT_TARGET_NOTRACK
  	depends on NETFILTER_ADVANCED
  	select NETFILTER_XT_TARGET_CT
  
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -143,6 +143,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
+@@ -144,6 +144,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
  obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
index 75c2e41fb6..b4ed6c9910 100644
--- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
+@@ -1156,6 +1161,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
+@@ -1197,6 +1207,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
index 9968a79699..a64d3021d4 100644
--- a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -204,6 +204,9 @@ static void __br_handle_local_finish(str
+@@ -209,6 +209,9 @@ static void __br_handle_local_finish(str
  /* note: already called with rcu_read_lock */
  static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__br_handle_local_finish(skb);
  
  	/* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -369,6 +372,17 @@ static rx_handler_result_t br_handle_fra
+@@ -376,6 +379,17 @@ static rx_handler_result_t br_handle_fra
  
  forward:
  	switch (p->state) {
diff --git a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
index 8c75554033..ba75e4a0f1 100644
--- a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
+++ b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
@@ -10,9 +10,9 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_flow_table_core.c
 +++ b/net/netfilter/nf_flow_table_core.c
-@@ -606,13 +606,41 @@ void nf_flow_table_free(struct nf_flowta
- }
- EXPORT_SYMBOL_GPL(nf_flow_table_free);
+@@ -651,6 +651,23 @@ static struct pernet_operations nf_flow_
+ 	.exit_batch = nf_flow_table_pernet_exit,
+ };
  
 +static int nf_flow_table_netdev_event(struct notifier_block *this,
 +				      unsigned long event, void *ptr)
@@ -33,26 +33,30 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 +
  static int __init nf_flow_table_module_init(void)
  {
--	return nf_flow_table_offload_init();
-+	int ret;
-+
-+	ret = nf_flow_table_offload_init();
-+	if (ret)
-+		return ret;
-+
+ 	int ret;
+@@ -663,8 +680,14 @@ static int __init nf_flow_table_module_i
+ 	if (ret)
+ 		goto out_offload;
+ 
 +	ret = register_netdevice_notifier(&flow_offload_netdev_notifier);
 +	if (ret)
-+		nf_flow_table_offload_exit();
++		goto out_offload_init;
 +
-+	return ret;
- }
+ 	return 0;
+ 
++out_offload_init:
++	nf_flow_table_offload_exit();
+ out_offload:
+ 	unregister_pernet_subsys(&nf_flow_table_net_ops);
+ 	return ret;
+@@ -672,6 +695,7 @@ out_offload:
  
  static void __exit nf_flow_table_module_exit(void)
  {
 +	unregister_netdevice_notifier(&flow_offload_netdev_notifier);
  	nf_flow_table_offload_exit();
+ 	unregister_pernet_subsys(&nf_flow_table_net_ops);
  }
- 
 --- a/net/netfilter/nft_flow_offload.c
 +++ b/net/netfilter/nft_flow_offload.c
 @@ -455,47 +455,14 @@ static struct nft_expr_type nft_flow_off
diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 2f1b3ed793..3037a724bf 100644
--- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7803,7 +7803,7 @@ static int nft_register_flowtable_net_ho
+@@ -7811,7 +7811,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
index bbbebefdd5..fd1b79cdfe 100644
--- a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
+++ b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -326,6 +326,8 @@ static rx_handler_result_t br_handle_fra
+@@ -331,6 +331,8 @@ static rx_handler_result_t br_handle_fra
  		fwd_mask |= p->group_fwd_mask;
  		switch (dest[5]) {
  		case 0x00:	/* Bridge Group Address */
diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
index 9ae65b8711..792135b0d2 100644
--- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
@@ -15,16 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds)
- 	struct mt7530_priv *priv = ds->priv;
- 	struct mt7530_dummy_poll p;
- 	u32 val, id;
--	int ret;
-+	int ret, i;
- 
- 	/* Reset whole chip through gpio pin or memory-mapped registers for
- 	 * different type of hardware
-@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2680,6 +2680,10 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
index 06546b79e3..609e03d964 100644
--- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2356,10 +2356,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  {
  	struct dsa_switch *ds = priv->ds;
  	struct device *dev = priv->dev;
@@ -30,7 +30,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bus = devm_mdiobus_alloc(dev);
  	if (!bus)
  		return -ENOMEM;
-@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2376,7 +2379,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	if (priv->irq)
  		mt7530_setup_mdio_irq(priv);
  
diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
index a3e3f1185a..1697347b53 100644
--- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3065,8 +3065,7 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
diff --git a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
index a8c084b980..b127d76e00 100644
--- a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa
+@@ -960,6 +983,7 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("%s", linux_banner);
  	early_security_init();
  	setup_arch(&command_line);



From lede-commits at lists.infradead.org  Sat May 11 10:35:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 13:35:37 -0400
Subject: [openwrt/openwrt]  ramips: add support for ELECOM WMC-S1267GS2
In-Reply-To: <171544893601.523548.17702573089192783685@git-01.infra.openwrt.org>
References: <171544893601.523548.17702573089192783685@git-01.infra.openwrt.org>
Message-ID: <mailman.35636.1715448941.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/61e8728d86d7c11e1a5adab4bd37dae6b3b6cf2b

commit 61e8728d86d7c11e1a5adab4bd37dae6b3b6cf2b
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Mon Mar 25 21:39:30 2024 +0900

    ramips: add support for ELECOM WMC-S1267GS2
    
    ELECOM WMC-S1267GS2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) mesh extender,
    based on MT7621A.
    
    This device has almost the same hardware as WMC-M1267GST2.
    
    Specification:
    
    - SoC          : MediaTek MT7621A
    - RAM          : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
    - Flash        : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
    - WLAN         : 2.4/5 GHz 2T2R (MediaTek MT7615D)
    - Ethernet     : 10/100/1000 Mbps x4
      - switch     : MediaTek MT7530 (SoC)
    - LEDs/Keys    : 6x/6x
    - UART         : through-hole on PCB ("J4")
      - arrangement: 3.3V, GND, TX, RX from tri-angle marking
      - settings   : 57600n8
    - Power        : 12 VDC, 1 A
    
    Flash instruction using factory image:
    
    1. Boot WMC-S1267GS2 normally
    2. Set IP address of the computer to 192.168.2.x
    3. Access to "http://192.168.2.1/" and open firmware update page
       ("?????????")
    4. Select the OpenWrt factory image and click apply ("??") button
    5. Wait ~120 seconds to complete flashing
    
    MAC addresses:
    
    LAN    : 04:AB:18:xx:xx:9E (Factory, 0xFFF4 (hex))
    2.4 GHz: 04:AB:18:xx:xx:9F
    5 GHz  : 04:AB:18:xx:xx:A0 (Factory, 0x4 (hex))
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../ramips/dts/mt7621_elecom_wmc-s1267gs2.dts      | 82 ++++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |  8 +++
 .../mt7621/base-files/etc/board.d/02_network       | 11 +--
 3 files changed, 96 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts b/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts
new file mode 100644
index 0000000000..942fa1cb46
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wmc-s1267gs2.dts
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-1pci.dtsi"
+
+/ {
+	compatible = "elecom,wmc-s1267gs2", "mediatek,mt7621-soc";
+	model = "ELECOM WMC-S1267GS2";
+
+	aliases {
+		/*
+		 * A MAC address printed to the label is an address of
+		 * 5 GHz band on stock firmware, but there is no
+		 * per-band MAC address support on Linux Kernel and that
+		 * address is not assigned to any wlan devices now.
+		 */
+		/delete-property/ label-mac-device;
+	};
+};
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_fff4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	status = "disabled";
+};
+
+&partitions {
+	partition at 50000 {
+		compatible = "denx,uimage";
+		label = "firmware";
+		reg = <0x50000 0x1800000>;
+	};
+
+	partition at 1850000 {
+		label = "tm_pattern";
+		reg = <0x1850000 0x400000>;
+		read-only;
+	};
+
+	partition at 1c50000 {
+		label = "tm_key";
+		reg = <0x1c50000 0x100000>;
+		read-only;
+	};
+
+	partition at 1d50000 {
+		label = "nvram";
+		reg = <0x1d50000 0xb0000>;
+		read-only;
+	};
+
+	partition at 1e00000 {
+		label = "user_data";
+		reg = <0x1e00000 0x200000>;
+		read-only;
+	};
+};
+
+&wifi {
+	nvmem-cells = <&macaddr_factory_4 (-1)>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	nvmem-layout {
+		compatible = "fixed-layout";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		macaddr_factory_4: macaddr at 4 {
+			compatible = "mac-base";
+			reg = <0x4 0x6>;
+			#nvmem-cell-cells = <1>;
+		};
+
+		macaddr_factory_fff4: macaddr at fff4 {
+			reg = <0xfff4 0x6>;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index a0b6fe9e5f..33fcc805d9 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -998,6 +998,14 @@ define Device/elecom_wmc-m1267gst2
 endef
 TARGET_DEVICES += elecom_wmc-m1267gst2
 
+define Device/elecom_wmc-s1267gs2
+  $(Device/elecom_wrc-gs)
+  IMAGE_SIZE := 24576k
+  DEVICE_MODEL := WMC-S1267GS2
+  ELECOM_HWNAME := WMC-DLGST2
+endef
+TARGET_DEVICES += elecom_wmc-s1267gs2
+
 define Device/elecom_wrc-1167ghbk2-s
   $(Device/dsa-migration)
   IMAGE_SIZE := 15488k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index d932313cf1..2ed8c38732 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -102,17 +102,18 @@ ramips_setup_interfaces()
 	dlink,covr-x1860-a1)
 		ucidef_set_interfaces_lan_wan "ethernet" "internet"
 		;;
+	elecom,wmc-s1267gs2|\
+	linksys,re6500|\
+	netgear,wac104|\
+	zyxel,lte3301-plus)
+		ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
+		;;
 	gnubee,gb-pc1)
 		ucidef_set_interface_lan "ethblack ethblue"
 		;;
 	gnubee,gb-pc2)
 		ucidef_set_interface_lan "ethblack ethblue ethyellow"
 		;;
-	linksys,re6500|\
-	netgear,wac104|\
-	zyxel,lte3301-plus)
-		ucidef_set_interface_lan "lan1 lan2 lan3 lan4"
-		;;
 	mikrotik,routerboard-750gr3)
 		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
 		;;



From lede-commits at lists.infradead.org  Sat May 11 10:35:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 11 May 2024 13:35:36 -0400
Subject: [openwrt/openwrt]  ramips: add support for ELECOM WMC-M1267GST2
In-Reply-To: <171544893601.523548.17702573089192783685@git-01.infra.openwrt.org>
References: <171544893601.523548.17702573089192783685@git-01.infra.openwrt.org>
Message-ID: <mailman.35637.1715448941.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/927a77ecffd791aa096faff609d6897f99673603

commit 927a77ecffd791aa096faff609d6897f99673603
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Mon Mar 25 21:39:30 2024 +0900

    ramips: add support for ELECOM WMC-M1267GST2
    
    ELECOM WMC-M1267GST2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) mesh router,
    based on MT7621A.
    
    Specification:
    
    - SoC          : MediaTek MT7621A
    - RAM          : DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
    - Flash        : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
    - WLAN         : 2.4/5 GHz 2T2R (MediaTek MT7615D)
    - Ethernet     : 10/100/1000 Mbps x5
      - switch     : MediaTek MT7530 (SoC)
    - LEDs/Keys    : 6x/6x
    - UART         : through-hole on PCB ("J4")
      - arrangement: 3.3V, GND, TX, RX from tri-angle marking
      - settings   : 57600n8
    - Power        : 12 VDC, 1 A
    
    Flash instruction using factory image:
    
    1. Boot WMC-M1267GST2 normally with "Router" mode
    2. Access to "http://192.168.2.1/" and open firmware update page
       ("?????????")
    3. Select the OpenWrt factory image and click apply ("??") button
    4. Wait ~120 seconds to complete flashing
    
    MAC addresses:
    
    LAN    : 04:AB:18:xx:xx:61 (Factory, 0xFFF4 (hex))
    WAN    : 04:AB:18:xx:xx:62 (Factory, 0xFFFA (hex))
    2.4 GHz: 04:AB:18:xx:xx:63
    5 GHz  : 04:AB:18:xx:xx:64 (Factory, 0x4 (hex))
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../ramips/dts/mt7621_elecom_wmc-m1267gst2.dts     | 77 ++++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                | 26 +++++---
 2 files changed, 94 insertions(+), 9 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts
new file mode 100644
index 0000000000..42517529af
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wmc-m1267gst2.dts
@@ -0,0 +1,77 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_elecom_wrc-gs-1pci.dtsi"
+
+/ {
+	compatible = "elecom,wmc-m1267gst2", "mediatek,mt7621-soc";
+	model = "ELECOM WMC-M1267GST2";
+};
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_fff4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	nvmem-cells = <&macaddr_factory_fffa>;
+	nvmem-cell-names = "mac-address";
+};
+
+&partitions {
+	partition at 50000 {
+		compatible = "denx,uimage";
+		label = "firmware";
+		reg = <0x50000 0x1800000>;
+	};
+
+	partition at 1850000 {
+		label = "tm_pattern";
+		reg = <0x1850000 0x400000>;
+		read-only;
+	};
+
+	partition at 1c50000 {
+		label = "tm_key";
+		reg = <0x1c50000 0x100000>;
+		read-only;
+	};
+
+	partition at 1d50000 {
+		label = "nvram";
+		reg = <0x1d50000 0xb0000>;
+		read-only;
+	};
+
+	partition at 1e00000 {
+		label = "user_data";
+		reg = <0x1e00000 0x200000>;
+		read-only;
+	};
+};
+
+&wifi {
+	nvmem-cells = <&macaddr_factory_4 (-1)>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	nvmem-layout {
+		compatible = "fixed-layout";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		macaddr_factory_4: macaddr at 4 {
+			compatible = "mac-base";
+			reg = <0x4 0x6>;
+			#nvmem-cell-cells = <1>;
+		};
+
+		macaddr_factory_fff4: macaddr at fff4 {
+			reg = <0xfff4 0x6>;
+		};
+
+		macaddr_factory_fffa: macaddr at fffa {
+			reg = <0xfffa 0x6>;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index cbaf6a9c59..a0b6fe9e5f 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -979,28 +979,36 @@ define Device/edimax_rg21s
 endef
 TARGET_DEVICES += edimax_rg21s
 
-define Device/elecom_wrc-1167ghbk2-s
+define Device/elecom_wrc-gs
   $(Device/dsa-migration)
-  IMAGE_SIZE := 15488k
+  $(Device/uimage-lzma-loader)
   DEVICE_VENDOR := ELECOM
-  DEVICE_MODEL := WRC-1167GHBK2-S
   IMAGES += factory.bin
   IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
-	elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00
+	elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \
+	append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME)
   DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools
 endef
-TARGET_DEVICES += elecom_wrc-1167ghbk2-s
 
-define Device/elecom_wrc-gs
+define Device/elecom_wmc-m1267gst2
+  $(Device/elecom_wrc-gs)
+  IMAGE_SIZE := 24576k
+  DEVICE_MODEL := WMC-M1267GST2
+  ELECOM_HWNAME := WMC-DLGST2
+endef
+TARGET_DEVICES += elecom_wmc-m1267gst2
+
+define Device/elecom_wrc-1167ghbk2-s
   $(Device/dsa-migration)
-  $(Device/uimage-lzma-loader)
+  IMAGE_SIZE := 15488k
   DEVICE_VENDOR := ELECOM
+  DEVICE_MODEL := WRC-1167GHBK2-S
   IMAGES += factory.bin
   IMAGE/factory.bin := $$(sysupgrade_bin) | check-size | \
-	elecom-wrc-gs-factory $$$$(ELECOM_HWNAME) 0.00 -N | \
-	append-string MT7621_ELECOM_$$$$(ELECOM_HWNAME)
+	elecom-wrc-gs-factory WRC-1167GHBK2-S 0.00
   DEVICE_PACKAGES := kmod-mt7615-firmware -uboot-envtools
 endef
+TARGET_DEVICES += elecom_wrc-1167ghbk2-s
 
 define Device/elecom_wrc-1167gs2-b
   $(Device/elecom_wrc-gs)



From lede-commits at lists.infradead.org  Sun May 12 01:56:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 04:56:20 -0400
Subject: [openwrt/openwrt]  ipq40xx: fixup remaining devices that dont use
 QCA807x PHY
In-Reply-To: <171550418005.2874943.12007995570061247710@git-01.infra.openwrt.org>
References: <171550418005.2874943.12007995570061247710@git-01.infra.openwrt.org>
Message-ID: <mailman.35651.1715504185.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dc9220f748d7ed62af5b849bb66e42130e4f14b0

commit dc9220f748d7ed62af5b849bb66e42130e4f14b0
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri May 10 15:25:18 2024 +0200

    ipq40xx: fixup remaining devices that dont use QCA807x PHY
    
    Like AVM 1200 these devices also do not use QCA807x PHY at all and thus
    they disables all of the individual PHY nodes, however this is not enough
    anymore since the conversion to PHY package.
    
    Now its now enough to disable the PHY-s in the package alone, but the PHY
    package node itself must also be disabled.
    
    Fixes: 1b931c33a28e ("ipq40xx: adapt to new Upstream QCA807x PHY driver")
    Link: https://github.com/openwrt/openwrt/pull/15444
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts      | 14 +++++++++++++-
 .../arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi |  4 ++++
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi | 14 +++++++++++++-
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
index b3eb610b32..a5b55ff421 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
@@ -243,6 +243,18 @@
 
 &mdio {
 	status = "okay";
+
+	ar8035: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
+&qca807x {
+	status = "disabled";
+};
+
+&ethphy0 {
+	status = "disabled";
 };
 
 &ethphy1 {
@@ -279,6 +291,6 @@
 	status = "okay";
 
 	label = "lan";
-	phy-handle = <&ethphy0>;
+	phy-handle = <&ar8035>;
 	phy-mode = "rgmii-id";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
index 8c56c7d2f1..7f8f9be795 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
@@ -232,6 +232,10 @@
 	phy-mode = "rgmii-id";
 };
 
+&qca807x {
+	status = "disabled";
+};
+
 &ethphy0 {
 	status = "disabled";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
index da22d4a671..3637b96d24 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
@@ -401,6 +401,10 @@
 	status = "okay";
 	pinctrl-0 = <&mdio_pins>;
 	pinctrl-names = "default";
+
+	ar8035: ethernet-phy at 1 {
+		reg = <1>;
+	};
 };
 
 &gmac {
@@ -419,14 +423,22 @@
 	status = "okay";
 
 	label = "lan";
-	phy-handle = <&ethphy1>;
+	phy-handle = <&ar8035>;
 	phy-mode = "rgmii-rxid";
 };
 
+&qca807x {
+	status = "disabled";
+};
+
 &ethphy0 {
 	status = "disabled";
 };
 
+&ethphy1 {
+	status = "disabled";
+};
+
 &ethphy2 {
 	status = "disabled";
 };



From lede-commits at lists.infradead.org  Sun May 12 02:38:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 05:38:54 -0400
Subject: [openwrt/openwrt]  kernel: qca-ssdk: use bash as shell
In-Reply-To: <171550673488.2922188.5549107803320173806@git-01.infra.openwrt.org>
References: <171550673488.2922188.5549107803320173806@git-01.infra.openwrt.org>
Message-ID: <mailman.35657.1715506739.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/856840d953d78aecc0fd13998f63e7820361a79e

commit 856840d953d78aecc0fd13998f63e7820361a79e
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat May 11 17:01:42 2024 +0200

    kernel: qca-ssdk: use bash as shell
    
    Currently, trying to compile qca-ssdk on macOS will fail in a weird way:
    make[6]: *** No rule to make target 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/-n',
    needed by 'openwrt/build_dir/target-aarch64_cortex-a53_musl/linux-qualcommax_ipq807x/qca-ssdk-2024.04.17~3d060f7a/qca-ssdk.o'. Stop.
    
    After looking looking at src_list.dep from which KBuild cmd_mod will
    generate the list of objects to compile it looked like:
    -n /src/adpt/adpt.c
    -n
    -n
    
    Which was rather suspicous so after comparing to the same file but with
    Fedora as host:
    /src/adpt/adpt.c src/adpt/hppe/adpt_hppe_fdb.c src/adpt/hppe/adpt_hppe_mib.c
    
    It was clear that echo -n which was used in SSDK-s target.mk was not
    working as intented, and it looked like the POSIX only version of echo
    was being used which does not honor -n.
    
    So, after failling to reproduce it externally, replacing the call to echo
    with a full path to coreutils echo fixed the compilation.
    
    After further debugging, it was determined that SSDK does not honor
    CONFIG_SHELL like other kernel modules so it was defaulting to /bin/sh as
    the shell make was calling thus calling the /bin/sh built-in echo which on
    macOS is the old Bash 3.2 one and it does not respect -n.
    
    So, we have to explicitly pass SHELL=$(BASH) to SSDK to make it use bash
    like kernel build or other kernel modules.
    
    This is not an issue since on macOS we always build bash anyway.
    
    Link: https://github.com/openwrt/openwrt/pull/15459
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/qca-ssdk/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile
index ed18f17504..de262e6578 100644
--- a/package/kernel/qca-ssdk/Makefile
+++ b/package/kernel/qca-ssdk/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qca-ssdk
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
 PKG_SOURCE_PROTO:=git
@@ -45,6 +45,7 @@ MAKE_FLAGS+= \
 	GCC_VERSION=$(GCC_VERSION) \
 	EXTRA_CFLAGS="-fno-stack-protector -I$(STAGING_DIR)/usr/include" \
 	SoC=$(CONFIG_TARGET_SUBTARGET) \
+	SHELL="$(BASH)" \
 	PTP_FEATURE=disable SWCONFIG_FEATURE=disable \
 	ISISC_ENABLE=disable IN_QCA803X_PHY=FALSE \
 	IN_QCA808X_PHY=FALSE IN_MALIBU_PHY=FALSE \



From lede-commits at lists.infradead.org  Sun May 12 03:17:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:17:42 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.158
In-Reply-To: <171550906247.2969653.9701754750302743048@git-01.infra.openwrt.org>
References: <171550906247.2969653.9701754750302743048@git-01.infra.openwrt.org>
Message-ID: <mailman.35658.1715509067.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1fae75ebd968f9cc1f254dbcdf6a16b27c2b3145

commit 1fae75ebd968f9cc1f254dbcdf6a16b27c2b3145
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat May 11 19:52:13 2024 +0200

    kernel: bump 5.15 to 5.15.158
    
    Removed because they are upstream:
       generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=506ac5538498717fce699feaddb2ed97ae1c3ca7
    
       generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2f83d3d2cc3c0df89f833cd8c09989187f0c3ce1
    
    Manually adapted:
       generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.15                                |  4 +-
 .../patches-5.15/209-b44-register-adm-switch.patch |  6 +--
 .../bcm47xx/patches-5.15/210-b44_phy_fix.patch     |  2 +-
 ...x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch |  4 +-
 .../020-v6.1-05-mm-multi-gen-LRU-groundwork.patch  |  2 +-
 ...ediatek-mt7622-add-support-for-coherent-D.patch | 30 -----------
 ...ediatek-mt7622-introduce-nodes-for-Wirele.patch | 62 ----------------------
 ...t-mtk_eth_soc-use-standard-property-for-c.patch |  2 +-
 ...5.17-net-usb-ax88179_178a-add-TSO-feature.patch |  4 +-
 ...tusb-Support-public-address-configuration.patch |  4 +-
 ...tusb-Fix-application-of-sizeof-to-pointer.patch |  2 +-
 ...tusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch |  2 +-
 ...tusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch |  2 +-
 ...tusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch |  2 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 18 +++----
 15 files changed, 27 insertions(+), 119 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 3289f828be..71d13ebc5f 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .157
-LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414
+LINUX_VERSION-5.15 = .158
+LINUX_KERNEL_HASH-5.15.158 = f9071c83a4fd8b80af026b48cfc1869bfa25883f9148b92b5dc1e1e1e26dd5c6
diff --git a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
index 772e905ecb..ddf9d0dfb9 100644
--- a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
+++ b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
@@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  
  #include <linux/uaccess.h>
  #include <asm/io.h>
-@@ -2245,6 +2247,69 @@ static void b44_adjust_link(struct net_d
+@@ -2247,6 +2249,69 @@ static void b44_adjust_link(struct net_d
  	}
  }
  
@@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  static int b44_register_phy_one(struct b44 *bp)
  {
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
-@@ -2281,6 +2346,9 @@ static int b44_register_phy_one(struct b
+@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b
  	if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
  	    (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
  
@@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  		dev_info(sdev->dev,
  			 "could not find PHY at %i, use fixed one\n",
  			 bp->phy_addr);
-@@ -2475,6 +2543,7 @@ static void b44_remove_one(struct ssb_de
+@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de
  	unregister_netdev(dev);
  	if (bp->flags & B44_FLAG_EXTERNAL_PHY)
  		b44_unregister_phy_one(bp);
diff --git a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
index ca7123f2a3..9c16da4f57 100644
--- a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
+++ b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
@@ -43,7 +43,7 @@
  
  	if (bp->flags & B44_FLAG_EXTERNAL_PHY)
  		return 0;
-@@ -2175,6 +2200,8 @@ static int b44_get_invariants(struct b44
+@@ -2177,6 +2202,8 @@ static int b44_get_invariants(struct b44
  	 * valid PHY address. */
  	bp->phy_addr &= 0x1F;
  
diff --git a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
index 2ea2e2497a..8e4de36db0 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
@@ -73,7 +73,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/arch/Kconfig
 +++ b/arch/Kconfig
-@@ -1299,6 +1299,14 @@ config ARCH_HAS_ELFCORE_COMPAT
+@@ -1307,6 +1307,14 @@ config ARCH_HAS_ELFCORE_COMPAT
  config ARCH_HAS_PARANOID_L1D_FLUSH
  	bool
  
@@ -90,7 +90,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  source "scripts/gcc-plugins/Kconfig"
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
-@@ -85,6 +85,7 @@ config X86
+@@ -86,6 +86,7 @@ config X86
  	select ARCH_HAS_PMEM_API		if X86_64
  	select ARCH_HAS_PTE_DEVMAP		if X86_64
  	select ARCH_HAS_PTE_SPECIAL
diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
index 85710eb79b..ff4bb4df3e 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
@@ -552,7 +552,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 --- a/kernel/bounds.c
 +++ b/kernel/bounds.c
 @@ -22,6 +22,11 @@ int main(void)
- 	DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS));
+ 	DEFINE(NR_CPUS_BITS, order_base_2(CONFIG_NR_CPUS));
  #endif
  	DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
 +#ifdef CONFIG_LRU_GEN
diff --git a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch b/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
deleted file mode 100644
index 9f2512a1d0..0000000000
--- a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Mon, 7 Feb 2022 10:27:22 +0100
-Subject: [PATCH] arm64: dts: mediatek: mt7622: add support for coherent
- DMA
-
-It improves performance by eliminating the need for a cache flush on rx and tx
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -357,7 +357,7 @@
- 		};
- 
- 		cci_control2: slave-if at 5000 {
--			compatible = "arm,cci-400-ctrl-if";
-+			compatible = "arm,cci-400-ctrl-if", "syscon";
- 			interface-type = "ace";
- 			reg = <0x5000 0x1000>;
- 		};
-@@ -938,6 +938,8 @@
- 		power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
- 		mediatek,ethsys = <&ethsys>;
- 		mediatek,sgmiisys = <&sgmiisys>;
-+		mediatek,cci-control = <&cci_control2>;
-+		dma-coherent;
- 		#address-cells = <1>;
- 		#size-cells = <0>;
- 		status = "disabled";
diff --git a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch b/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
deleted file mode 100644
index 2c6e3fd3cd..0000000000
--- a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sat, 5 Feb 2022 18:36:36 +0100
-Subject: [PATCH] arm64: dts: mediatek: mt7622: introduce nodes for
- Wireless Ethernet Dispatch
-
-Introduce wed0 and wed1 nodes in order to enable offloading forwarding
-between ethernet and wireless devices on the mt7622 chipset.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -894,6 +894,11 @@
- 		};
- 	};
- 
-+	hifsys: syscon at 1af00000 {
-+		compatible = "mediatek,mt7622-hifsys", "syscon";
-+		reg = <0 0x1af00000 0 0x70>;
-+	};
-+
- 	ethsys: syscon at 1b000000 {
- 		compatible = "mediatek,mt7622-ethsys",
- 			     "syscon";
-@@ -912,6 +917,26 @@
- 		#dma-cells = <1>;
- 	};
- 
-+	pcie_mirror: pcie-mirror at 10000400 {
-+		compatible = "mediatek,mt7622-pcie-mirror",
-+			     "syscon";
-+		reg = <0 0x10000400 0 0x10>;
-+	};
-+
-+	wed0: wed at 1020a000 {
-+		compatible = "mediatek,mt7622-wed",
-+			     "syscon";
-+		reg = <0 0x1020a000 0 0x1000>;
-+		interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+
-+	wed1: wed at 1020b000 {
-+		compatible = "mediatek,mt7622-wed",
-+			     "syscon";
-+		reg = <0 0x1020b000 0 0x1000>;
-+		interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+
- 	eth: ethernet at 1b100000 {
- 		compatible = "mediatek,mt7622-eth",
- 			     "mediatek,mt2701-eth",
-@@ -939,6 +964,9 @@
- 		mediatek,ethsys = <&ethsys>;
- 		mediatek,sgmiisys = <&sgmiisys>;
- 		mediatek,cci-control = <&cci_control2>;
-+		mediatek,wed = <&wed0>, <&wed1>;
-+		mediatek,pcie-mirror = <&pcie_mirror>;
-+		mediatek,hifsys = <&hifsys>;
- 		dma-coherent;
- 		#address-cells = <1>;
- 		#size-cells = <0>;
diff --git a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
index 70d46c16cd..22125a4546 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
@@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -963,7 +963,7 @@
+@@ -957,7 +957,7 @@
  		power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
  		mediatek,ethsys = <&ethsys>;
  		mediatek,sgmiisys = <&sgmiisys>;
diff --git a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
index 698e524c35..b2af169b92 100644
--- a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
+++ b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ax88179_reset(dev);
  
-@@ -1507,17 +1508,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
+@@ -1502,17 +1503,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
  {
  	u32 tx_hdr1, tx_hdr2;
  	int frame_size = dev->maxpacket;
@@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if ((skb_header_cloned(skb) || headroom < 0) &&
  	    pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
  		dev_kfree_skb_any(skb);
-@@ -1528,6 +1531,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
+@@ -1523,6 +1526,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
  	put_unaligned_le32(tx_hdr1, ptr);
  	put_unaligned_le32(tx_hdr2, ptr + 4);
  
diff --git a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
index 725af4b52c..4a63b89f57 100644
--- a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
+++ b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
@@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -2287,6 +2287,23 @@ struct btmtk_section_map {
+@@ -2289,6 +2289,23 @@ struct btmtk_section_map {
  	};
  } __packed;
  
@@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
  static void btusb_mtk_wmt_recv(struct urb *urb)
  {
  	struct hci_dev *hdev = urb->context;
-@@ -3941,6 +3958,7 @@ static int btusb_probe(struct usb_interf
+@@ -3943,6 +3960,7 @@ static int btusb_probe(struct usb_interf
  		hdev->shutdown = btusb_mtk_shutdown;
  		hdev->manufacturer = 70;
  		hdev->cmd_timeout = btusb_mtk_cmd_timeout;
diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
index d72866eabf..d21adada97 100644
--- a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
+++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
@@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -2292,7 +2292,7 @@ static int btusb_set_bdaddr_mtk(struct h
+@@ -2294,7 +2294,7 @@ static int btusb_set_bdaddr_mtk(struct h
  	struct sk_buff *skb;
  	long ret;
  
diff --git a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
index ebb6cc4717..30492ac48d 100644
--- a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
@@ -58,7 +58,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -476,6 +476,9 @@ static const struct usb_device_id blackl
+@@ -478,6 +478,9 @@ static const struct usb_device_id blackl
  	{ USB_DEVICE(0x13d3, 0x3564), .driver_info = BTUSB_MEDIATEK |
  						     BTUSB_WIDEBAND_SPEECH |
  						     BTUSB_VALID_LE_STATES },
diff --git a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
index a8c7ca003a..6bcd81c3b8 100644
--- a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
@@ -56,7 +56,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -467,6 +467,9 @@ static const struct usb_device_id blackl
+@@ -469,6 +469,9 @@ static const struct usb_device_id blackl
  						     BTUSB_VALID_LE_STATES },
  
  	/* Additional MediaTek MT7921 Bluetooth devices */
diff --git a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
index b46e6926d1..b6b76f64fc 100644
--- a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
@@ -54,7 +54,7 @@ Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -485,6 +485,9 @@ static const struct usb_device_id blackl
+@@ -487,6 +487,9 @@ static const struct usb_device_id blackl
  	{ USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK |
  						     BTUSB_WIDEBAND_SPEECH |
  						     BTUSB_VALID_LE_STATES },
diff --git a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 66fd6efed5..6eb72abaa7 100644
--- a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -136,14 +136,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   * eth_type_trans - determine the packet's protocol ID.
   * @skb: received socket data
-@@ -173,6 +185,10 @@ __be16 eth_type_trans(struct sk_buff *sk
- 		} else {
- 			skb->pkt_type = PACKET_OTHERHOST;
- 		}
-+
-+		if (eth_check_local_mask(eth->h_dest, dev->dev_addr,
-+					 dev->local_addr_mask))
-+			skb->gro_skip = 1;
- 	}
+@@ -165,6 +177,10 @@ __be16 eth_type_trans(struct sk_buff *sk
+ 
+ 	eth_skb_pkt_type(skb, dev);
  
++	if (unlikely(!ether_addr_equal_64bits(eth->h_dest, dev->dev_addr)) &&
++	    eth_check_local_mask(eth->h_dest, dev->dev_addr, dev->local_addr_mask))
++		skb->gro_skip = 1;
++
  	/*
+ 	 * Some variants of DSA tagging don't have an ethertype field
+ 	 * at all, so we check here whether one of those tagging



From lede-commits at lists.infradead.org  Sun May 12 03:52:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:52:20 -0400
Subject: [openwrt/openwrt]  kernel/airoha: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
References: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
Message-ID: <mailman.35661.1715511147.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8ca67645cea3c2cf06560c3b7b6e827b46e42d01

commit 8ca67645cea3c2cf06560c3b7b6e827b46e42d01
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 14:01:34 2024 +0100

    kernel/airoha: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Link: https://github.com/openwrt/openwrt/pull/15416
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/airoha/{config-6.1 => config-6.6}                            | 0
 .../0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch       | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/airoha/config-6.1 b/target/linux/airoha/config-6.6
similarity index 100%
rename from target/linux/airoha/config-6.1
rename to target/linux/airoha/config-6.6
diff --git a/target/linux/airoha/patches-6.1/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch b/target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
similarity index 100%
rename from target/linux/airoha/patches-6.1/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
rename to target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch



From lede-commits at lists.infradead.org  Sun May 12 03:52:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:52:22 -0400
Subject: [openwrt/openwrt]  kernel/airoha: refresh patch on top of Linux 6.6
In-Reply-To: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
References: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
Message-ID: <mailman.35664.1715511147.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/22efab92f5d0f93bdbf03839d30defb6c16ea532

commit 22efab92f5d0f93bdbf03839d30defb6c16ea532
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 14:09:34 2024 +0100

    kernel/airoha: refresh patch on top of Linux 6.6
    
    Refresh the only remaining downstream patch.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Link: https://github.com/openwrt/openwrt/pull/15416
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch b/target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
index dc28bd1df9..30ba1ab412 100644
--- a/target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
+++ b/target/linux/airoha/patches-6.6/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
@@ -1,6 +1,6 @@
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -330,6 +330,12 @@ config SPI_DLN2
+@@ -353,6 +353,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
-@@ -47,6 +47,7 @@ obj-$(CONFIG_SPI_DW_BT1)		+= spi-dw-bt1.
+@@ -50,6 +50,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



From lede-commits at lists.infradead.org  Sun May 12 03:52:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:52:24 -0400
Subject: [openwrt/openwrt]  airoha: set KERNEL_TESTING_PATCHVER:=6.6
In-Reply-To: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
References: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
Message-ID: <mailman.35665.1715511150.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fbf6f9da0206c2a54314989db0ae595742a167df

commit fbf6f9da0206c2a54314989db0ae595742a167df
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 14:10:27 2024 +0100

    airoha: set KERNEL_TESTING_PATCHVER:=6.6
    
    Lets give Linux 6.6 a try.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Link: https://github.com/openwrt/openwrt/pull/15416
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/airoha/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/airoha/Makefile b/target/linux/airoha/Makefile
index 0a66ef839c..50c871edaa 100644
--- a/target/linux/airoha/Makefile
+++ b/target/linux/airoha/Makefile
@@ -7,6 +7,7 @@ CPU_TYPE:=cortex-a7
 FEATURES:=dt squashfs nand ramdisk gpio source-only
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Sun May 12 03:52:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:52:23 -0400
Subject: [openwrt/openwrt]  kernel/airoha: refresh config-6.6
In-Reply-To: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
References: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
Message-ID: <mailman.35666.1715511150.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6961d5e9c1b561f1d863d077a13c3ebb357d6af4

commit 6961d5e9c1b561f1d863d077a13c3ebb357d6af4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 14:38:14 2024 +0100

    kernel/airoha: refresh config-6.6
    
    Refresh kernel config for Linux 6.6.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Link: https://github.com/openwrt/openwrt/pull/15416
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/airoha/config-6.6 | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/target/linux/airoha/config-6.6 b/target/linux/airoha/config-6.6
index e609c29db2..ce93f7d9ff 100644
--- a/target/linux/airoha/config-6.6
+++ b/target/linux/airoha/config-6.6
@@ -7,11 +7,11 @@ CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MULTIPLATFORM=y
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
@@ -68,6 +68,7 @@ CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
@@ -79,10 +80,10 @@ CONFIG_CRC16=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
@@ -96,10 +97,13 @@ CONFIG_EDAC_SUPPORT=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -117,7 +121,6 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_PINCONF=y
@@ -138,12 +141,16 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HAVE_SMP=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HW_RANDOM=y
 CONFIG_HZ_FIXED=0
 CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_IOMMUFD is not set
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
@@ -164,10 +171,10 @@ CONFIG_LZO_DECOMPRESS=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGRATION=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_NAND_CORE=y
 CONFIG_MTD_NAND_ECC=y
@@ -182,8 +189,12 @@ CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_SELFTESTS=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
@@ -208,7 +219,6 @@ CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PARTITION_PERCPU=y
 CONFIG_PCI=y
 CONFIG_PCIEAER=y
@@ -218,7 +228,6 @@ CONFIG_PCIE_PME=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
@@ -257,7 +266,7 @@ CONFIG_SPI=y
 CONFIG_SPI_AIROHA_EN7523=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
-CONFIG_SRCU=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_STACKTRACE=y
 # CONFIG_SWAP is not set
 CONFIG_SWPHY=y



From lede-commits at lists.infradead.org  Sun May 12 03:52:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 06:52:21 -0400
Subject: [openwrt/openwrt]  kernel/airoha: Restore kernel files for v6.1
In-Reply-To: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
References: <171551114027.3015376.3968906795535525819@git-01.infra.openwrt.org>
Message-ID: <mailman.35667.1715511150.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/577eaa58daa4b0c31cf314ca9b7cdd9ef9aacbc1

commit 577eaa58daa4b0c31cf314ca9b7cdd9ef9aacbc1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 7 14:01:34 2024 +0100

    kernel/airoha: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch
    history, as git will see the move and copy as a rename thus defeating the
    purpose.
    
    For the original discussion see:
    https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Link: https://github.com/openwrt/openwrt/pull/15416
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/airoha/config-6.1                     | 294 ++++++++++++++++++
 ...port-for-the-Airoha-EN7523-SoC-SPI-contro.patch | 341 +++++++++++++++++++++
 2 files changed, 635 insertions(+)

diff --git a/target/linux/airoha/config-6.1 b/target/linux/airoha/config-6.1
new file mode 100644
index 0000000000..e609c29db2
--- /dev/null
+++ b/target/linux/airoha/config-6.1
@@ -0,0 +1,294 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_AIROHA=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GIC_V3=y
+CONFIG_ARM_GIC_V3_ITS=y
+CONFIG_ARM_GIC_V3_ITS_PCI=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+CONFIG_ARM_HEAVY_MB=y
+# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_PSCI=y
+CONFIG_ARM_PSCI_FW=y
+# CONFIG_ARM_SMMU is not set
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BSD_PROCESS_ACCT_V3=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_EN7523=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_MISC=y
+CONFIG_DMA_OPS=y
+CONFIG_DTC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_EN7523=y
+CONFIG_GPIO_GENERIC=y
+# CONFIG_HARDEN_BRANCH_HISTORY is not set
+# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ_FIXED=0
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_TIME_ACCOUNTING=y
+CONFIG_IRQ_WORK=y
+# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NLS=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=2
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PARTITION_PERCPU=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PCIE_PME=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+CONFIG_PINCTRL=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_FSL=y
+# CONFIG_SERIAL_8250_SHARE_IRQ is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_AIROHA_EN7523=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SRCU=y
+CONFIG_STACKTRACE=y
+# CONFIG_SWAP is not set
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_XHCI_HCD=y
+# CONFIG_USB_XHCI_PLATFORM is not set
+CONFIG_USE_OF=y
+# CONFIG_VFP is not set
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/airoha/patches-6.1/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch b/target/linux/airoha/patches-6.1/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
new file mode 100644
index 0000000000..dc28bd1df9
--- /dev/null
+++ b/target/linux/airoha/patches-6.1/0005-spi-Add-support-for-the-Airoha-EN7523-SoC-SPI-contro.patch
@@ -0,0 +1,341 @@
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -330,6 +330,12 @@ config SPI_DLN2
+ 	 This driver can also be built as a module.  If so, the module
+ 	 will be called spi-dln2.
+ 
++config SPI_AIROHA_EN7523
++	bool "Airoha EN7523 SPI controller support"
++	depends on ARCH_AIROHA
++	help
++	  This enables SPI controller support for the Airoha EN7523 SoC.
++
+ config SPI_EP93XX
+ 	tristate "Cirrus Logic EP93xx SPI controller"
+ 	depends on ARCH_EP93XX || COMPILE_TEST
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -47,6 +47,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
++obj-$(CONFIG_SPI_AIROHA_EN7523)		+= spi-en7523.o
+ obj-$(CONFIG_SPI_FALCON)		+= spi-falcon.o
+ obj-$(CONFIG_SPI_FSI)			+= spi-fsi.o
+ obj-$(CONFIG_SPI_FSL_CPM)		+= spi-fsl-cpm.o
+--- /dev/null
++++ b/drivers/spi/spi-en7523.c
+@@ -0,0 +1,313 @@
++// SPDX-License-Identifier: GPL-2.0
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/mod_devicetable.h>
++#include <linux/spi/spi.h>
++
++
++#define ENSPI_READ_IDLE_EN			0x0004
++#define ENSPI_MTX_MODE_TOG			0x0014
++#define ENSPI_RDCTL_FSM				0x0018
++#define ENSPI_MANUAL_EN				0x0020
++#define ENSPI_MANUAL_OPFIFO_EMPTY		0x0024
++#define ENSPI_MANUAL_OPFIFO_WDATA		0x0028
++#define ENSPI_MANUAL_OPFIFO_FULL		0x002C
++#define ENSPI_MANUAL_OPFIFO_WR			0x0030
++#define ENSPI_MANUAL_DFIFO_FULL			0x0034
++#define ENSPI_MANUAL_DFIFO_WDATA		0x0038
++#define ENSPI_MANUAL_DFIFO_EMPTY		0x003C
++#define ENSPI_MANUAL_DFIFO_RD			0x0040
++#define ENSPI_MANUAL_DFIFO_RDATA		0x0044
++#define ENSPI_IER				0x0090
++#define ENSPI_NFI2SPI_EN			0x0130
++
++// TODO not in spi block
++#define ENSPI_CLOCK_DIVIDER			((void __iomem *)0x1fa201c4)
++
++#define	OP_CSH					0x00
++#define	OP_CSL					0x01
++#define	OP_CK					0x02
++#define	OP_OUTS					0x08
++#define	OP_OUTD					0x09
++#define	OP_OUTQ					0x0A
++#define	OP_INS					0x0C
++#define	OP_INS0					0x0D
++#define	OP_IND					0x0E
++#define	OP_INQ					0x0F
++#define	OP_OS2IS				0x10
++#define	OP_OS2ID				0x11
++#define	OP_OS2IQ				0x12
++#define	OP_OD2IS				0x13
++#define	OP_OD2ID				0x14
++#define	OP_OD2IQ				0x15
++#define	OP_OQ2IS				0x16
++#define	OP_OQ2ID				0x17
++#define	OP_OQ2IQ				0x18
++#define	OP_OSNIS				0x19
++#define	OP_ODNID				0x1A
++
++#define MATRIX_MODE_AUTO		1
++#define   CONF_MTX_MODE_AUTO		0
++#define   MANUALEN_AUTO			0
++#define MATRIX_MODE_MANUAL		0
++#define   CONF_MTX_MODE_MANUAL		9
++#define   MANUALEN_MANUAL		1
++
++#define _ENSPI_MAX_XFER			0x1ff
++
++#define REG(x)			(iobase + x)
++
++
++static void __iomem *iobase;
++
++
++static void opfifo_write(u32 cmd, u32 len)
++{
++	u32 tmp = ((cmd & 0x1f) << 9) | (len & 0x1ff);
++
++	writel(tmp, REG(ENSPI_MANUAL_OPFIFO_WDATA));
++
++	/* Wait for room in OPFIFO */
++	while (readl(REG(ENSPI_MANUAL_OPFIFO_FULL)))
++		;
++
++	/* Shift command into OPFIFO */
++	writel(1, REG(ENSPI_MANUAL_OPFIFO_WR));
++
++	/* Wait for command to finish */
++	while (!readl(REG(ENSPI_MANUAL_OPFIFO_EMPTY)))
++		;
++}
++
++static void set_cs(int state)
++{
++	if (state)
++		opfifo_write(OP_CSH, 1);
++	else
++		opfifo_write(OP_CSL, 1);
++}
++
++static void manual_begin_cmd(void)
++{
++	/* Disable read idle state */
++	writel(0, REG(ENSPI_READ_IDLE_EN));
++
++	/* Wait for FSM to reach idle state */
++	while (readl(REG(ENSPI_RDCTL_FSM)))
++		;
++
++	/* Set SPI core to manual mode */
++	writel(CONF_MTX_MODE_MANUAL, REG(ENSPI_MTX_MODE_TOG));
++	writel(MANUALEN_MANUAL, REG(ENSPI_MANUAL_EN));
++}
++
++static void manual_end_cmd(void)
++{
++	/* Set SPI core to auto mode */
++	writel(CONF_MTX_MODE_AUTO, REG(ENSPI_MTX_MODE_TOG));
++	writel(MANUALEN_AUTO, REG(ENSPI_MANUAL_EN));
++
++	/* Enable read idle state */
++	writel(1, REG(ENSPI_READ_IDLE_EN));
++}
++
++static void dfifo_read(u8 *buf, int len)
++{
++	int i;
++
++	for (i = 0; i < len; i++) {
++		/* Wait for requested data to show up in DFIFO */
++		while (readl(REG(ENSPI_MANUAL_DFIFO_EMPTY)))
++			;
++		buf[i] = readl(REG(ENSPI_MANUAL_DFIFO_RDATA));
++		/* Queue up next byte */
++		writel(1, REG(ENSPI_MANUAL_DFIFO_RD));
++	}
++}
++
++static void dfifo_write(const u8 *buf, int len)
++{
++	int i;
++
++	for (i = 0; i < len; i++) {
++		/* Wait for room in DFIFO */
++		while (readl(REG(ENSPI_MANUAL_DFIFO_FULL)))
++			;
++		writel(buf[i], REG(ENSPI_MANUAL_DFIFO_WDATA));
++	}
++}
++
++#if 0
++static void set_spi_clock_speed(int freq_mhz)
++{
++	u32 tmp, val;
++
++	tmp = readl(ENSPI_CLOCK_DIVIDER);
++	tmp &= 0xffff0000;
++	writel(tmp, ENSPI_CLOCK_DIVIDER);
++
++	val = (400 / (freq_mhz * 2));
++	tmp |= (val << 8) | 1;
++	writel(tmp, ENSPI_CLOCK_DIVIDER);
++}
++#endif
++
++static void init_hw(void)
++{
++	/* Disable manual/auto mode clash interrupt */
++	writel(0, REG(ENSPI_IER));
++
++	// TODO via clk framework
++	// set_spi_clock_speed(50);
++
++	/* Disable DMA */
++	writel(0, REG(ENSPI_NFI2SPI_EN));
++}
++
++static int xfer_read(struct spi_transfer *xfer)
++{
++	int opcode;
++	uint8_t *buf = xfer->rx_buf;
++
++	switch (xfer->rx_nbits) {
++	case SPI_NBITS_SINGLE:
++		opcode = OP_INS;
++		break;
++	case SPI_NBITS_DUAL:
++		opcode = OP_IND;
++		break;
++	case SPI_NBITS_QUAD:
++		opcode = OP_INQ;
++		break;
++	}
++
++	opfifo_write(opcode, xfer->len);
++	dfifo_read(buf, xfer->len);
++
++	return xfer->len;
++}
++
++static int xfer_write(struct spi_transfer *xfer, int next_xfer_is_rx)
++{
++	int opcode;
++	const uint8_t *buf = xfer->tx_buf;
++
++	if (next_xfer_is_rx) {
++		/* need to use Ox2Ix opcode to set the core to input afterwards */
++		switch (xfer->tx_nbits) {
++		case SPI_NBITS_SINGLE:
++			opcode = OP_OS2IS;
++			break;
++		case SPI_NBITS_DUAL:
++			opcode = OP_OS2ID;
++			break;
++		case SPI_NBITS_QUAD:
++			opcode = OP_OS2IQ;
++			break;
++		}
++	} else {
++		switch (xfer->tx_nbits) {
++		case SPI_NBITS_SINGLE:
++			opcode = OP_OUTS;
++			break;
++		case SPI_NBITS_DUAL:
++			opcode = OP_OUTD;
++			break;
++		case SPI_NBITS_QUAD:
++			opcode = OP_OUTQ;
++			break;
++		}
++	}
++
++	opfifo_write(opcode, xfer->len);
++	dfifo_write(buf, xfer->len);
++
++	return xfer->len;
++}
++
++size_t max_transfer_size(struct spi_device *spi)
++{
++	return _ENSPI_MAX_XFER;
++}
++
++int transfer_one_message(struct spi_controller *ctrl, struct spi_message *msg)
++{
++	struct spi_transfer *xfer;
++	int next_xfer_is_rx = 0;
++
++	manual_begin_cmd();
++	set_cs(0);
++	list_for_each_entry(xfer, &msg->transfers, transfer_list) {
++		if (xfer->tx_buf) {
++			if (!list_is_last(&xfer->transfer_list, &msg->transfers)
++			    && list_next_entry(xfer, transfer_list)->rx_buf != NULL)
++				next_xfer_is_rx = 1;
++			else
++				next_xfer_is_rx = 0;
++			msg->actual_length += xfer_write(xfer, next_xfer_is_rx);
++		} else if (xfer->rx_buf) {
++			msg->actual_length += xfer_read(xfer);
++		}
++	}
++	set_cs(1);
++	manual_end_cmd();
++
++	msg->status = 0;
++	spi_finalize_current_message(ctrl);
++
++	return 0;
++}
++
++static int spi_probe(struct platform_device *pdev)
++{
++	struct spi_controller *ctrl;
++	int err;
++
++	ctrl = devm_spi_alloc_master(&pdev->dev, 0);
++	if (!ctrl) {
++		dev_err(&pdev->dev, "Error allocating SPI controller\n");
++		return -ENOMEM;
++	}
++
++	iobase = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
++	if (IS_ERR(iobase)) {
++		dev_err(&pdev->dev, "Could not map SPI register address");
++		return -ENOMEM;
++	}
++
++	init_hw();
++
++	ctrl->dev.of_node = pdev->dev.of_node;
++	ctrl->flags = SPI_CONTROLLER_HALF_DUPLEX;
++	ctrl->mode_bits = SPI_RX_DUAL | SPI_TX_DUAL;
++	ctrl->max_transfer_size = max_transfer_size;
++	ctrl->transfer_one_message = transfer_one_message;
++	err = devm_spi_register_controller(&pdev->dev, ctrl);
++	if (err) {
++		dev_err(&pdev->dev, "Could not register SPI controller\n");
++		return -ENODEV;
++	}
++
++	return 0;
++}
++
++static const struct of_device_id spi_of_ids[] = {
++	{ .compatible = "airoha,en7523-spi" },
++	{ /* sentinel */ }
++};
++MODULE_DEVICE_TABLE(of, spi_of_ids);
++
++static struct platform_driver spi_driver = {
++	.probe = spi_probe,
++	.driver = {
++		.name = "airoha-en7523-spi",
++		.of_match_table = spi_of_ids,
++	},
++};
++
++module_platform_driver(spi_driver);
++
++MODULE_LICENSE("GPL v2");
++MODULE_AUTHOR("Bert Vermeulen <bert at biot.com>");
++MODULE_DESCRIPTION("Airoha EN7523 SPI driver");



From lede-commits at lists.infradead.org  Sun May 12 09:59:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 12:59:36 -0400
Subject: [openwrt/openwrt]  ipq40xx: Enable NVMEM_U_BOOT_ENV config
In-Reply-To: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
References: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
Message-ID: <mailman.35706.1715533185.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/11b00344d11b238ba658d86789be62f04c0ed772

commit 11b00344d11b238ba658d86789be62f04c0ed772
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Thu May 2 14:11:04 2024 -0500

    ipq40xx: Enable NVMEM_U_BOOT_ENV config
    
    It's needed to get the MAC addresses for the Engenius EAP1300.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15402
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/config-5.15 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ipq40xx/config-5.15 b/target/linux/ipq40xx/config-5.15
index 4966352271..fa0de60172 100644
--- a/target/linux/ipq40xx/config-5.15
+++ b/target/linux/ipq40xx/config-5.15
@@ -310,6 +310,7 @@ CONFIG_NVMEM=y
 CONFIG_NVMEM_QCOM_QFPROM=y
 # CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
 # CONFIG_NVMEM_SPMI_SDAM is not set
+CONFIG_NVMEM_U_BOOT_ENV=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y



From lede-commits at lists.infradead.org  Sun May 12 09:59:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 12:59:38 -0400
Subject: [openwrt/openwrt]  ipq40xx: Properly set MAC addresses for the
 EAP1300
In-Reply-To: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
References: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
Message-ID: <mailman.35707.1715533185.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/66952b9ff4743459a3bf77216933a43096865cbc

commit 66952b9ff4743459a3bf77216933a43096865cbc
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Fri May 3 08:12:38 2024 -0500

    ipq40xx: Properly set MAC addresses for the EAP1300
    
    The code that was there was just taking whatever was left in the
    registers, which was just wrong.  Set the addresses using the value from
    the u-boot environment, the same way the OEM firmware does.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15402
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts      | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
index af9a438e2e..a72cb02ff1 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
@@ -194,8 +194,13 @@
 				reg = <0x190000 0x1dc0000>;
 			};
 			partition9 at 1f50000 {
+				compatible = "u-boot,env";
 				label = "u-boot-env";
 				reg = <0x01f50000 0x00010000>;
+
+				macaddr_ubootenv_ethaddr: ethaddr {
+					#nvmem-cell-cells = <1>;
+				};
 			};
 			partition10 at 1f60000 {
 				label = "userconfig";
@@ -222,6 +227,8 @@
 &swport5 {
 	status = "okay";
 	label = "lan";
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
 };
 
 &gmac {
@@ -234,14 +241,14 @@
 
 &wifi0 {
 	status = "okay";
-	nvmem-cell-names = "pre-calibration";
-	nvmem-cells = <&precal_art_1000>;
+	nvmem-cell-names = "pre-calibration", "mac-address";
+	nvmem-cells = <&precal_art_1000>, <&macaddr_ubootenv_ethaddr 1>;
 	qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };
 
 &wifi1 {
 	status = "okay";
-	nvmem-cell-names = "pre-calibration";
-	nvmem-cells = <&precal_art_5000>;
+	nvmem-cell-names = "pre-calibration", "mac-address";
+	nvmem-cells = <&precal_art_5000>, <&macaddr_ubootenv_ethaddr 2>;
 	qcom,ath10k-calibration-variant = "EnGenius-EAP1300";
 };



From lede-commits at lists.infradead.org  Sun May 12 09:59:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 12:59:37 -0400
Subject: [openwrt/openwrt]  ipq40xx: convert Engenius EAP1300 to DSA
In-Reply-To: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
References: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
Message-ID: <mailman.35708.1715533193.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/89088ba638c0bb2f44adbe31caaeb52c06e4db66

commit 89088ba638c0bb2f44adbe31caaeb52c06e4db66
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Wed May 1 15:43:16 2024 -0500

    ipq40xx: convert Engenius EAP1300 to DSA
    
    This commit converts the EAP1300 to DSA setup.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15402
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network  |  1 +
 .../files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts    | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index 5de62f1d7d..060474b718 100644
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -50,6 +50,7 @@ ipq40xx_setup_interfaces()
 	aruba,ap-365|\
 	avm,fritzrepeater-1200|\
 	dlink,dap-2610|\
+	engenius,eap1300|\
 	extreme-networks,ws-ap3915i|\
 	meraki,mr33|\
 	meraki,mr74|\
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
index a8f24aa00e..af9a438e2e 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
@@ -215,6 +215,23 @@
 	status = "okay";
 };
 
+&switch {
+	status = "okay";
+};
+
+&swport5 {
+	status = "okay";
+	label = "lan";
+};
+
+&gmac {
+	status = "okay";
+};
+
+&mdio {
+	status = "okay";
+};
+
 &wifi0 {
 	status = "okay";
 	nvmem-cell-names = "pre-calibration";



From lede-commits at lists.infradead.org  Sun May 12 09:59:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 12 May 2024 12:59:39 -0400
Subject: [openwrt/openwrt]  ipq40xx: Enable the Engenius EAP1300
In-Reply-To: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
References: <171553317646.3497960.6859988396360826993@git-01.infra.openwrt.org>
Message-ID: <mailman.35709.1715533193.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/7a0d5a5c8bda19fc984429d183d14ee0b95a9be6

commit 7a0d5a5c8bda19fc984429d183d14ee0b95a9be6
Author: Corey Minyard <minyard at acm.org>
AuthorDate: Fri May 3 08:14:31 2024 -0500

    ipq40xx: Enable the Engenius EAP1300
    
    Now that DSA is enabled and the MAC addresses are set properly, we can
    use it.
    
    Signed-off-by: Corey Minyard <minyard at acm.org>
    Link: https://github.com/openwrt/openwrt/pull/15358
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15402
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/image/generic.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index ff5d5f26aa..a84031f645 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -455,8 +455,7 @@ define Device/engenius_eap1300
 	IMAGE_SIZE := 25344k
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
 endef
-# Missing DSA Setup
-#TARGET_DEVICES += engenius_eap1300
+TARGET_DEVICES += engenius_eap1300
 
 define Device/engenius_eap2200
 	$(call Device/FitImage)



From lede-commits at lists.infradead.org  Mon May 13 01:12:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 13 May 2024 04:12:09 -0400
Subject: [openwrt/openwrt]  audit: fix compile error on some systems
In-Reply-To: <171558792951.1053278.7673385565941554265@git-01.infra.openwrt.org>
References: <171558792951.1053278.7673385565941554265@git-01.infra.openwrt.org>
Message-ID: <mailman.35763.1715587937.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f1b4fc4c474df66e69343e38b5d17f8fd0161496

commit f1b4fc4c474df66e69343e38b5d17f8fd0161496
Author: Yanase Yuki <dev at zpc.st>
AuthorDate: Fri May 10 17:55:41 2024 +0900

    audit: fix compile error on some systems
    
    On Fedora 40, -Wimplictit-function-declaration error
    is occur when compiling audit package.
    
    Upstream fixed this problem, so backport the patch.
    https://github.com/linux-audit/audit-userspace/pull/371
    
    Signed-off-by: Yanase Yuki <dev at zpc.st>
    Link: https://github.com/openwrt/openwrt/pull/15441
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/utils/audit/Makefile                       |   2 +-
 .../patches/0001-Implicit-builtin-functions.patch  | 615 +++++++++++++++++++++
 2 files changed, 616 insertions(+), 1 deletion(-)

diff --git a/package/utils/audit/Makefile b/package/utils/audit/Makefile
index e36e3ebd53..50c4729b84 100644
--- a/package/utils/audit/Makefile
+++ b/package/utils/audit/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=audit-userspace
 PKG_VERSION:=3.1.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$(PKG_VERSION).tar.gz?
 PKG_HASH:=aec501760acd13ebbe00e78b9b59f795d16a430b1d673628e346cd18905c594b
diff --git a/package/utils/audit/patches/0001-Implicit-builtin-functions.patch b/package/utils/audit/patches/0001-Implicit-builtin-functions.patch
new file mode 100644
index 0000000000..3cb275bd35
--- /dev/null
+++ b/package/utils/audit/patches/0001-Implicit-builtin-functions.patch
@@ -0,0 +1,615 @@
+From 429d031edd52566eeba03c3b3af32ad6e103fd94 Mon Sep 17 00:00:00 2001
+From: Steve Grubb <ausearch.1 at gmail.com>
+Date: Fri, 3 May 2024 17:33:39 -0400
+Subject: [PATCH] Implicit builtin functions
+
+Correct a number of places where printf is being used without a prototype.
+All cases are in libraries which should not be using printf. Change them
+to return an error rather than communicate the problem.
+
+This is a backport of 8c7eaa7
+---
+ audisp/audispd-llist.c            | 10 +++++-----
+ audisp/audispd-llist.h            |  4 ++--
+ auparse/normalize-llist.c         | 12 ++++++------
+ auparse/normalize-llist.h         |  4 ++--
+ auparse/normalize.c               | 14 +++++++++-----
+ src/auditctl-llist.c              | 18 +++++++++---------
+ src/auditctl-llist.h              |  4 ++--
+ src/ausearch-avc.c                | 16 ++++++++--------
+ src/ausearch-avc.h                |  4 ++--
+ src/ausearch-int.c                | 12 ++++++------
+ src/ausearch-int.h                |  4 ++--
+ src/ausearch-llist.c              | 14 +++++++-------
+ src/ausearch-llist.h              |  2 +-
+ src/ausearch-nvpair.c             | 12 ++++++------
+ src/ausearch-nvpair.h             |  4 ++--
+ src/ausearch-string.c             | 10 +++++-----
+ src/ausearch-string.h             |  2 +-
+ tools/aulastlog/aulastlog-llist.c | 18 +++++++++---------
+ tools/aulastlog/aulastlog-llist.h |  4 ++--
+ 19 files changed, 86 insertions(+), 82 deletions(-)
+
+--- a/audisp/audispd-llist.c
++++ b/audisp/audispd-llist.c
+@@ -69,15 +69,13 @@ unsigned int plist_count_active(const co
+ 	return cnt;
+ }
+ 
+-void plist_append(conf_llist *l, plugin_conf_t *p)
++int plist_append(conf_llist *l, plugin_conf_t *p)
+ {
+ 	lnode* newnode;
+ 
+ 	newnode = malloc(sizeof(lnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (p) {
+ 		void *pp = malloc(sizeof(struct plugin_conf));
+@@ -98,6 +96,8 @@ void plist_append(conf_llist *l, plugin_
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void plist_clear(conf_llist* l)
+--- a/audisp/audispd-llist.h
++++ b/audisp/audispd-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * audispd-llist.h - Header file for ausearch-conf_llist.c
+-* Copyright (c) 2007,2013 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2007,2013 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -51,7 +51,7 @@ unsigned int plist_count_active(const co
+ void plist_last(conf_llist *l);
+ lnode *plist_next(conf_llist *l);
+ static inline lnode *plist_get_cur(conf_llist *l) { return l->cur; }
+-void plist_append(conf_llist *l, plugin_conf_t *p);
++int plist_append(conf_llist *l, plugin_conf_t *p);
+ void plist_clear(conf_llist* l);
+ void plist_mark_all_unchecked(conf_llist* l);
+ lnode *plist_find_unchecked(conf_llist* l);
+--- a/auparse/normalize-llist.c
++++ b/auparse/normalize-llist.c
+@@ -1,6 +1,6 @@
+ /*
+  * normalize-llist.c - Minimal linked list library
+- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
++ * Copyright (c) 2016-17 Red Hat Inc.
+  * All Rights Reserved. 
+  *
+  * This library is free software; you can redistribute it and/or
+@@ -61,15 +61,14 @@ data_node *cllist_next(cllist *l)
+ 	return l->cur;
+ }
+ 
+-void cllist_append(cllist *l, uint32_t num, void *data)
++// Returns 0 on success and 1 on error
++int cllist_append(cllist *l, uint32_t num, void *data)
+ {
+ 	data_node *newnode;
+ 
+ 	newnode = malloc(sizeof(data_node));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->num = num;
+ 	newnode->data = data;
+@@ -84,5 +83,6 @@ void cllist_append(cllist *l, uint32_t n
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++	return 0;
+ }
+ 
+--- a/auparse/normalize-llist.h
++++ b/auparse/normalize-llist.h
+@@ -1,6 +1,6 @@
+ /*
+  * normalize-llist.h - Header file for normalize-llist.c
+- * Copyright (c) 2016-17 Red Hat Inc., Durham, North Carolina.
++ * Copyright (c) 2016-17 Red Hat Inc.
+  * All Rights Reserved.
+  *
+  * This library is free software; you can redistribute it and/or
+@@ -53,7 +53,7 @@ AUDIT_HIDDEN_START
+ void cllist_create(cllist *l, void (*cleanup)(void *));
+ void cllist_clear(cllist* l);
+ data_node *cllist_next(cllist *l);
+-void cllist_append(cllist *l, uint32_t num, void *data);
++int cllist_append(cllist *l, uint32_t num, void *data);
+ 
+ AUDIT_HIDDEN_END
+ 
+--- a/auparse/normalize.c
++++ b/auparse/normalize.c
+@@ -179,7 +179,8 @@ static unsigned int add_subj_attr(aupars
+ 	if ((auparse_find_field(au, str))) {
+ 		attr = set_record(0, rnum);
+ 		attr = set_field(attr, auparse_get_field_num(au));
+-		cllist_append(&D.actor.attr, attr, NULL);
++		if (cllist_append(&D.actor.attr, attr, NULL))
++			return 1;
+ 		return 0;
+ 	} else
+ 		auparse_goto_record_num(au, rnum);
+@@ -224,7 +225,8 @@ static unsigned int add_obj_attr(auparse
+ 	if ((auparse_find_field(au, str))) {
+ 		attr = set_record(0, rnum);
+ 		attr = set_field(attr, auparse_get_field_num(au));
+-		cllist_append(&D.thing.attr, attr, NULL);
++		if (cllist_append(&D.thing.attr, attr, NULL))
++			return 1;
+ 		return 0;
+ 	} else
+ 		auparse_goto_record_num(au, rnum);
+@@ -360,21 +362,23 @@ static void collect_id_obj2(auparse_stat
+ 	}
+ }
+ 
+-static void collect_path_attrs(auparse_state_t *au)
++static int collect_path_attrs(auparse_state_t *au)
+ {
+ 	value_t attr;
+ 	unsigned int rnum = auparse_get_record_num(au);
+ 
+ 	auparse_first_field(au);
+ 	if (add_obj_attr(au, "mode", rnum))
+-		return;	// Failed opens don't have anything else
++		return 1;	// Failed opens don't have anything else
+ 
+ 	// All the rest of the fields matter
+ 	while ((auparse_next_field(au))) {
+ 		attr = set_record(0, rnum);
+ 		attr = set_field(attr, auparse_get_field_num(au));
+-		cllist_append(&D.thing.attr, attr, NULL);
++		if (cllist_append(&D.thing.attr, attr, NULL))
++			return 1;
+ 	}
++	return 0;
+ }
+ 
+ static void collect_cwd_attrs(auparse_state_t *au)
+--- a/src/auditctl-llist.c
++++ b/src/auditctl-llist.c
+@@ -1,7 +1,7 @@
+ /*
+ * ausearch-llist.c - Minimal linked list library
+-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved. 
++* Copyright (c) 2005 Red Hat Inc.
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor 
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -59,19 +59,17 @@ lnode *list_next(llist *l)
+ 	return l->cur;
+ }
+ 
+-void list_append(llist *l, struct audit_rule_data *r, size_t sz)
++int list_append(llist *l, struct audit_rule_data *r, size_t sz)
+ {
+ 	lnode* newnode;
+ 
+ 	newnode = malloc(sizeof(lnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (r) {
+ 		void *rr = malloc(sz);
+-		if (rr) 
++		if (rr)
+ 			memcpy(rr, r, sz);
+ 		newnode->r = rr;
+ 	} else
+@@ -89,6 +87,8 @@ void list_append(llist *l, struct audit_
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void list_clear(llist* l)
+--- a/src/auditctl-llist.h
++++ b/src/auditctl-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * auditctl-llist.h - Header file for ausearch-llist.c
+-* Copyright (c) 2005 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -50,7 +50,7 @@ void list_first(llist *l);
+ void list_last(llist *l);
+ lnode *list_next(llist *l);
+ static inline lnode *list_get_cur(llist *l) { return l->cur; }
+-void list_append(llist *l, struct audit_rule_data *r, size_t sz);
++int list_append(llist *l, struct audit_rule_data *r, size_t sz);
+ void list_clear(llist* l);
+ 
+ #endif
+--- a/src/ausearch-avc.c
++++ b/src/ausearch-avc.c
+@@ -1,7 +1,7 @@
+ /*
+ * ausearch-avc.c - Minimal linked list library for avcs
+-* Copyright (c) 2006,2008,2014 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved. 
++* Copyright (c) 2006,2008,2014 Red Hat Inc.
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor 
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -62,15 +62,13 @@ static void alist_last(alist *l)
+ 	l->cur = cur;
+ }
+ 
+-void alist_append(alist *l, anode *node)
++int alist_append(alist *l, anode *node)
+ {
+ 	anode* newnode;
+ 
+ 	newnode = malloc(sizeof(anode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->scontext)
+ 		newnode->scontext = node->scontext;
+@@ -108,6 +106,8 @@ void alist_append(alist *l, anode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ int alist_find_subj(alist *l)
+--- a/src/ausearch-avc.h
++++ b/src/ausearch-avc.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-avc.h - Header file for ausearch-string.c
+-* Copyright (c) 2006,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006,2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -54,7 +54,7 @@ void alist_create(alist *l);
+ static inline void alist_first(alist *l) { l->cur = l->head; }
+ anode *alist_next(alist *l);
+ static inline anode *alist_get_cur(alist *l) { return l->cur; }
+-void alist_append(alist *l, anode *node);
++int alist_append(alist *l, anode *node);
+ void anode_init(anode *an);
+ void anode_clear(anode *an);
+ void alist_clear(alist* l);
+--- a/src/ausearch-int.c
++++ b/src/ausearch-int.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-int.c - Minimal linked list library for integers
+-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005,2008 Red Hat Inc.
+ * All Rights Reserved. 
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -41,15 +41,13 @@ int_node *ilist_next(ilist *l)
+ 	return l->cur;
+ }
+ 
+-void ilist_append(ilist *l, int num, unsigned int hits, int aux)
++int ilist_append(ilist *l, int num, unsigned int hits, int aux)
+ {
+ 	int_node* newnode;
+ 
+ 	newnode = malloc(sizeof(int_node));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->num = num;
+ 	newnode->hits = hits;
+@@ -65,6 +63,8 @@ void ilist_append(ilist *l, int num, uns
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void ilist_clear(ilist* l)
+--- a/src/ausearch-int.h
++++ b/src/ausearch-int.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-int.h - Header file for ausearch-int.c
+-* Copyright (c) 2005,2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005,2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -48,7 +48,7 @@ void ilist_create(ilist *l);
+ static inline void ilist_first(ilist *l) { l->cur = l->head; }
+ int_node *ilist_next(ilist *l);
+ static inline int_node *ilist_get_cur(ilist *l) { return l->cur; }
+-void ilist_append(ilist *l, int num, unsigned int hits, int aux);
++int ilist_append(ilist *l, int num, unsigned int hits, int aux);
+ void ilist_clear(ilist* l);
+ 
+ /* append a number if its not already on the list */
+--- a/src/ausearch-llist.c
++++ b/src/ausearch-llist.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-llist.c - Minimal linked list library
+-* Copyright (c) 2005-2008,2011,2016 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2005-2008,2011,2016 Red Hat Inc.
+ * Copyright (c) 2011 IBM Corp.
+ * All Rights Reserved. 
+ *
+@@ -102,15 +102,13 @@ lnode *list_prev(llist *l)
+ 	return l->cur;
+ }
+ 
+-void list_append(llist *l, lnode *node)
++int list_append(llist *l, lnode *node)
+ {
+ 	lnode* newnode;
+ 
+ 	newnode = malloc(sizeof(lnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->message)
+ 		newnode->message = node->message;
+@@ -123,7 +121,7 @@ void list_append(llist *l, lnode *node)
+ 	newnode->type = node->type;
+ 	newnode->a0 = node->a0;
+ 	newnode->a1 = node->a1;
+-	newnode->item = l->cnt; 
++	newnode->item = l->cnt;
+ 	newnode->next = NULL;
+ 
+ 	// if we are at top, fix this up
+@@ -135,6 +133,8 @@ void list_append(llist *l, lnode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ int list_find_item(llist *l, unsigned int i)
+--- a/src/ausearch-llist.h
++++ b/src/ausearch-llist.h
+@@ -107,7 +107,7 @@ void list_last(llist *l);
+ lnode *list_next(llist *l);
+ lnode *list_prev(llist *l);
+ static inline lnode *list_get_cur(llist *l) { return l->cur; }
+-void list_append(llist *l, lnode *node);
++int list_append(llist *l, lnode *node);
+ void list_clear(llist* l);
+ int list_get_event(llist* l, event *e);
+ 
+--- a/src/ausearch-nvpair.c
++++ b/src/ausearch-nvpair.c
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-nvpair.c - Minimal linked list library for name-value pairs
+-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006-08 Red Hat Inc.
+ * All Rights Reserved. 
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -42,13 +42,11 @@ nvnode *search_list_next(nvlist *l)
+ 	return l->cur;
+ }
+ 
+-void search_list_append(nvlist *l, nvnode *node)
++int search_list_append(nvlist *l, nvnode *node)
+ {
+ 	nvnode* newnode = malloc(sizeof(nvnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->name = node->name;
+ 	newnode->val = node->val;
+@@ -66,6 +64,8 @@ void search_list_append(nvlist *l, nvnod
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ int search_list_find_val(nvlist *l, long val)
+--- a/src/ausearch-nvpair.h
++++ b/src/ausearch-nvpair.h
+@@ -1,6 +1,6 @@
+ /*
+ * ausearch-nvpair.h - Header file for ausearch-nvpair.c
+-* Copyright (c) 2006-08 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2006-08 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -48,7 +48,7 @@ void search_list_create(nvlist *l);
+ static inline void search_list_first(nvlist *l) { l->cur = l->head; }
+ nvnode *search_list_next(nvlist *l);
+ static inline nvnode *search_list_get_cur(nvlist *l) { return l->cur; }
+-void search_list_append(nvlist *l, nvnode *node);
++int search_list_append(nvlist *l, nvnode *node);
+ void search_list_clear(nvlist* l);
+ 
+ /* Given a numeric index, find that record. */
+--- a/src/ausearch-string.c
++++ b/src/ausearch-string.c
+@@ -44,15 +44,13 @@ snode *slist_next(slist *l)
+ 	return l->cur;
+ }
+ 
+-void slist_append(slist *l, snode *node)
++int slist_append(slist *l, snode *node)
+ {
+ 	snode* newnode;
+ 
+ 	newnode = malloc(sizeof(snode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	if (node->str)
+ 		newnode->str = node->str;
+@@ -79,6 +77,8 @@ void slist_append(slist *l, snode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void slist_clear(slist* l)
+--- a/src/ausearch-string.h
++++ b/src/ausearch-string.h
+@@ -49,7 +49,7 @@ void slist_create(slist *l);
+ static inline void slist_first(slist *l) { l->cur = l->head; }
+ snode *slist_next(slist *l);
+ static inline snode *slist_get_cur(slist *l) { return l->cur; }
+-void slist_append(slist *l, snode *node);
++int slist_append(slist *l, snode *node);
+ void slist_clear(slist* l);
+ 
+ /* append a string if its not already on the list */
+--- a/tools/aulastlog/aulastlog-llist.c
++++ b/tools/aulastlog/aulastlog-llist.c
+@@ -1,7 +1,7 @@
+ /*
+ * aulastlog-llist.c - Minimal linked list library
+-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
+-* All Rights Reserved. 
++* Copyright (c) 2008 Red Hat Inc..
++* All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+ * terms of the GNU General Public License as published by the Free
+@@ -15,7 +15,7 @@
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to the
+-* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor 
++* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1335, USA.
+ *
+ * Authors:
+@@ -41,15 +41,13 @@ lnode *list_next(llist *l)
+ 	return l->cur;
+ }
+ 
+-void list_append(llist *l, lnode *node)
++int list_append(llist *l, lnode *node)
+ {
+ 	lnode* newnode;
+ 
+ 	newnode = malloc(sizeof(lnode));
+-	if (newnode == NULL) {
+-		printf("Out of memory. Check %s file, %d line", __FILE__, __LINE__);
+-		return;
+-	}
++	if (newnode == NULL)
++		return 1;
+ 
+ 	newnode->sec = node->sec;
+ 	newnode->uid = node->uid;
+@@ -62,7 +60,7 @@ void list_append(llist *l, lnode *node)
+ 		newnode->term = strdup(node->term);
+ 	else
+ 		newnode->term = NULL;
+-	newnode->item = l->cnt; 
++	newnode->item = l->cnt;
+ 	newnode->next = NULL;
+ 
+ 	// if we are at top, fix this up
+@@ -74,6 +72,8 @@ void list_append(llist *l, lnode *node)
+ 	// make newnode current
+ 	l->cur = newnode;
+ 	l->cnt++;
++
++	return 0;
+ }
+ 
+ void list_clear(llist* l)
+--- a/tools/aulastlog/aulastlog-llist.h
++++ b/tools/aulastlog/aulastlog-llist.h
+@@ -1,6 +1,6 @@
+ /*
+ * aulastlog-llist.h - Header file for aulastlog-llist.c
+-* Copyright (c) 2008 Red Hat Inc., Durham, North Carolina.
++* Copyright (c) 2008 Red Hat Inc.
+ * All Rights Reserved.
+ *
+ * This software may be freely redistributed and/or modified under the
+@@ -53,7 +53,7 @@ static inline void list_first(llist *l)
+ lnode *list_next(llist *l);
+ static inline lnode *list_get_cur(llist *l) { return l->cur; }
+ static inline unsigned int list_get_cnt(llist *l) { return l->cnt; }
+-void list_append(llist *l, lnode *node);
++int list_append(llist *l, lnode *node);
+ void list_clear(llist* l);
+ int list_update_login(llist* l, time_t t);
+ int list_update_host(llist* l, const char *h);



From lede-commits at lists.infradead.org  Mon May 13 01:15:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 13 May 2024 04:15:21 -0400
Subject: [openwrt/openwrt]  gpio-nct5104d: fix compilation with kernel 6.6
In-Reply-To: <171558812124.1064834.8855333046411119083@git-01.infra.openwrt.org>
References: <171558812124.1064834.8855333046411119083@git-01.infra.openwrt.org>
Message-ID: <mailman.35766.1715588126.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4f87a4d84f3d6d1625962413ea56cca1ce83db7c

commit 4f87a4d84f3d6d1625962413ea56cca1ce83db7c
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun May 12 14:38:59 2024 -0700

    gpio-nct5104d: fix compilation with kernel 6.6
    
    gpio.h has been deprecated for a while and no longer compiles with 6.6.
    Include the proper header.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15471
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/gpio-nct5104d/src/gpio-nct5104d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
index 5343d6e3a8..eb1cf8494a 100644
--- a/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
+++ b/package/kernel/gpio-nct5104d/src/gpio-nct5104d.c
@@ -13,7 +13,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/io.h>
-#include <linux/gpio.h>
+#include <linux/gpio/driver.h>
 #include <linux/version.h>
 #include <linux/dmi.h>
 #include <linux/string.h>



From lede-commits at lists.infradead.org  Mon May 13 15:10:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 13 May 2024 18:10:21 -0400
Subject: [openwrt/openwrt]  generic: 6.6: fix realtek PHY detection patch
In-Reply-To: <171563822105.2857071.35724254564058642@git-01.infra.openwrt.org>
References: <171563822105.2857071.35724254564058642@git-01.infra.openwrt.org>
Message-ID: <mailman.35939.1715638230.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/76584c798a8828abf289e865576bc920fa961ace

commit 76584c798a8828abf289e865576bc920fa961ace
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun May 12 12:12:51 2024 +0200

    generic: 6.6: fix realtek PHY detection patch
    
    Fixes the issue of RTL8221B-VB-CG not being detected correctly.
    Reverts changes from f6c27b2, leaving only the read_c45 test.
    
    Fixed: #15093
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 ...-realtek-detect-early-version-of-RTL8221B.patch | 35 +++++-----------------
 ...phy-realtek-support-interrupt-of-RTL8221B.patch |  4 +--
 2 files changed, 10 insertions(+), 29 deletions(-)

diff --git a/target/linux/generic/pending-6.6/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-6.6/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
index 1d30a19654..0e9affd16a 100644
--- a/target/linux/generic/pending-6.6/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.6/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
@@ -1,4 +1,4 @@
-From e52faf1564a8bcaf866f9a6c7bf0e8a8748afb15 Mon Sep 17 00:00:00 2001
+From 0de82310d2b32e78ff79d42c08b1122a6ede3778 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Sun, 30 Apr 2023 00:15:41 +0100
 Subject: [PATCH] net: phy: realtek: detect early version of RTL8221B
@@ -10,9 +10,6 @@ Implement custom identify function using the PKGID instead of iterating
 over the implemented MMDs.
 
 Signed-off-by: Daniel Golle <daniel at makrotopia.org>
----
- drivers/net/phy/realtek.c | 50 ++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 49 insertions(+), 1 deletion(-)
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
@@ -20,12 +17,12 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  #define RTL_GENERIC_PHYID			0x001cc800
  #define RTL_8211FVD_PHYID			0x001cc878
-+#define RTL_8221B_VB_CG				0x001cc849
++#define RTL_8221B_VB_CG_PHYID			0x001cc849
  
  MODULE_DESCRIPTION("Realtek PHY driver");
  MODULE_AUTHOR("Johnson Leung");
-@@ -801,6 +802,54 @@ static int rtl822x_probe(struct phy_devi
- 	return 0;
+@@ -782,6 +783,38 @@ static int rtl8226_match_phy_device(stru
+ 	       rtlgen_supports_2_5gbps(phydev);
  }
  
 +static int rtl8221b_vb_cg_match_phy_device(struct phy_device *phydev)
@@ -33,14 +30,6 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	int val;
 +	u32 id;
 +
-+	if (phydev->is_c45) {
-+		if (phydev->c45_ids.device_ids[1])
-+			return phydev->c45_ids.device_ids[1] == RTL_8221B_VB_CG;
-+	} else {
-+		if (phydev->phy_id)
-+			return phydev->phy_id == RTL_8221B_VB_CG;
-+	}
-+
 +	if (phydev->mdio.bus->read_c45) {
 +		val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_PKGID1);
 +		if (val < 0)
@@ -65,21 +54,13 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +		id |= val;
 +	}
 +
-+	if (id != RTL_8221B_VB_CG)
-+		return 0;
-+
-+	if (phydev->is_c45)
-+		phydev->c45_ids.device_ids[1] = id;
-+	else
-+		phydev->phy_id = id;
-+
-+	return 1;
++	return (id == RTL_8221B_VB_CG_PHYID);
 +}
 +
- static int rtlgen_resume(struct phy_device *phydev)
+ static int rtl822x_probe(struct phy_device *phydev)
  {
- 	int ret = genphy_resume(phydev);
-@@ -1134,7 +1183,7 @@ static struct phy_driver realtek_drvs[]
+ 	struct device *dev = &phydev->mdio.dev;
+@@ -1134,7 +1167,7 @@ static struct phy_driver realtek_drvs[]
  		.write_page     = rtl821x_write_page,
  		.soft_reset     = genphy_soft_reset,
  	}, {
diff --git a/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index e4fbf1f870..726f66cf64 100644
--- a/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
-@@ -1026,6 +1026,51 @@ static int rtl8221b_config_init(struct p
+@@ -1010,6 +1010,51 @@ static int rtl8221b_config_init(struct p
  	return 0;
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  static struct phy_driver realtek_drvs[] = {
  	{
  		PHY_ID_MATCH_EXACT(0x00008201),
-@@ -1188,6 +1233,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1172,6 +1217,8 @@ static struct phy_driver realtek_drvs[]
  		.get_features   = rtl822x_get_features,
  		.config_init    = rtl8221b_config_init,
  		.config_aneg    = rtl822x_config_aneg,



From lede-commits at lists.infradead.org  Mon May 13 15:10:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 13 May 2024 18:10:22 -0400
Subject: [openwrt/openwrt]  generic: 5.15,
 6.1: use RTL_8221B_VB_CG_PHYID in Realtek PHY detection
In-Reply-To: <171563822105.2857071.35724254564058642@git-01.infra.openwrt.org>
References: <171563822105.2857071.35724254564058642@git-01.infra.openwrt.org>
Message-ID: <mailman.35940.1715638230.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a544dc5cee5a67941a8d5f78278aa0e36408ce8

commit 1a544dc5cee5a67941a8d5f78278aa0e36408ce8
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun May 12 12:16:37 2024 +0200

    generic: 5.15, 6.1: use RTL_8221B_VB_CG_PHYID in Realtek PHY detection
    
    Use the constant RTL_8221B_VB_CG_PHYID instead of a numeric value.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 ...-net-phy-realtek-detect-early-version-of-RTL8221B.patch | 14 +++++++++++---
 ...731-net-phy-realtek-support-interrupt-of-RTL8221B.patch |  4 ++--
 ...-net-phy-realtek-detect-early-version-of-RTL8221B.patch | 14 +++++++++++---
 ...741-net-phy-realtek-support-interrupt-of-RTL8221B.patch |  4 ++--
 4 files changed, 26 insertions(+), 10 deletions(-)

diff --git a/target/linux/generic/pending-5.15/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-5.15/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
index b1e7a35a55..e3edfa47c6 100644
--- a/target/linux/generic/pending-5.15/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
+++ b/target/linux/generic/pending-5.15/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
@@ -13,7 +13,15 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
-@@ -744,6 +744,38 @@ static int rtl8226_match_phy_device(stru
+@@ -79,6 +79,7 @@
+ #define RTLGEN_SPEED_MASK			0x0630
+ 
+ #define RTL_GENERIC_PHYID			0x001cc800
++#define RTL_8221B_VB_CG_PHYID			0x001cc849
+ 
+ MODULE_DESCRIPTION("Realtek PHY driver");
+ MODULE_AUTHOR("Johnson Leung");
+@@ -744,6 +745,38 @@ static int rtl8226_match_phy_device(stru
  	       rtlgen_supports_2_5gbps(phydev);
  }
  
@@ -46,13 +54,13 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +		id |= val;
 +	}
 +
-+	return (id == 0x001cc849);
++	return (id == RTL_8221B_VB_CG_PHYID);
 +}
 +
  static int rtl822x_probe(struct phy_device *phydev)
  {
  	struct device *dev = &phydev->mdio.dev;
-@@ -1082,7 +1114,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1082,7 +1115,7 @@ static struct phy_driver realtek_drvs[]
  		.write_page     = rtl821x_write_page,
  		.soft_reset     = genphy_soft_reset,
  	}, {
diff --git a/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index bf0e0aa66d..07d46d8daa 100644
--- a/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
-@@ -971,6 +971,51 @@ static int rtl8221b_config_init(struct p
+@@ -972,6 +972,51 @@ static int rtl8221b_config_init(struct p
  	return 0;
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  static struct phy_driver realtek_drvs[] = {
  	{
  		PHY_ID_MATCH_EXACT(0x00008201),
-@@ -1119,6 +1164,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1120,6 +1165,8 @@ static struct phy_driver realtek_drvs[]
  		.get_features   = rtl822x_get_features,
  		.config_init    = rtl8221b_config_init,
  		.config_aneg    = rtl822x_config_aneg,
diff --git a/target/linux/generic/pending-6.1/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-6.1/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
index f5987109f6..05edcc8bf4 100644
--- a/target/linux/generic/pending-6.1/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.1/730-net-phy-realtek-detect-early-version-of-RTL8221B.patch
@@ -13,7 +13,15 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
-@@ -754,6 +754,38 @@ static int rtl8226_match_phy_device(stru
+@@ -80,6 +80,7 @@
+ 
+ #define RTL_GENERIC_PHYID			0x001cc800
+ #define RTL_8211FVD_PHYID			0x001cc878
++#define RTL_8221B_VB_CG_PHYID			0x001cc849
+ 
+ MODULE_DESCRIPTION("Realtek PHY driver");
+ MODULE_AUTHOR("Johnson Leung");
+@@ -754,6 +755,38 @@ static int rtl8226_match_phy_device(stru
  	       rtlgen_supports_2_5gbps(phydev);
  }
  
@@ -46,13 +54,13 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +		id |= val;
 +	}
 +
-+	return (id == 0x001cc849);
++	return (id == RTL_8221B_VB_CG_PHYID);
 +}
 +
  static int rtl822x_probe(struct phy_device *phydev)
  {
  	struct device *dev = &phydev->mdio.dev;
-@@ -1104,7 +1136,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1104,7 +1137,7 @@ static struct phy_driver realtek_drvs[]
  		.write_page     = rtl821x_write_page,
  		.soft_reset     = genphy_soft_reset,
  	}, {
diff --git a/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index 82cd419a7e..249ba5c496 100644
--- a/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
 
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
-@@ -981,6 +981,51 @@ static int rtl8221b_config_init(struct p
+@@ -982,6 +982,51 @@ static int rtl8221b_config_init(struct p
  	return 0;
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  static struct phy_driver realtek_drvs[] = {
  	{
  		PHY_ID_MATCH_EXACT(0x00008201),
-@@ -1141,6 +1186,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1142,6 +1187,8 @@ static struct phy_driver realtek_drvs[]
  		.get_features   = rtl822x_get_features,
  		.config_init    = rtl8221b_config_init,
  		.config_aneg    = rtl822x_config_aneg,



From lede-commits at lists.infradead.org  Mon May 13 15:27:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 13 May 2024 18:27:40 -0400
Subject: [openwrt/openwrt]  opkg: fix stray \ warnings with grep-3.8
In-Reply-To: <171563926011.2883693.11410593518307356300@git-01.infra.openwrt.org>
References: <171563926011.2883693.11410593518307356300@git-01.infra.openwrt.org>
Message-ID: <mailman.35941.1715639267.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eb1b0220439262d6fff2a2e2180b87db27390905

commit eb1b0220439262d6fff2a2e2180b87db27390905
Author: Georgi Valkov <gvalkov at gmail.com>
AuthorDate: Wed Sep 14 10:26:03 2022 +0300

    opkg: fix stray \ warnings with grep-3.8
    
    We simply grep for "src/". So no need for "\/".
    Furthermore, since grep-3.8 this creates warnings.
    
    As written in the grep-3.8 announcement:
      Regular expressions with stray backslashes now cause warnings, as
      their unspecified behavior can lead to unexpected results.
      For example, '\a' and 'a' are not always equivalent
      <https://bugs.gnu.org/39678>.
    
    Fixes a warning during the first boot:
      grep: warning: stray \ before /
    
    Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
---
 package/system/opkg/files/20_migrate-feeds | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/system/opkg/files/20_migrate-feeds b/package/system/opkg/files/20_migrate-feeds
index 38cc57c467..a4bd725758 100644
--- a/package/system/opkg/files/20_migrate-feeds
+++ b/package/system/opkg/files/20_migrate-feeds
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-[ -f /etc/opkg.conf ] && grep -q "src\/" /etc/opkg.conf || exit 0
+[ -f /etc/opkg.conf ] && grep -q "src/" /etc/opkg.conf || exit 0
 
 echo -e "# Old feeds from previous image\n# Uncomment to reenable\n" >> /etc/opkg/customfeeds.conf
 sed -n "s/.*\(src\/.*\)/# \1/p" /etc/opkg.conf >> /etc/opkg/customfeeds.conf



From lede-commits at lists.infradead.org  Tue May 14 03:21:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 14 May 2024 06:21:06 -0400
Subject: [openwrt/openwrt]  ag71xx: Slightly simplify 'ag71xx_rx_packets()'
In-Reply-To: <171568206600.4037225.2717603215059426579@git-01.infra.openwrt.org>
References: <171568206600.4037225.2717603215059426579@git-01.infra.openwrt.org>
Message-ID: <mailman.36018.1715682074.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5ac8cf1eab606129fdf9588501ac134a2b548ea5

commit 5ac8cf1eab606129fdf9588501ac134a2b548ea5
Author: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
AuthorDate: Wed Mar 13 15:39:23 2024 -0700

    ag71xx: Slightly simplify 'ag71xx_rx_packets()'
    
    There is no need to use 'list_for_each_entry_safe' here, as nothing is
    removed from the list in the 'for' loop.
    Use 'list_for_each_entry' instead, it is slightly less verbose.
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>
    Link: https://github.com/openwrt/openwrt/pull/15435
    Link: https://github.com/openwrt/openwrt/pull/15435
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
index 8132849a9a..8f2a9c7723 100644
--- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
+++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c
@@ -1319,7 +1319,6 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
 	int ring_mask = BIT(ring->order) - 1;
 	int ring_size = BIT(ring->order);
 	struct list_head rx_list;
-	struct sk_buff *next;
 	struct sk_buff *skb;
 	int done = 0;
 
@@ -1379,7 +1378,7 @@ next:
 
 	ag71xx_ring_rx_refill(ag);
 
-	list_for_each_entry_safe(skb, next, &rx_list, list)
+	list_for_each_entry(skb, &rx_list, list)
 		skb->protocol = eth_type_trans(skb, dev);
 	netif_receive_skb_list(&rx_list);
 



From lede-commits at lists.infradead.org  Tue May 14 03:23:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 14 May 2024 06:23:03 -0400
Subject: [openwrt/openwrt]  ipq806x: rt4230w-rev6: fix status reporting via
 the LEDs
In-Reply-To: <171568218332.4041904.13033243155070293832@git-01.infra.openwrt.org>
References: <171568218332.4041904.13033243155070293832@git-01.infra.openwrt.org>
Message-ID: <mailman.36019.1715682187.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0868268c9fd4397411e9629eedda35b1547e798e

commit 0868268c9fd4397411e9629eedda35b1547e798e
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Fri May 10 03:35:43 2024 -0300

    ipq806x: rt4230w-rev6: fix status reporting via the LEDs
    
    There is a custom LED controller between the 3 SoC GPIO outputs and
    the red and blue LEDs of the device. It implements a strange mapping
    that includes fixed, flashing, and breathing modes.
    
    The current DTS configuration causes OpenWrt to flash the LEDs over
    the controller's own flashing, resulting in chaotic output in boot,
    failsafe, and upgrade modes.
    
    This change fixes the LEDs in the best way possible as long as each
    OpenWrt running state is limited to be signaled by a single led.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15440
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
index 12f15bd147..f10fa367f1 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
@@ -14,10 +14,10 @@
 	};
 
 	aliases {
-		led-boot = &ledctrl3;
+		led-boot = &ledctrl1;
 		led-failsafe = &ledctrl1;
-		led-running = &ledctrl2;
-		led-upgrade = &ledctrl3;
+		led-running = &ledctrl3;
+		led-upgrade = &ledctrl1;
 	};
 
 	chosen {
@@ -55,6 +55,7 @@
 		ledctrl2: ledctrl2 {
 			label = "ledctrl2";
 			gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
 		};
 
 		ledctrl3: ledctrl3 {



From lede-commits at lists.infradead.org  Tue May 14 04:24:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 14 May 2024 07:24:00 -0400
Subject: [openwrt/openwrt]  config: add ARM PMUv3 for kernel 6.6
In-Reply-To: <171568584045.4175913.8006331972125855157@git-01.infra.openwrt.org>
References: <171568584045.4175913.8006331972125855157@git-01.infra.openwrt.org>
Message-ID: <mailman.36028.1715685846.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4341901f050058aba0f908c775a4d136c311062c

commit 4341901f050058aba0f908c775a4d136c311062c
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun May 12 21:18:19 2024 +0200

    config: add ARM PMUv3 for kernel 6.6
    
    Kernel 6.6 has moved the ARM PMUv3 driver to drivers/perf and now once
    KERNEL_ARM_PMU is selected trying to build the kernel will stop with:
    ARM PMUv3 support (ARM_PMUV3) [N/y/?] (NEW)
    
    So, lets enable ARM_PMUV3 for ARMv7 and ARMv8 architectures if
    KERNEL_PERF_EVENTS is selected.
    
    Fixes: #15466
    Link: https://github.com/openwrt/openwrt/pull/15469
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 config/Config-kernel.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index feabf0870e..0acd320504 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -50,6 +50,11 @@ config KERNEL_ARM_PMU
 	default y if TARGET_armsr_armv8
 	depends on (arm || aarch64)
 
+config KERNEL_ARM_PMUV3
+	bool
+	default y if TARGET_armsr_armv8
+	depends on (arm_v7 || aarch64) && LINUX_6_6
+
 config KERNEL_RISCV_PMU
 	bool
 	select KERNEL_RISCV_PMU_SBI
@@ -79,6 +84,7 @@ config KERNEL_X86_VSYSCALL_EMULATION
 config KERNEL_PERF_EVENTS
 	bool "Compile the kernel with performance events and counters"
 	select KERNEL_ARM_PMU if (arm || aarch64)
+	select KERNEL_ARM_PMUV3 if (arm_v7 || aarch64) && LINUX_6_6
 	select KERNEL_RISCV_PMU if riscv64
 
 config KERNEL_PROFILING



From lede-commits at lists.infradead.org  Wed May 15 01:21:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:11 -0400
Subject: [openwrt/openwrt]  lantiq: dts: vr9: add missing interrupts to pcie
 node
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36159.1715761272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1825ea90984a7d899ded583aa87d9fa6d4270ccb

commit 1825ea90984a7d899ded583aa87d9fa6d4270ccb
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Wed Apr 10 13:50:33 2024 +0200

    lantiq: dts: vr9: add missing interrupts to pcie node
    
    This adds the missing interrupts to the pcie node.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
index e4c9be8f87..e0e49f377a 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
@@ -528,7 +528,7 @@
 			reg = <0xd900000 0x1000>;
 
 			interrupt-parent = <&icu0>;
-			interrupts = <161 144>;
+			interrupts = <161 144 145 146 147>;
 
 			phys = <&pcie0_phy LANTIQ_PCIE_PHY_MODE_36MHZ>;
 			phy-names = "pcie";



From lede-commits at lists.infradead.org  Wed May 15 01:21:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:05 -0400
Subject: [openwrt/openwrt]  lantiq: set Linux 6.1 as testing kernel
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36160.1715761272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e692742be7bb220483514d1223706fb1104a758c

commit e692742be7bb220483514d1223706fb1104a758c
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Mon May 13 08:57:58 2024 +0200

    lantiq: set Linux 6.1 as testing kernel
    
    Add KERNEL_TESTING_PATCHVER for Linux 6.1.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile
index 2e166a5f37..d900416d3a 100644
--- a/target/linux/lantiq/Makefile
+++ b/target/linux/lantiq/Makefile
@@ -10,6 +10,7 @@ FEATURES:=squashfs
 SUBTARGETS:=xrx200 xway xway_legacy falcon ase
 
 KERNEL_PATCHVER:=5.15
+KERNEL_TESTING_PATCHVER:=6.1
 
 define Target/Description
 	Build firmware images for Lantiq SoC



From lede-commits at lists.infradead.org  Wed May 15 01:21:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:08 -0400
Subject: [openwrt/openwrt]  lantiq: Fix bug in error handling of timer driver
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36161.1715761272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e79dacd962f9ef3b443eda376eba42512ac6e529

commit e79dacd962f9ef3b443eda376eba42512ac6e529
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jun 4 14:05:03 2023 +0200

    lantiq: Fix bug in error handling of timer driver
    
    If the reverted timer driver fails to allocate interrupts handle the
    error better.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    [moved printk before the cleanup for-loop]
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch     | 6 +++---
 .../patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch      | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
index 16b87ed0a5..5721e017b3 100644
--- a/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
+++ b/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
@@ -981,7 +981,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +int __init lq_gptu_init(void)
 +{
 +	int ret;
-+	unsigned int i;
++	int i;
 +
 +	ltq_w32(0, LQ_GPTU_IRNEN);
 +	ltq_w32(0xfff, LQ_GPTU_IRNCR);
@@ -1007,10 +1007,10 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	for (i = 0; i < timer_dev.number_of_timers; i++) {
 +		ret = request_irq(TIMER_INTERRUPT + i, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
 +		if (ret) {
-+			for (; i >= 0; i--)
++			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
++			for (i--; i >= 0; i--)
 +				free_irq(TIMER_INTERRUPT + i, &timer_dev.timer[i]);
 +			misc_deregister(&gptu_miscdev);
-+			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
 +			return ret;
 +		} else {
 +			timer_dev.timer[i].irq = TIMER_INTERRUPT + i;
diff --git a/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
index 16b87ed0a5..5721e017b3 100644
--- a/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
+++ b/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
@@ -981,7 +981,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +int __init lq_gptu_init(void)
 +{
 +	int ret;
-+	unsigned int i;
++	int i;
 +
 +	ltq_w32(0, LQ_GPTU_IRNEN);
 +	ltq_w32(0xfff, LQ_GPTU_IRNCR);
@@ -1007,10 +1007,10 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	for (i = 0; i < timer_dev.number_of_timers; i++) {
 +		ret = request_irq(TIMER_INTERRUPT + i, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
 +		if (ret) {
-+			for (; i >= 0; i--)
++			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
++			for (i--; i >= 0; i--)
 +				free_irq(TIMER_INTERRUPT + i, &timer_dev.timer[i]);
 +			misc_deregister(&gptu_miscdev);
-+			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
 +			return ret;
 +		} else {
 +			timer_dev.timer[i].irq = TIMER_INTERRUPT + i;



From lede-commits at lists.infradead.org  Wed May 15 01:21:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:02 -0400
Subject: [openwrt/openwrt]  lantiq: Refresh kernel configuration
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36162.1715761272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/494a10964cd695fceca07c193491a9096758031e

commit 494a10964cd695fceca07c193491a9096758031e
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Tue Jul 4 00:16:33 2023 +0200

    lantiq: Refresh kernel configuration
    
    This refreshes the configuration for Linux kernel 5.15.
    
    I first selected the xrx200 subtarget and then refreshed the target
    kernel configuration using this command:
      make kernel_oldconfig CONFIG_TARGET=target
    Then I selected one subtarget after the other and refreshed their
    configuration using this command:
      make kernel_oldconfig CONFIG_TARGET=subtarget
    
    I compared the kernel configuration used to compile the kernel from the
    build directory for each subtarget before and after this task and it was
    still the same.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    [refreshed config for linux 5.15.158]
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/ase/config-5.15         |  3 +-
 target/linux/lantiq/config-5.15             | 78 +++++------------------------
 target/linux/lantiq/falcon/config-5.15      |  2 +-
 target/linux/lantiq/xrx200/config-5.15      |  8 ++-
 target/linux/lantiq/xway/config-5.15        | 12 +----
 target/linux/lantiq/xway_legacy/config-5.15 |  7 +--
 6 files changed, 22 insertions(+), 88 deletions(-)

diff --git a/target/linux/lantiq/ase/config-5.15 b/target/linux/lantiq/ase/config-5.15
index 195e49df69..c4d8e575eb 100644
--- a/target/linux/lantiq/ase/config-5.15
+++ b/target/linux/lantiq/ase/config-5.15
@@ -3,7 +3,6 @@ CONFIG_CPU_MIPS32_R1=y
 # CONFIG_CPU_MIPS32_R2 is not set
 CONFIG_CPU_MIPSR1=y
 CONFIG_CRC16=y
-CONFIG_CRYPTO_ACOMP2=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_FIRMWARE_MEMMAP=y
 CONFIG_GENERIC_ALLOCATOR=y
@@ -15,7 +14,7 @@ CONFIG_LANTIQ_ETOP=y
 CONFIG_NLS=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SOC_AMAZON_SE=y
-CONFIG_SOC_TYPE_XWAY=y
+# CONFIG_SOC_XWAY is not set
 CONFIG_SWCONFIG=y
 CONFIG_TARGET_ISA_REV=1
 CONFIG_USB=y
diff --git a/target/linux/lantiq/config-5.15 b/target/linux/lantiq/config-5.15
index 90d48fff04..39862948e2 100644
--- a/target/linux/lantiq/config-5.15
+++ b/target/linux/lantiq/config-5.15
@@ -1,30 +1,15 @@
 CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_ARCH_HAS_DMA_COHERENT_TO_PFN=y
-CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y
-CONFIG_ARCH_HAS_DMA_WRITE_COMBINE=y
-CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
-CONFIG_ARCH_HAS_RESET_CONTROLLER=y
-CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y
-CONFIG_ARCH_HAS_UNCACHED_SEGMENT=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MMAP_RND_BITS_MAX=15
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-CONFIG_ARCH_SUPPORTS_UPROBES=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USE_BUILTIN_BSWAP=y
-CONFIG_ARCH_USE_MEMREMAP_PROT=y
-CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
-CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
-CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_CEVT_R4K=y
-CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_LOAD_STORE_LR=y
+CONFIG_CPU_HAS_DIEI=y
 CONFIG_CPU_HAS_PREFETCH=y
 CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
@@ -32,6 +17,7 @@ CONFIG_CPU_MIPS32=y
 # CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
 CONFIG_CPU_R4K_CACHE_TLB=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -42,20 +28,18 @@ CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
-CONFIG_DMA_NONCOHERENT_CACHE_SYNC=y
 CONFIG_DTC=y
 # CONFIG_DT_EASY50712 is not set
 CONFIG_EARLY_PRINTK=y
-CONFIG_EFI_EARLYCON=y
 CONFIG_FIXED_PHY=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_AUTOSELECT=y
-CONFIG_FONT_SUPPORT=y
+CONFIG_FUNCTION_ALIGNMENT=0
+CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
@@ -71,6 +55,7 @@ CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_MM_LANTIQ=y
 CONFIG_GPIO_STP_XWAY=y
 CONFIG_HANDLE_DOMAIN_IRQ=y
@@ -78,46 +63,10 @@ CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HAVE_ARCH_COMPILER_H=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_ASM_MODVERSIONS=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_COPY_THREAD_TLS=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DEBUG_STACKOVERFLOW=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_FAST_GUP=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_GENERIC_VDSO=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IOREMAP_PROT=y
-CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
-CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_KVM=y
-CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
-CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_PCI=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_RSEQ=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_MIPS_CPU=y
 CONFIG_IRQ_WORK=y
@@ -139,19 +88,16 @@ CONFIG_MIGRATION=y
 CONFIG_MIPS=y
 CONFIG_MIPS_ASID_BITS=8
 CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_CBPF_JIT=y
 CONFIG_MIPS_CLOCK_VSYSCALL=y
-# CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
-# CONFIG_MIPS_ELF_APPENDED_DTB is not set
+CONFIG_MIPS_EBPF_JIT=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_MT_SMP is not set
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
-# CONFIG_MIPS_VPE_LOADER is not set
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
@@ -166,8 +112,10 @@ CONFIG_MTD_SPLIT_TPLINK_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_SELFTESTS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -176,8 +124,6 @@ CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_OF_MDIO=y
-CONFIG_OF_NET=y
-# CONFIG_PCIE_LANTIQ is not set
 CONFIG_PCI_DRIVERS_LEGACY=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
@@ -190,6 +136,7 @@ CONFIG_PINCTRL_LANTIQ=y
 CONFIG_PINCTRL_XWAY=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SYSCON=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
@@ -199,7 +146,8 @@ CONFIG_SERIAL_LANTIQ=y
 CONFIG_SERIAL_LANTIQ_CONSOLE=y
 # CONFIG_SOC_AMAZON_SE is not set
 # CONFIG_SOC_FALCON is not set
-# CONFIG_SOC_XWAY is not set
+CONFIG_SOC_TYPE_XWAY=y
+CONFIG_SOC_XWAY=y
 CONFIG_SPI=y
 CONFIG_SPI_LANTIQ_SSC=y
 CONFIG_SPI_MASTER=y
diff --git a/target/linux/lantiq/falcon/config-5.15 b/target/linux/lantiq/falcon/config-5.15
index 3041c65dbd..d5c5c61505 100644
--- a/target/linux/lantiq/falcon/config-5.15
+++ b/target/linux/lantiq/falcon/config-5.15
@@ -1,4 +1,3 @@
-CONFIG_CPU_HAS_DIEI=y
 CONFIG_MTD_NAND_CORE=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_ECC_SW_HAMMING=y
@@ -6,4 +5,5 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_SPLIT_FIRMWARE_NAME="linux"
 CONFIG_PINCTRL_FALCON=y
 CONFIG_SOC_FALCON=y
+# CONFIG_SOC_XWAY is not set
 CONFIG_SPI_FALCON=y
diff --git a/target/linux/lantiq/xrx200/config-5.15 b/target/linux/lantiq/xrx200/config-5.15
index 4dfd55274a..1b87ad65f0 100644
--- a/target/linux/lantiq/xrx200/config-5.15
+++ b/target/linux/lantiq/xrx200/config-5.15
@@ -1,11 +1,9 @@
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
-CONFIG_CPU_HAS_DIEI=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_RMAP=y
 CONFIG_CRC16=y
-CONFIG_CRYPTO_ACOMP2=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LZO=y
@@ -20,8 +18,8 @@ CONFIG_ICPLUS_PHY=y
 CONFIG_IFX_VPE_EXT=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_POLLDEV=y
 CONFIG_INTEL_XWAY_PHY=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_XRX200=y
 CONFIG_LZO_COMPRESS=y
@@ -60,6 +58,7 @@ CONFIG_PCIEPORTBUS=y
 CONFIG_PCIE_LANTIQ=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_LANTIQ=y
+CONFIG_PHYLINK=y
 CONFIG_PHY_LANTIQ_VRX200_PCIE=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_SUPPLY=y
@@ -74,8 +73,7 @@ CONFIG_SENSORS_LTQ_CPUTEMP=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SMP=y
 CONFIG_SMP_UP=y
-CONFIG_SOC_TYPE_XWAY=y
-CONFIG_SOC_XWAY=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SYNC_R4K=y
 CONFIG_SYS_SUPPORTS_SCHED_SMT=y
 CONFIG_SYS_SUPPORTS_SMP=y
diff --git a/target/linux/lantiq/xway/config-5.15 b/target/linux/lantiq/xway/config-5.15
index 5a6f15dafd..696ce77860 100644
--- a/target/linux/lantiq/xway/config-5.15
+++ b/target/linux/lantiq/xway/config-5.15
@@ -1,9 +1,7 @@
 CONFIG_ADM6996_PHY=y
 CONFIG_AR8216_PHY=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
-CONFIG_CPU_HAS_DIEI=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_RMAP=y
@@ -13,18 +11,15 @@ CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
-CONFIG_FWNODE_MDIO=y
 CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GPIO_CDEV=y
 CONFIG_HW_RANDOM=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_ETOP=y
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
-CONFIG_MIPS_EBPF_JIT=y
 CONFIG_MIPS_MT=y
 CONFIG_MIPS_MT_FPAFF=y
 CONFIG_MIPS_MT_SMP=y
@@ -40,15 +35,14 @@ CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_SELFTESTS=y
 CONFIG_NLS=y
 CONFIG_NR_CPUS=2
 CONFIG_PADATA=y
 CONFIG_PCI=y
+# CONFIG_PCIE_LANTIQ is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_LANTIQ=y
 CONFIG_PSB6970_PHY=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_REGULATOR=y
@@ -64,8 +58,6 @@ CONFIG_SGL_ALLOC=y
 CONFIG_SMP=y
 CONFIG_SMP_UP=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SOC_TYPE_XWAY=y
-CONFIG_SOC_XWAY=y
 CONFIG_SWCONFIG=y
 CONFIG_SYNC_R4K=y
 CONFIG_SYS_SUPPORTS_SCHED_SMT=y
diff --git a/target/linux/lantiq/xway_legacy/config-5.15 b/target/linux/lantiq/xway_legacy/config-5.15
index c177d2a935..ed3ecd8b4d 100644
--- a/target/linux/lantiq/xway_legacy/config-5.15
+++ b/target/linux/lantiq/xway_legacy/config-5.15
@@ -1,15 +1,13 @@
 CONFIG_ADM6996_PHY=y
 CONFIG_BLK_MQ_PCI=y
-CONFIG_CPU_HAS_DIEI=y
 CONFIG_CRC16=y
-CONFIG_CRYPTO_ACOMP2=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_GENERIC_ALLOCATOR=y
+# CONFIG_GPIO_CDEV is not set
 # CONFIG_GPIO_SYSFS is not set
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_POLLDEV=y
 # CONFIG_ISDN is not set
 CONFIG_LANTIQ_ETOP=y
 # CONFIG_LEDS_TRIGGER_TIMER is not set
@@ -17,14 +15,13 @@ CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_NLS=y
 CONFIG_PCI=y
+# CONFIG_PCIE_LANTIQ is not set
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_LANTIQ=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_RTL8306_PHY=y
 CONFIG_SGL_ALLOC=y
-CONFIG_SOC_TYPE_XWAY=y
-CONFIG_SOC_XWAY=y
 CONFIG_SWCONFIG=y
 CONFIG_USB=y
 CONFIG_USB_COMMON=y



From lede-commits at lists.infradead.org  Wed May 15 01:21:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:07 -0400
Subject: [openwrt/openwrt]  lantiq: Fix compile of lantiq components with
 kernel 6.1
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36163.1715761279.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/11baab9fac046a43cd04f18a1f107460a29fe736

commit 11baab9fac046a43cd04f18a1f107460a29fe736
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Fri Jun 2 22:58:51 2023 +0200

    lantiq: Fix compile of lantiq components with kernel 6.1
    
    This makes the components used on the lantiq SoCs compile with kernel
    6.1.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    [also fix ifxmips_ptm_adsl.c]
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../201-fix-compilation-warning-fallthrough.patch  |  2 +-
 ...g997_danube-dynamically-allocate-hlogdata.patch |  2 +-
 .../203-g997_danube-fix-compilation-warning.patch  |  4 +--
 .../lantiq/ltq-adsl/patches/400-kernel-6.1.patch   | 14 ++++++++
 .../101-fix-more-compilation-warning-debugfs.patch |  8 ++---
 .../kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c   | 19 +++++++----
 .../kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c   |  4 +++
 .../300-fix-simple-compilation-warning.patch       |  4 +--
 .../ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch  | 28 ++++++++++++++++
 .../lantiq/ltq-vmmc/patches/602-remove-ABS.patch   | 20 ++++++++++++
 .../ltq-vmmc/patches/603-fix-signature.patch       | 37 ++++++++++++++++++++++
 11 files changed, 126 insertions(+), 16 deletions(-)

diff --git a/package/kernel/lantiq/ltq-adsl/patches/201-fix-compilation-warning-fallthrough.patch b/package/kernel/lantiq/ltq-adsl/patches/201-fix-compilation-warning-fallthrough.patch
index dfaf29f449..17dfd0f25d 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/201-fix-compilation-warning-fallthrough.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/201-fix-compilation-warning-fallthrough.patch
@@ -25,7 +25,7 @@
        nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
 --- a/src/device/drv_dsl_cpe_device_danube.c
 +++ b/src/device/drv_dsl_cpe_device_danube.c
-@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTraining(
+@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
                       DSL_DEV_NUM(pContext)));
                 }
  #endif /* INCLUDE_DSL_DELT*/
diff --git a/package/kernel/lantiq/ltq-adsl/patches/202-g997_danube-dynamically-allocate-hlogdata.patch b/package/kernel/lantiq/ltq-adsl/patches/202-g997_danube-dynamically-allocate-hlogdata.patch
index c3b1047a2a..1dd0f21693 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/202-g997_danube-dynamically-allocate-hlogdata.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/202-g997_danube-dynamically-allocate-hlogdata.patch
@@ -1,6 +1,6 @@
 --- a/src/g997/drv_dsl_cpe_api_g997_danube.c
 +++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
-@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet(
+@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet
        {
           if (nDirection == DSL_DOWNSTREAM)
           {
diff --git a/package/kernel/lantiq/ltq-adsl/patches/203-g997_danube-fix-compilation-warning.patch b/package/kernel/lantiq/ltq-adsl/patches/203-g997_danube-fix-compilation-warning.patch
index c6a0e70f1f..b86ecf84a4 100644
--- a/package/kernel/lantiq/ltq-adsl/patches/203-g997_danube-fix-compilation-warning.patch
+++ b/package/kernel/lantiq/ltq-adsl/patches/203-g997_danube-fix-compilation-warning.patch
@@ -1,6 +1,6 @@
 --- a/src/g997/drv_dsl_cpe_api_g997_danube.c
 +++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
-@@ -2512,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
+@@ -2524,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
                    else
                    {
                       /* read L3 request failure reason */
@@ -8,7 +8,7 @@
                       nErrCode = DSL_DRV_DANUBE_CmvRead(pContext, DSL_CMV_GROUP_STAT,
                          DSL_CMV_ADDRESS_STAT_L3_FAILURE_REASON, 0, 1, &nVal);
                       DSL_DEBUG(DSL_DBG_MSG,
-@@ -2525,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
+@@ -2537,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
                          nErrCode = DSL_ERR_MSG_EXCHANGE;
                          break;
                       }
diff --git a/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch b/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch
new file mode 100644
index 0000000000..2179f355bb
--- /dev/null
+++ b/package/kernel/lantiq/ltq-adsl/patches/400-kernel-6.1.patch
@@ -0,0 +1,14 @@
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
+@@ -556,7 +556,11 @@ static int DSL_DRV_KernelThreadStartup(v
+    retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
+    pThrCntrl->thrParams.bRunning = 0;
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+    complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#else
++   kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#endif
+ 
+    DSL_DEBUG( DSL_DBG_MSG,
+       (DSL_NULL, "EXIT - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
diff --git a/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch b/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
index f854662a07..55551ad91d 100644
--- a/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
+++ b/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
@@ -1,6 +1,6 @@
 --- a/ifxmips_ptm_adsl.c
 +++ b/ifxmips_ptm_adsl.c
-@@ -180,7 +180,7 @@ static int proc_read_version(char *, char **, off_t, int, int *, void *);
+@@ -180,7 +180,7 @@ static int proc_read_version(char *, cha
  static int proc_read_wanmib(char *, char **, off_t, int, int *, void *);
  static int proc_write_wanmib(struct file *, const char *, unsigned long, void *);
  #endif
@@ -9,7 +9,7 @@
    static int proc_read_genconf(char *, char **, off_t, int, int *, void *);
  #endif
  #if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
-@@ -191,8 +191,8 @@ static int proc_write_wanmib(struct file *, const char *, unsigned long, void *)
+@@ -191,8 +191,8 @@ static int proc_write_wanmib(struct file
  /*
   *  Proc Help Functions
   */
@@ -19,7 +19,7 @@
    static INLINE int strincmp(const char *, const char *, int);
  #endif
  static INLINE int ifx_ptm_version(char *);
-@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *file, const char *buf, unsigned long coun
+@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *f
      return count;
  }
  
@@ -28,7 +28,7 @@
  static INLINE int stricmp(const char *p1, const char *p2)
  {
      int c1, c2;
-@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1, const char *p2)
+@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1
      return *p1 - *p2;
  }
  
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
index 5ee966c014..91cc97617f 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
@@ -277,6 +277,8 @@ static int g_showtime = 0;
 
 static void ptm_setup(struct net_device *dev, int ndev)
 {
+    u8 addr[ETH_ALEN];
+
 #if defined(CONFIG_IFXMIPS_DSL_CPE_MEI) || defined(CONFIG_IFXMIPS_DSL_CPE_MEI_MODULE)
     netif_carrier_off(dev);
 #endif
@@ -285,15 +287,20 @@ static void ptm_setup(struct net_device *dev, int ndev)
     dev->netdev_ops      = &g_ptm_netdev_ops;
     /* Allow up to 1508 bytes, for RFC4638 */
     dev->max_mtu         = ETH_DATA_LEN + 8;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
     netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
+#else
+    netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
+#endif
     dev->watchdog_timeo  = ETH_WATCHDOG_TIMEOUT;
 
-    dev->dev_addr[0] = 0x00;
-    dev->dev_addr[1] = 0x20;
-    dev->dev_addr[2] = 0xda;
-    dev->dev_addr[3] = 0x86;
-    dev->dev_addr[4] = 0x23;
-    dev->dev_addr[5] = 0x75 + ndev;
+    addr[0] = 0x00;
+    addr[1] = 0x20;
+    addr[2] = 0xda;
+    addr[3] = 0x86;
+    addr[4] = 0x23;
+    addr[5] = 0x75 + ndev;
+    eth_hw_addr_set(dev, addr);
 }
 
 static struct net_device_stats *ptm_get_stats(struct net_device *dev)
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index dfb57787b9..54d88a21ec 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -153,7 +153,11 @@ static void ptm_setup(struct net_device *dev, int ndev)
     dev->netdev_ops      = &g_ptm_netdev_ops;
     /* Allow up to 1508 bytes, for RFC4638 */
     dev->max_mtu         = ETH_DATA_LEN + 8;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
     netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
+#else
+    netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
+#endif
     dev->watchdog_timeo  = ETH_WATCHDOG_TIMEOUT;
 
     addr[0] = 0x00;
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch
index e9f1931227..c1d3aa8b41 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/300-fix-simple-compilation-warning.patch
@@ -9,7 +9,7 @@
  #endif
  
  /* add MEI CPE debug/printout part */
-@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(struct seq_file *s)
+@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(str
                       ", CRC = 0x%08X"
  #endif
                       MEI_DRV_CRLF,
@@ -22,7 +22,7 @@
  #if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1)
 --- a/src/drv_mei_cpe_download_vrx.c
 +++ b/src/drv_mei_cpe_download_vrx.c
-@@ -3139,9 +3139,9 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownload(
+@@ -3139,9 +3139,9 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownloa
  {
     IFX_int32_t ret = 0;
     MEI_DEV_T *pMeiDev = pMeiDynCntrl->pMeiDev;
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch
new file mode 100644
index 0000000000..a1efdb7b48
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/400-kernel-6.1.patch
@@ -0,0 +1,28 @@
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -1873,7 +1873,11 @@ static int mei_seq_single_show(struct se
+ 
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+    return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++   return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+ 
+ static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
+--- a/src/drv_mei_cpe_linux_proc_config.c
++++ b/src/drv_mei_cpe_linux_proc_config.c
+@@ -1036,7 +1036,11 @@ static int mei_seq_single_show(struct se
+ 
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+ 	return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++	return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+ 
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/602-remove-ABS.patch b/package/kernel/lantiq/ltq-vmmc/patches/602-remove-ABS.patch
new file mode 100644
index 0000000000..e09989be8a
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vmmc/patches/602-remove-ABS.patch
@@ -0,0 +1,20 @@
+--- a/src/drv_vmmc_api.h
++++ b/src/drv_vmmc_api.h
+@@ -149,17 +149,6 @@ DECLARE_TRACE_GROUP(VMMC);
+       return code;                                                         \
+    }while(0)
+ 
+-/*******************************************************************************
+-Description:
+-   always returns the absolute value of argument given
+-Arguments:
+-   x  - argument
+-Return:
+-   absolute value of x
+-*******************************************************************************/
+-/* define ABS */
+-#define ABS(x) (((x) < 0) ? -(x) : (x))
+-
+ /* regular format macros */
+ /*******************************************************************************
+ Description:
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch b/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch
new file mode 100644
index 0000000000..b99255692b
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vmmc/patches/603-fix-signature.patch
@@ -0,0 +1,37 @@
+--- a/src/drv_vmmc_init.c
++++ b/src/drv_vmmc_init.c
+@@ -202,11 +202,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t
+ /**
+    Wrapper for the voice buffer get function that sets the FW as owner.
+ */
+-static IFX_void_t* vmmc_WrapperVoiceBufferGet (IFX_void_t)
++static IFX_void_t* vmmc_WrapperVoiceBufferGet (IFX_size_t size,
++                                               IFX_int32_t priority)
+ {
+    return IFX_TAPI_VoiceBufferGetWithOwnerId (IFX_TAPI_BUFFER_OWNER_FW);
+ }
+ 
++/**
++   Wrapper for the voice buffer get function that sets the FW as owner.
++*/
++static IFX_void_t vmmc_WrapperVoiceBufferPut (const IFX_void_t *ptr)
++{
++   IFX_TAPI_VoiceBufferPut ((IFX_void_t *)ptr);
++}
++
+ 
+ /**
+    Wrapper for the voice buffer free all function freeing all buffers that
+@@ -263,10 +272,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV
+ 
+    /* Register the buffer handler. */
+ #ifdef USE_BUFFERPOOL
+-   ifx_mps_bufman_register((IFX_void_t* (*)(IFX_size_t, IFX_int32_t))
+-                           vmmc_WrapperVoiceBufferGet,
+-                           (IFX_void_t (*)(const IFX_void_t*))
+-                           IFX_TAPI_VoiceBufferPut,
++   ifx_mps_bufman_register(vmmc_WrapperVoiceBufferGet,
++                           vmmc_WrapperVoiceBufferPut,
+                            sizeof(PACKET), POBX_BUFFER_THRESHOLD);
+    ifx_mps_register_bufman_freeall_callback (vmmc_WrapperVoiceBufferFreeAll);
+ #else



From lede-commits at lists.infradead.org  Wed May 15 01:21:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:03 -0400
Subject: [openwrt/openwrt]  kernel/lantiq: Create kernel files for v6.1 (from
 v5.15)
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36166.1715761279.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2196815961a8fe664c65e5274ef8f9caf0fb2792

commit 2196815961a8fe664c65e5274ef8f9caf0fb2792
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Mon May 13 08:42:32 2024 +0200

    kernel/lantiq: Create kernel files for v6.1 (from v5.15)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/ase/{config-5.15 => config-6.1}                       | 0
 target/linux/lantiq/{config-5.15 => config-6.1}                           | 0
 target/linux/lantiq/falcon/{config-5.15 => config-6.1}                    | 0
 .../{patches-5.15 => patches-6.1}/0001-MIPS-lantiq-add-pcie-driver.patch  | 0
 .../{patches-5.15 => patches-6.1}/0004-MIPS-lantiq-add-atm-hack.patch     | 0
 .../0008-MIPS-lantiq-backport-old-timer-code.patch                        | 0
 .../0018-MTD-nand-lots-of-xrx200-fixes.patch                              | 0
 .../0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch                  | 0
 .../0023-NET-PHY-add-led-support-for-intel-xway.patch                     | 0
 .../0028-NET-lantiq-various-etop-fixes.patch                              | 0
 .../0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch                 | 0
 .../0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch              | 0
 .../0042-arch-mips-increase-io_space_limit.patch                          | 0
 .../0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch       | 0
 .../0051-MIPS-lantiq-improve-USB-initialization.patch                     | 0
 .../lantiq/{patches-5.15 => patches-6.1}/0101-find_active_root.patch      | 0
 .../{patches-5.15 => patches-6.1}/0151-lantiq-ifxmips_pcie-use-of.patch   | 0
 target/linux/lantiq/{patches-5.15 => patches-6.1}/0152-lantiq-VPE.patch   | 0
 .../{patches-5.15 => patches-6.1}/0154-lantiq-pci-bar11mask-fix.patch     | 0
 .../lantiq/{patches-5.15 => patches-6.1}/0155-lantiq-VPE-nosmp.patch      | 0
 .../{patches-5.15 => patches-6.1}/0160-owrt-lantiq-multiple-flash.patch   | 0
 .../0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch                | 0
 .../0301-xrx200-add-gphy-clk-src-device-tree-binding.patch                | 0
 .../0302-mtd-cfi_cmdset_0001-Disable-write-buffer-functions-i.patch       | 0
 .../0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch | 0
 .../0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch  | 0
 .../0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch     | 0
 .../0400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch        | 0
 .../{patches-5.15 => patches-6.1}/0701-NET-lantiq-etop-of-mido.patch      | 0
 .../0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch              | 0
 .../0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch        | 0
 .../0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch         | 0
 .../0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch              | 0
 .../0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch | 0
 .../0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch    | 0
 .../0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch       | 0
 .../0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch             | 0
 .../0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch          | 0
 .../0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch               | 0
 .../0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch             | 0
 .../0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch  | 0
 .../0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch      | 0
 .../0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch  | 0
 target/linux/lantiq/xrx200/{config-5.15 => config-6.1}                    | 0
 target/linux/lantiq/xway/{config-5.15 => config-6.1}                      | 0
 target/linux/lantiq/xway_legacy/{config-5.15 => config-6.1}               | 0
 46 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/lantiq/ase/config-5.15 b/target/linux/lantiq/ase/config-6.1
similarity index 100%
rename from target/linux/lantiq/ase/config-5.15
rename to target/linux/lantiq/ase/config-6.1
diff --git a/target/linux/lantiq/config-5.15 b/target/linux/lantiq/config-6.1
similarity index 100%
rename from target/linux/lantiq/config-5.15
rename to target/linux/lantiq/config-6.1
diff --git a/target/linux/lantiq/falcon/config-5.15 b/target/linux/lantiq/falcon/config-6.1
similarity index 100%
rename from target/linux/lantiq/falcon/config-5.15
rename to target/linux/lantiq/falcon/config-6.1
diff --git a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
rename to target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch
diff --git a/target/linux/lantiq/patches-5.15/0004-MIPS-lantiq-add-atm-hack.patch b/target/linux/lantiq/patches-6.1/0004-MIPS-lantiq-add-atm-hack.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0004-MIPS-lantiq-add-atm-hack.patch
rename to target/linux/lantiq/patches-6.1/0004-MIPS-lantiq-add-atm-hack.patch
diff --git a/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
rename to target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
diff --git a/target/linux/lantiq/patches-5.15/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0018-MTD-nand-lots-of-xrx200-fixes.patch
rename to target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch
diff --git a/target/linux/lantiq/patches-5.15/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch b/target/linux/lantiq/patches-6.1/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch
rename to target/linux/lantiq/patches-6.1/0020-MTD-lantiq-handle-NO_XIP-on-cfi0001-flash.patch
diff --git a/target/linux/lantiq/patches-5.15/0023-NET-PHY-add-led-support-for-intel-xway.patch b/target/linux/lantiq/patches-6.1/0023-NET-PHY-add-led-support-for-intel-xway.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0023-NET-PHY-add-led-support-for-intel-xway.patch
rename to target/linux/lantiq/patches-6.1/0023-NET-PHY-add-led-support-for-intel-xway.patch
diff --git a/target/linux/lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.patch
rename to target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch
diff --git a/target/linux/lantiq/patches-5.15/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch b/target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
rename to target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
diff --git a/target/linux/lantiq/patches-5.15/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
rename to target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
diff --git a/target/linux/lantiq/patches-5.15/0042-arch-mips-increase-io_space_limit.patch b/target/linux/lantiq/patches-6.1/0042-arch-mips-increase-io_space_limit.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0042-arch-mips-increase-io_space_limit.patch
rename to target/linux/lantiq/patches-6.1/0042-arch-mips-increase-io_space_limit.patch
diff --git a/target/linux/lantiq/patches-5.15/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
rename to target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
diff --git a/target/linux/lantiq/patches-5.15/0051-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0051-MIPS-lantiq-improve-USB-initialization.patch
rename to target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch
diff --git a/target/linux/lantiq/patches-5.15/0101-find_active_root.patch b/target/linux/lantiq/patches-6.1/0101-find_active_root.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0101-find_active_root.patch
rename to target/linux/lantiq/patches-6.1/0101-find_active_root.patch
diff --git a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
rename to target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
diff --git a/target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0152-lantiq-VPE.patch
rename to target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch
diff --git a/target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch b/target/linux/lantiq/patches-6.1/0154-lantiq-pci-bar11mask-fix.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0154-lantiq-pci-bar11mask-fix.patch
rename to target/linux/lantiq/patches-6.1/0154-lantiq-pci-bar11mask-fix.patch
diff --git a/target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch b/target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0155-lantiq-VPE-nosmp.patch
rename to target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch
diff --git a/target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-6.1/0160-owrt-lantiq-multiple-flash.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0160-owrt-lantiq-multiple-flash.patch
rename to target/linux/lantiq/patches-6.1/0160-owrt-lantiq-multiple-flash.patch
diff --git a/target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch b/target/linux/lantiq/patches-6.1/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch
rename to target/linux/lantiq/patches-6.1/0300-MTD-cfi-cmdset-0001-disable-buffered-writes.patch
diff --git a/target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
rename to target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
diff --git a/target/linux/lantiq/patches-5.15/0302-mtd-cfi_cmdset_0001-Disable-write-buffer-functions-i.patch b/target/linux/lantiq/patches-6.1/0302-mtd-cfi_cmdset_0001-Disable-write-buffer-functions-i.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0302-mtd-cfi_cmdset_0001-Disable-write-buffer-functions-i.patch
rename to target/linux/lantiq/patches-6.1/0302-mtd-cfi_cmdset_0001-Disable-write-buffer-functions-i.patch
diff --git a/target/linux/lantiq/patches-5.15/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch b/target/linux/lantiq/patches-6.1/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch
rename to target/linux/lantiq/patches-6.1/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch
diff --git a/target/linux/lantiq/patches-5.15/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch b/target/linux/lantiq/patches-6.1/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch
rename to target/linux/lantiq/patches-6.1/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch
diff --git a/target/linux/lantiq/patches-5.15/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch b/target/linux/lantiq/patches-6.1/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch
rename to target/linux/lantiq/patches-6.1/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch
diff --git a/target/linux/lantiq/patches-5.15/0400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch b/target/linux/lantiq/patches-6.1/0400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch
rename to target/linux/lantiq/patches-6.1/0400-mtd-rawnand-xway-don-t-yield-while-holding-spinlock.patch
diff --git a/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch
rename to target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch
diff --git a/target/linux/lantiq/patches-5.15/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch b/target/linux/lantiq/patches-6.1/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch
rename to target/linux/lantiq/patches-6.1/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch
diff --git a/target/linux/lantiq/patches-5.15/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch b/target/linux/lantiq/patches-6.1/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch
rename to target/linux/lantiq/patches-6.1/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch
diff --git a/target/linux/lantiq/patches-5.15/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch b/target/linux/lantiq/patches-6.1/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch
rename to target/linux/lantiq/patches-6.1/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch
diff --git a/target/linux/lantiq/patches-5.15/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch b/target/linux/lantiq/patches-6.1/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch
rename to target/linux/lantiq/patches-6.1/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch
diff --git a/target/linux/lantiq/patches-5.15/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch b/target/linux/lantiq/patches-6.1/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch
rename to target/linux/lantiq/patches-6.1/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch
diff --git a/target/linux/lantiq/patches-5.15/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch b/target/linux/lantiq/patches-6.1/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
rename to target/linux/lantiq/patches-6.1/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
diff --git a/target/linux/lantiq/patches-5.15/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch b/target/linux/lantiq/patches-6.1/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
rename to target/linux/lantiq/patches-6.1/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
diff --git a/target/linux/lantiq/patches-5.15/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch b/target/linux/lantiq/patches-6.1/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch
rename to target/linux/lantiq/patches-6.1/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch
diff --git a/target/linux/lantiq/patches-5.15/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch b/target/linux/lantiq/patches-6.1/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch
rename to target/linux/lantiq/patches-6.1/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch
diff --git a/target/linux/lantiq/patches-5.15/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch b/target/linux/lantiq/patches-6.1/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch
rename to target/linux/lantiq/patches-6.1/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch
diff --git a/target/linux/lantiq/patches-5.15/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch b/target/linux/lantiq/patches-6.1/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch
rename to target/linux/lantiq/patches-6.1/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch
diff --git a/target/linux/lantiq/patches-5.15/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch b/target/linux/lantiq/patches-6.1/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch
rename to target/linux/lantiq/patches-6.1/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch
diff --git a/target/linux/lantiq/patches-5.15/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch b/target/linux/lantiq/patches-6.1/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
rename to target/linux/lantiq/patches-6.1/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
diff --git a/target/linux/lantiq/patches-5.15/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch b/target/linux/lantiq/patches-6.1/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch
similarity index 100%
rename from target/linux/lantiq/patches-5.15/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch
rename to target/linux/lantiq/patches-6.1/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch
diff --git a/target/linux/lantiq/xrx200/config-5.15 b/target/linux/lantiq/xrx200/config-6.1
similarity index 100%
rename from target/linux/lantiq/xrx200/config-5.15
rename to target/linux/lantiq/xrx200/config-6.1
diff --git a/target/linux/lantiq/xway/config-5.15 b/target/linux/lantiq/xway/config-6.1
similarity index 100%
rename from target/linux/lantiq/xway/config-5.15
rename to target/linux/lantiq/xway/config-6.1
diff --git a/target/linux/lantiq/xway_legacy/config-5.15 b/target/linux/lantiq/xway_legacy/config-6.1
similarity index 100%
rename from target/linux/lantiq/xway_legacy/config-5.15
rename to target/linux/lantiq/xway_legacy/config-6.1



From lede-commits at lists.infradead.org  Wed May 15 01:21:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:10 -0400
Subject: [openwrt/openwrt]  lantiq: ifxmips_pcie: use dev_err_probe
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36167.1715761279.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/284f12bfa64779ed156262a0351e07af5379be9c

commit 284f12bfa64779ed156262a0351e07af5379be9c
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Wed Apr 10 13:48:50 2024 +0200

    lantiq: ifxmips_pcie: use dev_err_probe
    
    Use dev_err_probe() to get rid of the following warning which is
    seen when the PCIe PHY has not been probed yet:
    pcie-xrx200 1d900000.pcie: failed to get the PCIe PHY
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch      | 13 ++++++-------
 .../patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch       | 13 ++++++-------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
index a11ec3ec98..d509c3a76a 100644
--- a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -151,7 +151,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  	}
  	if (i >= IFX_PCIE_PHY_LOOP_CNT) {
  		printk(KERN_ERR "%s link up failed!!!!!\n", __func__);
-@@ -1045,17 +1088,74 @@ pcie_rc_initialize(int pcie_port)
+@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port)
  	return 0;
  }
  
@@ -193,10 +193,9 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
 -    
 +
 +    ltq_pcie_phy = devm_phy_get(&pdev->dev, "pcie");
-+    if (IS_ERR(ltq_pcie_phy)) {
-+        dev_err(&pdev->dev, "failed to get the PCIe PHY\n");
-+        return PTR_ERR(ltq_pcie_phy);
-+    }
++    if (IS_ERR(ltq_pcie_phy))
++        return dev_err_probe(&pdev->dev, PTR_ERR(ltq_pcie_phy),
++                             "failed to get the PCIe PHY\n");
 +
 +    ltq_pcie_reset = devm_reset_control_get_shared(&pdev->dev, NULL);
 +    if (IS_ERR(ltq_pcie_reset)) {
@@ -228,7 +227,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
      for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){
  	if (pcie_rc_initialize(pcie_port) == 0) {
  	    IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", 
-@@ -1067,6 +1167,7 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi
                  return -ENOMEM;
              }
              ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base;
@@ -236,7 +235,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
              register_pci_controller(&ifx_pcie_controller[pcie_port].pcic);
              /* XXX, clear error status */
-@@ -1083,6 +1184,30 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi
  
      return 0;
  }
diff --git a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
index 7cfa675b49..0ab929b2e2 100644
--- a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -151,7 +151,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  	}
  	if (i >= IFX_PCIE_PHY_LOOP_CNT) {
  		printk(KERN_ERR "%s link up failed!!!!!\n", __func__);
-@@ -1045,17 +1088,74 @@ pcie_rc_initialize(int pcie_port)
+@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port)
  	return 0;
  }
  
@@ -193,10 +193,9 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
 -    
 +
 +    ltq_pcie_phy = devm_phy_get(&pdev->dev, "pcie");
-+    if (IS_ERR(ltq_pcie_phy)) {
-+        dev_err(&pdev->dev, "failed to get the PCIe PHY\n");
-+        return PTR_ERR(ltq_pcie_phy);
-+    }
++    if (IS_ERR(ltq_pcie_phy))
++        return dev_err_probe(&pdev->dev, PTR_ERR(ltq_pcie_phy),
++                             "failed to get the PCIe PHY\n");
 +
 +    ltq_pcie_reset = devm_reset_control_get_shared(&pdev->dev, NULL);
 +    if (IS_ERR(ltq_pcie_reset)) {
@@ -228,7 +227,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
      for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){
  	if (pcie_rc_initialize(pcie_port) == 0) {
  	    IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", 
-@@ -1067,6 +1167,7 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi
                  return -ENOMEM;
              }
              ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base;
@@ -236,7 +235,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
              register_pci_controller(&ifx_pcie_controller[pcie_port].pcic);
              /* XXX, clear error status */
-@@ -1083,6 +1184,30 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi
  
      return 0;
  }



From lede-commits at lists.infradead.org  Wed May 15 01:21:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:06 -0400
Subject: [openwrt/openwrt]  lantiq: Refresh patches and configuration
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36170.1715761282.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a3659b158bfdbeb5a8fcf0343d72c2d32a172081

commit a3659b158bfdbeb5a8fcf0343d72c2d32a172081
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Fri Jun 2 22:13:48 2023 +0200

    lantiq: Refresh patches and configuration
    
    Make all the patches apply and delete the ones already integrated into
    upstream Linux kernel. This also refreshes some of the kernel
    configurations.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    [refreshed for linux 6.1.89]
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/config-6.1                     |  22 ++-
 .../0001-MIPS-lantiq-add-pcie-driver.patch         |  14 +-
 .../0018-MTD-nand-lots-of-xrx200-fixes.patch       |   4 +-
 .../0028-NET-lantiq-various-etop-fixes.patch       | 130 +++++++------
 ...2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch |  10 +-
 ...-lantiq-wifi-and-ethernet-eeprom-handling.patch |   2 +-
 ...ke-the-lantiq-settings-match-vendor-drive.patch |  16 +-
 ...51-MIPS-lantiq-improve-USB-initialization.patch |   2 +-
 .../lantiq/patches-6.1/0101-find_active_root.patch |   6 +-
 .../0151-lantiq-ifxmips_pcie-use-of.patch          |   6 +-
 .../linux/lantiq/patches-6.1/0152-lantiq-VPE.patch |  18 +-
 .../lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch |   2 +-
 ...x200-add-gphy-clk-src-device-tree-binding.patch |   2 +-
 ...-dma-make-the-burst-length-configurable-b.patch |  86 ---------
 ...-enable-all-hardware-interrupts-on-second.patch |  87 ---------
 ...tiq-register-smp_ops-on-non-smp-platforms.patch |  34 ----
 .../patches-6.1/0701-NET-lantiq-etop-of-mido.patch |   8 +-
 ...6-net-lantiq-add-support-for-jumbo-frames.patch | 145 ---------------
 ...lantiq_xrx200-increase-buffer-reservation.patch | 122 ------------
 ...-lantiq_xrx200-add-ingress-SG-DMA-support.patch | 104 -----------
 ...8-net-lantiq-enable-jumbo-frames-on-GSWIP.patch | 127 -------------
 ...configure-the-burst-length-in-ethernet-dr.patch | 126 -------------
 ...iq_xrx200-Hardcode-the-burst-length-value.patch |  73 --------
 ...thernet-lantiq_etop-Fix-compilation-error.patch |  26 ---
 ...-MIPS-lantiq-dma-increase-descritor-count.patch |  28 ---
 ...t-lantiq_xrx200-increase-napi-poll-weigth.patch |  32 ----
 ...17-net-lantiq_xrx200-convert-to-build_skb.patch | 206 ---------------------
 ...-net-lantiq_xrx200-fix-use-after-free-bug.patch |  30 ---
 ...xrx200-confirm-skb-is-allocated-before-us.patch |  33 ----
 ...tiq_xrx200-fix-lock-under-memory-pressure.patch |  33 ----
 ...xrx200-restore-buffer-if-memory-allocatio.patch |  27 ---
 target/linux/lantiq/xrx200/config-6.1              |   5 +
 target/linux/lantiq/xway/config-6.1                |   5 +
 33 files changed, 148 insertions(+), 1423 deletions(-)

diff --git a/target/linux/lantiq/config-6.1 b/target/linux/lantiq/config-6.1
index 39862948e2..e037a63068 100644
--- a/target/linux/lantiq/config-6.1
+++ b/target/linux/lantiq/config-6.1
@@ -4,8 +4,11 @@ CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MMAP_RND_BITS_MAX=15
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_CPU_GENERIC_DUMP_TLB=y
@@ -17,7 +20,6 @@ CONFIG_CPU_MIPS32=y
 # CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
-CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
 CONFIG_CPU_R4K_CACHE_TLB=y
 CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
@@ -25,25 +27,29 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DTC=y
 # CONFIG_DT_EASY50712 is not set
 CONFIG_EARLY_PRINTK=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
-CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_LIB_ASHLDI3=y
 CONFIG_GENERIC_LIB_ASHRDI3=y
@@ -58,7 +64,6 @@ CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_MM_LANTIQ=y
 CONFIG_GPIO_STP_XWAY=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
@@ -91,7 +96,6 @@ CONFIG_MIPS_ASID_SHIFT=0
 CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
-CONFIG_MIPS_EBPF_JIT=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
 CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_MT_SMP is not set
@@ -124,10 +128,14 @@ CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
 CONFIG_PCI_DRIVERS_LEGACY=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHY_LANTIQ_RCU_USB2=y
 # CONFIG_PHY_LANTIQ_VRX200_PCIE is not set
 CONFIG_PINCTRL=y
@@ -136,7 +144,9 @@ CONFIG_PINCTRL_LANTIQ=y
 CONFIG_PINCTRL_XWAY=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SYSCON=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
diff --git a/target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch
index 6454240014..b8f3116bb4 100644
--- a/target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-6.1/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -65,15 +65,15 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  endif
 --- a/arch/mips/pci/Makefile
 +++ b/arch/mips/pci/Makefile
-@@ -43,6 +43,8 @@ obj-$(CONFIG_PCI_LANTIQ)	+= pci-lantiq.o
+@@ -41,6 +41,8 @@ obj-$(CONFIG_PCI_LANTIQ)	+= pci-lantiq.o
  obj-$(CONFIG_SOC_MT7620)	+= pci-mt7620.o
  obj-$(CONFIG_SOC_RT288X)	+= pci-rt2880.o
  obj-$(CONFIG_SOC_RT3883)	+= pci-rt3883.o
 +obj-$(CONFIG_PCIE_LANTIQ)	+= ifxmips_pcie_phy.o ifxmips_pcie.o fixup-lantiq-pcie.o
 +obj-$(CONFIG_PCIE_LANTIQ_MSI)	+= pcie-lantiq-msi.o
- obj-$(CONFIG_TANBAC_TB0219)	+= fixup-tb0219.o
- obj-$(CONFIG_TANBAC_TB0226)	+= fixup-tb0226.o
- obj-$(CONFIG_TANBAC_TB0287)	+= fixup-tb0287.o
+ obj-$(CONFIG_SOC_TX4927)	+= pci-tx4927.o
+ obj-$(CONFIG_SOC_TX4938)	+= pci-tx4938.o
+ obj-$(CONFIG_TOSHIBA_RBTX4927)	+= fixup-rbtx4927.o
 --- /dev/null
 +++ b/arch/mips/pci/fixup-lantiq-pcie.c
 @@ -0,0 +1,74 @@
@@ -5524,8 +5524,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	  (transaction layer end-to-end CRC checking).
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -1483,6 +1483,8 @@ void pci_walk_bus(struct pci_bus *top, i
- 		  void *userdata);
+@@ -1558,6 +1558,8 @@ void pci_walk_bus_locked(struct pci_bus
+ 			 void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
 +int pcibios_host_nr(void);
@@ -5535,7 +5535,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  					 unsigned long type);
 --- a/include/linux/pci_ids.h
 +++ b/include/linux/pci_ids.h
-@@ -1086,6 +1086,12 @@
+@@ -1097,6 +1097,12 @@
  #define PCI_DEVICE_ID_SGI_IOC3		0x0003
  #define PCI_DEVICE_ID_SGI_LITHIUM	0x1002
  
diff --git a/target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch b/target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch
index 35f656da6e..f420d8cde5 100644
--- a/target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch
+++ b/target/linux/lantiq/patches-6.1/0018-MTD-nand-lots-of-xrx200-fixes.patch
@@ -95,7 +95,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  }
  
  static int xway_dev_ready(struct nand_chip *chip)
-@@ -170,6 +223,7 @@ static int xway_nand_probe(struct platfo
+@@ -169,6 +222,7 @@ static int xway_nand_probe(struct platfo
  	int err;
  	u32 cs;
  	u32 cs_flag = 0;
@@ -103,7 +103,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	/* Allocate memory for the device structure (and zero it) */
  	data = devm_kzalloc(&pdev->dev, sizeof(struct xway_nand_data),
-@@ -206,6 +260,15 @@ static int xway_nand_probe(struct platfo
+@@ -204,6 +258,15 @@ static int xway_nand_probe(struct platfo
  	if (!err && cs == 1)
  		cs_flag = NAND_CON_IN_CS1 | NAND_CON_OUT_CS1;
  
diff --git a/target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch b/target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch
index e9f3ee473b..8ac1097267 100644
--- a/target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch
+++ b/target/linux/lantiq/patches-6.1/0028-NET-lantiq-various-etop-fixes.patch
@@ -19,7 +19,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
   */
  
  #include <linux/kernel.h>
-@@ -20,11 +20,16 @@
+@@ -20,12 +20,17 @@
  #include <linux/mm.h>
  #include <linux/platform_device.h>
  #include <linux/ethtool.h>
@@ -29,6 +29,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  #include <linux/io.h>
  #include <linux/dma-mapping.h>
  #include <linux/module.h>
+ #include <linux/property.h>
 +#include <linux/clk.h>
 +#include <linux/of_net.h>
 +#include <linux/of_irq.h>
@@ -36,7 +37,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <asm/checksum.h>
  
-@@ -32,7 +37,7 @@
+@@ -33,7 +38,7 @@
  #include <xway_dma.h>
  #include <lantiq_platform.h>
  
@@ -45,7 +46,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  #define MDIO_REQUEST		0x80000000
  #define MDIO_READ		0x40000000
  #define MDIO_ADDR_MASK		0x1f
-@@ -41,44 +46,91 @@
+@@ -42,44 +47,91 @@
  #define MDIO_REG_OFFSET		0x10
  #define MDIO_VAL_MASK		0xffff
  
@@ -85,8 +86,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 -/* use 2 static channels for TX/RX */
 -#define LTQ_ETOP_TX_CHANNEL	1
 -#define LTQ_ETOP_RX_CHANNEL	6
--#define IS_TX(x)		(x == LTQ_ETOP_TX_CHANNEL)
--#define IS_RX(x)		(x == LTQ_ETOP_RX_CHANNEL)
+-#define IS_TX(x)		((x) == LTQ_ETOP_TX_CHANNEL)
+-#define IS_RX(x)		((x) == LTQ_ETOP_RX_CHANNEL)
 +#define ETOP_CFG_MASK           0xfff
 +#define ETOP_CFG_FEN0		(1 << 8)
 +#define ETOP_CFG_SEN0		(1 << 6)
@@ -152,7 +153,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	struct net_device *netdev;
  	struct napi_struct napi;
  	struct ltq_dma_channel dma;
-@@ -88,23 +140,36 @@ struct ltq_etop_chan {
+@@ -89,26 +141,39 @@ struct ltq_etop_chan {
  struct ltq_etop_priv {
  	struct net_device *netdev;
  	struct platform_device *pdev;
@@ -166,6 +167,9 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	struct ltq_etop_chan txch;
 +	struct ltq_etop_chan rxch;
  
+ 	int tx_burst_len;
+ 	int rx_burst_len;
+ 
 -	spinlock_t lock;
 +	int tx_irq;
 +	int rx_irq;
@@ -193,8 +197,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	ch->skb[ch->dma.desc] = dev_alloc_skb(MAX_DMA_DATA_LEN);
  	if (!ch->skb[ch->dma.desc])
  		return -ENOMEM;
- 	ch->dma.desc_base[ch->dma.desc].addr = dma_map_single(&priv->pdev->dev,
-@@ -139,8 +204,11 @@ ltq_etop_hw_receive(struct ltq_etop_chan
+ 	ch->dma.desc_base[ch->dma.desc].addr =
+@@ -143,8 +208,11 @@ ltq_etop_hw_receive(struct ltq_etop_chan
  	spin_unlock_irqrestore(&priv->lock, flags);
  
  	skb_put(skb, len);
@@ -206,7 +210,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  }
  
  static int
-@@ -148,7 +216,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
+@@ -152,7 +220,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
  {
  	struct ltq_etop_chan *ch = container_of(napi,
  				struct ltq_etop_chan, napi);
@@ -216,7 +220,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	while (work_done < budget) {
  		struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
-@@ -160,7 +230,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
+@@ -164,7 +234,9 @@ ltq_etop_poll_rx(struct napi_struct *nap
  	}
  	if (work_done < budget) {
  		napi_complete_done(&ch->napi, work_done);
@@ -226,7 +230,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	}
  	return work_done;
  }
-@@ -172,12 +244,14 @@ ltq_etop_poll_tx(struct napi_struct *nap
+@@ -176,12 +248,14 @@ ltq_etop_poll_tx(struct napi_struct *nap
  		container_of(napi, struct ltq_etop_chan, napi);
  	struct ltq_etop_priv *priv = netdev_priv(ch->netdev);
  	struct netdev_queue *txq =
@@ -242,7 +246,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  		dev_kfree_skb_any(ch->skb[ch->tx_free]);
  		ch->skb[ch->tx_free] = NULL;
  		memset(&ch->dma.desc_base[ch->tx_free], 0,
-@@ -190,7 +264,9 @@ ltq_etop_poll_tx(struct napi_struct *nap
+@@ -194,7 +268,9 @@ ltq_etop_poll_tx(struct napi_struct *nap
  	if (netif_tx_queue_stopped(txq))
  		netif_tx_start_queue(txq);
  	napi_complete(&ch->napi);
@@ -252,7 +256,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return 1;
  }
  
-@@ -198,9 +274,10 @@ static irqreturn_t
+@@ -202,9 +278,10 @@ static irqreturn_t
  ltq_etop_dma_irq(int irq, void *_priv)
  {
  	struct ltq_etop_priv *priv = _priv;
@@ -266,16 +270,16 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return IRQ_HANDLED;
  }
  
-@@ -212,7 +289,7 @@ ltq_etop_free_channel(struct net_device
+@@ -216,7 +293,7 @@ ltq_etop_free_channel(struct net_device
  	ltq_dma_free(&ch->dma);
  	if (ch->dma.irq)
  		free_irq(ch->dma.irq, priv);
 -	if (IS_RX(ch->idx)) {
 +	if (ch == &priv->txch) {
  		int desc;
+ 
  		for (desc = 0; desc < LTQ_DESC_NUM; desc++)
- 			dev_kfree_skb_any(ch->skb[ch->dma.desc]);
-@@ -223,66 +300,135 @@ static void
+@@ -228,80 +305,135 @@ static void
  ltq_etop_hw_exit(struct net_device *dev)
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -330,6 +334,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
 -	int i;
+-	int err;
 +	phy_interface_t mii_mode = priv->mii_mode;
  
 -	ltq_pmu_enable(PMU_PPE);
@@ -347,15 +352,15 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +
 +	switch (mii_mode) {
  	case PHY_INTERFACE_MODE_RMII:
--		ltq_etop_w32_mask(ETOP_MII_MASK,
--			ETOP_MII_REVERSE, LTQ_ETOP_CFG);
+-		ltq_etop_w32_mask(ETOP_MII_MASK, ETOP_MII_REVERSE,
+-				  LTQ_ETOP_CFG);
 +		ltq_etop_w32_mask(ETOP_CFG_MASK, ETOP_CFG_REMII0 | ETOP_CFG_OFF1 |
 +			ETOP_CFG_SEN0 | ETOP_CFG_FEN0, LTQ_ETOP_CFG);
  		break;
  
  	case PHY_INTERFACE_MODE_MII:
--		ltq_etop_w32_mask(ETOP_MII_MASK,
--			ETOP_MII_NORMAL, LTQ_ETOP_CFG);
+-		ltq_etop_w32_mask(ETOP_MII_MASK, ETOP_MII_NORMAL,
+-				  LTQ_ETOP_CFG);
 +		ltq_etop_w32_mask(ETOP_CFG_MASK, ETOP_CFG_OFF1 |
 +			ETOP_CFG_SEN0 | ETOP_CFG_FEN0, LTQ_ETOP_CFG);
  		break;
@@ -374,8 +379,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +			break;
 +		}
  		netdev_err(dev, "unknown mii mode %d\n",
--			priv->pldata->mii_mode);
-+			mii_mode);
+-			   priv->pldata->mii_mode);
++			   mii_mode);
  		return -ENOTSUPP;
  	}
  
@@ -392,18 +397,25 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	int rx = priv->rx_irq - LTQ_DMA_ETOP;
 +	int err;
  
- 	ltq_dma_init_port(DMA_PORT_ETOP);
+ 	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
  
 -	for (i = 0; i < MAX_DMA_CHAN; i++) {
 -		int irq = LTQ_DMA_CH0_INT + i;
 -		struct ltq_etop_chan *ch = &priv->ch[i];
 -
--		ch->idx = ch->dma.nr = i;
+-		ch->dma.nr = i;
+-		ch->idx = ch->dma.nr;
 -		ch->dma.dev = &priv->pdev->dev;
 -
 -		if (IS_TX(i)) {
 -			ltq_dma_alloc_tx(&ch->dma);
--			request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
+-			err = request_irq(irq, ltq_etop_dma_irq, 0, "etop_tx", priv);
+-			if (err) {
+-				netdev_err(dev,
+-					   "Unable to get Tx DMA IRQ %d\n",
+-					   irq);
+-				return err;
+-			}
 -		} else if (IS_RX(i)) {
 -			ltq_dma_alloc_rx(&ch->dma);
 -			for (ch->dma.desc = 0; ch->dma.desc < LTQ_DESC_NUM;
@@ -411,7 +423,13 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 -				if (ltq_etop_alloc_skb(ch))
 -					return -ENOMEM;
 -			ch->dma.desc = 0;
--			request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
+-			err = request_irq(irq, ltq_etop_dma_irq, 0, "etop_rx", priv);
+-			if (err) {
+-				netdev_err(dev,
+-					   "Unable to get Rx DMA IRQ %d\n",
+-					   irq);
+-				return err;
+-			}
 +	priv->txch.dma.nr = tx;
 +	priv->txch.dma.dev = &priv->pdev->dev;
 +	ltq_dma_alloc_tx(&priv->txch.dma);
@@ -446,7 +464,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  }
  
  static void
-@@ -301,6 +447,39 @@ static const struct ethtool_ops ltq_etop
+@@ -320,6 +452,39 @@ static const struct ethtool_ops ltq_etop
  };
  
  static int
@@ -486,7 +504,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr, int phy_reg, u16 phy_data)
  {
  	u32 val = MDIO_REQUEST |
-@@ -308,9 +487,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
+@@ -327,9 +492,9 @@ ltq_etop_mdio_wr(struct mii_bus *bus, in
  		((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET) |
  		phy_data;
  
@@ -498,7 +516,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return 0;
  }
  
-@@ -321,12 +500,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
+@@ -340,12 +505,12 @@ ltq_etop_mdio_rd(struct mii_bus *bus, in
  		((phy_addr & MDIO_ADDR_MASK) << MDIO_ADDR_OFFSET) |
  		((phy_reg & MDIO_REG_MASK) << MDIO_REG_OFFSET);
  
@@ -515,7 +533,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return val;
  }
  
-@@ -342,7 +521,10 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -361,7 +526,10 @@ ltq_etop_mdio_probe(struct net_device *d
  	struct ltq_etop_priv *priv = netdev_priv(dev);
  	struct phy_device *phydev;
  
@@ -527,7 +545,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	if (!phydev) {
  		netdev_err(dev, "no PHY found\n");
-@@ -350,14 +532,17 @@ ltq_etop_mdio_probe(struct net_device *d
+@@ -369,14 +537,17 @@ ltq_etop_mdio_probe(struct net_device *d
  	}
  
  	phydev = phy_connect(dev, phydev_name(phydev),
@@ -547,7 +565,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	phy_attached_info(phydev);
  
-@@ -378,8 +563,13 @@ ltq_etop_mdio_init(struct net_device *de
+@@ -397,8 +568,13 @@ ltq_etop_mdio_init(struct net_device *de
  	}
  
  	priv->mii_bus->priv = dev;
@@ -562,8 +580,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	}
  	priv->mii_bus->name = "ltq_mii";
  	snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
- 		priv->pdev->name, priv->pdev->id);
-@@ -416,18 +606,21 @@ static int
+ 		 priv->pdev->name, priv->pdev->id);
+@@ -435,18 +611,21 @@ static int
  ltq_etop_open(struct net_device *dev)
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -595,7 +613,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	netif_tx_start_all_queues(dev);
  	return 0;
  }
-@@ -436,18 +629,19 @@ static int
+@@ -455,18 +634,19 @@ static int
  ltq_etop_stop(struct net_device *dev)
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -625,7 +643,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return 0;
  }
  
-@@ -457,15 +651,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -476,15 +656,16 @@ ltq_etop_tx(struct sk_buff *skb, struct
  	int queue = skb_get_queue_mapping(skb);
  	struct netdev_queue *txq = netdev_get_tx_queue(dev, queue);
  	struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -646,16 +664,16 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  		netdev_err(dev, "tx ring full\n");
  		netif_tx_stop_queue(txq);
  		return NETDEV_TX_BUSY;
-@@ -473,7 +668,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -492,7 +673,7 @@ ltq_etop_tx(struct sk_buff *skb, struct
  
- 	/* dma needs to start on a 16 byte aligned address */
- 	byte_offset = CPHYSADDR(skb->data) % 16;
+ 	/* dma needs to start on a burst length value aligned address */
+ 	byte_offset = CPHYSADDR(skb->data) % (priv->tx_burst_len * 4);
 -	ch->skb[ch->dma.desc] = skb;
 +	priv->txch.skb[priv->txch.dma.desc] = skb;
  
  	netif_trans_update(dev);
  
-@@ -483,11 +678,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
+@@ -503,11 +684,11 @@ ltq_etop_tx(struct sk_buff *skb, struct
  	wmb();
  	desc->ctl = LTQ_DMA_OWN | LTQ_DMA_SOP | LTQ_DMA_EOP |
  		LTQ_DMA_TX_OFFSET(byte_offset) | (len & LTQ_DMA_SIZE_MASK);
@@ -670,7 +688,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  		netif_tx_stop_queue(txq);
  
  	return NETDEV_TX_OK;
-@@ -498,11 +693,14 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -518,11 +699,14 @@ ltq_etop_change_mtu(struct net_device *d
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
  	unsigned long flags;
@@ -686,7 +704,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	spin_unlock_irqrestore(&priv->lock, flags);
  
  	return 0;
-@@ -555,6 +753,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -575,6 +759,9 @@ ltq_etop_init(struct net_device *dev)
  	if (err)
  		goto err_hw;
  	ltq_etop_change_mtu(dev, 1500);
@@ -696,7 +714,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
  	if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -572,9 +773,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -592,9 +779,10 @@ ltq_etop_init(struct net_device *dev)
  		dev->addr_assign_type = NET_ADDR_RANDOM;
  
  	ltq_etop_set_multicast_list(dev);
@@ -710,7 +728,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	return 0;
  
  err_netdev:
-@@ -594,6 +796,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -614,6 +802,9 @@ ltq_etop_tx_timeout(struct net_device *d
  	err = ltq_etop_hw_init(dev);
  	if (err)
  		goto err_hw;
@@ -720,7 +738,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	netif_trans_update(dev);
  	netif_wake_queue(dev);
  	return;
-@@ -617,14 +822,18 @@ static const struct net_device_ops ltq_e
+@@ -637,14 +828,18 @@ static const struct net_device_ops ltq_e
  	.ndo_tx_timeout = ltq_etop_tx_timeout,
  };
  
@@ -743,7 +761,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	if (!res) {
-@@ -650,31 +859,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -670,19 +865,55 @@ ltq_etop_probe(struct platform_device *p
  		goto err_out;
  	}
  
@@ -805,23 +823,27 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	spin_lock_init(&priv->lock);
  	SET_NETDEV_DEV(dev, &pdev->dev);
  
+@@ -698,15 +929,10 @@ ltq_etop_probe(struct platform_device *p
+ 		goto err_free;
+ 	}
+ 
 -	for (i = 0; i < MAX_DMA_CHAN; i++) {
 -		if (IS_TX(i))
--			netif_napi_add(dev, &priv->ch[i].napi,
--				ltq_etop_poll_tx, 8);
+-			netif_napi_add_weight(dev, &priv->ch[i].napi,
+-					      ltq_etop_poll_tx, 8);
 -		else if (IS_RX(i))
--			netif_napi_add(dev, &priv->ch[i].napi,
--				ltq_etop_poll_rx, 32);
+-			netif_napi_add_weight(dev, &priv->ch[i].napi,
+-					      ltq_etop_poll_rx, 32);
 -		priv->ch[i].netdev = dev;
 -	}
-+	netif_napi_add(dev, &priv->txch.napi, ltq_etop_poll_tx, 8);
-+	netif_napi_add(dev, &priv->rxch.napi, ltq_etop_poll_rx, 32);
++	netif_napi_add_weight(dev, &priv->txch.napi, ltq_etop_poll_tx, 8);
++	netif_napi_add_weight(dev, &priv->rxch.napi, ltq_etop_poll_rx, 32);
 +	priv->txch.netdev = dev;
 +	priv->rxch.netdev = dev;
  
  	err = register_netdev(dev);
  	if (err)
-@@ -703,31 +943,22 @@ ltq_etop_remove(struct platform_device *
+@@ -735,31 +961,22 @@ ltq_etop_remove(struct platform_device *
  	return 0;
  }
  
@@ -840,7 +862,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	},
  };
  
--int __init
+-static int __init
 -init_ltq_etop(void)
 -{
 -	int ret = platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
diff --git a/target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch b/target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
index 2d3b4e2996..b5f79e95a8 100644
--- a/target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
+++ b/target/linux/lantiq/patches-6.1/0031-I2C-MIPS-lantiq-add-FALC-ON-i2c-bus-master.patch
@@ -18,9 +18,9 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/i2c/busses/Kconfig
 +++ b/drivers/i2c/busses/Kconfig
-@@ -757,6 +757,16 @@ config I2C_MESON
- 	  If you say yes to this option, support will be included for the
- 	  I2C interface on the Amlogic Meson family of SoCs.
+@@ -795,6 +795,16 @@ config I2C_MICROCHIP_CORE
+ 	  This driver can also be built as a module. If so, the module will be
+ 	  called i2c-microchip-core.
  
 +config I2C_LANTIQ
 +	tristate "Lantiq I2C interface"
@@ -37,14 +37,14 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	depends on PPC
 --- a/drivers/i2c/busses/Makefile
 +++ b/drivers/i2c/busses/Makefile
-@@ -72,6 +72,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C)	+= i2c-imx-l
+@@ -76,6 +76,7 @@ obj-$(CONFIG_I2C_IMX_LPI2C)	+= i2c-imx-l
  obj-$(CONFIG_I2C_IOP3XX)	+= i2c-iop3xx.o
  obj-$(CONFIG_I2C_JZ4780)	+= i2c-jz4780.o
  obj-$(CONFIG_I2C_KEMPLD)	+= i2c-kempld.o
 +obj-$(CONFIG_I2C_LANTIQ)	+= i2c-lantiq.o
  obj-$(CONFIG_I2C_LPC2K)		+= i2c-lpc2k.o
  obj-$(CONFIG_I2C_MESON)		+= i2c-meson.o
- obj-$(CONFIG_I2C_MPC)		+= i2c-mpc.o
+ obj-$(CONFIG_I2C_MICROCHIP_CORE)	+= i2c-microchip-corei2c.o
 --- /dev/null
 +++ b/drivers/i2c/busses/i2c-lantiq.c
 @@ -0,0 +1,747 @@
diff --git a/target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index be0f0bfccd..aea5716596 100644
--- a/target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-6.1/0035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -203,7 +203,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +early_param("ethaddr", setup_ethaddr);
 --- a/drivers/net/ethernet/lantiq_etop.c
 +++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -757,7 +757,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -763,7 +763,11 @@ ltq_etop_init(struct net_device *dev)
  	if (err)
  		goto err_hw;
  
diff --git a/target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch b/target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
index 6615a9edbf..a3bbda7c33 100644
--- a/target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
+++ b/target/linux/lantiq/patches-6.1/0050-USB-DWC2-make-the-lantiq-settings-match-vendor-drive.patch
@@ -23,7 +23,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
 
 --- a/drivers/usb/dwc2/params.c
 +++ b/drivers/usb/dwc2/params.c
-@@ -93,7 +93,14 @@ static void dwc2_set_rk_params(struct dw
+@@ -115,7 +115,15 @@ static void dwc2_set_rk_params(struct dw
  	p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
  }
  
@@ -32,14 +32,15 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
 +{
 +	struct dwc2_core_params *p = &hsotg->params;
 +
-+	p->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE;
++	p->otg_caps.hnp_support = false;
++	p->otg_caps.srp_support = false;
 +}
 +
 +static void dwc2_set_ltq_ase_params(struct dwc2_hsotg *hsotg)
  {
  	struct dwc2_core_params *p = &hsotg->params;
  
-@@ -101,12 +108,20 @@ static void dwc2_set_ltq_params(struct d
+@@ -124,12 +132,21 @@ static void dwc2_set_ltq_params(struct d
  	p->host_rx_fifo_size = 288;
  	p->host_nperio_tx_fifo_size = 128;
  	p->host_perio_tx_fifo_size = 96;
@@ -53,7 +54,8 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
 +{
 +	struct dwc2_core_params *p = &hsotg->params;
 +
-+	p->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE;
++	p->otg_caps.hnp_support = false;
++	p->otg_caps.srp_support = false;
 +	p->host_rx_fifo_size = 288;
 +	p->host_nperio_tx_fifo_size = 128;
 +	p->host_perio_tx_fifo_size = 136;
@@ -62,9 +64,9 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  static void dwc2_set_amlogic_params(struct dwc2_hsotg *hsotg)
  {
  	struct dwc2_core_params *p = &hsotg->params;
-@@ -205,8 +220,11 @@ const struct of_device_id dwc2_of_match_
- 	{ .compatible = "brcm,bcm2835-usb", .data = dwc2_set_bcm_params },
- 	{ .compatible = "hisilicon,hi6220-usb", .data = dwc2_set_his_params  },
+@@ -241,8 +258,11 @@ const struct of_device_id dwc2_of_match_
+ 	{ .compatible = "ingenic,x1830-otg", .data = dwc2_set_x1600_params },
+ 	{ .compatible = "ingenic,x2000-otg", .data = dwc2_set_x2000_params },
  	{ .compatible = "rockchip,rk3066-usb", .data = dwc2_set_rk_params },
 -	{ .compatible = "lantiq,arx100-usb", .data = dwc2_set_ltq_params },
 -	{ .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params },
diff --git a/target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch b/target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch
index 9d62892b56..dca9880e8f 100644
--- a/target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch
+++ b/target/linux/lantiq/patches-6.1/0051-MIPS-lantiq-improve-USB-initialization.patch
@@ -41,7 +41,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  /* the pci enable helper */
  static int pci_enable(struct clk *clk)
  {
-@@ -585,4 +604,5 @@ void __init ltq_soc_init(void)
+@@ -589,4 +608,5 @@ void __init ltq_soc_init(void)
  		clkdev_add_pmu("1e116000.mei", "dfe", 1, 0, PMU_DFE);
  		clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
  	}
diff --git a/target/linux/lantiq/patches-6.1/0101-find_active_root.patch b/target/linux/lantiq/patches-6.1/0101-find_active_root.patch
index 14dc83f1f7..99e187a012 100644
--- a/target/linux/lantiq/patches-6.1/0101-find_active_root.patch
+++ b/target/linux/lantiq/patches-6.1/0101-find_active_root.patch
@@ -69,7 +69,7 @@ Signed-off-by: Mathias Kresin <openwrt at kresin.me>
  		return -ENOMEM;
  
  	i = 0;
-@@ -147,6 +183,11 @@ static int parse_fixed_partitions(struct
+@@ -166,6 +202,11 @@ static int parse_fixed_partitions(struct
  		if (of_property_read_bool(pp, "slc-mode"))
  			parts[i].add_flags |= MTD_SLC_ON_MLC_EMULATION;
  
@@ -81,7 +81,7 @@ Signed-off-by: Mathias Kresin <openwrt at kresin.me>
  		i++;
  	}
  
-@@ -156,6 +197,11 @@ static int parse_fixed_partitions(struct
+@@ -175,6 +216,11 @@ static int parse_fixed_partitions(struct
  	if (quirks && quirks->post_parse)
  		quirks->post_parse(master, parts, nr_parts);
  
@@ -93,7 +93,7 @@ Signed-off-by: Mathias Kresin <openwrt at kresin.me>
  	*pparts = parts;
  	return nr_parts;
  
-@@ -166,6 +212,7 @@ ofpart_fail:
+@@ -185,6 +231,7 @@ ofpart_fail:
  ofpart_none:
  	of_node_put(pp);
  	kfree(parts);
diff --git a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
index a11ec3ec98..7cfa675b49 100644
--- a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -12,15 +12,15 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
 
 --- a/arch/mips/pci/Makefile
 +++ b/arch/mips/pci/Makefile
-@@ -43,7 +43,7 @@ obj-$(CONFIG_PCI_LANTIQ)	+= pci-lantiq.o
+@@ -41,7 +41,7 @@ obj-$(CONFIG_PCI_LANTIQ)	+= pci-lantiq.o
  obj-$(CONFIG_SOC_MT7620)	+= pci-mt7620.o
  obj-$(CONFIG_SOC_RT288X)	+= pci-rt2880.o
  obj-$(CONFIG_SOC_RT3883)	+= pci-rt3883.o
 -obj-$(CONFIG_PCIE_LANTIQ)	+= ifxmips_pcie_phy.o ifxmips_pcie.o fixup-lantiq-pcie.o
 +obj-$(CONFIG_PCIE_LANTIQ)	+= ifxmips_pcie.o fixup-lantiq-pcie.o
  obj-$(CONFIG_PCIE_LANTIQ_MSI)	+= pcie-lantiq-msi.o
- obj-$(CONFIG_TANBAC_TB0219)	+= fixup-tb0219.o
- obj-$(CONFIG_TANBAC_TB0226)	+= fixup-tb0226.o
+ obj-$(CONFIG_SOC_TX4927)	+= pci-tx4927.o
+ obj-$(CONFIG_SOC_TX4938)	+= pci-tx4938.o
 --- a/arch/mips/pci/ifxmips_pcie.c
 +++ b/arch/mips/pci/ifxmips_pcie.c
 @@ -16,8 +16,15 @@
diff --git a/target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch
index 2395261ff1..51810fe924 100644
--- a/target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch
+++ b/target/linux/lantiq/patches-6.1/0152-lantiq-VPE.patch
@@ -15,7 +15,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -2433,6 +2433,12 @@ config MIPS_VPE_LOADER
+@@ -2306,6 +2306,12 @@ config MIPS_VPE_LOADER
  	  Includes a loader for loading an elf relocatable object
  	  onto another VPE and running it.
  
@@ -30,7 +30,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  	default "y"
 --- a/arch/mips/include/asm/mipsmtregs.h
 +++ b/arch/mips/include/asm/mipsmtregs.h
-@@ -32,6 +32,9 @@
+@@ -31,6 +31,9 @@
  #define read_c0_vpeconf1()		__read_32bit_c0_register($1, 3)
  #define write_c0_vpeconf1(val)		__write_32bit_c0_register($1, 3, val)
  
@@ -40,7 +40,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  #define read_c0_tcstatus()		__read_32bit_c0_register($2, 1)
  #define write_c0_tcstatus(val)		__write_32bit_c0_register($2, 1, val)
  
-@@ -378,6 +381,8 @@ do {									\
+@@ -377,6 +380,8 @@ do {									\
  #define write_vpe_c0_vpeconf0(val)	mttc0(1, 2, val)
  #define read_vpe_c0_vpeconf1()		mftc0(1, 3)
  #define write_vpe_c0_vpeconf1(val)	mttc0(1, 3, val)
@@ -51,7 +51,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  #define read_vpe_c0_status()		mftc0(12, 0)
 --- a/arch/mips/include/asm/vpe.h
 +++ b/arch/mips/include/asm/vpe.h
-@@ -123,4 +123,13 @@ void cleanup_tc(struct tc *tc);
+@@ -124,4 +124,13 @@ void cleanup_tc(struct tc *tc);
  
  int __init vpe_module_init(void);
  void __exit vpe_module_exit(void);
@@ -67,7 +67,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  #endif /* _ASM_VPE_H */
 --- a/arch/mips/kernel/vpe-mt.c
 +++ b/arch/mips/kernel/vpe-mt.c
-@@ -415,6 +415,8 @@ int __init vpe_module_init(void)
+@@ -416,6 +416,8 @@ int __init vpe_module_init(void)
  			}
  
  			v->ntcs = hw_tcs - aprp_cpu_index();
@@ -76,7 +76,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  
  			/* add the tc to the list of this vpe's tc's. */
  			list_add(&t->tc, &v->tc);
-@@ -518,3 +520,47 @@ void __exit vpe_module_exit(void)
+@@ -519,3 +521,47 @@ void __exit vpe_module_exit(void)
  			release_vpe(v);
  	}
  }
@@ -170,9 +170,9 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  {
 --- a/arch/mips/lantiq/prom.c
 +++ b/arch/mips/lantiq/prom.c
-@@ -28,10 +28,14 @@ EXPORT_SYMBOL_GPL(ebu_lock);
-  */
- static struct ltq_soc_info soc_info;
+@@ -42,10 +42,14 @@ extern const struct plat_smp_ops vsmp_sm
+ static struct plat_smp_ops lantiq_smp_ops;
+ #endif
  
 +/* for Multithreading (APRP), vpe.c will use it */
 +unsigned long cp0_memsize;
diff --git a/target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch b/target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch
index 6426ee717b..015acabcfe 100644
--- a/target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch
+++ b/target/linux/lantiq/patches-6.1/0155-lantiq-VPE-nosmp.patch
@@ -10,7 +10,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
 
 --- a/arch/mips/kernel/vpe-mt.c
 +++ b/arch/mips/kernel/vpe-mt.c
-@@ -130,7 +130,10 @@ int vpe_run(struct vpe *v)
+@@ -131,7 +131,10 @@ int vpe_run(struct vpe *v)
  	 * kernels need to turn it on, even if that wasn't the pre-dvpe() state.
  	 */
  #ifdef CONFIG_SMP
diff --git a/target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch b/target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
index 6dacba56d5..e46790b2c3 100644
--- a/target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
+++ b/target/linux/lantiq/patches-6.1/0301-xrx200-add-gphy-clk-src-device-tree-binding.patch
@@ -31,7 +31,7 @@ Signed-off-by: Mathias Kresin <openwrt at kresin.me>
  /* bring up all register ranges that we need for basic system control */
  void __init ltq_soc_init(void)
  {
-@@ -605,4 +619,6 @@ void __init ltq_soc_init(void)
+@@ -609,4 +623,6 @@ void __init ltq_soc_init(void)
  		clkdev_add_pmu("1e100400.serial", NULL, 1, 0, PMU_ASC0);
  	}
  	usb_set_clock();
diff --git a/target/linux/lantiq/patches-6.1/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch b/target/linux/lantiq/patches-6.1/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch
deleted file mode 100644
index 4f3210a6c3..0000000000
--- a/target/linux/lantiq/patches-6.1/0310-v5.16-MIPS-lantiq-dma-make-the-burst-length-configurable-b.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 49293bbc50cb7d44223eb49e0f7cb38e7dac2361 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 14 Sep 2021 23:21:01 +0200
-Subject: [PATCH 4/5] MIPS: lantiq: dma: make the burst length configurable by
- the drivers
-
-Make the burst length configurable by the drivers.
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Acked-by: Hauke Mehrtens <hauke at hauke-m.de>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- .../include/asm/mach-lantiq/xway/xway_dma.h   |  2 +-
- arch/mips/lantiq/xway/dma.c                   | 38 ++++++++++++++++---
- 2 files changed, 34 insertions(+), 6 deletions(-)
-
---- a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h
-+++ b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h
-@@ -45,6 +45,6 @@ extern void ltq_dma_close(struct ltq_dma
- extern void ltq_dma_alloc_tx(struct ltq_dma_channel *ch);
- extern void ltq_dma_alloc_rx(struct ltq_dma_channel *ch);
- extern void ltq_dma_free(struct ltq_dma_channel *ch);
--extern void ltq_dma_init_port(int p);
-+extern void ltq_dma_init_port(int p, int tx_burst, int rx_burst);
- 
- #endif
---- a/arch/mips/lantiq/xway/dma.c
-+++ b/arch/mips/lantiq/xway/dma.c
-@@ -182,7 +182,7 @@ ltq_dma_free(struct ltq_dma_channel *ch)
- EXPORT_SYMBOL_GPL(ltq_dma_free);
- 
- void
--ltq_dma_init_port(int p)
-+ltq_dma_init_port(int p, int tx_burst, int rx_burst)
- {
- 	ltq_dma_w32(p, LTQ_DMA_PS);
- 	switch (p) {
-@@ -191,16 +191,44 @@ ltq_dma_init_port(int p)
- 		 * Tell the DMA engine to swap the endianness of data frames and
- 		 * drop packets if the channel arbitration fails.
- 		 */
--		ltq_dma_w32_mask(0, DMA_ETOP_ENDIANNESS | DMA_PDEN,
-+		ltq_dma_w32_mask(0, (DMA_ETOP_ENDIANNESS | DMA_PDEN),
- 			LTQ_DMA_PCTRL);
- 		break;
- 
--	case DMA_PORT_DEU:
--		ltq_dma_w32((DMA_PCTRL_2W_BURST << DMA_TX_BURST_SHIFT) |
--			(DMA_PCTRL_2W_BURST << DMA_RX_BURST_SHIFT),
-+	default:
-+		break;
-+	}
-+
-+	switch (rx_burst) {
-+	case 8:
-+		ltq_dma_w32_mask(0x0c, (DMA_PCTRL_8W_BURST << DMA_RX_BURST_SHIFT),
- 			LTQ_DMA_PCTRL);
- 		break;
-+	case 4:
-+		ltq_dma_w32_mask(0x0c, (DMA_PCTRL_4W_BURST << DMA_RX_BURST_SHIFT),
-+			LTQ_DMA_PCTRL);
-+		break;
-+	case 2:
-+		ltq_dma_w32_mask(0x0c, (DMA_PCTRL_2W_BURST << DMA_RX_BURST_SHIFT),
-+			LTQ_DMA_PCTRL);
-+		break;
-+	default:
-+		break;
-+	}
- 
-+	switch (tx_burst) {
-+	case 8:
-+		ltq_dma_w32_mask(0x30, (DMA_PCTRL_8W_BURST << DMA_TX_BURST_SHIFT),
-+			LTQ_DMA_PCTRL);
-+		break;
-+	case 4:
-+		ltq_dma_w32_mask(0x30, (DMA_PCTRL_4W_BURST << DMA_TX_BURST_SHIFT),
-+			LTQ_DMA_PCTRL);
-+		break;
-+	case 2:
-+		ltq_dma_w32_mask(0x30, (DMA_PCTRL_2W_BURST << DMA_TX_BURST_SHIFT),
-+			LTQ_DMA_PCTRL);
-+		break;
- 	default:
- 		break;
- 	}
diff --git a/target/linux/lantiq/patches-6.1/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch b/target/linux/lantiq/patches-6.1/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch
deleted file mode 100644
index d98664c478..0000000000
--- a/target/linux/lantiq/patches-6.1/0320-v6.1-MIPS-lantiq-enable-all-hardware-interrupts-on-second.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 730320fd770d4114a2ecb6fb223dcc8c3cecdc5b Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Wed, 21 Sep 2022 22:59:44 +0200
-Subject: [PATCH] MIPS: lantiq: enable all hardware interrupts on second VPE
-
-This patch is needed to handle interrupts by the second VPE on the Lantiq
-ARX100, xRX200, xRX300 and xRX330 SoCs. Switching some ICU interrupts to
-the second VPE results in a hang. Currently, the vsmp_init_secondary()
-function is responsible for enabling these interrupts. It only enables
-Malta-specific interrupts (SW0, SW1, HW4 and HW5).
-
-The MIPS core has 8 interrupts defined. On Lantiq SoCs, hardware
-interrupts are wired to an ICU instance. Each VPE has an independent
-instance of the ICU. The mapping of the ICU interrupts is shown below:
-SW0(IP0) - IPI call,
-SW1(IP1) - IPI resched,
-HW0(IP2) - ICU 0-31,
-HW1(IP3) - ICU 32-63,
-HW2(IP4) - ICU 64-95,
-HW3(IP5) - ICU 96-127,
-HW4(IP6) - ICU 128-159,
-HW5(IP7) - timer.
-
-This patch enables all interrupt lines on the second VPE.
-
-This problem affects multithreaded SoCs with a custom interrupt controller.
-SOCs with 1004Kc core and newer use the MIPS GIC. At this point, I am aware
-that the Realtek RTL839x and RTL930x SoCs may need a similar fix. In the
-future, this may be replaced with some generic solution.
-
-Tested on Lantiq xRX200.
-
-Suggested-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/lantiq/prom.c | 26 ++++++++++++++++++++++++--
- 1 file changed, 24 insertions(+), 2 deletions(-)
-
---- a/arch/mips/lantiq/prom.c
-+++ b/arch/mips/lantiq/prom.c
-@@ -31,6 +31,14 @@ static struct ltq_soc_info soc_info;
- /* for Multithreading (APRP), vpe.c will use it */
- unsigned long cp0_memsize;
- 
-+/*
-+ * These structs are used to override vsmp_init_secondary()
-+ */
-+#if defined(CONFIG_MIPS_MT_SMP)
-+extern const struct plat_smp_ops vsmp_smp_ops;
-+static struct plat_smp_ops lantiq_smp_ops;
-+#endif
-+
- const char *get_system_type(void)
- {
- 	return soc_info.sys_type;
-@@ -87,6 +95,17 @@ void __init device_tree_init(void)
- 	unflatten_and_copy_device_tree();
- }
- 
-+#if defined(CONFIG_MIPS_MT_SMP)
-+static void lantiq_init_secondary(void)
-+{
-+	/*
-+	 * MIPS CPU startup function vsmp_init_secondary() will only
-+	 * enable some of the interrupts for the second CPU/VPE.
-+	 */
-+	set_c0_status(ST0_IM);
-+}
-+#endif
-+
- void __init prom_init(void)
- {
- 	/* call the soc specific detetcion code and get it to fill soc_info */
-@@ -98,7 +117,10 @@ void __init prom_init(void)
- 	prom_init_cmdline();
- 
- #if defined(CONFIG_MIPS_MT_SMP)
--	if (register_vsmp_smp_ops())
--		panic("failed to register_vsmp_smp_ops()");
-+	if (cpu_has_mipsmt) {
-+		lantiq_smp_ops = vsmp_smp_ops;
-+		lantiq_smp_ops.init_secondary = lantiq_init_secondary;
-+		register_smp_ops(&lantiq_smp_ops);
-+	}
- #endif
- }
diff --git a/target/linux/lantiq/patches-6.1/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch b/target/linux/lantiq/patches-6.1/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch
deleted file mode 100644
index 1acf73b2d5..0000000000
--- a/target/linux/lantiq/patches-6.1/0321-v6.8-MIPS-lantiq-register-smp_ops-on-non-smp-platforms.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4bf2a626dc4bb46f0754d8ac02ec8584ff114ad5 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Mon, 22 Jan 2024 19:47:09 +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 <olek2 at wp.pl>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- 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
-@@ -117,10 +117,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
- }
diff --git a/target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch
index 7e49b47e02..19c027b9f8 100644
--- a/target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch
+++ b/target/linux/lantiq/patches-6.1/0701-NET-lantiq-etop-of-mido.patch
@@ -10,7 +10,7 @@ Signed-off-by: Johann Neuhauser <johann at it-neuhauser.de>
 
 --- a/drivers/net/ethernet/lantiq_etop.c
 +++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -30,6 +30,7 @@
+@@ -31,6 +31,7 @@
  #include <linux/of_net.h>
  #include <linux/of_irq.h>
  #include <linux/of_platform.h>
@@ -18,7 +18,7 @@ Signed-off-by: Johann Neuhauser <johann at it-neuhauser.de>
  
  #include <asm/checksum.h>
  
-@@ -553,7 +554,8 @@ static int
+@@ -558,7 +559,8 @@ static int
  ltq_etop_mdio_init(struct net_device *dev)
  {
  	struct ltq_etop_priv *priv = netdev_priv(dev);
@@ -28,10 +28,10 @@ Signed-off-by: Johann Neuhauser <johann at it-neuhauser.de>
  
  	priv->mii_bus = mdiobus_alloc();
  	if (!priv->mii_bus) {
-@@ -573,7 +575,15 @@ ltq_etop_mdio_init(struct net_device *de
+@@ -578,7 +580,15 @@ ltq_etop_mdio_init(struct net_device *de
  	priv->mii_bus->name = "ltq_mii";
  	snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
- 		priv->pdev->name, priv->pdev->id);
+ 		 priv->pdev->name, priv->pdev->id);
 -	if (mdiobus_register(priv->mii_bus)) {
 +
 +	mdio_np = of_get_child_by_name(priv->pdev->dev.of_node, "mdio-bus");
diff --git a/target/linux/lantiq/patches-6.1/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch b/target/linux/lantiq/patches-6.1/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch
deleted file mode 100644
index 4a4109c772..0000000000
--- a/target/linux/lantiq/patches-6.1/0702-v5.16-net-lantiq-add-support-for-jumbo-frames.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From 998ac358019e491217e752bc6dcbb3afb2a6fa3e Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Sun, 19 Sep 2021 20:24:28 +0200
-Subject: [PATCH] net: lantiq: add support for jumbo frames
-
-Add support for jumbo frames. Full support for jumbo frames requires
-changes in the DSA switch driver (lantiq_gswip.c).
-
-Tested on BT Hone Hub 5A.
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_xrx200.c | 64 +++++++++++++++++++++++++---
- 1 file changed, 57 insertions(+), 7 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -14,13 +14,15 @@
- #include <linux/clk.h>
- #include <linux/delay.h>
- 
-+#include <linux/if_vlan.h>
-+
- #include <linux/of_net.h>
- #include <linux/of_platform.h>
- 
- #include <xway_dma.h>
- 
- /* DMA */
--#define XRX200_DMA_DATA_LEN	0x600
-+#define XRX200_DMA_DATA_LEN	(SZ_64K - 1)
- #define XRX200_DMA_RX		0
- #define XRX200_DMA_TX		1
- 
-@@ -106,7 +108,8 @@ static void xrx200_flush_dma(struct xrx2
- 			break;
- 
- 		desc->ctl = LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) |
--			    XRX200_DMA_DATA_LEN;
-+			    (ch->priv->net_dev->mtu + VLAN_ETH_HLEN +
-+			     ETH_FCS_LEN);
- 		ch->dma.desc++;
- 		ch->dma.desc %= LTQ_DESC_NUM;
- 	}
-@@ -154,19 +157,20 @@ static int xrx200_close(struct net_devic
- 
- static int xrx200_alloc_skb(struct xrx200_chan *ch)
- {
-+	int len = ch->priv->net_dev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
- 	struct sk_buff *skb = ch->skb[ch->dma.desc];
- 	dma_addr_t mapping;
- 	int ret = 0;
- 
- 	ch->skb[ch->dma.desc] = netdev_alloc_skb_ip_align(ch->priv->net_dev,
--							  XRX200_DMA_DATA_LEN);
-+							  len);
- 	if (!ch->skb[ch->dma.desc]) {
- 		ret = -ENOMEM;
- 		goto skip;
- 	}
- 
- 	mapping = dma_map_single(ch->priv->dev, ch->skb[ch->dma.desc]->data,
--				 XRX200_DMA_DATA_LEN, DMA_FROM_DEVICE);
-+				 len, DMA_FROM_DEVICE);
- 	if (unlikely(dma_mapping_error(ch->priv->dev, mapping))) {
- 		dev_kfree_skb_any(ch->skb[ch->dma.desc]);
- 		ch->skb[ch->dma.desc] = skb;
-@@ -179,8 +183,7 @@ static int xrx200_alloc_skb(struct xrx20
- 	wmb();
- skip:
- 	ch->dma.desc_base[ch->dma.desc].ctl =
--		LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) |
--		XRX200_DMA_DATA_LEN;
-+		LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) | len;
- 
- 	return ret;
- }
-@@ -340,10 +343,57 @@ err_drop:
- 	return NETDEV_TX_OK;
- }
- 
-+static int
-+xrx200_change_mtu(struct net_device *net_dev, int new_mtu)
-+{
-+	struct xrx200_priv *priv = netdev_priv(net_dev);
-+	struct xrx200_chan *ch_rx = &priv->chan_rx;
-+	int old_mtu = net_dev->mtu;
-+	bool running = false;
-+	struct sk_buff *skb;
-+	int curr_desc;
-+	int ret = 0;
-+
-+	net_dev->mtu = new_mtu;
-+
-+	if (new_mtu <= old_mtu)
-+		return ret;
-+
-+	running = netif_running(net_dev);
-+	if (running) {
-+		napi_disable(&ch_rx->napi);
-+		ltq_dma_close(&ch_rx->dma);
-+	}
-+
-+	xrx200_poll_rx(&ch_rx->napi, LTQ_DESC_NUM);
-+	curr_desc = ch_rx->dma.desc;
-+
-+	for (ch_rx->dma.desc = 0; ch_rx->dma.desc < LTQ_DESC_NUM;
-+	     ch_rx->dma.desc++) {
-+		skb = ch_rx->skb[ch_rx->dma.desc];
-+		ret = xrx200_alloc_skb(ch_rx);
-+		if (ret) {
-+			net_dev->mtu = old_mtu;
-+			break;
-+		}
-+		dev_kfree_skb_any(skb);
-+	}
-+
-+	ch_rx->dma.desc = curr_desc;
-+	if (running) {
-+		napi_enable(&ch_rx->napi);
-+		ltq_dma_open(&ch_rx->dma);
-+		ltq_dma_enable_irq(&ch_rx->dma);
-+	}
-+
-+	return ret;
-+}
-+
- static const struct net_device_ops xrx200_netdev_ops = {
- 	.ndo_open		= xrx200_open,
- 	.ndo_stop		= xrx200_close,
- 	.ndo_start_xmit		= xrx200_start_xmit,
-+	.ndo_change_mtu		= xrx200_change_mtu,
- 	.ndo_set_mac_address	= eth_mac_addr,
- 	.ndo_validate_addr	= eth_validate_addr,
- };
-@@ -453,7 +503,7 @@ static int xrx200_probe(struct platform_
- 	net_dev->netdev_ops = &xrx200_netdev_ops;
- 	SET_NETDEV_DEV(net_dev, dev);
- 	net_dev->min_mtu = ETH_ZLEN;
--	net_dev->max_mtu = XRX200_DMA_DATA_LEN;
-+	net_dev->max_mtu = XRX200_DMA_DATA_LEN - VLAN_ETH_HLEN - ETH_FCS_LEN;
- 
- 	/* load the memory ranges */
- 	priv->pmac_reg = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
diff --git a/target/linux/lantiq/patches-6.1/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch b/target/linux/lantiq/patches-6.1/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch
deleted file mode 100644
index c197b1a1c9..0000000000
--- a/target/linux/lantiq/patches-6.1/0703-v5.16-net-lantiq_xrx200-increase-buffer-reservation.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 1488fc204568f707fe2a42a913788c00a95af30e Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Fri, 17 Dec 2021 01:07:40 +0100
-Subject: [PATCH] net: lantiq_xrx200: increase buffer reservation
-
-If the user sets a lower mtu on the CPU port than on the switch,
-then DMA inserts a few more bytes into the buffer than expected.
-In the worst case, it may exceed the size of the buffer. The
-experiments showed that the buffer should be a multiple of the
-burst length value. This patch rounds the length of the rx buffer
-upwards and fixes this bug. The reservation of FCS space in the
-buffer has been removed as PMAC strips the FCS.
-
-Fixes: 998ac358019e ("net: lantiq: add support for jumbo frames")
-Reported-by: Thomas Nixon <tom at tomn.co.uk>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 34 ++++++++++++++++++++--------
- 1 file changed, 24 insertions(+), 10 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -70,6 +70,8 @@ struct xrx200_priv {
- 	struct xrx200_chan chan_tx;
- 	struct xrx200_chan chan_rx;
- 
-+	u16 rx_buf_size;
-+
- 	struct net_device *net_dev;
- 	struct device *dev;
- 
-@@ -96,6 +98,16 @@ static void xrx200_pmac_mask(struct xrx2
- 	xrx200_pmac_w32(priv, val, offset);
- }
- 
-+static int xrx200_max_frame_len(int mtu)
-+{
-+	return VLAN_ETH_HLEN + mtu;
-+}
-+
-+static int xrx200_buffer_size(int mtu)
-+{
-+	return round_up(xrx200_max_frame_len(mtu), 4 * XRX200_DMA_BURST_LEN);
-+}
-+
- /* drop all the packets from the DMA ring */
- static void xrx200_flush_dma(struct xrx200_chan *ch)
- {
-@@ -108,8 +120,7 @@ static void xrx200_flush_dma(struct xrx2
- 			break;
- 
- 		desc->ctl = LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) |
--			    (ch->priv->net_dev->mtu + VLAN_ETH_HLEN +
--			     ETH_FCS_LEN);
-+			    ch->priv->rx_buf_size;
- 		ch->dma.desc++;
- 		ch->dma.desc %= LTQ_DESC_NUM;
- 	}
-@@ -157,21 +168,21 @@ static int xrx200_close(struct net_devic
- 
- static int xrx200_alloc_skb(struct xrx200_chan *ch)
- {
--	int len = ch->priv->net_dev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
- 	struct sk_buff *skb = ch->skb[ch->dma.desc];
-+	struct xrx200_priv *priv = ch->priv;
- 	dma_addr_t mapping;
- 	int ret = 0;
- 
--	ch->skb[ch->dma.desc] = netdev_alloc_skb_ip_align(ch->priv->net_dev,
--							  len);
-+	ch->skb[ch->dma.desc] = netdev_alloc_skb_ip_align(priv->net_dev,
-+							  priv->rx_buf_size);
- 	if (!ch->skb[ch->dma.desc]) {
- 		ret = -ENOMEM;
- 		goto skip;
- 	}
- 
--	mapping = dma_map_single(ch->priv->dev, ch->skb[ch->dma.desc]->data,
--				 len, DMA_FROM_DEVICE);
--	if (unlikely(dma_mapping_error(ch->priv->dev, mapping))) {
-+	mapping = dma_map_single(priv->dev, ch->skb[ch->dma.desc]->data,
-+				 priv->rx_buf_size, DMA_FROM_DEVICE);
-+	if (unlikely(dma_mapping_error(priv->dev, mapping))) {
- 		dev_kfree_skb_any(ch->skb[ch->dma.desc]);
- 		ch->skb[ch->dma.desc] = skb;
- 		ret = -ENOMEM;
-@@ -183,7 +194,7 @@ static int xrx200_alloc_skb(struct xrx20
- 	wmb();
- skip:
- 	ch->dma.desc_base[ch->dma.desc].ctl =
--		LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) | len;
-+		LTQ_DMA_OWN | LTQ_DMA_RX_OFFSET(NET_IP_ALIGN) | priv->rx_buf_size;
- 
- 	return ret;
- }
-@@ -355,6 +366,7 @@ xrx200_change_mtu(struct net_device *net
- 	int ret = 0;
- 
- 	net_dev->mtu = new_mtu;
-+	priv->rx_buf_size = xrx200_buffer_size(new_mtu);
- 
- 	if (new_mtu <= old_mtu)
- 		return ret;
-@@ -374,6 +386,7 @@ xrx200_change_mtu(struct net_device *net
- 		ret = xrx200_alloc_skb(ch_rx);
- 		if (ret) {
- 			net_dev->mtu = old_mtu;
-+			priv->rx_buf_size = xrx200_buffer_size(old_mtu);
- 			break;
- 		}
- 		dev_kfree_skb_any(skb);
-@@ -503,7 +516,8 @@ static int xrx200_probe(struct platform_
- 	net_dev->netdev_ops = &xrx200_netdev_ops;
- 	SET_NETDEV_DEV(net_dev, dev);
- 	net_dev->min_mtu = ETH_ZLEN;
--	net_dev->max_mtu = XRX200_DMA_DATA_LEN - VLAN_ETH_HLEN - ETH_FCS_LEN;
-+	net_dev->max_mtu = XRX200_DMA_DATA_LEN - xrx200_max_frame_len(0);
-+	priv->rx_buf_size = xrx200_buffer_size(ETH_DATA_LEN);
- 
- 	/* load the memory ranges */
- 	priv->pmac_reg = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
diff --git a/target/linux/lantiq/patches-6.1/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch b/target/linux/lantiq/patches-6.1/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch
deleted file mode 100644
index f2c36952fc..0000000000
--- a/target/linux/lantiq/patches-6.1/0704-v5.17-net-lantiq_xrx200-add-ingress-SG-DMA-support.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From c3e6b2c35b34214c58c1e90d65dab5f5393608e7 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Mon, 3 Jan 2022 20:43:16 +0100
-Subject: [PATCH] net: lantiq_xrx200: add ingress SG DMA support
-
-This patch adds support for scatter gather DMA. DMA in PMAC splits
-the packet into several buffers when the MTU on the CPU port is
-less than the MTU of the switch. The first buffer starts at an
-offset of NET_IP_ALIGN. In subsequent buffers, dma ignores the
-offset. Thanks to this patch, the user can still connect to the
-device in such a situation. For normal configurations, the patch
-has no effect on performance.
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_xrx200.c | 47 +++++++++++++++++++++++-----
- 1 file changed, 40 insertions(+), 7 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -26,6 +26,9 @@
- #define XRX200_DMA_RX		0
- #define XRX200_DMA_TX		1
- 
-+#define XRX200_DMA_PACKET_COMPLETE	0
-+#define XRX200_DMA_PACKET_IN_PROGRESS	1
-+
- /* cpu port mac */
- #define PMAC_RX_IPG		0x0024
- #define PMAC_RX_IPG_MASK	0xf
-@@ -61,6 +64,9 @@ struct xrx200_chan {
- 	struct ltq_dma_channel dma;
- 	struct sk_buff *skb[LTQ_DESC_NUM];
- 
-+	struct sk_buff *skb_head;
-+	struct sk_buff *skb_tail;
-+
- 	struct xrx200_priv *priv;
- };
- 
-@@ -204,7 +210,8 @@ static int xrx200_hw_receive(struct xrx2
- 	struct xrx200_priv *priv = ch->priv;
- 	struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
- 	struct sk_buff *skb = ch->skb[ch->dma.desc];
--	int len = (desc->ctl & LTQ_DMA_SIZE_MASK);
-+	u32 ctl = desc->ctl;
-+	int len = (ctl & LTQ_DMA_SIZE_MASK);
- 	struct net_device *net_dev = priv->net_dev;
- 	int ret;
- 
-@@ -220,12 +227,36 @@ static int xrx200_hw_receive(struct xrx2
- 	}
- 
- 	skb_put(skb, len);
--	skb->protocol = eth_type_trans(skb, net_dev);
--	netif_receive_skb(skb);
--	net_dev->stats.rx_packets++;
--	net_dev->stats.rx_bytes += len;
- 
--	return 0;
-+	/* add buffers to skb via skb->frag_list */
-+	if (ctl & LTQ_DMA_SOP) {
-+		ch->skb_head = skb;
-+		ch->skb_tail = skb;
-+	} else if (ch->skb_head) {
-+		if (ch->skb_head == ch->skb_tail)
-+			skb_shinfo(ch->skb_tail)->frag_list = skb;
-+		else
-+			ch->skb_tail->next = skb;
-+		ch->skb_tail = skb;
-+		skb_reserve(ch->skb_tail, -NET_IP_ALIGN);
-+		ch->skb_head->len += skb->len;
-+		ch->skb_head->data_len += skb->len;
-+		ch->skb_head->truesize += skb->truesize;
-+	}
-+
-+	if (ctl & LTQ_DMA_EOP) {
-+		ch->skb_head->protocol = eth_type_trans(ch->skb_head, net_dev);
-+		netif_receive_skb(ch->skb_head);
-+		net_dev->stats.rx_packets++;
-+		net_dev->stats.rx_bytes += ch->skb_head->len;
-+		ch->skb_head = NULL;
-+		ch->skb_tail = NULL;
-+		ret = XRX200_DMA_PACKET_COMPLETE;
-+	} else {
-+		ret = XRX200_DMA_PACKET_IN_PROGRESS;
-+	}
-+
-+	return ret;
- }
- 
- static int xrx200_poll_rx(struct napi_struct *napi, int budget)
-@@ -240,7 +271,9 @@ static int xrx200_poll_rx(struct napi_st
- 
- 		if ((desc->ctl & (LTQ_DMA_OWN | LTQ_DMA_C)) == LTQ_DMA_C) {
- 			ret = xrx200_hw_receive(ch);
--			if (ret)
-+			if (ret == XRX200_DMA_PACKET_IN_PROGRESS)
-+				continue;
-+			if (ret != XRX200_DMA_PACKET_COMPLETE)
- 				return ret;
- 			rx++;
- 		} else {
diff --git a/target/linux/lantiq/patches-6.1/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch b/target/linux/lantiq/patches-6.1/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch
deleted file mode 100644
index 22aa2eea6e..0000000000
--- a/target/linux/lantiq/patches-6.1/0706-v5.18-net-lantiq-enable-jumbo-frames-on-GSWIP.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From c40bb4fedcd6b8b6a714da5dd466eb88ed2652d1 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Wed, 9 Mar 2022 00:04:57 +0100
-Subject: net: dsa: lantiq_gswip: enable jumbo frames on GSWIP
-
-This enables non-standard MTUs on a per-port basis, with the overall
-frame size set based on the CPU port.
-
-When the MTU is not changed, this should have no effect.
-
-Long packets crash the switch with MTUs of greater than 2526, so the
-maximum is limited for now. Medium packets are sometimes dropped (e.g.
-TCP over 2477, UDP over 2516-2519, ICMP over 2526), Hence an MTU value
-of 2400 seems safe.
-
-Signed-off-by: Thomas Nixon <tom at tomn.co.uk>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Link: https://lore.kernel.org/r/20220308230457.1599237-1-olek2 at wp.pl
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/lantiq_gswip.c | 53 ++++++++++++++++++++++++++++++++++++++----
- 1 file changed, 49 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/lantiq_gswip.c
-+++ b/drivers/net/dsa/lantiq_gswip.c
-@@ -213,6 +213,7 @@
- #define  GSWIP_MAC_CTRL_0_GMII_MII	0x0001
- #define  GSWIP_MAC_CTRL_0_GMII_RGMII	0x0002
- #define GSWIP_MAC_CTRL_2p(p)		(0x905 + ((p) * 0xC))
-+#define GSWIP_MAC_CTRL_2_LCHKL		BIT(2) /* Frame Length Check Long Enable */
- #define GSWIP_MAC_CTRL_2_MLEN		BIT(3) /* Maximum Untagged Frame Lnegth */
- 
- /* Ethernet Switch Fetch DMA Port Control Register */
-@@ -239,6 +240,15 @@
- 
- #define XRX200_GPHY_FW_ALIGN	(16 * 1024)
- 
-+/* Maximum packet size supported by the switch. In theory this should be 10240,
-+ * but long packets currently cause lock-ups with an MTU of over 2526. Medium
-+ * packets are sometimes dropped (e.g. TCP over 2477, UDP over 2516-2519, ICMP
-+ * over 2526), hence an MTU value of 2400 seems safe. This issue only affects
-+ * packet reception. This is probably caused by the PPA engine, which is on the
-+ * RX part of the device. Packet transmission works properly up to 10240.
-+ */
-+#define GSWIP_MAX_PACKET_LENGTH	2400
-+
- struct gswip_hw_info {
- 	int max_ports;
- 	int cpu_port;
-@@ -846,10 +856,6 @@ static int gswip_setup(struct dsa_switch
- 	gswip_switch_mask(priv, 0, GSWIP_PCE_PCTRL_0_INGRESS,
- 			  GSWIP_PCE_PCTRL_0p(cpu_port));
- 
--	gswip_switch_mask(priv, 0, GSWIP_MAC_CTRL_2_MLEN,
--			  GSWIP_MAC_CTRL_2p(cpu_port));
--	gswip_switch_w(priv, VLAN_ETH_FRAME_LEN + 8 + ETH_FCS_LEN,
--		       GSWIP_MAC_FLEN);
- 	gswip_switch_mask(priv, 0, GSWIP_BM_QUEUE_GCTRL_GL_MOD,
- 			  GSWIP_BM_QUEUE_GCTRL);
- 
-@@ -866,6 +872,8 @@ static int gswip_setup(struct dsa_switch
- 		return err;
- 	}
- 
-+	ds->mtu_enforcement_ingress = true;
-+
- 	gswip_port_enable(ds, cpu_port, NULL);
- 
- 	ds->configure_vlan_while_not_filtering = false;
-@@ -1456,6 +1464,39 @@ static void gswip_phylink_set_capab(unsi
- 	linkmode_and(state->advertising, state->advertising, mask);
- }
- 
-+static int gswip_port_max_mtu(struct dsa_switch *ds, int port)
-+{
-+	/* Includes 8 bytes for special header. */
-+	return GSWIP_MAX_PACKET_LENGTH - VLAN_ETH_HLEN - ETH_FCS_LEN;
-+}
-+
-+static int gswip_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
-+{
-+	struct gswip_priv *priv = ds->priv;
-+	int cpu_port = priv->hw_info->cpu_port;
-+
-+	/* CPU port always has maximum mtu of user ports, so use it to set
-+	 * switch frame size, including 8 byte special header.
-+	 */
-+	if (port == cpu_port) {
-+		new_mtu += 8;
-+		gswip_switch_w(priv, VLAN_ETH_HLEN + new_mtu + ETH_FCS_LEN,
-+			       GSWIP_MAC_FLEN);
-+	}
-+
-+	/* Enable MLEN for ports with non-standard MTUs, including the special
-+	 * header on the CPU port added above.
-+	 */
-+	if (new_mtu != ETH_DATA_LEN)
-+		gswip_switch_mask(priv, 0, GSWIP_MAC_CTRL_2_MLEN,
-+				  GSWIP_MAC_CTRL_2p(port));
-+	else
-+		gswip_switch_mask(priv, GSWIP_MAC_CTRL_2_MLEN, 0,
-+				  GSWIP_MAC_CTRL_2p(port));
-+
-+	return 0;
-+}
-+
- static void gswip_xrx200_phylink_validate(struct dsa_switch *ds, int port,
- 					  unsigned long *supported,
- 					  struct phylink_link_state *state)
-@@ -1812,6 +1853,8 @@ static const struct dsa_switch_ops gswip
- 	.port_fdb_add		= gswip_port_fdb_add,
- 	.port_fdb_del		= gswip_port_fdb_del,
- 	.port_fdb_dump		= gswip_port_fdb_dump,
-+	.port_change_mtu	= gswip_port_change_mtu,
-+	.port_max_mtu		= gswip_port_max_mtu,
- 	.phylink_validate	= gswip_xrx200_phylink_validate,
- 	.phylink_mac_config	= gswip_phylink_mac_config,
- 	.phylink_mac_link_down	= gswip_phylink_mac_link_down,
-@@ -1836,6 +1879,8 @@ static const struct dsa_switch_ops gswip
- 	.port_fdb_add		= gswip_port_fdb_add,
- 	.port_fdb_del		= gswip_port_fdb_del,
- 	.port_fdb_dump		= gswip_port_fdb_dump,
-+	.port_change_mtu	= gswip_port_change_mtu,
-+	.port_max_mtu		= gswip_port_max_mtu,
- 	.phylink_validate	= gswip_xrx300_phylink_validate,
- 	.phylink_mac_config	= gswip_phylink_mac_config,
- 	.phylink_mac_link_down	= gswip_phylink_mac_link_down,
diff --git a/target/linux/lantiq/patches-6.1/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch b/target/linux/lantiq/patches-6.1/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch
deleted file mode 100644
index 818fa811e9..0000000000
--- a/target/linux/lantiq/patches-6.1/0710-v5.16-net-lantiq-configure-the-burst-length-in-ethernet-dr.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From 14d4e308e0aa0b78dc7a059716861a4380de3535 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 14 Sep 2021 23:21:02 +0200
-Subject: [PATCH 5/5] net: lantiq: configure the burst length in ethernet
- drivers
-
-Configure the burst length in Ethernet drivers. This improves
-Ethernet performance by 58%. According to the vendor BSP,
-8W burst length is supported by ar9 and newer SoCs.
-
-The NAT benchmark results on xRX200 (Down/Up):
-* 2W: 330 Mb/s
-* 4W: 432 Mb/s    372 Mb/s
-* 8W: 520 Mb/s    389 Mb/s
-
-Tested on xRX200 and xRX330.
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_etop.c   | 21 ++++++++++++++++++---
- drivers/net/ethernet/lantiq_xrx200.c | 21 ++++++++++++++++++---
- 2 files changed, 36 insertions(+), 6 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_etop.c
-+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -148,6 +148,9 @@ struct ltq_etop_priv {
- 	struct ltq_etop_chan txch;
- 	struct ltq_etop_chan rxch;
- 
-+	int tx_burst_len;
-+	int rx_burst_len;
-+
- 	int tx_irq;
- 	int rx_irq;
- 
-@@ -399,7 +402,7 @@ ltq_etop_dma_init(struct net_device *dev
- 	int rx = priv->rx_irq - LTQ_DMA_ETOP;
- 	int err;
- 
--	ltq_dma_init_port(DMA_PORT_ETOP);
-+	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
- 
- 	priv->txch.dma.nr = tx;
- 	priv->txch.dma.dev = &priv->pdev->dev;
-@@ -676,8 +679,8 @@ ltq_etop_tx(struct sk_buff *skb, struct
- 		return NETDEV_TX_BUSY;
- 	}
- 
--	/* dma needs to start on a 16 byte aligned address */
--	byte_offset = CPHYSADDR(skb->data) % 16;
-+	/* dma needs to start on a burst length value aligned address */
-+	byte_offset = CPHYSADDR(skb->data) % (priv->tx_burst_len * 4);
- 	priv->txch.skb[priv->txch.dma.desc] = skb;
- 
- 	netif_trans_update(dev);
-@@ -925,6 +928,18 @@ static int ltq_etop_probe(struct platfor
- 	spin_lock_init(&priv->lock);
- 	SET_NETDEV_DEV(dev, &pdev->dev);
- 
-+	err = device_property_read_u32(&pdev->dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
-+	if (err < 0) {
-+		dev_err(&pdev->dev, "unable to read tx-burst-length property\n");
-+		return err;
-+	}
-+
-+	err = device_property_read_u32(&pdev->dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
-+	if (err < 0) {
-+		dev_err(&pdev->dev, "unable to read rx-burst-length property\n");
-+		return err;
-+	}
-+
- 	netif_napi_add(dev, &priv->txch.napi, ltq_etop_poll_tx, 8);
- 	netif_napi_add(dev, &priv->rxch.napi, ltq_etop_poll_rx, 32);
- 	priv->txch.netdev = dev;
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -81,6 +81,9 @@ struct xrx200_priv {
- 	struct net_device *net_dev;
- 	struct device *dev;
- 
-+	int tx_burst_len;
-+	int rx_burst_len;
-+
- 	__iomem void *pmac_reg;
- };
- 
-@@ -363,8 +366,8 @@ static netdev_tx_t xrx200_start_xmit(str
- 	if (unlikely(dma_mapping_error(priv->dev, mapping)))
- 		goto err_drop;
- 
--	/* dma needs to start on a 16 byte aligned address */
--	byte_offset = mapping % 16;
-+	/* dma needs to start on a burst length value aligned address */
-+	byte_offset = mapping % (priv->tx_burst_len * 4);
- 
- 	desc->addr = mapping - byte_offset;
- 	/* Make sure the address is written before we give it to HW */
-@@ -465,7 +468,7 @@ static int xrx200_dma_init(struct xrx200
- 	int ret = 0;
- 	int i;
- 
--	ltq_dma_init_port(DMA_PORT_ETOP);
-+	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
- 
- 	ch_rx->dma.nr = XRX200_DMA_RX;
- 	ch_rx->dma.dev = priv->dev;
-@@ -575,6 +578,18 @@ static int xrx200_probe(struct platform_
- 	if (err)
- 		eth_hw_addr_random(net_dev);
- 
-+	err = device_property_read_u32(dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
-+	if (err < 0) {
-+		dev_err(dev, "unable to read tx-burst-length property\n");
-+		return err;
-+	}
-+
-+	err = device_property_read_u32(dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
-+	if (err < 0) {
-+		dev_err(dev, "unable to read rx-burst-length property\n");
-+		return err;
-+	}
-+
- 	/* bring up the dma engine and IP core */
- 	err = xrx200_dma_init(priv);
- 	if (err)
diff --git a/target/linux/lantiq/patches-6.1/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch b/target/linux/lantiq/patches-6.1/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
deleted file mode 100644
index e002f81d5a..0000000000
--- a/target/linux/lantiq/patches-6.1/0711-v5.16-net-lantiq_xrx200-Hardcode-the-burst-length-value.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 7e553c44f09a8f536090904c6db5b8c9dbafa03b Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 26 Oct 2021 22:59:01 +0200
-Subject: [PATCH] net: lantiq_xrx200: Hardcode the burst length value
-
-All SoCs with this IP core support 8 burst length. Hauke
-suggested to hardcode this value and simplify the driver.
-
-Link: https://lkml.org/lkml/2021/9/14/1533
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_xrx200.c | 21 ++++-----------------
- 1 file changed, 4 insertions(+), 17 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -25,6 +25,7 @@
- #define XRX200_DMA_DATA_LEN	(SZ_64K - 1)
- #define XRX200_DMA_RX		0
- #define XRX200_DMA_TX		1
-+#define XRX200_DMA_BURST_LEN	8
- 
- #define XRX200_DMA_PACKET_COMPLETE	0
- #define XRX200_DMA_PACKET_IN_PROGRESS	1
-@@ -81,9 +82,6 @@ struct xrx200_priv {
- 	struct net_device *net_dev;
- 	struct device *dev;
- 
--	int tx_burst_len;
--	int rx_burst_len;
--
- 	__iomem void *pmac_reg;
- };
- 
-@@ -367,7 +365,7 @@ static netdev_tx_t xrx200_start_xmit(str
- 		goto err_drop;
- 
- 	/* dma needs to start on a burst length value aligned address */
--	byte_offset = mapping % (priv->tx_burst_len * 4);
-+	byte_offset = mapping % (XRX200_DMA_BURST_LEN * 4);
- 
- 	desc->addr = mapping - byte_offset;
- 	/* Make sure the address is written before we give it to HW */
-@@ -468,7 +466,8 @@ static int xrx200_dma_init(struct xrx200
- 	int ret = 0;
- 	int i;
- 
--	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
-+	ltq_dma_init_port(DMA_PORT_ETOP, XRX200_DMA_BURST_LEN,
-+			  XRX200_DMA_BURST_LEN);
- 
- 	ch_rx->dma.nr = XRX200_DMA_RX;
- 	ch_rx->dma.dev = priv->dev;
-@@ -578,18 +577,6 @@ static int xrx200_probe(struct platform_
- 	if (err)
- 		eth_hw_addr_random(net_dev);
- 
--	err = device_property_read_u32(dev, "lantiq,tx-burst-length", &priv->tx_burst_len);
--	if (err < 0) {
--		dev_err(dev, "unable to read tx-burst-length property\n");
--		return err;
--	}
--
--	err = device_property_read_u32(dev, "lantiq,rx-burst-length", &priv->rx_burst_len);
--	if (err < 0) {
--		dev_err(dev, "unable to read rx-burst-length property\n");
--		return err;
--	}
--
- 	/* bring up the dma engine and IP core */
- 	err = xrx200_dma_init(priv);
- 	if (err)
diff --git a/target/linux/lantiq/patches-6.1/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch b/target/linux/lantiq/patches-6.1/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
deleted file mode 100644
index 06f4bc2eee..0000000000
--- a/target/linux/lantiq/patches-6.1/0712-v5.16-net-ethernet-lantiq_etop-Fix-compilation-error.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 68eabc348148ae051631e8dab13c3b1a85c82896 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 9 Nov 2021 23:23:54 +0100
-Subject: [PATCH] net: ethernet: lantiq_etop: Fix compilation error
-
-This fixes the error detected when compiling the driver.
-
-Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
-Reported-by: kernel test robot <lkp at intel.com>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_etop.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/lantiq_etop.c
-+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -402,7 +402,7 @@ ltq_etop_dma_init(struct net_device *dev
- 	int rx = priv->rx_irq - LTQ_DMA_ETOP;
- 	int err;
- 
--	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, rx_burst_len);
-+	ltq_dma_init_port(DMA_PORT_ETOP, priv->tx_burst_len, priv->rx_burst_len);
- 
- 	priv->txch.dma.nr = tx;
- 	priv->txch.dma.dev = &priv->pdev->dev;
diff --git a/target/linux/lantiq/patches-6.1/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch b/target/linux/lantiq/patches-6.1/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch
deleted file mode 100644
index 37ed1d4f31..0000000000
--- a/target/linux/lantiq/patches-6.1/0713-v5.17-MIPS-lantiq-dma-increase-descritor-count.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 5112e9234bbb89f8dd15c983206bd9107b8436d5 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 4 Jan 2022 16:11:42 +0100
-Subject: [PATCH 713/715] MIPS: lantiq: dma: increase descritor count
-
-NAT Performance results on BT Home Hub 5A (kernel 5.10.89, mtu 1500):
-
-	Down		Up
-Before	539 Mbps	599 Mbps
-After	545 Mbps	625 Mbps
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- arch/mips/include/asm/mach-lantiq/xway/xway_dma.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h
-+++ b/arch/mips/include/asm/mach-lantiq/xway/xway_dma.h
-@@ -8,7 +8,7 @@
- #define LTQ_DMA_H__
- 
- #define LTQ_DESC_SIZE		0x08	/* each descriptor is 64bit */
--#define LTQ_DESC_NUM		0x40	/* 64 descriptors / channel */
-+#define LTQ_DESC_NUM		0xC0	/* 192 descriptors / channel */
- 
- #define LTQ_DMA_OWN		BIT(31) /* owner bit */
- #define LTQ_DMA_C		BIT(30) /* complete bit */
diff --git a/target/linux/lantiq/patches-6.1/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch b/target/linux/lantiq/patches-6.1/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch
deleted file mode 100644
index 10791f9d53..0000000000
--- a/target/linux/lantiq/patches-6.1/0714-v5.17-net-lantiq_xrx200-increase-napi-poll-weigth.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 768818d772d5d4ddc0c7eb2e62848929270ab7a3 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 4 Jan 2022 16:11:43 +0100
-Subject: [PATCH 714/715] net: lantiq_xrx200: increase napi poll weigth
-
-NAT Performance results on BT Home Hub 5A (kernel 5.10.89, mtu 1500):
-
-	Down		Up
-Before	545 Mbps	625 Mbps
-After	577 Mbps	648 Mbps
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -597,8 +597,10 @@ static int xrx200_probe(struct platform_
- 			 PMAC_HD_CTL);
- 
- 	/* setup NAPI */
--	netif_napi_add(net_dev, &priv->chan_rx.napi, xrx200_poll_rx, 32);
--	netif_tx_napi_add(net_dev, &priv->chan_tx.napi, xrx200_tx_housekeeping, 32);
-+	netif_napi_add(net_dev, &priv->chan_rx.napi, xrx200_poll_rx,
-+		       NAPI_POLL_WEIGHT);
-+	netif_tx_napi_add(net_dev, &priv->chan_tx.napi, xrx200_tx_housekeeping,
-+			  NAPI_POLL_WEIGHT);
- 
- 	platform_set_drvdata(pdev, priv);
- 
diff --git a/target/linux/lantiq/patches-6.1/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch b/target/linux/lantiq/patches-6.1/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch
deleted file mode 100644
index 6613d0bbd7..0000000000
--- a/target/linux/lantiq/patches-6.1/0715-v5.17-net-lantiq_xrx200-convert-to-build_skb.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From e015593573b3e3f74bd8a63c05fa92902194a354 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Tue, 4 Jan 2022 16:11:44 +0100
-Subject: [PATCH 715/715] net: lantiq_xrx200: convert to build_skb
-
-We can increase the efficiency of rx path by using buffers to receive
-packets then build SKBs around them just before passing into the network
-stack. In contrast, preallocating SKBs too early reduces CPU cache
-efficiency.
-
-NAT Performance results on BT Home Hub 5A (kernel 5.10.89, mtu 1500):
-
-	Down		Up
-Before	577 Mbps	648 Mbps
-After	624 Mbps	695 Mbps
-
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 56 ++++++++++++++++++----------
- 1 file changed, 36 insertions(+), 20 deletions(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -63,7 +63,11 @@ struct xrx200_chan {
- 
- 	struct napi_struct napi;
- 	struct ltq_dma_channel dma;
--	struct sk_buff *skb[LTQ_DESC_NUM];
-+
-+	union {
-+		struct sk_buff *skb[LTQ_DESC_NUM];
-+		void *rx_buff[LTQ_DESC_NUM];
-+	};
- 
- 	struct sk_buff *skb_head;
- 	struct sk_buff *skb_tail;
-@@ -78,6 +82,7 @@ struct xrx200_priv {
- 	struct xrx200_chan chan_rx;
- 
- 	u16 rx_buf_size;
-+	u16 rx_skb_size;
- 
- 	struct net_device *net_dev;
- 	struct device *dev;
-@@ -115,6 +120,12 @@ static int xrx200_buffer_size(int mtu)
- 	return round_up(xrx200_max_frame_len(mtu), 4 * XRX200_DMA_BURST_LEN);
- }
- 
-+static int xrx200_skb_size(u16 buf_size)
-+{
-+	return SKB_DATA_ALIGN(buf_size + NET_SKB_PAD + NET_IP_ALIGN) +
-+		SKB_DATA_ALIGN(sizeof(struct skb_shared_info));
-+}
-+
- /* drop all the packets from the DMA ring */
- static void xrx200_flush_dma(struct xrx200_chan *ch)
- {
-@@ -173,30 +184,29 @@ static int xrx200_close(struct net_devic
- 	return 0;
- }
- 
--static int xrx200_alloc_skb(struct xrx200_chan *ch)
-+static int xrx200_alloc_buf(struct xrx200_chan *ch, void *(*alloc)(unsigned int size))
- {
--	struct sk_buff *skb = ch->skb[ch->dma.desc];
-+	void *buf = ch->rx_buff[ch->dma.desc];
- 	struct xrx200_priv *priv = ch->priv;
- 	dma_addr_t mapping;
- 	int ret = 0;
- 
--	ch->skb[ch->dma.desc] = netdev_alloc_skb_ip_align(priv->net_dev,
--							  priv->rx_buf_size);
--	if (!ch->skb[ch->dma.desc]) {
-+	ch->rx_buff[ch->dma.desc] = alloc(priv->rx_skb_size);
-+	if (!ch->rx_buff[ch->dma.desc]) {
- 		ret = -ENOMEM;
- 		goto skip;
- 	}
- 
--	mapping = dma_map_single(priv->dev, ch->skb[ch->dma.desc]->data,
-+	mapping = dma_map_single(priv->dev, ch->rx_buff[ch->dma.desc],
- 				 priv->rx_buf_size, DMA_FROM_DEVICE);
- 	if (unlikely(dma_mapping_error(priv->dev, mapping))) {
--		dev_kfree_skb_any(ch->skb[ch->dma.desc]);
--		ch->skb[ch->dma.desc] = skb;
-+		skb_free_frag(ch->rx_buff[ch->dma.desc]);
-+		ch->rx_buff[ch->dma.desc] = buf;
- 		ret = -ENOMEM;
- 		goto skip;
- 	}
- 
--	ch->dma.desc_base[ch->dma.desc].addr = mapping;
-+	ch->dma.desc_base[ch->dma.desc].addr = mapping + NET_SKB_PAD + NET_IP_ALIGN;
- 	/* Make sure the address is written before we give it to HW */
- 	wmb();
- skip:
-@@ -210,13 +220,14 @@ static int xrx200_hw_receive(struct xrx2
- {
- 	struct xrx200_priv *priv = ch->priv;
- 	struct ltq_dma_desc *desc = &ch->dma.desc_base[ch->dma.desc];
--	struct sk_buff *skb = ch->skb[ch->dma.desc];
-+	void *buf = ch->rx_buff[ch->dma.desc];
- 	u32 ctl = desc->ctl;
- 	int len = (ctl & LTQ_DMA_SIZE_MASK);
- 	struct net_device *net_dev = priv->net_dev;
-+	struct sk_buff *skb;
- 	int ret;
- 
--	ret = xrx200_alloc_skb(ch);
-+	ret = xrx200_alloc_buf(ch, napi_alloc_frag);
- 
- 	ch->dma.desc++;
- 	ch->dma.desc %= LTQ_DESC_NUM;
-@@ -227,19 +238,21 @@ static int xrx200_hw_receive(struct xrx2
- 		return ret;
- 	}
- 
-+	skb = build_skb(buf, priv->rx_skb_size);
-+	skb_reserve(skb, NET_SKB_PAD);
- 	skb_put(skb, len);
- 
- 	/* add buffers to skb via skb->frag_list */
- 	if (ctl & LTQ_DMA_SOP) {
- 		ch->skb_head = skb;
- 		ch->skb_tail = skb;
-+		skb_reserve(skb, NET_IP_ALIGN);
- 	} else if (ch->skb_head) {
- 		if (ch->skb_head == ch->skb_tail)
- 			skb_shinfo(ch->skb_tail)->frag_list = skb;
- 		else
- 			ch->skb_tail->next = skb;
- 		ch->skb_tail = skb;
--		skb_reserve(ch->skb_tail, -NET_IP_ALIGN);
- 		ch->skb_head->len += skb->len;
- 		ch->skb_head->data_len += skb->len;
- 		ch->skb_head->truesize += skb->truesize;
-@@ -395,12 +408,13 @@ xrx200_change_mtu(struct net_device *net
- 	struct xrx200_chan *ch_rx = &priv->chan_rx;
- 	int old_mtu = net_dev->mtu;
- 	bool running = false;
--	struct sk_buff *skb;
-+	void *buff;
- 	int curr_desc;
- 	int ret = 0;
- 
- 	net_dev->mtu = new_mtu;
- 	priv->rx_buf_size = xrx200_buffer_size(new_mtu);
-+	priv->rx_skb_size = xrx200_skb_size(priv->rx_buf_size);
- 
- 	if (new_mtu <= old_mtu)
- 		return ret;
-@@ -416,14 +430,15 @@ xrx200_change_mtu(struct net_device *net
- 
- 	for (ch_rx->dma.desc = 0; ch_rx->dma.desc < LTQ_DESC_NUM;
- 	     ch_rx->dma.desc++) {
--		skb = ch_rx->skb[ch_rx->dma.desc];
--		ret = xrx200_alloc_skb(ch_rx);
-+		buff = ch_rx->rx_buff[ch_rx->dma.desc];
-+		ret = xrx200_alloc_buf(ch_rx, netdev_alloc_frag);
- 		if (ret) {
- 			net_dev->mtu = old_mtu;
- 			priv->rx_buf_size = xrx200_buffer_size(old_mtu);
-+			priv->rx_skb_size = xrx200_skb_size(priv->rx_buf_size);
- 			break;
- 		}
--		dev_kfree_skb_any(skb);
-+		skb_free_frag(buff);
- 	}
- 
- 	ch_rx->dma.desc = curr_desc;
-@@ -476,7 +491,7 @@ static int xrx200_dma_init(struct xrx200
- 	ltq_dma_alloc_rx(&ch_rx->dma);
- 	for (ch_rx->dma.desc = 0; ch_rx->dma.desc < LTQ_DESC_NUM;
- 	     ch_rx->dma.desc++) {
--		ret = xrx200_alloc_skb(ch_rx);
-+		ret = xrx200_alloc_buf(ch_rx, netdev_alloc_frag);
- 		if (ret)
- 			goto rx_free;
- 	}
-@@ -511,7 +526,7 @@ rx_ring_free:
- 	/* free the allocated RX ring */
- 	for (i = 0; i < LTQ_DESC_NUM; i++) {
- 		if (priv->chan_rx.skb[i])
--			dev_kfree_skb_any(priv->chan_rx.skb[i]);
-+			skb_free_frag(priv->chan_rx.rx_buff[i]);
- 	}
- 
- rx_free:
-@@ -528,7 +543,7 @@ static void xrx200_hw_cleanup(struct xrx
- 
- 	/* free the allocated RX ring */
- 	for (i = 0; i < LTQ_DESC_NUM; i++)
--		dev_kfree_skb_any(priv->chan_rx.skb[i]);
-+		skb_free_frag(priv->chan_rx.rx_buff[i]);
- }
- 
- static int xrx200_probe(struct platform_device *pdev)
-@@ -553,6 +568,7 @@ static int xrx200_probe(struct platform_
- 	net_dev->min_mtu = ETH_ZLEN;
- 	net_dev->max_mtu = XRX200_DMA_DATA_LEN - xrx200_max_frame_len(0);
- 	priv->rx_buf_size = xrx200_buffer_size(ETH_DATA_LEN);
-+	priv->rx_skb_size = xrx200_skb_size(priv->rx_buf_size);
- 
- 	/* load the memory ranges */
- 	priv->pmac_reg = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
diff --git a/target/linux/lantiq/patches-6.1/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch b/target/linux/lantiq/patches-6.1/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch
deleted file mode 100644
index 090b7e3111..0000000000
--- a/target/linux/lantiq/patches-6.1/0716-v5.17-net-lantiq_xrx200-fix-use-after-free-bug.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From dd830aed23c6e07cd8e2a163742bf3d63c9add08 Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Sat, 5 Mar 2022 12:20:39 +0100
-Subject: net: lantiq_xrx200: fix use after free bug
-
-The skb->len field is read after the packet is sent to the network
-stack. In the meantime, skb can be freed. This patch fixes this bug.
-
-Fixes: c3e6b2c35b34 ("net: lantiq_xrx200: add ingress SG DMA support")
-Reported-by: Eric Dumazet <eric.dumazet at gmail.com>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Acked-by: Hauke Mehrtens <hauke at hauke-m.de>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/ethernet/lantiq_xrx200.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -260,9 +260,9 @@ static int xrx200_hw_receive(struct xrx2
- 
- 	if (ctl & LTQ_DMA_EOP) {
- 		ch->skb_head->protocol = eth_type_trans(ch->skb_head, net_dev);
--		netif_receive_skb(ch->skb_head);
- 		net_dev->stats.rx_packets++;
- 		net_dev->stats.rx_bytes += ch->skb_head->len;
-+		netif_receive_skb(ch->skb_head);
- 		ch->skb_head = NULL;
- 		ch->skb_tail = NULL;
- 		ret = XRX200_DMA_PACKET_COMPLETE;
diff --git a/target/linux/lantiq/patches-6.1/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch b/target/linux/lantiq/patches-6.1/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch
deleted file mode 100644
index 9eaec58033..0000000000
--- a/target/linux/lantiq/patches-6.1/0717-v6.0-net-lantiq_xrx200-confirm-skb-is-allocated-before-us.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From c8b043702dc0894c07721c5b019096cebc8c798f Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Wed, 24 Aug 2022 23:54:06 +0200
-Subject: [PATCH] net: lantiq_xrx200: confirm skb is allocated before using
-
-xrx200_hw_receive() assumes build_skb() always works and goes straight
-to skb_reserve(). However, build_skb() can fail under memory pressure.
-
-Add a check in case build_skb() failed to allocate and return NULL.
-
-Fixes: e015593573b3 ("net: lantiq_xrx200: convert to build_skb")
-Reported-by: Eric Dumazet <edumazet at google.com>
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -239,6 +239,12 @@ static int xrx200_hw_receive(struct xrx2
- 	}
- 
- 	skb = build_skb(buf, priv->rx_skb_size);
-+	if (!skb) {
-+		skb_free_frag(buf);
-+		net_dev->stats.rx_dropped++;
-+		return -ENOMEM;
-+	}
-+
- 	skb_reserve(skb, NET_SKB_PAD);
- 	skb_put(skb, len);
- 
diff --git a/target/linux/lantiq/patches-6.1/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch b/target/linux/lantiq/patches-6.1/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
deleted file mode 100644
index 929ae57ace..0000000000
--- a/target/linux/lantiq/patches-6.1/0718-v6.0-net-lantiq_xrx200-fix-lock-under-memory-pressure.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From c4b6e9341f930e4dd089231c0414758f5f1f9dbd Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Wed, 24 Aug 2022 23:54:07 +0200
-Subject: [PATCH] net: lantiq_xrx200: fix lock under memory pressure
-
-When the xrx200_hw_receive() function returns -ENOMEM, the NAPI poll
-function immediately returns an error.
-This is incorrect for two reasons:
-* the function terminates without enabling interrupts or scheduling NAPI,
-* the error code (-ENOMEM) is returned instead of the number of received
-packets.
-
-After the first memory allocation failure occurs, packet reception is
-locked due to disabled interrupts from DMA..
-
-Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver")
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -294,7 +294,7 @@ static int xrx200_poll_rx(struct napi_st
- 			if (ret == XRX200_DMA_PACKET_IN_PROGRESS)
- 				continue;
- 			if (ret != XRX200_DMA_PACKET_COMPLETE)
--				return ret;
-+				break;
- 			rx++;
- 		} else {
- 			break;
diff --git a/target/linux/lantiq/patches-6.1/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch b/target/linux/lantiq/patches-6.1/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch
deleted file mode 100644
index 182da58ed9..0000000000
--- a/target/linux/lantiq/patches-6.1/0719-v6.0-net-lantiq_xrx200-restore-buffer-if-memory-allocatio.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From c9c3b1775f80fa21f5bff874027d2ccb10f5d90c Mon Sep 17 00:00:00 2001
-From: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Date: Wed, 24 Aug 2022 23:54:08 +0200
-Subject: [PATCH] net: lantiq_xrx200: restore buffer if memory allocation
- failed
-
-In a situation where memory allocation fails, an invalid buffer address
-is stored. When this descriptor is used again, the system panics in the
-build_skb() function when accessing memory.
-
-Fixes: 7ea6cd16f159 ("lantiq: net: fix duplicated skb in rx descriptor ring")
-Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/lantiq_xrx200.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/net/ethernet/lantiq_xrx200.c
-+++ b/drivers/net/ethernet/lantiq_xrx200.c
-@@ -193,6 +193,7 @@ static int xrx200_alloc_buf(struct xrx20
- 
- 	ch->rx_buff[ch->dma.desc] = alloc(priv->rx_skb_size);
- 	if (!ch->rx_buff[ch->dma.desc]) {
-+		ch->rx_buff[ch->dma.desc] = buf;
- 		ret = -ENOMEM;
- 		goto skip;
- 	}
diff --git a/target/linux/lantiq/xrx200/config-6.1 b/target/linux/lantiq/xrx200/config-6.1
index 1b87ad65f0..dc41fe0ca8 100644
--- a/target/linux/lantiq/xrx200/config-6.1
+++ b/target/linux/lantiq/xrx200/config-6.1
@@ -1,5 +1,7 @@
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_RMAP=y
@@ -11,6 +13,7 @@ CONFIG_CRYPTO_ZSTD=y
 CONFIG_EXTRA_FIRMWARE="lantiq/xrx200_phy11g_a14.bin lantiq/xrx200_phy11g_a22.bin lantiq/xrx200_phy22f_a14.bin lantiq/xrx200_phy22f_a22.bin"
 CONFIG_EXTRA_FIRMWARE_DIR="firmware"
 CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_GRO_CELLS=y
 CONFIG_HWMON=y
 CONFIG_HW_RANDOM=y
@@ -63,6 +66,7 @@ CONFIG_PHY_LANTIQ_VRX200_PCIE=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_POWER_SUPPLY_HWMON=y
+CONFIG_QCOM_NET_PHYLIB=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_REGULATOR=y
@@ -87,5 +91,6 @@ CONFIG_XPS=y
 CONFIG_XXHASH=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
 CONFIG_ZSTD_COMPRESS=y
 CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/lantiq/xway/config-6.1 b/target/linux/lantiq/xway/config-6.1
index 696ce77860..1fc821575e 100644
--- a/target/linux/lantiq/xway/config-6.1
+++ b/target/linux/lantiq/xway/config-6.1
@@ -2,6 +2,8 @@ CONFIG_ADM6996_PHY=y
 CONFIG_AR8216_PHY=y
 CONFIG_AT803X_PHY=y
 CONFIG_BLK_MQ_PCI=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
 CONFIG_CPU_RMAP=y
@@ -12,6 +14,7 @@ CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_HW_RANDOM=y
 CONFIG_INPUT=y
 CONFIG_INPUT_EVDEV=y
@@ -43,6 +46,7 @@ CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_LANTIQ=y
 CONFIG_PSB6970_PHY=y
+CONFIG_QCOM_NET_PHYLIB=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_REGULATOR=y
@@ -72,5 +76,6 @@ CONFIG_XPS=y
 CONFIG_XXHASH=y
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
 CONFIG_ZSTD_COMPRESS=y
 CONFIG_ZSTD_DECOMPRESS=y



From lede-commits at lists.infradead.org  Wed May 15 01:21:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:09 -0400
Subject: [openwrt/openwrt]  lantiq: Add some gswip patches
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36173.1715761282.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/783c3aace252b5eb596fad15ca91d6aa25a3fbe1

commit 783c3aace252b5eb596fad15ca91d6aa25a3fbe1
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Fri Jun 9 23:27:29 2023 +0200

    lantiq: Add some gswip patches
    
    This backports some patches for the gswip switch driver.
    
    I copied them from this repository:
    https://github.com/xdarklight/linux/commits/lantiq-gswip-integration-20221022
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    [drop some patches which may break functionality at the moment]
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 ...-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch |  32 +++++
 ...tiq_gswip-Only-allow-phy-mode-internal-on.patch |  33 +++++
 ...tiq_gswip-Use-dev_err_probe-where-appropr.patch | 145 +++++++++++++++++++++
 ...tiq_gswip-Don-t-manually-call-gswip_port_.patch |  25 ++++
 ...tiq_gswip-do-also-enable-or-disable-cpu-p.patch |  70 ++++++++++
 ...tiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch |  30 +++++
 ...lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch |  24 ++++
 ...tiq_gswip-Consistently-use-macros-for-the.patch |  47 +++++++
 ...tiq_gswip-Forbid-gswip_add_single_port_br.patch |  26 ++++
 ...tiq_gswip-Fix-error-message-in-gswip_add_.patch |  26 ++++
 ...tiq_gswip-Fix-comments-in-gswip_port_vlan.patch |  36 +++++
 ...tiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch |  33 +++++
 ...tiq_gswip-Improve-error-message-in-gswip_.patch |  26 ++++
 ...-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch |  32 +++++
 ...tiq_gswip-Only-allow-phy-mode-internal-on.patch |  33 +++++
 ...tiq_gswip-Use-dev_err_probe-where-appropr.patch | 145 +++++++++++++++++++++
 ...tiq_gswip-Don-t-manually-call-gswip_port_.patch |  25 ++++
 ...tiq_gswip-do-also-enable-or-disable-cpu-p.patch |  70 ++++++++++
 ...tiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch |  30 +++++
 ...lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch |  24 ++++
 ...tiq_gswip-Consistently-use-macros-for-the.patch |  47 +++++++
 ...tiq_gswip-Forbid-gswip_add_single_port_br.patch |  26 ++++
 ...tiq_gswip-Fix-error-message-in-gswip_add_.patch |  26 ++++
 ...tiq_gswip-Fix-comments-in-gswip_port_vlan.patch |  36 +++++
 ...tiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch |  33 +++++
 ...tiq_gswip-Improve-error-message-in-gswip_.patch |  26 ++++
 26 files changed, 1106 insertions(+)

diff --git a/target/linux/lantiq/patches-5.15/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch b/target/linux/lantiq/patches-5.15/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch
new file mode 100644
index 0000000000..c6befe05e5
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch
@@ -0,0 +1,32 @@
+From 82ea7c7fb4e90620beba8b6436fc12df2379ef8d Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 10 Oct 2022 16:52:25 +0200
+Subject: [PATCH 731/768] dt-bindings: net: dsa: lantiq_gswip: Add missing
+ phy-mode and fixed-link
+
+The CPU port has to specify a phy-mode and either a phy or a fixed-link.
+Since GSWIP is connected using a SoC internal protocol there's no PHY
+involved. Add phy-mode = "internal" and a fixed-link to describe the
+communication between the PMAC (Ethernet controller) and GSWIP switch.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
++++ b/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
+@@ -97,7 +97,13 @@ switch at e108000 {
+ 		port at 6 {
+ 			reg = <0x6>;
+ 			label = "cpu";
++			phy-mode = "internal";
+ 			ethernet = <&eth0>;
++
++			fixed-link {
++				speed = <1000>;
++				full-duplex;
++			};
+ 		};
+ 	};
+ 
diff --git a/target/linux/lantiq/patches-5.15/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch b/target/linux/lantiq/patches-5.15/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch
new file mode 100644
index 0000000000..cc94a41cf3
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch
@@ -0,0 +1,33 @@
+From a55b9d802e11baceb35bd312419ad82086065b08 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 10 Oct 2022 16:59:35 +0200
+Subject: [PATCH 732/768] net: dsa: lantiq_gswip: Only allow phy-mode =
+ "internal" on the CPU port
+
+Add the CPU port to gswip_xrx200_phylink_get_caps() and
+gswip_xrx300_phylink_get_caps(). It connects through a SoC-internal bus,
+so the only allowed phy-mode is PHY_INTERFACE_MODE_INTERNAL.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1513,6 +1513,7 @@ static void gswip_xrx200_phylink_validat
+ 	case 2:
+ 	case 3:
+ 	case 4:
++	case 6:
+ 		if (state->interface != PHY_INTERFACE_MODE_INTERNAL)
+ 			goto unsupported;
+ 		break;
+@@ -1552,6 +1553,7 @@ static void gswip_xrx300_phylink_validat
+ 	case 2:
+ 	case 3:
+ 	case 4:
++	case 6:
+ 		if (state->interface != PHY_INTERFACE_MODE_INTERNAL)
+ 			goto unsupported;
+ 		break;
diff --git a/target/linux/lantiq/patches-5.15/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch b/target/linux/lantiq/patches-5.15/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch
new file mode 100644
index 0000000000..b1658e15d8
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch
@@ -0,0 +1,145 @@
+From 4d3dd68a1c56674ff666d0622b545992fac31754 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Sun, 31 Jul 2022 22:54:52 +0200
+Subject: [PATCH 733/768] net: dsa: lantiq_gswip: Use dev_err_probe where
+ appropriate
+
+dev_err_probe() can be used to simplify the existing code. Also it means
+we get rid of the following warning which is seen whenever the PMAC
+(Ethernet controller which connects to GSWIP's CPU port) has not been
+probed yet:
+  gswip 1e108000.switch: dsa switch register failed: -517
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 53 ++++++++++++++++------------------
+ 1 file changed, 25 insertions(+), 28 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1939,11 +1939,9 @@ static int gswip_gphy_fw_load(struct gsw
+ 	msleep(200);
+ 
+ 	ret = request_firmware(&fw, gphy_fw->fw_name, dev);
+-	if (ret) {
+-		dev_err(dev, "failed to load firmware: %s, error: %i\n",
+-			gphy_fw->fw_name, ret);
+-		return ret;
+-	}
++	if (ret)
++		return dev_err_probe(dev, ret, "failed to load firmware: %s\n",
++				     gphy_fw->fw_name);
+ 
+ 	/* GPHY cores need the firmware code in a persistent and contiguous
+ 	 * memory area with a 16 kB boundary aligned start address.
+@@ -1956,9 +1954,9 @@ static int gswip_gphy_fw_load(struct gsw
+ 		dev_addr = ALIGN(dma_addr, XRX200_GPHY_FW_ALIGN);
+ 		memcpy(fw_addr, fw->data, fw->size);
+ 	} else {
+-		dev_err(dev, "failed to alloc firmware memory\n");
+ 		release_firmware(fw);
+-		return -ENOMEM;
++		return dev_err_probe(dev, -ENOMEM,
++				     "failed to alloc firmware memory\n");
+ 	}
+ 
+ 	release_firmware(fw);
+@@ -1985,8 +1983,8 @@ static int gswip_gphy_fw_probe(struct gs
+ 
+ 	gphy_fw->clk_gate = devm_clk_get(dev, gphyname);
+ 	if (IS_ERR(gphy_fw->clk_gate)) {
+-		dev_err(dev, "Failed to lookup gate clock\n");
+-		return PTR_ERR(gphy_fw->clk_gate);
++		return dev_err_probe(dev, PTR_ERR(gphy_fw->clk_gate),
++				     "Failed to lookup gate clock\n");
+ 	}
+ 
+ 	ret = of_property_read_u32(gphy_fw_np, "reg", &gphy_fw->fw_addr_offset);
+@@ -2006,8 +2004,8 @@ static int gswip_gphy_fw_probe(struct gs
+ 		gphy_fw->fw_name = priv->gphy_fw_name_cfg->ge_firmware_name;
+ 		break;
+ 	default:
+-		dev_err(dev, "Unknown GPHY mode %d\n", gphy_mode);
+-		return -EINVAL;
++		return dev_err_probe(dev, -EINVAL, "Unknown GPHY mode %d\n",
++				     gphy_mode);
+ 	}
+ 
+ 	gphy_fw->reset = of_reset_control_array_get_exclusive(gphy_fw_np);
+@@ -2060,8 +2058,9 @@ static int gswip_gphy_fw_list(struct gsw
+ 			priv->gphy_fw_name_cfg = &xrx200a2x_gphy_data;
+ 			break;
+ 		default:
+-			dev_err(dev, "unknown GSWIP version: 0x%x", version);
+-			return -ENOENT;
++			return dev_err_probe(dev, -ENOENT,
++					     "unknown GSWIP version: 0x%x",
++					     version);
+ 		}
+ 	}
+ 
+@@ -2069,10 +2068,9 @@ static int gswip_gphy_fw_list(struct gsw
+ 	if (match && match->data)
+ 		priv->gphy_fw_name_cfg = match->data;
+ 
+-	if (!priv->gphy_fw_name_cfg) {
+-		dev_err(dev, "GPHY compatible type not supported");
+-		return -ENOENT;
+-	}
++	if (!priv->gphy_fw_name_cfg)
++		return dev_err_probe(dev, -ENOENT,
++				     "GPHY compatible type not supported");
+ 
+ 	priv->num_gphy_fw = of_get_available_child_count(gphy_fw_list_np);
+ 	if (!priv->num_gphy_fw)
+@@ -2171,8 +2169,8 @@ static int gswip_probe(struct platform_d
+ 			return -EINVAL;
+ 		break;
+ 	default:
+-		dev_err(dev, "unknown GSWIP version: 0x%x", version);
+-		return -ENOENT;
++		return dev_err_probe(dev, -ENOENT,
++				     "unknown GSWIP version: 0x%x", version);
+ 	}
+ 
+ 	/* bring up the mdio bus */
+@@ -2180,10 +2178,9 @@ static int gswip_probe(struct platform_d
+ 	if (gphy_fw_np) {
+ 		err = gswip_gphy_fw_list(priv, gphy_fw_np, version);
+ 		of_node_put(gphy_fw_np);
+-		if (err) {
+-			dev_err(dev, "gphy fw probe failed\n");
+-			return err;
+-		}
++		if (err)
++			return dev_err_probe(dev, err,
++					     "gphy fw probe failed\n");
+ 	}
+ 
+ 	/* bring up the mdio bus */
+@@ -2191,20 +2188,20 @@ static int gswip_probe(struct platform_d
+ 	if (mdio_np) {
+ 		err = gswip_mdio(priv, mdio_np);
+ 		if (err) {
+-			dev_err(dev, "mdio probe failed\n");
++			dev_err_probe(dev, err, "mdio probe failed\n");
+ 			goto put_mdio_node;
+ 		}
+ 	}
+ 
+ 	err = dsa_register_switch(priv->ds);
+ 	if (err) {
+-		dev_err(dev, "dsa switch register failed: %i\n", err);
++		dev_err_probe(dev, err, "dsa switch registration failed\n");
+ 		goto mdio_bus;
+ 	}
+ 	if (!dsa_is_cpu_port(priv->ds, priv->hw_info->cpu_port)) {
+-		dev_err(dev, "wrong CPU port defined, HW only supports port: %i",
+-			priv->hw_info->cpu_port);
+-		err = -EINVAL;
++		err = dev_err_probe(dev, -EINVAL,
++				    "wrong CPU port defined, HW only supports port: %i",
++				    priv->hw_info->cpu_port);
+ 		goto disable_switch;
+ 	}
+ 
diff --git a/target/linux/lantiq/patches-5.15/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch b/target/linux/lantiq/patches-5.15/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch
new file mode 100644
index 0000000000..1493826c53
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch
@@ -0,0 +1,25 @@
+From 8cf0b680abc157adeec3fb93a10354c470694535 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Thu, 28 Jul 2022 22:37:11 +0200
+Subject: [PATCH 734/768] net: dsa: lantiq_gswip: Don't manually call
+ gswip_port_enable()
+
+We don't need to manually call gswip_port_enable() from within
+gswip_setup() for the CPU port. DSA does this automatically for us.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -874,8 +874,6 @@ static int gswip_setup(struct dsa_switch
+ 
+ 	ds->mtu_enforcement_ingress = true;
+ 
+-	gswip_port_enable(ds, cpu_port, NULL);
+-
+ 	ds->configure_vlan_while_not_filtering = false;
+ 
+ 	return 0;
diff --git a/target/linux/lantiq/patches-5.15/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch b/target/linux/lantiq/patches-5.15/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch
new file mode 100644
index 0000000000..2d95b37358
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch
@@ -0,0 +1,70 @@
+From 54a2f7f2c134738bd3f4ea0a213138d169f2726e Mon Sep 17 00:00:00 2001
+From: Martin Schiller <ms at dev.tdt.de>
+Date: Fri, 10 May 2024 13:52:10 +0200
+Subject: [PATCH] net: dsa: lantiq_gswip: do also enable or disable cpu port
+
+Before commit 74be4babe72f ("net: dsa: do not enable or disable non user
+ports"), gswip_port_enable/disable() were also executed for the cpu port
+in gswip_setup() which disabled the cpu port during initialization.
+
+Let's restore this by removing the dsa_is_user_port checks. Also, let's
+clean up the gswip_port_enable() function so that we only have to check
+for the cpu port once.
+
+Fixes: 74be4babe72f ("net: dsa: do not enable or disable non user ports")
+Signed-off-by: Martin Schiller <ms at dev.tdt.de>
+---
+ drivers/net/dsa/lantiq_gswip.c | 24 ++++++++----------------
+ 1 file changed, 8 insertions(+), 16 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -671,13 +671,18 @@ static int gswip_port_enable(struct dsa_
+ 	struct gswip_priv *priv = ds->priv;
+ 	int err;
+ 
+-	if (!dsa_is_user_port(ds, port))
+-		return 0;
+-
+ 	if (!dsa_is_cpu_port(ds, port)) {
++		u32 mdio_phy = 0;
++
+ 		err = gswip_add_single_port_br(priv, port, true);
+ 		if (err)
+ 			return err;
++
++		if (phydev)
++			mdio_phy = phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK;
++
++		gswip_mdio_mask(priv, GSWIP_MDIO_PHY_ADDR_MASK, mdio_phy,
++				GSWIP_MDIO_PHYp(port));
+ 	}
+ 
+ 	/* RMON Counter Enable for port */
+@@ -690,16 +695,6 @@ static int gswip_port_enable(struct dsa_
+ 	gswip_switch_mask(priv, 0, GSWIP_SDMA_PCTRL_EN,
+ 			  GSWIP_SDMA_PCTRLp(port));
+ 
+-	if (!dsa_is_cpu_port(ds, port)) {
+-		u32 mdio_phy = 0;
+-
+-		if (phydev)
+-			mdio_phy = phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK;
+-
+-		gswip_mdio_mask(priv, GSWIP_MDIO_PHY_ADDR_MASK, mdio_phy,
+-				GSWIP_MDIO_PHYp(port));
+-	}
+-
+ 	return 0;
+ }
+ 
+@@ -707,9 +702,6 @@ static void gswip_port_disable(struct ds
+ {
+ 	struct gswip_priv *priv = ds->priv;
+ 
+-	if (!dsa_is_user_port(ds, port))
+-		return;
+-
+ 	gswip_switch_mask(priv, GSWIP_FDMA_PCTRL_EN, 0,
+ 			  GSWIP_FDMA_PCTRLp(port));
+ 	gswip_switch_mask(priv, GSWIP_SDMA_PCTRL_EN, 0,
diff --git a/target/linux/lantiq/patches-5.15/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch b/target/linux/lantiq/patches-5.15/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch
new file mode 100644
index 0000000000..26f7c0f414
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch
@@ -0,0 +1,30 @@
+From 8ab55ac9678ca1f50f786c84484599dd675c5a9f Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Wed, 18 May 2022 23:53:09 +0200
+Subject: [PATCH 736/768] net: dsa: lantiq_gswip: Use dsa_is_cpu_port() in
+ gswip_port_change_mtu()
+
+Make the check for the CPU port in gswip_port_change_mtu() consistent
+with other areas of the driver by using dsa_is_cpu_port().
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1463,12 +1463,11 @@ static int gswip_port_max_mtu(struct dsa
+ static int gswip_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
+ {
+ 	struct gswip_priv *priv = ds->priv;
+-	int cpu_port = priv->hw_info->cpu_port;
+ 
+ 	/* CPU port always has maximum mtu of user ports, so use it to set
+ 	 * switch frame size, including 8 byte special header.
+ 	 */
+-	if (port == cpu_port) {
++	if (dsa_is_cpu_port(ds, port)) {
+ 		new_mtu += 8;
+ 		gswip_switch_w(priv, VLAN_ETH_HLEN + new_mtu + ETH_FCS_LEN,
+ 			       GSWIP_MAC_FLEN);
diff --git a/target/linux/lantiq/patches-5.15/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch b/target/linux/lantiq/patches-5.15/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch
new file mode 100644
index 0000000000..0a17d14759
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch
@@ -0,0 +1,24 @@
+From ef98b183d8fc7187a2efcc21c8f54f3cf061d556 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Tue, 17 May 2022 22:39:58 +0200
+Subject: [PATCH 737/768] net: dsa: lantiq_gswip: Change literal 6 to ETH_ALEN
+
+The addr variable in gswip_port_fdb_dump() stores a mac address. Use
+ETH_ALEN to make this consistent across other drivers.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1383,7 +1383,7 @@ static int gswip_port_fdb_dump(struct ds
+ {
+ 	struct gswip_priv *priv = ds->priv;
+ 	struct gswip_pce_table_entry mac_bridge = {0,};
+-	unsigned char addr[6];
++	unsigned char addr[ETH_ALEN];
+ 	int i;
+ 	int err;
+ 
diff --git a/target/linux/lantiq/patches-5.15/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch b/target/linux/lantiq/patches-5.15/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch
new file mode 100644
index 0000000000..87382876c2
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch
@@ -0,0 +1,47 @@
+From 61e9b19f6e6174afa7540f0b468a69bc940b91d4 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 21:23:49 +0200
+Subject: [PATCH 738/768] net: dsa: lantiq_gswip: Consistently use macros for
+ the mac bridge table
+
+Introduce a new GSWIP_TABLE_MAC_BRIDGE_PORT macro and use it throughout
+the driver. Also update GSWIP_TABLE_MAC_BRIDGE_STATIC to use the BIT()
+macro. This makes the driver code easier to understand.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -236,7 +236,8 @@
+ #define GSWIP_TABLE_ACTIVE_VLAN		0x01
+ #define GSWIP_TABLE_VLAN_MAPPING	0x02
+ #define GSWIP_TABLE_MAC_BRIDGE		0x0b
+-#define  GSWIP_TABLE_MAC_BRIDGE_STATIC	0x01	/* Static not, aging entry */
++#define  GSWIP_TABLE_MAC_BRIDGE_STATIC	BIT(0)		/* Static not, aging entry */
++#define  GSWIP_TABLE_MAC_BRIDGE_PORT	GENMASK(7, 4)	/* Port on learned entries */
+ 
+ #define XRX200_GPHY_FW_ALIGN	(16 * 1024)
+ 
+@@ -1279,7 +1280,8 @@ static void gswip_port_fast_age(struct d
+ 		if (mac_bridge.val[1] & GSWIP_TABLE_MAC_BRIDGE_STATIC)
+ 			continue;
+ 
+-		if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) != port)
++		if (port != FIELD_GET(GSWIP_TABLE_MAC_BRIDGE_PORT,
++				      mac_bridge.val[0]))
+ 			continue;
+ 
+ 		mac_bridge.valid = false;
+@@ -1414,7 +1416,8 @@ static int gswip_port_fdb_dump(struct ds
+ 					return err;
+ 			}
+ 		} else {
+-			if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) == port) {
++			if (port == FIELD_GET(GSWIP_TABLE_MAC_BRIDGE_PORT,
++					      mac_bridge.val[0])) {
+ 				err = cb(addr, 0, false, data);
+ 				if (err)
+ 					return err;
diff --git a/target/linux/lantiq/patches-5.15/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch b/target/linux/lantiq/patches-5.15/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch
new file mode 100644
index 0000000000..aafea1ec2e
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch
@@ -0,0 +1,26 @@
+From 7a9e185075ababa827d1d3a33b787ad6d718c8ec Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 22:24:24 +0200
+Subject: [PATCH 739/768] net: dsa: lantiq_gswip: Forbid
+ gswip_add_single_port_br on the CPU port
+
+Calling gswip_add_single_port_br() with the CPU port would be a bug
+because then only the CPU port could talk to itself. Add the CPU port to
+the validation at the beginning of gswip_add_single_port_br().
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -633,7 +633,7 @@ static int gswip_add_single_port_br(stru
+ 	unsigned int max_ports = priv->hw_info->max_ports;
+ 	int err;
+ 
+-	if (port >= max_ports) {
++	if (port >= max_ports || dsa_is_cpu_port(priv->ds, port)) {
+ 		dev_err(priv->dev, "single port for %i supported\n", port);
+ 		return -EIO;
+ 	}
diff --git a/target/linux/lantiq/patches-5.15/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch b/target/linux/lantiq/patches-5.15/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch
new file mode 100644
index 0000000000..ef8302fe80
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch
@@ -0,0 +1,26 @@
+From 28be6bfb735d851e646abb05b8e24eb6764596f5 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 22:26:20 +0200
+Subject: [PATCH 740/768] net: dsa: lantiq_gswip: Fix error message in
+ gswip_add_single_port_br()
+
+The error message is printed when the port cannot be used. Update the
+error message to reflect that.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -634,7 +634,8 @@ static int gswip_add_single_port_br(stru
+ 	int err;
+ 
+ 	if (port >= max_ports || dsa_is_cpu_port(priv->ds, port)) {
+-		dev_err(priv->dev, "single port for %i supported\n", port);
++		dev_err(priv->dev, "single port for %i is not supported\n",
++			port);
+ 		return -EIO;
+ 	}
+ 
diff --git a/target/linux/lantiq/patches-5.15/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch b/target/linux/lantiq/patches-5.15/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch
new file mode 100644
index 0000000000..6eeed5b27a
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch
@@ -0,0 +1,36 @@
+From 45a0371568b1f050d787564875653f41a1f6fb98 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 14:06:40 +0200
+Subject: [PATCH 741/768] net: dsa: lantiq_gswip: Fix comments in
+ gswip_port_vlan_filtering()
+
+Update the comments in gswip_port_vlan_filtering() so it's clear that
+there are two separate cases, one for "tag based VLAN" and another one
+for "port based VLAN".
+
+Suggested-by: Martin Schiller <ms at dev.tdt.de>
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -762,7 +762,7 @@ static int gswip_port_vlan_filtering(str
+ 	}
+ 
+ 	if (vlan_filtering) {
+-		/* Use port based VLAN tag */
++		/* Use tag based VLAN */
+ 		gswip_switch_mask(priv,
+ 				  GSWIP_PCE_VCTRL_VSR,
+ 				  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
+@@ -771,7 +771,7 @@ static int gswip_port_vlan_filtering(str
+ 		gswip_switch_mask(priv, GSWIP_PCE_PCTRL_0_TVM, 0,
+ 				  GSWIP_PCE_PCTRL_0p(port));
+ 	} else {
+-		/* Use port based VLAN tag */
++		/* Use port based VLAN */
+ 		gswip_switch_mask(priv,
+ 				  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
+ 				  GSWIP_PCE_VCTRL_VEMR,
diff --git a/target/linux/lantiq/patches-5.15/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch b/target/linux/lantiq/patches-5.15/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch
new file mode 100644
index 0000000000..b9912e8735
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch
@@ -0,0 +1,33 @@
+From 4775f9543e691d9a2f5dd9aa5d46c66d37928250 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 14:19:05 +0200
+Subject: [PATCH 742/768] net: dsa: lantiq_gswip: Add and use a
+ GSWIP_TABLE_MAC_BRIDGE_FID macro
+
+Only bits [5:0] in mac_bridge.key[3] are reserved for the FID. Add a
+macro so this becomes obvious when reading the driver code.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -238,6 +238,7 @@
+ #define GSWIP_TABLE_MAC_BRIDGE		0x0b
+ #define  GSWIP_TABLE_MAC_BRIDGE_STATIC	BIT(0)		/* Static not, aging entry */
+ #define  GSWIP_TABLE_MAC_BRIDGE_PORT	GENMASK(7, 4)	/* Port on learned entries */
++#define  GSWIP_TABLE_MAC_BRIDGE_FID	GENMASK(5, 0)	/* Filtering identifier */
+ 
+ #define XRX200_GPHY_FW_ALIGN	(16 * 1024)
+ 
+@@ -1357,7 +1358,7 @@ static int gswip_port_fdb(struct dsa_swi
+ 	mac_bridge.key[0] = addr[5] | (addr[4] << 8);
+ 	mac_bridge.key[1] = addr[3] | (addr[2] << 8);
+ 	mac_bridge.key[2] = addr[1] | (addr[0] << 8);
+-	mac_bridge.key[3] = fid;
++	mac_bridge.key[3] = FIELD_PREP(GSWIP_TABLE_MAC_BRIDGE_FID, fid);
+ 	mac_bridge.val[0] = add ? BIT(port) : 0; /* port map */
+ 	mac_bridge.val[1] = GSWIP_TABLE_MAC_BRIDGE_STATIC;
+ 	mac_bridge.valid = add;
diff --git a/target/linux/lantiq/patches-5.15/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch b/target/linux/lantiq/patches-5.15/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch
new file mode 100644
index 0000000000..2538a4c856
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch
@@ -0,0 +1,26 @@
+From 00b5121435ccd4ce54f79179dd9ee3e2610d7dcf Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 16:31:57 +0200
+Subject: [PATCH 743/768] net: dsa: lantiq_gswip: Improve error message in
+ gswip_port_fdb()
+
+Print the port which is not found to be part of a bridge so it's easier
+to investigate the underlying issue.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1349,7 +1349,8 @@ static int gswip_port_fdb(struct dsa_swi
+ 	}
+ 
+ 	if (fid == -1) {
+-		dev_err(priv->dev, "Port not part of a bridge\n");
++		dev_err(priv->dev,
++			"Port %d is not known to be part of bridge\n", port);
+ 		return -EINVAL;
+ 	}
+ 
diff --git a/target/linux/lantiq/patches-6.1/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch b/target/linux/lantiq/patches-6.1/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch
new file mode 100644
index 0000000000..c337c564b6
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0731-dt-bindings-net-dsa-lantiq_gswip-Add-missing-phy-mod.patch
@@ -0,0 +1,32 @@
+From 82ea7c7fb4e90620beba8b6436fc12df2379ef8d Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 10 Oct 2022 16:52:25 +0200
+Subject: [PATCH 731/768] dt-bindings: net: dsa: lantiq_gswip: Add missing
+ phy-mode and fixed-link
+
+The CPU port has to specify a phy-mode and either a phy or a fixed-link.
+Since GSWIP is connected using a SoC internal protocol there's no PHY
+involved. Add phy-mode = "internal" and a fixed-link to describe the
+communication between the PMAC (Ethernet controller) and GSWIP switch.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
++++ b/Documentation/devicetree/bindings/net/dsa/lantiq-gswip.txt
+@@ -96,7 +96,13 @@ switch at e108000 {
+ 
+ 		port at 6 {
+ 			reg = <0x6>;
++			phy-mode = "internal";
+ 			ethernet = <&eth0>;
++
++			fixed-link {
++				speed = <1000>;
++				full-duplex;
++			};
+ 		};
+ 	};
+ 
diff --git a/target/linux/lantiq/patches-6.1/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch b/target/linux/lantiq/patches-6.1/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch
new file mode 100644
index 0000000000..4800ee1dd2
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0732-net-dsa-lantiq_gswip-Only-allow-phy-mode-internal-on.patch
@@ -0,0 +1,33 @@
+From a55b9d802e11baceb35bd312419ad82086065b08 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 10 Oct 2022 16:59:35 +0200
+Subject: [PATCH 732/768] net: dsa: lantiq_gswip: Only allow phy-mode =
+ "internal" on the CPU port
+
+Add the CPU port to gswip_xrx200_phylink_get_caps() and
+gswip_xrx300_phylink_get_caps(). It connects through a SoC-internal bus,
+so the only allowed phy-mode is PHY_INTERFACE_MODE_INTERNAL.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1509,6 +1509,7 @@ static void gswip_xrx200_phylink_get_cap
+ 	case 2:
+ 	case 3:
+ 	case 4:
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
+@@ -1540,6 +1541,7 @@ static void gswip_xrx300_phylink_get_cap
+ 	case 2:
+ 	case 3:
+ 	case 4:
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
diff --git a/target/linux/lantiq/patches-6.1/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch b/target/linux/lantiq/patches-6.1/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch
new file mode 100644
index 0000000000..f30e7ab00c
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0733-net-dsa-lantiq_gswip-Use-dev_err_probe-where-appropr.patch
@@ -0,0 +1,145 @@
+From 4d3dd68a1c56674ff666d0622b545992fac31754 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Sun, 31 Jul 2022 22:54:52 +0200
+Subject: [PATCH 733/768] net: dsa: lantiq_gswip: Use dev_err_probe where
+ appropriate
+
+dev_err_probe() can be used to simplify the existing code. Also it means
+we get rid of the following warning which is seen whenever the PMAC
+(Ethernet controller which connects to GSWIP's CPU port) has not been
+probed yet:
+  gswip 1e108000.switch: dsa switch register failed: -517
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 53 ++++++++++++++++------------------
+ 1 file changed, 25 insertions(+), 28 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1919,11 +1919,9 @@ static int gswip_gphy_fw_load(struct gsw
+ 	msleep(200);
+ 
+ 	ret = request_firmware(&fw, gphy_fw->fw_name, dev);
+-	if (ret) {
+-		dev_err(dev, "failed to load firmware: %s, error: %i\n",
+-			gphy_fw->fw_name, ret);
+-		return ret;
+-	}
++	if (ret)
++		return dev_err_probe(dev, ret, "failed to load firmware: %s\n",
++				     gphy_fw->fw_name);
+ 
+ 	/* GPHY cores need the firmware code in a persistent and contiguous
+ 	 * memory area with a 16 kB boundary aligned start address.
+@@ -1936,9 +1934,9 @@ static int gswip_gphy_fw_load(struct gsw
+ 		dev_addr = ALIGN(dma_addr, XRX200_GPHY_FW_ALIGN);
+ 		memcpy(fw_addr, fw->data, fw->size);
+ 	} else {
+-		dev_err(dev, "failed to alloc firmware memory\n");
+ 		release_firmware(fw);
+-		return -ENOMEM;
++		return dev_err_probe(dev, -ENOMEM,
++				     "failed to alloc firmware memory\n");
+ 	}
+ 
+ 	release_firmware(fw);
+@@ -1965,8 +1963,8 @@ static int gswip_gphy_fw_probe(struct gs
+ 
+ 	gphy_fw->clk_gate = devm_clk_get(dev, gphyname);
+ 	if (IS_ERR(gphy_fw->clk_gate)) {
+-		dev_err(dev, "Failed to lookup gate clock\n");
+-		return PTR_ERR(gphy_fw->clk_gate);
++		return dev_err_probe(dev, PTR_ERR(gphy_fw->clk_gate),
++				     "Failed to lookup gate clock\n");
+ 	}
+ 
+ 	ret = of_property_read_u32(gphy_fw_np, "reg", &gphy_fw->fw_addr_offset);
+@@ -1986,8 +1984,8 @@ static int gswip_gphy_fw_probe(struct gs
+ 		gphy_fw->fw_name = priv->gphy_fw_name_cfg->ge_firmware_name;
+ 		break;
+ 	default:
+-		dev_err(dev, "Unknown GPHY mode %d\n", gphy_mode);
+-		return -EINVAL;
++		return dev_err_probe(dev, -EINVAL, "Unknown GPHY mode %d\n",
++				     gphy_mode);
+ 	}
+ 
+ 	gphy_fw->reset = of_reset_control_array_get_exclusive(gphy_fw_np);
+@@ -2038,8 +2036,9 @@ static int gswip_gphy_fw_list(struct gsw
+ 			priv->gphy_fw_name_cfg = &xrx200a2x_gphy_data;
+ 			break;
+ 		default:
+-			dev_err(dev, "unknown GSWIP version: 0x%x", version);
+-			return -ENOENT;
++			return dev_err_probe(dev, -ENOENT,
++					     "unknown GSWIP version: 0x%x",
++					     version);
+ 		}
+ 	}
+ 
+@@ -2047,10 +2046,9 @@ static int gswip_gphy_fw_list(struct gsw
+ 	if (match && match->data)
+ 		priv->gphy_fw_name_cfg = match->data;
+ 
+-	if (!priv->gphy_fw_name_cfg) {
+-		dev_err(dev, "GPHY compatible type not supported");
+-		return -ENOENT;
+-	}
++	if (!priv->gphy_fw_name_cfg)
++		return dev_err_probe(dev, -ENOENT,
++				     "GPHY compatible type not supported");
+ 
+ 	priv->num_gphy_fw = of_get_available_child_count(gphy_fw_list_np);
+ 	if (!priv->num_gphy_fw)
+@@ -2150,8 +2148,8 @@ static int gswip_probe(struct platform_d
+ 			return -EINVAL;
+ 		break;
+ 	default:
+-		dev_err(dev, "unknown GSWIP version: 0x%x", version);
+-		return -ENOENT;
++		return dev_err_probe(dev, -ENOENT,
++				     "unknown GSWIP version: 0x%x", version);
+ 	}
+ 
+ 	/* bring up the mdio bus */
+@@ -2159,10 +2157,9 @@ static int gswip_probe(struct platform_d
+ 	if (gphy_fw_np) {
+ 		err = gswip_gphy_fw_list(priv, gphy_fw_np, version);
+ 		of_node_put(gphy_fw_np);
+-		if (err) {
+-			dev_err(dev, "gphy fw probe failed\n");
+-			return err;
+-		}
++		if (err)
++			return dev_err_probe(dev, err,
++					     "gphy fw probe failed\n");
+ 	}
+ 
+ 	/* bring up the mdio bus */
+@@ -2170,20 +2167,20 @@ static int gswip_probe(struct platform_d
+ 	if (mdio_np) {
+ 		err = gswip_mdio(priv, mdio_np);
+ 		if (err) {
+-			dev_err(dev, "mdio probe failed\n");
++			dev_err_probe(dev, err, "mdio probe failed\n");
+ 			goto put_mdio_node;
+ 		}
+ 	}
+ 
+ 	err = dsa_register_switch(priv->ds);
+ 	if (err) {
+-		dev_err(dev, "dsa switch register failed: %i\n", err);
++		dev_err_probe(dev, err, "dsa switch registration failed\n");
+ 		goto mdio_bus;
+ 	}
+ 	if (!dsa_is_cpu_port(priv->ds, priv->hw_info->cpu_port)) {
+-		dev_err(dev, "wrong CPU port defined, HW only supports port: %i",
+-			priv->hw_info->cpu_port);
+-		err = -EINVAL;
++		err = dev_err_probe(dev, -EINVAL,
++				    "wrong CPU port defined, HW only supports port: %i",
++				    priv->hw_info->cpu_port);
+ 		goto disable_switch;
+ 	}
+ 
diff --git a/target/linux/lantiq/patches-6.1/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch b/target/linux/lantiq/patches-6.1/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch
new file mode 100644
index 0000000000..de8416380a
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0734-net-dsa-lantiq_gswip-Don-t-manually-call-gswip_port_.patch
@@ -0,0 +1,25 @@
+From 8cf0b680abc157adeec3fb93a10354c470694535 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Thu, 28 Jul 2022 22:37:11 +0200
+Subject: [PATCH 734/768] net: dsa: lantiq_gswip: Don't manually call
+ gswip_port_enable()
+
+We don't need to manually call gswip_port_enable() from within
+gswip_setup() for the CPU port. DSA does this automatically for us.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -891,8 +891,6 @@ static int gswip_setup(struct dsa_switch
+ 
+ 	ds->mtu_enforcement_ingress = true;
+ 
+-	gswip_port_enable(ds, cpu_port, NULL);
+-
+ 	ds->configure_vlan_while_not_filtering = false;
+ 
+ 	return 0;
diff --git a/target/linux/lantiq/patches-6.1/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch b/target/linux/lantiq/patches-6.1/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch
new file mode 100644
index 0000000000..a653c85841
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0735-net-dsa-lantiq_gswip-do-also-enable-or-disable-cpu-p.patch
@@ -0,0 +1,70 @@
+From 54a2f7f2c134738bd3f4ea0a213138d169f2726e Mon Sep 17 00:00:00 2001
+From: Martin Schiller <ms at dev.tdt.de>
+Date: Fri, 10 May 2024 13:52:10 +0200
+Subject: [PATCH] net: dsa: lantiq_gswip: do also enable or disable cpu port
+
+Before commit 74be4babe72f ("net: dsa: do not enable or disable non user
+ports"), gswip_port_enable/disable() were also executed for the cpu port
+in gswip_setup() which disabled the cpu port during initialization.
+
+Let's restore this by removing the dsa_is_user_port checks. Also, let's
+clean up the gswip_port_enable() function so that we only have to check
+for the cpu port once.
+
+Fixes: 74be4babe72f ("net: dsa: do not enable or disable non user ports")
+Signed-off-by: Martin Schiller <ms at dev.tdt.de>
+---
+ drivers/net/dsa/lantiq_gswip.c | 24 ++++++++----------------
+ 1 file changed, 8 insertions(+), 16 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -688,13 +688,18 @@ static int gswip_port_enable(struct dsa_
+ 	struct gswip_priv *priv = ds->priv;
+ 	int err;
+ 
+-	if (!dsa_is_user_port(ds, port))
+-		return 0;
+-
+ 	if (!dsa_is_cpu_port(ds, port)) {
++		u32 mdio_phy = 0;
++
+ 		err = gswip_add_single_port_br(priv, port, true);
+ 		if (err)
+ 			return err;
++
++		if (phydev)
++			mdio_phy = phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK;
++
++		gswip_mdio_mask(priv, GSWIP_MDIO_PHY_ADDR_MASK, mdio_phy,
++				GSWIP_MDIO_PHYp(port));
+ 	}
+ 
+ 	/* RMON Counter Enable for port */
+@@ -707,16 +712,6 @@ static int gswip_port_enable(struct dsa_
+ 	gswip_switch_mask(priv, 0, GSWIP_SDMA_PCTRL_EN,
+ 			  GSWIP_SDMA_PCTRLp(port));
+ 
+-	if (!dsa_is_cpu_port(ds, port)) {
+-		u32 mdio_phy = 0;
+-
+-		if (phydev)
+-			mdio_phy = phydev->mdio.addr & GSWIP_MDIO_PHY_ADDR_MASK;
+-
+-		gswip_mdio_mask(priv, GSWIP_MDIO_PHY_ADDR_MASK, mdio_phy,
+-				GSWIP_MDIO_PHYp(port));
+-	}
+-
+ 	return 0;
+ }
+ 
+@@ -724,9 +719,6 @@ static void gswip_port_disable(struct ds
+ {
+ 	struct gswip_priv *priv = ds->priv;
+ 
+-	if (!dsa_is_user_port(ds, port))
+-		return;
+-
+ 	gswip_switch_mask(priv, GSWIP_FDMA_PCTRL_EN, 0,
+ 			  GSWIP_FDMA_PCTRLp(port));
+ 	gswip_switch_mask(priv, GSWIP_SDMA_PCTRL_EN, 0,
diff --git a/target/linux/lantiq/patches-6.1/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch b/target/linux/lantiq/patches-6.1/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch
new file mode 100644
index 0000000000..fd19982264
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0736-net-dsa-lantiq_gswip-Use-dsa_is_cpu_port-in-gswip_po.patch
@@ -0,0 +1,30 @@
+From 8ab55ac9678ca1f50f786c84484599dd675c5a9f Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Wed, 18 May 2022 23:53:09 +0200
+Subject: [PATCH 736/768] net: dsa: lantiq_gswip: Use dsa_is_cpu_port() in
+ gswip_port_change_mtu()
+
+Make the check for the CPU port in gswip_port_change_mtu() consistent
+with other areas of the driver by using dsa_is_cpu_port().
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1457,12 +1457,11 @@ static int gswip_port_max_mtu(struct dsa
+ static int gswip_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
+ {
+ 	struct gswip_priv *priv = ds->priv;
+-	int cpu_port = priv->hw_info->cpu_port;
+ 
+ 	/* CPU port always has maximum mtu of user ports, so use it to set
+ 	 * switch frame size, including 8 byte special header.
+ 	 */
+-	if (port == cpu_port) {
++	if (dsa_is_cpu_port(ds, port)) {
+ 		new_mtu += 8;
+ 		gswip_switch_w(priv, VLAN_ETH_HLEN + new_mtu + ETH_FCS_LEN,
+ 			       GSWIP_MAC_FLEN);
diff --git a/target/linux/lantiq/patches-6.1/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch b/target/linux/lantiq/patches-6.1/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch
new file mode 100644
index 0000000000..74e52d1d18
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0737-net-dsa-lantiq_gswip-Change-literal-6-to-ETH_ALEN.patch
@@ -0,0 +1,24 @@
+From ef98b183d8fc7187a2efcc21c8f54f3cf061d556 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Tue, 17 May 2022 22:39:58 +0200
+Subject: [PATCH 737/768] net: dsa: lantiq_gswip: Change literal 6 to ETH_ALEN
+
+The addr variable in gswip_port_fdb_dump() stores a mac address. Use
+ETH_ALEN to make this consistent across other drivers.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1406,7 +1406,7 @@ static int gswip_port_fdb_dump(struct ds
+ {
+ 	struct gswip_priv *priv = ds->priv;
+ 	struct gswip_pce_table_entry mac_bridge = {0,};
+-	unsigned char addr[6];
++	unsigned char addr[ETH_ALEN];
+ 	int i;
+ 	int err;
+ 
diff --git a/target/linux/lantiq/patches-6.1/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch b/target/linux/lantiq/patches-6.1/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch
new file mode 100644
index 0000000000..0ea90db483
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0738-net-dsa-lantiq_gswip-Consistently-use-macros-for-the.patch
@@ -0,0 +1,47 @@
+From 61e9b19f6e6174afa7540f0b468a69bc940b91d4 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 21:23:49 +0200
+Subject: [PATCH 738/768] net: dsa: lantiq_gswip: Consistently use macros for
+ the mac bridge table
+
+Introduce a new GSWIP_TABLE_MAC_BRIDGE_PORT macro and use it throughout
+the driver. Also update GSWIP_TABLE_MAC_BRIDGE_STATIC to use the BIT()
+macro. This makes the driver code easier to understand.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -236,7 +236,8 @@
+ #define GSWIP_TABLE_ACTIVE_VLAN		0x01
+ #define GSWIP_TABLE_VLAN_MAPPING	0x02
+ #define GSWIP_TABLE_MAC_BRIDGE		0x0b
+-#define  GSWIP_TABLE_MAC_BRIDGE_STATIC	0x01	/* Static not, aging entry */
++#define  GSWIP_TABLE_MAC_BRIDGE_STATIC	BIT(0)		/* Static not, aging entry */
++#define  GSWIP_TABLE_MAC_BRIDGE_PORT	GENMASK(7, 4)	/* Port on learned entries */
+ 
+ #define XRX200_GPHY_FW_ALIGN	(16 * 1024)
+ 
+@@ -1300,7 +1301,8 @@ static void gswip_port_fast_age(struct d
+ 		if (mac_bridge.val[1] & GSWIP_TABLE_MAC_BRIDGE_STATIC)
+ 			continue;
+ 
+-		if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) != port)
++		if (port != FIELD_GET(GSWIP_TABLE_MAC_BRIDGE_PORT,
++				      mac_bridge.val[0]))
+ 			continue;
+ 
+ 		mac_bridge.valid = false;
+@@ -1438,7 +1440,8 @@ static int gswip_port_fdb_dump(struct ds
+ 					return err;
+ 			}
+ 		} else {
+-			if (((mac_bridge.val[0] & GENMASK(7, 4)) >> 4) == port) {
++			if (port == FIELD_GET(GSWIP_TABLE_MAC_BRIDGE_PORT,
++					      mac_bridge.val[0])) {
+ 				err = cb(addr, 0, false, data);
+ 				if (err)
+ 					return err;
diff --git a/target/linux/lantiq/patches-6.1/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch b/target/linux/lantiq/patches-6.1/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch
new file mode 100644
index 0000000000..1347a98c5c
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0739-net-dsa-lantiq_gswip-Forbid-gswip_add_single_port_br.patch
@@ -0,0 +1,26 @@
+From 7a9e185075ababa827d1d3a33b787ad6d718c8ec Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 22:24:24 +0200
+Subject: [PATCH 739/768] net: dsa: lantiq_gswip: Forbid
+ gswip_add_single_port_br on the CPU port
+
+Calling gswip_add_single_port_br() with the CPU port would be a bug
+because then only the CPU port could talk to itself. Add the CPU port to
+the validation at the beginning of gswip_add_single_port_br().
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -650,7 +650,7 @@ static int gswip_add_single_port_br(stru
+ 	unsigned int max_ports = priv->hw_info->max_ports;
+ 	int err;
+ 
+-	if (port >= max_ports) {
++	if (port >= max_ports || dsa_is_cpu_port(priv->ds, port)) {
+ 		dev_err(priv->dev, "single port for %i supported\n", port);
+ 		return -EIO;
+ 	}
diff --git a/target/linux/lantiq/patches-6.1/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch b/target/linux/lantiq/patches-6.1/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch
new file mode 100644
index 0000000000..732588308e
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0740-net-dsa-lantiq_gswip-Fix-error-message-in-gswip_add_.patch
@@ -0,0 +1,26 @@
+From 28be6bfb735d851e646abb05b8e24eb6764596f5 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Mon, 1 Aug 2022 22:26:20 +0200
+Subject: [PATCH 740/768] net: dsa: lantiq_gswip: Fix error message in
+ gswip_add_single_port_br()
+
+The error message is printed when the port cannot be used. Update the
+error message to reflect that.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -651,7 +651,8 @@ static int gswip_add_single_port_br(stru
+ 	int err;
+ 
+ 	if (port >= max_ports || dsa_is_cpu_port(priv->ds, port)) {
+-		dev_err(priv->dev, "single port for %i supported\n", port);
++		dev_err(priv->dev, "single port for %i is not supported\n",
++			port);
+ 		return -EIO;
+ 	}
+ 
diff --git a/target/linux/lantiq/patches-6.1/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch b/target/linux/lantiq/patches-6.1/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch
new file mode 100644
index 0000000000..679dd53c47
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0741-net-dsa-lantiq_gswip-Fix-comments-in-gswip_port_vlan.patch
@@ -0,0 +1,36 @@
+From 45a0371568b1f050d787564875653f41a1f6fb98 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 14:06:40 +0200
+Subject: [PATCH 741/768] net: dsa: lantiq_gswip: Fix comments in
+ gswip_port_vlan_filtering()
+
+Update the comments in gswip_port_vlan_filtering() so it's clear that
+there are two separate cases, one for "tag based VLAN" and another one
+for "port based VLAN".
+
+Suggested-by: Martin Schiller <ms at dev.tdt.de>
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -779,7 +779,7 @@ static int gswip_port_vlan_filtering(str
+ 	}
+ 
+ 	if (vlan_filtering) {
+-		/* Use port based VLAN tag */
++		/* Use tag based VLAN */
+ 		gswip_switch_mask(priv,
+ 				  GSWIP_PCE_VCTRL_VSR,
+ 				  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
+@@ -788,7 +788,7 @@ static int gswip_port_vlan_filtering(str
+ 		gswip_switch_mask(priv, GSWIP_PCE_PCTRL_0_TVM, 0,
+ 				  GSWIP_PCE_PCTRL_0p(port));
+ 	} else {
+-		/* Use port based VLAN tag */
++		/* Use port based VLAN */
+ 		gswip_switch_mask(priv,
+ 				  GSWIP_PCE_VCTRL_UVR | GSWIP_PCE_VCTRL_VIMR |
+ 				  GSWIP_PCE_VCTRL_VEMR,
diff --git a/target/linux/lantiq/patches-6.1/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch b/target/linux/lantiq/patches-6.1/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch
new file mode 100644
index 0000000000..3d284c2ea6
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0742-net-dsa-lantiq_gswip-Add-and-use-a-GSWIP_TABLE_MAC_B.patch
@@ -0,0 +1,33 @@
+From 4775f9543e691d9a2f5dd9aa5d46c66d37928250 Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 14:19:05 +0200
+Subject: [PATCH 742/768] net: dsa: lantiq_gswip: Add and use a
+ GSWIP_TABLE_MAC_BRIDGE_FID macro
+
+Only bits [5:0] in mac_bridge.key[3] are reserved for the FID. Add a
+macro so this becomes obvious when reading the driver code.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -238,6 +238,7 @@
+ #define GSWIP_TABLE_MAC_BRIDGE		0x0b
+ #define  GSWIP_TABLE_MAC_BRIDGE_STATIC	BIT(0)		/* Static not, aging entry */
+ #define  GSWIP_TABLE_MAC_BRIDGE_PORT	GENMASK(7, 4)	/* Port on learned entries */
++#define  GSWIP_TABLE_MAC_BRIDGE_FID	GENMASK(5, 0)	/* Filtering identifier */
+ 
+ #define XRX200_GPHY_FW_ALIGN	(16 * 1024)
+ 
+@@ -1378,7 +1379,7 @@ static int gswip_port_fdb(struct dsa_swi
+ 	mac_bridge.key[0] = addr[5] | (addr[4] << 8);
+ 	mac_bridge.key[1] = addr[3] | (addr[2] << 8);
+ 	mac_bridge.key[2] = addr[1] | (addr[0] << 8);
+-	mac_bridge.key[3] = fid;
++	mac_bridge.key[3] = FIELD_PREP(GSWIP_TABLE_MAC_BRIDGE_FID, fid);
+ 	mac_bridge.val[0] = add ? BIT(port) : 0; /* port map */
+ 	mac_bridge.val[1] = GSWIP_TABLE_MAC_BRIDGE_STATIC;
+ 	mac_bridge.valid = add;
diff --git a/target/linux/lantiq/patches-6.1/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch b/target/linux/lantiq/patches-6.1/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch
new file mode 100644
index 0000000000..5c756c5a19
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0743-net-dsa-lantiq_gswip-Improve-error-message-in-gswip_.patch
@@ -0,0 +1,26 @@
+From 00b5121435ccd4ce54f79179dd9ee3e2610d7dcf Mon Sep 17 00:00:00 2001
+From: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+Date: Fri, 14 Oct 2022 16:31:57 +0200
+Subject: [PATCH 743/768] net: dsa: lantiq_gswip: Improve error message in
+ gswip_port_fdb()
+
+Print the port which is not found to be part of a bridge so it's easier
+to investigate the underlying issue.
+
+Signed-off-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
+---
+ drivers/net/dsa/lantiq_gswip.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/lantiq_gswip.c
++++ b/drivers/net/dsa/lantiq_gswip.c
+@@ -1370,7 +1370,8 @@ static int gswip_port_fdb(struct dsa_swi
+ 	}
+ 
+ 	if (fid == -1) {
+-		dev_err(priv->dev, "Port not part of a bridge\n");
++		dev_err(priv->dev,
++			"Port %d is not known to be part of bridge\n", port);
+ 		return -EINVAL;
+ 	}
+ 



From lede-commits at lists.infradead.org  Wed May 15 01:21:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:20 -0400
Subject: [openwrt/openwrt]  lantiq: dts: add missing irqs to mei node on
 AmazonSE, Danube and AR9
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36183.1715762079.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/faaa54161ebb6ee77fc9c26dc4cb6a46676959a4

commit faaa54161ebb6ee77fc9c26dc4cb6a46676959a4
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Apr 16 08:43:30 2024 +0200

    lantiq: dts: add missing irqs to mei node on AmazonSE, Danube and AR9
    
    This adds to missing DyingGasp and USB OC interrupts to the mei node.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi | 2 +-
 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi      | 2 +-
 target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi
index 5c608dab63..6ae7ab6188 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/amazonse.dtsi
@@ -197,7 +197,7 @@
 			compatible = "lantiq,mei-xway";
 			reg = <0xe116000 0x400>;
 			interrupt-parent = <&icu0>;
-			interrupts = <81>;
+			interrupts = <81 83 92>;
 		};
 
 		usb: usb at e101000 {
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi
index b12005ff6b..789ca67002 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9.dtsi
@@ -376,7 +376,7 @@
 			compatible = "lantiq,mei-xway";
 			reg = <0xe116000 0x9c>;
 			interrupt-parent = <&icu0>;
-			interrupts = <63>;
+			interrupts = <63 61 68>;
 		};
 
 		gsw: etop at e180000 {
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
index c19ce2af7e..5fe6699ac2 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube.dtsi
@@ -291,7 +291,7 @@
 			compatible = "lantiq,mei-xway";
 			reg = <0xe116000 0x400>;
 			interrupt-parent = <&icu0>;
-			interrupts = <63>;
+			interrupts = <63 61 159>;
 		};
 
 		gsw: etop at e180000 {



From lede-commits at lists.infradead.org  Wed May 15 01:21:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:14 -0400
Subject: [openwrt/openwrt]  kernel: ltq-vdsl-vr9-mei: fix warning about
 field-spanning write
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36184.1715762082.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bc487c12eefc53a4f7b67cba6f590ce9807a968

commit 7bc487c12eefc53a4f7b67cba6f590ce9807a968
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Thu Apr 11 20:31:01 2024 +0200

    kernel: ltq-vdsl-vr9-mei: fix warning about field-spanning write
    
    We need to use unsafe_memcpy() here, because the code do the field-
    spanning write intentionally.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 ...safe_memcpy-for-intentional-field-spanning-write.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch
new file mode 100644
index 0000000000..1542ace44f
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9-mei/patches/401-use-unsafe_memcpy-for-intentional-field-spanning-write.patch
@@ -0,0 +1,15 @@
+--- a/src/drv_mei_cpe_msg_process.c
++++ b/src/drv_mei_cpe_msg_process.c
+@@ -3524,7 +3524,12 @@ IFX_int32_t MEI_IoctlCmdMsgWrite(
+    {
+       if (bInternCall)
+       {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
+          memcpy(pDestPtr, pUserMsg->pPayload, pUserMsg->paylSize_byte);
++#else
++         unsafe_memcpy(pDestPtr, pUserMsg->pPayload, pUserMsg->paylSize_byte,
++                       /* field-spanning writing is used here intentionally */);
++#endif
+       }
+       else
+       {



From lede-commits at lists.infradead.org  Wed May 15 01:21:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:13 -0400
Subject: [openwrt/openwrt]  lantiq: old gptu timer driver: use
 platform_get_irq to get irqs
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36185.1715762085.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/83fccc42df36071e99627745b2321b2eda0087e0

commit 83fccc42df36071e99627745b2321b2eda0087e0
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Thu Apr 11 12:22:37 2024 +0200

    lantiq: old gptu timer driver: use platform_get_irq to get irqs
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../0008-MIPS-lantiq-backport-old-timer-code.patch | 45 +++++++++++++++++++---
 .../0008-MIPS-lantiq-backport-old-timer-code.patch | 45 +++++++++++++++++++---
 2 files changed, 80 insertions(+), 10 deletions(-)

diff --git a/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
index 5721e017b3..3e6c267685 100644
--- a/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
+++ b/target/linux/lantiq/patches-5.15/0008-MIPS-lantiq-backport-old-timer-code.patch
@@ -186,7 +186,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  obj-y += vmmc.o
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/timer.c
-@@ -0,0 +1,852 @@
+@@ -0,0 +1,887 @@
 +#ifndef CONFIG_SOC_AMAZON_SE
 +
 +#include <linux/kernel.h>
@@ -203,6 +203,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +#include <linux/sched.h>
 +#include <linux/sched/signal.h>
 +
++#include <linux/of_platform.h>
++
 +#include <asm/irq.h>
 +#include <asm/div64.h>
 +#include "../clk.h"
@@ -978,7 +980,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return 0;
 +}
 +
-+int __init lq_gptu_init(void)
++static int gptu_probe(struct platform_device *pdev)
 +{
 +	int ret;
 +	int i;
@@ -1005,15 +1007,24 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	}
 +
 +	for (i = 0; i < timer_dev.number_of_timers; i++) {
-+		ret = request_irq(TIMER_INTERRUPT + i, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
++		int irq = platform_get_irq(pdev, i);
++		if (irq < 0) {
++			printk(KERN_ERR "gptu: failed in getting irq (%d), get error %d\n", i, irq);
++			for (i--; i >= 0; i--)
++				free_irq(timer_dev.timer[i].irq, &timer_dev.timer[i]);
++			misc_deregister(&gptu_miscdev);
++			return irq;
++		}
++
++		ret = request_irq(irq, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
 +		if (ret) {
 +			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
 +			for (i--; i >= 0; i--)
-+				free_irq(TIMER_INTERRUPT + i, &timer_dev.timer[i]);
++				free_irq(timer_dev.timer[i].irq, &timer_dev.timer[i]);
 +			misc_deregister(&gptu_miscdev);
 +			return ret;
 +		} else {
-+			timer_dev.timer[i].irq = TIMER_INTERRUPT + i;
++			timer_dev.timer[i].irq = irq;
 +			disable_irq(timer_dev.timer[i].irq);
 +			printk(KERN_INFO "gptu: succeeded to request irq %d\n", timer_dev.timer[i].irq);
 +		}
@@ -1022,6 +1033,30 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return 0;
 +}
 +
++static const struct of_device_id gptu_match[] = {
++	{ .compatible = "lantiq,gptu-xway" },
++	{},
++};
++MODULE_DEVICE_TABLE(of, gptu_match);
++
++static struct platform_driver gptu_driver = {
++	.probe = gptu_probe,
++	.driver = {
++		.name = "gptu-xway",
++		.owner = THIS_MODULE,
++		.of_match_table = gptu_match,
++	},
++};
++
++int __init lq_gptu_init(void)
++{
++	int ret = platform_driver_register(&gptu_driver);
++
++	if (ret)
++		pr_info("gptu: Error registering platform driver\n");
++	return ret;
++}
++
 +void __exit lq_gptu_exit(void)
 +{
 +	unsigned int i;
diff --git a/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch b/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
index 5721e017b3..3e6c267685 100644
--- a/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
+++ b/target/linux/lantiq/patches-6.1/0008-MIPS-lantiq-backport-old-timer-code.patch
@@ -186,7 +186,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  obj-y += vmmc.o
 --- /dev/null
 +++ b/arch/mips/lantiq/xway/timer.c
-@@ -0,0 +1,852 @@
+@@ -0,0 +1,887 @@
 +#ifndef CONFIG_SOC_AMAZON_SE
 +
 +#include <linux/kernel.h>
@@ -203,6 +203,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +#include <linux/sched.h>
 +#include <linux/sched/signal.h>
 +
++#include <linux/of_platform.h>
++
 +#include <asm/irq.h>
 +#include <asm/div64.h>
 +#include "../clk.h"
@@ -978,7 +980,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return 0;
 +}
 +
-+int __init lq_gptu_init(void)
++static int gptu_probe(struct platform_device *pdev)
 +{
 +	int ret;
 +	int i;
@@ -1005,15 +1007,24 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	}
 +
 +	for (i = 0; i < timer_dev.number_of_timers; i++) {
-+		ret = request_irq(TIMER_INTERRUPT + i, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
++		int irq = platform_get_irq(pdev, i);
++		if (irq < 0) {
++			printk(KERN_ERR "gptu: failed in getting irq (%d), get error %d\n", i, irq);
++			for (i--; i >= 0; i--)
++				free_irq(timer_dev.timer[i].irq, &timer_dev.timer[i]);
++			misc_deregister(&gptu_miscdev);
++			return irq;
++		}
++
++		ret = request_irq(irq, timer_irq_handler, IRQF_TIMER, gptu_miscdev.name, &timer_dev.timer[i]);
 +		if (ret) {
 +			printk(KERN_ERR "gptu: failed in requesting irq (%d), get error %d\n", i, -ret);
 +			for (i--; i >= 0; i--)
-+				free_irq(TIMER_INTERRUPT + i, &timer_dev.timer[i]);
++				free_irq(timer_dev.timer[i].irq, &timer_dev.timer[i]);
 +			misc_deregister(&gptu_miscdev);
 +			return ret;
 +		} else {
-+			timer_dev.timer[i].irq = TIMER_INTERRUPT + i;
++			timer_dev.timer[i].irq = irq;
 +			disable_irq(timer_dev.timer[i].irq);
 +			printk(KERN_INFO "gptu: succeeded to request irq %d\n", timer_dev.timer[i].irq);
 +		}
@@ -1022,6 +1033,30 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return 0;
 +}
 +
++static const struct of_device_id gptu_match[] = {
++	{ .compatible = "lantiq,gptu-xway" },
++	{},
++};
++MODULE_DEVICE_TABLE(of, gptu_match);
++
++static struct platform_driver gptu_driver = {
++	.probe = gptu_probe,
++	.driver = {
++		.name = "gptu-xway",
++		.owner = THIS_MODULE,
++		.of_match_table = gptu_match,
++	},
++};
++
++int __init lq_gptu_init(void)
++{
++	int ret = platform_driver_register(&gptu_driver);
++
++	if (ret)
++		pr_info("gptu: Error registering platform driver\n");
++	return ret;
++}
++
 +void __exit lq_gptu_exit(void)
 +{
 +	unsigned int i;



From lede-commits at lists.infradead.org  Wed May 15 01:21:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:12 -0400
Subject: [openwrt/openwrt]  lantiq: ifxmips_pcie: use platform_get_irq to get
 irqs from dts
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36186.1715762089.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db4bb1967989328825564201d74396d1f5fa3c26

commit db4bb1967989328825564201d74396d1f5fa3c26
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Wed Apr 10 13:48:50 2024 +0200

    lantiq: ifxmips_pcie: use platform_get_irq to get irqs from dts
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../0151-lantiq-ifxmips_pcie-use-of.patch          | 92 ++++++++++++++++++++--
 .../0151-lantiq-ifxmips_pcie-use-of.patch          | 92 ++++++++++++++++++++--
 2 files changed, 168 insertions(+), 16 deletions(-)

diff --git a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
index d509c3a76a..93108cac3a 100644
--- a/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-5.15/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -39,7 +39,19 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  #include "ifxmips_pcie.h"
  #include "ifxmips_pcie_reg.h"
  
-@@ -40,6 +47,11 @@
+@@ -25,11 +32,6 @@
+ #define IFX_PCIE_ERROR_INT
+ #define IFX_PCIE_IO_32BIT
+ 
+-#define IFX_PCIE_IR                     (INT_NUM_IM4_IRL0 + 25)
+-#define IFX_PCIE_INTA                   (INT_NUM_IM4_IRL0 + 8)
+-#define IFX_PCIE_INTB                   (INT_NUM_IM4_IRL0 + 9)
+-#define IFX_PCIE_INTC                   (INT_NUM_IM4_IRL0 + 10)
+-#define IFX_PCIE_INTD                   (INT_NUM_IM4_IRL0 + 11)
+ #define MS(_v, _f)  (((_v) & (_f)) >> _f##_S)
+ #define SM(_v, _f)  (((_v) << _f##_S) & (_f))
+ #define IFX_REG_SET_BIT(_f, _r) \
+@@ -40,30 +42,30 @@
  static DEFINE_SPINLOCK(ifx_pcie_lock);
  
  u32 g_pcie_debug_flag = PCIE_MSG_ANY & (~PCIE_MSG_CFG);
@@ -51,7 +63,31 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  static ifx_pcie_irq_t pcie_irqs[IFX_PCIE_CORE_NR] = {
      {
-@@ -82,6 +94,22 @@ void ifx_pcie_debug(const char *fmt, ...
+         .ir_irq = {
+-            .irq  = IFX_PCIE_IR,
+             .name = "ifx_pcie_rc0",
+         },
+ 
+         .legacy_irq = {
+             {
+                 .irq_bit = PCIE_IRN_INTA,
+-                .irq     = IFX_PCIE_INTA,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTB,
+-                .irq     = IFX_PCIE_INTB,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTC,
+-                .irq     = IFX_PCIE_INTC,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTD,
+-                .irq     = IFX_PCIE_INTD,
+             },
+         },
+     },
+@@ -82,6 +84,22 @@ void ifx_pcie_debug(const char *fmt, ...
  	printk("%s", buf);
  }
  
@@ -74,7 +110,17 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  static inline int pcie_ltssm_enable(int pcie_port)
  {
-@@ -988,10 +1016,26 @@ int  ifx_pcie_bios_plat_dev_init(struct
+@@ -857,7 +875,8 @@ pcie_rc_core_int_init(int pcie_port)
+ 	ret = request_irq(pcie_irqs[pcie_port].ir_irq.irq, pcie_rc_core_isr, 0,
+ 		pcie_irqs[pcie_port].ir_irq.name, &ifx_pcie_controller[pcie_port]);
+ 	if (ret)
+-		printk(KERN_ERR "%s request irq %d failed\n", __func__, IFX_PCIE_IR);
++		printk(KERN_ERR "%s request irq %d failed\n", __func__,
++		       pcie_irqs[pcie_port].ir_irq.irq);
+ 
+ 	return ret;
+ }
+@@ -988,10 +1007,26 @@ int  ifx_pcie_bios_plat_dev_init(struct
  static int
  pcie_rc_initialize(int pcie_port)
  {
@@ -103,7 +149,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  	pcie_ep_gpio_rst_init(pcie_port);
  
-@@ -1000,26 +1044,21 @@ pcie_rc_initialize(int pcie_port)
+@@ -1000,26 +1035,21 @@ pcie_rc_initialize(int pcie_port)
  	* reset PCIe PHY will solve this issue 
  	*/
  	for (i = 0; i < IFX_PCIE_PHY_LOOP_CNT; i++) {
@@ -140,7 +186,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  		/* Enable PCIe PHY and Clock */
  		pcie_core_pmu_setup(pcie_port);
-@@ -1035,6 +1074,10 @@ pcie_rc_initialize(int pcie_port)
+@@ -1035,6 +1065,10 @@ pcie_rc_initialize(int pcie_port)
  		/* Once link is up, break out */
  		if (pcie_app_loigc_setup(pcie_port) == 0)
  			break;
@@ -151,7 +197,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  	}
  	if (i >= IFX_PCIE_PHY_LOOP_CNT) {
  		printk(KERN_ERR "%s link up failed!!!!!\n", __func__);
-@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port)
+@@ -1045,17 +1079,73 @@ pcie_rc_initialize(int pcie_port)
  	return 0;
  }
  
@@ -227,15 +273,27 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
      for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){
  	if (pcie_rc_initialize(pcie_port) == 0) {
  	    IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", 
-@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1066,7 +1156,19 @@ static int __init ifx_pcie_bios_init(voi
+                 IFX_PCIE_PRINT(PCIE_MSG_ERR, "%s io space ioremap failed\n", __func__);
                  return -ENOMEM;
              }
++            pcie_irqs[pcie_port].ir_irq.irq = platform_get_irq(pdev, 0);
++            if (pcie_irqs[pcie_port].ir_irq.irq < 0)
++                return pcie_irqs[pcie_port].ir_irq.irq;
++
++            for (int i = 0; i <= 3; i++){
++                pcie_irqs[pcie_port].legacy_irq[i].irq = platform_get_irq(pdev, i + 1);
++
++                if (pcie_irqs[pcie_port].legacy_irq[i].irq < 0)
++                    return pcie_irqs[pcie_port].legacy_irq[i].irq;
++            }
++
              ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base;
 +            pci_load_of_ranges(&ifx_pcie_controller[pcie_port].pcic, node);
  
              register_pci_controller(&ifx_pcie_controller[pcie_port].pcic);
              /* XXX, clear error status */
-@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1083,6 +1185,30 @@ static int __init ifx_pcie_bios_init(voi
  
      return 0;
  }
@@ -408,3 +466,21 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  static inline void pcie_core_pmu_setup(int pcie_port)
  {
  	struct clk *clk;
+--- a/arch/mips/pci/ifxmips_pcie.h
++++ b/arch/mips/pci/ifxmips_pcie.h
+@@ -96,13 +96,13 @@ struct ifx_pci_controller {
+ };
+ 
+ typedef struct ifx_pcie_ir_irq {
+-    const unsigned int irq;
++    unsigned int irq;
+     const char name[16];
+ }ifx_pcie_ir_irq_t;
+ 
+ typedef struct ifx_pcie_legacy_irq{
+     const u32 irq_bit;
+-    const int irq;
++    int irq;
+ }ifx_pcie_legacy_irq_t;
+ 
+ typedef struct ifx_pcie_irq {
diff --git a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
index 0ab929b2e2..b83bf992a6 100644
--- a/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
+++ b/target/linux/lantiq/patches-6.1/0151-lantiq-ifxmips_pcie-use-of.patch
@@ -39,7 +39,19 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  #include "ifxmips_pcie.h"
  #include "ifxmips_pcie_reg.h"
  
-@@ -40,6 +47,11 @@
+@@ -25,11 +32,6 @@
+ #define IFX_PCIE_ERROR_INT
+ #define IFX_PCIE_IO_32BIT
+ 
+-#define IFX_PCIE_IR                     (INT_NUM_IM4_IRL0 + 25)
+-#define IFX_PCIE_INTA                   (INT_NUM_IM4_IRL0 + 8)
+-#define IFX_PCIE_INTB                   (INT_NUM_IM4_IRL0 + 9)
+-#define IFX_PCIE_INTC                   (INT_NUM_IM4_IRL0 + 10)
+-#define IFX_PCIE_INTD                   (INT_NUM_IM4_IRL0 + 11)
+ #define MS(_v, _f)  (((_v) & (_f)) >> _f##_S)
+ #define SM(_v, _f)  (((_v) << _f##_S) & (_f))
+ #define IFX_REG_SET_BIT(_f, _r) \
+@@ -40,30 +42,30 @@
  static DEFINE_SPINLOCK(ifx_pcie_lock);
  
  u32 g_pcie_debug_flag = PCIE_MSG_ANY & (~PCIE_MSG_CFG);
@@ -51,7 +63,31 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  static ifx_pcie_irq_t pcie_irqs[IFX_PCIE_CORE_NR] = {
      {
-@@ -82,6 +94,22 @@ void ifx_pcie_debug(const char *fmt, ...
+         .ir_irq = {
+-            .irq  = IFX_PCIE_IR,
+             .name = "ifx_pcie_rc0",
+         },
+ 
+         .legacy_irq = {
+             {
+                 .irq_bit = PCIE_IRN_INTA,
+-                .irq     = IFX_PCIE_INTA,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTB,
+-                .irq     = IFX_PCIE_INTB,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTC,
+-                .irq     = IFX_PCIE_INTC,
+             },
+             {
+                 .irq_bit = PCIE_IRN_INTD,
+-                .irq     = IFX_PCIE_INTD,
+             },
+         },
+     },
+@@ -82,6 +84,22 @@ void ifx_pcie_debug(const char *fmt, ...
  	printk("%s", buf);
  }
  
@@ -74,7 +110,17 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  static inline int pcie_ltssm_enable(int pcie_port)
  {
-@@ -988,10 +1016,26 @@ int  ifx_pcie_bios_plat_dev_init(struct
+@@ -857,7 +875,8 @@ pcie_rc_core_int_init(int pcie_port)
+ 	ret = request_irq(pcie_irqs[pcie_port].ir_irq.irq, pcie_rc_core_isr, 0,
+ 		pcie_irqs[pcie_port].ir_irq.name, &ifx_pcie_controller[pcie_port]);
+ 	if (ret)
+-		printk(KERN_ERR "%s request irq %d failed\n", __func__, IFX_PCIE_IR);
++		printk(KERN_ERR "%s request irq %d failed\n", __func__,
++		       pcie_irqs[pcie_port].ir_irq.irq);
+ 
+ 	return ret;
+ }
+@@ -988,10 +1007,26 @@ int  ifx_pcie_bios_plat_dev_init(struct
  static int
  pcie_rc_initialize(int pcie_port)
  {
@@ -103,7 +149,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  	pcie_ep_gpio_rst_init(pcie_port);
  
-@@ -1000,26 +1044,21 @@ pcie_rc_initialize(int pcie_port)
+@@ -1000,26 +1035,21 @@ pcie_rc_initialize(int pcie_port)
  	* reset PCIe PHY will solve this issue 
  	*/
  	for (i = 0; i < IFX_PCIE_PHY_LOOP_CNT; i++) {
@@ -140,7 +186,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  
  		/* Enable PCIe PHY and Clock */
  		pcie_core_pmu_setup(pcie_port);
-@@ -1035,6 +1074,10 @@ pcie_rc_initialize(int pcie_port)
+@@ -1035,6 +1065,10 @@ pcie_rc_initialize(int pcie_port)
  		/* Once link is up, break out */
  		if (pcie_app_loigc_setup(pcie_port) == 0)
  			break;
@@ -151,7 +197,7 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  	}
  	if (i >= IFX_PCIE_PHY_LOOP_CNT) {
  		printk(KERN_ERR "%s link up failed!!!!!\n", __func__);
-@@ -1045,17 +1088,73 @@ pcie_rc_initialize(int pcie_port)
+@@ -1045,17 +1079,73 @@ pcie_rc_initialize(int pcie_port)
  	return 0;
  }
  
@@ -227,15 +273,27 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
      for (pcie_port = startup_port; pcie_port < IFX_PCIE_CORE_NR; pcie_port++){
  	if (pcie_rc_initialize(pcie_port) == 0) {
  	    IFX_PCIE_PRINT(PCIE_MSG_INIT, "%s: ifx_pcie_cfg_base 0x%p\n", 
-@@ -1067,6 +1166,7 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1066,7 +1156,19 @@ static int __init ifx_pcie_bios_init(voi
+                 IFX_PCIE_PRINT(PCIE_MSG_ERR, "%s io space ioremap failed\n", __func__);
                  return -ENOMEM;
              }
++            pcie_irqs[pcie_port].ir_irq.irq = platform_get_irq(pdev, 0);
++            if (pcie_irqs[pcie_port].ir_irq.irq < 0)
++                return pcie_irqs[pcie_port].ir_irq.irq;
++
++            for (int i = 0; i <= 3; i++){
++                pcie_irqs[pcie_port].legacy_irq[i].irq = platform_get_irq(pdev, i + 1);
++
++                if (pcie_irqs[pcie_port].legacy_irq[i].irq < 0)
++                    return pcie_irqs[pcie_port].legacy_irq[i].irq;
++            }
++
              ifx_pcie_controller[pcie_port].pcic.io_map_base = (unsigned long)io_map_base;
 +            pci_load_of_ranges(&ifx_pcie_controller[pcie_port].pcic, node);
  
              register_pci_controller(&ifx_pcie_controller[pcie_port].pcic);
              /* XXX, clear error status */
-@@ -1083,6 +1183,30 @@ static int __init ifx_pcie_bios_init(voi
+@@ -1083,6 +1185,30 @@ static int __init ifx_pcie_bios_init(voi
  
      return 0;
  }
@@ -408,3 +466,21 @@ Signed-off-by: Eddi De Pieri <eddi at depieri.net>
  static inline void pcie_core_pmu_setup(int pcie_port)
  {
  	struct clk *clk;
+--- a/arch/mips/pci/ifxmips_pcie.h
++++ b/arch/mips/pci/ifxmips_pcie.h
+@@ -96,13 +96,13 @@ struct ifx_pci_controller {
+ };
+ 
+ typedef struct ifx_pcie_ir_irq {
+-    const unsigned int irq;
++    unsigned int irq;
+     const char name[16];
+ }ifx_pcie_ir_irq_t;
+ 
+ typedef struct ifx_pcie_legacy_irq{
+     const u32 irq_bit;
+-    const int irq;
++    int irq;
+ }ifx_pcie_legacy_irq_t;
+ 
+ typedef struct ifx_pcie_irq {



From lede-commits at lists.infradead.org  Wed May 15 01:21:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:19 -0400
Subject: [openwrt/openwrt]  lantiq: ltq-vmmc: get irqs from kernel-in-tree
 vmmc driver
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36189.1715762093.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/807d9a0f621050737096df6ecca7ae73613e443a

commit 807d9a0f621050737096df6ecca7ae73613e443a
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Mon Apr 15 16:54:59 2024 +0200

    lantiq: ltq-vmmc: get irqs from kernel-in-tree vmmc driver
    
    Let's get the IRQs from the kernel-in-tree vmmc driver like it is
    already done for the cp1 base addr.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 ...-get-irqs-from-kernel-in-tree-vmmc-driver.patch | 89 ++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch b/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch
new file mode 100644
index 0000000000..0ebaef3b9d
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vmmc/patches/605-get-irqs-from-kernel-in-tree-vmmc-driver.patch
@@ -0,0 +1,89 @@
+--- a/src/mps/drv_mps_vmmc_linux.c
++++ b/src/mps/drv_mps_vmmc_linux.c
+@@ -104,6 +104,10 @@ extern irqreturn_t ifx_mps_vc_irq (IFX_i
+ extern IFX_void_t ifx_mps_shutdown (IFX_void_t);
+ extern IFX_int32_t ifx_mps_event_activation_poll (mps_devices type,
+                                                   MbxEventRegs_s * act);
++extern unsigned int ltq_get_mps_ad0_irq(void);
++extern unsigned int ltq_get_mps_ad1_irq(void);
++extern unsigned int ltq_get_mps_vc_irq(int idx);
++
+ mps_mbx_dev *ifx_mps_get_device (mps_devices type);
+ 
+ #ifdef CONFIG_PROC_FS
+@@ -2260,7 +2264,7 @@ IFX_int32_t __init ifx_mps_init_module (
+    /* reset the device before initializing the device driver */
+    ifx_mps_reset ();
+ 
+-  result = request_irq (INT_NUM_IM4_IRL18,
++  result = request_irq (ltq_get_mps_ad0_irq(),
+ #ifdef LINUX_2_6
+                          ifx_mps_ad0_irq, 0x0
+ #else /* */
+@@ -2270,7 +2274,7 @@ IFX_int32_t __init ifx_mps_init_module (
+                          , "mps_mbx ad0", &ifx_mps_dev);
+    if (result)
+       return result;
+-   result = request_irq (INT_NUM_IM4_IRL19,
++   result = request_irq (ltq_get_mps_ad1_irq(),
+ #ifdef LINUX_2_6
+                          ifx_mps_ad1_irq, 0x0
+ #else /* */
+@@ -2285,7 +2289,7 @@ IFX_int32_t __init ifx_mps_init_module (
+    for (i = 0; i < 4; ++i)
+    {
+       sprintf (&voice_channel_int_name[i][0], "mps_mbx vc%d", i);
+-      result = request_irq (INT_NUM_IM4_IRL14 + i,
++      result = request_irq (ltq_get_mps_vc_irq(i),
+ #ifdef LINUX_2_6
+                             ifx_mps_vc_irq, 0x0
+ #else /* */
+@@ -2446,13 +2450,13 @@ ifx_mps_cleanup_module (IFX_void_t)
+    ifx_mps_release_structures (&ifx_mps_dev);
+ 
+    /* release all interrupts at the system */
+-   free_irq (INT_NUM_IM4_IRL18, &ifx_mps_dev);
+-   free_irq (INT_NUM_IM4_IRL19, &ifx_mps_dev);
++   free_irq (ltq_get_mps_ad0_irq(), &ifx_mps_dev);
++   free_irq (ltq_get_mps_ad1_irq(), &ifx_mps_dev);
+ 
+    /* register status interrupts for voice channels */
+    for (i = 0; i < 4; ++i)
+    {
+-      free_irq (INT_NUM_IM4_IRL14 + i, &ifx_mps_dev);
++      free_irq (ltq_get_mps_vc_irq(i), &ifx_mps_dev);
+    }
+ #ifdef CONFIG_PROC_FS
+ #if CONFIG_MPS_HISTORY_SIZE > 0
+--- a/src/mps/drv_mps_vmmc_common.c
++++ b/src/mps/drv_mps_vmmc_common.c
+@@ -134,6 +134,8 @@ extern IFX_void_t mask_and_ack_danube_ir
+ 
+ #endif /* */
+ 
++extern unsigned int ltq_get_mps_vc_irq(int idx);
++
+ extern void sys_hw_setup (void);
+ 
+ extern IFXOS_event_t fw_ready_evt;
+@@ -2979,7 +2981,7 @@ irqreturn_t ifx_mps_ad1_irq (IFX_int32_t
+  */
+ irqreturn_t ifx_mps_vc_irq (IFX_int32_t irq, mps_comm_dev * pDev)
+ {
+-   IFX_uint32_t chan = irq - INT_NUM_IM4_IRL14;
++   IFX_uint32_t chan = irq - ltq_get_mps_vc_irq(0);
+    mps_mbx_dev *mbx_dev = (mps_mbx_dev *) & (pMPSDev->voice_mb[chan]);
+    MPS_VCStatReg_u MPS_VCStatusReg;
+    MbxEventRegs_s events;
+--- a/src/mps/drv_mps_vmmc_device.h
++++ b/src/mps/drv_mps_vmmc_device.h
+@@ -69,9 +69,6 @@
+ #  define IFX_MPS_CVC3SR      IFXMIPS_MPS_CVC3SR
+ #  define IFX_MPS_SAD0SR      IFXMIPS_MPS_SAD0SR
+ /* interrupt vectors */
+-#  define INT_NUM_IM4_IRL14   (INT_NUM_IM4_IRL0 + 14)
+-#  define INT_NUM_IM4_IRL18   (INT_NUM_IM4_IRL0 + 18)
+-#  define INT_NUM_IM4_IRL19   (INT_NUM_IM4_IRL0 + 19)
+ #  define IFX_ICU_IM4_IER     IFXMIPS_ICU_IM4_IER
+ 
+ /* ============================= */



From lede-commits at lists.infradead.org  Wed May 15 01:21:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:21 -0400
Subject: [openwrt/openwrt]  lantiq: ltq-adsl-mei: use platform_get_irq to get
 irqs
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36190.1715762096.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/daa109b42f00af90b5d83cca913a312ee08a6f4e

commit daa109b42f00af90b5d83cca913a312ee08a6f4e
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Apr 16 08:45:17 2024 +0200

    lantiq: ltq-adsl-mei: use platform_get_irq to get irqs
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c   | 51 ++++++++++------------
 .../ltq-adsl-mei/src/ifxmips_mei_interface.h       |  3 +-
 2 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
index 8ccfb443ed..b5e7f07319 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
+++ b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
@@ -61,8 +61,6 @@
 #define IFXMIPS_FUSE_BASE_ADDR            IFX_FUSE_BASE_ADDR
 #define IFXMIPS_ICU_IM0_IER               IFX_ICU_IM0_IER
 #define IFXMIPS_ICU_IM2_IER               IFX_ICU_IM2_IER
-#define LTQ_MEI_INT                   IFX_MEI_INT
-#define LTQ_MEI_DYING_GASP_INT        IFX_MEI_DYING_GASP_INT
 #define LTQ_MEI_BASE_ADDR  		  IFX_MEI_SPACE_ACCESS
 #define IFXMIPS_PMU_PWDCR		  IFX_PMU_PWDCR
 #define IFXMIPS_MPS_CHIPID                IFX_MPS_CHIPID
@@ -86,28 +84,6 @@
 #define LTQ_PMU_BASE_ADDR       0x1F102000
 
 
-#ifdef CONFIG_DANUBE
-# define LTQ_MEI_INT             (INT_NUM_IM1_IRL0 + 23)
-# define LTQ_MEI_DYING_GASP_INT  (INT_NUM_IM1_IRL0 + 21)
-# define LTQ_USB_OC_INT          (INT_NUM_IM4_IRL0 + 23)
-#endif
-
-#ifdef CONFIG_AMAZON_SE
-# define LTQ_MEI_INT             (INT_NUM_IM2_IRL0 + 9)
-# define LTQ_MEI_DYING_GASP_INT  (INT_NUM_IM2_IRL0 + 11)
-# define LTQ_USB_OC_INT          (INT_NUM_IM2_IRL0 + 20)
-#endif
-
-#ifdef CONFIG_AR9
-# define LTQ_MEI_INT             (INT_NUM_IM1_IRL0 + 23)
-# define LTQ_MEI_DYING_GASP_INT  (INT_NUM_IM1_IRL0 + 21)
-# define LTQ_USB_OC_INT          (INT_NUM_IM1_IRL0 + 28)
-#endif
-
-#ifndef LTQ_MEI_INT
-#error "Unknown Lantiq ARCH!"
-#endif
-
 #define LTQ_RCU_RST_REQ_DFE		(1 << 7)
 #define LTQ_RCU_RST_REQ_AFE		(1 << 11)
 
@@ -1350,14 +1326,14 @@ IFX_MEI_RunAdslModem (DSL_DEV_Device_t *pDev)
 	im2_register = (*LTQ_ICU_IM2_IER) & (1 << 20);
 
 	/* Turn off irq */
-	disable_irq (LTQ_USB_OC_INT);
+	disable_irq (pDev->nIrq[IFX_USB_OC]);
 	disable_irq (pDev->nIrq[IFX_DYING_GASP]);
 
 	IFX_MEI_RunArc (pDev);
 
 	MEI_WAIT_EVENT_TIMEOUT (DSL_DEV_PRIVATE(pDev)->wait_queue_modemready, 1000);
 
-	MEI_MASK_AND_ACK_IRQ (LTQ_USB_OC_INT);
+	MEI_MASK_AND_ACK_IRQ (pDev->nIrq[IFX_USB_OC]);
 	MEI_MASK_AND_ACK_IRQ (pDev->nIrq[IFX_DYING_GASP]);
 
 	/* Re-enable irq */
@@ -2304,8 +2280,6 @@ IFX_MEI_InitDevice (int num)
 		sizeof (smmu_mem_info_t) * MAX_BAR_REGISTERS);
 
 	if (num == 0) {
-		pDev->nIrq[IFX_DFEIR]      = LTQ_MEI_INT;
-		pDev->nIrq[IFX_DYING_GASP] = LTQ_MEI_DYING_GASP_INT;
 		pDev->base_address = KSEG1 + LTQ_MEI_BASE_ADDR;
 
                 /* Power up MEI */
@@ -2759,10 +2733,31 @@ static int ltq_mei_probe(struct platform_device *pdev)
 {
 	int i = 0;
 	static struct class *dsl_class;
+	DSL_DEV_Device_t *pDev;
 
 	pr_info("IFX MEI Version %ld.%02ld.%02ld\n", bsp_mei_version.major, bsp_mei_version.minor, bsp_mei_version.revision);
 
 	for (i = 0; i < BSP_MAX_DEVICES; i++) {
+		pDev = &dsl_devices[i];
+
+		pDev->nIrq[IFX_DFEIR] = platform_get_irq(pdev, 0);
+		if (pDev->nIrq[IFX_DFEIR] < 0) {
+			IFX_MEI_EMSG("Failed to get DFEIR irq!\n");
+			return pDev->nIrq[IFX_DFEIR];
+		}
+
+		pDev->nIrq[IFX_DYING_GASP] = platform_get_irq(pdev, 1);
+		if (pDev->nIrq[IFX_DYING_GASP] < 0) {
+			IFX_MEI_EMSG("Failed to get DYING_GASP irq!\n");
+			return pDev->nIrq[IFX_DYING_GASP];
+		}
+
+		pDev->nIrq[IFX_USB_OC] = platform_get_irq(pdev, 2);
+		if (pDev->nIrq[IFX_USB_OC] < 0) {
+			IFX_MEI_EMSG("Failed to get USB_OC irq!\n");
+			return pDev->nIrq[IFX_USB_OC];
+		}
+
 		if (IFX_MEI_InitDevice (i) != 0) {
 			IFX_MEI_EMSG("Init device fail!\n");
 			return -EIO;
diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h b/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
index e5089c43a3..c591bdfb22 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
+++ b/package/kernel/lantiq/ltq-adsl-mei/src/ifxmips_mei_interface.h
@@ -515,9 +515,10 @@ typedef struct DSL_DEV_Device
 	DSL_int_t nInUse;                /* modem state, update by bsp driver, */
 	DSL_void_t *pPriv;
 	DSL_uint32_t base_address;       /* mei base address */
-	DSL_int_t nIrq[2];                  /* irq number */
+	DSL_int_t nIrq[3];                  /* irq number */
 #define IFX_DFEIR		0
 #define IFX_DYING_GASP	1
+#define IFX_USB_OC	2
 	DSL_DEV_MeiDebug_t lop_debugwr;  /* dying gasp */
 	struct module *owner;
 } DSL_DEV_Device_t;			/* ifx_adsl_device_t */



From lede-commits at lists.infradead.org  Wed May 15 01:21:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:18 -0400
Subject: [openwrt/openwrt]  lantiq: vmmc kernel-in-tree driver: use
 platform_get_irq to get irqs
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36191.1715762100.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ece380cf288fff0e090f0f36615581ff0845c202

commit ece380cf288fff0e090f0f36615581ff0845c202
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Mon Apr 15 16:54:07 2024 +0200

    lantiq: vmmc kernel-in-tree driver: use platform_get_irq to get irqs
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 ...-xway-vmmc-use-platform_get_irq-to-get-ir.patch | 97 +++++++++++++++++++++
 ...-xway-vmmc-use-platform_get_irq-to-get-ir.patch | 99 ++++++++++++++++++++++
 2 files changed, 196 insertions(+)

diff --git a/target/linux/lantiq/patches-5.15/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch b/target/linux/lantiq/patches-5.15/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch
new file mode 100644
index 0000000000..472a24e66b
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch
@@ -0,0 +1,97 @@
+From 2b873c59fd313aee57864f96d64a228f2ea7c208 Mon Sep 17 00:00:00 2001
+From: Martin Schiller <ms at dev.tdt.de>
+Date: Mon, 13 May 2024 10:42:24 +0200
+Subject: [PATCH] MIPS: lantiq: xway: vmmc: use platform_get_irq to get irqs
+ from dts
+
+Let's fetch the irqs from the dts here and expose them to the voice
+driver like it is done for the cp1 base memory.
+
+ToDo:
+Maybe it is possible to drop this driver completely and merge this
+handling to the voice driver.
+
+Signed-off-by: Martin Schiller <ms at dev.tdt.de>
+---
+ arch/mips/lantiq/xway/vmmc.c | 53 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 53 insertions(+)
+
+--- a/arch/mips/lantiq/xway/vmmc.c
++++ b/arch/mips/lantiq/xway/vmmc.c
+@@ -13,6 +13,10 @@
+ 
+ static unsigned int *cp1_base;
+ 
++static int ad0_irq;
++static int ad1_irq;
++static int vc_irq[4];
++
+ unsigned int *ltq_get_cp1_base(void)
+ {
+ 	if (!cp1_base)
+@@ -22,16 +26,65 @@ unsigned int *ltq_get_cp1_base(void)
+ }
+ EXPORT_SYMBOL(ltq_get_cp1_base);
+ 
++unsigned int ltq_get_mps_ad0_irq(void)
++{
++	if (!ad0_irq)
++		panic("no ad0 irq was set\n");
++
++	return ad0_irq;
++}
++EXPORT_SYMBOL(ltq_get_mps_ad0_irq);
++
++unsigned int ltq_get_mps_ad1_irq(void)
++{
++	if (!ad1_irq)
++		panic("no ad1 irq was set\n");
++
++	return ad1_irq;
++}
++EXPORT_SYMBOL(ltq_get_mps_ad1_irq);
++
++unsigned int ltq_get_mps_vc_irq(int idx)
++{
++	if (!vc_irq[idx])
++		panic("no vc%d irq was set\n", idx);
++
++	return vc_irq[idx];
++}
++EXPORT_SYMBOL(ltq_get_mps_vc_irq);
++
+ static int vmmc_probe(struct platform_device *pdev)
+ {
+ #define CP1_SIZE       (1 << 20)
+ 	int gpio_count;
+ 	dma_addr_t dma;
++	int i;
+ 
+ 	cp1_base =
+ 		(void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
+ 						    &dma, GFP_KERNEL));
+ 
++	ad0_irq = platform_get_irq(pdev, 4);
++	if (ad0_irq < 0) {
++		dev_err(&pdev->dev, "failed to get MPS AD0 irq: %d\n", ad0_irq);
++		return ad0_irq;
++	}
++
++	ad1_irq = platform_get_irq(pdev, 5);
++	if (ad1_irq < 0) {
++		dev_err(&pdev->dev, "failed to get MPS AD1 irq: %d\n", ad1_irq);
++		return ad1_irq;
++	}
++
++	for (i = 0; i < 4; i++) {
++	vc_irq[i] = platform_get_irq(pdev, i);
++		if (vc_irq[i] < 0) {
++			dev_err(&pdev->dev, "failed to get MPS VC%d irq: %d\n",
++				i, vc_irq[i]);
++			return vc_irq[i];
++		}
++	}
++
+ 	gpio_count = of_gpio_count(pdev->dev.of_node);
+ 	while (gpio_count > 0) {
+ 		enum of_gpio_flags flags;
diff --git a/target/linux/lantiq/patches-6.1/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch b/target/linux/lantiq/patches-6.1/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch
new file mode 100644
index 0000000000..f057ba324e
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0200-MIPS-lantiq-xway-vmmc-use-platform_get_irq-to-get-ir.patch
@@ -0,0 +1,99 @@
+From 2b873c59fd313aee57864f96d64a228f2ea7c208 Mon Sep 17 00:00:00 2001
+From: Martin Schiller <ms at dev.tdt.de>
+Date: Mon, 13 May 2024 10:42:24 +0200
+Subject: [PATCH] MIPS: lantiq: xway: vmmc: use platform_get_irq to get irqs
+ from dts
+
+Let's fetch the irqs from the dts here and expose them to the voice
+driver like it is done for the cp1 base memory.
+
+ToDo:
+Maybe it is possible to drop this driver completely and merge this
+handling to the voice driver.
+
+Signed-off-by: Martin Schiller <ms at dev.tdt.de>
+---
+ arch/mips/lantiq/xway/vmmc.c | 53 ++++++++++++++++++++++++++++++++++++
+ 1 file changed, 53 insertions(+)
+
+--- a/arch/mips/lantiq/xway/vmmc.c
++++ b/arch/mips/lantiq/xway/vmmc.c
+@@ -14,6 +14,10 @@
+ 
+ static unsigned int *cp1_base;
+ 
++static int ad0_irq;
++static int ad1_irq;
++static int vc_irq[4];
++
+ unsigned int *ltq_get_cp1_base(void)
+ {
+ 	if (!cp1_base)
+@@ -23,6 +27,33 @@ unsigned int *ltq_get_cp1_base(void)
+ }
+ EXPORT_SYMBOL(ltq_get_cp1_base);
+ 
++unsigned int ltq_get_mps_ad0_irq(void)
++{
++	if (!ad0_irq)
++		panic("no ad0 irq was set\n");
++
++	return ad0_irq;
++}
++EXPORT_SYMBOL(ltq_get_mps_ad0_irq);
++
++unsigned int ltq_get_mps_ad1_irq(void)
++{
++	if (!ad1_irq)
++		panic("no ad1 irq was set\n");
++
++	return ad1_irq;
++}
++EXPORT_SYMBOL(ltq_get_mps_ad1_irq);
++
++unsigned int ltq_get_mps_vc_irq(int idx)
++{
++	if (!vc_irq[idx])
++		panic("no vc%d irq was set\n", idx);
++
++	return vc_irq[idx];
++}
++EXPORT_SYMBOL(ltq_get_mps_vc_irq);
++
+ static int vmmc_probe(struct platform_device *pdev)
+ {
+ #define CP1_SIZE       (1 << 20)
+@@ -30,11 +61,33 @@ static int vmmc_probe(struct platform_de
+ 	int gpio_count;
+ 	dma_addr_t dma;
+ 	int error;
++	int i;
+ 
+ 	cp1_base =
+ 		(void *) CPHYSADDR(dma_alloc_coherent(&pdev->dev, CP1_SIZE,
+ 						    &dma, GFP_KERNEL));
+ 
++	ad0_irq = platform_get_irq(pdev, 4);
++	if (ad0_irq < 0) {
++		dev_err(&pdev->dev, "failed to get MPS AD0 irq: %d\n", ad0_irq);
++		return ad0_irq;
++	}
++
++	ad1_irq = platform_get_irq(pdev, 5);
++	if (ad1_irq < 0) {
++		dev_err(&pdev->dev, "failed to get MPS AD1 irq: %d\n", ad1_irq);
++		return ad1_irq;
++	}
++
++	for (i = 0; i < 4; i++) {
++	vc_irq[i] = platform_get_irq(pdev, i);
++		if (vc_irq[i] < 0) {
++			dev_err(&pdev->dev, "failed to get MPS VC%d irq: %d\n",
++				i, vc_irq[i]);
++			return vc_irq[i];
++		}
++	}
++
+ 	gpio_count = gpiod_count(&pdev->dev, NULL);
+ 	while (gpio_count > 0) {
+ 		gpio = devm_gpiod_get_index(&pdev->dev,



From lede-commits at lists.infradead.org  Wed May 15 01:21:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:16 -0400
Subject: [openwrt/openwrt]  lantiq: ltq-atm: use platform_get_irq to get irqs
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36192.1715762105.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c143fd9091cc60e38c040588ea32db3acabaf8ed

commit c143fd9091cc60e38c040588ea32db3acabaf8ed
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Fri Apr 12 10:37:58 2024 +0200

    lantiq: ltq-atm: use platform_get_irq to get irqs
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h   |  4 ++--
 .../lantiq/ltq-atm/src/ifxmips_atm_ppe_amazon_se.h |  5 -----
 .../lantiq/ltq-atm/src/ifxmips_atm_ppe_ar9.h       |  5 -----
 .../lantiq/ltq-atm/src/ifxmips_atm_ppe_danube.h    |  5 -----
 .../lantiq/ltq-atm/src/ifxmips_atm_ppe_vr9.h       |  5 -----
 package/kernel/lantiq/ltq-atm/src/ltq_atm.c        | 24 ++++++++++++++--------
 6 files changed, 17 insertions(+), 31 deletions(-)

diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h
index 31b80cf86f..20aa14445a 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_core.h
@@ -25,8 +25,6 @@
 #define IFXMIPS_ATM_CORE_H
 
 
-#define INT_NUM_IM2_IRL24	(INT_NUM_IM2_IRL0 + 24)
-#define INT_NUM_IM2_IRL13	(INT_NUM_IM2_IRL0 + 13)
 #define CONFIG_IFXMIPS_DSL_CPE_MEI
 #define IFX_REG_W32(_v, _r)               __raw_writel((_v), (volatile unsigned int *)(_r))
 #define IFX_REG_R32(_r)                    __raw_readl((volatile unsigned int *)(_r))
@@ -239,6 +237,8 @@ struct atm_priv_data {
 	void *oam_buf_base;
 	void *tx_desc_base;
 	void *tx_skb_base;
+
+	int irq;
 };
 
 #include "ifxmips_atm_ppe_common.h"
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_amazon_se.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_amazon_se.h
index 412f605b2b..a8520300a0 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_amazon_se.h
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_amazon_se.h
@@ -111,11 +111,6 @@
 
 #define EMA_ALIGNMENT                   4
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL13
-
 
 
 #endif  //  IFXMIPS_ATM_PPE_AMAZON_SE_H
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_ar9.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_ar9.h
index fae0252c31..ff5602aa61 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_ar9.h
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_ar9.h
@@ -178,11 +178,6 @@
 
 #define EMA_ALIGNMENT                   4
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
 
 
 #endif  //  IFXMIPS_ATM_PPE_AR9_H
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_danube.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_danube.h
index 7aaaa8db1e..eff1a98819 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_danube.h
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_danube.h
@@ -119,11 +119,6 @@
 
 #define EMA_ALIGNMENT                   4
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
 
 
 #endif  //  IFXMIPS_ATM_PPE_DANUBE_H
diff --git a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_vr9.h b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_vr9.h
index 144c39656c..943350a1b4 100644
--- a/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_vr9.h
+++ b/package/kernel/lantiq/ltq-atm/src/ifxmips_atm_ppe_vr9.h
@@ -182,11 +182,6 @@
 #define PDMA_ALIGNMENT                  4
 #define EMA_ALIGNMENT                   PDMA_ALIGNMENT
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
 
 
 #endif  //  IFXMIPS_ATM_PPE_VR9_H
diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
index 5d23b5ec48..bf2a4a50ec 100644
--- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
+++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c
@@ -435,7 +435,7 @@ static int ppe_open(struct atm_vcc *vcc)
 		*MBOX_IGU1_ISRC = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
 		*MBOX_IGU1_IER  = (1 << RX_DMA_CH_AAL) | (1 << RX_DMA_CH_OAM);
 
-		enable_irq(PPE_MAILBOX_IGU1_INT);
+		enable_irq(g_atm_priv_data.irq);
 	}
 
 	/*  set port    */
@@ -481,7 +481,7 @@ static void ppe_close(struct atm_vcc *vcc)
 
 	/*  disable irq */
 	if ( g_atm_priv_data.conn_table == 0 )
-		disable_irq(PPE_MAILBOX_IGU1_INT);
+		disable_irq(g_atm_priv_data.irq);
 
 	/*  release bandwidth   */
 	switch ( vcc->qos.txtp.traffic_class )
@@ -1022,7 +1022,7 @@ static void do_ppe_tasklet(unsigned long data)
 	else if (*MBOX_IGU1_ISR >> (FIRST_QSB_QID + 16)) /* TX queue */
 		tasklet_schedule(&g_dma_tasklet);
 	else
-		enable_irq(PPE_MAILBOX_IGU1_INT);
+		enable_irq(g_atm_priv_data.irq);
 }
 
 static irqreturn_t mailbox_irq_handler(int irq, void *dev_id)
@@ -1030,7 +1030,7 @@ static irqreturn_t mailbox_irq_handler(int irq, void *dev_id)
 	if ( !*MBOX_IGU1_ISR )
 		return IRQ_HANDLED;
 
-	disable_irq_nosync(PPE_MAILBOX_IGU1_INT);
+	disable_irq_nosync(g_atm_priv_data.irq);
 	tasklet_schedule(&g_dma_tasklet);
 
 	return IRQ_HANDLED;
@@ -1805,17 +1805,23 @@ static int ltq_atm_probe(struct platform_device *pdev)
 		}
 	}
 
+	g_atm_priv_data.irq = platform_get_irq(pdev, 0);
+	if (g_atm_priv_data.irq < 0) {
+		pr_err("platform_get_irq fail");
+		goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
+	}
+
 	/*  register interrupt handler  */
-	ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "atm_mailbox_isr", &g_atm_priv_data);
+	ret = request_irq(g_atm_priv_data.irq, mailbox_irq_handler, 0, "atm_mailbox_isr", &g_atm_priv_data);
 	if ( ret ) {
 		if ( ret == -EBUSY ) {
 			pr_err("IRQ may be occupied by other driver, please reconfig to disable it.\n");
 		} else {
-			pr_err("request_irq fail irq:%d\n", PPE_MAILBOX_IGU1_INT);
+			pr_err("request_irq fail irq:%d\n", g_atm_priv_data.irq);
 		}
 		goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
 	}
-	disable_irq(PPE_MAILBOX_IGU1_INT);
+	disable_irq(g_atm_priv_data.irq);
 
 
 	ret = ops->start(0);
@@ -1845,7 +1851,7 @@ static int ltq_atm_probe(struct platform_device *pdev)
 	return 0;
 
 PP32_START_FAIL:
-	free_irq(PPE_MAILBOX_IGU1_INT, &g_atm_priv_data);
+	free_irq(g_atm_priv_data.irq, &g_atm_priv_data);
 REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL:
 ATM_DEV_REGISTER_FAIL:
 	while ( port_num-- > 0 )
@@ -1868,7 +1874,7 @@ static int ltq_atm_remove(struct platform_device *pdev)
 
 	ops->stop(0);
 
-	free_irq(PPE_MAILBOX_IGU1_INT, &g_atm_priv_data);
+	free_irq(g_atm_priv_data.irq, &g_atm_priv_data);
 
 	for ( port_num = 0; port_num < ATM_PORT_NUMBER; port_num++ )
 		atm_dev_deregister(g_atm_priv_data.port[port_num].dev);



From lede-commits at lists.infradead.org  Wed May 15 01:21:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:15 -0400
Subject: [openwrt/openwrt]  lantiq: ltq-ptm: use platform_get_irq to get irqs
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36195.1715762108.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/52719d90c209185ee13475539d7d68be7ebb16cd

commit 52719d90c209185ee13475539d7d68be7ebb16cd
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Fri Apr 12 08:56:24 2024 +0200

    lantiq: ltq-ptm: use platform_get_irq to get irqs
    
    This is required for linux-6.1 compatibility.
    
    IRQs are not automatically mapped from HW to virtual IRQ numbers when
    the IRQ domain is registered. This happens when the IRQ number is read
    from the device tree based on the IRQ domain from the device tree now.
    In kernel 5.15 it was done when the IRQ domain was registered.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c     | 16 +++++++++++-----
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h     |  2 +-
 .../lantiq/ltq-ptm/src/ifxmips_ptm_ppe_amazon_se.h       |  5 -----
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_ar9.h  |  6 ------
 .../kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_danube.h   |  5 -----
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_vr9.h  |  5 -----
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c     | 16 +++++++++++-----
 package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h     |  3 +--
 8 files changed, 24 insertions(+), 34 deletions(-)

diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
index 91cc97617f..8c829f9c6b 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c
@@ -1491,8 +1491,14 @@ static int ltq_ptm_probe(struct platform_device *pdev)
             goto REGISTER_NETDEV_FAIL;
     }
 
+    g_ptm_priv_data.irq = platform_get_irq(pdev, 0);
+    if (g_ptm_priv_data.irq < 0) {
+        err("platform_get_irq fail");
+        goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
+    }
+
     /*  register interrupt handler  */
-    ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
+    ret = request_irq(g_ptm_priv_data.irq, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
     if ( ret ) {
         if ( ret == -EBUSY ) {
             err("IRQ may be occupied by other driver, please reconfig to disable it.");
@@ -1502,7 +1508,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
         }
         goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
     }
-    disable_irq(PPE_MAILBOX_IGU1_INT);
+    disable_irq(g_ptm_priv_data.irq);
 
     ret = ifx_pp32_start(0);
     if ( ret ) {
@@ -1512,7 +1518,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
     IFX_REG_W32(0, MBOX_IGU1_IER);
     IFX_REG_W32(~0, MBOX_IGU1_ISRC);
 
-    enable_irq(PPE_MAILBOX_IGU1_INT);
+    enable_irq(g_ptm_priv_data.irq);
 
 
     proc_file_create();
@@ -1534,7 +1540,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
     return 0;
 
 PP32_START_FAIL:
-    free_irq(PPE_MAILBOX_IGU1_INT, &g_ptm_priv_data);
+    free_irq(g_ptm_priv_data.irq, &g_ptm_priv_data);
 REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL:
     i = ARRAY_SIZE(g_net_dev);
 REGISTER_NETDEV_FAIL:
@@ -1572,7 +1578,7 @@ static int ltq_ptm_remove(struct platform_device *pdev)
 
     ifx_pp32_stop(0);
 
-    free_irq(PPE_MAILBOX_IGU1_INT, &g_ptm_priv_data);
+    free_irq(g_ptm_priv_data.irq, &g_ptm_priv_data);
 
     for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ )
         unregister_netdev(g_net_dev[i]);
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h
index 6d1cbc7ea3..dd8a2fddca 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.h
@@ -35,7 +35,6 @@
 #include "ifxmips_ptm_fw_regs_adsl.h"
 
 #define CONFIG_IFXMIPS_DSL_CPE_MEI
-#define INT_NUM_IM2_IRL24	(INT_NUM_IM2_IRL0 + 24)
 
 #define IFX_REG_W32(_v, _r)               __raw_writel((_v), (volatile unsigned int *)(_r))
 #define IFX_REG_R32(_r)                    __raw_readl((volatile unsigned int *)(_r))
@@ -104,6 +103,7 @@ struct ptm_itf {
 
 struct ptm_priv_data {
     struct ptm_itf                  itf[MAX_ITF_NUMBER];
+    int                             irq;
 
     void                           *rx_desc_base;
     void                           *tx_desc_base;
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_amazon_se.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_amazon_se.h
index f912039c38..be68d7894f 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_amazon_se.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_amazon_se.h
@@ -176,11 +176,6 @@
 
 #define EMA_ALIGNMENT                           4
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT                    INT_NUM_IM2_IRL13
-
 
 
 #endif  //  IFXMIPS_PTM_PPE_AMAZON_SE_H
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_ar9.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_ar9.h
index 9355747af6..4d730499ba 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_ar9.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_ar9.h
@@ -203,11 +203,5 @@
 #define SW_P2_CTL                       SW_REG(0x00C)
 
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
-
 
 #endif  //  IFXMIPS_PTM_PPE_AR9_H
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_danube.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_danube.h
index 5f896e60c2..f03aae8251 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_danube.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_danube.h
@@ -125,11 +125,6 @@
 
 #define EMA_ALIGNMENT                   4
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
 
 
 #endif  //  IFXMIPS_PTM_PPE_DANUBE_H
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_vr9.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_vr9.h
index 4a8c2f7bc9..52fa286933 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_vr9.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_vr9.h
@@ -195,11 +195,6 @@
 #define PDMA_ALIGNMENT                  32              //  same as Central DMA because of descriptor swap
 #define EMA_ALIGNMENT                   PDMA_ALIGNMENT
 
-/*
- *  Mailbox IGU1 Interrupt
- */
-#define PPE_MAILBOX_IGU1_INT            INT_NUM_IM2_IRL24
-
 
 
 #endif  //  IFXMIPS_PTM_PPE_VR9_H
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index 54d88a21ec..9cd9cd5986 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -1013,8 +1013,14 @@ static int ltq_ptm_probe(struct platform_device *pdev)
             goto REGISTER_NETDEV_FAIL;
     }
 
+    g_ptm_priv_data.irq = platform_get_irq(pdev, 0);
+    if (g_ptm_priv_data.irq < 0) {
+        err("platform_get_irq fail");
+        goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
+    }
+
     /*  register interrupt handler  */
-    ret = request_irq(PPE_MAILBOX_IGU1_INT, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
+    ret = request_irq(g_ptm_priv_data.irq, mailbox_irq_handler, 0, "ptm_mailbox_isr", &g_ptm_priv_data);
     if ( ret ) {
         if ( ret == -EBUSY ) {
             err("IRQ may be occupied by other driver, please reconfig to disable it.");
@@ -1024,7 +1030,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
         }
         goto REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL;
     }
-    disable_irq(PPE_MAILBOX_IGU1_INT);
+    disable_irq(g_ptm_priv_data.irq);
 
     ret = ifx_pp32_start(0);
     if ( ret ) {
@@ -1034,7 +1040,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
     IFX_REG_W32(1 << 16, MBOX_IGU1_IER);    //  enable SWAP interrupt
     IFX_REG_W32(~0, MBOX_IGU1_ISRC);
 
-    enable_irq(PPE_MAILBOX_IGU1_INT);
+    enable_irq(g_ptm_priv_data.irq);
 
     ifx_mei_atm_showtime_check(&g_showtime, &port_cell, &g_xdata_addr);
     if ( g_showtime ) {
@@ -1052,7 +1058,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
     return 0;
 
 PP32_START_FAIL:
-    free_irq(PPE_MAILBOX_IGU1_INT, &g_ptm_priv_data);
+    free_irq(g_ptm_priv_data.irq, &g_ptm_priv_data);
 REQUEST_IRQ_PPE_MAILBOX_IGU1_INT_FAIL:
     i = ARRAY_SIZE(g_net_dev);
 REGISTER_NETDEV_FAIL:
@@ -1080,7 +1086,7 @@ static int ltq_ptm_remove(struct platform_device *pdev)
 
     ifx_pp32_stop(0);
 
-    free_irq(PPE_MAILBOX_IGU1_INT, &g_ptm_priv_data);
+    free_irq(g_ptm_priv_data.irq, &g_ptm_priv_data);
 
     for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ )
         unregister_netdev(g_net_dev[i]);
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h
index b12c354fe0..90ed9d9021 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h
@@ -31,8 +31,6 @@
 #include "ifxmips_ptm_ppe_common.h"
 #include "ifxmips_ptm_fw_regs_vdsl.h"
 
-#define INT_NUM_IM2_IRL24	(INT_NUM_IM2_IRL0 + 24)
-
 #define IFX_REG_W32(_v, _r)               __raw_writel((_v), (volatile unsigned int *)(_r))
 #define IFX_REG_R32(_r)                    __raw_readl((volatile unsigned int *)(_r))
 #define IFX_REG_W32_MASK(_clr, _set, _r)   IFX_REG_W32((IFX_REG_R32((_r)) & ~(_clr)) | (_set), (_r))
@@ -99,6 +97,7 @@ struct ptm_itf {
 
 struct ptm_priv_data {
     struct ptm_itf                  itf[MAX_ITF_NUMBER];
+    int                             irq;
 };
 
 



From lede-commits at lists.infradead.org  Wed May 15 01:21:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:17 -0400
Subject: [openwrt/openwrt]  lantiq: ltq-vmmc: fix write beyond size of field
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36196.1715762111.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5c9817775e31d6d3792f82d23486777da0c12e12

commit 5c9817775e31d6d3792f82d23486777da0c12e12
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Fri Apr 12 15:14:57 2024 +0200

    lantiq: ltq-vmmc: fix write beyond size of field
    
    This fixes the write beyond size of field compile warning/error.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 .../604-fix-write-beyond-size-of-field.patch       | 66 ++++++++++++++++++++++
 1 file changed, 66 insertions(+)

diff --git a/package/kernel/lantiq/ltq-vmmc/patches/604-fix-write-beyond-size-of-field.patch b/package/kernel/lantiq/ltq-vmmc/patches/604-fix-write-beyond-size-of-field.patch
new file mode 100644
index 0000000000..a7343914ac
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vmmc/patches/604-fix-write-beyond-size-of-field.patch
@@ -0,0 +1,66 @@
+--- a/src/drv_vmmc_fw_commands.h
++++ b/src/drv_vmmc_fw_commands.h
+@@ -4628,26 +4628,28 @@ struct RES_DTMFATG_COEF
+ struct CDM_RES_DTMFATG_DATA
+ {
+    CMD_HEAD_BE;
+-   /** Frequency 1 1st Tone or Dual Tone Control Word 1 */
+-   IFX_uint16_t FREQ11_DTC1;
+-   /** Frequency 2 1st Tone or Dual Tone Control Word 2 */
+-   IFX_uint16_t FREQ21_DTC2;
+-   /** Frequency 1 2nd Tone */
+-   IFX_uint16_t FREQ12_DTC3;
+-   /** Frequency 2 2nd Tone */
+-   IFX_uint16_t FREQ22_DTC4;
+-   /** Frequency 1 3rd Tone */
+-   IFX_uint16_t FREQ13_DTC5;
+-   /** Frequency 2 3nd Tone */
+-   IFX_uint16_t FREQ23_DTC6;
+-   /** Frequency 1 4th Tone */
+-   IFX_uint16_t FREQ14_DTC7;
+-   /** Frequency 2 4th Tone */
+-   IFX_uint16_t FREQ24_DTC8;
+-   /** Frequency 1 5th Tone */
+-   IFX_uint16_t FREQ15_DTC9;
+-   /** Frequency 2 5th Tone */
+-   IFX_uint16_t FREQ25_DTC10;
++   struct_group(FREQS,
++       /** Frequency 1 1st Tone or Dual Tone Control Word 1 */
++       IFX_uint16_t FREQ11_DTC1;
++       /** Frequency 2 1st Tone or Dual Tone Control Word 2 */
++       IFX_uint16_t FREQ21_DTC2;
++       /** Frequency 1 2nd Tone */
++       IFX_uint16_t FREQ12_DTC3;
++       /** Frequency 2 2nd Tone */
++       IFX_uint16_t FREQ22_DTC4;
++       /** Frequency 1 3rd Tone */
++       IFX_uint16_t FREQ13_DTC5;
++       /** Frequency 2 3nd Tone */
++       IFX_uint16_t FREQ23_DTC6;
++       /** Frequency 1 4th Tone */
++       IFX_uint16_t FREQ14_DTC7;
++       /** Frequency 2 4th Tone */
++       IFX_uint16_t FREQ24_DTC8;
++       /** Frequency 1 5th Tone */
++       IFX_uint16_t FREQ15_DTC9;
++       /** Frequency 2 5th Tone */
++       IFX_uint16_t FREQ25_DTC10;
++   );
+ } __PACKED__ ;
+ 
+ 
+--- a/src/drv_vmmc_sig_dtmfg.c
++++ b/src/drv_vmmc_sig_dtmfg.c
+@@ -742,10 +742,8 @@ IFX_int32_t irq_VMMC_SIG_DtmfOnRequest(V
+       /* Get a pointer to the data area which is behind the header of the cmd */
+       pAtgCmd = &pDtmfAtgData->FREQ11_DTC1;
+ 
+-      /* Wipe the data area in the command. The size of this area is
+-         command size - header size. */
+-      /*lint -e(419) */
+-      memset (pAtgCmd, 0x00, sizeof(CDM_RES_DTMFATG_DATA_t) - CMD_HDR_CNT);
++      /* Wipe the data area in the command. */
++      memset (&pDtmfAtgData->FREQS, 0x00, sizeof(pDtmfAtgData->FREQS));
+ 
+       /* Fill the data area */
+       if (pDtmf->bByteMode == IFX_TRUE)



From lede-commits at lists.infradead.org  Wed May 15 01:21:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 15 May 2024 04:21:22 -0400
Subject: [openwrt/openwrt]  lantiq: add patch to fix the reset gpio handling
 in the pci driver
In-Reply-To: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
References: <171576126230.2396121.5586913629755355712@git-01.infra.openwrt.org>
Message-ID: <mailman.36197.1715762115.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cffd3ad8d7cad2214d44695ad4f2405ea53a26c7

commit cffd3ad8d7cad2214d44695ad4f2405ea53a26c7
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Mon May 6 11:01:15 2024 +0200

    lantiq: add patch to fix the reset gpio handling in the pci driver
    
    Linux kernel commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using
    gpiod API") not only switched to the gpiod API, but also inverted /
    changed the polarity of the GPIO.
    
    According to the PCI specification, the RST# pin is an active-low
    signal. However, most of the device trees that have been widely used for
    a long time (mainly in the openWrt project) define this GPIO as
    active-high and the old driver code inverted the signal internally.
    
    Apparently there are actually boards where the reset gpio must be
    operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH
    flag for initialization. Instead, we must explicitly set the gpio to
    value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
    may have been set.
    
    In order to remain compatible with all these existing device trees, we
    should therefore keep the logic as it was before the commit.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 ...PS-pci-lantiq-restore-reset-gpio-polarity.patch | 62 ++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/target/linux/lantiq/patches-6.1/0002-MIPS-pci-lantiq-restore-reset-gpio-polarity.patch b/target/linux/lantiq/patches-6.1/0002-MIPS-pci-lantiq-restore-reset-gpio-polarity.patch
new file mode 100644
index 0000000000..6b70f8b9a7
--- /dev/null
+++ b/target/linux/lantiq/patches-6.1/0002-MIPS-pci-lantiq-restore-reset-gpio-polarity.patch
@@ -0,0 +1,62 @@
+From f038380835033e376d89c72516f087254792bbad Mon Sep 17 00:00:00 2001
+From: Martin Schiller <ms at dev.tdt.de>
+Date: Mon, 6 May 2024 09:41:42 +0200
+Subject: [PATCH] MIPS: pci: lantiq: restore reset gpio polarity
+
+Commit 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API") not
+only switched to the gpiod API, but also inverted / changed the polarity
+of the GPIO.
+
+According to the PCI specification, the RST# pin is an active-low
+signal. However, most of the device trees that have been widely used for
+a long time (mainly in the openWrt project) define this GPIO as
+active-high and the old driver code inverted the signal internally.
+
+Apparently there are actually boards where the reset gpio must be
+operated inverted. For this reason, we cannot use the GPIOD_OUT_LOW/HIGH
+flag for initialization. Instead, we must explicitly set the gpio to
+value 1 in order to take into account any "GPIO_ACTIVE_LOW" flag that
+may have been set.
+
+In order to remain compatible with all these existing device trees, we
+should therefore keep the logic as it was before the commit.
+
+Fixes: 90c2d2eb7ab5 ("MIPS: pci: lantiq: switch to using gpiod API")
+Cc: stable at vger.kernel.org
+Signed-off-by: Martin Schiller <ms at dev.tdt.de>
+---
+ arch/mips/pci/pci-lantiq.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/mips/pci/pci-lantiq.c
++++ b/arch/mips/pci/pci-lantiq.c
+@@ -124,14 +124,14 @@ static int ltq_pci_startup(struct platfo
+ 		clk_disable(clk_external);
+ 
+ 	/* setup reset gpio used by pci */
+-	reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
+-					     GPIOD_OUT_LOW);
++	reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset", GPIOD_ASIS);
+ 	error = PTR_ERR_OR_ZERO(reset_gpio);
+ 	if (error) {
+ 		dev_err(&pdev->dev, "failed to request gpio: %d\n", error);
+ 		return error;
+ 	}
+ 	gpiod_set_consumer_name(reset_gpio, "pci_reset");
++	gpiod_direction_output(reset_gpio, 1);
+ 
+ 	/* enable auto-switching between PCI and EBU */
+ 	ltq_pci_w32(0xa, PCI_CR_CLK_CTRL);
+@@ -194,10 +194,10 @@ static int ltq_pci_startup(struct platfo
+ 
+ 	/* toggle reset pin */
+ 	if (reset_gpio) {
+-		gpiod_set_value_cansleep(reset_gpio, 1);
++		gpiod_set_value_cansleep(reset_gpio, 0);
+ 		wmb();
+ 		mdelay(1);
+-		gpiod_set_value_cansleep(reset_gpio, 0);
++		gpiod_set_value_cansleep(reset_gpio, 1);
+ 	}
+ 	return 0;
+ }



From lede-commits at lists.infradead.org  Thu May 16 02:46:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 05:46:27 -0400
Subject: [openwrt/openwrt]  mac80211: Add support for RTL8723BE
In-Reply-To: <171585278739.417044.13985713997826523014@git-01.infra.openwrt.org>
References: <171585278739.417044.13985713997826523014@git-01.infra.openwrt.org>
Message-ID: <mailman.36443.1715852806.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8b0fa6d30b12b5de07ffea2e7d8552e0640c3e15

commit 8b0fa6d30b12b5de07ffea2e7d8552e0640c3e15
Author: David Adriao <davidadriao at dglitch.com>
AuthorDate: Fri May 10 21:10:48 2024 +0100

    mac80211: Add support for RTL8723BE
    
    This adds support for the RTL8723BE PCIe Wi-Fi Adapter by adding backports drivers
    
    Signed-off-by: David Adriao <davidadriao at dglitch.com>
    [Do not remove rtl8xxxu and add dependency to rtl8723be-firmware]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/linux-firmware/realtek.mk |  8 ++++++++
 package/kernel/mac80211/realtek.mk         | 21 ++++++++++++++++++++-
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/package/firmware/linux-firmware/realtek.mk b/package/firmware/linux-firmware/realtek.mk
index e077c796be..cd64d79d63 100644
--- a/package/firmware/linux-firmware/realtek.mk
+++ b/package/firmware/linux-firmware/realtek.mk
@@ -87,6 +87,14 @@ define Package/rtl8723au-firmware/install
 endef
 $(eval $(call BuildPackage,rtl8723au-firmware))
 
+Package/rtl8723be-firmware = $(call Package/firmware-default,RealTek RTL8723BE firmware,,LICENCE.rtlwifi_firmware.txt)
+define Package/rtl8723be-firmware/install
+	$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723befw_36.bin $(1)/lib/firmware/rtlwifi
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/rtlwifi/rtl8723befw.bin $(1)/lib/firmware/rtlwifi
+endef
+$(eval $(call BuildPackage,rtl8723be-firmware))
+
 Package/rtl8723bu-firmware = $(call Package/firmware-default,RealTek RTL8723BU firmware,,LICENCE.rtlwifi_firmware.txt)
 define Package/rtl8723bu-firmware/install
 	$(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
diff --git a/package/kernel/mac80211/realtek.mk b/package/kernel/mac80211/realtek.mk
index 04057b3106..28ea6a6571 100644
--- a/package/kernel/mac80211/realtek.mk
+++ b/package/kernel/mac80211/realtek.mk
@@ -1,6 +1,6 @@
 PKG_DRIVERS += \
 	rtlwifi rtlwifi-pci rtlwifi-btcoexist rtlwifi-usb rtl8192c-common \
-	rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723bs rtl8821ae \
+	rtl8192ce rtl8192se rtl8192de rtl8192cu rtl8723-common rtl8723be rtl8723bs rtl8821ae \
 	rtl8xxxu rtw88 rtw88-pci rtw88-usb rtw88-8821c rtw88-8822b rtw88-8822c \
 	rtw88-8723d rtw88-8821ce rtw88-8821cu rtw88-8822be rtw88-8822bu \
 	rtw88-8822ce rtw88-8822cu rtw88-8723de
@@ -20,6 +20,9 @@ config-$(CONFIG_PACKAGE_RTLWIFI_DEBUG) += RTLWIFI_DEBUG
 config-$(call config_package,rtl8xxxu) += RTL8XXXU
 config-y += RTL8XXXU_UNTESTED
 
+config-$(call config_package,rtl8723-common) += RTL8723_COMMON
+config-$(call config_package,rtl8723be) += RTL8723BE
+
 config-$(call config_package,rtl8723bs) += RTL8723BS
 config-y += STAGING
 
@@ -299,6 +302,22 @@ define KernelPackage/rtw88-8723de
   AUTOLOAD:=$(call AutoProbe,rtw88_8723)
 endef
 
+define KernelPackage/rtl8723-common
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8723AE/RTL8723BE common support module
+  DEPENDS+= +kmod-rtlwifi
+  FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8723com/rtl8723-common.ko
+  HIDDEN:=1
+endef
+
+define KernelPackage/rtl8723be
+  $(call KernelPackage/mac80211/Default)
+  TITLE:=Realtek RTL8723AE/RTL8723BE support
+  DEPENDS+= +kmod-rtlwifi-btcoexist +kmod-rtlwifi-pci +kmod-rtl8723-common +rtl8723be-firmware
+  FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/realtek/rtlwifi/rtl8723be/rtl8723be.ko
+  AUTOLOAD:=$(call AutoProbe,rtl8723be)
+endef
+
 define KernelPackage/rtl8723bs
   $(call KernelPackage/mac80211/Default)
   TITLE:=Realtek RTL8723BS SDIO Wireless LAN NIC driver (staging)



From lede-commits at lists.infradead.org  Thu May 16 03:04:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 06:04:30 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.158
In-Reply-To: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
References: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
Message-ID: <mailman.36448.1715853873.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/01c58a0d2a18ec10c77daaf68244212b5cd77223

commit 01c58a0d2a18ec10c77daaf68244212b5cd77223
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat May 11 19:52:13 2024 +0200

    kernel: bump 5.15 to 5.15.158
    
    Removed because they are upstream:
       generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=506ac5538498717fce699feaddb2ed97ae1c3ca7
    
       generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2f83d3d2cc3c0df89f833cd8c09989187f0c3ce1
    
    Manually adapted:
       generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 1fae75ebd968f9cc1f254dbcdf6a16b27c2b3145)
---
 include/kernel-5.15                                |  4 +-
 .../patches-5.15/209-b44-register-adm-switch.patch |  6 +--
 .../bcm47xx/patches-5.15/210-b44_phy_fix.patch     |  2 +-
 ...x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch |  4 +-
 .../020-v6.1-05-mm-multi-gen-LRU-groundwork.patch  |  2 +-
 ...ediatek-mt7622-add-support-for-coherent-D.patch | 30 -----------
 ...ediatek-mt7622-introduce-nodes-for-Wirele.patch | 62 ----------------------
 ...t-mtk_eth_soc-use-standard-property-for-c.patch |  2 +-
 ...5.17-net-usb-ax88179_178a-add-TSO-feature.patch |  4 +-
 ...tusb-Support-public-address-configuration.patch |  4 +-
 ...tusb-Fix-application-of-sizeof-to-pointer.patch |  2 +-
 ...tusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch |  2 +-
 ...tusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch |  2 +-
 ...tusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch |  2 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 18 +++----
 .../patches-5.15/104-mt7622-add-snor-irq.patch     |  2 +-
 ...rm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch |  2 +-
 ...arm64-dts-mediatek-mt7622-fix-GICv2-range.patch |  2 +-
 ...mt7622-specify-the-number-of-DMA-requests.patch |  2 +-
 ...ediatek-Split-PCIe-node-for-MT2712-and-MT.patch |  4 +-
 ...64-dts-mediatek-add-mt7622-pcie-slot-node.patch |  4 +-
 ...cie-mediatek-add-support-for-coherent-DMA.patch |  4 +-
 target/linux/x86/config-5.15                       |  2 +-
 23 files changed, 38 insertions(+), 130 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 3289f828be..71d13ebc5f 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .157
-LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414
+LINUX_VERSION-5.15 = .158
+LINUX_KERNEL_HASH-5.15.158 = f9071c83a4fd8b80af026b48cfc1869bfa25883f9148b92b5dc1e1e1e26dd5c6
diff --git a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
index 772e905ecb..ddf9d0dfb9 100644
--- a/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
+++ b/target/linux/bcm47xx/patches-5.15/209-b44-register-adm-switch.patch
@@ -19,7 +19,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  
  #include <linux/uaccess.h>
  #include <asm/io.h>
-@@ -2245,6 +2247,69 @@ static void b44_adjust_link(struct net_d
+@@ -2247,6 +2249,69 @@ static void b44_adjust_link(struct net_d
  	}
  }
  
@@ -89,7 +89,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  static int b44_register_phy_one(struct b44 *bp)
  {
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
-@@ -2281,6 +2346,9 @@ static int b44_register_phy_one(struct b
+@@ -2283,6 +2348,9 @@ static int b44_register_phy_one(struct b
  	if (!mdiobus_is_registered_device(bp->mii_bus, bp->phy_addr) &&
  	    (sprom->boardflags_lo & (B44_BOARDFLAG_ROBO | B44_BOARDFLAG_ADM))) {
  
@@ -99,7 +99,7 @@ Subject: [PATCH 210/210] b44: register adm switch
  		dev_info(sdev->dev,
  			 "could not find PHY at %i, use fixed one\n",
  			 bp->phy_addr);
-@@ -2475,6 +2543,7 @@ static void b44_remove_one(struct ssb_de
+@@ -2477,6 +2545,7 @@ static void b44_remove_one(struct ssb_de
  	unregister_netdev(dev);
  	if (bp->flags & B44_FLAG_EXTERNAL_PHY)
  		b44_unregister_phy_one(bp);
diff --git a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
index ca7123f2a3..9c16da4f57 100644
--- a/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
+++ b/target/linux/bcm47xx/patches-5.15/210-b44_phy_fix.patch
@@ -43,7 +43,7 @@
  
  	if (bp->flags & B44_FLAG_EXTERNAL_PHY)
  		return 0;
-@@ -2175,6 +2200,8 @@ static int b44_get_invariants(struct b44
+@@ -2177,6 +2202,8 @@ static int b44_get_invariants(struct b44
  	 * valid PHY address. */
  	bp->phy_addr &= 0x1F;
  
diff --git a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
index 2ea2e2497a..8e4de36db0 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-02-mm-x86-add-CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG.patch
@@ -73,7 +73,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/arch/Kconfig
 +++ b/arch/Kconfig
-@@ -1299,6 +1299,14 @@ config ARCH_HAS_ELFCORE_COMPAT
+@@ -1307,6 +1307,14 @@ config ARCH_HAS_ELFCORE_COMPAT
  config ARCH_HAS_PARANOID_L1D_FLUSH
  	bool
  
@@ -90,7 +90,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  source "scripts/gcc-plugins/Kconfig"
 --- a/arch/x86/Kconfig
 +++ b/arch/x86/Kconfig
-@@ -85,6 +85,7 @@ config X86
+@@ -86,6 +86,7 @@ config X86
  	select ARCH_HAS_PMEM_API		if X86_64
  	select ARCH_HAS_PTE_DEVMAP		if X86_64
  	select ARCH_HAS_PTE_SPECIAL
diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
index 85710eb79b..ff4bb4df3e 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
@@ -552,7 +552,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 --- a/kernel/bounds.c
 +++ b/kernel/bounds.c
 @@ -22,6 +22,11 @@ int main(void)
- 	DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS));
+ 	DEFINE(NR_CPUS_BITS, order_base_2(CONFIG_NR_CPUS));
  #endif
  	DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
 +#ifdef CONFIG_LRU_GEN
diff --git a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch b/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
deleted file mode 100644
index 9f2512a1d0..0000000000
--- a/target/linux/generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Mon, 7 Feb 2022 10:27:22 +0100
-Subject: [PATCH] arm64: dts: mediatek: mt7622: add support for coherent
- DMA
-
-It improves performance by eliminating the need for a cache flush on rx and tx
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -357,7 +357,7 @@
- 		};
- 
- 		cci_control2: slave-if at 5000 {
--			compatible = "arm,cci-400-ctrl-if";
-+			compatible = "arm,cci-400-ctrl-if", "syscon";
- 			interface-type = "ace";
- 			reg = <0x5000 0x1000>;
- 		};
-@@ -938,6 +938,8 @@
- 		power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
- 		mediatek,ethsys = <&ethsys>;
- 		mediatek,sgmiisys = <&sgmiisys>;
-+		mediatek,cci-control = <&cci_control2>;
-+		dma-coherent;
- 		#address-cells = <1>;
- 		#size-cells = <0>;
- 		status = "disabled";
diff --git a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch b/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
deleted file mode 100644
index 2c6e3fd3cd..0000000000
--- a/target/linux/generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sat, 5 Feb 2022 18:36:36 +0100
-Subject: [PATCH] arm64: dts: mediatek: mt7622: introduce nodes for
- Wireless Ethernet Dispatch
-
-Introduce wed0 and wed1 nodes in order to enable offloading forwarding
-between ethernet and wireless devices on the mt7622 chipset.
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -894,6 +894,11 @@
- 		};
- 	};
- 
-+	hifsys: syscon at 1af00000 {
-+		compatible = "mediatek,mt7622-hifsys", "syscon";
-+		reg = <0 0x1af00000 0 0x70>;
-+	};
-+
- 	ethsys: syscon at 1b000000 {
- 		compatible = "mediatek,mt7622-ethsys",
- 			     "syscon";
-@@ -912,6 +917,26 @@
- 		#dma-cells = <1>;
- 	};
- 
-+	pcie_mirror: pcie-mirror at 10000400 {
-+		compatible = "mediatek,mt7622-pcie-mirror",
-+			     "syscon";
-+		reg = <0 0x10000400 0 0x10>;
-+	};
-+
-+	wed0: wed at 1020a000 {
-+		compatible = "mediatek,mt7622-wed",
-+			     "syscon";
-+		reg = <0 0x1020a000 0 0x1000>;
-+		interrupts = <GIC_SPI 214 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+
-+	wed1: wed at 1020b000 {
-+		compatible = "mediatek,mt7622-wed",
-+			     "syscon";
-+		reg = <0 0x1020b000 0 0x1000>;
-+		interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_LOW>;
-+	};
-+
- 	eth: ethernet at 1b100000 {
- 		compatible = "mediatek,mt7622-eth",
- 			     "mediatek,mt2701-eth",
-@@ -939,6 +964,9 @@
- 		mediatek,ethsys = <&ethsys>;
- 		mediatek,sgmiisys = <&sgmiisys>;
- 		mediatek,cci-control = <&cci_control2>;
-+		mediatek,wed = <&wed0>, <&wed1>;
-+		mediatek,pcie-mirror = <&pcie_mirror>;
-+		mediatek,hifsys = <&hifsys>;
- 		dma-coherent;
- 		#address-cells = <1>;
- 		#size-cells = <0>;
diff --git a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
index 70d46c16cd..22125a4546 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
@@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -963,7 +963,7 @@
+@@ -957,7 +957,7 @@
  		power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
  		mediatek,ethsys = <&ethsys>;
  		mediatek,sgmiisys = <&sgmiisys>;
diff --git a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
index 698e524c35..b2af169b92 100644
--- a/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
+++ b/target/linux/generic/backport-5.15/797-v5.17-net-usb-ax88179_178a-add-TSO-feature.patch
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ax88179_reset(dev);
  
-@@ -1507,17 +1508,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
+@@ -1502,17 +1503,19 @@ ax88179_tx_fixup(struct usbnet *dev, str
  {
  	u32 tx_hdr1, tx_hdr2;
  	int frame_size = dev->maxpacket;
@@ -57,7 +57,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if ((skb_header_cloned(skb) || headroom < 0) &&
  	    pskb_expand_head(skb, headroom < 0 ? 8 : 0, 0, GFP_ATOMIC)) {
  		dev_kfree_skb_any(skb);
-@@ -1528,6 +1531,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
+@@ -1523,6 +1526,8 @@ ax88179_tx_fixup(struct usbnet *dev, str
  	put_unaligned_le32(tx_hdr1, ptr);
  	put_unaligned_le32(tx_hdr2, ptr + 4);
  
diff --git a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
index 725af4b52c..4a63b89f57 100644
--- a/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
+++ b/target/linux/generic/backport-5.15/821-v5.16-Bluetooth-btusb-Support-public-address-configuration.patch
@@ -17,7 +17,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -2287,6 +2287,23 @@ struct btmtk_section_map {
+@@ -2289,6 +2289,23 @@ struct btmtk_section_map {
  	};
  } __packed;
  
@@ -41,7 +41,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
  static void btusb_mtk_wmt_recv(struct urb *urb)
  {
  	struct hci_dev *hdev = urb->context;
-@@ -3941,6 +3958,7 @@ static int btusb_probe(struct usb_interf
+@@ -3943,6 +3960,7 @@ static int btusb_probe(struct usb_interf
  		hdev->shutdown = btusb_mtk_shutdown;
  		hdev->manufacturer = 70;
  		hdev->cmd_timeout = btusb_mtk_cmd_timeout;
diff --git a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
index d72866eabf..d21adada97 100644
--- a/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
+++ b/target/linux/generic/backport-5.15/822-v5.17-Bluetooth-btusb-Fix-application-of-sizeof-to-pointer.patch
@@ -18,7 +18,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -2292,7 +2292,7 @@ static int btusb_set_bdaddr_mtk(struct h
+@@ -2294,7 +2294,7 @@ static int btusb_set_bdaddr_mtk(struct h
  	struct sk_buff *skb;
  	long ret;
  
diff --git a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
index ebb6cc4717..30492ac48d 100644
--- a/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/823-v5.18-Bluetooth-btusb-Add-a-new-PID-VID-13d3-3567-for-MT79.patch
@@ -58,7 +58,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -476,6 +476,9 @@ static const struct usb_device_id blackl
+@@ -478,6 +478,9 @@ static const struct usb_device_id blackl
  	{ USB_DEVICE(0x13d3, 0x3564), .driver_info = BTUSB_MEDIATEK |
  						     BTUSB_WIDEBAND_SPEECH |
  						     BTUSB_VALID_LE_STATES },
diff --git a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
index a8c7ca003a..6bcd81c3b8 100644
--- a/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/824-v5.19-Bluetooth-btusb-Add-a-new-PID-VID-0489-e0c8-for-MT79.patch
@@ -56,7 +56,7 @@ Signed-off-by: Marcel Holtmann <marcel at holtmann.org>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -467,6 +467,9 @@ static const struct usb_device_id blackl
+@@ -469,6 +469,9 @@ static const struct usb_device_id blackl
  						     BTUSB_VALID_LE_STATES },
  
  	/* Additional MediaTek MT7921 Bluetooth devices */
diff --git a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
index b46e6926d1..b6b76f64fc 100644
--- a/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
+++ b/target/linux/generic/backport-5.15/825-v6.1-Bluetooth-btusb-Add-a-new-VID-PID-0e8d-0608-for-MT79.patch
@@ -54,7 +54,7 @@ Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>
 
 --- a/drivers/bluetooth/btusb.c
 +++ b/drivers/bluetooth/btusb.c
-@@ -485,6 +485,9 @@ static const struct usb_device_id blackl
+@@ -487,6 +487,9 @@ static const struct usb_device_id blackl
  	{ USB_DEVICE(0x0489, 0xe0cd), .driver_info = BTUSB_MEDIATEK |
  						     BTUSB_WIDEBAND_SPEECH |
  						     BTUSB_VALID_LE_STATES },
diff --git a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 66fd6efed5..6eb72abaa7 100644
--- a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -136,14 +136,14 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   * eth_type_trans - determine the packet's protocol ID.
   * @skb: received socket data
-@@ -173,6 +185,10 @@ __be16 eth_type_trans(struct sk_buff *sk
- 		} else {
- 			skb->pkt_type = PACKET_OTHERHOST;
- 		}
-+
-+		if (eth_check_local_mask(eth->h_dest, dev->dev_addr,
-+					 dev->local_addr_mask))
-+			skb->gro_skip = 1;
- 	}
+@@ -165,6 +177,10 @@ __be16 eth_type_trans(struct sk_buff *sk
+ 
+ 	eth_skb_pkt_type(skb, dev);
  
++	if (unlikely(!ether_addr_equal_64bits(eth->h_dest, dev->dev_addr)) &&
++	    eth_check_local_mask(eth->h_dest, dev->dev_addr, dev->local_addr_mask))
++		skb->gro_skip = 1;
++
  	/*
+ 	 * Some variants of DSA tagging don't have an ethertype field
+ 	 * at all, so we check here whether one of those tagging
diff --git a/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch b/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch
index 79b051147a..88aab4129d 100644
--- a/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch
+++ b/target/linux/mediatek/patches-5.15/104-mt7622-add-snor-irq.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -559,6 +559,7 @@
+@@ -556,6 +556,7 @@
  		compatible = "mediatek,mt7622-nor",
  			     "mediatek,mt8173-nor";
  		reg = <0 0x11014000 0 0xe0>;
diff --git a/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch b/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch
index 15d2671372..56548f3ace 100644
--- a/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch
+++ b/target/linux/mediatek/patches-5.15/120-14-v5.19-arm64-dts-mediatek-add-mtk-snfi-for-mt7622.patch
@@ -14,7 +14,7 @@ Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -553,6 +553,18 @@
+@@ -550,6 +550,18 @@
  		status = "disabled";
  	};
  
diff --git a/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch b/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
index 39a9770d98..8b41000a69 100644
--- a/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
+++ b/target/linux/mediatek/patches-5.15/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
@@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -339,7 +339,7 @@
+@@ -337,7 +337,7 @@
  		#interrupt-cells = <3>;
  		interrupt-parent = <&gic>;
  		reg = <0 0x10310000 0 0x1000>,
diff --git a/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch b/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch
index 4fef9aea22..506a65266d 100644
--- a/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch
+++ b/target/linux/mediatek/patches-5.15/192-v5.19-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch
@@ -112,7 +112,7 @@ Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -942,6 +942,7 @@
+@@ -938,6 +938,7 @@
  		clock-names = "hsdma";
  		power-domains = <&scpsys MT7622_POWER_DOMAIN_ETHSYS>;
  		#dma-cells = <1>;
diff --git a/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch b/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch
index dc9dbad250..4ca9f9c724 100644
--- a/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch
+++ b/target/linux/mediatek/patches-5.15/600-v5.16-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-and-MT.patch
@@ -21,7 +21,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi
-@@ -915,64 +915,67 @@
+@@ -916,64 +916,67 @@
  		};
  	};
  
@@ -194,7 +194,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  &pio {
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -809,75 +809,83 @@
+@@ -804,75 +804,83 @@
  		#reset-cells = <1>;
  	};
  
diff --git a/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch b/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
index bf479ab53b..d58082aa6f 100644
--- a/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
+++ b/target/linux/mediatek/patches-5.15/602-arm64-dts-mediatek-add-mt7622-pcie-slot-node.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -849,6 +849,12 @@
+@@ -844,6 +844,12 @@
  			#address-cells = <0>;
  			#interrupt-cells = <1>;
  		};
@@ -13,7 +13,7 @@
  	};
  
  	pcie1: pcie at 1a145000 {
-@@ -887,6 +893,12 @@
+@@ -882,6 +888,12 @@
  			#address-cells = <0>;
  			#interrupt-cells = <1>;
  		};
diff --git a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index 76ee2fc89a..a3247f1779 100644
--- a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -837,6 +837,9 @@
+@@ -832,6 +832,9 @@
  		bus-range = <0x00 0xff>;
  		ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x8000000>;
  		status = "disabled";
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		#interrupt-cells = <1>;
  		interrupt-map-mask = <0 0 0 7>;
-@@ -881,6 +884,9 @@
+@@ -876,6 +879,9 @@
  		bus-range = <0x00 0xff>;
  		ranges = <0x82000000 0 0x28000000 0x0 0x28000000 0 0x8000000>;
  		status = "disabled";
diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15
index 253c6de7e4..71a5313b0e 100644
--- a/target/linux/x86/config-5.15
+++ b/target/linux/x86/config-5.15
@@ -58,6 +58,7 @@ CONFIG_CPU_IBRS_ENTRY=y
 # CONFIG_SLS is not set
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_SUP_AMD=y
 CONFIG_CPU_SUP_CENTAUR=y
 CONFIG_CPU_SUP_CYRIX_32=y
@@ -329,7 +330,6 @@ CONFIG_SG_POOL=y
 # CONFIG_SMSC_SCH311X_WDT is not set
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SRCU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set
 CONFIG_SYSCTL_EXCEPTION_TRACE=y



From lede-commits at lists.infradead.org  Thu May 16 03:04:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 06:04:29 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.157
In-Reply-To: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
References: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
Message-ID: <mailman.36451.1715853876.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/438e593f221fb59f12bfa6252bdf5eaffa4169e1

commit 438e593f221fb59f12bfa6252bdf5eaffa4169e1
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 28 21:35:55 2024 +0200

    kernel: bump 5.15 to 5.15.157
    
    Removed because they are upstream:
       generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433
    
    Removed because they are upstream:
       generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
       https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56
    
    Manual adapted the following patches:
       generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
       generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
       generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 84d0b0b925997f8c2d1a21a60c79f76d3070ae3e)
---
 include/kernel-5.15                                |  4 +--
 ...-clk_core_get_rate_recalc-in-clk_rate_get.patch |  2 +-
 ...50-0440-clk-Always-clamp-the-rounded-rate.patch |  2 +-
 ...-Use-clamp-instead-of-open-coding-our-own.patch |  2 +-
 ...Always-set-the-rate-on-clk_set_range_rate.patch |  2 +-
 ...0-0837-clk-Drop-the-rate-range-on-clk_put.patch |  8 ++---
 ...to-account-uncached-clocks-in-clk_set_rat.patch |  4 +--
 .../950-0846-clk-Set-req_rate-on-reparenting.patch |  4 +--
 ...kip-set_rate_range-if-our-clock-is-orphan.patch |  2 +-
 ...-request-boundaries-in-clk_core_init_rate.patch |  8 ++---
 ...k-Change-clk_core_init_rate_req-prototype.patch |  6 ++--
 ...50-clk-Introduce-clk_hw_init_rate_request.patch |  2 +-
 ...-Add-missing-clk_core_init_rate_req-calls.patch |  6 ++--
 ...ove-redundant-clk_core_init_rate_req-call.patch |  2 +-
 ...from-__clk_determine_rate-to-clk_core_rou.patch |  6 ++--
 ...50-0854-clk-Introduce-clk_core_has_parent.patch |  4 +--
 ...orwarding-clk_rate_requests-to-the-parent.patch | 12 +++----
 ...6-clk-Zero-the-clk_rate_request-structure.patch |  2 +-
 ...Test-the-clock-pointer-in-clk_hw_get_name.patch |  2 +-
 .../950-0865-clk-Add-clk_get_rate_range.patch      |  2 +-
 ...896-clk-Add-locking-to-clk_get_rate_range.patch |  2 +-
 ...ntroduce-tagger-owned-storage-for-private.patch | 12 +++----
 ...-protocols-connect-to-individual-switches.patch | 10 +++---
 ...530-iterate-using-dsa_switch_for_each_use.patch |  4 +--
 ...530-populate-supported_interfaces-and-mac.patch | 18 +++++-----
 ...19-net-dsa-mt7530-remove-interface-checks.patch | 18 +++++-----
 ...530-drop-use-of-phylink_helper_basex_spee.patch |  2 +-
 ...530-only-indicate-linkmodes-that-can-be-s.patch |  8 ++---
 ...t7530-switch-to-use-phylink_get_linkmodes.patch | 12 +++----
 ...a-mt7530-partially-convert-to-phylink_pcs.patch | 38 +++++++++++-----------
 ...530-move-autoneg-handling-to-PCS-validati.patch |  6 ++--
 ...9-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch |  2 +-
 ...-dsa-mt753x-fix-pcs-conversion-regression.patch |  4 +--
 ...dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch |  6 ++--
 ...530-get-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++++-----
 ...d-rtnl_mutex-when-calling-dsa_master_-set.patch |  6 ++--
 ...st-set-up-shared-ports-then-non-shared-po.patch |  8 ++---
 ...et-next-net-dsa-setup-master-before-ports.patch | 10 +++---
 ...vide-switch-operations-for-tracking-the-m.patch |  4 +--
 ...lay-master-state-events-in-dsa_tree_-setu.patch |  4 +--
 ...t7530-add-support-for-in-band-link-status.patch | 14 ++++----
 ....3-net-dsa-mt7530-use-external-PCS-driver.patch | 24 +++++++-------
 ...et-dsa-mt7530-refactor-SGMII-PCS-creation.patch |  4 +--
 ...-dsa-mt7530-use-unlocked-regmap-accessors.patch |  6 ++--
 ...530-use-regmap-to-access-switch-register-.patch | 14 ++++----
 ...530-move-SGMII-PCS-creation-to-mt7530_pro.patch |  6 ++--
 ...06-net-dsa-mt7530-introduce-mutex-helpers.patch | 28 ++++++++--------
 ...530-move-p5_intf_modes-function-to-mt7530.patch |  4 +--
 ...530-introduce-mt7530_probe_common-helper-.patch |  6 ++--
 ...530-introduce-mt7530_remove_common-helper.patch |  4 +--
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch | 16 ++++-----
 ...530-introduce-driver-for-MT7988-built-in-.patch | 24 +++++++-------
 ...4-net-dsa-mt7530-fix-support-for-MT7531BE.patch |  8 ++---
 target/linux/generic/config-5.15                   |  1 +
 .../generic/hack-5.15/250-netfilter_depends.patch  |  2 +-
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |  9 ++---
 .../780-usb-net-MeigLink_modem_support.patch       |  4 +--
 ...-bridge_allow_receiption_on_disabled_port.patch |  4 +--
 ...ft_flow_offload-handle-netdevice-events-f.patch | 32 ++++++++++--------
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...ge-add-knob-for-filtering-rx-tx-BPDU-pack.patch |  2 +-
 ...ensure-all-MACs-are-powered-down-before-r.patch | 11 +------
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  4 +--
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  2 +-
 .../generic/pending-5.15/920-mangle_bootargs.patch |  2 +-
 ...eric-Mangle-bootloader-s-kernel-arguments.patch |  2 +-
 ...rpc-bootwrapper-disable-uImage-generation.patch |  2 +-
 ...vebu-Mangle-bootloader-s-kernel-arguments.patch |  2 +-
 ...eric-Mangle-bootloader-s-kernel-arguments.patch |  2 +-
 69 files changed, 255 insertions(+), 258 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 5436913e05..3289f828be 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .156
-LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778
+LINUX_VERSION-5.15 = .157
+LINUX_KERNEL_HASH-5.15.157 = aff22351d34d69a16762dcf1fd51fe228da55d4b96b67247bdd598a86cc7a414
diff --git a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
index 5b69d0cbc1..3a181e210f 100644
--- a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
+++ b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
@@ -18,7 +18,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -3145,7 +3145,10 @@ static int clk_rate_get(void *data, u64
+@@ -3235,7 +3235,10 @@ static int clk_rate_get(void *data, u64
  {
  	struct clk_core *core = data;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch b/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch
index 500aefa594..7bf3a5a3e3 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0440-clk-Always-clamp-the-rounded-rate.patch
@@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1360,6 +1360,8 @@ static int clk_core_determine_round_nolo
+@@ -1450,6 +1450,8 @@ static int clk_core_determine_round_nolo
  	if (!core)
  		return 0;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch b/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch
index 3566dcc31c..2612e960ed 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0833-clk-Use-clamp-instead-of-open-coding-our-own.patch
@@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2400,11 +2400,7 @@ int clk_set_rate_range(struct clk *clk,
+@@ -2490,11 +2490,7 @@ int clk_set_rate_range(struct clk *clk,
  		 *   this corner case when determining the rate
  		 */
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch b/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch
index bdadf135eb..2d9af25a3e 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0834-clk-Always-set-the-rate-on-clk_set_range_rate.patch
@@ -30,7 +30,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2385,28 +2385,29 @@ int clk_set_rate_range(struct clk *clk,
+@@ -2475,28 +2475,29 @@ int clk_set_rate_range(struct clk *clk,
  		goto out;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch b/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch
index c1e4769463..e37e116f90 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0837-clk-Drop-the-rate-range-on-clk_put.patch
@@ -29,7 +29,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2344,19 +2344,15 @@ int clk_set_rate_exclusive(struct clk *c
+@@ -2434,19 +2434,15 @@ int clk_set_rate_exclusive(struct clk *c
  }
  EXPORT_SYMBOL_GPL(clk_set_rate_exclusive);
  
@@ -54,7 +54,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	if (!clk)
  		return 0;
  
-@@ -2369,8 +2365,6 @@ int clk_set_rate_range(struct clk *clk,
+@@ -2459,8 +2455,6 @@ int clk_set_rate_range(struct clk *clk,
  		return -EINVAL;
  	}
  
@@ -63,7 +63,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	if (clk->exclusive_count)
  		clk_core_rate_unprotect(clk->core);
  
-@@ -2414,6 +2408,28 @@ out:
+@@ -2504,6 +2498,28 @@ out:
  	if (clk->exclusive_count)
  		clk_core_rate_protect(clk->core);
  
@@ -92,7 +92,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	clk_prepare_unlock();
  
  	return ret;
-@@ -4376,9 +4392,10 @@ void __clk_put(struct clk *clk)
+@@ -4466,9 +4482,10 @@ void __clk_put(struct clk *clk)
  	}
  
  	hlist_del(&clk->clks_node);
diff --git a/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch b/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch
index e2079c7ccf..51079d6802 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0844-clk-Take-into-account-uncached-clocks-in-clk_set_rat.patch
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2379,6 +2379,10 @@ static int clk_set_rate_range_nolock(str
+@@ -2469,6 +2469,10 @@ static int clk_set_rate_range_nolock(str
  		goto out;
  	}
  
@@ -33,7 +33,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	/*
  	 * Since the boundaries have been changed, let's give the
  	 * opportunity to the provider to adjust the clock rate based on
-@@ -2396,7 +2400,7 @@ static int clk_set_rate_range_nolock(str
+@@ -2486,7 +2490,7 @@ static int clk_set_rate_range_nolock(str
  	 * - the determine_rate() callback does not really check for
  	 *   this corner case when determining the rate
  	 */
diff --git a/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch b/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch
index 4ceb0ac5c2..4a6272c337 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0846-clk-Set-req_rate-on-reparenting.patch
@@ -23,7 +23,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1771,6 +1771,23 @@ static void clk_core_update_orphan_statu
+@@ -1861,6 +1861,23 @@ static void clk_core_update_orphan_statu
  		clk_core_update_orphan_status(child, is_orphan);
  }
  
@@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  static void clk_reparent(struct clk_core *core, struct clk_core *new_parent)
  {
  	bool was_orphan = core->orphan;
-@@ -1795,6 +1812,7 @@ static void clk_reparent(struct clk_core
+@@ -1885,6 +1902,7 @@ static void clk_reparent(struct clk_core
  	}
  
  	core->parent = new_parent;
diff --git a/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch b/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch
index 39fda5ceb3..7907b3949c 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0847-clk-Skip-set_rate_range-if-our-clock-is-orphan.patch
@@ -25,7 +25,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2401,6 +2401,12 @@ static int clk_set_rate_range_nolock(str
+@@ -2491,6 +2491,12 @@ static int clk_set_rate_range_nolock(str
  	if (clk->core->flags & CLK_GET_RATE_NOCACHE)
  		rate = clk_core_get_rate_recalc(clk->core);
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch b/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch
index 0de557f95f..6e329e6576 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0848-clk-Add-our-request-boundaries-in-clk_core_init_rate.patch
@@ -26,7 +26,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1394,6 +1394,8 @@ static void clk_core_init_rate_req(struc
+@@ -1484,6 +1484,8 @@ static void clk_core_init_rate_req(struc
  	if (WARN_ON(!core || !req))
  		return;
  
@@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	parent = core->parent;
  	if (parent) {
  		req->best_parent_hw = parent->hw;
-@@ -1468,7 +1470,6 @@ unsigned long clk_hw_round_rate(struct c
+@@ -1558,7 +1560,6 @@ unsigned long clk_hw_round_rate(struct c
  	int ret;
  	struct clk_rate_request req;
  
@@ -43,7 +43,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	req.rate = rate;
  
  	ret = clk_core_round_rate_nolock(hw->core, &req);
-@@ -1501,7 +1502,6 @@ long clk_round_rate(struct clk *clk, uns
+@@ -1591,7 +1592,6 @@ long clk_round_rate(struct clk *clk, uns
  	if (clk->exclusive_count)
  		clk_core_rate_unprotect(clk->core);
  
@@ -51,7 +51,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	req.rate = rate;
  
  	ret = clk_core_round_rate_nolock(clk->core, &req);
-@@ -2008,8 +2008,6 @@ static struct clk_core *clk_calc_new_rat
+@@ -2098,8 +2098,6 @@ static struct clk_core *clk_calc_new_rat
  		struct clk_rate_request req;
  
  		req.rate = rate;
diff --git a/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch b/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch
index c13d5bfcb3..dbe50d62ed 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0849-clk-Change-clk_core_init_rate_req-prototype.patch
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1387,13 +1387,15 @@ static int clk_core_determine_round_nolo
+@@ -1477,13 +1477,15 @@ static int clk_core_determine_round_nolo
  }
  
  static void clk_core_init_rate_req(struct clk_core * const core,
@@ -36,7 +36,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	clk_core_get_boundaries(core, &req->min_rate, &req->max_rate);
  
  	parent = core->parent;
-@@ -1421,7 +1423,7 @@ static int clk_core_round_rate_nolock(st
+@@ -1511,7 +1513,7 @@ static int clk_core_round_rate_nolock(st
  		return 0;
  	}
  
@@ -45,7 +45,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  	if (clk_core_can_round(core))
  		return clk_core_determine_round_nolock(core, req);
-@@ -2007,9 +2009,7 @@ static struct clk_core *clk_calc_new_rat
+@@ -2097,9 +2099,7 @@ static struct clk_core *clk_calc_new_rat
  	if (clk_core_can_round(core)) {
  		struct clk_rate_request req;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch b/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch
index d853edc5f1..bba2843e83 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0850-clk-Introduce-clk_hw_init_rate_request.patch
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1408,6 +1408,26 @@ static void clk_core_init_rate_req(struc
+@@ -1498,6 +1498,26 @@ static void clk_core_init_rate_req(struc
  	}
  }
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch b/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch
index 272be33449..8e86600001 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0851-clk-Add-missing-clk_core_init_rate_req-calls.patch
@@ -19,7 +19,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1492,7 +1492,7 @@ unsigned long clk_hw_round_rate(struct c
+@@ -1582,7 +1582,7 @@ unsigned long clk_hw_round_rate(struct c
  	int ret;
  	struct clk_rate_request req;
  
@@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  	ret = clk_core_round_rate_nolock(hw->core, &req);
  	if (ret)
-@@ -1524,7 +1524,7 @@ long clk_round_rate(struct clk *clk, uns
+@@ -1614,7 +1614,7 @@ long clk_round_rate(struct clk *clk, uns
  	if (clk->exclusive_count)
  		clk_core_rate_unprotect(clk->core);
  
@@ -37,7 +37,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  	ret = clk_core_round_rate_nolock(clk->core, &req);
  
-@@ -2228,8 +2228,7 @@ static unsigned long clk_core_req_round_
+@@ -2318,8 +2318,7 @@ static unsigned long clk_core_req_round_
  	if (cnt < 0)
  		return cnt;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch b/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch
index 4e92444f39..93cbc1a8ed 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0852-clk-Remove-redundant-clk_core_init_rate_req-call.patch
@@ -23,7 +23,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1443,8 +1443,6 @@ static int clk_core_round_rate_nolock(st
+@@ -1533,8 +1533,6 @@ static int clk_core_round_rate_nolock(st
  		return 0;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch b/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch
index 070b7f411d..ec32920c93 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0853-clk-Switch-from-__clk_determine_rate-to-clk_core_rou.patch
@@ -24,7 +24,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -556,6 +556,9 @@ static bool mux_is_better_rate(unsigned
+@@ -644,6 +644,9 @@ static bool mux_is_better_rate(unsigned
  	return now <= rate && now > best;
  }
  
@@ -34,7 +34,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  int clk_mux_determine_rate_flags(struct clk_hw *hw,
  				 struct clk_rate_request *req,
  				 unsigned long flags)
-@@ -569,8 +572,12 @@ int clk_mux_determine_rate_flags(struct
+@@ -657,8 +660,12 @@ int clk_mux_determine_rate_flags(struct
  	if (core->flags & CLK_SET_RATE_NO_REPARENT) {
  		parent = core->parent;
  		if (core->flags & CLK_SET_RATE_PARENT) {
@@ -49,7 +49,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  			if (ret)
  				return ret;
  
-@@ -593,7 +600,7 @@ int clk_mux_determine_rate_flags(struct
+@@ -681,7 +688,7 @@ int clk_mux_determine_rate_flags(struct
  
  		if (core->flags & CLK_SET_RATE_PARENT) {
  			parent_req = *req;
diff --git a/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch b/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch
index caae3618ff..341ee43835 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0854-clk-Introduce-clk_core_has_parent.patch
@@ -20,7 +20,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -559,6 +559,26 @@ static bool mux_is_better_rate(unsigned
+@@ -647,6 +647,26 @@ static bool mux_is_better_rate(unsigned
  static int clk_core_round_rate_nolock(struct clk_core *core,
  				      struct clk_rate_request *req);
  
@@ -47,7 +47,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  int clk_mux_determine_rate_flags(struct clk_hw *hw,
  				 struct clk_rate_request *req,
  				 unsigned long flags)
-@@ -2582,25 +2602,11 @@ void clk_hw_reparent(struct clk_hw *hw,
+@@ -2672,25 +2692,11 @@ void clk_hw_reparent(struct clk_hw *hw,
   */
  bool clk_has_parent(struct clk *clk, struct clk *parent)
  {
diff --git a/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch b/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch
index 999b38a9a2..19179b9244 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0855-clk-Stop-forwarding-clk_rate_requests-to-the-parent.patch
@@ -35,7 +35,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -556,6 +556,10 @@ static bool mux_is_better_rate(unsigned
+@@ -644,6 +644,10 @@ static bool mux_is_better_rate(unsigned
  	return now <= rate && now > best;
  }
  
@@ -46,7 +46,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  static int clk_core_round_rate_nolock(struct clk_core *core,
  				      struct clk_rate_request *req);
  
-@@ -579,6 +583,24 @@ static bool clk_core_has_parent(struct c
+@@ -667,6 +671,24 @@ static bool clk_core_has_parent(struct c
  	return false;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  int clk_mux_determine_rate_flags(struct clk_hw *hw,
  				 struct clk_rate_request *req,
  				 unsigned long flags)
-@@ -586,17 +608,19 @@ int clk_mux_determine_rate_flags(struct
+@@ -674,17 +696,19 @@ int clk_mux_determine_rate_flags(struct
  	struct clk_core *core = hw->core, *parent, *best_parent = NULL;
  	int i, num_parents, ret;
  	unsigned long best = 0;
@@ -92,7 +92,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  			ret = clk_core_round_rate_nolock(parent, &parent_req);
  			if (ret)
  				return ret;
-@@ -614,23 +638,29 @@ int clk_mux_determine_rate_flags(struct
+@@ -702,23 +726,29 @@ int clk_mux_determine_rate_flags(struct
  	/* find the parent that can provide the fastest rate <= rate */
  	num_parents = core->num_parents;
  	for (i = 0; i < num_parents; i++) {
@@ -126,7 +126,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  		}
  	}
  
-@@ -1463,6 +1493,8 @@ static bool clk_core_can_round(struct cl
+@@ -1553,6 +1583,8 @@ static bool clk_core_can_round(struct cl
  static int clk_core_round_rate_nolock(struct clk_core *core,
  				      struct clk_rate_request *req)
  {
@@ -135,7 +135,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	lockdep_assert_held(&prepare_lock);
  
  	if (!core) {
-@@ -1472,8 +1504,20 @@ static int clk_core_round_rate_nolock(st
+@@ -1562,8 +1594,20 @@ static int clk_core_round_rate_nolock(st
  
  	if (clk_core_can_round(core))
  		return clk_core_determine_round_nolock(core, req);
diff --git a/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch b/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch
index ec18c47ba5..f30a847b7a 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0856-clk-Zero-the-clk_rate_request-structure.patch
@@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1452,6 +1452,8 @@ static void clk_core_init_rate_req(struc
+@@ -1542,6 +1542,8 @@ static void clk_core_init_rate_req(struc
  	if (WARN_ON(!core || !req))
  		return;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch b/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch
index a066246b60..61b478ccba 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0857-clk-Test-the-clock-pointer-in-clk_hw_get_name.patch
@@ -18,7 +18,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -280,7 +280,7 @@ EXPORT_SYMBOL_GPL(__clk_get_name);
+@@ -368,7 +368,7 @@ EXPORT_SYMBOL_GPL(__clk_get_name);
  
  const char *clk_hw_get_name(const struct clk_hw *hw)
  {
diff --git a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch
index e6dd166718..d790531d69 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0865-clk-Add-clk_get_rate_range.patch
@@ -28,7 +28,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2589,6 +2589,24 @@ int clk_set_max_rate(struct clk *clk, un
+@@ -2679,6 +2679,24 @@ int clk_set_max_rate(struct clk *clk, un
  EXPORT_SYMBOL_GPL(clk_set_max_rate);
  
  /**
diff --git a/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch b/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch
index 5284e83d63..50951007e0 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0896-clk-Add-locking-to-clk_get_rate_range.patch
@@ -13,7 +13,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2602,7 +2602,9 @@ void clk_get_rate_range(struct clk *clk,
+@@ -2692,7 +2692,9 @@ void clk_get_rate_range(struct clk *clk,
  	if (!clk || !min || !max)
  		return;
  
diff --git a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
index f56a968589..8e5c718042 100644
--- a/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
+++ b/target/linux/generic/backport-5.15/700-v5.17-net-dsa-introduce-tagger-owned-storage-for-private.patch
@@ -124,7 +124,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_del(&dst->list);
  	kfree(dst);
  }
-@@ -805,7 +809,7 @@ static int dsa_switch_setup_tag_protocol
+@@ -827,7 +831,7 @@ static int dsa_switch_setup_tag_protocol
  	int port, err;
  
  	if (tag_ops->proto == dst->default_proto)
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (port = 0; port < ds->num_ports; port++) {
  		if (!dsa_is_cpu_port(ds, port))
-@@ -821,6 +825,17 @@ static int dsa_switch_setup_tag_protocol
+@@ -843,6 +847,17 @@ static int dsa_switch_setup_tag_protocol
  		}
  	}
  
@@ -151,7 +151,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  }
  
-@@ -1132,6 +1147,46 @@ static void dsa_tree_teardown(struct dsa
+@@ -1154,6 +1169,46 @@ static void dsa_tree_teardown(struct dsa
  	dst->setup = false;
  }
  
@@ -198,7 +198,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  /* Since the dsa/tagging sysfs device attribute is per master, the assumption
   * is that all DSA switches within a tree share the same tagger, otherwise
   * they would have formed disjoint trees (different "dsa,member" values).
-@@ -1164,12 +1219,15 @@ int dsa_tree_change_tag_proto(struct dsa
+@@ -1186,12 +1241,15 @@ int dsa_tree_change_tag_proto(struct dsa
  			goto out_unlock;
  	}
  
@@ -216,7 +216,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	rtnl_unlock();
  
-@@ -1257,6 +1315,7 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1279,6 +1337,7 @@ static int dsa_port_parse_cpu(struct dsa
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_switch_tree *dst = ds->dst;
  	enum dsa_tag_protocol default_proto;
@@ -224,7 +224,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Find out which protocol the switch would prefer. */
  	default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1311,6 +1370,12 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1333,6 +1392,12 @@ static int dsa_port_parse_cpu(struct dsa
  		 */
  		dsa_tag_driver_put(tag_ops);
  	} else {
diff --git a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
index 0c50ae6fb9..8c81ebc7f5 100644
--- a/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
+++ b/target/linux/generic/backport-5.15/701-v5.17-dsa-make-tagging-protocols-connect-to-individual-switches.patch
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_del(&dst->list);
  	kfree(dst);
  }
-@@ -826,17 +822,29 @@ static int dsa_switch_setup_tag_protocol
+@@ -848,17 +844,29 @@ static int dsa_switch_setup_tag_protocol
  	}
  
  connect:
@@ -132,7 +132,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int dsa_switch_setup(struct dsa_switch *ds)
-@@ -1156,13 +1164,6 @@ static int dsa_tree_bind_tag_proto(struc
+@@ -1178,13 +1186,6 @@ static int dsa_tree_bind_tag_proto(struc
  
  	dst->tag_ops = tag_ops;
  
@@ -146,7 +146,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* Notify the switches from this tree about the connection
  	 * to the new tagger
  	 */
-@@ -1172,16 +1173,14 @@ static int dsa_tree_bind_tag_proto(struc
+@@ -1194,16 +1195,14 @@ static int dsa_tree_bind_tag_proto(struc
  		goto out_disconnect;
  
  	/* Notify the old tagger about the disconnection from this tree */
@@ -167,7 +167,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	dst->tag_ops = old_tag_ops;
  
  	return err;
-@@ -1315,7 +1314,6 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1337,7 +1336,6 @@ static int dsa_port_parse_cpu(struct dsa
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_switch_tree *dst = ds->dst;
  	enum dsa_tag_protocol default_proto;
@@ -175,7 +175,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Find out which protocol the switch would prefer. */
  	default_proto = dsa_get_tag_protocol(dp, master);
-@@ -1370,12 +1368,6 @@ static int dsa_port_parse_cpu(struct dsa
+@@ -1392,12 +1390,6 @@ static int dsa_port_parse_cpu(struct dsa
  		 */
  		dsa_tag_driver_put(tag_ops);
  	} else {
diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
index bdb4a8315a..f65b0cafa8 100644
--- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
+++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1404,27 +1404,31 @@ static int
+@@ -1425,27 +1425,31 @@ static int
  mt7530_port_bridge_join(struct dsa_switch *ds, int port,
  			struct net_device *bridge)
  {
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Add the all other ports to this port matrix. */
-@@ -1529,24 +1533,28 @@ static void
+@@ -1550,24 +1554,28 @@ static void
  mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
  			 struct net_device *bridge)
  {
diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
index 3f5b953a2a..e04bb11e80 100644
--- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
+++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2687,6 +2687,32 @@ mt7531_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct
+@@ -2723,6 +2749,37 @@ static bool mt7531_is_rgmii_port(struct
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3199,6 +3256,18 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
  			 unsigned long *supported)
-@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753
+@@ -3435,6 +3504,7 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_del		= mt7530_port_vlan_del,
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_validate	= mt753x_phylink_validate,
  	.phylink_mac_link_state	= mt753x_phylink_mac_link_state,
  	.phylink_mac_config	= mt753x_phylink_mac_config,
-@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t
+@@ -3452,6 +3522,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t
+@@ -3463,6 +3534,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t
+@@ -3475,6 +3547,7 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7531_ind_phy_write,
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7531_phy_mode_supported,
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
-@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3537,6 +3610,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	 */
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
@@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	    !priv->info->mac_port_get_state || !priv->info->mac_port_config)
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -801,6 +801,8 @@ struct mt753x_info {
+@@ -807,6 +807,8 @@ struct mt753x_info {
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
  	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
index 60634aa0d9..31be0e7be3 100644
--- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
+++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
@@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2713,37 +2713,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
  {
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
-@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2780,44 +2749,6 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -3072,9 +3003,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
  		if (state->interface != PHY_INTERFACE_MODE_GMII)
-@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3290,12 +3218,6 @@ mt753x_phylink_validate(struct dsa_switc
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
  	struct mt7530_priv *priv = ds->priv;
  
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set_port_modes(mask);
  
  	if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
-@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t
+@@ -3523,7 +3445,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t
+@@ -3535,7 +3456,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t
+@@ -3548,7 +3468,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
-@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3611,7 +3530,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EINVAL;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -803,8 +803,6 @@ struct mt753x_info {
+@@ -809,8 +809,6 @@ struct mt753x_info {
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
index f98cf4c793..2a5d5ae9d9 100644
--- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
+++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3242,11 +3242,6 @@ mt753x_phylink_validate(struct dsa_switc
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
index a499b8e5b1..ad672312e4 100644
--- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
+++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2820,12 +2820,13 @@ static int mt7531_rgmii_setup(struct mt7
  }
  
  static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		phylink_set(supported, 2500baseX_Full);
  		phylink_set(supported, 2500baseT_Full);
  	}
-@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru
+@@ -3198,16 +3199,18 @@ static void mt753x_phylink_get_caps(stru
  
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
@@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3230,12 +3233,13 @@ mt753x_phylink_validate(struct dsa_switc
  	}
  
  	/* This switch only supports 1G full-duplex. */
@@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set(mask, Asym_Pause);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -804,6 +804,7 @@ struct mt753x_info {
+@@ -810,6 +810,7 @@ struct mt753x_info {
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
index b7fc061060..8d9802f1ee 100644
--- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
+++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2819,19 +2819,6 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
  			   unsigned int mode, phy_interface_t interface,
-@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru
+@@ -3198,51 +3185,21 @@ static void mt753x_phylink_get_caps(stru
  }
  
  static void
@@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
-@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t
+@@ -3444,7 +3401,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t
+@@ -3455,7 +3411,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t
+@@ -3467,7 +3422,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
  		.mac_pcs_an_restart = mt7531_sgmii_restart_an,
-@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3529,7 +3483,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
index 7afa5be3d4..149c12c1fb 100644
--- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
+++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* String, offset, and register size in bytes if different from 4 bytes */
  static const struct mt7530_mib_desc mt7530_mib[] = {
  	MIB_DESC(1, 0x00, "TxDrop"),
-@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2819,12 +2824,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	unsigned int val;
  
  	/* For adjusting speed and duplex of SGMII force mode. */
-@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
+@@ -2850,6 +2854,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
  
  	/* MT7531 SGMII 1G force mode can only work in full duplex mode,
  	 * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	 */
  	if ((speed == SPEED_10 || speed == SPEED_100) &&
  	    duplex != DUPLEX_FULL)
-@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st
+@@ -2925,9 +2932,10 @@ static int mt7531_sgmii_setup_mode_an(st
  	return 0;
  }
  
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 val;
  
  	/* Only restart AN when AN is enabled */
-@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2984,6 +2992,24 @@ mt753x_mac_config(struct dsa_switch *ds,
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  			  const struct phylink_link_state *state)
-@@ -3018,17 +3044,6 @@ unsupported:
+@@ -3045,17 +3071,6 @@ unsupported:
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
  
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
  					 unsigned int mode,
  					 phy_interface_t interface)
-@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down
+@@ -3065,16 +3080,13 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3087,8 +3099,6 @@ static void mt753x_phylink_mac_link_up(s
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr;
  
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
-@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3166,6 +3176,8 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
@@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
  				   speed, DUPLEX_FULL, true, true);
  
-@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3205,16 +3217,13 @@ mt753x_phylink_validate(struct dsa_switc
  	linkmode_and(state->advertising, state->advertising, mask);
  }
  
@@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
  
  	state->link = (pmsr & PMSR_LINK);
-@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -3241,8 +3250,6 @@ mt7530_phylink_mac_link_state(struct dsa
  		state->pause |= MLO_PAUSE_RX;
  	if (pmsr & PMSR_TX_FC)
  		state->pause |= MLO_PAUSE_TX;
@@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3284,32 +3291,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (ret)
  		return ret;
-@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3322,6 +3346,13 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return ret;
  }
  
-@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753
+@@ -3384,9 +3415,8 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
  	.phylink_validate	= mt753x_phylink_validate,
@@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
-@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753
+@@ -3396,36 +3426,34 @@ static const struct dsa_switch_ops mt753
  static const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
@@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  
-@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3483,7 +3511,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	priv->id = priv->info->id;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne
+@@ -779,6 +779,12 @@ static const char *p5_intf_modes(unsigne
  
  struct mt7530_priv;
  
@@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* struct mt753x_info -	This is the main data structure for holding the specific
   *			part for each supported device
   * @sw_setup:		Holding the handler to a device initialization
-@@ -784,18 +790,14 @@ struct mt7530_priv;
+@@ -790,18 +796,14 @@ struct mt7530_priv;
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
   *			certan MAC port
@@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
-@@ -806,15 +808,9 @@ struct mt753x_info {
+@@ -812,15 +814,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
@@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
  
  /* struct mt7530_priv -	This is the main data structure for holding the state
-@@ -856,6 +852,7 @@ struct mt7530_priv {
+@@ -862,6 +858,7 @@ struct mt7530_priv {
  	u8			mirror_tx;
  
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
index 7731c16c96..6e406ace0d 100644
--- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
+++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru
+@@ -3196,25 +3196,16 @@ static void mt753x_phylink_get_caps(stru
  	priv->info->mac_port_get_caps(ds, port, config);
  }
  
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
-@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct
+@@ -3316,12 +3307,14 @@ static void mt7530_pcs_an_restart(struct
  }
  
  static const struct phylink_pcs_ops mt7530_pcs_ops = {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.pcs_get_state = mt7531_pcs_get_state,
  	.pcs_config = mt753x_pcs_config,
  	.pcs_an_restart = mt7531_pcs_an_restart,
-@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753
+@@ -3414,7 +3407,6 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
index bd35cb1043..afcfcaba34 100644
--- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
+++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru
+@@ -3193,6 +3193,12 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
index cff22b5eac..bf2938d03b 100644
--- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
+++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3304,9 +3304,16 @@ static int
+@@ -3331,9 +3331,16 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (ret)
  		return ret;
  
-@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3345,13 +3352,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
index c9f830381e..320b5c1ef9 100644
--- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
+++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1750,11 +1750,11 @@ static void
+@@ -1771,11 +1771,11 @@ static void
  mt7530_hw_vlan_add(struct mt7530_priv *priv,
  		   struct mt7530_hw_vlan_entry *entry)
  {
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* Validate the entry with independent learning, create egress tag per
  	 * VLAN and joining the port as one of the port members.
-@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
+@@ -1786,22 +1786,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
  
  	/* Decide whether adding tag or not for those outgoing packets from the
  	 * port inside the VLAN.
@@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static void
-@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
+@@ -1820,11 +1818,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
  		return;
  	}
  
diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
index bb36302f24..eef19b4cb5 100644
--- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
+++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1254,6 +1254,7 @@ static int
+@@ -1275,6 +1275,7 @@ static int
  mt7530_port_enable(struct dsa_switch *ds, int port,
  		   struct phy_device *phy)
  {
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1283,7 +1284,11 @@ mt7530_port_enable(struct dsa_switch *ds
  	 * restore the port matrix if the port is the member of a certain
  	 * bridge.
  	 */
@@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
-@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc
+@@ -1431,7 +1436,8 @@ mt7530_port_bridge_join(struct dsa_switc
  			struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1508,9 +1514,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	 * the CPU port get out of VLAN filtering mode.
  	 */
  	if (all_user_ports_removed) {
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
  	}
  }
-@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1560,6 +1569,7 @@ mt7530_port_bridge_leave(struct dsa_swit
  			 struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1588,8 +1598,8 @@ mt7530_port_bridge_leave(struct dsa_swit
  	 */
  	if (priv->ports[port].enable)
  		mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* When a port is removed from the bridge, the port would be set up
  	 * back to the default as is at initial boot which is a VLAN-unaware
-@@ -1731,6 +1741,9 @@ static int
+@@ -1752,6 +1762,9 @@ static int
  mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
  			   struct netlink_ext_ack *extack)
  {
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (vlan_filtering) {
  		/* The port is being kept as VLAN-unaware port when bridge is
  		 * set up with vlan_filtering not being set, Otherwise, the
-@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
+@@ -1759,7 +1772,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
  		 * for becoming a VLAN-aware port.
  		 */
  		mt7530_port_set_vlan_aware(ds, port);
diff --git a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
index e331226fc4..dbc28efc94 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-04-net-next-net-dsa-hold-rtnl_mutex-when-calling-dsa_master_-set.patch
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -1034,6 +1034,8 @@ static int dsa_tree_setup_master(struct
+@@ -1056,6 +1056,8 @@ static int dsa_tree_setup_master(struct
  	struct dsa_port *dp;
  	int err;
  
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_for_each_entry(dp, &dst->ports, list) {
  		if (dsa_port_is_cpu(dp)) {
  			err = dsa_master_setup(dp->master, dp);
-@@ -1042,6 +1044,8 @@ static int dsa_tree_setup_master(struct
+@@ -1064,6 +1066,8 @@ static int dsa_tree_setup_master(struct
  		}
  	}
  
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  }
  
-@@ -1049,9 +1053,13 @@ static void dsa_tree_teardown_master(str
+@@ -1071,9 +1075,13 @@ static void dsa_tree_teardown_master(str
  {
  	struct dsa_port *dp;
  
diff --git a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
index e6472c61da..fbb9c94ec1 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-05-net-next-net-dsa-first-set-up-shared-ports-then-non-shared-po.patch
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -999,23 +999,28 @@ static void dsa_tree_teardown_switches(s
+@@ -1021,23 +1021,28 @@ static void dsa_tree_teardown_switches(s
  		dsa_switch_teardown(dp->ds);
  }
  
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  	}
  
-@@ -1024,7 +1029,21 @@ static int dsa_tree_setup_switches(struc
+@@ -1046,7 +1051,21 @@ static int dsa_tree_setup_switches(struc
  teardown:
  	dsa_tree_teardown_ports(dst);
  
@@ -89,7 +89,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return err;
  }
-@@ -1111,10 +1130,14 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1133,10 +1152,14 @@ static int dsa_tree_setup(struct dsa_swi
  	if (err)
  		goto teardown_cpu_ports;
  
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	err = dsa_tree_setup_lags(dst);
  	if (err)
  		goto teardown_master;
-@@ -1127,8 +1150,9 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1149,8 +1172,9 @@ static int dsa_tree_setup(struct dsa_swi
  
  teardown_master:
  	dsa_tree_teardown_master(dst);
diff --git a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
index 93cad0c98a..a46e06ef8b 100644
--- a/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
+++ b/target/linux/generic/backport-5.15/765-v5.17-06-net-next-net-dsa-setup-master-before-ports.patch
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -545,6 +545,7 @@ static void dsa_port_teardown(struct dsa
+@@ -567,6 +567,7 @@ static void dsa_port_teardown(struct dsa
  	struct devlink_port *dlp = &dp->devlink_port;
  	struct dsa_switch *ds = dp->ds;
  	struct dsa_mac_addr *a, *tmp;
@@ -51,7 +51,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (!dp->setup)
  		return;
-@@ -566,9 +567,11 @@ static void dsa_port_teardown(struct dsa
+@@ -588,9 +589,11 @@ static void dsa_port_teardown(struct dsa
  		dsa_port_link_unregister_of(dp);
  		break;
  	case DSA_PORT_TYPE_USER:
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  		break;
  	}
-@@ -1130,17 +1133,17 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1152,17 +1155,17 @@ static int dsa_tree_setup(struct dsa_swi
  	if (err)
  		goto teardown_cpu_ports;
  
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dst->setup = true;
  
-@@ -1148,10 +1151,10 @@ static int dsa_tree_setup(struct dsa_swi
+@@ -1170,10 +1173,10 @@ static int dsa_tree_setup(struct dsa_swi
  
  	return 0;
  
@@ -100,7 +100,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  teardown_switches:
  	dsa_tree_teardown_switches(dst);
  teardown_cpu_ports:
-@@ -1169,10 +1172,10 @@ static void dsa_tree_teardown(struct dsa
+@@ -1191,10 +1194,10 @@ static void dsa_tree_teardown(struct dsa
  
  	dsa_tree_teardown_lags(dst);
  
diff --git a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
index bffdcb2881..15122950ce 100644
--- a/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
+++ b/target/linux/generic/backport-5.15/766-v5.18-01-net-dsa-provide-switch-operations-for-tracking-the-m.patch
@@ -68,7 +68,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static inline bool dsa_is_unused_port(struct dsa_switch *ds, int p)
  {
  	return dsa_to_port(ds, p)->type == DSA_PORT_TYPE_UNUSED;
-@@ -949,6 +959,13 @@ struct dsa_switch_ops {
+@@ -957,6 +967,13 @@ struct dsa_switch_ops {
  	int	(*tag_8021q_vlan_add)(struct dsa_switch *ds, int port, u16 vid,
  				      u16 flags);
  	int	(*tag_8021q_vlan_del)(struct dsa_switch *ds, int port, u16 vid);
@@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  #define DSA_DEVLINK_PARAM_DRIVER(_id, _name, _type, _cmodes)		\
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -1275,6 +1275,52 @@ out_unlock:
+@@ -1297,6 +1297,52 @@ out_unlock:
  	return err;
  }
  
diff --git a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
index 6478d580c0..c55c5271d4 100644
--- a/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
+++ b/target/linux/generic/backport-5.15/766-v5.18-02-net-dsa-replay-master-state-events-in-dsa_tree_-setu.patch
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  #include "dsa_priv.h"
  
-@@ -1060,9 +1061,18 @@ static int dsa_tree_setup_master(struct
+@@ -1082,9 +1083,18 @@ static int dsa_tree_setup_master(struct
  
  	list_for_each_entry(dp, &dst->ports, list) {
  		if (dsa_port_is_cpu(dp)) {
@@ -64,7 +64,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		}
  	}
  
-@@ -1077,9 +1087,19 @@ static void dsa_tree_teardown_master(str
+@@ -1099,9 +1109,19 @@ static void dsa_tree_teardown_master(str
  
  	rtnl_lock();
  
diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
index acb67ab161..7f16b936cd 100644
--- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
+++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2979,9 +2979,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	case PHY_INTERFACE_MODE_NA:
  	case PHY_INTERFACE_MODE_1000BASEX:
  	case PHY_INTERFACE_MODE_2500BASEX:
@@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return mt7531_sgmii_setup_mode_force(priv, port, interface);
  	default:
  		return -EINVAL;
-@@ -3030,13 +3027,6 @@ unsupported:
+@@ -3057,13 +3054,6 @@ unsupported:
  		return;
  	}
  
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru
+@@ -3200,6 +3190,9 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* This driver does not make use of the speed, duplex, pause or the
  	 * advertisement in its mac_config, so it is safe to mark this driver
  	 * as non-legacy.
-@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3265,6 +3258,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  
  	status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
  	state->link = !!(status & MT7531_SGMII_LINK_STATUS);
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (state->interface == PHY_INTERFACE_MODE_SGMII &&
  	    (status & MT7531_SGMII_AN_ENABLE)) {
  		val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
-@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3295,16 +3289,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
-@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3345,6 +3367,8 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	ret = priv->info->sw_setup(ds);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm {
+@@ -410,6 +410,7 @@ enum mt7530_vlan_port_acc_frm {
  #define  MT7531_SGMII_LINK_STATUS	BIT(18)
  #define  MT7531_SGMII_AN_ENABLE		BIT(12)
  #define  MT7531_SGMII_AN_RESTART	BIT(9)
diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
index d8386fc3cb..8060ad5afc 100644
--- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2831,128 +2832,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2975,11 +2859,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return -EINVAL;
  	}
-@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -3004,11 +2888,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return NULL;
  	}
-@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3249,86 +3133,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3348,18 +3152,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3367,8 +3210,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3383,6 +3224,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	return ret;
  }
  
-@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t
+@@ -3475,7 +3326,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3555,7 +3406,7 @@ static void
+@@ -3583,7 +3434,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  	if (!priv)
  		return;
-@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3602,6 +3453,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	dev_set_drvdata(&mdiodev->dev, NULL);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -401,47 +401,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -735,13 +696,13 @@ struct mt7530_fdb {
+@@ -741,13 +702,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index 8311aaa0bf..62d9c78cca 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re
+@@ -3184,26 +3184,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3225,15 +3255,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 7271f1023b..e9f69a8777 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont
+@@ -3157,7 +3157,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con
+@@ -3165,23 +3165,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3207,6 +3209,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index 2f761c2fad..a2dcc08b02 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3153,22 +3174,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -3181,7 +3186,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3214,7 +3219,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3380,6 +3385,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3459,6 +3465,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -779,6 +779,7 @@ struct mt753x_info {
+@@ -785,6 +785,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -799,6 +800,7 @@ struct mt7530_priv {
+@@ -805,6 +806,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index 16feba1daf..abbecd5e40 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3265,12 +3265,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3388,6 +3382,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3480,6 +3475,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
index dc4b40b824..ef02d46938 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -646,14 +650,13 @@ static int
+@@ -660,14 +664,13 @@ static int
  mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad,
  			int regnum)
  {
@@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -686,7 +689,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
+@@ -700,7 +703,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -695,14 +698,13 @@ static int
+@@ -709,14 +712,13 @@ static int
  mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad,
  			 int regnum, u32 data)
  {
@@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -734,7 +736,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
+@@ -748,7 +750,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
  	}
  
  out:
@@ -164,7 +164,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -742,14 +744,13 @@ out:
+@@ -756,14 +758,13 @@ out:
  static int
  mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum)
  {
@@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -772,7 +773,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
+@@ -786,7 +787,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -189,7 +189,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -781,14 +782,13 @@ static int
+@@ -795,14 +796,13 @@ static int
  mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum,
  			 u16 data)
  {
@@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, reg,
  				 !(reg & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -810,7 +810,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
+@@ -824,7 +824,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
  	}
  
  out:
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1323,7 +1323,6 @@ static int
+@@ -1344,7 +1344,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1376,7 +1375,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -2172,10 +2171,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2211,7 +2210,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2220,7 +2219,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index 265cf1fdac..2e1ed2e652 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -951,6 +951,24 @@ mt7530_set_ageing_time(struct dsa_switch
+@@ -965,6 +965,24 @@ mt7530_set_ageing_time(struct dsa_switch
  	return 0;
  }
  
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -714,24 +714,6 @@ enum p5_interface_select {
+@@ -720,24 +720,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index 10e2c6a184..c9ff26ff20 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_
+@@ -3394,44 +3394,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3445,23 +3422,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3470,12 +3477,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index 4e754b1002..7c1c80e7bc 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3512,6 +3512,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3530,16 +3541,11 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index e970ec3804..84883147ac 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3191,72 +3142,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3315,7 +3200,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -497,8 +497,8 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
- 	.get_strings		= mt7530_get_strings,
-@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753
+ 	.preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port,
+@@ -3350,8 +3235,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t
+@@ -3384,16 +3270,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3430,88 +3309,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3522,57 +3322,6 @@ mt7530_remove_common(struct mt7530_priv
  	mutex_destroy(&priv->reg_mutex);
  }
  
@@ -679,7 +679,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -845,4 +845,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 3d94295eee..c8417091f9 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753
+@@ -2219,6 +2219,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2252,8 +2293,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2754,6 +2802,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2830,6 +2897,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2899,7 +2977,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2977,7 +3056,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3057,6 +3137,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3202,6 +3297,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3271,6 +3387,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -392,9 +392,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  #define	NUM_TRGMII_CTRL			5
-@@ -54,11 +55,11 @@ enum mt753x_id {
- #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
+@@ -59,11 +60,11 @@ enum mt753x_id {
  #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
+ #define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
  
 -#define MT753X_MIRROR_REG(id)		(((id) == ID_MT7531) ? \
 +#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -332,9 +333,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index 49ac8d9780..2689647319 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3264,6 +3264,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -773,10 +773,10 @@ struct mt753x_info {
+@@ -779,10 +779,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -795,7 +795,6 @@ struct mt7530_priv {
+@@ -801,7 +801,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -803,6 +802,7 @@ struct mt7530_priv {
+@@ -809,6 +808,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index 00977650c7..3775534338 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -4321,6 +4321,7 @@ CONFIG_NF_CONNTRACK_PROCFS=y
 # CONFIG_NF_DUP_IPV4 is not set
 # CONFIG_NF_DUP_IPV6 is not set
 # CONFIG_NF_FLOW_TABLE is not set
+# CONFIG_NF_FLOW_TABLE_PROCFS is not set
 # CONFIG_NF_LOG_ARP is not set
 # CONFIG_NF_LOG_BRIDGE is not set
 # CONFIG_NF_LOG_IPV4 is not set
diff --git a/target/linux/generic/hack-5.15/250-netfilter_depends.patch b/target/linux/generic/hack-5.15/250-netfilter_depends.patch
index d9a2b81d74..1f8af6dbe8 100644
--- a/target/linux/generic/hack-5.15/250-netfilter_depends.patch
+++ b/target/linux/generic/hack-5.15/250-netfilter_depends.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	depends on NETFILTER_ADVANCED
  	help
  	  H.323 is a VoIP signalling protocol from ITU-T. As one of the most
-@@ -1105,7 +1104,6 @@ config NETFILTER_XT_TARGET_SECMARK
+@@ -1114,7 +1113,6 @@ config NETFILTER_XT_TARGET_SECMARK
  
  config NETFILTER_XT_TARGET_TCPMSS
  	tristate '"TCPMSS" target support'
diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index da60334498..c4be10add8 100644
--- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	help
  	  This option adds the flow table core infrastructure.
  
-@@ -1010,6 +1009,15 @@ config NETFILTER_XT_TARGET_NOTRACK
+@@ -1019,6 +1018,15 @@ config NETFILTER_XT_TARGET_NOTRACK
  	depends on NETFILTER_ADVANCED
  	select NETFILTER_XT_TARGET_CT
  
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	depends on NETFILTER_ADVANCED
 --- a/net/netfilter/Makefile
 +++ b/net/netfilter/Makefile
-@@ -143,6 +143,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
+@@ -144,6 +144,7 @@ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIF
  obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_CT) += xt_CT.o
  obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,701 @@
+@@ -0,0 +1,702 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd at nbd.name>
 + *
@@ -163,7 +163,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		proto = veth->h_vlan_encapsulated_proto;
 +		break;
 +	case htons(ETH_P_PPP_SES):
-+		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
 +		break;
 +	default:
 +		proto = skb->protocol;
diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
index 75c2e41fb6..b4ed6c9910 100644
--- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
+@@ -1156,6 +1161,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
+@@ -1197,6 +1207,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
index 9968a79699..a64d3021d4 100644
--- a/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-5.15/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -204,6 +204,9 @@ static void __br_handle_local_finish(str
+@@ -209,6 +209,9 @@ static void __br_handle_local_finish(str
  /* note: already called with rcu_read_lock */
  static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__br_handle_local_finish(skb);
  
  	/* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -369,6 +372,17 @@ static rx_handler_result_t br_handle_fra
+@@ -376,6 +379,17 @@ static rx_handler_result_t br_handle_fra
  
  forward:
  	switch (p->state) {
diff --git a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
index 8c75554033..ba75e4a0f1 100644
--- a/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
+++ b/target/linux/generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
@@ -10,9 +10,9 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 
 --- a/net/netfilter/nf_flow_table_core.c
 +++ b/net/netfilter/nf_flow_table_core.c
-@@ -606,13 +606,41 @@ void nf_flow_table_free(struct nf_flowta
- }
- EXPORT_SYMBOL_GPL(nf_flow_table_free);
+@@ -651,6 +651,23 @@ static struct pernet_operations nf_flow_
+ 	.exit_batch = nf_flow_table_pernet_exit,
+ };
  
 +static int nf_flow_table_netdev_event(struct notifier_block *this,
 +				      unsigned long event, void *ptr)
@@ -33,26 +33,30 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
 +
  static int __init nf_flow_table_module_init(void)
  {
--	return nf_flow_table_offload_init();
-+	int ret;
-+
-+	ret = nf_flow_table_offload_init();
-+	if (ret)
-+		return ret;
-+
+ 	int ret;
+@@ -663,8 +680,14 @@ static int __init nf_flow_table_module_i
+ 	if (ret)
+ 		goto out_offload;
+ 
 +	ret = register_netdevice_notifier(&flow_offload_netdev_notifier);
 +	if (ret)
-+		nf_flow_table_offload_exit();
++		goto out_offload_init;
 +
-+	return ret;
- }
+ 	return 0;
+ 
++out_offload_init:
++	nf_flow_table_offload_exit();
+ out_offload:
+ 	unregister_pernet_subsys(&nf_flow_table_net_ops);
+ 	return ret;
+@@ -672,6 +695,7 @@ out_offload:
  
  static void __exit nf_flow_table_module_exit(void)
  {
 +	unregister_netdevice_notifier(&flow_offload_netdev_notifier);
  	nf_flow_table_offload_exit();
+ 	unregister_pernet_subsys(&nf_flow_table_net_ops);
  }
- 
 --- a/net/netfilter/nft_flow_offload.c
 +++ b/net/netfilter/nft_flow_offload.c
 @@ -455,47 +455,14 @@ static struct nft_expr_type nft_flow_off
diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 2f1b3ed793..3037a724bf 100644
--- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7803,7 +7803,7 @@ static int nft_register_flowtable_net_ho
+@@ -7811,7 +7811,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
index bbbebefdd5..fd1b79cdfe 100644
--- a/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
+++ b/target/linux/generic/pending-5.15/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -326,6 +326,8 @@ static rx_handler_result_t br_handle_fra
+@@ -331,6 +331,8 @@ static rx_handler_result_t br_handle_fra
  		fwd_mask |= p->group_fwd_mask;
  		switch (dest[5]) {
  		case 0x00:	/* Bridge Group Address */
diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
index 9ae65b8711..792135b0d2 100644
--- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
@@ -15,16 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds)
- 	struct mt7530_priv *priv = ds->priv;
- 	struct mt7530_dummy_poll p;
- 	u32 val, id;
--	int ret;
-+	int ret, i;
- 
- 	/* Reset whole chip through gpio pin or memory-mapped registers for
- 	 * different type of hardware
-@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2680,6 +2680,10 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
index 06546b79e3..609e03d964 100644
--- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2356,10 +2356,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  {
  	struct dsa_switch *ds = priv->ds;
  	struct device *dev = priv->dev;
@@ -30,7 +30,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bus = devm_mdiobus_alloc(dev);
  	if (!bus)
  		return -ENOMEM;
-@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2376,7 +2379,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	if (priv->irq)
  		mt7530_setup_mdio_irq(priv);
  
diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
index a3e3f1185a..1697347b53 100644
--- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3065,8 +3065,7 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
diff --git a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
index a8c084b980..b127d76e00 100644
--- a/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-5.15/920-mangle_bootargs.patch
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa
+@@ -960,6 +983,7 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("%s", linux_banner);
  	early_security_init();
  	setup_arch(&command_line);
diff --git a/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
index fed46b0986..9c03ef7ec4 100644
--- a/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/ipq806x/patches-5.15/0067-generic-Mangle-bootloader-s-kernel-arguments.patch
@@ -259,7 +259,7 @@ Signed-off-by: Adrian Panella <ianchi74 at outlook.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa
+@@ -997,6 +1001,18 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	jump_label_init();
diff --git a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch
index 1af5aefe0b..8eedc27fc1 100644
--- a/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch
+++ b/target/linux/mpc85xx/patches-5.15/900-powerpc-bootwrapper-disable-uImage-generation.patch
@@ -24,7 +24,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  image-$(CONFIG_EPAPR_BOOT)		+= zImage.epapr
  
  #
-@@ -409,15 +408,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
+@@ -410,15 +409,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
  $(obj)/vmlinux.strip: vmlinux
  	$(STRIP) -s -R .comment $< -o $@
  
diff --git a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index 1e1355b480..525e28b189 100644
--- a/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-5.15/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
+@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa
  	page_alloc_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);
diff --git a/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch
index b3dafd7b0c..4b51470051 100644
--- a/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/oxnas/patches-5.15/996-generic-Mangle-bootloader-s-kernel-arguments.patch
@@ -239,7 +239,7 @@ Signed-off-by: Adrian Panella <ianchi74 at outlook.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
+@@ -995,6 +999,18 @@ asmlinkage __visible void __init __no_sa
  	page_alloc_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);



From lede-commits at lists.infradead.org  Thu May 16 03:04:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 06:04:28 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.156
In-Reply-To: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
References: <171585386841.443970.17173700499783635475@git-01.infra.openwrt.org>
Message-ID: <mailman.36454.1715853877.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/fd42798fea6616edd8c7acea804d53dda683014e

commit fd42798fea6616edd8c7acea804d53dda683014e
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 28 12:58:23 2024 +0200

    kernel: bump 5.15 to 5.15.156
    
    No manual changes needed.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 1fbe41f4899aa05fceeb58100c9353b7d60cccca)
---
 include/kernel-5.15                                |  4 +--
 ...530-iterate-using-dsa_switch_for_each_use.patch |  4 +--
 ...530-populate-supported_interfaces-and-mac.patch | 18 +++++-----
 ...19-net-dsa-mt7530-remove-interface-checks.patch | 18 +++++-----
 ...530-drop-use-of-phylink_helper_basex_spee.patch |  2 +-
 ...530-only-indicate-linkmodes-that-can-be-s.patch |  8 ++---
 ...t7530-switch-to-use-phylink_get_linkmodes.patch | 12 +++----
 ...a-mt7530-partially-convert-to-phylink_pcs.patch | 38 +++++++++++-----------
 ...530-move-autoneg-handling-to-PCS-validati.patch |  6 ++--
 ...9-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch |  2 +-
 ...-dsa-mt753x-fix-pcs-conversion-regression.patch |  4 +--
 ...dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch |  6 ++--
 ...530-get-cpu-port-via-dp-cpu_dp-instead-of.patch | 16 ++++-----
 ...t7530-add-support-for-in-band-link-status.patch | 14 ++++----
 ....3-net-dsa-mt7530-use-external-PCS-driver.patch | 24 +++++++-------
 ...et-dsa-mt7530-refactor-SGMII-PCS-creation.patch |  4 +--
 ...-dsa-mt7530-use-unlocked-regmap-accessors.patch |  6 ++--
 ...530-use-regmap-to-access-switch-register-.patch | 14 ++++----
 ...530-move-SGMII-PCS-creation-to-mt7530_pro.patch |  6 ++--
 ...06-net-dsa-mt7530-introduce-mutex-helpers.patch | 12 +++----
 ...530-move-p5_intf_modes-function-to-mt7530.patch |  2 +-
 ...530-introduce-mt7530_probe_common-helper-.patch |  6 ++--
 ...530-introduce-mt7530_remove_common-helper.patch |  4 +--
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch | 14 ++++----
 ...530-introduce-driver-for-MT7988-built-in-.patch | 20 ++++++------
 ...4-net-dsa-mt7530-fix-support-for-MT7531BE.patch |  8 ++---
 ...610-netfilter_match_bypass_default_checks.patch |  2 +-
 ...ensure-all-MACs-are-powered-down-before-r.patch |  4 +--
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  4 +--
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  2 +-
 target/linux/x86/config-5.15                       |  4 +--
 31 files changed, 143 insertions(+), 145 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 4a82b9c9b3..5436913e05 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .155
-LINUX_KERNEL_HASH-5.15.155 = c85859b86d2e6d1fc91ca1be8b44f24a9b5bb9f86869b04a8665a3a6559126e4
+LINUX_VERSION-5.15 = .156
+LINUX_KERNEL_HASH-5.15.156 = 9f0465d14c93691056f5f94de647601f94f083ad8ce2e5d306564394b13e7778
diff --git a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
index 3f7f328247..bdb4a8315a 100644
--- a/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
+++ b/target/linux/generic/backport-5.15/705-01-v5.17-net-dsa-mt7530-iterate-using-dsa_switch_for_each_use.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1243,27 +1243,31 @@ static int
+@@ -1404,27 +1404,31 @@ static int
  mt7530_port_bridge_join(struct dsa_switch *ds, int port,
  			struct net_device *bridge)
  {
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Add the all other ports to this port matrix. */
-@@ -1368,24 +1372,28 @@ static void
+@@ -1529,24 +1533,28 @@ static void
  mt7530_port_bridge_leave(struct dsa_switch *ds, int port,
  			 struct net_device *bridge)
  {
diff --git a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
index c3902bb9c5..3f5b953a2a 100644
--- a/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
+++ b/target/linux/generic/backport-5.15/705-02-v5.19-net-dsa-mt7530-populate-supported_interfaces-and-mac.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2499,6 +2499,32 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,6 +2660,32 @@ mt7531_setup(struct dsa_switch *ds)
  	return 0;
  }
  
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7530_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -2535,6 +2561,37 @@ static bool mt7531_is_rgmii_port(struct
+@@ -2696,6 +2722,37 @@ static bool mt7531_is_rgmii_port(struct
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool
  mt7531_phy_mode_supported(struct dsa_switch *ds, int port,
  			  const struct phylink_link_state *state)
-@@ -3011,6 +3068,18 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3172,6 +3229,18 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
  			 unsigned long *supported)
-@@ -3246,6 +3315,7 @@ static const struct dsa_switch_ops mt753
+@@ -3407,6 +3476,7 @@ static const struct dsa_switch_ops mt753
  	.port_vlan_del		= mt7530_port_vlan_del,
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_validate	= mt753x_phylink_validate,
  	.phylink_mac_link_state	= mt753x_phylink_mac_link_state,
  	.phylink_mac_config	= mt753x_phylink_mac_config,
-@@ -3263,6 +3333,7 @@ static const struct mt753x_info mt753x_t
+@@ -3424,6 +3494,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -129,7 +129,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3274,6 +3345,7 @@ static const struct mt753x_info mt753x_t
+@@ -3435,6 +3506,7 @@ static const struct mt753x_info mt753x_t
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
@@ -137,7 +137,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7530_phy_mode_supported,
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
-@@ -3286,6 +3358,7 @@ static const struct mt753x_info mt753x_t
+@@ -3447,6 +3519,7 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7531_ind_phy_write,
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.phy_mode_supported = mt7531_phy_mode_supported,
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
-@@ -3348,6 +3421,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3509,6 +3582,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	 */
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
@@ -155,7 +155,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	    !priv->info->mac_port_get_state || !priv->info->mac_port_config)
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -796,6 +796,8 @@ struct mt753x_info {
+@@ -801,6 +801,8 @@ struct mt753x_info {
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
  	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
diff --git a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
index d1d56f5aa8..60634aa0d9 100644
--- a/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
+++ b/target/linux/generic/backport-5.15/705-03-v5.19-net-dsa-mt7530-remove-interface-checks.patch
@@ -21,7 +21,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2525,37 +2525,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2686,37 +2686,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
  {
  	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
-@@ -2592,44 +2561,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2753,44 +2722,6 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -104,7 +104,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2884,9 +2815,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -3045,9 +2976,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
  		if (state->interface != PHY_INTERFACE_MODE_GMII)
-@@ -3102,12 +3030,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3263,12 +3191,6 @@ mt753x_phylink_validate(struct dsa_switc
  	__ETHTOOL_DECLARE_LINK_MODE_MASK(mask) = { 0, };
  	struct mt7530_priv *priv = ds->priv;
  
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set_port_modes(mask);
  
  	if (state->interface != PHY_INTERFACE_MODE_TRGMII &&
-@@ -3334,7 +3256,6 @@ static const struct mt753x_info mt753x_t
+@@ -3495,7 +3417,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -135,7 +135,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3346,7 +3267,6 @@ static const struct mt753x_info mt753x_t
+@@ -3507,7 +3428,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7530_mac_port_validate,
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
-@@ -3359,7 +3279,6 @@ static const struct mt753x_info mt753x_t
+@@ -3520,7 +3440,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -151,7 +151,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_validate = mt7531_mac_port_validate,
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
-@@ -3422,7 +3341,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3583,7 +3502,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -161,7 +161,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EINVAL;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -798,8 +798,6 @@ struct mt753x_info {
+@@ -803,8 +803,6 @@ struct mt753x_info {
  	int (*cpu_port_config)(struct dsa_switch *ds, int port);
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
index 19b44d35ed..f98cf4c793 100644
--- a/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
+++ b/target/linux/generic/backport-5.15/705-04-v5.19-net-dsa-mt7530-drop-use-of-phylink_helper_basex_spee.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3054,11 +3054,6 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3215,11 +3215,6 @@ mt753x_phylink_validate(struct dsa_switc
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
diff --git a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
index 5e55f92fc7..a499b8e5b1 100644
--- a/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
+++ b/target/linux/generic/backport-5.15/705-05-v5.19-net-dsa-mt7530-only-indicate-linkmodes-that-can-be-s.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2632,12 +2632,13 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2793,12 +2793,13 @@ static int mt7531_rgmii_setup(struct mt7
  }
  
  static void mt7531_sgmii_validate(struct mt7530_priv *priv, int port,
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		phylink_set(supported, 2500baseX_Full);
  		phylink_set(supported, 2500baseT_Full);
  	}
-@@ -3010,16 +3011,18 @@ static void mt753x_phylink_get_caps(stru
+@@ -3171,16 +3172,18 @@ static void mt753x_phylink_get_caps(stru
  
  static void
  mt7530_mac_port_validate(struct dsa_switch *ds, int port,
@@ -58,7 +58,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -3042,12 +3045,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3203,12 +3206,13 @@ mt753x_phylink_validate(struct dsa_switc
  	}
  
  	/* This switch only supports 1G full-duplex. */
@@ -76,7 +76,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	phylink_set(mask, Asym_Pause);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -799,6 +799,7 @@ struct mt753x_info {
+@@ -804,6 +804,7 @@ struct mt753x_info {
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
index ddf368fa1a..b7fc061060 100644
--- a/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
+++ b/target/linux/generic/backport-5.15/705-06-v5.19-net-dsa-mt7530-switch-to-use-phylink_get_linkmodes.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2631,19 +2631,6 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2792,19 +2792,6 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt7531_sgmii_link_up_force(struct dsa_switch *ds, int port,
  			   unsigned int mode, phy_interface_t interface,
-@@ -3010,51 +2997,21 @@ static void mt753x_phylink_get_caps(stru
+@@ -3171,51 +3158,21 @@ static void mt753x_phylink_get_caps(stru
  }
  
  static void
@@ -97,7 +97,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	linkmode_and(supported, supported, mask);
  	linkmode_and(state->advertising, state->advertising, mask);
-@@ -3255,7 +3212,6 @@ static const struct mt753x_info mt753x_t
+@@ -3416,7 +3373,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3266,7 +3222,6 @@ static const struct mt753x_info mt753x_t
+@@ -3427,7 +3383,6 @@ static const struct mt753x_info mt753x_t
  		.phy_write = mt7530_phy_write,
  		.pad_setup = mt7530_pad_clk_setup,
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
@@ -113,7 +113,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7530_phylink_mac_link_state,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3278,7 +3233,6 @@ static const struct mt753x_info mt753x_t
+@@ -3439,7 +3394,6 @@ static const struct mt753x_info mt753x_t
  		.pad_setup = mt7531_pad_setup,
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_state = mt7531_phylink_mac_link_state,
  		.mac_port_config = mt7531_mac_config,
  		.mac_pcs_an_restart = mt7531_sgmii_restart_an,
-@@ -3340,7 +3294,6 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3501,7 +3455,6 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
diff --git a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
index 7f69ea2fb4..7afa5be3d4 100644
--- a/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
+++ b/target/linux/generic/backport-5.15/705-07-v5.19-net-dsa-mt7530-partially-convert-to-phylink_pcs.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* String, offset, and register size in bytes if different from 4 bytes */
  static const struct mt7530_mib_desc mt7530_mib[] = {
  	MIB_DESC(1, 0x00, "TxDrop"),
-@@ -2631,12 +2636,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2792,12 +2797,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	unsigned int val;
  
  	/* For adjusting speed and duplex of SGMII force mode. */
-@@ -2662,6 +2666,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
+@@ -2823,6 +2827,9 @@ mt7531_sgmii_link_up_force(struct dsa_sw
  
  	/* MT7531 SGMII 1G force mode can only work in full duplex mode,
  	 * no matter MT7531_SGMII_FORCE_HALF_DUPLEX is set or not.
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	 */
  	if ((speed == SPEED_10 || speed == SPEED_100) &&
  	    duplex != DUPLEX_FULL)
-@@ -2737,9 +2744,10 @@ static int mt7531_sgmii_setup_mode_an(st
+@@ -2898,9 +2905,10 @@ static int mt7531_sgmii_setup_mode_an(st
  	return 0;
  }
  
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 val;
  
  	/* Only restart AN when AN is enabled */
-@@ -2796,6 +2804,24 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2957,6 +2965,24 @@ mt753x_mac_config(struct dsa_switch *ds,
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  			  const struct phylink_link_state *state)
-@@ -2857,17 +2883,6 @@ unsupported:
+@@ -3018,17 +3044,6 @@ unsupported:
  		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
  }
  
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
  					 unsigned int mode,
  					 phy_interface_t interface)
-@@ -2877,16 +2892,13 @@ static void mt753x_phylink_mac_link_down
+@@ -3038,16 +3053,13 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -139,7 +139,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
-@@ -2899,8 +2911,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3060,8 +3072,6 @@ static void mt753x_phylink_mac_link_up(s
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr;
  
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
-@@ -2978,6 +2988,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3139,6 +3149,8 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
@@ -157,7 +157,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
  				   speed, DUPLEX_FULL, true, true);
  
-@@ -3017,16 +3029,13 @@ mt753x_phylink_validate(struct dsa_switc
+@@ -3178,16 +3190,13 @@ mt753x_phylink_validate(struct dsa_switc
  	linkmode_and(state->advertising, state->advertising, mask);
  }
  
@@ -178,7 +178,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	pmsr = mt7530_read(priv, MT7530_PMSR_P(port));
  
  	state->link = (pmsr & PMSR_LINK);
-@@ -3053,8 +3062,6 @@ mt7530_phylink_mac_link_state(struct dsa
+@@ -3214,8 +3223,6 @@ mt7530_phylink_mac_link_state(struct dsa
  		state->pause |= MLO_PAUSE_RX;
  	if (pmsr & PMSR_TX_FC)
  		state->pause |= MLO_PAUSE_TX;
@@ -187,7 +187,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -3096,32 +3103,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3257,32 +3264,49 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (ret)
  		return ret;
-@@ -3134,6 +3158,13 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3295,6 +3319,13 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -263,7 +263,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return ret;
  }
  
-@@ -3195,9 +3226,8 @@ static const struct dsa_switch_ops mt753
+@@ -3356,9 +3387,8 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
  	.phylink_validate	= mt753x_phylink_validate,
@@ -274,7 +274,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
-@@ -3207,36 +3237,34 @@ static const struct dsa_switch_ops mt753
+@@ -3368,36 +3398,34 @@ static const struct dsa_switch_ops mt753
  static const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
@@ -314,7 +314,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  
-@@ -3294,7 +3322,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3455,7 +3483,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (!priv->info->sw_setup || !priv->info->pad_setup ||
  	    !priv->info->phy_read || !priv->info->phy_write ||
  	    !priv->info->mac_port_get_caps ||
@@ -325,7 +325,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	priv->id = priv->info->id;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -768,6 +768,12 @@ static const char *p5_intf_modes(unsigne
+@@ -773,6 +773,12 @@ static const char *p5_intf_modes(unsigne
  
  struct mt7530_priv;
  
@@ -338,7 +338,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /* struct mt753x_info -	This is the main data structure for holding the specific
   *			part for each supported device
   * @sw_setup:		Holding the handler to a device initialization
-@@ -779,18 +785,14 @@ struct mt7530_priv;
+@@ -784,18 +790,14 @@ struct mt7530_priv;
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
   *			certan MAC port
@@ -359,7 +359,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
-@@ -801,15 +803,9 @@ struct mt753x_info {
+@@ -806,15 +808,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
@@ -375,7 +375,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
  
  /* struct mt7530_priv -	This is the main data structure for holding the state
-@@ -851,6 +847,7 @@ struct mt7530_priv {
+@@ -856,6 +852,7 @@ struct mt7530_priv {
  	u8			mirror_tx;
  
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
index 565a5d0bc5..7731c16c96 100644
--- a/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
+++ b/target/linux/generic/backport-5.15/705-08-v5.19-net-dsa-mt7530-move-autoneg-handling-to-PCS-validati.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3008,25 +3008,16 @@ static void mt753x_phylink_get_caps(stru
+@@ -3169,25 +3169,16 @@ static void mt753x_phylink_get_caps(stru
  	priv->info->mac_port_get_caps(ds, port, config);
  }
  
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt7530_pcs_get_state(struct phylink_pcs *pcs,
-@@ -3128,12 +3119,14 @@ static void mt7530_pcs_an_restart(struct
+@@ -3289,12 +3280,14 @@ static void mt7530_pcs_an_restart(struct
  }
  
  static const struct phylink_pcs_ops mt7530_pcs_ops = {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.pcs_get_state = mt7531_pcs_get_state,
  	.pcs_config = mt753x_pcs_config,
  	.pcs_an_restart = mt7531_pcs_an_restart,
-@@ -3225,7 +3218,6 @@ static const struct dsa_switch_ops mt753
+@@ -3386,7 +3379,6 @@ static const struct dsa_switch_ops mt753
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
diff --git a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
index da9fe699e3..bd35cb1043 100644
--- a/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
+++ b/target/linux/generic/backport-5.15/705-09-v5.19-net-dsa-mt7530-mark-as-non-legacy.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3005,6 +3005,12 @@ static void mt753x_phylink_get_caps(stru
+@@ -3166,6 +3166,12 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
diff --git a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
index eea598a7f4..cff22b5eac 100644
--- a/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
+++ b/target/linux/generic/backport-5.15/705-10-v5.19-net-dsa-mt753x-fix-pcs-conversion-regression.patch
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3143,9 +3143,16 @@ static int
+@@ -3304,9 +3304,16 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (ret)
  		return ret;
  
-@@ -3157,13 +3164,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3318,13 +3325,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
index c0dce51a2a..c9f830381e 100644
--- a/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
+++ b/target/linux/generic/backport-5.15/705-11-v6.0-net-dsa-mt7530-rework-mt7530_hw_vlan_-add-del.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1589,11 +1589,11 @@ static void
+@@ -1750,11 +1750,11 @@ static void
  mt7530_hw_vlan_add(struct mt7530_priv *priv,
  		   struct mt7530_hw_vlan_entry *entry)
  {
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* Validate the entry with independent learning, create egress tag per
  	 * VLAN and joining the port as one of the port members.
-@@ -1604,22 +1604,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
+@@ -1765,22 +1765,20 @@ mt7530_hw_vlan_add(struct mt7530_priv *p
  
  	/* Decide whether adding tag or not for those outgoing packets from the
  	 * port inside the VLAN.
@@ -72,7 +72,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static void
-@@ -1638,11 +1636,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
+@@ -1799,11 +1797,7 @@ mt7530_hw_vlan_del(struct mt7530_priv *p
  		return;
  	}
  
diff --git a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
index 7a4ee56cf9..bb36302f24 100644
--- a/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
+++ b/target/linux/generic/backport-5.15/705-13-v6.0-net-dsa-mt7530-get-cpu-port-via-dp-cpu_dp-instead-of.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1093,6 +1093,7 @@ static int
+@@ -1254,6 +1254,7 @@ static int
  mt7530_port_enable(struct dsa_switch *ds, int port,
  		   struct phy_device *phy)
  {
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1101,7 +1102,11 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1262,7 +1263,11 @@ mt7530_port_enable(struct dsa_switch *ds
  	 * restore the port matrix if the port is the member of a certain
  	 * bridge.
  	 */
@@ -42,7 +42,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
-@@ -1249,7 +1254,8 @@ mt7530_port_bridge_join(struct dsa_switc
+@@ -1410,7 +1415,8 @@ mt7530_port_bridge_join(struct dsa_switc
  			struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1326,9 +1332,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1487,9 +1493,12 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	 * the CPU port get out of VLAN filtering mode.
  	 */
  	if (all_user_ports_removed) {
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     | PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
  	}
  }
-@@ -1378,6 +1387,7 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1539,6 +1548,7 @@ mt7530_port_bridge_leave(struct dsa_swit
  			 struct net_device *bridge)
  {
  	struct dsa_port *dp = dsa_to_port(ds, port), *other_dp;
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_priv *priv = ds->priv;
  
  	mutex_lock(&priv->reg_mutex);
-@@ -1406,8 +1416,8 @@ mt7530_port_bridge_leave(struct dsa_swit
+@@ -1567,8 +1577,8 @@ mt7530_port_bridge_leave(struct dsa_swit
  	 */
  	if (priv->ports[port].enable)
  		mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* When a port is removed from the bridge, the port would be set up
  	 * back to the default as is at initial boot which is a VLAN-unaware
-@@ -1570,6 +1580,9 @@ static int
+@@ -1731,6 +1741,9 @@ static int
  mt7530_port_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering,
  			   struct netlink_ext_ack *extack)
  {
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (vlan_filtering) {
  		/* The port is being kept as VLAN-unaware port when bridge is
  		 * set up with vlan_filtering not being set, Otherwise, the
-@@ -1577,7 +1590,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
+@@ -1738,7 +1751,7 @@ mt7530_port_vlan_filtering(struct dsa_sw
  		 * for becoming a VLAN-aware port.
  		 */
  		mt7530_port_set_vlan_aware(ds, port);
diff --git a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
index 7b89dbc206..acb67ab161 100644
--- a/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
+++ b/target/linux/generic/backport-5.15/782-v6.1-net-dsa-mt7530-add-support-for-in-band-link-status.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2791,9 +2791,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2952,9 +2952,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	case PHY_INTERFACE_MODE_NA:
  	case PHY_INTERFACE_MODE_1000BASEX:
  	case PHY_INTERFACE_MODE_2500BASEX:
@@ -29,7 +29,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return mt7531_sgmii_setup_mode_force(priv, port, interface);
  	default:
  		return -EINVAL;
-@@ -2869,13 +2866,6 @@ unsupported:
+@@ -3030,13 +3027,6 @@ unsupported:
  		return;
  	}
  
@@ -43,7 +43,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -3012,6 +3002,9 @@ static void mt753x_phylink_get_caps(stru
+@@ -3173,6 +3163,9 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* This driver does not make use of the speed, duplex, pause or the
  	 * advertisement in its mac_config, so it is safe to mark this driver
  	 * as non-legacy.
-@@ -3077,6 +3070,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3238,6 +3231,7 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  
  	status = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
  	state->link = !!(status & MT7531_SGMII_LINK_STATUS);
@@ -61,7 +61,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (state->interface == PHY_INTERFACE_MODE_SGMII &&
  	    (status & MT7531_SGMII_AN_ENABLE)) {
  		val = mt7530_read(priv, MT7531_PCS_SPEED_ABILITY(port));
-@@ -3107,16 +3101,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
+@@ -3268,16 +3262,44 @@ mt7531_sgmii_pcs_get_state_an(struct mt7
  	return 0;
  }
  
@@ -109,7 +109,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
-@@ -3157,6 +3179,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3318,6 +3340,8 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -120,7 +120,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	ret = priv->info->sw_setup(ds);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -400,6 +400,7 @@ enum mt7530_vlan_port_acc_frm {
+@@ -405,6 +405,7 @@ enum mt7530_vlan_port_acc_frm {
  #define  MT7531_SGMII_LINK_STATUS	BIT(18)
  #define  MT7531_SGMII_AN_ENABLE		BIT(12)
  #define  MT7531_SGMII_AN_RESTART	BIT(9)
diff --git a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
index b9d3018f11..d8386fc3cb 100644
--- a/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-5.15/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -81,7 +81,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2643,128 +2644,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2804,128 +2805,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -210,7 +210,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2787,11 +2671,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2948,11 +2832,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -224,7 +224,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return -EINVAL;
  	}
-@@ -2816,11 +2700,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -2977,11 +2861,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -238,7 +238,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return NULL;
  	}
-@@ -3061,86 +2945,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3222,86 +3106,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -325,7 +325,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3160,18 +2964,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3321,18 +3125,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -389,7 +389,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3179,8 +3022,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3340,8 +3183,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -398,7 +398,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3195,6 +3036,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3356,6 +3197,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -415,7 +415,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	return ret;
  }
  
-@@ -3286,7 +3137,7 @@ static const struct mt753x_info mt753x_t
+@@ -3447,7 +3298,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -424,7 +424,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3394,7 +3245,7 @@ static void
+@@ -3555,7 +3406,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -433,7 +433,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  	if (!priv)
  		return;
-@@ -3413,6 +3264,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3574,6 +3425,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -446,7 +446,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	dev_set_drvdata(&mdiodev->dev, NULL);
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -396,47 +396,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -496,7 +496,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -730,13 +691,13 @@ struct mt7530_fdb {
+@@ -735,13 +696,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index 34db4fce0b..8311aaa0bf 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2996,26 +2996,56 @@ static const struct regmap_bus mt7531_re
+@@ -3157,26 +3157,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3037,15 +3067,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3198,15 +3228,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 04060b48ba..7271f1023b 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2969,7 +2969,7 @@ static int mt7530_regmap_read(void *cont
+@@ -3130,7 +3130,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -2977,23 +2977,25 @@ static int mt7530_regmap_write(void *con
+@@ -3138,23 +3138,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -3019,6 +3021,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3180,6 +3182,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index 48854fd234..2f761c2fad 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2965,22 +2986,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3126,22 +3147,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -2993,7 +2998,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -3154,7 +3159,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -3026,7 +3031,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3187,7 +3192,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3191,6 +3196,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3352,6 +3357,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3270,6 +3276,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3431,6 +3437,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -774,6 +774,7 @@ struct mt753x_info {
+@@ -779,6 +779,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -794,6 +795,7 @@ struct mt7530_priv {
+@@ -799,6 +800,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index b4bcdd0c9d..16feba1daf 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3077,12 +3077,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3238,12 +3238,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3199,6 +3193,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3360,6 +3354,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3291,6 +3286,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3452,6 +3447,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
index b9507e6d9b..dc4b40b824 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1162,7 +1162,6 @@ static int
+@@ -1323,7 +1323,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1173,7 +1172,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1334,7 +1333,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1194,7 +1193,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1355,7 +1354,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -1990,10 +1989,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -2151,10 +2150,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -2029,7 +2028,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2190,7 +2189,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2038,7 +2037,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2199,7 +2198,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index b04a84965b..265cf1fdac 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -709,24 +709,6 @@ enum p5_interface_select {
+@@ -714,24 +714,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index 3f656c7a67..10e2c6a184 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3205,44 +3205,21 @@ static const struct of_device_id mt7530_
+@@ -3366,44 +3366,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3256,23 +3233,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3417,23 +3394,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3281,12 +3288,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3442,12 +3449,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index efbabf668c..4e754b1002 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3323,6 +3323,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3484,6 +3484,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3341,16 +3352,11 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3502,16 +3513,11 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index ee944a6fc5..e970ec3804 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -416,7 +416,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -3003,72 +2954,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3164,72 +3115,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3127,7 +3012,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3288,7 +3173,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -498,7 +498,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
  	.get_strings		= mt7530_get_strings,
-@@ -3161,8 +3046,9 @@ static const struct dsa_switch_ops mt753
+@@ -3322,8 +3207,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -509,7 +509,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3195,16 +3081,9 @@ static const struct mt753x_info mt753x_t
+@@ -3356,16 +3242,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -528,7 +528,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3241,88 +3120,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3402,88 +3281,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -619,7 +619,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3333,57 +3133,6 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3494,57 +3294,6 @@ mt7530_remove_common(struct mt7530_priv
  	mutex_destroy(&priv->reg_mutex);
  }
  
@@ -679,7 +679,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -839,4 +839,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index e6c1b941dd..3d94295eee 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2037,6 +2037,47 @@ static const struct irq_domain_ops mt753
+@@ -2198,6 +2198,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2070,8 +2111,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2231,8 +2272,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2566,6 +2614,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2727,6 +2775,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2642,6 +2709,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2803,6 +2870,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2711,7 +2789,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2872,7 +2950,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2789,7 +2868,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2950,7 +3029,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -2869,6 +2949,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3030,6 +3110,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3014,6 +3109,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3175,6 +3270,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3082,6 +3198,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3243,6 +3359,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -327,9 +328,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index 071680f100..49ac8d9780 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0014-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3076,6 +3076,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3237,6 +3237,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -768,10 +768,10 @@ struct mt753x_info {
+@@ -773,10 +773,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -790,7 +790,6 @@ struct mt7530_priv {
+@@ -795,7 +795,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -798,6 +797,7 @@ struct mt7530_priv {
+@@ -803,6 +802,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
index b17196d3a9..8b1e70bd0e 100644
--- a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1226,12 +1263,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
index f10fa057d5..9ae65b8711 100644
--- a/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ b/target/linux/generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
@@ -15,7 +15,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2467,7 +2467,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2628,7 +2628,7 @@ mt7531_setup(struct dsa_switch *ds)
  	struct mt7530_priv *priv = ds->priv;
  	struct mt7530_dummy_poll p;
  	u32 val, id;
@@ -24,7 +24,7 @@ Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
  
  	/* Reset whole chip through gpio pin or memory-mapped registers for
  	 * different type of hardware
-@@ -2499,6 +2499,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,6 +2660,10 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
index b0c0185335..06546b79e3 100644
--- a/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ b/target/linux/generic/pending-5.15/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2174,10 +2174,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2335,10 +2335,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  {
  	struct dsa_switch *ds = priv->ds;
  	struct device *dev = priv->dev;
@@ -30,7 +30,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bus = devm_mdiobus_alloc(dev);
  	if (!bus)
  		return -ENOMEM;
-@@ -2194,7 +2197,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2355,7 +2358,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	if (priv->irq)
  		mt7530_setup_mdio_irq(priv);
  
diff --git a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
index 0f97033db6..a3e3f1185a 100644
--- a/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ b/target/linux/generic/pending-5.15/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -33,7 +33,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2877,8 +2877,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3038,8 +3038,7 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15
index dc37973ac4..253c6de7e4 100644
--- a/target/linux/x86/config-5.15
+++ b/target/linux/x86/config-5.15
@@ -225,6 +225,7 @@ CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
 CONFIG_MITIGATION_RFDS=y
+CONFIG_MITIGATION_SPECTRE_BHI=y
 # CONFIG_MK6 is not set
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set
@@ -328,9 +329,6 @@ CONFIG_SG_POOL=y
 # CONFIG_SMSC_SCH311X_WDT is not set
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
-# CONFIG_SPECTRE_BHI_AUTO is not set
-# CONFIG_SPECTRE_BHI_OFF is not set
-CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SRCU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Thu May 16 03:13:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 06:13:53 -0400
Subject: [openwrt/openwrt]  ramips: Fix use mac-base for TP-Link TL-MR6400 v4
 and v5
In-Reply-To: <171585443231.455753.14500624605826775805@git-01.infra.openwrt.org>
References: <171585443231.455753.14500624605826775805@git-01.infra.openwrt.org>
Message-ID: <mailman.36463.1715854436.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9c84d619fcf31b810cdea18d751a4418d956da81

commit 9c84d619fcf31b810cdea18d751a4418d956da81
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu May 9 22:10:52 2024 +0200

    ramips: Fix use mac-base for TP-Link TL-MR6400 v4 and v5
    
    Use mac-base for mac-base TP-Link TL-MR6400 v4 and v5
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts | 6 ++++--
 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
index 19783274e7..67cc54650f 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
@@ -91,12 +91,12 @@
 &wmac {
 	status = "okay";
 
-	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100>;
+	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100 0>;
 	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &ethernet {
-	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cells = <&macaddr_factory_1f100 0>;
 	nvmem-cell-names = "mac-address";
 };
 
@@ -107,7 +107,9 @@
 		#size-cells = <1>;
 
 		macaddr_factory_1f100: macaddr at 1f100 {
+			compatible = "mac-base";
 			reg = <0x1f100 0x6>;
+			#nvmem-cell-cells = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
index 857e61f614..609452dfe1 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
@@ -91,12 +91,12 @@
 &wmac {
 	status = "okay";
 
-	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100>;
+	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100 0>;
 	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &ethernet {
-	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cells = <&macaddr_factory_1f100 0>;
 	nvmem-cell-names = "mac-address";
 };
 
@@ -107,7 +107,9 @@
 		#size-cells = <1>;
 
 		macaddr_factory_1f100: macaddr at 1f100 {
+			compatible = "mac-base";
 			reg = <0x1f100 0x6>;
+			#nvmem-cell-cells = <1>;
 		};
 	};
 };



From lede-commits at lists.infradead.org  Thu May 16 03:13:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 06:13:52 -0400
Subject: [openwrt/openwrt]  ramips: Fix wmac dts definition for TP-Link
 TL-MR6400 v4 and v5
In-Reply-To: <171585443231.455753.14500624605826775805@git-01.infra.openwrt.org>
References: <171585443231.455753.14500624605826775805@git-01.infra.openwrt.org>
Message-ID: <mailman.36464.1715854441.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ff3d0de095065fe642177940c055825f859e5a07

commit ff3d0de095065fe642177940c055825f859e5a07
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu May 9 12:28:35 2024 +0200

    ramips: Fix wmac dts definition for TP-Link TL-MR6400 v4 and v5
    
    This code assumed that the mt7628an_tplink_8m.dtsi file defines
    mediatek,mtd-eeprom for the wmac and sets status to okay.
    
    The mediatek,mtd-eeprom definition was removed in commit e93f41adee3e
    ("ramips: convert MT7628 EEPROM to NVMEM format") but the dts for these
    two devices was not adapted to include the eeprom position on its own.
    
    The status = "okay" property was removed in 0a1d15642fa6 ("ramips:
    mt7628: use nvmem-layout"), but the property was not added to these dts
    files.
    
    Without this change wifi does not work for these devices.
    
    Fixes: e93f41adee3e ("ramips: convert MT7628 EEPROM to NVMEM format")
    Fixes: 0a1d15642fa6 ("ramips: mt7628: use nvmem-layout")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts | 6 ++++--
 target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
index 21d1e48336..19783274e7 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
@@ -89,8 +89,10 @@
 };
 
 &wmac {
-	nvmem-cells = <&macaddr_factory_1f100>;
-	nvmem-cell-names = "mac-address";
+	status = "okay";
+
+	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
index 1bd35fc334..857e61f614 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
@@ -89,8 +89,10 @@
 };
 
 &wmac {
-	nvmem-cells = <&macaddr_factory_1f100>;
-	nvmem-cell-names = "mac-address";
+	status = "okay";
+
+	nvmem-cells = <&eeprom_factory_20000>, <&macaddr_factory_1f100>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };
 
 &ethernet {



From lede-commits at lists.infradead.org  Thu May 16 05:57:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 08:57:57 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2024-01-18)
In-Reply-To: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
References: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
Message-ID: <mailman.36532.1715864282.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a39e47e0c9481318942a5ded7eafff286be4b696

commit a39e47e0c9481318942a5ded7eafff286be4b696
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu May 16 14:06:06 2024 +0200

    mt76: update to Git HEAD (2024-01-18)
    
    83e3947e2c52 linux-firmware: update firmware for MT7922 WiFi device
    ddaa8cb6e81a linux-firmware: update firmware for MT7921 WiFi device
    f83b1601cc10 linux-firmware: update firmware for MT7922 WiFi device
    61d334ab0f33 linux-firmware: add firmware for MT7925
    a7836e4c8a60 wifi: mt76: disable HW AMSDU when using fixed rate
    a8571ebbcd95 wifi: mt76: check txs format before getting skb by pid
    3d5890e2cab3 wifi: mt76: mt7915: fix error recovery with WED enabled
    703c26d01197 wifi: mt76: mt7915: add locking for accessing mapped registers
    f77188160441 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit a28cedbdab96be9bee39bb70098a1508c0252a8a)
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 65f6ca1e8e..1fea3bd0e9 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-12-18
-PKG_SOURCE_VERSION:=bebd9cffc2aeb2cecb40aadbb8c6eab3bdf7971b
-PKG_MIRROR_HASH:=580261755bc3f251b8bc5f7f610274693c067432187570694d2f2ccab0edb62b
+PKG_SOURCE_DATE:=2024-01-18
+PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0
+PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0



From lede-commits at lists.infradead.org  Thu May 16 05:57:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 08:57:59 -0400
Subject: [openwrt/openwrt]  mt76: backport mt7603 fixes important for its
 stability
In-Reply-To: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
References: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
Message-ID: <mailman.36533.1715864285.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/2568b30285ff8715b45434f050ba4598dba1f34b

commit 2568b30285ff8715b45434f050ba4598dba1f34b
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Thu May 16 14:11:24 2024 +0200

    mt76: backport mt7603 fixes important for its stability
    
    Those are required for stable MT7603E & on-SoC MT7628/MT7688 wireless
    support. After mt76 receiving more testing we may just update codebase
    and drop those backports.
    
    Fixes: https://github.com/openwrt/mt76/issues/865
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       |  2 +-
 ...6-mt7603-fix-tx-queue-of-loopback-packets.patch | 99 ++++++++++++++++++++++
 ...t7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch | 24 ++++++
 3 files changed, 124 insertions(+), 1 deletion(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 4f0fb5f69d..22269277da 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch b/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch
new file mode 100644
index 0000000000..56a2aea6f6
--- /dev/null
+++ b/package/kernel/mt76/patches/0007-wifi-mt76-mt7603-fix-tx-queue-of-loopback-packets.patch
@@ -0,0 +1,99 @@
+From e4de3592c4e3baa82142eff583cb5a761f790709 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 2 Apr 2024 20:14:34 +0200
+Subject: [PATCH] wifi: mt76: mt7603: fix tx queue of loopback packets
+
+Use the correct WMM AC queue instead of the MGMT one to fix potential issues
+with aggregation sequence number tracking. Drop non-bufferable packets.
+
+Fixes: fca9615f1a43 ("mt76: mt7603: fix up hardware queue index for PS filtered packets")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7603/dma.c | 46 ++++++++++++++++++++++++++++++++--------------
+ 1 file changed, 32 insertions(+), 14 deletions(-)
+
+--- a/mt7603/dma.c
++++ b/mt7603/dma.c
+@@ -4,6 +4,13 @@
+ #include "mac.h"
+ #include "../dma.h"
+ 
++static const u8 wmm_queue_map[] = {
++	[IEEE80211_AC_BK] = 0,
++	[IEEE80211_AC_BE] = 1,
++	[IEEE80211_AC_VI] = 2,
++	[IEEE80211_AC_VO] = 3,
++};
++
+ static void
+ mt7603_rx_loopback_skb(struct mt7603_dev *dev, struct sk_buff *skb)
+ {
+@@ -22,10 +29,10 @@ mt7603_rx_loopback_skb(struct mt7603_dev
+ 	struct ieee80211_sta *sta;
+ 	struct mt7603_sta *msta;
+ 	struct mt76_wcid *wcid;
++	u8 tid = 0, hwq = 0;
+ 	void *priv;
+ 	int idx;
+ 	u32 val;
+-	u8 tid = 0;
+ 
+ 	if (skb->len < MT_TXD_SIZE + sizeof(struct ieee80211_hdr))
+ 		goto free;
+@@ -42,19 +49,36 @@ mt7603_rx_loopback_skb(struct mt7603_dev
+ 		goto free;
+ 
+ 	priv = msta = container_of(wcid, struct mt7603_sta, wcid);
+-	val = le32_to_cpu(txd[0]);
+-	val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX);
+-	val |= FIELD_PREP(MT_TXD0_Q_IDX, MT_TX_HW_QUEUE_MGMT);
+-	txd[0] = cpu_to_le32(val);
+ 
+ 	sta = container_of(priv, struct ieee80211_sta, drv_priv);
+ 	hdr = (struct ieee80211_hdr *)&skb->data[MT_TXD_SIZE];
+-	if (ieee80211_is_data_qos(hdr->frame_control))
++
++	hwq = wmm_queue_map[IEEE80211_AC_BE];
++	if (ieee80211_is_data_qos(hdr->frame_control)) {
+ 		tid = *ieee80211_get_qos_ctl(hdr) &
+-		      IEEE80211_QOS_CTL_TAG1D_MASK;
+-	skb_set_queue_mapping(skb, tid_to_ac[tid]);
++			 IEEE80211_QOS_CTL_TAG1D_MASK;
++		u8 qid = tid_to_ac[tid];
++		hwq = wmm_queue_map[qid];
++		skb_set_queue_mapping(skb, qid);
++	} else if (ieee80211_is_data(hdr->frame_control)) {
++		skb_set_queue_mapping(skb, IEEE80211_AC_BE);
++		hwq = wmm_queue_map[IEEE80211_AC_BE];
++	} else {
++		skb_pull(skb, MT_TXD_SIZE);
++		if (!ieee80211_is_bufferable_mmpdu(skb))
++			goto free;
++		skb_push(skb, MT_TXD_SIZE);
++		skb_set_queue_mapping(skb, MT_TXQ_PSD);
++		hwq = MT_TX_HW_QUEUE_MGMT;
++	}
++
+ 	ieee80211_sta_set_buffered(sta, tid, true);
+ 
++	val = le32_to_cpu(txd[0]);
++	val &= ~(MT_TXD0_P_IDX | MT_TXD0_Q_IDX);
++	val |= FIELD_PREP(MT_TXD0_Q_IDX, hwq);
++	txd[0] = cpu_to_le32(val);
++
+ 	spin_lock_bh(&dev->ps_lock);
+ 	__skb_queue_tail(&msta->psq, skb);
+ 	if (skb_queue_len(&msta->psq) >= 64) {
+@@ -151,12 +175,6 @@ static int mt7603_poll_tx(struct napi_st
+ 
+ int mt7603_dma_init(struct mt7603_dev *dev)
+ {
+-	static const u8 wmm_queue_map[] = {
+-		[IEEE80211_AC_BK] = 0,
+-		[IEEE80211_AC_BE] = 1,
+-		[IEEE80211_AC_VI] = 2,
+-		[IEEE80211_AC_VO] = 3,
+-	};
+ 	int ret;
+ 	int i;
+ 
diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch b/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch
new file mode 100644
index 0000000000..31c4de4a0f
--- /dev/null
+++ b/package/kernel/mt76/patches/0008-wifi-mt76-mt7603-add-wpdma-tx-eof-flag-for-PSE-clien.patch
@@ -0,0 +1,24 @@
+From 446f652c967c11d50d9005e2acec97f8b577bb92 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 3 Apr 2024 11:11:54 +0200
+Subject: [PATCH] wifi: mt76: mt7603: add wpdma tx eof flag for PSE client
+ reset
+
+This flag is needed for the PSE client reset. Fixes watchdog reset issues.
+
+Fixes: c677dda16523 ("wifi: mt76: mt7603: improve watchdog reset reliablity")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7603/mac.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/mt7603/mac.c
++++ b/mt7603/mac.c
+@@ -1393,6 +1393,7 @@ void mt7603_pse_client_reset(struct mt76
+ 		   MT_CLIENT_RESET_TX_R_E_2_S);
+ 
+ 	/* Start PSE client TX abort */
++	mt76_set(dev, MT_WPDMA_GLO_CFG, MT_WPDMA_GLO_CFG_FORCE_TX_EOF);
+ 	mt76_set(dev, addr, MT_CLIENT_RESET_TX_R_E_1);
+ 	mt76_poll_msec(dev, addr, MT_CLIENT_RESET_TX_R_E_1_S,
+ 		       MT_CLIENT_RESET_TX_R_E_1_S, 500);



From lede-commits at lists.infradead.org  Thu May 16 05:57:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 08:57:58 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2024-02-03)
In-Reply-To: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
References: <171586427760.705899.17723123852428529858@git-01.infra.openwrt.org>
Message-ID: <mailman.36534.1715864285.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ffd0074694722a919333e0a8283ac58929457af0

commit ffd0074694722a919333e0a8283ac58929457af0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu May 16 14:06:12 2024 +0200

    mt76: update to Git HEAD (2024-02-03)
    
    a9693e1979c2 linux-firmware: add firmware for MT7996
    0258dc90e3a1 wifi: mt76: mt7603: fix reading target power from eeprom
    3e81173d9e2b wifi: mt76: mt7603: initialize chainmask
    786a339bac36 wifi: mt76: mt7996: fix fortify warning
    bc37a7ebc267 wifi: mt76: mt7996: fix fw loading timeout
    027bab6a88a3 wifi: mt76: usb: create a dedicated queue for psd traffic
    e8909c610c3b wifi: mt76: usb: store usb endpoint in mt76_queue
    8b3d96fa4ead wifi: mt76: mt792xu: enable dmashdl support
    7864d7ad0ed0 wifi: mt76: mt76x2u: add netgear wdna3100v3 to device table
    27c81f7c1480 wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band
    b7443c63069a wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band
    bab721a65f5a wifi: mt76: mt7925: fix mcu query command fail
    1f0f71ed81e8 wifi: mt76: mt7925: fix wmm queue mapping
    bcfe2ad966f3 wifi: mt76: mt7925: fix fw download fail
    f982c3d67a29 wifi: mt76: mt7925: fix WoW failed in encrypted mode
    6a72716ec213 wifi: mt76: mt7925: fix the wrong header translation config
    50928b7e1359 wifi: mt76: mt7925: add flow to avoid chip bt function fail
    762ab4530e8f wifi: mt76: mt7925: add support to set ifs time by mcu command
    87deaf82efa4 wifi: mt76: mt7925: update PCIe DMA settings
    c190c1576522 wifi: mt76: mt7925: support temperature sensor
    025d5734caba wifi: mt76: mt7996: check txs format before getting skb by pid
    4768bfa2baca wifi: mt76: mt7996: fix TWT issues
    a65e3eced907 wifi: mt76: mt7996: disable AMSDU for non-data frames
    d71716d93aee wifi: mt76: mt7996: fix incorrect interpretation of EHT MCS caps
    f21728f3f4bd wifi: mt76: mt7996: ensure 4-byte alignment for beacon commands
    68dad7dacd2a wifi: mt76: mt7996: fix HE beamformer phy cap for station vif
    66a28f340cdc wifi: mt76: mt7996: mark GCMP IGTK unsupported
    b47ad8a7764e wifi: mt76: mt7996: fix efuse reading issue
    c2fc7dae7b72 wifi: mt76: mt7996: remove TXS queue setting
    e0f1ed168ed5 wifi: mt76: mt7996: add locking for accessing mapped registers
    d0cc92c1fd08 wifi: mt76: connac: set correct muar_idx for mt799x chipsets
    ae0c62279adc wifi: mt76: mt7996: fix HIF_TXD_V2_1 value
    ecc14276af54 wifi: mt76: mt792x: fix ethtool warning
    9827df56b241 wifi: mt76: move wed common utilities in wed.c
    dccbd2598505 wifi: mt76: mt7925: fix the wrong data type for scan command
    9907f4f20261 wifi: mt76: mt792x: add the illegal value check for mtcl table of acpi
    1b088a7ac06d wifi: mt76: mt7921e: fix use-after-free in free_irq()
    f3c5b4820d7f wifi: mt76: mt7925e: fix use-after-free in free_irq()
    d75eac9f5531 wifi: mt76: mt7921: fix incorrect type conversion for CLC command
    7bd5401f5bb1 wifi: mt76: mt792x: fix a potential loading failure of the 6Ghz channel config from ACPI
    ea55196bc4a0 wifi: mt76: mt792x: update the country list of EU for ACPI SAR
    6124ea9135ed wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 114190d8ae61fb3a7671852fbd7f0ca3279a5625)
    [rmilecki: add patches/fixes for regressions from this commit]
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       | 24 +++++++--
 ...x-the-issue-of-missing-txpwr-settings-fr.patch} |  2 +-
 ...6-mt7996-fix-size-of-txpower-MCU-command.patch} |  6 +--
 ...0003-wifi-mt76-mt7996-fix-fortify-warning.patch | 26 ----------
 ...7996-fix-uninitialized-variable-in-mt799.patch} |  2 +-
 ...4-wifi-mt76-mt7996-fix-fw-loading-timeout.patch | 38 --------------
 ...7996-fix-potential-memory-leakage-when-r.patch} |  4 +-
 ...onnac-check-for-null-before-dereferencing.patch | 27 ++++++++++
 ...t7996-check-txs-format-before-getting-skb.patch | 60 ----------------------
 ...onnac-use-muar-idx-0xe-for-non-mt799x-as-.patch | 25 +++++++++
 ...t7921-fix-incorrect-type-conversion-for-C.patch | 38 --------------
 11 files changed, 80 insertions(+), 172 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 1fea3bd0e9..4f0fb5f69d 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-01-18
-PKG_SOURCE_VERSION:=f77188160441d5f77f08dd517632ae3f60c653b0
-PKG_MIRROR_HASH:=133a5e44624fe1933c893ee0b8ac75a847753f3490c26518c2ed9798f9ef53e0
+PKG_SOURCE_DATE:=2024-02-03
+PKG_SOURCE_VERSION:=6124ea9135ed512671933f5520c46842906c78bc
+PKG_MIRROR_HASH:=acc326d7b15c9c72b494ed601300be329553f896e65c7f045e6a09327304c34a
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
@@ -323,6 +323,12 @@ define KernelPackage/mt7996e
   AUTOLOAD:=$(call AutoProbe,mt7996e)
 endef
 
+define KernelPackage/mt7996-firmware
+  $(KernelPackage/mt76-default)
+  TITLE:=MediaTek MT7996 firmware
+  DEPENDS+=+kmod-mt7996e
+endef
+
 define KernelPackage/mt7925-common
   $(KernelPackage/mt76-default)
   TITLE:=MediaTek MT7925 wireless driver common code
@@ -610,6 +616,17 @@ define KernelPackage/mt7922-firmware/install
 		$(1)/lib/firmware/mediatek
 endef
 
+define KernelPackage/mt7996-firmware/install
+	$(INSTALL_DIR) $(1)/lib/firmware/mediatek/mt7996
+	cp \
+		$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_dsp.bin \
+		$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_eeprom.bin \
+		$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_rom_patch.bin \
+		$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wa.bin \
+		$(PKG_BUILD_DIR)/firmware/mt7996/mt7996_wm.bin \
+		$(1)/lib/firmware/mediatek/mt7996
+endef
+
 define Package/mt76-test/install
 	mkdir -p $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
@@ -654,5 +671,6 @@ $(eval $(call KernelPackage,mt7921e))
 $(eval $(call KernelPackage,mt7925u))
 $(eval $(call KernelPackage,mt7925e))
 $(eval $(call KernelPackage,mt7996e))
+$(eval $(call KernelPackage,mt7996-firmware))
 $(eval $(call KernelPackage,mt76))
 $(eval $(call BuildPackage,mt76-test))
diff --git a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
similarity index 94%
rename from package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
rename to package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
index 380bdfac38..ef7816a1a7 100644
--- a/package/kernel/mt76/patches/0007-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
+++ b/package/kernel/mt76/patches/0001-wifi-mt76-fix-the-issue-of-missing-txpwr-settings-fr.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/mt76_connac_mcu.c
 +++ b/mt76_connac_mcu.c
-@@ -2101,7 +2101,7 @@ mt76_connac_mcu_rate_txpower_band(struct
+@@ -2104,7 +2104,7 @@ mt76_connac_mcu_rate_txpower_band(struct
  		int j, msg_len, num_ch;
  		struct sk_buff *skb;
  
diff --git a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch b/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
similarity index 89%
rename from package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
rename to package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
index f1d3af80b8..f3d824558d 100644
--- a/package/kernel/mt76/patches/0008-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
+++ b/package/kernel/mt76/patches/0002-wifi-mt76-mt7996-fix-size-of-txpower-MCU-command.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/mt7996/mcu.c
 +++ b/mt7996/mcu.c
-@@ -4456,7 +4456,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
+@@ -4464,7 +4464,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
  		u8 band_idx;
  	} __packed req = {
  		.tag = cpu_to_le16(UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL),
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		.power_ctrl_id = UNI_TXPOWER_POWER_LIMIT_TABLE_CTRL,
  		.power_limit_type = TX_POWER_LIMIT_TABLE_RATE,
  		.band_idx = phy->mt76->band_idx,
-@@ -4471,7 +4471,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
+@@ -4479,7 +4479,7 @@ int mt7996_mcu_set_txpower_sku(struct mt
  	mphy->txpower_cur = tx_power;
  
  	skb = mt76_mcu_msg_alloc(&dev->mt76, NULL,
@@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!skb)
  		return -ENOMEM;
  
-@@ -4495,6 +4495,9 @@ int mt7996_mcu_set_txpower_sku(struct mt
+@@ -4503,6 +4503,9 @@ int mt7996_mcu_set_txpower_sku(struct mt
  	/* eht */
  	skb_put_data(skb, &la.eht[0], sizeof(la.eht));
  
diff --git a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch
deleted file mode 100644
index f3cf9c10fa..0000000000
--- a/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-fortify-warning.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 786a339bac36d8e53eb8b540e79221d20011ab2a Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sat, 3 Feb 2024 14:21:58 +0100
-Subject: [PATCH] wifi: mt76: mt7996: fix fortify warning
-
-Copy cck and ofdm separately in order to avoid __read_overflow2_field
-warning.
-
-Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/mcu.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/mt7996/mcu.c
-+++ b/mt7996/mcu.c
-@@ -4477,7 +4477,8 @@ int mt7996_mcu_set_txpower_sku(struct mt
- 
- 	skb_put_data(skb, &req, sizeof(req));
- 	/* cck and ofdm */
--	skb_put_data(skb, &la.cck, sizeof(la.cck) + sizeof(la.ofdm));
-+	skb_put_data(skb, &la.cck, sizeof(la.cck));
-+	skb_put_data(skb, &la.ofdm, sizeof(la.ofdm));
- 	/* ht20 */
- 	skb_put_data(skb, &la.mcs[0], 8);
- 	/* ht40 */
diff --git a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
similarity index 94%
rename from package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
rename to package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
index b0b7a78e3c..c121bec972 100644
--- a/package/kernel/mt76/patches/0009-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
+++ b/package/kernel/mt76/patches/0003-wifi-mt76-mt7996-fix-uninitialized-variable-in-mt799.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/mt7996/mmio.c
 +++ b/mt7996/mmio.c
-@@ -499,7 +499,7 @@ static void mt7996_irq_tasklet(struct ta
+@@ -519,7 +519,7 @@ static void mt7996_irq_tasklet(struct ta
  	struct mt7996_dev *dev = from_tasklet(dev, t, mt76.irq_tasklet);
  	struct mtk_wed_device *wed = &dev->mt76.mmio.wed;
  	struct mtk_wed_device *wed_hif2 = &dev->mt76.mmio.wed_hif2;
diff --git a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch
deleted file mode 100644
index 9c2247b0c2..0000000000
--- a/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-fw-loading-timeout.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From bc37a7ebc267e400fc4e9886b7197b4b866763d1 Mon Sep 17 00:00:00 2001
-From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Thu, 21 Dec 2023 10:41:18 +0100
-Subject: [PATCH] wifi: mt76: mt7996: fix fw loading timeout
-
-Fix the following firmware loading error due to a wrong dma register
-configuration if wed is disabled.
-
-[    8.245881] mt7996e_hif 0001:01:00.0: assign IRQ: got 128
-[    8.251308] mt7996e_hif 0001:01:00.0: enabling device (0000 -> 0002)
-[    8.257674] mt7996e_hif 0001:01:00.0: enabling bus mastering
-[    8.263488] mt7996e 0000:01:00.0: assign IRQ: got 126
-[    8.268537] mt7996e 0000:01:00.0: enabling device (0000 -> 0002)
-[    8.274551] mt7996e 0000:01:00.0: enabling bus mastering
-[   28.648773] mt7996e 0000:01:00.0: Message 00000010 (seq 1) timeout
-[   28.654959] mt7996e 0000:01:00.0: Failed to get patch semaphore
-[   29.661033] mt7996e: probe of 0000:01:00.0 failed with error -11
-
-Suggested-by: Sujuan Chen" <sujuan.chen at mediatek.com>
-Fixes: 4920a3a1285f ("wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM")
-Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/dma.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/mt7996/dma.c
-+++ b/mt7996/dma.c
-@@ -237,7 +237,8 @@ void mt7996_dma_start(struct mt7996_dev
- 				 MT_WFDMA0_GLO_CFG_TX_DMA_EN |
- 				 MT_WFDMA0_GLO_CFG_RX_DMA_EN |
- 				 MT_WFDMA0_GLO_CFG_OMIT_TX_INFO |
--				 MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2);
-+				 MT_WFDMA0_GLO_CFG_OMIT_RX_INFO_PFET2 |
-+				 MT_WFDMA0_GLO_CFG_EXT_EN);
- 
- 		if (dev->hif2)
- 			mt76_set(dev, MT_WFDMA0_GLO_CFG + hif1_ofs,
diff --git a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
similarity index 90%
rename from package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
rename to package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
index a0d62dc5af..421ace147e 100644
--- a/package/kernel/mt76/patches/0010-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
+++ b/package/kernel/mt76/patches/0004-wifi-mt76-mt7996-fix-potential-memory-leakage-when-r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/mt7996/mcu.c
 +++ b/mt7996/mcu.c
-@@ -3721,6 +3721,7 @@ int mt7996_mcu_get_temperature(struct mt
+@@ -3729,6 +3729,7 @@ int mt7996_mcu_get_temperature(struct mt
  	} __packed * res;
  	struct sk_buff *skb;
  	int ret;
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	ret = mt76_mcu_send_and_get_msg(&phy->dev->mt76, MCU_WM_UNI_CMD(THERMAL),
  					&req, sizeof(req), true, &skb);
-@@ -3728,8 +3729,10 @@ int mt7996_mcu_get_temperature(struct mt
+@@ -3736,8 +3737,10 @@ int mt7996_mcu_get_temperature(struct mt
  		return ret;
  
  	res = (void *)skb->data;
diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch
new file mode 100644
index 0000000000..a5c6fdb16b
--- /dev/null
+++ b/package/kernel/mt76/patches/0005-wifi-mt76-connac-check-for-null-before-dereferencing.patch
@@ -0,0 +1,27 @@
+From 725f531c14597f20645321d8a900796f5a68e135 Mon Sep 17 00:00:00 2001
+From: Muhammad Usama Anjum <usama.anjum at collabora.com>
+Date: Fri, 1 Mar 2024 19:44:06 +0500
+Subject: [PATCH] wifi: mt76: connac: check for null before dereferencing
+
+The wcid can be NULL. It should be checked for validity before
+dereferencing it to avoid crash.
+
+Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
+Signed-off-by: Muhammad Usama Anjum <usama.anjum at collabora.com>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt76_connac_mcu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mt76_connac_mcu.c
++++ b/mt76_connac_mcu.c
+@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m
+ 	};
+ 	struct sk_buff *skb;
+ 
+-	if (is_mt799x(dev) && !wcid->sta)
++	if (is_mt799x(dev) && wcid && !wcid->sta)
+ 		hdr.muar_idx = 0xe;
+ 
+ 	mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo,
diff --git a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch b/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch
deleted file mode 100644
index f72c76ec66..0000000000
--- a/package/kernel/mt76/patches/0005-wifi-mt76-mt7996-check-txs-format-before-getting-skb.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 025d5734caba6fa1fd96b57c19c61e42e601815b Mon Sep 17 00:00:00 2001
-From: Peter Chiu <chui-hao.chiu at mediatek.com>
-Date: Fri, 26 Jan 2024 17:09:12 +0800
-Subject: [PATCH] wifi: mt76: mt7996: check txs format before getting skb by
- pid
-
-The PPDU TXS does not include the error bit so it cannot use to report
-status to mac80211. This patch fixes issue that STA wrongly detects if AP
-is still alive.
-
-Fixes: 2569ea5326e2 ("wifi: mt76: mt7996: enable PPDU-TxS to host")
-Signed-off-by: Peter Chiu <chui-hao.chiu at mediatek.com>
-Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7996/mac.c | 23 +++++++++++++----------
- 1 file changed, 13 insertions(+), 10 deletions(-)
-
---- a/mt7996/mac.c
-+++ b/mt7996/mac.c
-@@ -1188,25 +1188,28 @@ mt7996_mac_add_txs_skb(struct mt7996_dev
- 	struct ieee80211_tx_info *info;
- 	struct sk_buff_head list;
- 	struct rate_info rate = {};
--	struct sk_buff *skb;
-+	struct sk_buff *skb = NULL;
- 	bool cck = false;
- 	u32 txrate, txs, mode, stbc;
- 
- 	txs = le32_to_cpu(txs_data[0]);
- 
- 	mt76_tx_status_lock(mdev, &list);
--	skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
- 
--	if (skb) {
--		info = IEEE80211_SKB_CB(skb);
--		if (!(txs & MT_TXS0_ACK_ERROR_MASK))
--			info->flags |= IEEE80211_TX_STAT_ACK;
--
--		info->status.ampdu_len = 1;
--		info->status.ampdu_ack_len =
--			!!(info->flags & IEEE80211_TX_STAT_ACK);
-+	/* only report MPDU TXS */
-+	if (le32_get_bits(txs_data[0], MT_TXS0_TXS_FORMAT) == 0) {
-+		skb = mt76_tx_status_skb_get(mdev, wcid, pid, &list);
-+		if (skb) {
-+			info = IEEE80211_SKB_CB(skb);
-+			if (!(txs & MT_TXS0_ACK_ERROR_MASK))
-+				info->flags |= IEEE80211_TX_STAT_ACK;
-+
-+			info->status.ampdu_len = 1;
-+			info->status.ampdu_ack_len =
-+				!!(info->flags & IEEE80211_TX_STAT_ACK);
- 
--		info->status.rates[0].idx = -1;
-+			info->status.rates[0].idx = -1;
-+		}
- 	}
- 
- 	if (mtk_wed_device_active(&dev->mt76.mmio.wed) && wcid->sta) {
diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch
new file mode 100644
index 0000000000..6aa47d9c62
--- /dev/null
+++ b/package/kernel/mt76/patches/0006-wifi-mt76-connac-use-muar-idx-0xe-for-non-mt799x-as-.patch
@@ -0,0 +1,25 @@
+From 1e336a8582dce2ef32ddd440d423e9afef961e71 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 3 Apr 2024 13:01:01 +0200
+Subject: [PATCH] wifi: mt76: connac: use muar idx 0xe for non-mt799x as well
+
+This is expected by the firmware of older chipsets as well, though it may
+not have been as strongly required as on mt799x
+
+Fixes: 098428c400ff ("wifi: mt76: connac: set correct muar_idx for mt799x chipsets")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt76_connac_mcu.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mt76_connac_mcu.c
++++ b/mt76_connac_mcu.c
+@@ -283,7 +283,7 @@ __mt76_connac_mcu_alloc_sta_req(struct m
+ 	};
+ 	struct sk_buff *skb;
+ 
+-	if (is_mt799x(dev) && wcid && !wcid->sta)
++	if (wcid && !wcid->sta)
+ 		hdr.muar_idx = 0xe;
+ 
+ 	mt76_connac_mcu_get_wlan_idx(dev, wcid, &hdr.wlan_idx_lo,
diff --git a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch b/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch
deleted file mode 100644
index a85dfb7f72..0000000000
--- a/package/kernel/mt76/patches/0006-wifi-mt76-mt7921-fix-incorrect-type-conversion-for-C.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From d75eac9f5531e484fbbabf2652922976e15a7a7a Mon Sep 17 00:00:00 2001
-From: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
-Date: Tue, 16 Jan 2024 10:48:54 +0800
-Subject: [PATCH] wifi: mt76: mt7921: fix incorrect type conversion for CLC
- command
-
-clc->len is defined as 32 bits in length, so it must also be
-operated on with 32 bits, not 16 bits.
-
-Fixes: fa6ad88e023d ("wifi: mt76: mt7921: fix country count limitation for CLC")
-Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
-Reported-by: kernel test robot <lkp at intel.com>
-Closes: https://lore.kernel.org/oe-kbuild-all/202312112104.Zkc3QUHr-lkp at intel.com/
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7921/mcu.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/mt7921/mcu.c
-+++ b/mt7921/mcu.c
-@@ -1272,7 +1272,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d
- 		.mtcl_conf = mt792x_acpi_get_mtcl_conf(&dev->phy, alpha2),
- 	};
- 	int ret, valid_cnt = 0;
--	u16 buf_len = 0;
-+	u32 buf_len = 0;
- 	u8 *pos;
- 
- 	if (!clc)
-@@ -1283,7 +1283,7 @@ int __mt7921_mcu_set_clc(struct mt792x_d
- 	if (mt76_find_power_limits_node(&dev->mt76))
- 		req.cap |= CLC_CAP_DTS_EN;
- 
--	buf_len = le16_to_cpu(clc->len) - sizeof(*clc);
-+	buf_len = le32_to_cpu(clc->len) - sizeof(*clc);
- 	pos = clc->data;
- 	while (buf_len > 16) {
- 		struct mt7921_clc_rule *rule = (struct mt7921_clc_rule *)pos;



From lede-commits at lists.infradead.org  Thu May 16 06:12:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 09:12:58 -0400
Subject: [openwrt/openwrt]  generic: 6.6: remove kernel export stripping patch
In-Reply-To: <171586517699.731185.12684306671320839913@git-01.infra.openwrt.org>
References: <171586517699.731185.12684306671320839913@git-01.infra.openwrt.org>
Message-ID: <mailman.36539.1715865181.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f12179fa15d9e9b141b46f101999bdad3ba34f74

commit f12179fa15d9e9b141b46f101999bdad3ba34f74
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed May 15 10:57:06 2024 +0200

    generic: 6.6: remove kernel export stripping patch
    
    Our kernel export stripping has been broken on 6.6 from the start since
    upstream kernel really reworked stuff in ("kbuild: generate KSYMTAB entries
    by modpost") and other commits as well.
    
    So, until this is either fixed or reworked lets drop the patch as it doesnt
    make sense to carry it knowing its broken and it can always be easily
    restored.
    
    Link: https://github.com/openwrt/openwrt/pull/15498
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../generic/hack-6.6/221-module_exports.patch      | 102 ---------------------
 1 file changed, 102 deletions(-)

diff --git a/target/linux/generic/hack-6.6/221-module_exports.patch b/target/linux/generic/hack-6.6/221-module_exports.patch
deleted file mode 100644
index 294944a34b..0000000000
--- a/target/linux/generic/hack-6.6/221-module_exports.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From b14784e7883390c20ed3ff904892255404a5914b Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 17:05:53 +0200
-Subject: add an optional config option for stripping all unnecessary symbol exports from the kernel image
-
-lede-commit: bb5a40c64b7c4f4848509fa0a6625055fc9e66cc
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- include/asm-generic/vmlinux.lds.h | 18 +++++++++++++++---
- include/linux/export.h            |  9 ++++++++-
- scripts/Makefile.build            |  2 +-
- 3 files changed, 24 insertions(+), 5 deletions(-)
-
---- a/include/asm-generic/vmlinux.lds.h
-+++ b/include/asm-generic/vmlinux.lds.h
-@@ -81,6 +81,16 @@
- #define RO_EXCEPTION_TABLE
- #endif
- 
-+#ifndef SYMTAB_KEEP
-+#define SYMTAB_KEEP KEEP(*(SORT(___ksymtab+*)))
-+#define SYMTAB_KEEP_GPL KEEP(*(SORT(___ksymtab_gpl+*)))
-+#endif
-+
-+#ifndef SYMTAB_DISCARD
-+#define SYMTAB_DISCARD
-+#define SYMTAB_DISCARD_GPL
-+#endif
-+
- /* Align . function alignment. */
- #define ALIGN_FUNCTION()  . = ALIGN(CONFIG_FUNCTION_ALIGNMENT)
- 
-@@ -486,14 +496,14 @@
- 	/* Kernel symbol table: Normal symbols */			\
- 	__ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {		\
- 		__start___ksymtab = .;					\
--		KEEP(*(SORT(___ksymtab+*)))				\
-+		SYMTAB_KEEP						\
- 		__stop___ksymtab = .;					\
- 	}								\
- 									\
- 	/* Kernel symbol table: GPL-only symbols */			\
- 	__ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {	\
- 		__start___ksymtab_gpl = .;				\
--		KEEP(*(SORT(___ksymtab_gpl+*)))				\
-+		SYMTAB_KEEP_GPL						\
- 		__stop___ksymtab_gpl = .;				\
- 	}								\
- 									\
-@@ -513,7 +523,7 @@
- 									\
- 	/* Kernel symbol table: strings */				\
-         __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {	\
--		*(__ksymtab_strings)					\
-+		*(__ksymtab_strings+*)					\
- 	}								\
- 									\
- 	/* __*init sections */						\
-@@ -1000,6 +1010,8 @@
- #define COMMON_DISCARDS							\
- 	SANITIZER_DISCARDS						\
- 	PATCHABLE_DISCARDS						\
-+	SYMTAB_DISCARD							\
-+	SYMTAB_DISCARD_GPL						\
- 	*(.discard)							\
- 	*(.discard.*)							\
- 	*(.export_symbol)						\
---- a/include/linux/export-internal.h
-+++ b/include/linux/export-internal.h
-@@ -26,6 +26,12 @@
- #define __KSYM_REF(sym)		".long " #sym
- #endif
- 
-+#ifdef MODULE
-+#define __EXPORT_SUFFIX(sym)
-+#else
-+#define __EXPORT_SUFFIX(sym) "+" #sym
-+#endif
-+
- /*
-  * For every exported symbol, do the following:
-  *
-@@ -38,7 +44,7 @@
-  * former apparently works on all arches according to the binutils source.
-  */
- #define __KSYMTAB(name, sym, sec, ns)						\
--	asm("	.section \"__ksymtab_strings\",\"aMS\",%progbits,1"	"\n"	\
-+	asm("	.section \"__ksymtab_strings" __EXPORT_SUFFIX(sym) "\",\"aMS\",%progbits,1"	"\n"	\
- 	    "__kstrtab_" #name ":"					"\n"	\
- 	    "	.asciz \"" #name "\""					"\n"	\
- 	    "__kstrtabns_" #name ":"					"\n"	\
---- a/scripts/Makefile.build
-+++ b/scripts/Makefile.build
-@@ -366,7 +366,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
- # Linker scripts preprocessor (.lds.S -> .lds)
- # ---------------------------------------------------------------------------
- quiet_cmd_cpp_lds_S = LDS     $@
--      cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -U$(ARCH) \
-+      cmd_cpp_lds_S = $(CPP) $(EXTRA_LDSFLAGS) $(cpp_flags) -P -U$(ARCH) \
- 	                     -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
- 
- $(obj)/%.lds: $(src)/%.lds.S FORCE



From lede-commits at lists.infradead.org  Thu May 16 06:12:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 09:12:57 -0400
Subject: [openwrt/openwrt]  config: build: dont allow STRIP_KERNEL_EXPORTS on
 kernel 6.6
In-Reply-To: <171586517699.731185.12684306671320839913@git-01.infra.openwrt.org>
References: <171586517699.731185.12684306671320839913@git-01.infra.openwrt.org>
Message-ID: <mailman.36540.1715865181.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ca1c7635b911e68df74958f8f1301c7b44a61206

commit ca1c7635b911e68df74958f8f1301c7b44a61206
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed May 15 10:43:52 2024 +0200

    config: build: dont allow STRIP_KERNEL_EXPORTS on kernel 6.6
    
    STRIP_KERNEL_EXPORTS is currently not working on kernel 6.6 as there
    have been major changes in the upstream kernel.
    
    I have looked at it, and I dont think we can adapt the current patch to
    work so until this is fixed lets prevent STRIP_KERNEL_EXPORTS from
    being selected on 6.6.
    
    Link: https://github.com/openwrt/openwrt/pull/15498
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 config/Config-build.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/Config-build.in b/config/Config-build.in
index 24c2bcf130..9768878572 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -228,6 +228,7 @@ menu "Global build settings"
 
 	config STRIP_KERNEL_EXPORTS
 		bool "Strip unnecessary exports from the kernel image"
+		depends on !LINUX_6_6
 		help
 		  Reduces kernel size by stripping unused kernel exports from the kernel
 		  image.  Note that this might make the kernel incompatible with any kernel



From lede-commits at lists.infradead.org  Thu May 16 10:28:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 13:28:20 -0400
Subject: [openwrt/openwrt]  ipq806x: mr42/mr52: fix PCIe ports
In-Reply-To: <171588050093.1120984.9302826934280075080@git-01.infra.openwrt.org>
References: <171588050093.1120984.9302826934280075080@git-01.infra.openwrt.org>
Message-ID: <mailman.36565.1715880509.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/96e402aef7a8245d7c41e9d424125930fd781332

commit 96e402aef7a8245d7c41e9d424125930fd781332
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu May 16 12:03:19 2024 +0200

    ipq806x: mr42/mr52: fix PCIe ports
    
    All three PCIe ports are reported non working on Meraki MR42/MR52 boards
    since kernel 6.1 with the issue of PCIe PHY link never coming up thus
    no WLAN cards are available on the boards.
    
    After debugging it seems that PCIe worked on 5.15 and older purely by
    accident as device DTS was using /delete-property/ perst-gpios; in each
    of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI
    as it was still using the older "perst-gpio" property so it was not getting
    removed from the device DTS.
    
    However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated
    perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer
    "perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as
    now that property was being dropped from the device DTS.
    
    So, since the removal of PERST pins seems to have been wrong from the start
    lets drop the property removal from MR42/MR52.
    
    Fixes: #15408
    Link: https://github.com/openwrt/openwrt/pull/15509
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi  | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi
index a8f43591f9..2e71575331 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi
@@ -73,10 +73,6 @@
 &pcie0 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;
@@ -94,10 +90,6 @@
 &pcie1 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;
@@ -115,10 +107,6 @@
 &pcie2 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;



From lede-commits at lists.infradead.org  Thu May 16 11:27:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 14:27:42 -0400
Subject: [openwrt/openwrt]  qca-ssdk: add patch to support AQR114C-B0 PHY
In-Reply-To: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
References: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
Message-ID: <mailman.36574.1715884065.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0354f6baaea4638975c7f7e0404bed1a92987e4b

commit 0354f6baaea4638975c7f7e0404bed1a92987e4b
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Wed Mar 13 13:01:01 2024 +0100

    qca-ssdk: add patch to support AQR114C-B0 PHY
    
    Add support for AQR114C-B0 PHY.
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14883
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...03-hsl_phy-add-support-for-AQR114C-B0-PHY.patch | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch b/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch
new file mode 100644
index 0000000000..d93cf0978c
--- /dev/null
+++ b/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch
@@ -0,0 +1,33 @@
+From ab3b663842f66d0ed290696cee9edb9070a36e8f Mon Sep 17 00:00:00 2001
+From: Pawe? Owoc <frut3k7 at gmail.com>
+Date: Wed, 7 May 2024 10:37:44 +0100
+Subject: [PATCH] hsl_phy: add support for AQR114C-B0 PHY
+
+Add support for AQR114C-B0 PHY.
+
+Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
+---
+ include/hsl/phy/hsl_phy.h | 1 +
+ src/hsl/phy/hsl_phy.c     | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/include/hsl/phy/hsl_phy.h
++++ b/include/hsl/phy/hsl_phy.h
+@@ -612,6 +612,7 @@ typedef struct {
+ #define AQUANTIA_PHY_113C_B0    0x31c31C12
+ #define AQUANTIA_PHY_113C_B1    0x31c31C13
+ #define AQUANTIA_PHY_112C       0x03a1b792
++#define AQUANTIA_PHY_114C_B0    0x31c31c22
+ #define MVL_PHY_X3410           0x31c31DD3
+ 
+ #define PHY_805XV2              0x004DD082
+--- a/src/hsl/phy/hsl_phy.c
++++ b/src/hsl/phy/hsl_phy.c
+@@ -271,6 +271,7 @@ phy_type_t hsl_phytype_get_by_phyid(a_uint32_t dev_id, a_uint32_t phy_id)
+ 		case AQUANTIA_PHY_113C_B0:
+ 		case AQUANTIA_PHY_113C_B1:
+ 		case AQUANTIA_PHY_112C:
++		case AQUANTIA_PHY_114C_B0:
+ 		case MVL_PHY_X3410:
+ 			phytype = AQUANTIA_PHY_CHIP;
+ 			break;



From lede-commits at lists.infradead.org  Thu May 16 11:27:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 14:27:40 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: Remove unused gpio from QPIC
 pins
In-Reply-To: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
References: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
Message-ID: <mailman.36575.1715884065.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b32a17e82df32b197fb64e2588262e2ddb8dccd6

commit b32a17e82df32b197fb64e2588262e2ddb8dccd6
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Wed Mar 13 12:22:30 2024 +0100

    qualcommax: ipq807x: Remove unused gpio from QPIC pins
    
    Remove gpio16 from the default NAND pinctrl configuration
    as its unused and only needed for LCD.
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14883
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...com-ipq8074-Remove-unused-gpio-from-QPIC-.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/target/linux/qualcommax/patches-6.6/0063-v6.9-arm64-dts-qcom-ipq8074-Remove-unused-gpio-from-QPIC-.patch b/target/linux/qualcommax/patches-6.6/0063-v6.9-arm64-dts-qcom-ipq8074-Remove-unused-gpio-from-QPIC-.patch
new file mode 100644
index 0000000000..e075c590fb
--- /dev/null
+++ b/target/linux/qualcommax/patches-6.6/0063-v6.9-arm64-dts-qcom-ipq8074-Remove-unused-gpio-from-QPIC-.patch
@@ -0,0 +1,32 @@
+From 5f78d9213ae753e2242b0f6a5d4a5e98e55ddc76 Mon Sep 17 00:00:00 2001
+From: Pawe? Owoc <frut3k7 at gmail.com>
+Date: Wed, 13 Mar 2024 11:27:06 +0100
+Subject: [PATCH] arm64: dts: qcom: ipq8074: Remove unused gpio from QPIC pins
+
+gpio16 will only be used for LCD support, as its NAND/LCDC data[8]
+so its bit 9 of the parallel QPIC interface, and ONFI NAND is only 8
+or 16-bit with only 8-bit one being supported in our case so that pin
+is unused.
+
+It should be dropped from the default NAND pinctrl configuration
+as its unused and only needed for LCD.
+
+Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
+Reviewed-by: Kathiravan Thirumoorthy <quic_kathirav at quicinc.com>
+Link: https://lore.kernel.org/r/20240313102713.1727458-1-frut3k7 at gmail.com
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+---
+ arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi
++++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi
+@@ -372,7 +372,7 @@
+ 				       "gpio5", "gpio6", "gpio7",
+ 				       "gpio8", "gpio10", "gpio11",
+ 				       "gpio12", "gpio13", "gpio14",
+-				       "gpio15", "gpio16", "gpio17";
++				       "gpio15", "gpio17";
+ 				function = "qpic";
+ 				drive-strength = <8>;
+ 				bias-disable;



From lede-commits at lists.infradead.org  Thu May 16 11:27:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 14:27:43 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: define common Linksys MX
 device
In-Reply-To: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
References: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
Message-ID: <mailman.36576.1715884065.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7f1c87ebde223e9ddfd4fc9ea0a653596e60b935

commit 7f1c87ebde223e9ddfd4fc9ea0a653596e60b935
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Wed Mar 13 12:36:39 2024 +0100

    qualcommax: ipq807x: define common Linksys MX device
    
    Define common Linksys MX device for MX4200v1/v2 and MX5300.
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14883
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/qualcommax/image/ipq807x.mk | 33 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 18 deletions(-)

diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index e32250d458..a4fd6ff796 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -103,20 +103,26 @@ define Device/edimax_cax1800
 endef
 TARGET_DEVICES += edimax_cax1800
 
-define Device/linksys_mx4200v1
+define Device/linksys_mx
 	$(call Device/FitImage)
 	DEVICE_VENDOR := Linksys
-	DEVICE_MODEL := MX4200
-	DEVICE_VARIANT := v1
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	KERNEL_SIZE := 6144k
 	IMAGE_SIZE := 147456k
 	NAND_SIZE := 512m
-	SOC := ipq8174
+	SOC := ipq8072
 	IMAGES += factory.bin
-	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MX4200
-	DEVICE_PACKAGES := kmod-leds-pca963x ipq-wifi-linksys_mx4200 kmod-bluetooth
+	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=$$$$(DEVICE_MODEL)
+	DEVICE_PACKAGES := kmod-leds-pca963x
+endef
+
+define Device/linksys_mx4200v1
+	$(call Device/linksys_mx)
+	DEVICE_MODEL := MX4200
+	DEVICE_VARIANT := v1
+	SOC := ipq8174
+	DEVICE_PACKAGES += ipq-wifi-linksys_mx4200 kmod-bluetooth
 endef
 TARGET_DEVICES += linksys_mx4200v1
 
@@ -127,19 +133,10 @@ endef
 TARGET_DEVICES += linksys_mx4200v2
 
 define Device/linksys_mx5300
-	$(call Device/FitImage)
-	DEVICE_VENDOR := Linksys
+	$(call Device/linksys_mx)
 	DEVICE_MODEL := MX5300
-	BLOCKSIZE := 128k
-	PAGESIZE := 2048
-	KERNEL_SIZE := 6144k
-	IMAGE_SIZE := 147456k
-	NAND_SIZE := 512m
-	SOC := ipq8072
-	IMAGES += factory.bin
-	IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | linksys-image type=MX5300
-	DEVICE_PACKAGES := kmod-leds-pca963x kmod-rtc-ds1307 \
-		ipq-wifi-linksys_mx5300 kmod-ath10k-ct ath10k-firmware-qca9984-ct
+	DEVICE_PACKAGES += kmod-rtc-ds1307 ipq-wifi-linksys_mx5300 \
+		kmod-ath10k-ct ath10k-firmware-qca9984-ct
 endef
 TARGET_DEVICES += linksys_mx5300
 



From lede-commits at lists.infradead.org  Thu May 16 11:27:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 14:27:41 -0400
Subject: [openwrt/openwrt]  generic: 6.6: add patch to support AQR114C PHY ID
In-Reply-To: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
References: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
Message-ID: <mailman.36577.1715884067.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a7c068b935909ed6d91396d856fc3d2bb2df276a

commit a7c068b935909ed6d91396d856fc3d2bb2df276a
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Wed Mar 13 12:57:04 2024 +0100

    generic: 6.6: add patch to support AQR114C PHY ID
    
    Add support for AQR114C PHY ID.
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14883
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...y-aquantia-add-support-for-AQR114C-PHY-ID.patch | 69 ++++++++++++++++++++++
 ...net-phy-aquantia-enable-AQR112-and-AQR412.patch |  8 +--
 ...-phy-aquantia-fix-system-side-protocol-mi.patch |  2 +-
 ...-aquantia-add-PHY_IDs-for-AQR112-variants.patch | 10 ++--
 4 files changed, 79 insertions(+), 10 deletions(-)

diff --git a/target/linux/generic/backport-6.6/765-v6.9-net-phy-aquantia-add-support-for-AQR114C-PHY-ID.patch b/target/linux/generic/backport-6.6/765-v6.9-net-phy-aquantia-add-support-for-AQR114C-PHY-ID.patch
new file mode 100644
index 0000000000..714ef49872
--- /dev/null
+++ b/target/linux/generic/backport-6.6/765-v6.9-net-phy-aquantia-add-support-for-AQR114C-PHY-ID.patch
@@ -0,0 +1,69 @@
+From c278ec644377249aba5b1e1ca2b5705fd1c0132c Mon Sep 17 00:00:00 2001
+From: Pawe? Owoc <frut3k7 at gmail.com>
+Date: Mon, 1 Apr 2024 16:51:06 +0200
+Subject: [PATCH net-next v2] net: phy: aquantia: add support for AQR114C PHY ID  
+
+Add support for AQR114C PHY ID. This PHY advertise 10G speed:
+SPEED(0x04): 0x6031
+  capabilities: -400g +5g +2.5g -200g -25g -10g-xr -100g -40g -10g/1g -10
+                +100 +1000 -10-ts -2-tl +10g
+EXTABLE(0x0B): 0x40fc
+  capabilities: -10g-cx4 -10g-lrm +10g-t +10g-kx4 +10g-kr +1000-t +1000-kx
+                +100-tx -10-t -p2mp -40g/100g -1000/100-t1 -25g -200g/400g
+                +2.5g/5g -1000-h
+
+but supports only up to 5G speed (as with AQR111/111B0).
+AQR111 init config is used to set max speed 5G.
+
+Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240401145114.1699451-1-frut3k7 at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/aquantia/aquantia_main.c | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+--- a/drivers/net/phy/aquantia/aquantia_main.c
++++ b/drivers/net/phy/aquantia/aquantia_main.c
+@@ -28,6 +28,7 @@
+ #define PHY_ID_AQR412	0x03a1b712
+ #define PHY_ID_AQR113	0x31c31c40
+ #define PHY_ID_AQR113C	0x31c31c12
++#define PHY_ID_AQR114C	0x31c31c22
+ #define PHY_ID_AQR813	0x31c31cb2
+ 
+ #define MDIO_PHYXS_VEND_IF_STATUS		0xe812
+@@ -880,6 +881,25 @@ static struct phy_driver aqr_driver[] =
+ 	.link_change_notify = aqr107_link_change_notify,
+ },
+ {
++	PHY_ID_MATCH_MODEL(PHY_ID_AQR114C),
++	.name           = "Aquantia AQR114C",
++	.probe          = aqr107_probe,
++	.get_rate_matching = aqr107_get_rate_matching,
++	.config_init    = aqr111_config_init,
++	.config_aneg    = aqr_config_aneg,
++	.config_intr    = aqr_config_intr,
++	.handle_interrupt = aqr_handle_interrupt,
++	.read_status    = aqr107_read_status,
++	.get_tunable    = aqr107_get_tunable,
++	.set_tunable    = aqr107_set_tunable,
++	.suspend        = aqr107_suspend,
++	.resume         = aqr107_resume,
++	.get_sset_count = aqr107_get_sset_count,
++	.get_strings    = aqr107_get_strings,
++	.get_stats      = aqr107_get_stats,
++	.link_change_notify = aqr107_link_change_notify,
++},
++{
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR813),
+ 	.name		= "Aquantia AQR813",
+ 	.probe		= aqr107_probe,
+@@ -916,6 +936,7 @@ static struct mdio_device_id __maybe_unu
+ 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
+ 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
+ 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
++	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
+ 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
+ 	{ }
+ };
diff --git a/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch b/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
index 1232c664ed..ff2038d6f7 100644
--- a/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
+++ b/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
@@ -15,7 +15,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
 
 --- a/drivers/net/phy/aquantia/aquantia_main.c
 +++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -101,6 +101,29 @@
+@@ -102,6 +102,29 @@
  #define AQR107_OP_IN_PROG_SLEEP		1000
  #define AQR107_OP_IN_PROG_TIMEOUT	100000
  
@@ -45,7 +45,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
  struct aqr107_hw_stat {
  	const char *name;
  	int reg;
-@@ -232,6 +255,51 @@ static int aqr_config_aneg(struct phy_de
+@@ -233,6 +256,51 @@ static int aqr_config_aneg(struct phy_de
  	return genphy_c45_check_and_restart_aneg(phydev, changed);
  }
  
@@ -97,7 +97,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
  static int aqr_config_intr(struct phy_device *phydev)
  {
  	bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
-@@ -809,7 +877,7 @@ static struct phy_driver aqr_driver[] =
+@@ -810,7 +878,7 @@ static struct phy_driver aqr_driver[] =
  	PHY_ID_MATCH_MODEL(PHY_ID_AQR112),
  	.name		= "Aquantia AQR112",
  	.probe		= aqr107_probe,
@@ -106,7 +106,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
  	.config_intr	= aqr_config_intr,
  	.handle_interrupt = aqr_handle_interrupt,
  	.get_tunable    = aqr107_get_tunable,
-@@ -827,7 +895,7 @@ static struct phy_driver aqr_driver[] =
+@@ -828,7 +896,7 @@ static struct phy_driver aqr_driver[] =
  	PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
  	.name		= "Aquantia AQR412",
  	.probe		= aqr107_probe,
diff --git a/target/linux/generic/hack-6.6/723-net-phy-aquantia-fix-system-side-protocol-mi.patch b/target/linux/generic/hack-6.6/723-net-phy-aquantia-fix-system-side-protocol-mi.patch
index 72a70ebc14..614003a5d8 100644
--- a/target/linux/generic/hack-6.6/723-net-phy-aquantia-fix-system-side-protocol-mi.patch
+++ b/target/linux/generic/hack-6.6/723-net-phy-aquantia-fix-system-side-protocol-mi.patch
@@ -14,7 +14,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
 
 --- a/drivers/net/phy/aquantia/aquantia_main.c
 +++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -288,10 +288,16 @@ static int aqr_config_aneg_set_prot(stru
+@@ -289,10 +289,16 @@ static int aqr_config_aneg_set_prot(stru
  	phy_write_mmd(phydev, MDIO_MMD_VEND1, AQUANTIA_VND1_GSTART_RATE,
  		      aquantia_syscfg[if_type].start_rate);
  
diff --git a/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch b/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
index ee7d0c57b0..4a72b1bd2b 100644
--- a/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
+++ b/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
@@ -12,16 +12,16 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/aquantia/aquantia_main.c
 +++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -29,6 +29,8 @@
- #define PHY_ID_AQR113	0x31c31c40
+@@ -30,6 +30,8 @@
  #define PHY_ID_AQR113C	0x31c31c12
+ #define PHY_ID_AQR114C	0x31c31c22
  #define PHY_ID_AQR813	0x31c31cb2
 +#define PHY_ID_AQR112C	0x03a1b790
 +#define PHY_ID_AQR112R	0x31c31d12
  
  #define MDIO_PHYXS_VEND_IF_STATUS		0xe812
  #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK	GENMASK(7, 3)
-@@ -972,6 +974,30 @@ static struct phy_driver aqr_driver[] =
+@@ -992,6 +994,30 @@ static struct phy_driver aqr_driver[] =
  	.get_stats	= aqr107_get_stats,
  	.link_change_notify = aqr107_link_change_notify,
  },
@@ -52,9 +52,9 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  };
  
  module_phy_driver(aqr_driver);
-@@ -991,6 +1017,8 @@ static struct mdio_device_id __maybe_unu
- 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113) },
+@@ -1012,6 +1038,8 @@ static struct mdio_device_id __maybe_unu
  	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
+ 	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
  	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
 +	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112C) },
 +	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR112R) },



From lede-commits at lists.infradead.org  Thu May 16 11:27:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 16 May 2024 14:27:44 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: add support for Linksys
 MX8500
In-Reply-To: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
References: <171588406031.1213847.4955503944885994370@git-01.infra.openwrt.org>
Message-ID: <mailman.36580.1715884067.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9bdaebaff323e554046ce354092832c956b2ad5e

commit 9bdaebaff323e554046ce354092832c956b2ad5e
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Mon Feb 26 11:38:02 2024 +0100

    qualcommax: ipq807x: add support for Linksys MX8500
    
    Hardware specification:
    ========
    SoC: Qualcomm IPQ8072A
    Flash: 512MB (Fidelix FMND4G08S3J-ID)
    RAM: 1GB (2x Kingston DDR3L D2516ECMDXGJD)
    Ethernet: 1x 10/100/1000/2500/5000Mbps (Marvell AQR114C)
    Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
    WiFi1: 6GHz ax 4x4 (Qualcomm QCN9024 + Skyworks SKY85784-11) - channels 33-229
    WiFi2: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-177
    WiFi3: 2.4GHz ax 4x4 (Qualcomm QCN5024 + Skyworks SKY8340-11)
    IoT: Bluetooth 5, Zigbee and Thread (NXP K32W041)
    LED: 1x RGB status (NXP PCA9633)
    USB: 1x USB 3.0
    Button: WPS, Reset
    
    Flash instructions:
    ========
    1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin image.
    More details can be found here: https://www.linksys.com/support-article?articleNum=47547
    After first boot check actual partition:
    - fw_printenv -n boot_part
    and install firmware on second partition using command in case of 2:
    - mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
    and in case of 1:
    - mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel
    
    2. Installation using serial connection from OEM firmware (default login: root, password: admin):
    - fw_printenv -n boot_part
    In case of 2:
    - flash_erase /dev/mtd21 0 0
    - nandwrite -p /dev/mtd21 openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin
    or in case of 1:
    - flash_erase /dev/mtd23 0 0
    - nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin
    After first boot install firmware on second partition:
    - mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
    or:
    - mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel
    
    3. Installation from initramfs image using USB drive:
    Put the initramfs image on the USB drive:
    - dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx8500-initramfs-uImage.itb of=/dev/sda
    Stop u-boot and run:
    - usb start && usbboot $loadaddr 0 && bootm $loadaddr
    Write firmware to the flash from initramfs:
    - mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin kernel
    and:
    - mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx8500-squashfs-factory.bin alt_kernel
    
    4. Back to the OEM firmware:
    - mtd -e kernel -n write FW_MX8500_1.0.11.208937_prod.img kernel
    and:
    - mtd -r -e alt_kernel -n write FW_MX8500_1.0.11.208937_prod.img alt_kernel
    
    5. USB recovery:
    Put the initramfs image on the USB:
    - dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx8500-initramfs-uImage.itb of=/dev/sda
    Set u-boot env:
    - fw_setenv bootusb 'usb start && usbboot $loadaddr 0 && bootm $loadaddr'
    - fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
    
    AQR firmware:
    ========
    1. Firmware loading:
    To properly load the firmware and initialize AQR PHY, we must use the u-boot aq_load_fw function.
    To do this, you need to modify u-boot env:
    With USB recovery:
    - fw_setenv bootcmd 'aq_load_fw; run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
    and without:
    - fw_setenv bootcmd 'aq_load_fw; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
    
    2. Firmware updating:
    Newer firmware (AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld) is available in the latest OEM firmware.
    To load this firmware via u-boot, we need to add the MBN header and update 0:ethphyfw partition.
    For MBN header we can use script from this repository: https://github.com/testuser7/aqr_mbn_tool
    - python aqr_mbn_tool.py AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld
    To update partition we need to install kmod-mtd-rw package first:
    - insmod mtd-rw.ko i_want_a_brick=1
    - mtd -e /dev/mtd26 -n write aqr_fw.mbn /dev/mtd26
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14883
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../boot/uboot-envtools/files/qualcommax_ipq807x   |   3 +-
 package/firmware/ipq-wifi/Makefile                 |   2 +
 .../arch/arm64/boot/dts/qcom/ipq8072-mx8500.dts    | 523 +++++++++++++++++++++
 target/linux/qualcommax/image/ipq807x.mk           |   8 +
 .../ipq807x/base-files/etc/board.d/02_network      |   6 +
 .../etc/hotplug.d/firmware/11-ath11k-caldata       |   7 +-
 .../ipq807x/base-files/etc/init.d/bootcount        |   3 +-
 .../ipq807x/base-files/lib/upgrade/platform.sh     |   3 +-
 8 files changed, 551 insertions(+), 4 deletions(-)

diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq807x b/package/boot/uboot-envtools/files/qualcommax_ipq807x
index 312fdf8d87..060871396b 100644
--- a/package/boot/uboot-envtools/files/qualcommax_ipq807x
+++ b/package/boot/uboot-envtools/files/qualcommax_ipq807x
@@ -31,7 +31,8 @@ edimax,cax1800)
 	;;
 linksys,mx4200v1|\
 linksys,mx4200v2|\
-linksys,mx5300)
+linksys,mx5300|\
+linksys,mx8500)
 	idx="$(find_mtd_index u_env)"
 	[ -n "$idx" ] && \
 		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 68448a6ec1..2ffd2e014c 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -37,6 +37,7 @@ ALLWIFIBOARDS:= \
 	edimax_cax1800 \
 	linksys_mx4200 \
 	linksys_mx5300 \
+	linksys_mx8500 \
 	netgear_lbr20 \
 	netgear_rax120v2 \
 	netgear_wax214 \
@@ -157,6 +158,7 @@ $(eval $(call generate-ipq-wifi-package,edgecore_eap102,Edgecore EAP102))
 $(eval $(call generate-ipq-wifi-package,edimax_cax1800,Edimax CAX1800))
 $(eval $(call generate-ipq-wifi-package,linksys_mx4200,Linksys MX4200))
 $(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
+$(eval $(call generate-ipq-wifi-package,linksys_mx8500,Linksys MX8500))
 $(eval $(call generate-ipq-wifi-package,netgear_lbr20,Netgear LBR20))
 $(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2))
 $(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-mx8500.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-mx8500.dts
new file mode 100644
index 0000000000..70f4438ab0
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-mx8500.dts
@@ -0,0 +1,523 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "ipq8074.dtsi"
+#include "ipq8074-hk-cpu.dtsi"
+#include "ipq8074-ess.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Linksys MX8500";
+	compatible = "linksys,mx8500", "qcom,ipq8074";
+
+	aliases {
+		serial0 = &blsp1_uart5;
+		serial1 = &blsp1_uart3;
+		led-boot = &led_system_blue;
+		led-running = &led_system_blue;
+		led-failsafe = &led_system_red;
+		led-upgrade = &led_system_green;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " root=/dev/ubiblock0_0 rootfstype=squashfs ro";
+	};
+
+	gpio_export {
+		compatible = "gpio-export";
+		#size-cells = <0>;
+
+		bt_pwr {
+			gpio-export,name = "bt_pwr";
+			gpio-export,output = <1>;
+			gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&button_pins>;
+		pinctrl-names = "default";
+
+		reset-button {
+			label = "reset";
+			gpios = <&tlmm 67 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps-button {
+			label = "wps";
+			gpios = <&tlmm 64 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&tlmm {
+	button_pins: button-state {
+		pins = "gpio64", "gpio67";
+		function = "gpio";
+		drive-strength = <8>;
+		bias-pull-up;
+	};
+
+	mdio_pins: mdio-state {
+		mdc-pins {
+			pins = "gpio68";
+			function = "mdc";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		mdio-pins {
+			pins = "gpio69";
+			function = "mdio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+};
+
+&blsp1_uart3 {
+	status = "okay";
+};
+
+&blsp1_uart5 {
+	status = "okay";
+};
+
+&prng {
+	status = "okay";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&qpic_nand {
+	status = "okay";
+
+	/*
+	 * Bootloader will find the NAND DT node by the compatible and
+	 * then "fixup" it by adding the partitions from the SMEM table
+	 * using the legacy bindings thus making it impossible for us
+	 * to change the partition table or utilize NVMEM for calibration.
+	 * So add a dummy partitions node that bootloader will populate
+	 * and set it as disabled so the kernel ignores it instead of
+	 * printing warnings due to the broken way bootloader adds the
+	 * partitions.
+	 */
+	partitions {
+		status = "disabled";
+	};
+
+	nand at 0 {
+		reg = <0>;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "0:sbl1";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "0:mibib";
+				reg = <0x100000 0x100000>;
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "0:bootconfig";
+				reg = <0x200000 0x80000>;
+				read-only;
+			};
+
+			partition at 280000 {
+				label = "0:bootconfig1";
+				reg = <0x280000 0x80000>;
+				read-only;
+			};
+
+			partition at 300000 {
+				label = "0:qsee";
+				reg = <0x300000 0x300000>;
+				read-only;
+			};
+
+			partition at 600000 {
+				label = "0:qsee_1";
+				reg = <0x600000 0x300000>;
+				read-only;
+			};
+
+			partition at 900000 {
+				label = "0:devcfg";
+				reg = <0x900000 0x80000>;
+				read-only;
+			};
+
+			partition at 980000 {
+				label = "0:devcfg_1";
+				reg = <0x980000 0x80000>;
+				read-only;
+			};
+
+			partition at a00000 {
+				label = "0:apdp";
+				reg = <0xa00000 0x80000>;
+				read-only;
+			};
+
+			partition at a80000 {
+				label = "0:apdp_1";
+				reg = <0xa80000 0x80000>;
+				read-only;
+			};
+
+			partition at b00000 {
+				label = "0:rpm";
+				reg = <0xb00000 0x80000>;
+				read-only;
+			};
+
+			partition at b80000 {
+				label = "0:rpm_1";
+				reg = <0xb80000 0x80000>;
+				read-only;
+			};
+
+			partition at c00000 {
+				label = "0:cdt";
+				reg = <0xc00000 0x80000>;
+				read-only;
+			};
+
+			partition at c80000 {
+				label = "0:cdt_1";
+				reg = <0xc80000 0x80000>;
+				read-only;
+			};
+
+			partition at d00000 {
+				label = "0:appsblenv";
+				reg = <0xd00000 0x80000>;
+			};
+
+			partition at d80000 {
+				label = "0:appsbl";
+				reg = <0xd80000 0x100000>;
+				read-only;
+			};
+
+			partition at e80000 {
+				label = "0:appsbl_1";
+				reg = <0xe80000 0x100000>;
+				read-only;
+			};
+
+			partition at f80000 {
+				label = "0:art";
+				reg = <0xf80000 0x80000>;
+				read-only;
+			};
+
+			partition at 1000000 {
+				label = "u_env";
+				reg = <0x1000000 0x40000>;
+			};
+
+			partition at 1040000 {
+				label = "s_env";
+				reg = <0x1040000 0x20000>;
+			};
+
+			partition at 1060000 {
+				label = "devinfo";
+				reg = <0x1060000 0x20000>;
+				read-only;
+			};
+
+			partition at 1080000 {
+				label = "kernel";
+				reg = <0x1080000 0x9600000>;
+			};
+
+			partition at 1680000 {
+				label = "rootfs";
+				reg = <0x1680000 0x9000000>;
+			};
+
+			partition at a680000 {
+				label = "alt_kernel";
+				reg = <0xa680000 0x9600000>;
+			};
+
+			partition at ac80000 {
+				label = "alt_rootfs";
+				reg = <0xac80000 0x9000000>;
+			};
+
+			partition at 13c80000 {
+				label = "sysdiag";
+				reg = <0x13c80000 0x200000>;
+				read-only;
+			};
+
+			partition at 13e80000 {
+				label = "0:ethphyfw";
+				reg = <0x13e80000 0x100000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					aqr_fw: firmware at 0 {
+						/* Skip the QCOM MBN Header of 40 bytes */
+						reg = <0x28 0x60002>;
+					};
+				};
+			};
+
+			partition at 13f80000 {
+				label = "syscfg";
+				reg = <0x13f80000 0xb180000>;
+				read-only;
+			};
+
+			partition at 1f100000 {
+				label = "app_data";
+				reg = <0x1f100000 0x500000>;
+				read-only;
+			};
+
+			partition at 1f600000 {
+				label = "0:wififw";
+				reg = <0x1f600000 0xa00000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&blsp1_i2c2 {
+	status = "okay";
+
+	led-controller at 62 {
+		compatible = "nxp,pca9633";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0x62>;
+		nxp,hw-blink;
+
+		led_system_red: led at 0 {
+			reg = <0>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+		};
+
+		led_system_green: led at 1 {
+			reg = <1>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+		};
+
+		led_system_blue: led at 2 {
+			reg = <2>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+		};
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
+
+	ethernet-phy-package at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "qcom,qca8075-package";
+		reg = <0>;
+
+		qcom,package-mode = "qsgmii";
+
+		qca8075_0: ethernet-phy at 0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+
+		qca8075_1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+
+		qca8075_2: ethernet-phy at 2 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <2>;
+		};
+
+		qca8075_3: ethernet-phy at 3 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <3>;
+		};
+	};
+
+	aqr114c: ethernet-phy at 8 {
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <8>;
+		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
+		firmware-name = "marvell/AQR-G4_v5.6.5-AQR_WNC_SAQA-L2_GT_ID45287_VER24005.cld";
+		nvmem-cells = <&aqr_fw>;
+		nvmem-cell-names = "firmware";
+	};
+};
+
+&switch {
+	status = "okay";
+
+	switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
+	switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+	switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
+	switch_mac_mode2 = <MAC_MODE_USXGMII>; /* mac mode for uniphy instance2*/
+
+	qcom,port_phyinfo {
+		port at 1 {
+			port_id = <1>;
+			phy_address = <0>;
+		};
+
+		port at 2 {
+			port_id = <2>;
+			phy_address = <1>;
+		};
+
+		port at 3 {
+			port_id = <3>;
+			phy_address = <2>;
+		};
+
+		port at 4 {
+			port_id = <4>;
+			phy_address = <3>;
+		};
+
+		port at 6 {
+			port_id = <6>;
+			phy_address = <8>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			ethernet-phy-ieee802.3-c45;
+		};
+	};
+};
+
+&edma {
+	status = "okay";
+};
+
+&dp1 {
+	status = "okay";
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_0>;
+	label = "lan1";
+};
+
+&dp2 {
+	status = "okay";
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_1>;
+	label = "lan2";
+};
+
+&dp3 {
+	status = "okay";
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_2>;
+	label = "lan3";
+};
+
+&dp4 {
+	status = "okay";
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_3>;
+	label = "lan4";
+};
+
+&dp6_syn {
+	status = "okay";
+	phy-mode = "usxgmii";
+	phy-handle = <&aqr114c>;
+	label = "wan";
+};
+
+&ssphy_0 {
+	status = "okay";
+};
+
+&qusb_phy_0 {
+	status = "okay";
+};
+
+&usb_0 {
+	status = "okay";
+};
+
+&pcie_qmp0 {
+	status = "okay";
+};
+
+&pcie0 {
+	status = "okay";
+
+	perst-gpio = <&tlmm 61 GPIO_ACTIVE_LOW>;
+
+	bridge at 0,0 {
+		reg = <0x00000000 0 0 0 0>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		ranges;
+
+		wifi at 1,0 {
+			status = "okay";
+
+			/* ath11k has no DT compatible for PCI cards */
+			compatible = "pci17cb,1104";
+			reg = <0x00010000 0 0 0 0>;
+
+			qcom,ath11k-calibration-variant = "Linksys-MX8500";
+		};
+	};
+};
+
+&wifi {
+	status = "okay";
+
+	qcom,ath11k-calibration-variant = "Linksys-MX8500";
+};
diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index a4fd6ff796..007c73555e 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -140,6 +140,14 @@ define Device/linksys_mx5300
 endef
 TARGET_DEVICES += linksys_mx5300
 
+define Device/linksys_mx8500
+	$(call Device/linksys_mx)
+	DEVICE_MODEL := MX8500
+	DEVICE_PACKAGES += ipq-wifi-linksys_mx8500 kmod-ath11k-pci \
+		ath11k-firmware-qcn9074 kmod-bluetooth
+endef
+TARGET_DEVICES += linksys_mx8500
+
 define Device/netgear_rax120v2
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index d87e4246e1..380588bbab 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -15,6 +15,7 @@ ipq807x_setup_interfaces()
 	buffalo,wxr-5950ax12|\
 	dynalink,dl-wrx36|\
 	linksys,mx5300|\
+	linksys,mx8500|\
 	xiaomi,ax9000|\
 	zbtlink,zbt-z800ax)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
@@ -76,6 +77,11 @@ ipq807x_setup_macs()
 			done
 			[ "$(mtd_get_mac_ascii u_env eth2addr)" != "$label_mac" ] && wan_mac=$label_mac
 		;;
+		linksys,mx8500)
+			label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+			lan_mac=$(macaddr_add $label_mac 1)
+			wan_mac=$label_mac
+		;;
 	esac
 
 	[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index c40d9bc5f9..018e828859 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -29,7 +29,8 @@ case "$FIRMWARE" in
 	zte,mf269)
 		caldata_extract "0:art" 0x1000 0x20000
 		;;
-	linksys,mx4200v1)
+	linksys,mx4200v1|\
+	linksys,mx8500)
 		caldata_extract "0:art" 0x1000 0x20000
 		ath11k_remove_regdomain
 		;;
@@ -66,6 +67,10 @@ case "$FIRMWARE" in
 "ath11k/QCN9074/hw1.0/cal-pci-0000:01:00.0.bin"|\
 "ath11k/QCN9074/hw1.0/cal-pci-0001:01:00.0.bin")
 	case "$board" in
+	linksys,mx8500)
+		caldata_extract "0:art" 0x26800 0x20000
+		ath11k_remove_regdomain
+		;;
 	prpl,haze)
 		caldata_extract_mmc "0:ART" 0x26800 0x20000
 		;;
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount
index 3e81caf63f..26da7cd614 100755
--- a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/bootcount
@@ -12,7 +12,8 @@ boot() {
 	;;
 	linksys,mx4200v1|\
 	linksys,mx4200v2|\
-	linksys,mx5300)
+	linksys,mx5300|\
+	linksys,mx8500)
 		mtd resetbc s_env || true
 	;;
 	esac
diff --git a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
index b9668d0af4..b99657fb4c 100644
--- a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
@@ -77,7 +77,8 @@ platform_do_upgrade() {
 		;;
 	linksys,mx4200v1|\
 	linksys,mx4200v2|\
-	linksys,mx5300)
+	linksys,mx5300|\
+	linksys,mx8500)
 		boot_part="$(fw_printenv -n boot_part)"
 		if [ "$boot_part" -eq "1" ]; then
 			fw_setenv boot_part 2



From lede-commits at lists.infradead.org  Fri May 17 02:51:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 05:51:18 -0400
Subject: [openwrt/openwrt]  ipq806x: mr42/mr52: fix PCIe ports
In-Reply-To: <171593947831.3206835.340153294544996586@git-01.infra.openwrt.org>
References: <171593947831.3206835.340153294544996586@git-01.infra.openwrt.org>
Message-ID: <mailman.36667.1715939502.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/e61f06c51d11dc5846023cd0fb28322345ca03b3

commit e61f06c51d11dc5846023cd0fb28322345ca03b3
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu May 16 12:03:19 2024 +0200

    ipq806x: mr42/mr52: fix PCIe ports
    
    All three PCIe ports are reported non working on Meraki MR42/MR52 boards
    since kernel 6.1 with the issue of PCIe PHY link never coming up thus
    no WLAN cards are available on the boards.
    
    After debugging it seems that PCIe worked on 5.15 and older purely by
    accident as device DTS was using /delete-property/ perst-gpios; in each
    of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI
    as it was still using the older "perst-gpio" property so it was not getting
    removed from the device DTS.
    
    However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated
    perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer
    "perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as
    now that property was being dropped from the device DTS.
    
    So, since the removal of PERST pins seems to have been wrong from the start
    lets drop the property removal from MR42/MR52.
    
    Fixes: #15408
    Link: https://github.com/openwrt/openwrt/pull/15509
    Link: https://github.com/openwrt/openwrt/pull/15512
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi       | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
index a8f43591f9..2e71575331 100644
--- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
+++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
@@ -73,10 +73,6 @@
 &pcie0 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;
@@ -94,10 +90,6 @@
 &pcie1 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;
@@ -115,10 +107,6 @@
 &pcie2 {
 	status = "okay";
 
-	/delete-property/ pinctrl-0;
-	/delete-property/ pinctrl-names;
-	/delete-property/ perst-gpios;
-
 	bridge at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		#address-cells = <3>;



From lede-commits at lists.infradead.org  Fri May 17 11:56:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 14:56:33 -0400
Subject: [openwrt/openwrt]  rpcd: fix package dependency for APK
In-Reply-To: <171597219309.297367.3840412494015553309@git-01.infra.openwrt.org>
References: <171597219309.297367.3840412494015553309@git-01.infra.openwrt.org>
Message-ID: <mailman.36787.1715972199.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/081a59e0f289b820f101cedf1dbbff29e3d4d45a

commit 081a59e0f289b820f101cedf1dbbff29e3d4d45a
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 3 17:43:08 2024 +0200

    rpcd: fix package dependency for APK
    
    Version dependencies must not contain spaces to be compatible with both
    OPKG and APK.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/system/rpcd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 2db014f2df..041164ccca 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -103,5 +103,5 @@ endef
 $(eval $(call BuildPackage,rpcd))
 $(eval $(call BuildPlugin,file,,Provides ubus calls for file and directory operations.))
 $(eval $(call BuildPlugin,rpcsys,,Provides ubus calls for sysupgrade and password changing.))
-$(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.,libiwinfo (>= 2023-01-21)))
+$(eval $(call BuildPlugin,iwinfo,+libiwinfo,Provides ubus calls for accessing iwinfo data.,libiwinfo (>=2023.01.21)))
 $(eval $(call BuildPlugin,ucode,+libucode,Allows implementing plugins using ucode scripts.))



From lede-commits at lists.infradead.org  Fri May 17 11:56:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 14:56:34 -0400
Subject: [openwrt/openwrt]  apk: add missing PROVIDES
In-Reply-To: <171597219309.297367.3840412494015553309@git-01.infra.openwrt.org>
References: <171597219309.297367.3840412494015553309@git-01.infra.openwrt.org>
Message-ID: <mailman.36788.1715972201.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ad4bd9c5d8245ca7e8abaccce8ff106e2a16980b

commit ad4bd9c5d8245ca7e8abaccce8ff106e2a16980b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 17 21:47:46 2024 +0300

    apk: add missing PROVIDES
    
    Add PROVIDES:=apk to the Makefile so we can default to install `apk` by
    default as a dependency.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/system/apk/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
index 912ddc253e..0f0e043986 100644
--- a/package/system/apk/Makefile
+++ b/package/system/apk/Makefile
@@ -30,6 +30,7 @@ define Package/apk/default
   TITLE:=apk package manager
   DEPENDS:=+zlib
   URL:=$(PKG_SOURCE_URL)
+  PROVIDES:=apk
 endef
 
 define Package/apk-mbedtls



From lede-commits at lists.infradead.org  Fri May 17 12:03:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 15:03:24 -0400
Subject: [openwrt/openwrt]  gitignore: ignore local APK keys
In-Reply-To: <171597260485.312423.7505414080913450520@git-01.infra.openwrt.org>
References: <171597260485.312423.7505414080913450520@git-01.infra.openwrt.org>
Message-ID: <mailman.36789.1715972609.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e5a23639f53f6a5e969f7c243b534f31399fe8a

commit 3e5a23639f53f6a5e969f7c243b534f31399fe8a
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 3 17:26:35 2024 +0200

    gitignore: ignore local APK keys
    
    Those keys should never be added to the git repository.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.gitignore b/.gitignore
index 84cfc99770..ad04755919 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,8 @@
 /*.patch
 /llvm-bpf*
 key-build*
+private-key.pem
+public-key.pem
 *.orig
 *.rej
 *~



From lede-commits at lists.infradead.org  Fri May 17 13:22:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 16:22:44 -0400
Subject: [openwrt/openwrt]  base-files: add update_alternatives function
In-Reply-To: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
References: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
Message-ID: <mailman.36806.1715977388.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3010ab87bc5eb4278a8d550c7ad576836fbbbdf9

commit 3010ab87bc5eb4278a8d550c7ad576836fbbbdf9
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 3 17:53:52 2024 +0200

    base-files: add update_alternatives function
    
    The APK package manager does not support handling of package
    alternatives itself, so implement it via a simple shell script.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/base-files/files/lib/functions.sh | 49 +++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 82ee58f642..1126a93e88 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -286,6 +286,55 @@ add_group_and_user() {
 	fi
 }
 
+update_alternatives() {
+	local root="${IPKG_INSTROOT}"
+	local action="$1"
+	local pkgname="$2"
+
+	if [ -f "$root/lib/apk/packages/${pkgname}.alternatives" ]; then
+		for pkg_alt in $(cat $root/lib/apk/packages/${pkgname}.alternatives); do
+			local best_prio=0;
+			local best_src="/bin/busybox";
+			pkg_prio=${pkg_alt%%:*};
+			pkg_target=${pkg_alt#*:};
+			pkg_target=${pkg_target%:*};
+			pkg_src=${pkg_alt##*:};
+
+			if [ -e "$root/$target" ]; then
+				for alts in $root/lib/apk/packages/*.alternatives; do
+					for alt in $(cat $alts); do
+						prio=${alt%%:*};
+						target=${alt#*:};
+						target=${target%:*};
+						src=${alt##*:};
+
+						if [ "$target" = "$pkg_target" ] &&
+						   [ "$src" != "$pkg_src" ] &&
+						   [ "$best_prio" -lt "$prio" ]; then
+							best_prio=$prio;
+							best_src=$src;
+						fi
+					done
+				done
+			fi
+			case "$action" in
+				install)
+					if [ "$best_prio" -lt "$pkg_prio" ]; then
+						ln -sf "$pkg_src" "$root/$pkg_target"
+						echo "add alternative: $pkg_target -> $pkg_src"
+					fi
+				;;
+				remove)
+					if [ "$best_prio" -lt "$pkg_prio" ]; then
+						ln -sf "$best_src" "$root/$pkg_target"
+						echo "add alternative: $pkg_target -> $best_src"
+					fi
+				;;
+			esac
+		done
+	fi
+}
+
 default_postinst() {
 	local root="${IPKG_INSTROOT}"
 	local pkgname="$(basename ${1%.*})"



From lede-commits at lists.infradead.org  Fri May 17 13:22:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 16:22:45 -0400
Subject: [openwrt/openwrt]  base-files: add compatibility for APK and OPKG
In-Reply-To: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
References: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
Message-ID: <mailman.36807.1715977390.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bcc641504d401336336ae1ada8a9935ff05c6055

commit bcc641504d401336336ae1ada8a9935ff05c6055
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 3 18:24:17 2024 +0200

    base-files: add compatibility for APK and OPKG
    
    Both package managers work slightly different, i.e. stores files at
    different places. Modify the `functions.sh` file to cover those.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/base-files/files/lib/functions.sh | 28 +++++++++++++++++++++-------
 1 file changed, 21 insertions(+), 7 deletions(-)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index 1126a93e88..a009aa81e9 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -211,8 +211,10 @@ config_list_foreach() {
 
 default_prerm() {
 	local root="${IPKG_INSTROOT}"
-	local pkgname="$(basename ${1%.*})"
+	[ -z "$pkgname" ] && local pkgname="$(basename ${1%.*})"
 	local ret=0
+	local filelist="${root}/usr/lib/opkg/info/${pkgname}.list"
+	[ -f "$root/lib/apk/packages/${pkgname}.list" ] && filelist="$root/lib/apk/packages/${pkgname}.list"
 
 	if [ -f "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" ]; then
 		( . "$root/usr/lib/opkg/info/${pkgname}.prerm-pkg" )
@@ -220,7 +222,7 @@ default_prerm() {
 	fi
 
 	local shell="$(command -v bash)"
-	for i in $(grep -s "^/etc/init.d/" "$root/usr/lib/opkg/info/${pkgname}.list"); do
+	for i in $(grep -s "^/etc/init.d/" "$filelist"); do
 		if [ -n "$root" ]; then
 			${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" disable
 		else
@@ -235,8 +237,11 @@ default_prerm() {
 }
 
 add_group_and_user() {
-	local pkgname="$1"
+	[ -z "$pkgname" ] && local pkgname="$(basename ${1%.*})"
 	local rusers="$(sed -ne 's/^Require-User: *//p' $root/usr/lib/opkg/info/${pkgname}.control 2>/dev/null)"
+	if [ -f "$root/lib/apk/packages/${pkgname}.rusers" ]; then
+		local rusers="$(cat $root/lib/apk/packages/${pkgname}.rusers)"
+	fi
 
 	if [ -n "$rusers" ]; then
 		local tuple oIFS="$IFS"
@@ -337,11 +342,20 @@ update_alternatives() {
 
 default_postinst() {
 	local root="${IPKG_INSTROOT}"
-	local pkgname="$(basename ${1%.*})"
-	local filelist="/usr/lib/opkg/info/${pkgname}.list"
+	[ -z "$pkgname" ] && local pkgname="$(basename ${1%.*})"
+	local filelist="${root}/usr/lib/opkg/info/${pkgname}.list"
+	[ -f "$root/lib/apk/packages/${pkgname}.list" ] && filelist="$root/lib/apk/packages/${pkgname}.list"
 	local ret=0
 
-	add_group_and_user "${pkgname}"
+	if [ -e "${root}/usr/lib/opkg/info/${pkgname}.list" ]; then
+		filelist="${root}/usr/lib/opkg/info/${pkgname}.list"
+		add_group_and_user "${pkgname}"
+	fi
+
+	if [ -e "${root}/lib/apk/packages/${pkgname}.list" ]; then
+		filelist="${root}/lib/apk/packages/${pkgname}.list"
+		update_alternatives install "${pkgname}"
+	fi
 
 	if [ -d "$root/rootfs-overlay" ]; then
 		cp -R $root/rootfs-overlay/. $root/
@@ -374,7 +388,7 @@ default_postinst() {
 	fi
 
 	local shell="$(command -v bash)"
-	for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
+	for i in $(grep -s "^/etc/init.d/" "$filelist"); do
 		if [ -n "$root" ]; then
 			${shell:-/bin/sh} "$root/etc/rc.common" "$root$i" enable
 		else



From lede-commits at lists.infradead.org  Fri May 17 13:22:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 16:22:46 -0400
Subject: [openwrt/openwrt]  apk: disable helptext for host build
In-Reply-To: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
References: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
Message-ID: <mailman.36808.1715977392.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b773ca1a966de99a43925bbaa2ac775536a7b112

commit b773ca1a966de99a43925bbaa2ac775536a7b112
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 17 23:19:52 2024 +0300

    apk: disable helptext for host build
    
    The host build would need Lua to compile which currently adds a race
    condition. Instead of tracking that down just disable helptext for the
    host build.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/system/apk/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
index 0f0e043986..7aaf9f4c5e 100644
--- a/package/system/apk/Makefile
+++ b/package/system/apk/Makefile
@@ -17,8 +17,7 @@ PKG_LICENSE_FILES:=LICENSE
 PKG_INSTALL:=1
 
 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
-HOST_BUILD_DEPENDS:=lua/host
-PKG_BUILD_DEPENDS:=$(HOST_BUILD_DEPENDS)
+PKG_BUILD_DEPENDS:=lua/host
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/host-build.mk
@@ -53,7 +52,7 @@ MESON_HOST_VARS+=VERSION=$(PKG_VERSION)
 MESON_VARS+=VERSION=$(PKG_VERSION)
 
 MESON_HOST_ARGS += \
-	-Dlua_version=5.1 \
+	-Dhelp=disabled \
 	-Dcompressed-help=false \
 	-Ddocs=disabled \
 	-Dcrypto_backend=openssl \



From lede-commits at lists.infradead.org  Fri May 17 13:22:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 16:22:43 -0400
Subject: [openwrt/openwrt]  build: add APK package build capabilities
In-Reply-To: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
References: <171597736349.471651.17568496048021632162@git-01.infra.openwrt.org>
Message-ID: <mailman.36809.1715977393.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d788ab376f859164df84e2054cbbbb0921943c5b

commit d788ab376f859164df84e2054cbbbb0921943c5b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue May 14 12:36:59 2024 +0200

    build: add APK package build capabilities
    
    A new option called `USE_APK` is added which generated APK packages
    (.apk) instead of OPKG packages (.ipk).
    
    Some features like fstools `snapshot` command are not yet ported
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 config/Config-build.in                             |   3 +
 include/feeds.mk                                   |  20 +-
 include/image.mk                                   |  22 +-
 include/{package-ipkg.mk => package-pack.mk}       | 145 ++++--
 include/package.mk                                 |   2 +-
 include/rootfs.mk                                  |  30 +-
 include/target.mk                                  |   7 +-
 package/Makefile                                   |  40 +-
 package/base-files/Makefile                        |  25 +-
 .../system/apk/patches/0002-mbedtls-support.patch  | 546 +++++++--------------
 rules.mk                                           |   2 +
 scripts/feeds                                      |   4 +-
 scripts/package-metadata.pl                        |   2 +-
 target/imagebuilder/Makefile                       |  23 +-
 target/imagebuilder/files/Makefile                 |  50 +-
 15 files changed, 476 insertions(+), 445 deletions(-)

diff --git a/config/Config-build.in b/config/Config-build.in
index 9768878572..292899df6b 100644
--- a/config/Config-build.in
+++ b/config/Config-build.in
@@ -68,6 +68,9 @@ menu "Global build settings"
 		bool "Enable TLS certificate verification during package download"
 		default y
 
+	config USE_APK
+		bool "Use APK instead of OPKG to build distribution (EXPERIMENTAL)"
+
 	comment "General build options"
 
 	config TESTING_KERNEL
diff --git a/include/feeds.mk b/include/feeds.mk
index 632fecb4a3..87b1562c3e 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -18,6 +18,10 @@ opkg_package_files = $(wildcard \
 	$(foreach dir,$(PACKAGE_SUBDIRS), \
 	  $(foreach pkg,$(1), $(dir)/$(pkg)_*.ipk)))
 
+apk_package_files = $(wildcard \
+	$(foreach dir,$(PACKAGE_SUBDIRS), \
+	  $(foreach pkg,$(1), $(dir)/$(pkg)_*.apk)))
+
 # 1: package name
 define FeedPackageDir
 $(strip $(if $(CONFIG_PER_FEED_REPO), \
@@ -28,7 +32,7 @@ $(strip $(if $(CONFIG_PER_FEED_REPO), \
 endef
 
 # 1: destination file
-define FeedSourcesAppend
+define FeedSourcesAppendOPKG
 ( \
   echo 'src/gz %d_core %U/targets/%S/packages'; \
   $(strip $(if $(CONFIG_PER_FEED_REPO), \
@@ -41,6 +45,20 @@ define FeedSourcesAppend
 ) >> $(1)
 endef
 
+# 1: destination file
+define FeedSourcesAppendAPK
+( \
+  echo '%U/targets/%S/packages/packages.adb'; \
+  $(strip $(if $(CONFIG_PER_FEED_REPO), \
+	echo '%U/packages/%A/base/packages.adb'; \
+	$(if $(filter %SNAPSHOT-y,$(VERSION_NUMBER)-$(CONFIG_BUILDBOT)), \
+		echo '%U/targets/%S/kmods/$(LINUX_VERSION)-$(LINUX_RELEASE)-$(LINUX_VERMAGIC)/packages.adb';) \
+	$(foreach feed,$(FEEDS_AVAILABLE), \
+		$(if $(CONFIG_FEED_$(feed)), \
+			echo '$(if $(filter m,$(CONFIG_FEED_$(feed))),# )%U/packages/%A/$(feed)/packages.adb';)))) \
+) >> $(1)
+endef
+
 # 1: package name
 define GetABISuffix
 $(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
diff --git a/include/image.mk b/include/image.mk
index 0dd18dbd82..406f0b8534 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -278,8 +278,12 @@ define Image/mkfs/ext4
 endef
 
 define Image/Manifest
-	$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
-		$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
+	$(if $(CONFIG_USE_APK), \
+		$(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network | sort | sed 's/ / - /'  > \
+			$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
+		$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
+			$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
+	)
 ifneq ($(CONFIG_JSON_CYCLONEDX_SBOM),)
 	$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
 		$(if $(IB),$(TOPDIR)/.packageinfo, $(TMP_DIR)/.packageinfo) \
@@ -328,7 +332,20 @@ opkg_target = \
 	$(call opkg,$(mkfs_cur_target_dir)) \
 		-f $(mkfs_cur_target_dir).conf
 
+apk_target = $(call apk,$(mkfs_cur_target_dir)) --no-scripts
+
+
 target-dir-%: FORCE
+ifneq ($(CONFIG_USE_APK),)
+	rm -rf $(mkfs_cur_target_dir)
+	$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
+	mv $(mkfs_cur_target_dir)/etc/apk/repositories $(mkfs_cur_target_dir).repositories
+	$(if $(mkfs_packages_remove), \
+		$(apk_target) del $(mkfs_packages_remove))
+	$(if $(mkfs_packages_add), \
+		$(apk_target) add $(mkfs_packages_add))
+	mv $(mkfs_cur_target_dir).repositories $(mkfs_cur_target_dir)/etc/apk/repositories
+else
 	rm -rf $(mkfs_cur_target_dir) $(mkfs_cur_target_dir).opkg
 	$(CP) $(TARGET_DIR_ORIG) $(mkfs_cur_target_dir)
 	-mv $(mkfs_cur_target_dir)/etc/opkg $(mkfs_cur_target_dir).opkg
@@ -342,6 +359,7 @@ target-dir-%: FORCE
 			$(call opkg_package_files,$(mkfs_packages_add)))
 	-$(CP) -T $(mkfs_cur_target_dir).opkg/ $(mkfs_cur_target_dir)/etc/opkg/
 	rm -rf $(mkfs_cur_target_dir).opkg $(mkfs_cur_target_dir).conf
+endif
 	$(call prepare_rootfs,$(mkfs_cur_target_dir),$(TOPDIR)/files)
 
 $(KDIR)/root.%: kernel_prepare
diff --git a/include/package-ipkg.mk b/include/package-pack.mk
similarity index 69%
rename from include/package-ipkg.mk
rename to include/package-pack.mk
index 5f5f7e1317..16b56344e1 100644
--- a/include/package-ipkg.mk
+++ b/include/package-pack.mk
@@ -1,35 +1,32 @@
 # SPDX-License-Identifier: GPL-2.0-only
 #
-# Copyright (C) 2006-2020 OpenWrt.org
+# Copyright (C) 2006-2022 OpenWrt.org
 
 ifndef DUMP
   include $(INCLUDE_DIR)/feeds.mk
 endif
 
-IPKG_REMOVE:= \
-  $(SCRIPT_DIR)/ipkg-remove
-
 IPKG_STATE_DIR:=$(TARGET_DIR)/usr/lib/opkg
 
 # Generates a make statement to return a wildcard for candidate ipkg files
 # 1: package name
-define gen_ipkg_wildcard
+define gen_package_wildcard
   $(1)$$(if $$(filter -%,$$(ABIV_$(1))),,[^a-z-])*
 endef
 
 # 1: package name
 # 2: candidate ipk files
 define remove_ipkg_files
-  $(if $(strip $(2)),$(IPKG_REMOVE) $(1) $(2))
+  $(if $(strip $(2)),$(SCRIPT_DIR)/ipkg-remove $(1) $(2))
 endef
 
 # 1: package name
 # 2: variable name
 # 3: variable suffix
 # 4: file is a script
-define BuildIPKGVariable
+define BuildPackVariable
 ifdef Package/$(1)/$(2)
-  $$(IPKG_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2))
+  $$(PACK_$(1)) : VAR_$(2)$(3)=$$(Package/$(1)/$(2))
   $(call shexport,Package/$(1)/$(2))
   $(1)_COMMANDS += echo "$$$$$$$$$(call shvar,Package/$(1)/$(2))" > $(2)$(3); $(if $(4),chmod 0755 $(2)$(3);)
 endif
@@ -50,7 +47,7 @@ strip_deps=$(strip $(subst +,,$(filter-out @%,$(1))))
 filter_deps=$(foreach dep,$(call strip_deps,$(1)),$(if $(findstring :,$(dep)),$(call dep_if,$(dep)),$(dep)))
 
 define AddDependency
-  $$(if $(1),$$(if $(2),$$(foreach pkg,$(1),$$(IPKG_$$(pkg))): $$(foreach pkg,$(2),$$(IPKG_$$(pkg)))))
+  $$(if $(1),$$(if $(2),$$(foreach pkg,$(1),$$(PACK_$$(pkg))): $$(foreach pkg,$(2),$$(PACK_$$(pkg)))))
 endef
 
 define FixupReverseDependencies
@@ -101,8 +98,13 @@ ifeq ($(DUMP),)
   define BuildTarget/ipkg
     ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
     PDIR_$(1):=$(call FeedPackageDir,$(1))
-    IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
+ifeq ($(CONFIG_USE_APK),)
+    PACK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
+else
+    PACK_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))-$(VERSION).apk
+endif
     IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
+    ADIR_$(1):=$(PKG_BUILD_DIR)/apk-$(PKGARCH)/$(1)
     KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
 
     TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(filter-out *,$$(VARIANT)),$(firstword $(ALL_VARIANTS))))
@@ -117,8 +119,8 @@ ifeq ($(DUMP),)
     ifdef do_install
       ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
         IPKGS += $(1)
-        $(_pkg_target)compile: $$(IPKG_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
-        prepare-package-install: $$(IPKG_$(1))
+        $(_pkg_target)compile: $$(PACK_$(1)) $(PKG_INFO_DIR)/$(1).provides $(PKG_BUILD_DIR)/.pkgdir/$(1).installed
+        prepare-package-install: $$(PACK_$(1))
         compile: $(STAGING_DIR_ROOT)/stamp/.$(1)_installed
       else
         $(if $(CONFIG_PACKAGE_$(1)),$$(info WARNING: skipping $(1) -- package not selected))
@@ -141,11 +143,11 @@ ifeq ($(DUMP),)
     $(FixupDependencies)
     $(FixupReverseDependencies)
 
-    $(eval $(call BuildIPKGVariable,$(1),conffiles))
-    $(eval $(call BuildIPKGVariable,$(1),preinst,,1))
-    $(eval $(call BuildIPKGVariable,$(1),postinst,-pkg,1))
-    $(eval $(call BuildIPKGVariable,$(1),prerm,-pkg,1))
-    $(eval $(call BuildIPKGVariable,$(1),postrm,,1))
+    $(eval $(call BuildPackVariable,$(1),conffiles))
+    $(eval $(call BuildPackVariable,$(1),preinst,,1))
+    $(eval $(call BuildPackVariable,$(1),postinst,-pkg,1))
+    $(eval $(call BuildPackVariable,$(1),prerm,-pkg,1))
+    $(eval $(call BuildPackVariable,$(1),postrm,,1))
 
     $(PKG_BUILD_DIR)/.pkgdir/$(1).installed : export PATH=$$(TARGET_PATH_PKG)
     $(PKG_BUILD_DIR)/.pkgdir/$(1).installed: $(STAMP_BUILT)
@@ -195,14 +197,16 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
 Installed-Size: 0
 $(_endef)
 
-    $$(IPKG_$(1)) : export CONTROL=$$(Package/$(1)/CONTROL)
-    $$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description)
-    $$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG)
-    $$(IPKG_$(1)) : export PKG_SOURCE_DATE_EPOCH:=$(PKG_SOURCE_DATE_EPOCH)
-    $(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk
-	@rm -rf $$(IDIR_$(1)); \
-		$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
-	mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR)
+    $$(PACK_$(1)) : export CONTROL=$$(Package/$(1)/CONTROL)
+    $$(PACK_$(1)) : export DESCRIPTION=$$(Package/$(1)/description)
+    $$(PACK_$(1)) : export PATH=$$(TARGET_PATH_PKG)
+    $$(PACK_$(1)) : export PKG_SOURCE_DATE_EPOCH:=$(PKG_SOURCE_DATE_EPOCH)
+    $(PKG_INFO_DIR)/$(1).provides $$(PACK_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-pack.mk
+	rm -rf $$(IDIR_$(1))
+ifeq ($$(CONFIG_USE_APK),)
+	$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_package_wildcard,$(1))))
+endif
+	mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1)) $(PKG_INFO_DIR)
 	$(call Package/$(1)/install,$$(IDIR_$(1)))
 	$(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay)
 	$(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay)
@@ -228,6 +232,24 @@ $(_endef)
 		) || true \
 	)
     endif
+
+    ifneq ($$(KEEP_$(1)),)
+		@( \
+			keepfiles=""; \
+			for x in $$(KEEP_$(1)); do \
+				[ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
+			done; \
+			[ -z "$$$$keepfiles" ] || { \
+				mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
+				for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
+			}; \
+		)
+    endif
+
+	$(INSTALL_DIR) $$(PDIR_$(1))/tmp
+
+ifeq ($(CONFIG_USE_APK),)
+	mkdir -p $$(IDIR_$(1))/CONTROL
 	(cd $$(IDIR_$(1))/CONTROL; \
 		( \
 			echo "$$$$CONTROL"; \
@@ -251,25 +273,66 @@ $(_endef)
 		$($(1)_COMMANDS) \
 	)
 
-    ifneq ($$(KEEP_$(1)),)
-		@( \
-			keepfiles=""; \
-			for x in $$(KEEP_$(1)); do \
-				[ -f "$$(IDIR_$(1))/$$$$x" ] || keepfiles="$$$${keepfiles:+$$$$keepfiles }$$$$x"; \
-			done; \
-			[ -z "$$$$keepfiles" ] || { \
-				mkdir -p $$(IDIR_$(1))/lib/upgrade/keep.d; \
-				for x in $$$$keepfiles; do echo $$$$x >> $$(IDIR_$(1))/lib/upgrade/keep.d/$(1); done; \
-			}; \
-		)
-    endif
-
-	$(INSTALL_DIR) $$(PDIR_$(1))
 	$(FAKEROOT) $(STAGING_DIR_HOST)/bin/bash $(SCRIPT_DIR)/ipkg-build -m "$(FILE_MODES)" $$(IDIR_$(1)) $$(PDIR_$(1))
-	@[ -f $$(IPKG_$(1)) ]
+else
+	mkdir -p $$(ADIR_$(1))/
+	mkdir -p $$(IDIR_$(1))/lib/apk/packages/
+
+	(cd $$(ADIR_$(1)); $($(1)_COMMANDS))
+
+	( \
+		echo "#!/bin/sh"; \
+		echo "[ \"\$$$${IPKG_NO_SCRIPT}\" = \"1\" ] && exit 0"; \
+		echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
+		echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
+		echo 'export root="$$$${IPKG_INSTROOT}"'; \
+		echo 'export pkgname="$(1)"'; \
+		echo "add_group_and_user"; \
+		[ ! -f $$(ADIR_$(1))/postinst-pkg ] || cat "$$(ADIR_$(1))/postinst-pkg"; \
+		echo "default_postinst"; \
+	) > $$(ADIR_$(1))/post-install;
+
+	( \
+		echo "#!/bin/sh"; \
+		echo "[ -s "\$$$${IPKG_INSTROOT}/lib/functions.sh" ] || exit 0"; \
+		echo ". \$$$${IPKG_INSTROOT}/lib/functions.sh"; \
+		echo 'export root="$$$${IPKG_INSTROOT}"'; \
+		echo 'export pkgname="$(1)"'; \
+		[ ! -f $$(ADIR_$(1))/prerm-pkg ] || cat "$$(ADIR_$(1))/prerm-pkg"; \
+		echo "default_prerm"; \
+	) > $$(ADIR_$(1))/pre-deinstall;
+
+	if [ -n "$(USERID)" ]; then echo $(USERID) > $$(IDIR_$(1))/lib/apk/packages/$(1).rusers; fi;
+	if [ -n "$(ALTERNATIVES)" ]; then echo $(ALTERNATIVES) > $$(IDIR_$(1))/lib/apk/packages/$(1).alternatives; fi;
+	(cd $$(IDIR_$(1)) && find . -type f,l -printf "/%P\n" > $$(IDIR_$(1))/lib/apk/packages/$(1).list)
+	if [ -f $$(ADIR_$(1))/conffiles ]; then mv $$(ADIR_$(1))/conffiles $$(IDIR_$(1))/lib/apk/packages/$(1).conffiles; fi;
+
+	$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
+	  --info "name:$(1)$$(ABIV_$(1))" \
+	  --info "version:$(VERSION)" \
+	  --info "description:" \
+	  --info "arch:$(PKGARCH)" \
+	  --info "license:$(LICENSE)" \
+	  --info "origin:$(SOURCE)" \
+	  --info "provides:$$(foreach prov,$$(filter-out $(1)$$(ABIV_$(1)),$(PROVIDES)$$(if $$(ABIV_$(1)), \
+		$(1) $(foreach provide,$(PROVIDES),$(provide)$$(ABIV_$(1))))),$$(prov)=$(VERSION) )" \
+	  --script "post-install:$$(ADIR_$(1))/post-install" \
+	  --script "pre-deinstall:$$(ADIR_$(1))/pre-deinstall" \
+	  --info "depends:$$(foreach depends,$$(subst $$(comma),$$(space),$$(subst $$(space),,$$(subst $$(paren_right),,$$(subst $$(paren_left),,$$(Package/$(1)/DEPENDS))))),$$(depends))" \
+	  --files "$$(IDIR_$(1))" \
+	  --output "$$(PACK_$(1))" \
+	  --sign "$(BUILD_KEY_APK_SEC)"
+endif
+
+	@[ -f $$(PACK_$(1)) ]
 
     $(1)-clean:
-	$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1))))
+ifeq ($(CONFIG_USE_APK),)
+	$$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_package_wildcard,$(1))))
+else
+	$$(call remove_ipkg_files,$(1),$$(call apk_package_files,$(call gen_package_wildcard,$(1))))
+endif
+
 
     clean: $(1)-clean
 
diff --git a/include/package.mk b/include/package.mk
index 61a26f0c43..8ee78415df 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -136,7 +136,7 @@ PKG_INSTALL_STAMP:=$(PKG_INFO_DIR)/$(PKG_DIR_NAME).$(if $(BUILD_VARIANT),$(BUILD
 
 include $(INCLUDE_DIR)/package-defaults.mk
 include $(INCLUDE_DIR)/package-dumpinfo.mk
-include $(INCLUDE_DIR)/package-ipkg.mk
+include $(INCLUDE_DIR)/package-pack.mk
 include $(INCLUDE_DIR)/package-bin.mk
 include $(INCLUDE_DIR)/autotools.mk
 
diff --git a/include/rootfs.mk b/include/rootfs.mk
index 2128aefc2a..eb4fa434a3 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -43,6 +43,16 @@ opkg = \
 	--add-arch all:100 \
 	--add-arch $(if $(ARCH_PACKAGES),$(ARCH_PACKAGES),$(BOARD)):200
 
+apk = \
+  IPKG_INSTROOT=$(1) \
+  $(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk \
+	--root $(1) \
+	--keys-dir $(TOPDIR) \
+	--no-cache \
+	--no-logfile \
+	--preserve-env \
+	--repository file://$(PACKAGE_DIR_ALL)/packages.adb
+
 TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
 
 ifdef CONFIG_CLEAN_IPKG
@@ -68,6 +78,11 @@ define prepare_rootfs
 	@mkdir -p $(1)/var/lock
 	@( \
 		cd $(1); \
+		if [ -n $(CONFIG_USE_APK) ]; then \
+		$(STAGING_DIR_HOST)/bin/tar -xf ./lib/apk/db/scripts.tar --wildcards "*.post-install" -O > script.sh; \
+		chmod +x script.sh; \
+		IPKG_INSTROOT=$(1) $$(command -v bash) script.sh; \
+		else \
 		for script in ./usr/lib/opkg/info/*.postinst; do \
 			IPKG_INSTROOT=$(1) $$(command -v bash) $$script; \
 			ret=$$?; \
@@ -76,6 +91,13 @@ define prepare_rootfs
 				exit 1; \
 			fi; \
 		done; \
+		$(if $(IB),,awk -i inplace \
+			'/^Status:/ { \
+				if ($$3 == "user") { $$3 = "ok" } \
+				else { sub(/,\<user\>|\<user\>,/, "", $$3) } \
+			}1' $(1)/usr/lib/opkg/status) ; \
+		$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status ;) \
+		fi; \
 		for script in ./etc/init.d/*; do \
 			grep '#!/bin/sh /etc/rc.common' $$script >/dev/null || continue; \
 			if ! echo " $(3) " | grep -q " $$(basename $$script) "; then \
@@ -87,13 +109,9 @@ define prepare_rootfs
 			fi; \
 		done || true \
 	)
-	awk -i inplace \
-		'/^Status:/ { \
-			if ($$3 == "user") { $$3 = "ok" } \
-			else { sub(/,\<user\>|\<user\>,/, "", $$3) } \
-		}1' $(1)/usr/lib/opkg/status
-	$(if $(SOURCE_DATE_EPOCH),sed -i "s/Installed-Time: .*/Installed-Time: $(SOURCE_DATE_EPOCH)/" $(1)/usr/lib/opkg/status)
+
 	@-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf
+	@-find $(1)/usr/cache/apk/ -name '*.apk' -delete
 	rm -rf \
 		$(1)/boot \
 		$(1)/tmp/* \
diff --git a/include/target.mk b/include/target.mk
index 68558601f3..8b81b54624 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -21,12 +21,17 @@ DEFAULT_PACKAGES:=\
 	logd \
 	mtd \
 	netifd \
-	opkg \
 	uci \
 	uclient-fetch \
 	urandom-seed \
 	urngd
 
+ifdef CONFIG_USE_APK
+DEFAULT_PACKAGES+=apk
+else
+DEFAULT_PACKAGES+=opkg
+endif
+
 ifneq ($(CONFIG_SELINUX),)
 DEFAULT_PACKAGES+=busybox-selinux procd-selinux
 else
diff --git a/package/Makefile b/package/Makefile
index d72ce09a81..301a9e6cd5 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -53,20 +53,43 @@ $(curdir)/cleanup: $(TMP_DIR)/.build
 $(curdir)/merge:
 	rm -rf $(PACKAGE_DIR_ALL)
 	mkdir -p $(PACKAGE_DIR_ALL)
+ifneq ($(CONFIG_USE_APK),)
+	-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.apk),ln -s $(pdir)/*.apk $(PACKAGE_DIR_ALL);))
+else
 	-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
+endif
 
 $(curdir)/merge-index: $(curdir)/merge
+ifneq ($(CONFIG_USE_APK),)
+	(cd $(PACKAGE_DIR_ALL) && $(STAGING_DIR_HOST)/bin/apk mkndx \
+			--root $(TOPDIR) \
+			--keys-dir $(TOPDIR) \
+			--sign $(BUILD_KEY_APK_SEC) \
+			--output packages.adb \
+			*.apk; \
+	)
+else
 	(cd $(PACKAGE_DIR_ALL) && $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages; )
+endif
 
 ifndef SDK
   $(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)
+ifneq ($(CONFIG_USE_APK),)
+  $(curdir)/compile: $(curdir)/system/apk/host/compile
+else
   $(curdir)/compile: $(curdir)/system/opkg/host/compile
 endif
+endif
 
-$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DEVICE_ROOTFS),$(curdir)/merge-index)
+$(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index
 	- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
 	rm -rf $(TARGET_DIR) $(TARGET_DIR_ORIG)
 	mkdir -p $(TARGET_DIR)/tmp
+ifneq ($(CONFIG_USE_APK),)
+	$(file >$(TMP_DIR)/apk_install_list,\
+	    $(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
+	$(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) $$(cat $(TMP_DIR)/apk_install_list)
+else
 	$(file >$(TMP_DIR)/opkg_install_list,\
 	  $(call opkg_package_files,\
 	    $(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg)))))
@@ -77,6 +100,7 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
 			$(call opkg,$(TARGET_DIR)) flag $$flag `cat $$file`; \
 		done; \
 	done || true
+endif
 
 	$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
 
@@ -84,6 +108,19 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(if $(CONFIG_TARGET_PER_DE
 
 $(curdir)/index: FORCE
 	@echo Generating package index...
+ifneq ($(CONFIG_USE_APK),)
+	@for d in $(PACKAGE_SUBDIRS); do \
+		mkdir -p $$d; \
+		cd $$d || continue; \
+		ls *.apk >/dev/null 2>&1 || continue; \
+		$(STAGING_DIR_HOST)/bin/apk mkndx \
+			--root $(TOPDIR) \
+			--keys-dir $(TOPDIR) \
+			--sign $(BUILD_KEY_APK_SEC) \
+			--output packages.adb \
+			*.apk; \
+	done
+else
 	@for d in $(PACKAGE_SUBDIRS); do ( \
 		mkdir -p $$d; \
 		cd $$d || continue; \
@@ -115,6 +152,7 @@ ifdef CONFIG_JSON_CYCLONEDX_SBOM
 		$(SCRIPT_DIR)/package-metadata.pl pkgcyclonedxsbom Packages.manifest > Packages.bom.cdx.json || true; \
 	); done
 endif
+endif
 
 $(curdir)/flags-install:= -j1
 
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index b1a834e1bf..c42e2d9dd4 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -116,6 +116,13 @@ define Build/Compile/Default
 endef
 Build/Compile = $(Build/Compile/Default)
 
+ifneq ($(CONFIG_USE_APK),)
+  define Build/Configure
+	[ -s $(BUILD_KEY_APK_SEC) -a -s $(BUILD_KEY_APK_PUB) ] || \
+		$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
+		$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
+  endef
+else
 ifdef CONFIG_SIGNED_PACKAGES
   define Build/Configure
 	[ -s $(BUILD_KEY) -a -s $(BUILD_KEY).pub ] || \
@@ -131,9 +138,13 @@ ifndef CONFIG_BUILDBOT
 	mkdir -p $(1)/etc/opkg/keys
 	$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
 
+	mkdir -p $(1)/etc/apk/keys
+	$(CP) $(BUILD_KEY_APK_PUB) $(1)/etc/apk/keys/
+
   endef
 endif
 endif
+endif
 
 ifeq ($(CONFIG_NAND_SUPPORT),)
   define Package/base-files/nand-support
@@ -234,15 +245,21 @@ endif
 		cat $(BIN_DIR)/feeds.buildinfo >>$(1)/etc/build.feeds; \
 		cat $(BIN_DIR)/version.buildinfo >>$(1)/etc/build.version)
 
+	$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
+		rm -f $(1)/etc/banner.failsafe,)
+
+ifneq ($(CONFIG_USE_APK),)
+	mkdir -p $(1)/etc/apk/
+	$(call FeedSourcesAppendAPK,$(1)/etc/apk/repositories)
+	$(VERSION_SED_SCRIPT) $(1)/etc/apk/repositories
+else
 	$(if $(CONFIG_CLEAN_IPKG),, \
 		mkdir -p $(1)/etc/opkg; \
-		$(call FeedSourcesAppend,$(1)/etc/opkg/distfeeds.conf); \
+		$(call FeedSourcesAppendOPKG,$(1)/etc/opkg/distfeeds.conf); \
 		$(VERSION_SED_SCRIPT) $(1)/etc/opkg/distfeeds.conf)
 	$(if $(CONFIG_IPK_FILES_CHECKSUMS),, \
 		rm -f $(1)/sbin/pkg_check)
-
-	$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
-		rm -f $(1)/etc/banner.failsafe,)
+endif
 endef
 
 ifneq ($(DUMP),1)
diff --git a/package/system/apk/patches/0002-mbedtls-support.patch b/package/system/apk/patches/0002-mbedtls-support.patch
index 62b3ab81d3..d06db30f03 100644
--- a/package/system/apk/patches/0002-mbedtls-support.patch
+++ b/package/system/apk/patches/0002-mbedtls-support.patch
@@ -1,51 +1,16 @@
-From 74ea482102e1a7c1845b3eec19cbdb21264836d4 Mon Sep 17 00:00:00 2001
+From 68352e0cb94fe08b220d4befec828171ec871154 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras at iki.fi>
 Date: Fri, 5 Apr 2024 12:06:56 +0300
-Subject: [PATCH 1/4] add alternate url wget implementation
+Subject: [PATCH 1/2] add alternate url wget implementation
 
 ---
- .gitlab-ci.yml    |  16 ++++-
  meson.build       |   6 +-
  meson_options.txt |   1 +
- src/io_url_wget.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++
- src/meson.build   |   4 +-
- 5 files changed, 173 insertions(+), 4 deletions(-)
+ src/io_url_wget.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/meson.build   |   8 ++-
+ 4 files changed, 150 insertions(+), 2 deletions(-)
  create mode 100644 src/io_url_wget.c
 
-diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
-index 7fc86563..b7e00008 100644
---- a/.gitlab-ci.yml
-+++ b/.gitlab-ci.yml
-@@ -24,7 +24,19 @@ test:alpine:
-     script:
-         - apk update
-         - apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev zstd-dev lua5.3-dev lua5.3-lzlib meson zlib-static zstd-static openssl-libs-static
--        - meson build
-+        - meson setup build -Dstatic_apk=true
-+        - ninja -C build
-+    tags:
-+        - docker-alpine
-+        - x86_64
-+
-+test:alpine-alt-config:
-+    image: alpine
-+    stage: test
-+    script:
-+        - apk update
-+        - apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib meson
-+        - meson setup build -Durl_backend=wget -Dzstd=false
-         - ninja -C build
-     tags:
-         - docker-alpine
-@@ -38,7 +50,7 @@ test:debian:
-         - apt-get install -y make gcc git libssl-dev zlib1g-dev libzstd-dev lua5.3-dev lua5.2 lua-zlib-dev sudo meson
-         - unlink /bin/sh
-         - ln -s /bin/bash /bin/sh
--        - meson build
-+        - meson setup build
-         - ninja -C build
-     tags:
-         - docker-alpine
 diff --git a/meson.build b/meson.build
 index 1a44c11f..9a14cac0 100644
 --- a/meson.build
@@ -63,26 +28,26 @@ index 1a44c11f..9a14cac0 100644
  subdir('src')
  subdir('tests')
 diff --git a/meson_options.txt b/meson_options.txt
-index 693f46ec..940fe9a4 100644
+index 693f46ec..44b88b32 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
 @@ -5,5 +5,6 @@ option('help', description: 'Build help into apk binaries, needs lua', type: 'fe
  option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
  option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
  option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
-+option('url_backend', description: 'URL backend', type: 'combo', choices: ['libfetch', 'wget'], value: 'libfetch')
++option('url_backend', description: 'URL backend', type: 'string', value: 'libfetch')
  option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
  option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
 diff --git a/src/io_url_wget.c b/src/io_url_wget.c
 new file mode 100644
-index 00000000..9a929222
+index 00000000..d8885a4f
 --- /dev/null
 +++ b/src/io_url_wget.c
-@@ -0,0 +1,150 @@
+@@ -0,0 +1,137 @@
 +/* io_url_wget.c - Alpine Package Keeper (APK)
 + *
 + * Copyright (C) 2005-2008 Natanael Copa <n at tanael.org>
-+ * Copyright (C) 2008-2011 Timo Ter??s <timo.teras at iki.fi>
++ * Copyright (C) 2008-2011 Timo Ter?s <timo.teras at iki.fi>
 + * All rights reserved.
 + *
 + * SPDX-License-Identifier: GPL-2.0-only
@@ -93,9 +58,6 @@ index 00000000..9a929222
 +#include <sys/wait.h>
 +#include "apk_io.h"
 +
-+static char wget_timeout[16];
-+static char wget_no_check_certificate;
-+
 +static int wget_translate_status(int status)
 +{
 +	if (!WIFEXITED(status)) return -EFAULT;
@@ -118,19 +80,11 @@ index 00000000..9a929222
 +
 +static int wget_spawn(const char *url, pid_t *pid, int *fd)
 +{
-+	int i = 0, r, pipefds[2];
++	int r, pipefds[2];
 +	posix_spawn_file_actions_t act;
-+	char *argv[16];
-+
-+	argv[i++] = "wget";
-+	argv[i++] = "-q";
-+	argv[i++] = "-T";
-+	argv[i++] = wget_timeout;
-+	if (wget_no_check_certificate) argv[i++] = "--no-check-certificate";
-+	argv[i++] = (char *) url;
-+	argv[i++] = "-O";
-+	argv[i++] = "-";
-+	argv[i++] = 0;
++	char *argv[] = {
++		(char*)"wget", "-q", (char*) url, "-O", "-", 0
++	};
 +
 +	if (pipe2(pipefds, O_CLOEXEC) != 0) return -errno;
 +
@@ -214,12 +168,10 @@ index 00000000..9a929222
 +
 +void apk_io_url_no_check_certificate(void)
 +{
-+	wget_no_check_certificate = 1;
 +}
 +
 +void apk_io_url_set_timeout(int timeout)
 +{
-+	snprintf(wget_timeout, sizeof wget_timeout, "%d", timeout);
 +}
 +
 +void apk_io_url_set_redirect_callback(void (*cb)(int, const char *))
@@ -230,97 +182,39 @@ index 00000000..9a929222
 +{
 +}
 diff --git a/src/meson.build b/src/meson.build
-index c1aae550..38e9d3b0 100644
+index c1aae550..28bfce7e 100644
 --- a/src/meson.build
 +++ b/src/meson.build
-@@ -1,3 +1,5 @@
-+url_backend = get_option('url_backend')
-+
- libapk_so_version = '2.99.0'
- libapk_src = [
- 	'adb.c',
-@@ -22,8 +24,8 @@ libapk_src = [
+@@ -22,7 +22,6 @@ libapk_src = [
  	'fs_uvol.c',
  	'hash.c',
  	'io.c',
 -	'io_url_libfetch.c',
  	'io_gunzip.c',
-+	'io_url_ at 0@.c'.format(url_backend),
  	'package.c',
  	'pathbuilder.c',
- 	'print.c',
--- 
-GitLab
-
-
-From b9fe78fbf19bb10e1d0b8eb1cb1de123bee2ed7e Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Tue, 16 Apr 2024 17:55:15 +0200
-Subject: [PATCH 2/4] add option to configure url backend in legacy make build
- system
-
-Can be configured by setting URL_BACKEND. If not set libfetch is
-selected by default.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- src/Makefile | 20 ++++++++++++++------
- 1 file changed, 14 insertions(+), 6 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index f7873cb1..efdc68df 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -9,8 +9,8 @@ else
- $(error Lua interpreter not found. Please specify LUA interpreter, or use LUA=no to build without help.)
- endif
- 
--OPENSSL_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags openssl)
--OPENSSL_LIBS		:= $(shell $(PKG_CONFIG) --libs openssl)
-+OPENSSL_CFLAGS         := $(shell $(PKG_CONFIG) --cflags openssl)
-+OPENSSL_LIBS           := $(shell $(PKG_CONFIG) --libs openssl)
- 
- ZLIB_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags zlib)
- ZLIB_LIBS		:= $(shell $(PKG_CONFIG) --libs zlib)
-@@ -21,10 +21,18 @@ libapk_so		:= $(obj)/libapk.so.$(libapk_soname)
- libapk.so.$(libapk_soname)-objs := \
- 	adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
- 	atom.o blob.o commit.o common.o context.o crypto.o crypto_openssl.o ctype.o database.o hash.o \
--	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o io_url_libfetch.o \
--	tar.o package.o pathbuilder.o print.o solver.o trust.o version.o
-+	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o \
-+	print.o solver.o trust.o version.o
+@@ -87,6 +86,13 @@ apk_src = [
+ 	'applet.c',
+ ]
  
--libapk.so.$(libapk_soname)-libs := libfetch/libfetch.a
-+libapk.so.$(libapk_soname)-libs :=
-+
-+ifeq ($(URL_BACKEND),wget)
-+libapk.so.$(libapk_soname)-objs += io_url_wget.o
-+else
-+CFLAGS_ALL += -Ilibfetch
-+libapk.so.$(libapk_soname)-objs += io_url_libfetch.o
-+libapk.so.$(libapk_soname)-libs += libfetch/libfetch.a
++url_backend = get_option('url_backend')
++if url_backend == 'libfetch'
++	libapk_src += [	'io_url_libfetch.c' ]
++elif url_backend == 'wget'
++	libapk_src += [	'io_url_wget.c' ]
 +endif
- 
- # ZSTD support can be disabled
- ifneq ($(ZSTD),no)
-@@ -79,7 +87,7 @@ LIBS_apk		:= -lapk
- LIBS_apk-test		:= -lapk
- LIBS_apk.so		:= -L$(obj) -lapk
- 
--CFLAGS_ALL		+= -D_ATFILE_SOURCE -Ilibfetch -Iportability
-+CFLAGS_ALL		+= -D_ATFILE_SOURCE -Iportability
- CFLAGS_apk.o		:= -DAPK_VERSION=\"$(VERSION)\"
- CFLAGS_apk-static.o	:= -DAPK_VERSION=\"$(VERSION)\" -DOPENSSL_NO_ENGINE
- CFLAGS_apk-test.o	:= -DAPK_VERSION=\"$(VERSION)\" -DOPENSSL_NO_ENGINE -DTEST_MODE
++
+ if lua_bin.found()
+ 	genhelp_script = files('genhelp.lua')
+ 	genhelp_args = [lua_bin, genhelp_script, '@INPUT@']
 -- 
 GitLab
 
 
-From 0418b684898403c49905c1f0e4b7c5ca522b2d50 Mon Sep 17 00:00:00 2001
+From dc7ff789a45522eb847118a29b60b896de55d083 Mon Sep 17 00:00:00 2001
 From: Jonas Jelonek <jelonek.jonas at gmail.com>
 Date: Sun, 14 Apr 2024 00:20:14 +0200
-Subject: [PATCH 3/4] crypto: add support for mbedtls as backend
+Subject: [PATCH 2/2] crypto: add support for mbedtls as backend
 
 backend is selected at compile-time with crypto_backend option
 
@@ -331,16 +225,11 @@ Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
  libfetch/meson.build     |   2 +-
  meson.build              |  14 +-
  meson_options.txt        |   1 +
- portability/getrandom.c  |  19 +++
- portability/meson.build  |   3 +-
- portability/sys/random.h |   6 +
  src/apk_crypto.h         |   5 +
- src/apk_crypto_mbedtls.h |  30 +++++
- src/crypto_mbedtls.c     | 285 +++++++++++++++++++++++++++++++++++++++
- src/meson.build          |  21 ++-
- 10 files changed, 373 insertions(+), 13 deletions(-)
- create mode 100644 portability/getrandom.c
- create mode 100644 portability/sys/random.h
+ src/apk_crypto_mbedtls.h |  26 ++++
+ src/crypto_mbedtls.c     | 305 +++++++++++++++++++++++++++++++++++++++
+ src/meson.build          |  23 ++-
+ 7 files changed, 364 insertions(+), 12 deletions(-)
  create mode 100644 src/apk_crypto_mbedtls.h
  create mode 100644 src/crypto_mbedtls.c
 
@@ -388,66 +277,17 @@ index 9a14cac0..3a83f4e1 100644
  add_project_arguments('-D_GNU_SOURCE', language: 'c')
  
 diff --git a/meson_options.txt b/meson_options.txt
-index 940fe9a4..df0b07dc 100644
+index 44b88b32..2b1d24ce 100644
 --- a/meson_options.txt
 +++ b/meson_options.txt
-@@ -1,4 +1,5 @@
- option('arch_prefix', description: 'Define a custom arch prefix for default arch', type: 'string')
-+option('crypto_backend', description: 'Crypto backend', type: 'combo', choices: ['openssl', 'mbedtls'], value: 'openssl')
- option('compressed-help', description: 'Compress help database, needs lua-zlib', type: 'boolean', value: true)
- option('docs', description: 'Build manpages with scdoc', type: 'feature', value: 'auto')
- option('help', description: 'Build help into apk binaries, needs lua', type: 'feature', value: 'auto')
-diff --git a/portability/getrandom.c b/portability/getrandom.c
-new file mode 100644
-index 00000000..b2f4a07c
---- /dev/null
-+++ b/portability/getrandom.c
-@@ -0,0 +1,19 @@
-+#include <sys/random.h>
-+#include <sys/types.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+
-+ssize_t getrandom(void *buf, size_t buflen, unsigned int flags)
-+{
-+	int fd;
-+	ssize_t ret;
-+
-+	fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC);
-+	if (fd < 0)
-+		return -1;
-+
-+	ret = read(fd, buf, buflen);
-+	close(fd);
-+	return ret;
-+}
-+
-diff --git a/portability/meson.build b/portability/meson.build
-index 89957c3c..3172044e 100644
---- a/portability/meson.build
-+++ b/portability/meson.build
-@@ -3,7 +3,8 @@ cc = meson.get_compiler('c')
- libportability_src = []
- 
- check_symbols = [
--	['memrchr', 'memrchr.c', 'NEED_MEMRCHR', 'string.h'],
-+	['getrandom', 'getrandom.c', 'NEED_GETRANDOM', 'sys/random.h'],
-+        ['memrchr', 'memrchr.c', 'NEED_MEMRCHR', 'string.h'],
- 	['mknodat', 'mknodat.c', 'NEED_MKNODAT', 'sys/stat.h'],
- 	['pipe2', 'pipe2.c', 'NEED_PIPE2', 'unistd.h'],
- 	['qsort_r', 'qsort_r.c', 'NEED_QSORT_R', 'stdlib.h'],
-diff --git a/portability/sys/random.h b/portability/sys/random.h
-new file mode 100644
-index 00000000..02d5b1ca
---- /dev/null
-+++ b/portability/sys/random.h
-@@ -0,0 +1,6 @@
-+#include_next <sys/random.h>
-+#include <sys/types.h>
-+
-+#ifdef NEED_GETRANDOM
-+ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
-+#endif
+@@ -5,6 +5,7 @@ option('help', description: 'Build help into apk binaries, needs lua', type: 'fe
+ option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
+ option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
+ option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
++option('crypto_backend', description: 'SSL backend', type: 'string', value: 'openssl')
+ option('url_backend', description: 'URL backend', type: 'string', value: 'libfetch')
+ option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
+ option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
 diff --git a/src/apk_crypto.h b/src/apk_crypto.h
 index 7de88dfc..5cae3bfe 100644
 --- a/src/apk_crypto.h
@@ -467,10 +307,10 @@ index 7de88dfc..5cae3bfe 100644
  
 diff --git a/src/apk_crypto_mbedtls.h b/src/apk_crypto_mbedtls.h
 new file mode 100644
-index 00000000..5481d149
+index 00000000..e379535b
 --- /dev/null
 +++ b/src/apk_crypto_mbedtls.h
-@@ -0,0 +1,30 @@
+@@ -0,0 +1,26 @@
 +/* apk_crypto_mbedtls.h - Alpine Package Keeper (APK)
 + *
 + * Copyright (C) 2024
@@ -484,45 +324,36 @@ index 00000000..5481d149
 +
 +#include <mbedtls/md.h>
 +#include <mbedtls/pk.h>
-+#include <mbedtls/bignum.h>
 +
 +struct apk_pkey {
 +	uint8_t id[16];
-+	mbedtls_pk_context key;
++	mbedtls_pk_context *key;
 +};
 +
 +struct apk_digest_ctx {
-+	mbedtls_md_context_t mdctx;
++	mbedtls_md_context_t *mdctx;
 +	struct apk_pkey *sigver_key;
 +	uint8_t alg;
 +};
 +
-+/* based on mbedtls' internal pkwrite.h calculations */
-+#define APK_ENC_KEY_MAX_LENGTH          (38 + 2 * MBEDTLS_MPI_MAX_SIZE)
-+
 +#endif
 diff --git a/src/crypto_mbedtls.c b/src/crypto_mbedtls.c
 new file mode 100644
-index 00000000..73d60e9d
+index 00000000..9ce148b5
 --- /dev/null
 +++ b/src/crypto_mbedtls.c
-@@ -0,0 +1,285 @@
+@@ -0,0 +1,305 @@
 +#include <errno.h>
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include <fcntl.h>
 +#include <sys/random.h>
-+#include <sys/stat.h>
-+#include <unistd.h>
 +
 +#include <mbedtls/platform.h>
 +#include <mbedtls/md.h>
 +#include <mbedtls/pk.h>
 +#include <mbedtls/entropy.h>
-+
-+#ifdef MBEDTLS_PSA_CRYPTO_C
 +#include <psa/crypto.h>
-+#endif
 +
 +#include "apk_crypto.h"
 +
@@ -559,11 +390,14 @@ index 00000000..73d60e9d
 +int apk_digest_ctx_init(struct apk_digest_ctx *dctx, uint8_t alg)
 +{
 +	dctx->alg = alg;
++	dctx->mdctx = malloc(sizeof(mbedtls_md_context_t));
++
++	if (!dctx->mdctx) return -ENOMEM;
 +
-+	mbedtls_md_init(&dctx->mdctx);
++	mbedtls_md_init(dctx->mdctx);
 +	if (alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_setup(&dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
-+		mbedtls_md_starts(&dctx->mdctx))
++	if (mbedtls_md_setup(dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
++		mbedtls_md_starts(dctx->mdctx))
 +		return -APKE_CRYPTO_ERROR;
 +
 +	return 0;
@@ -572,77 +406,105 @@ index 00000000..73d60e9d
 +int apk_digest_ctx_reset(struct apk_digest_ctx *dctx)
 +{
 +	if (dctx->alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_starts(&dctx->mdctx)) return -APKE_CRYPTO_ERROR;
++	if (mbedtls_md_starts(dctx->mdctx)) return -APKE_CRYPTO_ERROR;
 +	return 0;
 +}
 +
 +int apk_digest_ctx_reset_alg(struct apk_digest_ctx *dctx, uint8_t alg)
 +{
-+	mbedtls_md_free(&dctx->mdctx);
++	mbedtls_md_free(dctx->mdctx);
 +
 +	dctx->alg = alg;
 +	if (alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_setup(&dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
-+		mbedtls_md_starts(&dctx->mdctx))
++	if (mbedtls_md_setup(dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
++		mbedtls_md_starts(dctx->mdctx))
 +		return -APKE_CRYPTO_ERROR;
-+
++	
 +	return 0;
 +}
 +
 +void apk_digest_ctx_free(struct apk_digest_ctx *dctx)
 +{
-+	mbedtls_md_free(&dctx->mdctx);
++	free(dctx->mdctx);
++	dctx->mdctx = 0;
 +}
 +
 +int apk_digest_ctx_update(struct apk_digest_ctx *dctx, const void *ptr, size_t sz)
 +{
 +	if (dctx->alg == APK_DIGEST_NONE) return 0;
-+	return mbedtls_md_update(&dctx->mdctx, ptr, sz) == 0 ? 0 : -APKE_CRYPTO_ERROR;
++	return mbedtls_md_update(dctx->mdctx, ptr, sz) == 0 ? 0 : -APKE_CRYPTO_ERROR;
 +}
 +
 +int apk_digest_ctx_final(struct apk_digest_ctx *dctx, struct apk_digest *d)
 +{
-+	if (mbedtls_md_finish(&dctx->mdctx, d->data)) {
++	if (mbedtls_md_finish(dctx->mdctx, d->data)) {
 +		apk_digest_reset(d);
 +		return -APKE_CRYPTO_ERROR;
 +	}
 +
++	mbedtls_md_free(dctx->mdctx);
++
 +	d->alg = dctx->alg;
 +	d->len = apk_digest_alg_len(d->alg);
 +	return 0;
 +}
 +
-+static int apk_load_file_at(int dirfd, const char *fn, unsigned char **buf, size_t *n)
++// Entropy function adopted from ustream-ssl to avoid using the bloated mbedtls'
++// mbedtls_entropy_context and mbedtls_ctr_drbg_context.
++static int _apk_random(void *ctx, unsigned char *out, size_t len)
 +{
-+	struct stat stats;
-+	size_t size;
-+	int fd;
++	static FILE *f;
 +
-+	if ((fd = openat(dirfd, fn, O_RDONLY|O_CLOEXEC)) < 0)
-+		return -errno;
++	if (!f)
++		f = fopen("/dev/urandom", "r");
++	if (fread(out, len, 1, f) != 1)
++		return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
 +
-+	if (fstat(fd, &stats)) {
-+		close(fd);
-+		return -errno;
++	return 0;
++}
++
++// adopted from mbedtls_pk_load_file
++static int apk_load_file_fd(int fd, unsigned char **buf, size_t *n)
++{
++	FILE *f;
++	long size;
++
++	if ((f = fdopen(fd, "rb")) == NULL) {
++		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
++	}
++
++#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
++	/* Ensure no stdio buffering of secrets, as such buffers cannot be wiped. */
++	mbedtls_setbuf(f, NULL);
++#endif
++
++	fseek(f, 0, SEEK_END);
++	if ((size = ftell(f)) == -1) {
++		fclose(f);
++		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
 +	}
++	fseek(f, 0, SEEK_SET);
 +
-+	size = (size_t)stats.st_size;
-+	*n = size;
++	*n = (size_t) size;
 +
-+	if (size == 0 || (*buf = mbedtls_calloc(1, size + 1)) == NULL)
++	if (*n + 1 == 0 ||
++		(*buf = mbedtls_calloc(1, *n + 1)) == NULL) {
++		fclose(f);
 +		return MBEDTLS_ERR_PK_ALLOC_FAILED;
++	}
 +
-+	if (read(fd, *buf, size) != size) {
-+		close(fd);
++	if (fread(*buf, 1, *n, f) != *n) {
++		fclose(f);
 +
-+		mbedtls_platform_zeroize(*buf, size);
++		mbedtls_platform_zeroize(*buf, *n);
 +		mbedtls_free(*buf);
 +
 +		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
 +	}
-+	close(fd);
 +
-+	(*buf)[size] = '\0';
++	fclose(f);
++
++	(*buf)[*n] = '\0';
 +
 +	if (strstr((const char *) *buf, "-----BEGIN ") != NULL) {
 +		++*n;
@@ -651,79 +513,68 @@ index 00000000..73d60e9d
 +	return 0;
 +}
 +
-+static int apk_pkey_init(struct apk_pkey *pkey)
++static int apk_pkey_init(struct apk_pkey *pkey, mbedtls_pk_context *key)
 +{
-+	unsigned char dig[APK_DIGEST_MAX_LENGTH];
-+	unsigned char pub[APK_ENC_KEY_MAX_LENGTH] = {};
++	unsigned char dig[APK_DIGEST_MAX_LENGTH], *pub = NULL;
 +	unsigned char *c;
-+	int len, r = -APKE_CRYPTO_ERROR;
++	int len, publen, r = -APKE_CRYPTO_ERROR;
 +
-+	c = pub + APK_ENC_KEY_MAX_LENGTH;
++	// Assume byte len is always * 2 + NULL terminated
++	publen = mbedtls_pk_get_len(key) * 2 + 1;
++	pub = malloc(publen);
++	if (!pub)
++		return -ENOMEM;
++	c = pub + publen;
 +
-+	// key is written backwards into pub starting at c!
-+	if ((len = mbedtls_pk_write_pubkey(&c, pub, &pkey->key)) < 0) return -APKE_CRYPTO_ERROR;
-+	if (!mbedtls_md(apk_digest_alg_to_mdinfo(APK_DIGEST_SHA512), c, len, dig)) {
++	if ((len = mbedtls_pk_write_pubkey(&c, pub, key)) < 0) return -APKE_CRYPTO_ERROR;
++	if (!mbedtls_md(apk_digest_alg_to_mdinfo(APK_DIGEST_SHA512), pub, len, dig)) {
 +		memcpy(pkey->id, dig, sizeof pkey->id);
 +		r = 0;
 +	}
-+
++ 
++	free(pub);
++	pkey->key = key;
++ 
 +	return r;
 +}
 +
 +void apk_pkey_free(struct apk_pkey *pkey)
 +{
-+	mbedtls_pk_free(&pkey->key);
-+}
-+
-+static int apk_random(void *ctx, unsigned char *out, size_t len)
-+{
-+	return (int)getrandom(out, len, 0);
++	mbedtls_pk_free(pkey->key);
 +}
 +
-+#if MBEDTLS_VERSION_NUMBER >= 0x03000000
-+static inline int apk_mbedtls_parse_privkey(struct apk_pkey *pkey, const unsigned char *buf, size_t blen)
-+{
-+	return mbedtls_pk_parse_key(&pkey->key, buf, blen, NULL, 0, apk_random, NULL);
-+}
-+static inline int apk_mbedtls_sign(struct apk_digest_ctx *dctx, struct apk_digest *dig,
-+				   unsigned char *sig, size_t *sig_len)
-+{
-+	return mbedtls_pk_sign(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
-+			       (const unsigned char *)&dig->data, dig->len, sig, sizeof *sig, sig_len,
-+			       apk_random, NULL);
-+}
-+#else
-+static inline int apk_mbedtls_parse_privkey(struct apk_pkey *pkey, const unsigned char *buf, size_t blen)
-+{
-+	return mbedtls_pk_parse_key(&pkey->key, buf, blen, NULL, 0);
-+}
-+static inline int apk_mbedtls_sign(struct apk_digest_ctx *dctx, struct apk_digest *dig,
-+				   unsigned char *sig, size_t *sig_len)
-+{
-+	return mbedtls_pk_sign(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
-+			       (const unsigned char *)&dig->data, dig->len, sig, sig_len, apk_random, NULL);
-+}
-+#endif
-+
 +int apk_pkey_load(struct apk_pkey *pkey, int dirfd, const char *fn)
 +{
-+	unsigned char *buf = NULL;
-+	size_t blen = 0;
-+	int ret;
++	mbedtls_pk_context *key;
++	unsigned char *buf;
++	size_t blen;
++	int ret, fd;
 +
-+	if (apk_load_file_at(dirfd, fn, &buf, &blen))
-+		return -APKE_CRYPTO_ERROR;
++	fd = openat(dirfd, fn, O_RDONLY|O_CLOEXEC);
++	if (fd < 0)
++		return -errno;
 +
-+	mbedtls_pk_init(&pkey->key);
-+	if ((ret = mbedtls_pk_parse_public_key(&pkey->key, buf, blen)) != 0)
-+		ret = apk_mbedtls_parse_privkey(pkey, buf, blen);
++	key = malloc(sizeof *key);
++	if (!key)
++		return -ENOMEM;
++	
++	mbedtls_pk_init(key);
++	if (apk_load_file_fd(fd, &buf, &blen))
++		return -APKE_CRYPTO_ERROR;
 +
++	if ((ret = mbedtls_pk_parse_public_key(key, buf, blen)) != 0) {
++#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
++		ret = mbedtls_pk_parse_key(key, buf, blen, NULL, 0, _apk_random, NULL);
++#else
++		ret = mbedtls_pk_parse_key(key, buf, blen, NULL, 0);
++#endif
++	}
 +	mbedtls_platform_zeroize(buf, blen);
 +	mbedtls_free(buf);
 +	if (ret != 0)
 +		return -APKE_CRYPTO_KEY_FORMAT;
 +
-+	return apk_pkey_init(pkey);
++	return apk_pkey_init(pkey, key);
 +}
 +
 +int apk_sign_start(struct apk_digest_ctx *dctx, uint8_t alg, struct apk_pkey *pkey)
@@ -743,10 +594,16 @@ index 00000000..73d60e9d
 +
 +	if (apk_digest_ctx_final(dctx, &dig))
 +		return -APKE_SIGNATURE_GEN_FAILURE;
-+
-+	if (apk_mbedtls_sign(dctx, &dig, sig, len))
++#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)	
++	if (mbedtls_pk_sign(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
++						&dig.data, dig.len, sig, sizeof *sig, len, _apk_random, NULL))
++#else
++	if (mbedtls_pk_sign(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
++						&dig.data, dig.len, sig, len, _apk_random, NULL))
++#endif
 +		r = -APKE_SIGNATURE_GEN_FAILURE;
 +
++
 +	dctx->sigver_key = NULL;
 +	return r;
 +}
@@ -769,8 +626,7 @@ index 00000000..73d60e9d
 +	if (apk_digest_ctx_final(dctx, &dig))
 +		return -APKE_SIGNATURE_GEN_FAILURE;
 +
-+	if (mbedtls_pk_verify(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
-+			      (const unsigned char *)&dig.data, dig.len, sig, len))
++	if (mbedtls_pk_verify(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg), &dig.data, dig.len, sig, len))
 +		r = -APKE_SIGNATURE_INVALID;
 +
 +	dctx->sigver_key = NULL;
@@ -793,33 +649,26 @@ index 00000000..73d60e9d
 +#endif
 +}
 diff --git a/src/meson.build b/src/meson.build
-index 38e9d3b0..e1204fc0 100644
+index 28bfce7e..4eab6e0d 100644
 --- a/src/meson.build
 +++ b/src/meson.build
-@@ -1,3 +1,4 @@
-+crypto_backend = get_option('crypto_backend')
- url_backend = get_option('url_backend')
- 
- libapk_so_version = '2.99.0'
-@@ -15,7 +16,7 @@ libapk_src = [
+@@ -13,7 +13,6 @@ libapk_src = [
  	'common.c',
  	'context.c',
  	'crypto.c',
 -	'crypto_openssl.c',
-+        'crypto_ at 0@.c'.format(crypto_backend),
  	'ctype.c',
  	'database.c',
  	'extract_v2.c',
-@@ -40,7 +41,7 @@ libapk_headers = [
+@@ -37,7 +36,6 @@ libapk_headers = [
  	'apk_atom.h',
  	'apk_blob.h',
  	'apk_crypto.h',
 -	'apk_crypto_openssl.h',
-+        'apk_crypto_ at 0@.h'.format(crypto_backend),
  	'apk_ctype.h',
  	'apk_database.h',
  	'apk_defines.h',
-@@ -89,6 +90,17 @@ apk_src = [
+@@ -86,6 +84,11 @@ apk_src = [
  	'applet.c',
  ]
  
@@ -828,16 +677,28 @@ index 38e9d3b0..e1204fc0 100644
 +	'-D_ATFILE_SOURCE',
 +]
 +
+ url_backend = get_option('url_backend')
+ if url_backend == 'libfetch'
+ 	libapk_src += [	'io_url_libfetch.c' ]
+@@ -93,6 +96,17 @@ elif url_backend == 'wget'
+ 	libapk_src += [	'io_url_wget.c' ]
+ endif
+ 
++crypto_backend = get_option('crypto_backend')
 +if crypto_backend == 'openssl'
 +	apk_cargs += [ '-DCRYPTO_USE_OPENSSL' ]
++	libapk_src += [ 'crypto_openssl.c' ]
++	libapk_headers += [ 'apk_crypto_openssl.h' ]
 +elif crypto_backend == 'mbedtls'
 +	apk_cargs += [ '-DCRYPTO_USE_MBEDTLS' ]
++	libapk_src += [ 'crypto_mbedtls.c' ]
++	libapk_headers += [ 'apk_crypto_mbedtls.h' ]
 +endif
 +
  if lua_bin.found()
  	genhelp_script = files('genhelp.lua')
  	genhelp_args = [lua_bin, genhelp_script, '@INPUT@']
-@@ -115,11 +127,6 @@ endif
+@@ -119,11 +133,6 @@ endif
  
  apk_src += [ generated_help ]
  
@@ -852,66 +713,3 @@ index 38e9d3b0..e1204fc0 100644
 -- 
 GitLab
 
-
-From 34bb1021284dccbf97f02b0a0bb9e751b8887cad Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Tue, 16 Apr 2024 17:56:45 +0200
-Subject: [PATCH 4/4] add option to configure crypto backend in legacy make
- build system
-
-Define CRYPTO to select mbedtls as alternative crypto backend. By
-default openssl is used.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- src/Makefile | 20 +++++++++++++++-----
- 1 file changed, 15 insertions(+), 5 deletions(-)
-
-diff --git a/src/Makefile b/src/Makefile
-index efdc68df..97db0e72 100644
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -20,9 +20,9 @@ libapk_soname		:= 2.99.0
- libapk_so		:= $(obj)/libapk.so.$(libapk_soname)
- libapk.so.$(libapk_soname)-objs := \
- 	adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
--	atom.o blob.o commit.o common.o context.o crypto.o crypto_openssl.o ctype.o database.o hash.o \
--	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o \
--	print.o solver.o trust.o version.o
-+	atom.o blob.o commit.o common.o context.o crypto.o ctype.o database.o hash.o extract_v2.o \
-+	extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o print.o \
-+	solver.o trust.o version.o
- 
- libapk.so.$(libapk_soname)-libs :=
- 
-@@ -34,6 +34,16 @@ libapk.so.$(libapk_soname)-objs += io_url_libfetch.o
- libapk.so.$(libapk_soname)-libs += libfetch/libfetch.a
- endif
- 
-+ifeq ($(CRYPTO),mbedtls)
-+CRYPTO_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags mbedtls mbedcrypto) -DCRYPTO_USE_MBEDTLS
-+CRYPTO_LIBS		:= $(shell $(PKG_CONFIG) --libs mbedtls mbedcrypto)
-+libapk.so.$(libapk_soname)-objs += crypto_mbedtls.o
-+else
-+CRYPTO_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags openssl) -DCRYPTO_USE_OPENSSL
-+CRYPTO_LIBS		:= $(shell $(PKG_CONFIG) --libs openssl)
-+libapk.so.$(libapk_soname)-objs += crypto_openssl.o
-+endif
-+
- # ZSTD support can be disabled
- ifneq ($(ZSTD),no)
- ZSTD_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags libzstd)
-@@ -100,9 +110,9 @@ LIBS_apk.static		:= -Wl,--as-needed -ldl -Wl,--no-as-needed
- LDFLAGS_apk		+= -L$(obj)
- LDFLAGS_apk-test	+= -L$(obj)
- 
--CFLAGS_ALL		+= $(OPENSSL_CFLAGS) $(ZLIB_CFLAGS) $(ZSTD_CFLAGS)
-+CFLAGS_ALL		+= $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS) $(ZSTD_CFLAGS)
- LIBS			:= -Wl,--as-needed \
--				$(OPENSSL_LIBS) $(ZLIB_LIBS) $(ZSTD_LIBS) \
-+				$(CRYPTO_LIBS) $(ZLIB_LIBS) $(ZSTD_LIBS) \
- 			   -Wl,--no-as-needed
- 
- # Help generation
--- 
-GitLab
diff --git a/rules.mk b/rules.mk
index 84586ac26b..66297565cb 100644
--- a/rules.mk
+++ b/rules.mk
@@ -249,6 +249,8 @@ HOST_CFLAGS:=-O2 $(HOST_CPPFLAGS)
 HOST_LDFLAGS:=-L$(STAGING_DIR_HOST)/lib $(if $(IS_PACKAGE_BUILD),-L$(STAGING_DIR_HOSTPKG)/lib -L$(STAGING_DIR)/host/lib)
 
 BUILD_KEY=$(TOPDIR)/key-build
+BUILD_KEY_APK_SEC=$(TOPDIR)/private-key.pem
+BUILD_KEY_APK_PUB=$(TOPDIR)/public-key.pem
 
 FAKEROOT:=$(STAGING_DIR_HOST)/bin/fakeroot
 
diff --git a/scripts/feeds b/scripts/feeds
index 7d5b83e081..b5b943c70b 100755
--- a/scripts/feeds
+++ b/scripts/feeds
@@ -865,7 +865,7 @@ sub feed_config() {
 		printf "\t\tdepends on PER_FEED_REPO\n";
 		printf "\t\tdefault y\n" if $installed;
 		printf "\t\thelp\n";
-		printf "\t\t Enable the \\\"%s\\\" feed in opkg distfeeds.conf.\n", $feed->[1];
+		printf "\t\t Enable the \\\"%s\\\" feed in opkg distfeeds.conf and apk repositories.\n", $feed->[1];
 		printf "\t\t Say M to add the feed commented out.\n";
 		printf "\n";
 	}
@@ -884,7 +884,7 @@ Commands:
 	    -s :            List of feed names and their URL.
 	    -r <feedname>:  List packages of specified feed.
 	    -d <delimiter>: Use specified delimiter to distinguish rows (default: spaces)
-	    -f :            List feeds in feeds.conf compatible format (when using -s).
+	    -f :            List feeds in opkg feeds.conf compatible format (when using -s).
 
 	install [options] <package>: Install a package
 	Options:
diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index a46f819ab5..2c7d3c624b 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -373,7 +373,7 @@ sub and_condition($) {
 
 sub gen_condition ($) {
 	my $condition = shift;
-	# remove '!()', just as include/package-ipkg.mk does
+	# remove '!()', just as include/package-pack.mk does
 	$condition =~ s/[()!]//g;
 	return join("", map(and_condition($_), split('\|\|', $condition)));
 }
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index bfc72dacd0..ef32d2cf7c 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -22,6 +22,8 @@ IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE))
 BUNDLER_PATH := $(subst $(space),:,$(filter-out $(TOPDIR)/%,$(subst :,$(space),$(PATH))))
 BUNDLER_COMMAND := PATH=$(BUNDLER_PATH) $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host
 
+PACKAGE_SUFFIX:=$(if $(CONFIG_USE_APK),apk,ipk)
+
 all: compile
 
 $(BIN_DIR)/$(IB_NAME).tar.zst: clean
@@ -35,18 +37,21 @@ $(BIN_DIR)/$(IB_NAME).tar.zst: clean
 		$(INCLUDE_DIR) $(SCRIPT_DIR) \
 		$(TOPDIR)/rules.mk \
 		./files/Makefile \
-		./files/repositories.conf \
 		$(TMP_DIR)/.targetinfo \
 		$(TMP_DIR)/.packageinfo \
 		$(PKG_BUILD_DIR)/
 
+	$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
+
 ifeq ($(CONFIG_IB_STANDALONE),)
+ifneq ($(CONFIG_USE_APK),)
+	$(call FeedSourcesAppendAPK,$(PKG_BUILD_DIR)/repositories)
+	$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories
+else
 	echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
-	$(call FeedSourcesAppend,$(PKG_BUILD_DIR)/repositories.conf)
+	$(call FeedSourcesAppendOPKG,$(PKG_BUILD_DIR)/repositories.conf)
 	$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf
-endif
 
-	$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
 	# create an empty package index so `opkg` doesn't report an error
 	touch $(PKG_BUILD_DIR)/packages/Packages
 	$(INSTALL_DATA) ./files/README.md $(PKG_BUILD_DIR)/packages/
@@ -54,28 +59,32 @@ endif
 	echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
 	echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf
 	echo 'src imagebuilder file:packages'                          >> $(PKG_BUILD_DIR)/repositories.conf
+endif
+endif
 
 ifeq ($(CONFIG_BUILDBOT),)
   ifeq ($(CONFIG_IB_STANDALONE),)
 	$(FIND) $(call FeedPackageDir,libc) -type f \
-		\( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' -or -name 'kmod-*.ipk' \) \
+		\( -name 'libc_*.$(PACKAGE_SUFFIX)' -or -name 'kernel_*.$(PACKAGE_SUFFIX)' -or -name 'kmod-*.$(PACKAGE_SUFFIX)' \) \
 		-exec $(CP) -t $(PKG_BUILD_DIR)/packages {} +
   else
-	$(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.ipk' \
+	$(FIND) $(wildcard $(PACKAGE_SUBDIRS)) -type f -name '*.$(PACKAGE_SUFFIX)' \
 		-exec $(CP) -t $(PKG_BUILD_DIR)/packages/ {} +
   endif
 else
 	$(FIND) $(call FeedPackageDir,libc) -type f \
-		\( -name 'libc_*.ipk' -or -name 'kernel_*.ipk' \) \
+		\( -name 'libc_*.$(PACKAGE_SUFFIX)' -or -name 'kernel_*.$(PACKAGE_SUFFIX)' \) \
 		-exec $(CP) -t $(IB_LDIR)/ {} +
 endif
 
+ifneq ($(CONFIG_USE_APK),y)
 ifneq ($(CONFIG_SIGNATURE_CHECK),)
 	echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
 	echo 'option check_signature'                                  >> $(PKG_BUILD_DIR)/repositories.conf
 	$(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
 	$(CP) -L $(STAGING_DIR_ROOT)/etc/opkg/keys/ $(PKG_BUILD_DIR)/
 	$(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
+endif
 endif
 
 	$(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 78a75e96a8..c032306c8e 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -85,6 +85,8 @@ help: FORCE
 # override variables from rules.mk
 PACKAGE_DIR:=$(TOPDIR)/packages
 LISTS_DIR:=$(subst $(space),/,$(patsubst %,..,$(subst /,$(space),$(TARGET_DIR))))$(DL_DIR)
+PACKAGE_DIR_ALL:=$(TOPDIR)/packages
+
 export OPKG_KEYS:=$(TOPDIR)/keys
 OPKG:=$(call opkg,$(TARGET_DIR)) \
 	-f $(TOPDIR)/repositories.conf \
@@ -92,6 +94,11 @@ OPKG:=$(call opkg,$(TARGET_DIR)) \
 	--cache $(DL_DIR) \
 	--lists-dir $(LISTS_DIR)
 
+APK:=$(call apk,$(TARGET_DIR)) \
+	--cache-dir $(DL_DIR) \
+	--allow-untrusted
+
+
 include $(INCLUDE_DIR)/target.mk
 -include .profiles.mk
 
@@ -152,20 +159,25 @@ _call_manifest: FORCE
 	mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
 	$(MAKE) package_reload >/dev/null
 	$(MAKE) package_install >/dev/null
-	$(OPKG) list-installed $(if $(STRIP_ABI),--strip-abi)
+	$(APK) list --quiet --manifest --no-network
 
 package_index: FORCE
 	@echo >&2
 	@echo Building package index... >&2
 	@mkdir -p $(TMP_DIR) $(TARGET_DIR)/tmp
+ifeq ($(CONFIG_USE_APK),)
 	(cd $(PACKAGE_DIR); $(SCRIPT_DIR)/ipkg-make-index.sh . > Packages && \
 		gzip -9nc Packages > Packages.gz; \
 		$(if $(CONFIG_SIGNATURE_CHECK), \
 			$(STAGING_DIR_HOST)/bin/usign -S -m Packages -s $(BUILD_KEY)) \
 	) >/dev/null 2>/dev/null
 	$(OPKG) update >&2 || true
+else
+	(cd $(PACKAGE_DIR); $(APK) mkndx --output packages.adb *.apk) >&2
+endif
 
 package_reload:
+ifeq ($(CONFIG_USE_APK),)
 	if [ -d "$(PACKAGE_DIR)" ] && ( \
 			[ ! -f "$(PACKAGE_DIR)/Packages" ] || \
 			[ ! -f "$(PACKAGE_DIR)/Packages.gz" ] || \
@@ -176,29 +188,48 @@ package_reload:
 		mkdir -p $(TARGET_DIR)/tmp; \
 		$(OPKG) update >&2 || true; \
 	fi
+else
+	if [ -d "$(PACKAGE_DIR)" ] && ( \
+			[ ! -f "$(PACKAGE_DIR)/packages.adb" ] || \
+			[ "`find $(PACKAGE_DIR) -cnewer $(PACKAGE_DIR)/packages.adb`" ] ); then \
+		echo "Package list missing or not up-to-date, generating it." >&2 ;\
+		$(MAKE) package_index; \
+	else \
+		mkdir -p $(TARGET_DIR)/tmp; \
+		$(APK) update >&2 || true; \
+	fi
+endif
 
 package_list: FORCE
 	@$(MAKE) -s package_reload
-	@$(OPKG) list --size 2>/dev/null
+	@$(APK) list --size 2>/dev/null
 
 package_install: FORCE
 	@echo
 	@echo Installing packages...
+ifeq ($(CONFIG_USE_APK),)
 	$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/libc_*.ipk $(PACKAGE_DIR)/libc_*.ipk))
 	$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
 	$(OPKG) install $(BUILD_PACKAGES)
+else
+	$(APK) add --initdb --no-scripts $(firstword $(wildcard $(LINUX_DIR)/libc-*.apk $(PACKAGE_DIR)/libc_*.apk))
+	$(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/kernel-*.apk $(PACKAGE_DIR)/kernel_*.apk))
+	$(APK) add --no-scripts $(BUILD_PACKAGES)
+endif
 
 prepare_rootfs: FORCE
 	@echo
 	@echo Finalizing root filesystem...
 
 	$(CP) $(TARGET_DIR) $(TARGET_DIR_ORIG)
+ifeq ($(CONFIG_USE_APK),)
 	$(if $(CONFIG_SIGNATURE_CHECK), \
 		$(if $(ADD_LOCAL_KEY), \
 			OPKG_KEYS=$(TARGET_DIR)/etc/opkg/keys/ \
 			$(SCRIPT_DIR)/opkg-key add $(BUILD_KEY).pub \
 		) \
 	)
+endif
 	$(call prepare_rootfs,$(TARGET_DIR),$(USER_FILES),$(DISABLED_SERVICES))
 
 build_image: FORCE
@@ -245,6 +276,9 @@ ifneq ($(PROFILE),)
 endif
 
 _check_keys: FORCE
+ifeq ($(CONFIG_USE_APK),)
+	# TODO
+else
 ifneq ($(CONFIG_SIGNATURE_CHECK),)
 	@if [ ! -s $(BUILD_KEY) -o ! -s $(BUILD_KEY).pub ]; then \
 		echo Generate local signing keys... >&2; \
@@ -260,6 +294,7 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
 			-s $(BUILD_KEY); \
 	fi
 endif
+endif
 
 image:
 	$(MAKE) -s _check_profile
@@ -287,7 +322,11 @@ ifeq ($(PACKAGE),)
 	@exit 1
 endif
 	@$(MAKE) -s package_reload
-	@$(OPKG) whatdepends -A $(PACKAGE)
+ifeq ($(CONFIG_USE_APK),)
+	@$(OPKG) list --depends $(PACKAGE)
+else
+	@$(APK) list --depends $(PACKAGE)
+endif
 
 package_depends: FORCE
 ifeq ($(PACKAGE),)
@@ -295,7 +334,10 @@ ifeq ($(PACKAGE),)
 	@exit 1
 endif
 	@$(MAKE) -s package_reload
+ifeq ($(CONFIG_USE_APK),)
 	@$(OPKG) depends -A $(PACKAGE)
-
+else
+	@$(OPKG) whatdepends -A $(PACKAGE)
+endif
 
 .SILENT: help info image manifest package_whatdepends package_depends



From lede-commits at lists.infradead.org  Fri May 17 13:35:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 17 May 2024 16:35:54 -0400
Subject: [openwrt/openwrt]  base-files: correctly split install-key function
 for APK
In-Reply-To: <171597815464.496702.13633439894627790025@git-01.infra.openwrt.org>
References: <171597815464.496702.13633439894627790025@git-01.infra.openwrt.org>
Message-ID: <mailman.36812.1715978161.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a96354bcfb0ad1c0deccbfdb3264c149447d474b

commit a96354bcfb0ad1c0deccbfdb3264c149447d474b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 17 23:32:00 2024 +0300

    base-files: correctly split install-key function for APK
    
    The function incorrectly tried to APK keys even if there were none.
    Correctly separate it into its own `ifdef` section.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    Link: https://github.com/openwrt/openwrt/pull/15519
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/base-files/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index c42e2d9dd4..0aa7ecd854 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -122,6 +122,13 @@ ifneq ($(CONFIG_USE_APK),)
 		$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
 		$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
   endef
+
+ifndef CONFIG_BUILDBOT
+  define Package/base-files/install-key
+	mkdir -p $(1)/etc/apk/keys
+	$(CP) $(BUILD_KEY_APK_PUB) $(1)/etc/apk/keys/
+  endef
+endif
 else
 ifdef CONFIG_SIGNED_PACKAGES
   define Build/Configure
@@ -137,10 +144,6 @@ ifndef CONFIG_BUILDBOT
   define Package/base-files/install-key
 	mkdir -p $(1)/etc/opkg/keys
 	$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
-
-	mkdir -p $(1)/etc/apk/keys
-	$(CP) $(BUILD_KEY_APK_PUB) $(1)/etc/apk/keys/
-
   endef
 endif
 endif



From lede-commits at lists.infradead.org  Sat May 18 05:58:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 18 May 2024 08:58:58 -0400
Subject: [openwrt/openwrt]  mt76: fix mt7603 compilation
In-Reply-To: <171603713883.3231659.13727118428244930987@git-01.infra.openwrt.org>
References: <171603713883.3231659.13727118428244930987@git-01.infra.openwrt.org>
Message-ID: <mailman.36856.1716037147.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a9e117e03faa53f17598b548f9a245f2ac3b52c1

commit a9e117e03faa53f17598b548f9a245f2ac3b52c1
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Sat May 18 14:56:58 2024 +0200

    mt76: fix mt7603 compilation
    
    This fixes:
    mt7603/dma.c: In function 'mt7603_rx_loopback_skb':
    mt7603/dma.c:60:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
    
    Fixes: 2568b30285ff ("mt76: backport mt7603 fixes important for its stability")
    Fixes: https://github.com/openwrt/openwrt/issues/15510
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       |  2 +-
 ...76-mt7603-fix-mixed-declarations-and-code.patch | 33 ++++++++++++++++++++++
 2 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 22269277da..9957c99999 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=2
+PKG_RELEASE=3
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
diff --git a/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch
new file mode 100644
index 0000000000..92befe4afa
--- /dev/null
+++ b/package/kernel/mt76/patches/0009-mt76-mt7603-fix-mixed-declarations-and-code.patch
@@ -0,0 +1,33 @@
+From 513c131c6309712a51502870b041f45b4bd6a6d4 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 17 May 2024 13:51:22 +0200
+Subject: [PATCH] mt76: mt7603: fix mixed declarations and code
+
+Move the qid variable declaration further up
+
+Fixes: b473c0e47f04 ("wifi: mt76: mt7603: fix tx queue of loopback packets")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ mt7603/dma.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/mt7603/dma.c
++++ b/mt7603/dma.c
+@@ -29,7 +29,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev
+ 	struct ieee80211_sta *sta;
+ 	struct mt7603_sta *msta;
+ 	struct mt76_wcid *wcid;
+-	u8 tid = 0, hwq = 0;
++	u8 qid, tid = 0, hwq = 0;
+ 	void *priv;
+ 	int idx;
+ 	u32 val;
+@@ -57,7 +57,7 @@ mt7603_rx_loopback_skb(struct mt7603_dev
+ 	if (ieee80211_is_data_qos(hdr->frame_control)) {
+ 		tid = *ieee80211_get_qos_ctl(hdr) &
+ 			 IEEE80211_QOS_CTL_TAG1D_MASK;
+-		u8 qid = tid_to_ac[tid];
++		qid = tid_to_ac[tid];
+ 		hwq = wmm_queue_map[qid];
+ 		skb_set_queue_mapping(skb, qid);
+ 	} else if (ieee80211_is_data(hdr->frame_control)) {



From lede-commits at lists.infradead.org  Sat May 18 06:32:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 18 May 2024 09:32:28 -0400
Subject: [openwrt/openwrt]  apk: update to latest HEAD 2024-05-18
In-Reply-To: <171603914869.3370064.8978423131129704278@git-01.infra.openwrt.org>
References: <171603914869.3370064.8978423131129704278@git-01.infra.openwrt.org>
Message-ID: <mailman.36857.1716039154.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/99636d4dd8d4bda15b9e072d2d92dd5f4ae0580f

commit 99636d4dd8d4bda15b9e072d2d92dd5f4ae0580f
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sat May 18 16:29:07 2024 +0300

    apk: update to latest HEAD 2024-05-18
    
    Drop downstream mbedtls patch since it went upstream.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    Link: https://github.com/openwrt/openwrt/pull/15522
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/system/apk/Makefile                        |   6 +-
 .../system/apk/patches/0002-mbedtls-support.patch  | 715 ---------------------
 2 files changed, 3 insertions(+), 718 deletions(-)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
index 7aaf9f4c5e..332596719f 100644
--- a/package/system/apk/Makefile
+++ b/package/system/apk/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-04-16
-PKG_SOURCE_VERSION:=ba6c31a5469ef74fb85119508e55de9631ffef41
-PKG_MIRROR_HASH:=3455d5799481add9ece3db685576d58be6303f3a13140133979b965cbd3c9966
+PKG_SOURCE_DATE:=2024-05-18
+PKG_SOURCE_VERSION:=a6ce0a1be1a42a5cf4136eb0db5ea95168ee73fe
+PKG_MIRROR_HASH:=a5f59907cd742ec12f31f42910ea9a6ecfaf91e18218a7888836a01cfa272a72
 
 PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
 
diff --git a/package/system/apk/patches/0002-mbedtls-support.patch b/package/system/apk/patches/0002-mbedtls-support.patch
deleted file mode 100644
index d06db30f03..0000000000
--- a/package/system/apk/patches/0002-mbedtls-support.patch
+++ /dev/null
@@ -1,715 +0,0 @@
-From 68352e0cb94fe08b220d4befec828171ec871154 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras at iki.fi>
-Date: Fri, 5 Apr 2024 12:06:56 +0300
-Subject: [PATCH 1/2] add alternate url wget implementation
-
----
- meson.build       |   6 +-
- meson_options.txt |   1 +
- src/io_url_wget.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
- src/meson.build   |   8 ++-
- 4 files changed, 150 insertions(+), 2 deletions(-)
- create mode 100644 src/io_url_wget.c
-
-diff --git a/meson.build b/meson.build
-index 1a44c11f..9a14cac0 100644
---- a/meson.build
-+++ b/meson.build
-@@ -33,6 +33,10 @@ subproject = meson.is_subproject()
- 
- subdir('doc')
- subdir('portability')
--subdir('libfetch')
-+if get_option('url_backend') == 'libfetch'
-+	subdir('libfetch')
-+else
-+	libfetch_dep = dependency('', required: false)
-+endif
- subdir('src')
- subdir('tests')
-diff --git a/meson_options.txt b/meson_options.txt
-index 693f46ec..44b88b32 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -5,5 +5,6 @@ option('help', description: 'Build help into apk binaries, needs lua', type: 'fe
- option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
- option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
- option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
-+option('url_backend', description: 'URL backend', type: 'string', value: 'libfetch')
- option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
- option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
-diff --git a/src/io_url_wget.c b/src/io_url_wget.c
-new file mode 100644
-index 00000000..d8885a4f
---- /dev/null
-+++ b/src/io_url_wget.c
-@@ -0,0 +1,137 @@
-+/* io_url_wget.c - Alpine Package Keeper (APK)
-+ *
-+ * Copyright (C) 2005-2008 Natanael Copa <n at tanael.org>
-+ * Copyright (C) 2008-2011 Timo Ter?s <timo.teras at iki.fi>
-+ * All rights reserved.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0-only
-+ */
-+
-+#include <spawn.h>
-+#include <unistd.h>
-+#include <sys/wait.h>
-+#include "apk_io.h"
-+
-+static int wget_translate_status(int status)
-+{
-+	if (!WIFEXITED(status)) return -EFAULT;
-+	switch (WEXITSTATUS(status)) {
-+	case 0: return 0;
-+	case 3: return -EIO;
-+	case 4: return -ENETUNREACH;
-+	case 5: return -EACCES;
-+	case 6: return -EACCES;
-+	case 7: return -EPROTO;
-+	default: return -APKE_REMOTE_IO;
-+	}
-+}
-+
-+struct apk_wget_istream {
-+	struct apk_istream is;
-+	int fd;
-+	pid_t pid;
-+};
-+
-+static int wget_spawn(const char *url, pid_t *pid, int *fd)
-+{
-+	int r, pipefds[2];
-+	posix_spawn_file_actions_t act;
-+	char *argv[] = {
-+		(char*)"wget", "-q", (char*) url, "-O", "-", 0
-+	};
-+
-+	if (pipe2(pipefds, O_CLOEXEC) != 0) return -errno;
-+
-+	posix_spawn_file_actions_init(&act);
-+	posix_spawn_file_actions_adddup2(&act, pipefds[1], STDOUT_FILENO);
-+	r = posix_spawnp(pid, "wget", &act, 0, argv, environ);
-+	posix_spawn_file_actions_destroy(&act);
-+	if (r != 0) return -r;
-+	close(pipefds[1]);
-+	*fd = pipefds[0];
-+	return 0;
-+}
-+
-+static int wget_check_exit(struct apk_wget_istream *wis)
-+{
-+	int status;
-+
-+	if (wis->pid == 0) return apk_istream_error(&wis->is, 0);
-+	if (waitpid(wis->pid, &status, 0) == wis->pid) {
-+		wis->pid = 0;
-+		return apk_istream_error(&wis->is, wget_translate_status(status));
-+	}
-+	return 0;
-+}
-+
-+static void wget_get_meta(struct apk_istream *is, struct apk_file_meta *meta)
-+{
-+}
-+
-+static ssize_t wget_read(struct apk_istream *is, void *ptr, size_t size)
-+{
-+	struct apk_wget_istream *wis = container_of(is, struct apk_wget_istream, is);
-+	ssize_t r;
-+
-+	r = read(wis->fd, ptr, size);
-+	if (r < 0) return -errno;
-+	if (r == 0) return wget_check_exit(wis);
-+	return r;
-+}
-+
-+static int wget_close(struct apk_istream *is)
-+{
-+	int r = is->err;
-+	struct apk_wget_istream *wis = container_of(is, struct apk_wget_istream, is);
-+
-+	while (wis->pid != 0)
-+		wget_check_exit(wis);
-+
-+	close(wis->fd);
-+	free(wis);
-+	return r < 0 ? r : 0;
-+}
-+
-+static const struct apk_istream_ops wget_istream_ops = {
-+	.get_meta = wget_get_meta,
-+	.read = wget_read,
-+	.close = wget_close,
-+};
-+
-+struct apk_istream *apk_io_url_istream(const char *url, time_t since)
-+{
-+	struct apk_wget_istream *wis;
-+	int r;
-+
-+	wis = malloc(sizeof(*wis) + apk_io_bufsize);
-+	if (wis == NULL) return ERR_PTR(-ENOMEM);
-+
-+	*wis = (struct apk_wget_istream) {
-+		.is.ops = &wget_istream_ops,
-+		.is.buf = (uint8_t *)(wis + 1),
-+		.is.buf_size = apk_io_bufsize,
-+	};
-+	r = wget_spawn(url, &wis->pid, &wis->fd);
-+	if (r != 0) {
-+		free(wis);
-+		return ERR_PTR(r);
-+	}
-+
-+	return &wis->is;
-+}
-+
-+void apk_io_url_no_check_certificate(void)
-+{
-+}
-+
-+void apk_io_url_set_timeout(int timeout)
-+{
-+}
-+
-+void apk_io_url_set_redirect_callback(void (*cb)(int, const char *))
-+{
-+}
-+
-+void apk_io_url_init(void)
-+{
-+}
-diff --git a/src/meson.build b/src/meson.build
-index c1aae550..28bfce7e 100644
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -22,7 +22,6 @@ libapk_src = [
- 	'fs_uvol.c',
- 	'hash.c',
- 	'io.c',
--	'io_url_libfetch.c',
- 	'io_gunzip.c',
- 	'package.c',
- 	'pathbuilder.c',
-@@ -87,6 +86,13 @@ apk_src = [
- 	'applet.c',
- ]
- 
-+url_backend = get_option('url_backend')
-+if url_backend == 'libfetch'
-+	libapk_src += [	'io_url_libfetch.c' ]
-+elif url_backend == 'wget'
-+	libapk_src += [	'io_url_wget.c' ]
-+endif
-+
- if lua_bin.found()
- 	genhelp_script = files('genhelp.lua')
- 	genhelp_args = [lua_bin, genhelp_script, '@INPUT@']
--- 
-GitLab
-
-
-From dc7ff789a45522eb847118a29b60b896de55d083 Mon Sep 17 00:00:00 2001
-From: Jonas Jelonek <jelonek.jonas at gmail.com>
-Date: Sun, 14 Apr 2024 00:20:14 +0200
-Subject: [PATCH 2/2] crypto: add support for mbedtls as backend
-
-backend is selected at compile-time with crypto_backend option
-
-Co-developed-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
----
- libfetch/meson.build     |   2 +-
- meson.build              |  14 +-
- meson_options.txt        |   1 +
- src/apk_crypto.h         |   5 +
- src/apk_crypto_mbedtls.h |  26 ++++
- src/crypto_mbedtls.c     | 305 +++++++++++++++++++++++++++++++++++++++
- src/meson.build          |  23 ++-
- 7 files changed, 364 insertions(+), 12 deletions(-)
- create mode 100644 src/apk_crypto_mbedtls.h
- create mode 100644 src/crypto_mbedtls.c
-
-diff --git a/libfetch/meson.build b/libfetch/meson.build
-index 431ba197..e24f95eb 100644
---- a/libfetch/meson.build
-+++ b/libfetch/meson.build
-@@ -40,7 +40,7 @@ libfetch = static_library(
- 	c_args: libfetch_cargs,
- 	dependencies: [
- 		libportability_dep.partial_dependency(compile_args: true, includes: true),
--		openssl_dep.partial_dependency(compile_args: true, includes: true)
-+		crypto_dep.partial_dependency(compile_args: true, includes: true)
- 	],
- )
- 
-diff --git a/meson.build b/meson.build
-index 9a14cac0..3a83f4e1 100644
---- a/meson.build
-+++ b/meson.build
-@@ -13,15 +13,21 @@ apk_libdir = get_option('libdir')
- lua_bin = find_program('lua' + get_option('lua_version'), required: get_option('help'))
- lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lua'))
- scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
--openssl_dep = dependency('openssl')
--openssl_static_dep = dependency('openssl', static: true)
- zlib_dep = dependency('zlib')
- zlib_static_dep = dependency('zlib', static: true)
- libzstd_dep = dependency('libzstd', required: get_option('zstd'))
- libzstd_static_dep = dependency('libzstd', required: get_option('zstd'), static: true)
- 
--shared_deps = [ openssl_dep, zlib_dep, libzstd_dep ]
--static_deps = [ openssl_static_dep, zlib_static_dep, libzstd_static_dep ]
-+if get_option('crypto_backend') == 'openssl'
-+	crypto_dep = dependency('openssl')
-+	crypto_static_dep = dependency('openssl', static: true)
-+elif get_option('crypto_backend') == 'mbedtls'
-+	crypto_dep = [ dependency('mbedtls'), dependency('mbedcrypto') ]
-+	crypto_static_dep = [ dependency('mbedtls', static: true), dependency('mbedcrypto', static: true) ]
-+endif
-+
-+shared_deps = [ crypto_dep, zlib_dep, libzstd_dep ]
-+static_deps = [ crypto_static_dep, zlib_static_dep, libzstd_static_dep ]
- 
- add_project_arguments('-D_GNU_SOURCE', language: 'c')
- 
-diff --git a/meson_options.txt b/meson_options.txt
-index 44b88b32..2b1d24ce 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -5,6 +5,7 @@ option('help', description: 'Build help into apk binaries, needs lua', type: 'fe
- option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
- option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
- option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
-+option('crypto_backend', description: 'SSL backend', type: 'string', value: 'openssl')
- option('url_backend', description: 'URL backend', type: 'string', value: 'libfetch')
- option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
- option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
-diff --git a/src/apk_crypto.h b/src/apk_crypto.h
-index 7de88dfc..5cae3bfe 100644
---- a/src/apk_crypto.h
-+++ b/src/apk_crypto.h
-@@ -12,7 +12,12 @@
- #include <string.h>
- #include "apk_defines.h"
- #include "apk_blob.h"
-+
-+#if defined(CRYPTO_USE_OPENSSL)
- #include "apk_crypto_openssl.h"
-+#elif defined(CRYPTO_USE_MBEDTLS)
-+#include "apk_crypto_mbedtls.h"
-+#endif
- 
- // Digest
- 
-diff --git a/src/apk_crypto_mbedtls.h b/src/apk_crypto_mbedtls.h
-new file mode 100644
-index 00000000..e379535b
---- /dev/null
-+++ b/src/apk_crypto_mbedtls.h
-@@ -0,0 +1,26 @@
-+/* apk_crypto_mbedtls.h - Alpine Package Keeper (APK)
-+ *
-+ * Copyright (C) 2024
-+ * All rights reserved.
-+ *
-+ * SPDX-License-Identifier: GPL-2.0-only
-+ */
-+
-+#ifndef APK_CRYPTO_MBEDTLS_H
-+#define APK_CRYPTO_MBEDTLS_H
-+
-+#include <mbedtls/md.h>
-+#include <mbedtls/pk.h>
-+
-+struct apk_pkey {
-+	uint8_t id[16];
-+	mbedtls_pk_context *key;
-+};
-+
-+struct apk_digest_ctx {
-+	mbedtls_md_context_t *mdctx;
-+	struct apk_pkey *sigver_key;
-+	uint8_t alg;
-+};
-+
-+#endif
-diff --git a/src/crypto_mbedtls.c b/src/crypto_mbedtls.c
-new file mode 100644
-index 00000000..9ce148b5
---- /dev/null
-+++ b/src/crypto_mbedtls.c
-@@ -0,0 +1,305 @@
-+#include <errno.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <fcntl.h>
-+#include <sys/random.h>
-+
-+#include <mbedtls/platform.h>
-+#include <mbedtls/md.h>
-+#include <mbedtls/pk.h>
-+#include <mbedtls/entropy.h>
-+#include <psa/crypto.h>
-+
-+#include "apk_crypto.h"
-+
-+static inline const mbedtls_md_type_t apk_digest_alg_to_mbedtls_type(uint8_t alg) {
-+	switch (alg) {
-+	case APK_DIGEST_NONE:	return MBEDTLS_MD_NONE;
-+	case APK_DIGEST_MD5:	return MBEDTLS_MD_MD5;
-+	case APK_DIGEST_SHA1:	return MBEDTLS_MD_SHA1;
-+	case APK_DIGEST_SHA256_160:
-+	case APK_DIGEST_SHA256:	return MBEDTLS_MD_SHA256;
-+	case APK_DIGEST_SHA512:	return MBEDTLS_MD_SHA512;
-+	default:
-+		assert(alg);
-+		return MBEDTLS_MD_NONE;
-+	}
-+}
-+
-+static inline const mbedtls_md_info_t *apk_digest_alg_to_mdinfo(uint8_t alg)
-+{
-+	return mbedtls_md_info_from_type(
-+		apk_digest_alg_to_mbedtls_type(alg)
-+	);
-+}
-+
-+int apk_digest_calc(struct apk_digest *d, uint8_t alg, const void *ptr, size_t sz)
-+{
-+	if (mbedtls_md(apk_digest_alg_to_mdinfo(alg), ptr, sz, d->data))
-+		return -APKE_CRYPTO_ERROR;
-+
-+	apk_digest_set(d, alg);
-+	return 0;
-+}
-+
-+int apk_digest_ctx_init(struct apk_digest_ctx *dctx, uint8_t alg)
-+{
-+	dctx->alg = alg;
-+	dctx->mdctx = malloc(sizeof(mbedtls_md_context_t));
-+
-+	if (!dctx->mdctx) return -ENOMEM;
-+
-+	mbedtls_md_init(dctx->mdctx);
-+	if (alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_setup(dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
-+		mbedtls_md_starts(dctx->mdctx))
-+		return -APKE_CRYPTO_ERROR;
-+
-+	return 0;
-+}
-+
-+int apk_digest_ctx_reset(struct apk_digest_ctx *dctx)
-+{
-+	if (dctx->alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_starts(dctx->mdctx)) return -APKE_CRYPTO_ERROR;
-+	return 0;
-+}
-+
-+int apk_digest_ctx_reset_alg(struct apk_digest_ctx *dctx, uint8_t alg)
-+{
-+	mbedtls_md_free(dctx->mdctx);
-+
-+	dctx->alg = alg;
-+	if (alg == APK_DIGEST_NONE) return 0;
-+	if (mbedtls_md_setup(dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
-+		mbedtls_md_starts(dctx->mdctx))
-+		return -APKE_CRYPTO_ERROR;
-+	
-+	return 0;
-+}
-+
-+void apk_digest_ctx_free(struct apk_digest_ctx *dctx)
-+{
-+	free(dctx->mdctx);
-+	dctx->mdctx = 0;
-+}
-+
-+int apk_digest_ctx_update(struct apk_digest_ctx *dctx, const void *ptr, size_t sz)
-+{
-+	if (dctx->alg == APK_DIGEST_NONE) return 0;
-+	return mbedtls_md_update(dctx->mdctx, ptr, sz) == 0 ? 0 : -APKE_CRYPTO_ERROR;
-+}
-+
-+int apk_digest_ctx_final(struct apk_digest_ctx *dctx, struct apk_digest *d)
-+{
-+	if (mbedtls_md_finish(dctx->mdctx, d->data)) {
-+		apk_digest_reset(d);
-+		return -APKE_CRYPTO_ERROR;
-+	}
-+
-+	mbedtls_md_free(dctx->mdctx);
-+
-+	d->alg = dctx->alg;
-+	d->len = apk_digest_alg_len(d->alg);
-+	return 0;
-+}
-+
-+// Entropy function adopted from ustream-ssl to avoid using the bloated mbedtls'
-+// mbedtls_entropy_context and mbedtls_ctr_drbg_context.
-+static int _apk_random(void *ctx, unsigned char *out, size_t len)
-+{
-+	static FILE *f;
-+
-+	if (!f)
-+		f = fopen("/dev/urandom", "r");
-+	if (fread(out, len, 1, f) != 1)
-+		return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED;
-+
-+	return 0;
-+}
-+
-+// adopted from mbedtls_pk_load_file
-+static int apk_load_file_fd(int fd, unsigned char **buf, size_t *n)
-+{
-+	FILE *f;
-+	long size;
-+
-+	if ((f = fdopen(fd, "rb")) == NULL) {
-+		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
-+	}
-+
-+#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
-+	/* Ensure no stdio buffering of secrets, as such buffers cannot be wiped. */
-+	mbedtls_setbuf(f, NULL);
-+#endif
-+
-+	fseek(f, 0, SEEK_END);
-+	if ((size = ftell(f)) == -1) {
-+		fclose(f);
-+		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
-+	}
-+	fseek(f, 0, SEEK_SET);
-+
-+	*n = (size_t) size;
-+
-+	if (*n + 1 == 0 ||
-+		(*buf = mbedtls_calloc(1, *n + 1)) == NULL) {
-+		fclose(f);
-+		return MBEDTLS_ERR_PK_ALLOC_FAILED;
-+	}
-+
-+	if (fread(*buf, 1, *n, f) != *n) {
-+		fclose(f);
-+
-+		mbedtls_platform_zeroize(*buf, *n);
-+		mbedtls_free(*buf);
-+
-+		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
-+	}
-+
-+	fclose(f);
-+
-+	(*buf)[*n] = '\0';
-+
-+	if (strstr((const char *) *buf, "-----BEGIN ") != NULL) {
-+		++*n;
-+	}
-+
-+	return 0;
-+}
-+
-+static int apk_pkey_init(struct apk_pkey *pkey, mbedtls_pk_context *key)
-+{
-+	unsigned char dig[APK_DIGEST_MAX_LENGTH], *pub = NULL;
-+	unsigned char *c;
-+	int len, publen, r = -APKE_CRYPTO_ERROR;
-+
-+	// Assume byte len is always * 2 + NULL terminated
-+	publen = mbedtls_pk_get_len(key) * 2 + 1;
-+	pub = malloc(publen);
-+	if (!pub)
-+		return -ENOMEM;
-+	c = pub + publen;
-+
-+	if ((len = mbedtls_pk_write_pubkey(&c, pub, key)) < 0) return -APKE_CRYPTO_ERROR;
-+	if (!mbedtls_md(apk_digest_alg_to_mdinfo(APK_DIGEST_SHA512), pub, len, dig)) {
-+		memcpy(pkey->id, dig, sizeof pkey->id);
-+		r = 0;
-+	}
-+ 
-+	free(pub);
-+	pkey->key = key;
-+ 
-+	return r;
-+}
-+
-+void apk_pkey_free(struct apk_pkey *pkey)
-+{
-+	mbedtls_pk_free(pkey->key);
-+}
-+
-+int apk_pkey_load(struct apk_pkey *pkey, int dirfd, const char *fn)
-+{
-+	mbedtls_pk_context *key;
-+	unsigned char *buf;
-+	size_t blen;
-+	int ret, fd;
-+
-+	fd = openat(dirfd, fn, O_RDONLY|O_CLOEXEC);
-+	if (fd < 0)
-+		return -errno;
-+
-+	key = malloc(sizeof *key);
-+	if (!key)
-+		return -ENOMEM;
-+	
-+	mbedtls_pk_init(key);
-+	if (apk_load_file_fd(fd, &buf, &blen))
-+		return -APKE_CRYPTO_ERROR;
-+
-+	if ((ret = mbedtls_pk_parse_public_key(key, buf, blen)) != 0) {
-+#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
-+		ret = mbedtls_pk_parse_key(key, buf, blen, NULL, 0, _apk_random, NULL);
-+#else
-+		ret = mbedtls_pk_parse_key(key, buf, blen, NULL, 0);
-+#endif
-+	}
-+	mbedtls_platform_zeroize(buf, blen);
-+	mbedtls_free(buf);
-+	if (ret != 0)
-+		return -APKE_CRYPTO_KEY_FORMAT;
-+
-+	return apk_pkey_init(pkey, key);
-+}
-+
-+int apk_sign_start(struct apk_digest_ctx *dctx, uint8_t alg, struct apk_pkey *pkey)
-+{
-+	if (apk_digest_ctx_reset_alg(dctx, alg))
-+		return -APKE_CRYPTO_ERROR;
-+
-+	dctx->sigver_key = pkey;
-+
-+	return 0;
-+}
-+
-+int apk_sign(struct apk_digest_ctx *dctx, void *sig, size_t *len)
-+{
-+	struct apk_digest dig;
-+	int r = 0;
-+
-+	if (apk_digest_ctx_final(dctx, &dig))
-+		return -APKE_SIGNATURE_GEN_FAILURE;
-+#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)	
-+	if (mbedtls_pk_sign(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
-+						&dig.data, dig.len, sig, sizeof *sig, len, _apk_random, NULL))
-+#else
-+	if (mbedtls_pk_sign(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
-+						&dig.data, dig.len, sig, len, _apk_random, NULL))
-+#endif
-+		r = -APKE_SIGNATURE_GEN_FAILURE;
-+
-+
-+	dctx->sigver_key = NULL;
-+	return r;
-+}
-+
-+int apk_verify_start(struct apk_digest_ctx *dctx, uint8_t alg, struct apk_pkey *pkey)
-+{
-+	if (apk_digest_ctx_reset_alg(dctx, alg))
-+		return -APKE_CRYPTO_ERROR;
-+
-+	dctx->sigver_key = pkey;
-+
-+	return 0;
-+}
-+
-+int apk_verify(struct apk_digest_ctx *dctx, void *sig, size_t len)
-+{
-+	struct apk_digest dig;
-+	int r = 0;
-+
-+	if (apk_digest_ctx_final(dctx, &dig))
-+		return -APKE_SIGNATURE_GEN_FAILURE;
-+
-+	if (mbedtls_pk_verify(dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg), &dig.data, dig.len, sig, len))
-+		r = -APKE_SIGNATURE_INVALID;
-+
-+	dctx->sigver_key = NULL;
-+	return r;
-+}
-+
-+static void apk_crypto_cleanup(void)
-+{
-+#ifdef MBEDTLS_PSA_CRYPTO_C
-+	mbedtls_psa_crypto_free();
-+#endif
-+}
-+
-+void apk_crypto_init(void)
-+{
-+	atexit(apk_crypto_cleanup);
-+	
-+#ifdef MBEDTLS_PSA_CRYPTO_C
-+	psa_crypto_init();
-+#endif
-+}
-diff --git a/src/meson.build b/src/meson.build
-index 28bfce7e..4eab6e0d 100644
---- a/src/meson.build
-+++ b/src/meson.build
-@@ -13,7 +13,6 @@ libapk_src = [
- 	'common.c',
- 	'context.c',
- 	'crypto.c',
--	'crypto_openssl.c',
- 	'ctype.c',
- 	'database.c',
- 	'extract_v2.c',
-@@ -37,7 +36,6 @@ libapk_headers = [
- 	'apk_atom.h',
- 	'apk_blob.h',
- 	'apk_crypto.h',
--	'apk_crypto_openssl.h',
- 	'apk_ctype.h',
- 	'apk_database.h',
- 	'apk_defines.h',
-@@ -86,6 +84,11 @@ apk_src = [
- 	'applet.c',
- ]
- 
-+apk_cargs = [
-+	'-DAPK_VERSION="' + meson.project_version() + '"',
-+	'-D_ATFILE_SOURCE',
-+]
-+
- url_backend = get_option('url_backend')
- if url_backend == 'libfetch'
- 	libapk_src += [	'io_url_libfetch.c' ]
-@@ -93,6 +96,17 @@ elif url_backend == 'wget'
- 	libapk_src += [	'io_url_wget.c' ]
- endif
- 
-+crypto_backend = get_option('crypto_backend')
-+if crypto_backend == 'openssl'
-+	apk_cargs += [ '-DCRYPTO_USE_OPENSSL' ]
-+	libapk_src += [ 'crypto_openssl.c' ]
-+	libapk_headers += [ 'apk_crypto_openssl.h' ]
-+elif crypto_backend == 'mbedtls'
-+	apk_cargs += [ '-DCRYPTO_USE_MBEDTLS' ]
-+	libapk_src += [ 'crypto_mbedtls.c' ]
-+	libapk_headers += [ 'apk_crypto_mbedtls.h' ]
-+endif
-+
- if lua_bin.found()
- 	genhelp_script = files('genhelp.lua')
- 	genhelp_args = [lua_bin, genhelp_script, '@INPUT@']
-@@ -119,11 +133,6 @@ endif
- 
- apk_src += [ generated_help ]
- 
--apk_cargs = [
--	'-DAPK_VERSION="' + meson.project_version() + '"',
--	'-D_ATFILE_SOURCE',
--]
--
- apk_arch_prefix = get_option('arch_prefix')
- if apk_arch_prefix != ''
- 	apk_cargs += ['-DAPK_ARCH_PREFIX="@0@"'.format(apk_arch_prefix)]
--- 
-GitLab
-



From lede-commits at lists.infradead.org  Sat May 18 13:15:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 18 May 2024 16:15:43 -0400
Subject: [openwrt/openwrt]  rootfs: fix USE_APK detection
In-Reply-To: <171606334306.112501.13369835622596631681@git-01.infra.openwrt.org>
References: <171606334306.112501.13369835622596631681@git-01.infra.openwrt.org>
Message-ID: <mailman.36878.1716063350.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/52a225cba41f72f0e38958a77bcbc5353ccaa731

commit 52a225cba41f72f0e38958a77bcbc5353ccaa731
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sat May 18 23:10:49 2024 +0300

    rootfs: fix USE_APK detection
    
    Due to missing quotes the script would wrongly assume APK to be enabled
    and don't run post install scripts, breaking pretty much everything.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/rootfs.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/rootfs.mk b/include/rootfs.mk
index eb4fa434a3..907a95a794 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -78,7 +78,7 @@ define prepare_rootfs
 	@mkdir -p $(1)/var/lock
 	@( \
 		cd $(1); \
-		if [ -n $(CONFIG_USE_APK) ]; then \
+		if [ -n "$(CONFIG_USE_APK)" ]; then \
 		$(STAGING_DIR_HOST)/bin/tar -xf ./lib/apk/db/scripts.tar --wildcards "*.post-install" -O > script.sh; \
 		chmod +x script.sh; \
 		IPKG_INSTROOT=$(1) $$(command -v bash) script.sh; \



From lede-commits at lists.infradead.org  Sun May 19 00:47:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 03:47:11 -0400
Subject: [openwrt/openwrt]  mediatek: add firmware name for AQR PHYs on
 mt7988a-rfb
In-Reply-To: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
References: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
Message-ID: <mailman.36908.1716104836.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ba245d6bca4724506c4003166fc768a906fca3fb

commit ba245d6bca4724506c4003166fc768a906fca3fb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri May 10 17:39:56 2024 +0200

    mediatek: add firmware name for AQR PHYs on mt7988a-rfb
    
    Fixes PHY probe in case there is no firmware in a connected EEPROM
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-aqr.dtso     | 1 +
 .../files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-aqr.dtso     | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-aqr.dtso b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-aqr.dtso
index d21a61ad19..c471b9ed91 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-aqr.dtso
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth1-aqr.dtso
@@ -22,6 +22,7 @@
 			phy0: ethernet-phy at 0 {
 				reg = <0>;
 				compatible = "ethernet-phy-ieee802.3-c45";
+				firmware-name = "AQR-G4_v5.7.0-AQR_EVB_Generic_X3410_StdCfg_MDISwap_USX_ID46316_VER2140.cld";
 				reset-gpios = <&pio 72 GPIO_ACTIVE_LOW>;
 				reset-assert-us = <100000>;
 				reset-deassert-us = <221000>;
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-aqr.dtso b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-aqr.dtso
index 140391fc45..1490f055b5 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-aqr.dtso
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-eth2-aqr.dtso
@@ -22,6 +22,7 @@
 			phy8: ethernet-phy at 8 {
 				reg = <8>;
 				compatible = "ethernet-phy-ieee802.3-c45";
+				firmware-name = "AQR-G4_v5.7.0-AQR_EVB_Generic_X3410_StdCfg_MDISwap_USX_ID46316_VER2140.cld";
 				reset-gpios = <&pio 71 GPIO_ACTIVE_LOW>;
 				reset-assert-us = <100000>;
 				reset-deassert-us = <221000>;



From lede-commits at lists.infradead.org  Sun May 19 00:47:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 03:47:10 -0400
Subject: [openwrt/openwrt]  mediatek: convert mt7988a-rfb to keep bl31/uboot
 in UBI
In-Reply-To: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
References: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
Message-ID: <mailman.36909.1716104838.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/59ac0440b160a007f2ad7a7e64af58be224de04e

commit 59ac0440b160a007f2ad7a7e64af58be224de04e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed May 8 13:40:14 2024 +0200

    mediatek: convert mt7988a-rfb to keep bl31/uboot in UBI
    
    Add ubi volumes for mt7988a-rfb and support for using factory data
    for Ethernet MAC addresses and MT7996 WLAN calibration data.
    Also add rootdisk handle. Removes the need to keep using nmbm
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...5-configs-add-usefull-stuff-to-mt7988-rfb.patch | 26 +++++++
 .../mediatek/mt7988a-rfb-spim-nand-factory.dtso    | 82 ++++++++++++++++++++++
 .../boot/dts/mediatek/mt7988a-rfb-spim-nand.dtso   | 49 ++++++++-----
 .../filogic/base-files/lib/upgrade/platform.sh     |  1 +
 target/linux/mediatek/image/filogic.mk             |  3 +-
 5 files changed, 141 insertions(+), 20 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
index 311a828a93..535af4fa09 100644
--- a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
+++ b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
@@ -315,3 +315,29 @@
  CONFIG_MMC_HS200_SUPPORT=y
  CONFIG_MMC_MTK=y
  CONFIG_MTD=y
+--- a/arch/arm/dts/mt7988-rfb.dts
++++ b/arch/arm/dts/mt7988-rfb.dts
+@@ -144,6 +144,23 @@
+ 		compatible = "spi-nand";
+ 		reg = <0>;
+ 		spi-max-frequency = <52000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition at 0 {
++				label = "bl2";
++				reg = <0x0 0x200000>;
++			};
++
++			partition at 200000 {
++				label = "ubi";
++				reg = <0x200000 0x7e00000>;
++				compatible = "linux,ubi";
++			};
++		};
+ 	};
+ };
+ 
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand-factory.dtso b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand-factory.dtso
new file mode 100644
index 0000000000..3fe75aca36
--- /dev/null
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand-factory.dtso
@@ -0,0 +1,82 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "mediatek,mt7988a-rfb", "mediatek,mt7988a";
+
+	fragment at 0 {
+		target = <&ubi_part>;
+
+		__overlay__ {
+			volumes {
+				ubi_factory: ubi-volume-factory {
+					volname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_wmac: eeprom at 0 {
+							reg = <0x0 0x1e00>;
+						};
+
+						gmac2_mac: eeprom at fffee {
+							reg = <0xfffee 0x6>;
+						};
+
+						gmac1_mac: eeprom at ffff4 {
+							reg = <0xffff4 0x6>;
+						};
+
+						gmac0_mac: eeprom at ffffa {
+							reg = <0xffffa 0x6>;
+						};
+					};
+				};
+			};
+		};
+	};
+
+	fragment at 1 {
+		target = <&pcie0>;
+		__overlay__ {
+			pcie at 0,0 {
+				reg = <0x0000 0 0 0 0>;
+
+				wifi at 0,0 {
+					compatible = "mediatek,mt76";
+					reg = <0x0000 0 0 0 0>;
+					nvmem-cell-names = "eeprom";
+					nvmem-cells = <&eeprom_wmac>;
+				};
+			};
+		};
+	};
+
+	fragment at 2 {
+		target = <&gmac0>;
+		__overlay__ {
+			nvmem-cell-names = "mac-address";
+			nvmem-cells = <&gmac0_mac>;
+		};
+	};
+
+	fragment at 3 {
+		target = <&gmac1>;
+		__overlay__ {
+			nvmem-cell-names = "mac-address";
+			nvmem-cells = <&gmac1_mac>;
+		};
+	};
+
+	fragment at 4 {
+		target = <&gmac2>;
+		__overlay__ {
+			nvmem-cell-names = "mac-address";
+			nvmem-cells = <&gmac2_mac>;
+		};
+	};
+};
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand.dtso b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand.dtso
index a9eca00d44..b5a67c725b 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand.dtso
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb-spim-nand.dtso
@@ -23,9 +23,6 @@
 				spi-max-frequency = <52000000>;
 				spi-tx-bus-width = <4>;
 				spi-rx-bus-width = <4>;
-				mediatek,nmbm;
-				mediatek,bmt-max-ratio = <1>;
-				mediatek,bmt-max-reserved-blocks = <64>;
 
 				partitions {
 					compatible = "fixed-partitions";
@@ -34,31 +31,45 @@
 
 					partition at 0 {
 						label = "BL2";
-						reg = <0x00000 0x0100000>;
+						reg = <0x00000 0x0200000>;
 						read-only;
 					};
 
-					partition at 100000 {
-						label = "u-boot-env";
-						reg = <0x0100000 0x0080000>;
-					};
+					ubi_part: partition at 200000 {
+						label = "ubi";
+						reg = <0x0200000 0x7e00000>;
+						compatible = "linux,ubi";
 
-					partition at 180000 {
-						label = "Factory";
-						reg = <0x180000 0x0400000>;
-					};
+						volumes {
+							ubi-volume-ubootenv {
+								volname = "ubootenv";
+								nvmem-layout {
+									compatible = "u-boot,env-redundant-bool-layout";
+								};
+							};
 
-					partition at 580000 {
-						label = "FIP";
-						reg = <0x580000 0x0200000>;
-					};
+							ubi-volume-ubootenv2 {
+								volname = "ubootenv2";
+								nvmem-layout {
+									compatible = "u-boot,env-redundant-bool-layout";
+								};
+							};
 
-					partition at 780000 {
-						label = "ubi";
-						reg = <0x780000 0x7080000>;
+							ubi_root: ubi-volume-fit {
+								volname = "fit";
+							};
+
+						};
 					};
 				};
 			};
 		};
 	};
+
+	fragment at 1 {
+		target-path = "/chosen";
+		__overlay__ {
+			rootdisk-spim-nand = <&ubi_root>;
+		};
+	};
 };
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index ff791a600a..e7b347dc5f 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -84,6 +84,7 @@ platform_do_upgrade() {
 	bananapi,bpi-r3-mini|\
 	bananapi,bpi-r4|\
 	bananapi,bpi-r4-poe|\
+	mediatek,mt7988a-rfb|\
 	jdcloud,re-cp-03|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 7948955842..5c2f67eb99 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -824,6 +824,7 @@ define Device/mediatek_mt7988a-rfb
 	mt7988a-rfb-sd \
 	mt7988a-rfb-snfi-nand \
 	mt7988a-rfb-spim-nand \
+	mt7988a-rfb-spim-nand-factory \
 	mt7988a-rfb-spim-nor \
 	mt7988a-rfb-eth1-aqr \
 	mt7988a-rfb-eth1-i2p5g-phy \
@@ -855,7 +856,7 @@ define Device/mediatek_mt7988a-rfb
   ARTIFACT/emmc-bl31-uboot.fip	:= mt7988-bl31-uboot rfb-emmc
   ARTIFACT/nor-preloader.bin	:= mt7988-bl2 nor-comb
   ARTIFACT/nor-bl31-uboot.fip	:= mt7988-bl31-uboot rfb-nor
-  ARTIFACT/snand-preloader.bin	:= mt7988-bl2 spim-nand-comb
+  ARTIFACT/snand-preloader.bin	:= mt7988-bl2 spim-nand-ubi-comb
   ARTIFACT/snand-bl31-uboot.fip	:= mt7988-bl31-uboot rfb-snand
   ARTIFACT/sdcard.img.gz	:= mt798x-gpt sdmmc |\
 				   pad-to 17k | mt7988-bl2 sdmmc-comb |\



From lede-commits at lists.infradead.org  Sun May 19 00:47:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 03:47:09 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: add missing options for mt7988-rfb
In-Reply-To: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
References: <171610482961.1439149.7375396824284224126@git-01.infra.openwrt.org>
Message-ID: <mailman.36910.1716104839.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3bc9ac29425b5a2fd35637c09cee609b6de0713a

commit 3bc9ac29425b5a2fd35637c09cee609b6de0713a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon May 13 20:17:33 2024 +0200

    uboot-mediatek: add missing options for mt7988-rfb
    
    Fixes autoboot and storing env in UBI
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...05-configs-add-usefull-stuff-to-mt7988-rfb.patch | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
index da1d985688..311a828a93 100644
--- a/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
+++ b/package/boot/uboot-mediatek/patches/105-configs-add-usefull-stuff-to-mt7988-rfb.patch
@@ -157,10 +157,11 @@
  CONFIG_MTD=y
 --- a/configs/mt7988_rfb_defconfig
 +++ b/configs/mt7988_rfb_defconfig
-@@ -11,6 +11,24 @@ CONFIG_DEBUG_UART_BASE=0x11000000
+@@ -11,7 +11,24 @@ CONFIG_DEBUG_UART_BASE=0x11000000
  CONFIG_DEBUG_UART_CLOCK=40000000
  CONFIG_SYS_LOAD_ADDR=0x46000000
  CONFIG_DEBUG_UART=y
+-# CONFIG_AUTOBOOT is not set
 +CONFIG_OF_LIBFDT_OVERLAY=y
 +CONFIG_SMBIOS_PRODUCT_NAME=""
 +CONFIG_CFB_CONSOLE_ANSI=y
@@ -179,10 +180,10 @@
 +CONFIG_NAND_BOOT=y
 +CONFIG_BOOTSTD_DEFAULTS=y
 +CONFIG_BOOTSTD_FULL=y
- # CONFIG_AUTOBOOT is not set
  CONFIG_DEFAULT_FDT_FILE="mt7988-rfb"
  CONFIG_LOGLEVEL=7
-@@ -22,15 +40,118 @@ CONFIG_SYS_PBSIZE=1049
+ CONFIG_LOG=y
+@@ -22,15 +39,120 @@ CONFIG_SYS_PBSIZE=1049
  # CONFIG_BOOTM_PLAN9 is not set
  # CONFIG_BOOTM_RTEMS is not set
  # CONFIG_BOOTM_VXWORKS is not set
@@ -293,16 +294,18 @@
 +CONFIG_USB_XHCI_MTK=y
 +CONFIG_USB_STORAGE=y
 +CONFIG_OF_EMBED=y
++CONFIG_OF_SYSTEM_SETUP=y
 +CONFIG_ENV_OVERWRITE=y
-+CONFIG_ENV_IS_IN_MMC=y
-+CONFIG_ENV_OFFSET=0x400000
-+CONFIG_ENV_OFFSET_REDUND=0x440000
-+CONFIG_ENV_SIZE=0x40000
-+CONFIG_ENV_SIZE_REDUND=0x40000
++CONFIG_ENV_IS_IN_UBI=y
++CONFIG_ENV_UBI_PART="ubi"
++CONFIG_ENV_SIZE=0x1f000
++CONFIG_ENV_SIZE_REDUND=0x1f000
++CONFIG_ENV_UBI_VOLUME="ubootenv"
++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
  CONFIG_DOS_PARTITION=y
  CONFIG_EFI_PARTITION=y
  CONFIG_PARTITION_TYPE_GUID=y
-@@ -46,6 +167,9 @@ CONFIG_PROT_TCP=y
+@@ -46,6 +168,9 @@ CONFIG_PROT_TCP=y
  CONFIG_REGMAP=y
  CONFIG_SYSCON=y
  CONFIG_CLK=y



From lede-commits at lists.infradead.org  Sun May 19 06:20:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 09:20:11 -0400
Subject: [openwrt/openwrt]  wireless-regdb: update to 2024.05.08
In-Reply-To: <171612481170.2189862.6458815095293245321@git-01.infra.openwrt.org>
References: <171612481170.2189862.6458815095293245321@git-01.infra.openwrt.org>
Message-ID: <mailman.36919.1716124822.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/65c1f0d433e89c794a6d22dbe474666c241f9e7b

commit 65c1f0d433e89c794a6d22dbe474666c241f9e7b
Author: Yuu Toriyama <PascalCoffeeLake at gmail.com>
AuthorDate: Sun May 19 07:08:37 2024 +0900

    wireless-regdb: update to 2024.05.08
    
    Changes:
      73529a8 Revert "wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)"
      87941e4 wireless-regdb: Update regulatory rules for Taiwan (TW) on 6GHz
      33797ae wireless-regdb: update regulatory database based on preceding changes
    
    Signed-off-by: Yuu Toriyama <PascalCoffeeLake at gmail.com>
---
 package/firmware/wireless-regdb/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile
index a0080bdbfd..5b95ec59de 100644
--- a/package/firmware/wireless-regdb/Makefile
+++ b/package/firmware/wireless-regdb/Makefile
@@ -1,14 +1,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wireless-regdb
-PKG_VERSION:=2024.01.23
+PKG_VERSION:=2024.05.08
 PKG_RELEASE:=1
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=LICENSE
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
-PKG_HASH:=c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55
+PKG_HASH:=9aee1d86ebebb363b714bec941b2820f31e3b7f1a485ddc9fcbd9985c7d3e7c4
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 



From lede-commits at lists.infradead.org  Sun May 19 06:21:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 09:21:17 -0400
Subject: [openwrt/openwrt]  wireless-regdb: update to 2024.05.08
In-Reply-To: <171612487793.2193055.65276747436948554@git-01.infra.openwrt.org>
References: <171612487793.2193055.65276747436948554@git-01.infra.openwrt.org>
Message-ID: <mailman.36920.1716124882.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/09a8f75077117ca2ab880cbf854cf7a2dae0d494

commit 09a8f75077117ca2ab880cbf854cf7a2dae0d494
Author: Yuu Toriyama <PascalCoffeeLake at gmail.com>
AuthorDate: Sun May 19 07:08:37 2024 +0900

    wireless-regdb: update to 2024.05.08
    
    Changes:
      73529a8 Revert "wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)"
      87941e4 wireless-regdb: Update regulatory rules for Taiwan (TW) on 6GHz
      33797ae wireless-regdb: update regulatory database based on preceding changes
    
    Signed-off-by: Yuu Toriyama <PascalCoffeeLake at gmail.com>
    (cherry picked from commit 65c1f0d433e89c794a6d22dbe474666c241f9e7b)
---
 package/firmware/wireless-regdb/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile
index 431d07c35b..91c54372a2 100644
--- a/package/firmware/wireless-regdb/Makefile
+++ b/package/firmware/wireless-regdb/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wireless-regdb
-PKG_VERSION:=2024.01.23
+PKG_VERSION:=2024.05.08
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
-PKG_HASH:=c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55
+PKG_HASH:=9aee1d86ebebb363b714bec941b2820f31e3b7f1a485ddc9fcbd9985c7d3e7c4
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 



From lede-commits at lists.infradead.org  Sun May 19 07:09:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 10:09:49 -0400
Subject: [openwrt/openwrt]  imagebuilder: fix multiple issue with manifest and
 sign keys handling
In-Reply-To: <171612778951.2302660.7916704285706078538@git-01.infra.openwrt.org>
References: <171612778951.2302660.7916704285706078538@git-01.infra.openwrt.org>
Message-ID: <mailman.36921.1716127798.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5d37d8dc824f4fdef690b80ceae1bde6a6f16913

commit 5d37d8dc824f4fdef690b80ceae1bde6a6f16913
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun May 19 14:58:11 2024 +0200

    imagebuilder: fix multiple issue with manifest and sign keys handling
    
    Fix multiple issue with manifest handling where APK was hardcoded
    and fix a logic error where (TODO) APK _check_keys was called for the
    OPKG codepath instead of correctly calling for the APK codepath.
    
    Fixes: d788ab376f85 ("build: add APK package build capabilities")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/imagebuilder/files/Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index c032306c8e..7d01bc0e42 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -159,7 +159,11 @@ _call_manifest: FORCE
 	mkdir -p $(TARGET_DIR) $(BIN_DIR) $(TMP_DIR) $(DL_DIR)
 	$(MAKE) package_reload >/dev/null
 	$(MAKE) package_install >/dev/null
+ifeq ($(CONFIG_USE_APK),)
+	$(OPKG) list-installed $(if $(STRIP_ABI),--strip-abi)
+else
 	$(APK) list --quiet --manifest --no-network
+endif
 
 package_index: FORCE
 	@echo >&2
@@ -202,7 +206,11 @@ endif
 
 package_list: FORCE
 	@$(MAKE) -s package_reload
+ifeq ($(CONFIG_USE_APK),)
+	@$(OPKG) list --size 2>/dev/null
+else
 	@$(APK) list --size 2>/dev/null
+endif
 
 package_install: FORCE
 	@echo
@@ -277,8 +285,6 @@ endif
 
 _check_keys: FORCE
 ifeq ($(CONFIG_USE_APK),)
-	# TODO
-else
 ifneq ($(CONFIG_SIGNATURE_CHECK),)
 	@if [ ! -s $(BUILD_KEY) -o ! -s $(BUILD_KEY).pub ]; then \
 		echo Generate local signing keys... >&2; \
@@ -294,6 +300,8 @@ ifneq ($(CONFIG_SIGNATURE_CHECK),)
 			-s $(BUILD_KEY); \
 	fi
 endif
+else
+	# TODO
 endif
 
 image:



From lede-commits at lists.infradead.org  Sun May 19 07:13:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 19 May 2024 10:13:11 -0400
Subject: [openwrt/openwrt]  include/rootfs: skip removal of APK cache now
 deprecated
In-Reply-To: <171612799109.2310011.1242607851320318687@git-01.infra.openwrt.org>
References: <171612799109.2310011.1242607851320318687@git-01.infra.openwrt.org>
Message-ID: <mailman.36924.1716127995.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f46867e5ccfa87d698bb11c4ecc9f4592890b06e

commit f46867e5ccfa87d698bb11c4ecc9f4592890b06e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun May 19 15:03:27 2024 +0200

    include/rootfs: skip removal of APK cache now deprecated
    
    Skip removal of APK cache since now deprecated as APK doesn't make use
    of cache anymore in our configuration.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/rootfs.mk | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/rootfs.mk b/include/rootfs.mk
index 907a95a794..c2a32fa102 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -111,7 +111,6 @@ define prepare_rootfs
 	)
 
 	@-find $(1) -name CVS -o -name .svn -o -name .git -o -name '.#*' | $(XARGS) rm -rf
-	@-find $(1)/usr/cache/apk/ -name '*.apk' -delete
 	rm -rf \
 		$(1)/boot \
 		$(1)/tmp/* \



From lede-commits at lists.infradead.org  Mon May 20 09:35:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 20 May 2024 12:35:17 -0400
Subject: [openwrt/openwrt]  apk: disable rootfs repositories during build
In-Reply-To: <171622291739.1477821.12311918630058418676@git-01.infra.openwrt.org>
References: <171622291739.1477821.12311918630058418676@git-01.infra.openwrt.org>
Message-ID: <mailman.37122.1716222925.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c1e0f99ef8066b4a5032409b7e81516fed166008

commit c1e0f99ef8066b4a5032409b7e81516fed166008
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon May 20 18:08:28 2024 +0300

    apk: disable rootfs repositories during build
    
    Since we set the root for APK it tries to use those during the build,
    which shouldn't happen since local package are used instead.
    
    Disable the repositories by manually setting an empty repository.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/rootfs.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/rootfs.mk b/include/rootfs.mk
index c2a32fa102..9fb7d8cfdf 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -47,6 +47,7 @@ apk = \
   IPKG_INSTROOT=$(1) \
   $(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk \
 	--root $(1) \
+	--repositories-file /dev/zero \
 	--keys-dir $(TOPDIR) \
 	--no-cache \
 	--no-logfile \



From lede-commits at lists.infradead.org  Mon May 20 09:35:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 20 May 2024 12:35:18 -0400
Subject: [openwrt/openwrt]  apk: update to latest HEAD 2024-05-19
In-Reply-To: <171622291739.1477821.12311918630058418676@git-01.infra.openwrt.org>
References: <171622291739.1477821.12311918630058418676@git-01.infra.openwrt.org>
Message-ID: <mailman.37123.1716222925.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5a5d12695489141e1e99552e525bc00aa963c2e1

commit 5a5d12695489141e1e99552e525bc00aa963c2e1
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon May 20 18:10:42 2024 +0300

    apk: update to latest HEAD 2024-05-19
    
    Upstream refactoring caused some mbedtls issues, now fixed again.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/system/apk/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
index 332596719f..c208144f2e 100644
--- a/package/system/apk/Makefile
+++ b/package/system/apk/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-05-18
-PKG_SOURCE_VERSION:=a6ce0a1be1a42a5cf4136eb0db5ea95168ee73fe
-PKG_MIRROR_HASH:=a5f59907cd742ec12f31f42910ea9a6ecfaf91e18218a7888836a01cfa272a72
+PKG_SOURCE_DATE:=2024-05-19
+PKG_SOURCE_VERSION:=825681118d05ca5801c6b3852a70a42499e57def
+PKG_MIRROR_HASH:=adc07e3320e8d780bbbd3d95d3c6c6ce259f3dbf97ab0a4ff9dc4853af21e04f
 
 PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
 



From lede-commits at lists.infradead.org  Mon May 20 23:03:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 02:03:15 -0400
Subject: [openwrt/openwrt]  libbpf: Update to v1.4.2
In-Reply-To: <171627139499.2989850.1545132599899903458@git-01.infra.openwrt.org>
References: <171627139499.2989850.1545132599899903458@git-01.infra.openwrt.org>
Message-ID: <mailman.37204.1716271402.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d44d35f106f10c46d6d5cd1bb2faf8d74a4a5529

commit d44d35f106f10c46d6d5cd1bb2faf8d74a4a5529
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Thu May 16 14:14:05 2024 -0700

    libbpf: Update to v1.4.2
    
    Update to the latest upstream release to include recent improvements and
    bugfixes.
    
    Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.2
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/libs/libbpf/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile
index 6b894972a7..2105a1c568 100644
--- a/package/libs/libbpf/Makefile
+++ b/package/libs/libbpf/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libbpf
-PKG_VERSION:=1.4.1
+PKG_VERSION:=1.4.2
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
-PKG_MIRROR_HASH:=46469f720ed246529e46d84a6444ae1c1a1eaf2a717a5a055c9973bb52159ec3
+PKG_MIRROR_HASH:=eaf56a8d4297a1dfb477d91b4fb7c7c5ad6b6df73e0f7ac3c8fd93f2664c2e85
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v1.4.1
+PKG_SOURCE_VERSION:=v1.4.2
 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>



From lede-commits at lists.infradead.org  Mon May 20 23:59:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 02:59:37 -0400
Subject: [openwrt/openwrt]  firewall4: update to Git HEAD (2024-05-21)
In-Reply-To: <171627477717.3081605.8025092109153389221@git-01.infra.openwrt.org>
References: <171627477717.3081605.8025092109153389221@git-01.infra.openwrt.org>
Message-ID: <mailman.37220.1716274781.1280.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/61330ddef839bf2d03ff651dfa48c88e73b37e3e

commit 61330ddef839bf2d03ff651dfa48c88e73b37e3e
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue May 21 08:59:13 2024 +0200

    firewall4: update to Git HEAD (2024-05-21)
    
    4c01d1ebf99e fw4: substitute double quotes in strings
    
    Fixes: https://github.com/openwrt/luci/issues/7091
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/network/config/firewall4/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile
index 365a363303..6aacc05e36 100644
--- a/package/network/config/firewall4/Makefile
+++ b/package/network/config/firewall4/Makefile
@@ -9,9 +9,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
-PKG_SOURCE_DATE:=2023-11-03
-PKG_SOURCE_VERSION:=698a53354fd280aae097efe08803c0c9a10c14c2
-PKG_MIRROR_HASH:=736b3d03cf0db1170242de20776b0095cc37d260108e4313f84eafb46b1be711
+PKG_SOURCE_DATE:=2024-05-21
+PKG_SOURCE_VERSION:=4c01d1ebf99e8ecfa69758a9b4f450ecef7b93cd
+PKG_MIRROR_HASH:=bbc5622bc03e3b43116fcc86e3fa2d2372bfc07b3a00d2b3a6efac4f7454a403
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 



From lede-commits at lists.infradead.org  Tue May 21 01:13:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:13:52 -0400
Subject: [openwrt/openwrt]  mt76: install mt7981_eeprom_mt7976_dbdc.bin to
 STAGING_DIR_IMAGE
In-Reply-To: <171627923173.3214609.4825128384668667256@git-01.infra.openwrt.org>
References: <171627923173.3214609.4825128384668667256@git-01.infra.openwrt.org>
Message-ID: <mailman.37246.1716279245.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bc5d9779dac9a6a8136f5e105d3181f95b64eb74

commit bc5d9779dac9a6a8136f5e105d3181f95b64eb74
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 21 10:10:00 2024 +0200

    mt76: install mt7981_eeprom_mt7976_dbdc.bin to STAGING_DIR_IMAGE
    
    It will be used in the image building code
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index f2339e942a..03c97de797 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -632,6 +632,11 @@ define Package/mt76-test/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/mt76-test $(1)/usr/sbin
 endef
 
+define Build/InstallDev
+	mkdir -p $(STAGING_DIR_IMAGE)
+	$(CP) $(PKG_BUILD_DIR)/firmware/mt7981_eeprom_mt7976_dbdc.bin $(STAGING_DIR_IMAGE)/
+endef
+
 $(eval $(call KernelPackage,mt76-core))
 $(eval $(call KernelPackage,mt76-usb))
 $(eval $(call KernelPackage,mt76x02-usb))



From lede-commits at lists.infradead.org  Tue May 21 01:13:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:13:51 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2024-05-17)
In-Reply-To: <171627923173.3214609.4825128384668667256@git-01.infra.openwrt.org>
References: <171627923173.3214609.4825128384668667256@git-01.infra.openwrt.org>
Message-ID: <mailman.37247.1716279248.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed23d4d00dcc26f69da6a2fbb89f21d99f3e25d9

commit ed23d4d00dcc26f69da6a2fbb89f21d99f3e25d9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue May 21 10:09:12 2024 +0200

    mt76: update to Git HEAD (2024-05-17)
    
    8f301a5c5fe3 firmware: add mt7981 default eeprom
    2d264aecbf5a mt76: mt7915: make pre-cal freq lists static const
    d9c62742bed6 wifi: mt76: make const arrays in functions static
    8986ba5492a8 wifi: mt76: mt7921: cqm rssi low/high event notify
    3afbb8ed8015 wifi: mt76: mt7996: let upper layer handle MGMT frame protection
    1d0bd57e5889 wifi: mt76: mt7921e: add LED control support
    1d6e4f7de8a6 wifi: mt76: mt7925: add EHT radiotap support in monitor mode
    c40e648b8929 wifi: mt76: enable spectrum management
    14d5ee9f3369 mt76: shrink mt76_queue_buf
    513c131c6309 mt76: mt7603: fix mixed declarations and code
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 548492e919..f2339e942a 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-04-03
-PKG_SOURCE_VERSION:=1e336a8582dce2ef32ddd440d423e9afef961e71
-PKG_MIRROR_HASH:=276613540603dc6ece9d2474ae1899b6aaa6ca93bd27824056c9689c725f5890
+PKG_SOURCE_DATE:=2024-05-17
+PKG_SOURCE_VERSION:=513c131c6309712a51502870b041f45b4bd6a6d4
+PKG_MIRROR_HASH:=3e5d8ee6b8b122cc4e32668fdde0552a9fa23819b7ebdc758ecb63b5f761683a
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0



From lede-commits at lists.infradead.org  Tue May 21 01:40:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:48 -0400
Subject: [openwrt/openwrt]  mediatek/filogic: fix mt7981.dtsi PCIe support
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37271.1716280852.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/27286ed52415be4f62bf80a5befcabcdb87684f2

commit 27286ed52415be4f62bf80a5befcabcdb87684f2
Author: John Crispin <john at phrozen.org>
AuthorDate: Thu Apr 4 20:11:54 2024 +0200

    mediatek/filogic: fix mt7981.dtsi PCIe support
    
    * the compatible string was wrong
    * the pinmux was missing
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981.dtsi   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981.dtsi
index 54cfd0b4b9..012c6e4e5b 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7981.dtsi
@@ -416,7 +416,7 @@
 
 		pcie: pcie at 11280000 {
 			compatible = "mediatek,mt7981-pcie",
-				     "mediatek,mt7986-pcie";
+				     "mediatek,mt8192-pcie";
 			reg = <0 0x11280000 0 0x4000>;
 			reg-names = "pcie-mac";
 			ranges = <0x82000000 0 0x20000000



From lede-commits at lists.infradead.org  Tue May 21 01:40:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:47 -0400
Subject: [openwrt/openwrt]  arm-trusted-firmware-mediatek: add mt7981-nor-ddr4
 and mt7981-spim-nand-ubi-ddr4 builds
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37272.1716280852.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/41655c81c10aa734e75d72955a8911e4a7c99100

commit 41655c81c10aa734e75d72955a8911e4a7c99100
Author: John Crispin <john at phrozen.org>
AuthorDate: Mon May 13 07:36:24 2024 +0200

    arm-trusted-firmware-mediatek: add mt7981-nor-ddr4 and mt7981-spim-nand-ubi-ddr4 builds
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 package/boot/arm-trusted-firmware-mediatek/Makefile | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile
index 37d71e183c..84491b57b6 100644
--- a/package/boot/arm-trusted-firmware-mediatek/Makefile
+++ b/package/boot/arm-trusted-firmware-mediatek/Makefile
@@ -160,6 +160,14 @@ define Trusted-Firmware-A/mt7981-ram-ddr3
   DEFAULT:=TARGET_mediatek_filogic
 endef
 
+define Trusted-Firmware-A/mt7981-nor-ddr4
+  NAME:=MediaTek MT7981 (SPI-NOR, DDR4)
+  BOOT_DEVICE:=nor
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7981
+  DDR_TYPE:=ddr4
+endef
+
 define Trusted-Firmware-A/mt7981-emmc-ddr3
   NAME:=MediaTek MT7981 (eMMC, DDR3)
   BOOT_DEVICE:=emmc
@@ -203,6 +211,15 @@ define Trusted-Firmware-A/mt7986-ram-ddr4
   DEFAULT:=TARGET_mediatek_filogic
 endef
 
+define Trusted-Firmware-A/mt7981-spim-nand-ubi-ddr4
+  NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
+  BOOT_DEVICE:=spim-nand
+  BUILD_SUBTARGET:=filogic
+  PLAT:=mt7981
+  DDR_TYPE:=ddr4
+  USE_UBI:=1
+endef
+
 define Trusted-Firmware-A/mt7986-nor-ddr4
   NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
   BOOT_DEVICE:=nor
@@ -477,9 +494,11 @@ TFA_TARGETS:= \
 	mt7981-ram-ddr3 \
 	mt7981-emmc-ddr3 \
 	mt7981-nor-ddr3 \
+	mt7981-nor-ddr4 \
 	mt7981-sdmmc-ddr3 \
 	mt7981-snand-ddr3 \
 	mt7981-spim-nand-ddr3 \
+	mt7981-spim-nand-ubi-ddr4 \
 	mt7981-ram-ddr4 \
 	mt7981-emmc-ddr4 \
 	mt7981-spim-nand-ddr4 \
@@ -527,6 +546,7 @@ TFA_MAKE_FLAGS += \
 	$(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
 	$(if $(RAM_BOOT_UART_DL),RAM_BOOT_UART_DL=1) \
 	$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
+	$(if $(USE_UBI),UBI=1 $(if $(findstring mt7981,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x100000)) \
 	all
 
 define Package/trusted-firmware-a-ram/install



From lede-commits at lists.infradead.org  Tue May 21 01:40:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:50 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: add USB support to mt7981.dtsi
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37273.1716280853.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9746b6f1fca58bc5ae45657e418f928405a23a27

commit 9746b6f1fca58bc5ae45657e418f928405a23a27
Author: John Crispin <john at phrozen.org>
AuthorDate: Sat Apr 6 19:17:05 2024 +0200

    uboot-mediatek: add USB support to mt7981.dtsi
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 .../patches/290-mt7981-add-USB-nodes.patch         | 76 ++++++++++++++++++++++
 1 file changed, 76 insertions(+)

diff --git a/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch b/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch
new file mode 100644
index 0000000000..574b541bfe
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch
@@ -0,0 +1,76 @@
+From cca5775031e4890f195246772e00f7f4ae7438f6 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Mon, 19 Feb 2024 05:52:24 +0100
+Subject: [PATCH 1/2] mt7981.dtsi: add USB nodes
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ arch/arm/dts/mt7981.dtsi | 47 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
+diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
+index bda80ac9..6f4e5b9f 100644
+--- a/arch/arm/dts/mt7981.dtsi
++++ b/arch/arm/dts/mt7981.dtsi
+@@ -6,6 +6,7 @@
+ 
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
++#include <dt-bindings/phy/phy.h>
+ #include <dt-bindings/clock/mt7981-clk.h>
+ #include <dt-bindings/reset/mt7629-reset.h>
+ #include <dt-bindings/pinctrl/mt65xx.h>
+@@ -342,4 +343,50 @@
+ 		status = "disabled";
+ 	};
+ 
++	xhci: xhci at 11200000 {
++		compatible = "mediatek,mt7981-xhci",
++			     "mediatek,mtk-xhci";
++		reg = <0x11200000 0x2e00>,
++		      <0x11203e00 0x0100>;
++		reg-names = "mac", "ippc";
++		interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
++		phys = <&u2port0 PHY_TYPE_USB2>,
++		       <&u3port0 PHY_TYPE_USB3>;
++		clocks = <&infracfg_ao CK_INFRA_IUSB_SYS_CK>,
++			 <&infracfg_ao CK_INFRA_IUSB_CK>,
++			 <&infracfg_ao CK_INFRA_IUSB_133_CK>,
++			 <&infracfg_ao CK_INFRA_IUSB_66M_CK>,
++			 <&topckgen CK_TOP_U2U3_XHCI_SEL>;
++		clock-names = "sys_ck",
++			      "ref_ck",
++			      "mcu_ck",
++			      "dma_ck",
++			      "xhci_ck";
++		mediatek,u3p-dis-msk = <0x1>;
++		status = "okay";
++	};
++
++	usbtphy: usb-phy at 11e10000 {
++		compatible = "mediatek,mt7981",
++			     "mediatek,generic-tphy-v2";
++		#address-cells = <1>;
++		#size-cells = <1>;
++		status = "okay";
++
++		u2port0: usb-phy at 11e10000 {
++			reg = <0x11e10000 0x700>;
++			clocks = <&topckgen CK_TOP_USB_FRMCNT_SEL>;
++			clock-names = "ref";
++			#phy-cells = <1>;
++			status = "okay";
++		};
++
++		u3port0: usb-phy at 11e10700 {
++			reg = <0x11e10700 0x900>;
++			clocks = <&topckgen CK_TOP_USB3_PHY_SEL>;
++			clock-names = "ref";
++			#phy-cells = <1>;
++			status = "okay";
++		};
++	};
+ };
+-- 
+2.34.1
+



From lede-commits at lists.infradead.org  Tue May 21 01:40:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:49 -0400
Subject: [openwrt/openwrt]  mediatek/filogic: enable led PWM driver by default
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37274.1716280853.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e060300fcadcda31f7ce539199b1ca35601304e

commit 6e060300fcadcda31f7ce539199b1ca35601304e
Author: John Crispin <john at phrozen.org>
AuthorDate: Thu Apr 4 22:37:25 2024 +0200

    mediatek/filogic: enable led PWM driver by default
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 target/linux/mediatek/filogic/config-6.6 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/mediatek/filogic/config-6.6 b/target/linux/mediatek/filogic/config-6.6
index 110f6e7550..5f4e42ac0f 100644
--- a/target/linux/mediatek/filogic/config-6.6
+++ b/target/linux/mediatek/filogic/config-6.6
@@ -228,6 +228,7 @@ CONFIG_IRQ_TIME_ACCOUNTING=y
 CONFIG_IRQ_WORK=y
 CONFIG_JBD2=y
 CONFIG_JUMP_LABEL=y
+CONFIG_LEDS_PWM=y
 CONFIG_LEDS_SMARTRG_LED=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y



From lede-commits at lists.infradead.org  Tue May 21 01:40:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:52 -0400
Subject: [openwrt/openwrt]  mediatek/filogic: add OpenWrt One support
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37277.1716280853.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/797904b3cb4a5c575641c19e7f3989926e4c7902

commit 797904b3cb4a5c575641c19e7f3989926e4c7902
Author: John Crispin <john at phrozen.org>
AuthorDate: Thu Apr 4 22:38:50 2024 +0200

    mediatek/filogic: add OpenWrt One support
    
    filogic: Add support for D-Link AQUILA PRO AI M30
    
    Specification:
     - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
     - 1GB RAM
     - 16MB NOR
     - 128MB NAND
     - 3 LEDs (red, green, blue, white)
     - 2 buttons (reset, user defined)
     - 1 2.5Gbit WAN port (Airoha EN8811h)
     - 1 1Gbit LAN ports
     - 1 single lane M.2 SSD slot
     - 1 mikroBus socket
     - externel HW WDT (25s refresh time)
     - i2c RTC (with battery backup)
    
    Serial Interface
     - UBS-C CDC-ACM
     - 3 Pins GND, RX, TX
     - Settings: 115200, 8N1
    
    MAC addresses are not populated on the early samples.
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 target/linux/mediatek/dts/mt7981b-openwrt-one.dts  | 457 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   6 +
 .../filogic/base-files/etc/board.d/02_network      |   3 +-
 .../etc/hotplug.d/firmware/11-mt76-caldata         |   3 +
 .../filogic/base-files/lib/upgrade/platform.sh     |   1 +
 target/linux/mediatek/image/filogic.mk             |  48 +++
 6 files changed, 517 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
new file mode 100644
index 0000000000..b2223f8d76
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
@@ -0,0 +1,457 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include "mt7981.dtsi"
+
+/ {
+	model = "OpenWrt One";
+	compatible = "openwrt,one", "mediatek,mt7981";
+
+	aliases {
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
+		serial0 = &uart0;
+		led-boot = &led_status_white;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_green;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		rootdisk = <&ubi_fit_volume>;
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		user {
+			label = "user";
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
+		};
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		led_status_white: led-0 {
+			color = <LED_COLOR_ID_WHITE>;
+			function = LED_FUNCTION_STATUS;
+			pwms = <&pwm 0 10000>;
+			linux,default-trigger = "pattern";
+			led-pattern = <0 500 25 500>;
+		};
+
+		led_status_green: led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			pwms = <&pwm 1 10000>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		led_status_red: led-0 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-1 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_AMBER>;
+			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		 gpio-0 {
+			gpio-export,name = "mikrobus-reset";
+			gpio-export,output = <1>;
+			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio-1 {
+			gpio-export,name = "watchdog-enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio-2 {
+			gpio-export,name = "usb-enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	gpio-watchdog {
+		compatible = "linux,wdt-gpio";
+		gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+		hw_algo = "toggle";
+		hw_margin_ms = <25000>;
+		always-running;
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-handle = <&phy15>;
+		phy-mode = "2500base-x";
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_4>;
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_a>;
+	};
+};
+
+&mdio_bus {
+	phy15: phy at f {
+		reg = <0xf>;
+
+		airoha,pnswap-rx;
+
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+		reset-assert-us = <10000>;
+		reset-deassert-us = <20000>;
+
+		phy-mode = "2500base-x";
+		full-duplex;
+		pause;
+
+		leds {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led at 0 {
+				reg = <0>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_AMBER>;
+			};
+
+			led at 1 {
+				reg = <1>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+		};
+	};
+};
+
+&crypto {
+	status = "okay";
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	spi1_flash_pins: spi1-pins {
+		mux {
+			function = "spi";
+			groups = "spi1_1";
+		};
+
+		conf-pu {
+			pins = "SPI1_CS";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	spi2_flash_pins: spi2-pins {
+		mux {
+			function = "spi";
+			groups = "spi2";
+		};
+
+		conf-pu {
+			pins = "SPI2_CS", "SPI2_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	i2c_pins: i2c-pins {
+		mux {
+			function = "i2c";
+			groups = "i2c0_0";
+		};
+	};
+
+	uart2_pins: uart2-pins {
+		mux {
+			function = "uart";
+			groups = "uart2_0_tx_rx";
+		};
+	};
+
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0_0", "pwm1_1";
+		};
+	};
+
+	pcie_pins: pcie-pins {
+		mux {
+			function = "pcie";
+			groups = "pcie_pereset";
+		};
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c_pins>;
+	status = "okay";
+
+	rtc at 51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	cs-gpios = <0>, <0>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x100000 0x7F00000>;
+				compatible = "linux,ubi";
+
+				volumes {
+					ubi_fit_volume: ubi-volume-fit {
+						volname = "fit";
+					};
+				};
+			};
+		};
+	};
+};
+
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_flash_pins>;
+	status = "okay";
+};
+
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_flash_pins>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2-nor";
+				reg = <0x00000 0x40000>;
+			};
+
+			partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0xc0000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x24 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					macaddr_factory_a: macaddr at a {
+						compatible = "mac-base";
+						reg = <0x2a 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 100000 {
+				label = "fip-nor";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition at 180000 {
+				label = "recovery";
+				reg = <0x180000 0xc80000>;
+			};
+		};
+	};
+};
+
+&xhci {
+	phys = <&u2port0 PHY_TYPE_USB2>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	mediatek,u3p-dis-msk = <0x01>;
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+};
+
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_pins>;
+	status = "okay";
+};
+
+&sgmiisys0 {
+	/delete-node/ mediatek,pnswap;
+};
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 b5a2554671..ec239cb0cf 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
@@ -59,6 +59,12 @@ openembed,som7981)
 	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
 	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
 	;;
+openwrt,one)
+	ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"
+	ucidef_set_led_netdev "wanlink" "WANLINK" "mdio-bus:0f:amber:wan" "eth0" "link"
+	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
+	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
+	;;
 routerich,ax3000)
 	ucidef_set_led_netdev "lan-1" "lan-1" "blue:lan-1" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-2" "lan2" "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 4de3cf044d..fc4bc07b2f 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
@@ -59,7 +59,8 @@ mediatek_setup_interfaces()
 	glinet,gl-mt3000|\
 	glinet,gl-x3000|\
 	glinet,gl-xe3000|\
-	openembed,som7981)
+	openembed,som7981|\
+	openwrt,one)
 		ucidef_set_interfaces_lan_wan eth1 eth0
 		;;
 	dlink,aquila-pro-ai-m30-a1)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
index bd68ef7415..27a16e0fb7 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
@@ -31,6 +31,9 @@ case "$FIRMWARE" in
 			;;
 		esac
 		;;
+	openwrt,one)
+		caldata_extract "factory" 0x0 0x1000
+		;;
 	ubnt,unifi-6-plus)
 		caldata_extract_mmc "factory" 0x0 0x1000
 		;;
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index e7b347dc5f..9b46111d33 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -86,6 +86,7 @@ platform_do_upgrade() {
 	bananapi,bpi-r4-poe|\
 	mediatek,mt7988a-rfb|\
 	jdcloud,re-cp-03|\
+	openwrt,one|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 5c2f67eb99..e85d67f2ae 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -951,6 +951,54 @@ define Device/openembed_som7981
 endef
 TARGET_DEVICES += openembed_som7981
 
+define Build/append-openwrt-one-eeprom
+        dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@
+endef
+
+define Device/openwrt_one
+  DEVICE_VENDOR := OpenWrt
+  DEVICE_MODEL := One
+  DEVICE_DTS := mt7981b-openwrt-one
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTC_FLAGS := --pad 4096
+  DEVICE_DTS_LOADADDR := 0x43f00000
+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-rtc-pcf8563 kmod-usb3 kmod-nvme kmod-phy-airoha-en8811h
+  KERNEL_LOADADDR := 0x44000000
+  KERNEL := kernel-bin | gzip
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  KERNEL_INITRAMFS_SUFFIX := .itb
+  KERNEL_IN_UBI := 1
+  UBOOTENV_IN_UBI := 1
+  IMAGES := sysupgrade.itb
+  IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
+  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
+  ARTIFACTS := \
+	nor-preloader.bin nor-bl31-uboot.fip \
+	snand-preloader.bin snand-bl31-uboot.fip \
+	factory.ubi snand-factory.bin nor-factory.bin
+  ARTIFACT/nor-preloader.bin		:= mt7981-bl2 nor-ddr4
+  ARTIFACT/nor-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-nor
+  ARTIFACT/snand-preloader.bin		:= mt7981-bl2 spim-nand-ubi-ddr4
+  ARTIFACT/snand-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-snand
+  ARTIFACT/factory.ubi			:= ubinize-image fit squashfs-sysupgrade.itb
+  ARTIFACT/snand-factory.bin		:= mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 256k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 512k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 768k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 1024k | \
+					   ubinize-image fit squashfs-sysupgrade.itb
+  ARTIFACT/nor-factory.bin		:= mt7981-bl2 nor-ddr4 | pad-to 256k | \
+					   append-openwrt-one-eeprom | pad-to 1024k | \
+					   mt7981-bl31-uboot openwrt_one-nor | pad-to 512k | \
+					   append-image-stage initramfs.itb
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7981_openwrt_one-snand-u-boot.fip recovery=:$(KDIR)/tmp/openwrt-mediatek-filogic-openwrt_one-initramfs.itb \
+		   $(if $(wildcard $(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb), calibration=:$(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb)
+endef
+TARGET_DEVICES += openwrt_one
+
 define Device/qihoo_360t7
   DEVICE_VENDOR := Qihoo
   DEVICE_MODEL := 360T7



From lede-commits at lists.infradead.org  Tue May 21 01:40:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 04:40:51 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: add support for OpenWrt One
In-Reply-To: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
References: <171628084730.3266923.15599471015380468069@git-01.infra.openwrt.org>
Message-ID: <mailman.37278.1716280857.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a46ebf6fc26237d10bbcb302219627e519799303

commit a46ebf6fc26237d10bbcb302219627e519799303
Author: John Crispin <john at phrozen.org>
AuthorDate: Sat Apr 6 12:14:47 2024 +0200

    uboot-mediatek: add support for OpenWrt One
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 package/boot/uboot-mediatek/Makefile               |   27 +
 .../patches/453-add-openwrt-one.patch              | 3949 ++++++++++++++++++++
 2 files changed, 3976 insertions(+)

diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile
index 470b4db4fa..057dd9c6c8 100644
--- a/package/boot/uboot-mediatek/Makefile
+++ b/package/boot/uboot-mediatek/Makefile
@@ -267,6 +267,31 @@ define U-Boot/mt7981_jcg_q30-pro
   DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
 endef
 
+define U-Boot/mt7981_openwrt_one-snand
+  NAME:=OpenWrt One NAND
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=openwrt_one
+  UBOOT_CONFIG:=mt7981_openwrt-one-spi-nand
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=spim-nand-ubi
+  BL2_SOC:=mt7981
+  BL2_DDRTYPE:=ddr4
+  DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ubi-ddr4
+endef
+
+define U-Boot/mt7981_openwrt_one-nor
+  NAME:=OpenWrt One NOR
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=openwrt_one
+  UBOOT_CONFIG:=mt7981_openwrt-one-nor
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=nor
+  BL2_SOC:=mt7981
+  BL2_DDRTYPE:=ddr4
+  FIP_COMPRESS:=1
+  DEPENDS:=+trusted-firmware-a-mt7981-nor-ddr4
+endef
+
 define U-Boot/mt7981_rfb-spim-nand
   NAME:=MT7981 Reference Board
   BUILD_SUBTARGET:=filogic
@@ -701,6 +726,8 @@ UBOOT_TARGETS := \
 	mt7981_cmcc_rax3000m-nand \
 	mt7981_h3c_magic-nx30-pro \
 	mt7981_jcg_q30-pro \
+	mt7981_openwrt_one-snand \
+	mt7981_openwrt_one-nor \
 	mt7981_rfb-spim-nand \
 	mt7981_rfb-emmc \
 	mt7981_rfb-nor \
diff --git a/package/boot/uboot-mediatek/patches/453-add-openwrt-one.patch b/package/boot/uboot-mediatek/patches/453-add-openwrt-one.patch
new file mode 100644
index 0000000000..25d2733d1c
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/453-add-openwrt-one.patch
@@ -0,0 +1,3949 @@
+--- /dev/null
++++ b/arch/arm/dts/openwrt-one.dts
+@@ -0,0 +1,203 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (c) 2024 John Crispin <john at phrozen.org>
++ */
++
++/dts-v1/;
++#include "mt7981.dtsi"
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++
++/ {
++	#address-cells = <1>;
++	#size-cells = <1>;
++	model = "OpenWrt One";
++	compatible = "openwrt,one", "mediatek,mt7981";
++	chosen {
++		stdout-path = &uart0;
++		tick-timer = &timer0;
++	};
++
++	memory at 40000000 {
++		device_type = "memory";
++		reg = <0x40000000 0x10000000>;
++	};
++
++	keys {
++		compatible = "gpio-keys";
++
++		user {
++			label = "front";
++			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
++			linux,code = <BTN_0>;
++		};
++
++		reset {
++			label = "back";
++			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
++			linux,code = <BTN_1>;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		red {
++			label = "red";
++			gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
++		};
++
++		white {
++			label = "white";
++			gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
++		};
++
++		green {
++			label = "green";
++			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
++		};
++	};
++};
++
++&uart0 {
++	status = "okay";
++};
++
++&eth {
++	status = "okay";
++	mediatek,gmac-id = <1>;
++	phy-mode = "gmii";
++	phy-handle = <&phy0>;
++
++	phy0: eth-phy at 0 {
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <0>;
++	};
++};
++
++&pinctrl {
++	spi_flash_pins: spi0-pins-func-1 {
++		mux {
++			function = "flash";
++			groups = "spi0", "spi0_wp_hold";
++		};
++
++		conf-pu {
++			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
++		};
++
++		conf-pd {
++			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
++		};
++	};
++
++	spi2_flash_pins: spi2-spi2-pins {
++		mux {
++			function = "spi";
++			groups = "spi2", "spi2_wp_hold";
++		};
++
++		conf-pu {
++			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
++		};
++
++		conf-pd {
++			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
++		};
++	};
++};
++
++&spi0 {
++	#address-cells = <1>;
++	#size-cells = <0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&spi_flash_pins>;
++	status = "okay";
++	must_tx;
++	enhance_timing;
++	dma_ext;
++	ipm_design;
++	support_quad;
++	tick_dly = <2>;
++	sample_sel = <0>;
++
++	spi_nand at 0 {
++		compatible = "spi-nand";
++		reg = <0>;
++		spi-max-frequency = <52000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition at 0 {
++				label = "bl2";
++				reg = <0x0 0x100000>;
++			};
++
++			partition at 200000 {
++				label = "ubi";
++				reg = <0x100000 0x7f00000>;
++			};
++		};
++	};
++};
++
++&spi2 {
++	#address-cells = <1>;
++	#size-cells = <0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&spi2_flash_pins>;
++	status = "okay";
++	must_tx;
++	enhance_timing;
++	dma_ext;
++	ipm_design;
++	tick_dly = <2>;
++	sample_sel = <0>;
++
++	spi_nor at 0 {
++		compatible = "jedec,spi-nor";
++		reg = <0>;
++		spi-max-frequency = <5000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition at 00000 {
++				label = "bl2-nor";
++				reg = <0x00000 0x0040000>;
++			};
++
++			partition at 40000 {
++				label = "factory";
++				reg = <0x40000 0x00C0000>;
++			};
++
++			partition at 100000 {
++				label = "fip-nor";
++				reg = <0x100000 0x0080000>;
++			};
++
++			partition at 180000 {
++				label = "recovery";
++				reg = <0x180000 0xc80000>;
++			};
++		};
++	};
++};
++
++&watchdog {
++	status = "disabled";
++};
+--- /dev/null
++++ b/configs/mt7981_openwrt-one-nor_defconfig
+@@ -0,0 +1,1811 @@
++#
++# Automatically generated file; DO NOT EDIT.
++# U-Boot 2024.01 Configuration
++#
++
++#
++# Compiler: aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 13.2.0 r26144+12-219018185e) 13.2.0
++#
++CONFIG_CREATE_ARCH_SYMLINK=y
++CONFIG_SYS_CACHE_SHIFT_6=y
++CONFIG_SYS_CACHELINE_SIZE=64
++CONFIG_LINKER_LIST_ALIGN=8
++# CONFIG_ARC is not set
++CONFIG_ARM=y
++# CONFIG_M68K is not set
++# CONFIG_MICROBLAZE is not set
++# CONFIG_MIPS is not set
++# CONFIG_NIOS2 is not set
++# CONFIG_PPC is not set
++# CONFIG_RISCV is not set
++# CONFIG_SANDBOX is not set
++# CONFIG_SH is not set
++# CONFIG_X86 is not set
++# CONFIG_XTENSA is not set
++CONFIG_SYS_ARCH="arm"
++CONFIG_SYS_CPU="armv8"
++CONFIG_SYS_SOC="mediatek"
++CONFIG_SYS_VENDOR="mediatek"
++CONFIG_SYS_BOARD="mt7981"
++CONFIG_SYS_CONFIG_NAME="mt7981"
++
++#
++# Skipping low level initialization functions
++#
++# CONFIG_SKIP_LOWLEVEL_INIT is not set
++# CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_SYS_NONCACHED_MEMORY=0x100000
++# CONFIG_SYS_ICACHE_OFF is not set
++# CONFIG_SYS_DCACHE_OFF is not set
++
++#
++# ARM architecture
++#
++CONFIG_ARM64=y
++CONFIG_ARM64_CRC32=y
++CONFIG_COUNTER_FREQUENCY=0
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_INIT_SP_RELATIVE=y
++CONFIG_SYS_INIT_SP_BSS_OFFSET=524288
++# CONFIG_GIC_V3_ITS is not set
++CONFIG_STATIC_RELA=y
++CONFIG_DMA_ADDR_T_64BIT=y
++CONFIG_GPIO_EXTRA_HEADER=y
++CONFIG_ARM_ASM_UNIFIED=y
++# CONFIG_SYS_ARM_CACHE_CP15 is not set
++# CONFIG_SYS_ARM_MMU is not set
++# CONFIG_SYS_ARM_MPU is not set
++CONFIG_SYS_ARM_ARCH=8
++CONFIG_SYS_ARM_CACHE_WRITEBACK=y
++# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set
++# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set
++# CONFIG_ARCH_CPU_INIT is not set
++CONFIG_SYS_ARCH_TIMER=y
++CONFIG_ARM_SMCCC=y
++# CONFIG_SYS_L2_PL310 is not set
++# CONFIG_SPL_SYS_L2_PL310 is not set
++# CONFIG_SYS_L2CACHE_OFF is not set
++# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set
++# CONFIG_USE_ARCH_MEMCPY is not set
++# CONFIG_USE_ARCH_MEMSET is not set
++CONFIG_ARM64_SUPPORT_AARCH32=y
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_DAVINCI is not set
++# CONFIG_ARCH_HISTB is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_MVEBU is not set
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_TARGET_STV0991 is not set
++# CONFIG_ARCH_BCM283X is not set
++# CONFIG_ARCH_BCMSTB is not set
++# CONFIG_ARCH_BCMBCA is not set
++# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
++# CONFIG_TARGET_BCMNS is not set
++# CONFIG_TARGET_BCMNS2 is not set
++# CONFIG_TARGET_BCMNS3 is not set
++# CONFIG_ARCH_EXYNOS is not set
++# CONFIG_ARCH_S5PC1XX is not set
++# CONFIG_ARCH_HIGHBANK is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_IPQ40XX is not set
++# CONFIG_ARCH_KEYSTONE is not set
++# CONFIG_ARCH_K3 is not set
++# CONFIG_ARCH_OMAP2PLUS is not set
++# CONFIG_ARCH_MESON is not set
++CONFIG_ARCH_MEDIATEK=y
++# CONFIG_ARCH_LPC32XX is not set
++# CONFIG_ARCH_IMX8 is not set
++# CONFIG_ARCH_IMX8M is not set
++# CONFIG_ARCH_IMX8ULP is not set
++# CONFIG_ARCH_IMX9 is not set
++# CONFIG_ARCH_IMXRT is not set
++# CONFIG_ARCH_MX23 is not set
++# CONFIG_ARCH_MX28 is not set
++# CONFIG_ARCH_MX31 is not set
++# CONFIG_ARCH_MX7ULP is not set
++# CONFIG_ARCH_MX7 is not set
++# CONFIG_ARCH_MX6 is not set
++# CONFIG_ARCH_MX5 is not set
++# CONFIG_ARCH_NEXELL is not set
++# CONFIG_ARCH_NPCM is not set
++# CONFIG_ARCH_APPLE is not set
++# CONFIG_ARCH_OWL is not set
++# CONFIG_ARCH_QEMU is not set
++# CONFIG_ARCH_RMOBILE is not set
++# CONFIG_ARCH_SNAPDRAGON is not set
++# CONFIG_ARCH_SOCFPGA is not set
++# CONFIG_ARCH_SUNXI is not set
++# CONFIG_ARCH_U8500 is not set
++# CONFIG_ARCH_VERSAL is not set
++# CONFIG_ARCH_VERSAL_NET is not set
++# CONFIG_ARCH_VF610 is not set
++# CONFIG_ARCH_ZYNQ is not set
++# CONFIG_ARCH_ZYNQMP_R5 is not set
++# CONFIG_ARCH_ZYNQMP is not set
++# CONFIG_ARCH_TEGRA is not set
++# CONFIG_ARCH_VEXPRESS64 is not set
++# CONFIG_TARGET_CORSTONE1000 is not set
++# CONFIG_TARGET_TOTAL_COMPUTE is not set
++# CONFIG_TARGET_LS2080A_EMU is not set
++# CONFIG_TARGET_LS1088AQDS is not set
++# CONFIG_TARGET_LS2080AQDS is not set
++# CONFIG_TARGET_LS2080ARDB is not set
++# CONFIG_TARGET_LS2081ARDB is not set
++# CONFIG_TARGET_LX2160ARDB is not set
++# CONFIG_TARGET_LX2160AQDS is not set
++# CONFIG_TARGET_LX2162AQDS is not set
++# CONFIG_TARGET_HIKEY is not set
++# CONFIG_TARGET_HIKEY960 is not set
++# CONFIG_TARGET_POPLAR is not set
++# CONFIG_TARGET_LS1012AQDS is not set
++# CONFIG_TARGET_LS1012ARDB is not set
++# CONFIG_TARGET_LS1012A2G5RDB is not set
++# CONFIG_TARGET_LS1012AFRWY is not set
++# CONFIG_TARGET_LS1012AFRDM is not set
++# CONFIG_TARGET_LS1028AQDS is not set
++# CONFIG_TARGET_LS1028ARDB is not set
++# CONFIG_TARGET_LS1088ARDB is not set
++# CONFIG_TARGET_LS1021AQDS is not set
++# CONFIG_TARGET_LS1021ATWR is not set
++# CONFIG_TARGET_PG_WCOM_SELI8 is not set
++# CONFIG_TARGET_PG_WCOM_EXPU1 is not set
++# CONFIG_TARGET_LS1021ATSN is not set
++# CONFIG_TARGET_LS1021AIOT is not set
++# CONFIG_TARGET_LS1043AQDS is not set
++# CONFIG_TARGET_LS1043ARDB is not set
++# CONFIG_TARGET_LS1046AQDS is not set
++# CONFIG_TARGET_LS1046ARDB is not set
++# CONFIG_TARGET_LS1046AFRWY is not set
++# CONFIG_TARGET_SL28 is not set
++# CONFIG_TARGET_TEN64 is not set
++# CONFIG_ARCH_UNIPHIER is not set
++# CONFIG_ARCH_SYNQUACER is not set
++# CONFIG_ARCH_STM32 is not set
++# CONFIG_ARCH_STI is not set
++# CONFIG_ARCH_STM32MP is not set
++# CONFIG_ARCH_ROCKCHIP is not set
++# CONFIG_ARCH_OCTEONTX is not set
++# CONFIG_ARCH_OCTEONTX2 is not set
++# CONFIG_TARGET_THUNDERX_88XX is not set
++# CONFIG_ARCH_ASPEED is not set
++# CONFIG_TARGET_DURIAN is not set
++# CONFIG_TARGET_POMELO is not set
++# CONFIG_TARGET_PRESIDIO_ASIC is not set
++# CONFIG_TARGET_XENGUEST_ARM64 is not set
++# CONFIG_ARCH_GXP is not set
++# CONFIG_STATIC_MACH_TYPE is not set
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_LEN=0x400000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_ENV_SOURCE_FILE=""
++CONFIG_SF_DEFAULT_SPEED=1000000
++CONFIG_SF_DEFAULT_MODE=0x0
++CONFIG_ENV_SIZE=0x8000
++CONFIG_DM_GPIO=y
++CONFIG_DEFAULT_DEVICE_TREE="openwrt-one"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000
++CONFIG_DM_RESET=y
++CONFIG_SYS_MONITOR_LEN=0
++# CONFIG_MT8512 is not set
++# CONFIG_TARGET_MT7622 is not set
++# CONFIG_TARGET_MT7623 is not set
++# CONFIG_TARGET_MT7629 is not set
++CONFIG_TARGET_MT7981=y
++# CONFIG_TARGET_MT7986 is not set
++# CONFIG_TARGET_MT7988 is not set
++# CONFIG_TARGET_MT8183 is not set
++# CONFIG_TARGET_MT8512 is not set
++# CONFIG_TARGET_MT8516 is not set
++# CONFIG_TARGET_MT8518 is not set
++CONFIG_MTK_BROM_HEADER_INFO="media=snand;nandinfo=2k+64"
++CONFIG_RESET_BUTTON_LABEL="back"
++CONFIG_RESET_BUTTON_SETTLE_DELAY=0
++CONFIG_ERR_PTR_OFFSET=0x0
++# CONFIG_SPL is not set
++CONFIG_BOOTSTAGE_STASH_ADDR=0x0
++CONFIG_DEBUG_UART_BASE=0x11002000
++CONFIG_DEBUG_UART_CLOCK=40000000
++# CONFIG_DEBUG_UART_BOARD_INIT is not set
++CONFIG_IDENT_STRING=""
++CONFIG_SYS_CLK_FREQ=0
++# CONFIG_CHIP_DIP_SCAN is not set
++# CONFIG_CMO_BY_VA_ONLY is not set
++# CONFIG_ARMV8_MULTIENTRY is not set
++# CONFIG_ARMV8_SET_SMPEN is not set
++# CONFIG_ARMV8_SWITCH_TO_EL1 is not set
++
++#
++# ARMv8 secure monitor firmware
++#
++# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set
++CONFIG_PSCI_RESET=y
++# CONFIG_ARMV8_PSCI is not set
++# CONFIG_ARMV8_EA_EL3_FIRST is not set
++# CONFIG_ARMV8_CRYPTO is not set
++# CONFIG_CMD_DEKBLOB is not set
++# CONFIG_IMX_CAAM_DEK_ENCAP is not set
++# CONFIG_IMX_OPTEE_DEK_ENCAP is not set
++# CONFIG_IMX_SECO_DEK_ENCAP is not set
++# CONFIG_IMX_ELE_DEK_ENCAP is not set
++# CONFIG_CMD_HDMIDETECT is not set
++CONFIG_IMX_DCD_ADDR=0x00910000
++CONFIG_SYS_MEM_TOP_HIDE=0x0
++CONFIG_SYS_LOAD_ADDR=0x46000000
++
++#
++# ARM debug
++#
++CONFIG_BUILD_TARGET=""
++# CONFIG_PCI is not set
++CONFIG_FWU_NUM_BANKS=2
++CONFIG_FWU_NUM_IMAGES_PER_BANK=2
++CONFIG_DEBUG_UART=y
++# CONFIG_AHCI is not set
++# CONFIG_OF_BOARD_FIXUP is not set
++
++#
++# Functionality shared between NXP SoCs
++#
++# CONFIG_NXP_ESBC is not set
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_CC_IS_GCC=y
++CONFIG_GCC_VERSION=130200
++CONFIG_CLANG_VERSION=0
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set
++# CONFIG_CC_OPTIMIZE_FOR_DEBUG is not set
++# CONFIG_OPTIMIZE_INLINING is not set
++CONFIG_ARCH_SUPPORTS_LTO=y
++# CONFIG_LTO is not set
++CONFIG_CC_HAS_ASM_INLINE=y
++# CONFIG_XEN is not set
++# CONFIG_ENV_VARS_UBOOT_CONFIG is not set
++# CONFIG_SYS_BOOT_GET_CMDLINE is not set
++# CONFIG_SYS_BOOT_GET_KBD is not set
++CONFIG_SYS_MALLOC_F=y
++# CONFIG_VALGRIND is not set
++CONFIG_EXPERT=y
++CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
++# CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set
++# CONFIG_TOOLS_DEBUG is not set
++CONFIG_PHYS_64BIT=y
++CONFIG_FDT_64BIT=y
++# CONFIG_REMAKE_ELF is not set
++# CONFIG_HAS_BOARD_SIZE_LIMIT is not set
++# CONFIG_SYS_CUSTOM_LDSCRIPT is not set
++CONFIG_PLATFORM_ELFENTRY="_start"
++CONFIG_STACK_SIZE=0x1000000
++CONFIG_SYS_SRAM_BASE=0x0
++CONFIG_SYS_SRAM_SIZE=0x0
++# CONFIG_MP is not set
++CONFIG_HAVE_TEXT_BASE=y
++# CONFIG_HAVE_SYS_UBOOT_START is not set
++CONFIG_SYS_UBOOT_START=0x41e00000
++# CONFIG_DYNAMIC_SYS_CLK_FREQ is not set
++# CONFIG_API is not set
++
++#
++# Boot options
++#
++
++#
++# Boot images
++#
++# CONFIG_ANDROID_BOOT_IMAGE is not set
++# CONFIG_TIMESTAMP is not set
++CONFIG_FIT=y
++CONFIG_FIT_EXTERNAL_OFFSET=0x0
++CONFIG_FIT_FULL_CHECK=y
++# CONFIG_FIT_SIGNATURE is not set
++# CONFIG_FIT_CIPHER is not set
++# CONFIG_FIT_VERBOSE is not set
++# CONFIG_FIT_BEST_MATCH is not set
++CONFIG_FIT_PRINT=y
++# CONFIG_SPL_LOAD_FIT_FULL is not set
++CONFIG_PXE_UTILS=y
++CONFIG_BOOTSTD=y
++# CONFIG_BOOTSTD_FULL is not set
++# CONFIG_BOOTSTD_DEFAULTS is not set
++CONFIG_BOOTSTD_BOOTCOMMAND=y
++CONFIG_BOOTMETH_GLOBAL=y
++# CONFIG_BOOTMETH_CROS is not set
++CONFIG_BOOTMETH_EXTLINUX=y
++CONFIG_BOOTMETH_EXTLINUX_PXE=y
++CONFIG_BOOTMETH_EFILOADER=y
++CONFIG_BOOTMETH_VBE=y
++CONFIG_BOOTMETH_VBE_REQUEST=y
++CONFIG_BOOTMETH_VBE_SIMPLE=y
++CONFIG_BOOTMETH_VBE_SIMPLE_OS=y
++# CONFIG_BOOTMETH_SCRIPT is not set
++CONFIG_LEGACY_IMAGE_FORMAT=y
++# CONFIG_SUPPORT_RAW_INITRD is not set
++# CONFIG_CHROMEOS is not set
++# CONFIG_CHROMEOS_VBOOT is not set
++# CONFIG_RAMBOOT_PBL is not set
++CONFIG_SYS_BOOT_RAMDISK_HIGH=y
++# CONFIG_DISTRO_DEFAULTS is not set
++
++#
++# Boot timing
++#
++# CONFIG_BOOTSTAGE is not set
++CONFIG_BOOTSTAGE_STASH_SIZE=0x1000
++# CONFIG_SHOW_BOOT_PROGRESS is not set
++
++#
++# Boot media
++#
++CONFIG_NAND_BOOT=y
++# CONFIG_ONENAND_BOOT is not set
++# CONFIG_QSPI_BOOT is not set
++# CONFIG_SATA_BOOT is not set
++# CONFIG_SD_BOOT is not set
++# CONFIG_SD_BOOT_QSPI is not set
++CONFIG_SPI_BOOT=y
++
++#
++# Autoboot options
++#
++CONFIG_AUTOBOOT=y
++CONFIG_BOOTDELAY=2
++# CONFIG_AUTOBOOT_KEYED is not set
++# CONFIG_AUTOBOOT_USE_MENUKEY is not set
++CONFIG_AUTOBOOT_MENU_SHOW=y
++# CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is not set
++# CONFIG_BOOT_RETRY is not set
++
++#
++# Image support
++#
++# CONFIG_IMAGE_PRE_LOAD is not set
++
++#
++# Devicetree fixup
++#
++# CONFIG_OF_BOARD_SETUP is not set
++# CONFIG_OF_SYSTEM_SETUP is not set
++# CONFIG_OF_STDOUT_VIA_ALIAS is not set
++# CONFIG_FDT_FIXUP_PARTITIONS is not set
++# CONFIG_FDT_SIMPLEFB is not set
++CONFIG_ARCH_FIXUP_FDT_MEMORY=y
++# CONFIG_USE_BOOTARGS is not set
++# CONFIG_BOOTARGS_SUBST is not set
++# CONFIG_USE_BOOTCOMMAND is not set
++CONFIG_USE_PREBOOT=y
++CONFIG_DEFAULT_FDT_FILE="openwrt-one"
++# CONFIG_SAVE_PREV_BL_FDT_ADDR is not set
++# CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set
++
++#
++# Configuration editor
++#
++# CONFIG_CEDIT is not set
++
++#
++# Console
++#
++CONFIG_MENU=y
++# CONFIG_CONSOLE_RECORD is not set
++# CONFIG_DISABLE_CONSOLE is not set
++CONFIG_LOGLEVEL=7
++# CONFIG_SILENT_CONSOLE is not set
++# CONFIG_SPL_SILENT_CONSOLE is not set
++# CONFIG_TPL_SILENT_CONSOLE is not set
++# CONFIG_PRE_CONSOLE_BUFFER is not set
++CONFIG_CONSOLE_FLUSH_SUPPORT=y
++# CONFIG_CONSOLE_FLUSH_ON_NEWLINE is not set
++# CONFIG_CONSOLE_MUX is not set
++# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set
++# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set
++# CONFIG_SYS_CONSOLE_INFO_QUIET is not set
++# CONFIG_SYS_STDIO_DEREGISTER is not set
++# CONFIG_SPL_SYS_STDIO_DEREGISTER is not set
++# CONFIG_SYS_DEVICE_NULLDEV is not set
++
++#
++# Logging
++#
++CONFIG_LOG=y
++CONFIG_LOG_MAX_LEVEL=6
++CONFIG_LOG_DEFAULT_LEVEL=6
++CONFIG_LOG_CONSOLE=y
++# CONFIG_LOGF_FILE is not set
++# CONFIG_LOGF_LINE is not set
++# CONFIG_LOGF_FUNC is not set
++CONFIG_LOGF_FUNC_PAD=20
++# CONFIG_LOG_SYSLOG is not set
++# CONFIG_LOG_ERROR_RETURN is not set
++
++#
++# Init options
++#
++# CONFIG_BOARD_TYPES is not set
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DISPLAY_BOARDINFO=y
++# CONFIG_DISPLAY_BOARDINFO_LATE is not set
++
++#
++# Start-up hooks
++#
++# CONFIG_CYCLIC is not set
++CONFIG_EVENT=y
++CONFIG_EVENT_DYNAMIC=y
++# CONFIG_EVENT_DEBUG is not set
++# CONFIG_ARCH_MISC_INIT is not set
++# CONFIG_BOARD_EARLY_INIT_F is not set
++# CONFIG_BOARD_EARLY_INIT_R is not set
++# CONFIG_BOARD_POSTCLK_INIT is not set
++CONFIG_BOARD_LATE_INIT=y
++# CONFIG_CLOCKS is not set
++# CONFIG_HWCONFIG is not set
++CONFIG_LAST_STAGE_INIT=y
++# CONFIG_MISC_INIT_R is not set
++# CONFIG_SYS_MALLOC_BOOTPARAMS is not set
++# CONFIG_ID_EEPROM is not set
++# CONFIG_RESET_PHY_R is not set
++
++#
++# Security support
++#
++CONFIG_HASH=y
++# CONFIG_STACKPROTECTOR is not set
++# CONFIG_BOARD_RNG_SEED is not set
++
++#
++# Update support
++#
++# CONFIG_UPDATE_TFTP is not set
++# CONFIG_ANDROID_AB is not set
++
++#
++# Blob list
++#
++# CONFIG_BLOBLIST is not set
++CONFIG_SUPPORT_SPL=y
++# CONFIG_VPL is not set
++
++#
++# Command line interface
++#
++CONFIG_CMDLINE=y
++CONFIG_HUSH_PARSER=y
++CONFIG_CMDLINE_EDITING=y
++# CONFIG_CMDLINE_PS_SUPPORT is not set
++CONFIG_AUTO_COMPLETE=y
++CONFIG_SYS_LONGHELP=y
++CONFIG_SYS_PROMPT="OpenWrt One> "
++CONFIG_SYS_PROMPT_HUSH_PS2="> "
++CONFIG_SYS_MAXARGS=16
++CONFIG_SYS_CBSIZE=512
++CONFIG_SYS_PBSIZE=1049
++CONFIG_SYS_XTRACE=y
++CONFIG_BUILD_BIN2C=y
++
++#
++# Commands
++#
++
++#
++# Info commands
++#
++CONFIG_CMD_BDI=y
++# CONFIG_CMD_BDINFO_EXTRA is not set
++# CONFIG_CMD_CONFIG is not set
++CONFIG_CMD_CONSOLE=y
++CONFIG_CMD_CPU=y
++# CONFIG_CMD_HISTORY is not set
++CONFIG_CMD_LICENSE=y
++# CONFIG_CMD_PMC is not set
++
++#
++# Boot commands
++#
++CONFIG_CMD_BOOTD=y
++CONFIG_CMD_BOOTM=y
++# CONFIG_CMD_BOOTDEV is not set
++CONFIG_CMD_BOOTFLOW=y
++# CONFIG_CMD_BOOTMETH is not set
++CONFIG_BOOTM_EFI=y
++# CONFIG_CMD_BOOTZ is not set
++CONFIG_CMD_BOOTI=y
++CONFIG_BOOTM_LINUX=y
++# CONFIG_BOOTM_NETBSD is not set
++# CONFIG_BOOTM_OPENRTOS is not set
++# CONFIG_BOOTM_OSE is not set
++# CONFIG_BOOTM_PLAN9 is not set
++# CONFIG_BOOTM_RTEMS is not set
++# CONFIG_CMD_VBE is not set
++# CONFIG_BOOTM_VXWORKS is not set
++CONFIG_SYS_BOOTM_LEN=0x4000000
++CONFIG_CMD_BOOTEFI=y
++CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
++# CONFIG_CMD_BOOTEFI_HELLO is not set
++# CONFIG_CMD_BOOTEFI_SELFTEST is not set
++CONFIG_CMD_BOOTMENU=y
++# CONFIG_CMD_ADTIMG is not set
++CONFIG_CMD_ELF=y
++CONFIG_CMD_FDT=y
++CONFIG_CMD_GO=y
++CONFIG_CMD_RUN=y
++CONFIG_CMD_IMI=y
++# CONFIG_CMD_IMLS is not set
++CONFIG_CMD_XIMG=y
++# CONFIG_CMD_ZBOOT is not set
++
++#
++# Environment commands
++#
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_EXPORTENV=y
++CONFIG_CMD_IMPORTENV=y
++CONFIG_CMD_EDITENV=y
++# CONFIG_CMD_GREPENV is not set
++CONFIG_CMD_SAVEENV=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_ENV_EXISTS=y
++CONFIG_CMD_ENV_READMEM=y
++# CONFIG_CMD_ENV_CALLBACK is not set
++CONFIG_CMD_ENV_FLAGS=y
++# CONFIG_CMD_NVEDIT_EFI is not set
++# CONFIG_CMD_NVEDIT_INDIRECT is not set
++# CONFIG_CMD_NVEDIT_INFO is not set
++# CONFIG_CMD_NVEDIT_LOAD is not set
++# CONFIG_CMD_NVEDIT_SELECT is not set
++
++#
++# Memory commands
++#
++# CONFIG_CMD_BINOP is not set
++# CONFIG_CMD_BLOBLIST is not set
++CONFIG_CMD_CRC32=y
++# CONFIG_CRC32_VERIFY is not set
++# CONFIG_CMD_EEPROM is not set
++# CONFIG_LOOPW is not set
++# CONFIG_CMD_MD5SUM is not set
++# CONFIG_CMD_MEMINFO is not set
++CONFIG_CMD_MEMORY=y
++# CONFIG_CMD_MEM_SEARCH is not set
++# CONFIG_CMD_MX_CYCLIC is not set
++CONFIG_CMD_RANDOM=y
++# CONFIG_CMD_MEMTEST is not set
++# CONFIG_CMD_SHA1SUM is not set
++CONFIG_CMD_STRINGS=y
++
++#
++# Compression commands
++#
++CONFIG_CMD_LZMADEC=y
++# CONFIG_CMD_UNLZ4 is not set
++# CONFIG_CMD_UNZIP is not set
++# CONFIG_CMD_ZIP is not set
++
++#
++# Device access commands
++#
++# CONFIG_CMD_ARMFLASH is not set
++# CONFIG_CMD_BIND is not set
++# CONFIG_CMD_CLK is not set
++# CONFIG_CMD_DEMO is not set
++# CONFIG_CMD_DFU is not set
++CONFIG_CMD_DM=y
++CONFIG_CMD_FLASH=y
++# CONFIG_CMD_FPGAD is not set
++# CONFIG_CMD_FUSE is not set
++CONFIG_CMD_GPIO=y
++# CONFIG_CMD_GPIO_READ is not set
++CONFIG_CMD_PWM=y
++# CONFIG_CMD_GPT is not set
++# CONFIG_RANDOM_UUID is not set
++# CONFIG_CMD_IDE is not set
++# CONFIG_CMD_IO is not set
++# CONFIG_CMD_IOTRACE is not set
++# CONFIG_CMD_I2C is not set
++CONFIG_CMD_LOADB=y
++# CONFIG_CMD_LOADM is not set
++CONFIG_CMD_LOADS=y
++# CONFIG_LOADS_ECHO is not set
++# CONFIG_CMD_SAVES is not set
++# CONFIG_SYS_LOADS_BAUD_CHANGE is not set
++CONFIG_CMD_LOADXY_TIMEOUT=90
++# CONFIG_CMD_LSBLK is not set
++# CONFIG_CMD_MBR is not set
++# CONFIG_CMD_CLONE is not set
++CONFIG_CMD_MTD=y
++CONFIG_CMD_NAND_EXT=y
++# CONFIG_CMD_ONENAND is not set
++# CONFIG_CMD_OSD is not set
++# CONFIG_CMD_PART is not set
++CONFIG_CMD_PCI=y
++CONFIG_CMD_PINMUX=y
++# CONFIG_CMD_POWEROFF is not set
++# CONFIG_CMD_READ is not set
++# CONFIG_CMD_SATA is not set
++# CONFIG_CMD_SDRAM is not set
++CONFIG_CMD_SF=y
++CONFIG_CMD_SF_TEST=y
++# CONFIG_CMD_SPI is not set
++# CONFIG_CMD_TSI148 is not set
++# CONFIG_CMD_UNIVERSE is not set
++CONFIG_CMD_USB=y
++# CONFIG_CMD_USB_SDP is not set
++# CONFIG_CMD_RKMTD is not set
++# CONFIG_CMD_WRITE is not set
++
++#
++# Shell scripting commands
++#
++# CONFIG_CMD_CAT is not set
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_SETEXPR=y
++# CONFIG_CMD_SETEXPR_FMT is not set
++# CONFIG_CMD_XXD is not set
++
++#
++# Android support commands
++#
++CONFIG_CMD_NET=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_DHCP=y
++# CONFIG_BOOTP_MAY_FAIL is not set
++CONFIG_BOOTP_BOOTPATH=y
++# CONFIG_BOOTP_VENDOREX is not set
++# CONFIG_BOOTP_BOOTFILESIZE is not set
++CONFIG_BOOTP_DNS=y
++# CONFIG_BOOTP_DNS2 is not set
++CONFIG_BOOTP_GATEWAY=y
++CONFIG_BOOTP_HOSTNAME=y
++# CONFIG_BOOTP_PREFER_SERVERIP is not set
++CONFIG_BOOTP_SUBNETMASK=y
++# CONFIG_BOOTP_NISDOMAIN is not set
++# CONFIG_BOOTP_NTPSERVER is not set
++# CONFIG_BOOTP_TIMEOFFSET is not set
++# CONFIG_CMD_PCAP is not set
++CONFIG_BOOTP_PXE=y
++CONFIG_BOOTP_PXE_CLIENTARCH=0x16
++# CONFIG_BOOTP_PXE_DHCP_OPTION is not set
++CONFIG_BOOTP_VCI_STRING="U-Boot.armv8"
++CONFIG_CMD_TFTPBOOT=y
++# CONFIG_CMD_TFTPPUT is not set
++CONFIG_CMD_TFTPSRV=y
++CONFIG_NET_TFTP_VARS=y
++CONFIG_CMD_RARP=y
++# CONFIG_CMD_NFS is not set
++# CONFIG_SYS_DISABLE_AUTOLOAD is not set
++# CONFIG_CMD_WGET is not set
++# CONFIG_CMD_MII is not set
++# CONFIG_CMD_MDIO is not set
++CONFIG_CMD_PING=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_ETHSW is not set
++CONFIG_CMD_PXE=y
++# CONFIG_CMD_WOL is not set
++
++#
++# Misc commands
++#
++# CONFIG_CMD_2048 is not set
++# CONFIG_CMD_BSP is not set
++CONFIG_CMD_BLOCK_CACHE=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++# CONFIG_CMD_CONITRACE is not set
++# CONFIG_CMD_CLS is not set
++# CONFIG_CMD_EFIDEBUG is not set
++CONFIG_CMD_EFICONFIG=y
++# CONFIG_CMD_EXCEPTION is not set
++CONFIG_CMD_LED=y
++# CONFIG_CMD_INI is not set
++# CONFIG_CMD_DATE is not set
++# CONFIG_CMD_TIME is not set
++# CONFIG_CMD_GETTIME is not set
++# CONFIG_CMD_PAUSE is not set
++CONFIG_CMD_SLEEP=y
++# CONFIG_CMD_TIMER is not set
++# CONFIG_CMD_SYSBOOT is not set
++# CONFIG_CMD_QFW is not set
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_PSTORE_MEM_SIZE=0x10000
++CONFIG_CMD_PSTORE_RECORD_SIZE=0x1000
++CONFIG_CMD_PSTORE_CONSOLE_SIZE=0x1000
++CONFIG_CMD_PSTORE_FTRACE_SIZE=0x1000
++CONFIG_CMD_PSTORE_PMSG_SIZE=0x1000
++CONFIG_CMD_PSTORE_ECC_SIZE=0
++# CONFIG_CMD_TERMINAL is not set
++CONFIG_CMD_UUID=y
++
++#
++# TI specific command line interface
++#
++
++#
++# Power commands
++#
++
++#
++# Security commands
++#
++# CONFIG_CMD_AES is not set
++# CONFIG_CMD_BLOB is not set
++CONFIG_CMD_HASH=y
++# CONFIG_CMD_HVC is not set
++CONFIG_CMD_SMC=y
++# CONFIG_HASH_VERIFY is not set
++
++#
++# Firmware commands
++#
++
++#
++# Filesystem commands
++#
++# CONFIG_CMD_BTRFS is not set
++# CONFIG_CMD_EROFS is not set
++# CONFIG_CMD_EXT2 is not set
++# CONFIG_CMD_EXT4 is not set
++CONFIG_CMD_FAT=y
++# CONFIG_CMD_SQUASHFS is not set
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
++# CONFIG_CMD_JFFS2 is not set
++# CONFIG_CMD_MTDPARTS is not set
++CONFIG_MTDIDS_DEFAULT=""
++CONFIG_MTDPARTS_DEFAULT=""
++# CONFIG_CMD_REISER is not set
++# CONFIG_CMD_ZFS is not set
++
++#
++# Debug commands
++#
++# CONFIG_CMD_DIAG is not set
++# CONFIG_CMD_EVENT is not set
++# CONFIG_CMD_LOG is not set
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++
++#
++# Partition Types
++#
++CONFIG_PARTITIONS=y
++# CONFIG_MAC_PARTITION is not set
++CONFIG_DOS_PARTITION=y
++# CONFIG_ISO_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_EFI_PARTITION is not set
++CONFIG_PARTITION_UUIDS=y
++CONFIG_SUPPORT_OF_CONTROL=y
++
++#
++# Device Tree Control
++#
++CONFIG_OF_CONTROL=y
++CONFIG_OF_REAL=y
++# CONFIG_OF_LIVE is not set
++CONFIG_OF_SEPARATE=y
++# CONFIG_OF_EMBED is not set
++# CONFIG_OF_BOARD is not set
++# CONFIG_OF_OMIT_DTB is not set
++CONFIG_DEVICE_TREE_INCLUDES=""
++CONFIG_OF_LIST="openwrt-one"
++# CONFIG_MULTI_DTB_FIT is not set
++CONFIG_OF_TAG_MIGRATE=y
++# CONFIG_OF_DTB_PROPS_REMOVE is not set
++
++#
++# Environment
++#
++CONFIG_ENV_SUPPORT=y
++CONFIG_SAVEENV=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_MIN_ENTRIES=64
++CONFIG_ENV_MAX_ENTRIES=512
++CONFIG_ENV_IS_DEFAULT=y
++CONFIG_ENV_IS_NOWHERE=y
++# CONFIG_ENV_IS_IN_EEPROM is not set
++# CONFIG_ENV_IS_IN_FAT is not set
++# CONFIG_ENV_IS_IN_EXT4 is not set
++# CONFIG_ENV_IS_IN_FLASH is not set
++# CONFIG_ENV_IS_IN_MTD is not set
++# CONFIG_ENV_IS_IN_NAND is not set
++# CONFIG_ENV_IS_IN_NVRAM is not set
++# CONFIG_ENV_IS_IN_ONENAND is not set
++# CONFIG_ENV_IS_IN_REMOTE is not set
++# CONFIG_ENV_IS_IN_SPI_FLASH is not set
++# CONFIG_ENV_IS_IN_UBI is not set
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_DEFAULT_ENV_FILE="openwrt-one-nor_env"
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++# CONFIG_ENV_IMPORT_FDT is not set
++# CONFIG_ENV_APPEND is not set
++# CONFIG_ENV_WRITEABLE_LIST is not set
++# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set
++# CONFIG_USE_BOOTFILE is not set
++# CONFIG_USE_ETHPRIME is not set
++# CONFIG_USE_HOSTNAME is not set
++# CONFIG_VERSION_VARIABLE is not set
++CONFIG_NET=y
++CONFIG_ARP_TIMEOUT=5000
++CONFIG_NET_RETRY_COUNT=5
++CONFIG_PROT_UDP=y
++CONFIG_BOOTDEV_ETH=y
++# CONFIG_BOOTP_SEND_HOSTNAME is not set
++CONFIG_NET_RANDOM_ETHADDR=y
++# CONFIG_NETCONSOLE is not set
++# CONFIG_IP_DEFRAG is not set
++# CONFIG_SYS_FAULT_ECHO_LINK_DOWN is not set
++CONFIG_TFTP_BLOCKSIZE=1468
++# CONFIG_TFTP_PORT is not set
++CONFIG_TFTP_WINDOWSIZE=1
++# CONFIG_TFTP_TSIZE is not set
++# CONFIG_SERVERIP_FROM_PROXYDHCP is not set
++CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100
++# CONFIG_KEEP_SERVERADDR is not set
++# CONFIG_UDP_CHECKSUM is not set
++# CONFIG_BOOTP_SERVERIP is not set
++CONFIG_BOOTP_MAX_ROOT_PATH_LEN=64
++# CONFIG_USE_GATEWAYIP is not set
++# CONFIG_USE_IPADDR is not set
++# CONFIG_USE_NETMASK is not set
++# CONFIG_USE_ROOTPATH is not set
++# CONFIG_USE_SERVERIP is not set
++# CONFIG_PROT_TCP is not set
++# CONFIG_IPV6 is not set
++CONFIG_SYS_RX_ETH_BUFFER=4
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_DM=y
++# CONFIG_DM_WARN is not set
++# CONFIG_DM_DEBUG is not set
++# CONFIG_DM_STATS is not set
++CONFIG_DM_DEVICE_REMOVE=y
++CONFIG_DM_EVENT=y
++CONFIG_DM_STDIO=y
++CONFIG_DM_SEQ_ALIAS=y
++# CONFIG_DM_DMA is not set
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++# CONFIG_DEVRES is not set
++CONFIG_SIMPLE_BUS=y
++# CONFIG_SIMPLE_BUS_CORRECT_RANGE is not set
++# CONFIG_SIMPLE_PM_BUS is not set
++CONFIG_OF_TRANSLATE=y
++# CONFIG_TRANSLATION_OFFSET is not set
++CONFIG_DM_DEV_READ_INLINE=y
++# CONFIG_OFNODE_MULTI_TREE is not set
++# CONFIG_BOUNCE_BUFFER is not set
++# CONFIG_ADC is not set
++# CONFIG_ADC_EXYNOS is not set
++# CONFIG_ADC_SANDBOX is not set
++# CONFIG_SARADC_MESON is not set
++# CONFIG_SARADC_ROCKCHIP is not set
++# CONFIG_SATA is not set
++# CONFIG_SCSI_AHCI is not set
++
++#
++# SATA/SCSI device support
++#
++# CONFIG_AXI is not set
++
++#
++# Bus devices
++#
++CONFIG_BLK=y
++CONFIG_BLOCK_CACHE=y
++# CONFIG_BLKMAP is not set
++# CONFIG_EFI_MEDIA is not set
++# CONFIG_IDE is not set
++# CONFIG_LBA48 is not set
++# CONFIG_SYS_64BIT_LBA is not set
++# CONFIG_RKMTD is not set
++# CONFIG_BOOTCOUNT_LIMIT is not set
++
++#
++# Button Support
++#
++CONFIG_BUTTON=y
++# CONFIG_BUTTON_ADC is not set
++CONFIG_BUTTON_GPIO=y
++
++#
++# Cache Controller drivers
++#
++# CONFIG_CACHE is not set
++# CONFIG_L2X0_CACHE is not set
++# CONFIG_V5L2_CACHE is not set
++# CONFIG_NCORE_CACHE is not set
++# CONFIG_SIFIVE_CCACHE is not set
++
++#
++# Clock
++#
++CONFIG_CLK=y
++# CONFIG_CLK_CCF is not set
++# CONFIG_CLK_GPIO is not set
++# CONFIG_CLK_CDCE9XX is not set
++# CONFIG_CLK_ICS8N3QV01 is not set
++# CONFIG_CLK_K210 is not set
++# CONFIG_CLK_MPC83XX is not set
++# CONFIG_CLK_XLNX_CLKWZRD is not set
++# CONFIG_CLK_AT91 is not set
++# CONFIG_CLK_RCAR is not set
++# CONFIG_CLK_RCAR_CPG_LIB is not set
++# CONFIG_CLK_SIFIVE is not set
++# CONFIG_CLK_TI_AM3_DPLL is not set
++# CONFIG_CLK_TI_CTRL is not set
++# CONFIG_CLK_TI_GATE is not set
++# CONFIG_CLK_K3 is not set
++CONFIG_CPU=y
++# CONFIG_CPU_IMX is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_DM_HASH is not set
++# CONFIG_FSL_CAAM is not set
++CONFIG_CAAM_64BIT=y
++# CONFIG_SYS_FSL_SEC_BE is not set
++# CONFIG_SYS_FSL_SEC_LE is not set
++# CONFIG_NPCM_AES is not set
++# CONFIG_NPCM_SHA is not set
++# CONFIG_DDR_SPD is not set
++# CONFIG_IMX_SNPS_DDR_PHY is not set
++
++#
++# Demo for driver model
++#
++# CONFIG_DM_DEMO is not set
++
++#
++# DFU support
++#
++
++#
++# DMA Support
++#
++# CONFIG_DMA is not set
++# CONFIG_DMA_LPC32XX is not set
++# CONFIG_TI_EDMA3 is not set
++# CONFIG_DMA_LEGACY is not set
++
++#
++# Extcon Support
++#
++# CONFIG_EXTCON is not set
++
++#
++# Fastboot support
++#
++# CONFIG_UDP_FUNCTION_FASTBOOT is not set
++# CONFIG_TCP_FUNCTION_FASTBOOT is not set
++CONFIG_FIRMWARE=y
++CONFIG_ARM_PSCI_FW=y
++# CONFIG_ZYNQMP_FIRMWARE is not set
++# CONFIG_ARM_SMCCC_FEATURES is not set
++# CONFIG_ARM_FFA_TRANSPORT is not set
++# CONFIG_SCMI_FIRMWARE is not set
++# CONFIG_DM_FUZZING_ENGINE is not set
++
++#
++# FPGA support
++#
++# CONFIG_FPGA_ALTERA is not set
++# CONFIG_FPGA_SOCFPGA is not set
++# CONFIG_FPGA_LATTICE is not set
++# CONFIG_FPGA_XILINX is not set
++# CONFIG_DM_FPGA is not set
++# CONFIG_FWU_MDATA is not set
++CONFIG_GPIO=y
++CONFIG_GPIO_HOG=y
++# CONFIG_DM_GPIO_LOOKUP_LABEL is not set
++# CONFIG_ALTERA_PIO is not set
++# CONFIG_BCM2835_GPIO is not set
++# CONFIG_DWAPB_GPIO is not set
++# CONFIG_AT91_GPIO is not set
++# CONFIG_ATMEL_PIO4 is not set
++# CONFIG_ASPEED_GPIO is not set
++# CONFIG_DA8XX_GPIO is not set
++# CONFIG_HIKEY_GPIO is not set
++# CONFIG_INTEL_BROADWELL_GPIO is not set
++# CONFIG_INTEL_GPIO is not set
++# CONFIG_INTEL_ICH6_GPIO is not set
++# CONFIG_IMX_RGPIO2P is not set
++# CONFIG_IPROC_GPIO is not set
++# CONFIG_HSDK_CREG_GPIO is not set
++# CONFIG_KIRKWOOD_GPIO is not set
++# CONFIG_LPC32XX_GPIO is not set
++# CONFIG_MCP230XX_GPIO is not set
++# CONFIG_MSM_GPIO is not set
++# CONFIG_MXC_GPIO is not set
++# CONFIG_MXS_GPIO is not set
++# CONFIG_NPCM_GPIO is not set
++# CONFIG_CMD_PCA953X is not set
++# CONFIG_ROCKCHIP_GPIO is not set
++# CONFIG_XILINX_GPIO is not set
++# CONFIG_TCA642X is not set
++# CONFIG_TEGRA_GPIO is not set
++# CONFIG_TEGRA186_GPIO is not set
++# CONFIG_VYBRID_GPIO is not set
++# CONFIG_SIFIVE_GPIO is not set
++# CONFIG_ZYNQ_GPIO is not set
++# CONFIG_DM_74X164 is not set
++# CONFIG_PCA953X is not set
++# CONFIG_MPC8XXX_GPIO is not set
++# CONFIG_MPC8XX_GPIO is not set
++# CONFIG_NX_GPIO is not set
++# CONFIG_NOMADIK_GPIO is not set
++# CONFIG_ZYNQMP_GPIO_MODEPIN is not set
++# CONFIG_SLG7XL45106_I2C_GPO is not set
++# CONFIG_TURRIS_OMNIA_MCU is not set
++# CONFIG_FTGPIO010 is not set
++
++#
++# Hardware Spinlock Support
++#
++# CONFIG_DM_HWSPINLOCK is not set
++CONFIG_I2C=y
++# CONFIG_DM_I2C is not set
++# CONFIG_SYS_I2C_LEGACY is not set
++# CONFIG_SPL_SYS_I2C_LEGACY is not set
++# CONFIG_SYS_I2C_FSL is not set
++# CONFIG_SYS_I2C_DW is not set
++# CONFIG_SYS_I2C_IMX_LPI2C is not set
++# CONFIG_SYS_I2C_MTK is not set
++# CONFIG_SYS_I2C_MICROCHIP is not set
++# CONFIG_SYS_I2C_MXC is not set
++# CONFIG_SYS_I2C_NPCM is not set
++# CONFIG_SYS_I2C_SOFT is not set
++# CONFIG_SYS_I2C_MV is not set
++# CONFIG_SYS_I2C_MVTWSI is not set
++CONFIG_INPUT=y
++# CONFIG_DM_KEYBOARD is not set
++# CONFIG_CROS_EC_KEYB is not set
++# CONFIG_TEGRA_KEYBOARD is not set
++# CONFIG_TWL4030_INPUT is not set
++
++#
++# IOMMU device drivers
++#
++# CONFIG_IOMMU is not set
++
++#
++# LED Support
++#
++CONFIG_LED=y
++# CONFIG_LED_PWM is not set
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++# CONFIG_LED_STATUS is not set
++
++#
++# Mailbox Controller Support
++#
++# CONFIG_DM_MAILBOX is not set
++
++#
++# Memory Controller drivers
++#
++# CONFIG_MEMORY is not set
++# CONFIG_ATMEL_EBI is not set
++# CONFIG_MFD_ATMEL_SMC is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MISC is not set
++# CONFIG_NVMEM is not set
++# CONFIG_SPL_NVMEM is not set
++# CONFIG_SMSC_LPC47M is not set
++# CONFIG_SMSC_SIO1007 is not set
++# CONFIG_CROS_EC is not set
++# CONFIG_DS4510 is not set
++# CONFIG_FSL_SEC_MON is not set
++# CONFIG_IRQ is not set
++# CONFIG_NPCM_HOST is not set
++# CONFIG_NUVOTON_NCT6102D is not set
++# CONFIG_PWRSEQ is not set
++# CONFIG_PCA9551_LED is not set
++# CONFIG_TEST_DRV is not set
++# CONFIG_USB_HUB_USB251XB is not set
++# CONFIG_TWL4030_LED is not set
++# CONFIG_WINBOND_W83627 is not set
++# CONFIG_FS_LOADER is not set
++
++#
++# MMC Host controller Support
++#
++# CONFIG_MMC is not set
++# CONFIG_MMC_BROKEN_CD is not set
++# CONFIG_DM_MMC is not set
++# CONFIG_FSL_ESDHC is not set
++# CONFIG_FSL_ESDHC_IMX is not set
++
++#
++# MTD Support
++#
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD=y
++CONFIG_DM_MTD=y
++# CONFIG_MTD_NOR_FLASH is not set
++# CONFIG_MTD_CONCAT is not set
++# CONFIG_SYS_MTDPARTS_RUNTIME is not set
++# CONFIG_FLASH_CFI_DRIVER is not set
++# CONFIG_CFI_FLASH is not set
++# CONFIG_ALTERA_QSPI is not set
++# CONFIG_HBMC_AM654 is not set
++# CONFIG_SAMSUNG_ONENAND is not set
++# CONFIG_USE_SYS_MAX_FLASH_BANKS is not set
++CONFIG_MTD_NAND_CORE=y
++# CONFIG_MTD_RAW_NAND is not set
++CONFIG_MTD_SPI_NAND=y
++
++#
++# SPI Flash Support
++#
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SPI_FLASH=y
++CONFIG_SF_DEFAULT_BUS=0
++CONFIG_SF_DEFAULT_CS=0
++# CONFIG_BOOTDEV_SPI_FLASH is not set
++CONFIG_SPI_FLASH_SFDP_SUPPORT=y
++CONFIG_SPI_FLASH_SMART_HWCAPS=y
++# CONFIG_SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT is not set
++# CONFIG_SPI_FLASH_SOFT_RESET is not set
++# CONFIG_SPI_FLASH_BAR is not set
++CONFIG_SPI_FLASH_LOCK=y
++CONFIG_SPI_FLASH_UNLOCK_ALL=y
++# CONFIG_SPI_FLASH_ATMEL is not set
++CONFIG_SPI_FLASH_EON=y
++CONFIG_SPI_FLASH_GIGADEVICE=y
++CONFIG_SPI_FLASH_ISSI=y
++CONFIG_SPI_FLASH_MACRONIX=y
++CONFIG_SPI_FLASH_SPANSION=y
++# CONFIG_SPI_FLASH_S28HX_T is not set
++CONFIG_SPI_FLASH_STMICRO=y
++# CONFIG_SPI_FLASH_MT35XU is not set
++# CONFIG_SPI_FLASH_SST is not set
++CONFIG_SPI_FLASH_WINBOND=y
++CONFIG_SPI_FLASH_XMC=y
++CONFIG_SPI_FLASH_XTX=y
++# CONFIG_SPI_FLASH_ZBIT is not set
++CONFIG_SPI_FLASH_USE_4K_SECTORS=y
++# CONFIG_SPI_FLASH_DATAFLASH is not set
++CONFIG_SPI_FLASH_MTD=y
++
++#
++# UBI support
++#
++CONFIG_UBI_SILENCE_MSG=y
++CONFIG_MTD_UBI=y
++CONFIG_MTD_UBI_MODULE=y
++CONFIG_MTD_UBI_WL_THRESHOLD=4096
++CONFIG_MTD_UBI_BEB_LIMIT=20
++# CONFIG_MTD_UBI_FASTMAP is not set
++# CONFIG_NVMXIP is not set
++# CONFIG_NVMXIP_QSPI is not set
++# CONFIG_NMBM is not set
++
++#
++# Multiplexer drivers
++#
++# CONFIG_MULTIPLEXER is not set
++# CONFIG_BITBANGMII is not set
++# CONFIG_MV88E6352_SWITCH is not set
++CONFIG_PHYLIB=y
++# CONFIG_PHY_ADDR_ENABLE is not set
++# CONFIG_B53_SWITCH is not set
++# CONFIG_MV88E61XX_SWITCH is not set
++# CONFIG_PHYLIB_10G is not set
++# CONFIG_PHY_ADIN is not set
++# CONFIG_PHY_AIROHA is not set
++# CONFIG_PHY_AQUANTIA is not set
++# CONFIG_PHY_ATHEROS is not set
++# CONFIG_SPL_PHY_ATHEROS is not set
++# CONFIG_PHY_BROADCOM is not set
++# CONFIG_PHY_CORTINA is not set
++# CONFIG_PHY_DAVICOM is not set
++# CONFIG_PHY_ET1011C is not set
++# CONFIG_PHY_LXT is not set
++# CONFIG_PHY_MARVELL is not set
++# CONFIG_PHY_MARVELL_10G is not set
++# CONFIG_PHY_MESON_GXL is not set
++# CONFIG_PHY_MICREL is not set
++# CONFIG_PHY_MOTORCOMM is not set
++# CONFIG_PHY_MSCC is not set
++# CONFIG_PHY_NATSEMI is not set
++# CONFIG_PHY_NXP_C45_TJA11XX is not set
++# CONFIG_PHY_NXP_TJA11XX is not set
++# CONFIG_PHY_REALTEK is not set
++# CONFIG_PHY_SMSC is not set
++# CONFIG_PHY_TERANETICS is not set
++# CONFIG_PHY_TI is not set
++# CONFIG_PHY_TI_DP83867 is not set
++# CONFIG_PHY_TI_DP83869 is not set
++# CONFIG_PHY_TI_GENERIC is not set
++# CONFIG_PHY_VITESSE is not set
++# CONFIG_PHY_XILINX is not set
++# CONFIG_PHY_XILINX_GMII2RGMII is not set
++# CONFIG_PHY_XWAY is not set
++# CONFIG_PHY_ETHERNET_ID is not set
++CONFIG_PHY_FIXED=y
++# CONFIG_PHY_NCSI is not set
++# CONFIG_FSL_MEMAC is not set
++CONFIG_PHY_RESET_DELAY=0
++# CONFIG_FSL_PFE is not set
++CONFIG_ETH=y
++CONFIG_DM_ETH=y
++# CONFIG_DM_MDIO is not set
++# CONFIG_DM_ETH_PHY is not set
++CONFIG_NETDEVICES=y
++# CONFIG_PHY_GIGE is not set
++# CONFIG_ALTERA_TSE is not set
++# CONFIG_BCM_SF2_ETH is not set
++# CONFIG_BCMGENET is not set
++# CONFIG_BNXT_ETH is not set
++# CONFIG_CALXEDA_XGMAC is not set
++# CONFIG_DRIVER_DM9000 is not set
++# CONFIG_DWC_ETH_QOS is not set
++# CONFIG_EEPRO100 is not set
++# CONFIG_ETH_DESIGNWARE is not set
++# CONFIG_ETH_DESIGNWARE_MESON8B is not set
++# CONFIG_ETHOC is not set
++# CONFIG_FMAN_ENET is not set
++# CONFIG_FTMAC100 is not set
++# CONFIG_FTGMAC100 is not set
++# CONFIG_MCFFEC is not set
++# CONFIG_FSLDMAFEC is not set
++# CONFIG_KS8851_MLL is not set
++# CONFIG_LITEETH is not set
++# CONFIG_MACB is not set
++# CONFIG_NET_NPCM750 is not set
++# CONFIG_PCH_GBE is not set
++# CONFIG_RGMII is not set
++# CONFIG_MII is not set
++# CONFIG_RMII is not set
++# CONFIG_PCNET is not set
++# CONFIG_QE_UEC is not set
++# CONFIG_RTL8139 is not set
++# CONFIG_SMC911X is not set
++# CONFIG_SUN7I_GMAC is not set
++# CONFIG_SUN4I_EMAC is not set
++# CONFIG_SUN8I_EMAC is not set
++# CONFIG_SH_ETHER is not set
++# CONFIG_DRIVER_TI_CPSW is not set
++# CONFIG_DRIVER_TI_EMAC is not set
++# CONFIG_DRIVER_TI_KEYSTONE_NET is not set
++# CONFIG_TULIP is not set
++# CONFIG_XILINX_AXIEMAC is not set
++# CONFIG_VSC7385_ENET is not set
++# CONFIG_XILINX_EMACLITE is not set
++# CONFIG_ZYNQ_GEM is not set
++# CONFIG_SYS_DPAA_QBMAN is not set
++# CONFIG_TSEC_ENET is not set
++CONFIG_MEDIATEK_ETH=y
++# CONFIG_HIFEMAC_ETH is not set
++# CONFIG_HIGMACV300_ETH is not set
++# CONFIG_NVME is not set
++# CONFIG_NVME_APPLE is not set
++
++#
++# PCI Endpoint
++#
++# CONFIG_PCI_ENDPOINT is not set
++# CONFIG_X86_PCH7 is not set
++# CONFIG_X86_PCH9 is not set
++
++#
++# PHY Subsystem
++#
++CONFIG_PHY=y
++# CONFIG_NOP_PHY is not set
++# CONFIG_MIPI_DPHY_HELPERS is not set
++# CONFIG_BCM_SR_PCIE_PHY is not set
++# CONFIG_OMAP_USB2_PHY is not set
++CONFIG_PHY_MTK_TPHY=y
++
++#
++# Rockchip PHY driver
++#
++# CONFIG_PHY_CADENCE_SIERRA is not set
++# CONFIG_PHY_CADENCE_TORRENT is not set
++# CONFIG_MSM8916_USB_PHY is not set
++# CONFIG_MVEBU_COMPHY_SUPPORT is not set
++
++#
++# Pin controllers
++#
++CONFIG_PINCTRL=y
++CONFIG_PINCTRL_FULL=y
++CONFIG_PINCTRL_GENERIC=y
++CONFIG_PINMUX=y
++CONFIG_PINCONF=y
++CONFIG_PINCONF_RECURSIVE=y
++# CONFIG_PINCTRL_AT91 is not set
++# CONFIG_PINCTRL_AT91PIO4 is not set
++# CONFIG_PINCTRL_INTEL is not set
++# CONFIG_PINCTRL_QE is not set
++# CONFIG_PINCTRL_ROCKCHIP_RV1108 is not set
++# CONFIG_PINCTRL_SINGLE is not set
++# CONFIG_PINCTRL_STM32 is not set
++# CONFIG_PINCTRL_STMFX is not set
++# CONFIG_PINCTRL_K210 is not set
++CONFIG_PINCTRL_MTK=y
++# CONFIG_PINCTRL_MT7622 is not set
++# CONFIG_PINCTRL_MT7623 is not set
++# CONFIG_PINCTRL_MT7629 is not set
++CONFIG_PINCTRL_MT7981=y
++# CONFIG_PINCTRL_MT7986 is not set
++# CONFIG_PINCTRL_MT7988 is not set
++# CONFIG_PINCTRL_MT8512 is not set
++# CONFIG_PINCTRL_MT8516 is not set
++# CONFIG_PINCTRL_MT8518 is not set
++CONFIG_POWER=y
++# CONFIG_POWER_LEGACY is not set
++# CONFIG_ACPI_PMC is not set
++
++#
++# Power Domain Support
++#
++CONFIG_POWER_DOMAIN=y
++# CONFIG_APPLE_PMGR_POWER_DOMAIN is not set
++CONFIG_MTK_POWER_DOMAIN=y
++# CONFIG_DM_PMIC is not set
++# CONFIG_PMIC_TPS65217 is not set
++# CONFIG_POWER_TPS65218 is not set
++# CONFIG_POWER_TPS62362 is not set
++# CONFIG_DM_REGULATOR is not set
++# CONFIG_TPS6586X_POWER is not set
++# CONFIG_POWER_MT6323 is not set
++CONFIG_DM_PWM=y
++# CONFIG_PWM_ASPEED is not set
++# CONFIG_PWM_CADENCE_TTC is not set
++# CONFIG_PWM_CROS_EC is not set
++# CONFIG_PWM_EXYNOS is not set
++# CONFIG_PWM_IMX is not set
++# CONFIG_PWM_MESON is not set
++CONFIG_PWM_MTK=y
++# CONFIG_PWM_ROCKCHIP is not set
++# CONFIG_PWM_SANDBOX is not set
++# CONFIG_PWM_SIFIVE is not set
++# CONFIG_PWM_TEGRA is not set
++# CONFIG_PWM_SUNXI is not set
++# CONFIG_U_QE is not set
++# CONFIG_RAM is not set
++
++#
++# Reboot Mode Support
++#
++# CONFIG_DM_REBOOT_MODE is not set
++
++#
++# Remote Processor drivers
++#
++
++#
++# Reset Controller Support
++#
++# CONFIG_RESET_AST2500 is not set
++# CONFIG_RESET_AST2600 is not set
++CONFIG_RESET_MEDIATEK=y
++# CONFIG_RESET_HISILICON is not set
++# CONFIG_RESET_SYSCON is not set
++# CONFIG_RESET_SCMI is not set
++# CONFIG_RESET_DRA7 is not set
++# CONFIG_DM_RNG is not set
++
++#
++# Real Time Clock
++#
++# CONFIG_DM_RTC is not set
++# CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set
++# CONFIG_RTC_DS1337 is not set
++# CONFIG_RTC_DS1338 is not set
++# CONFIG_RTC_DS1374 is not set
++# CONFIG_RTC_DS3231 is not set
++# CONFIG_RTC_PCF8563 is not set
++# CONFIG_RTC_PT7C4338 is not set
++# CONFIG_RTC_PL031 is not set
++# CONFIG_RTC_S35392A is not set
++# CONFIG_RTC_MC13XXX is not set
++# CONFIG_RTC_MC146818 is not set
++# CONFIG_RTC_M41T62 is not set
++# CONFIG_SCSI is not set
++# CONFIG_DM_SCSI is not set
++CONFIG_SERIAL=y
++CONFIG_BAUDRATE=115200
++# CONFIG_DEFAULT_ENV_IS_RW is not set
++CONFIG_REQUIRE_SERIAL_CONSOLE=y
++# CONFIG_SPECIFY_CONSOLE_INDEX is not set
++CONFIG_SERIAL_PRESENT=y
++CONFIG_DM_SERIAL=y
++# CONFIG_SERIAL_RX_BUFFER is not set
++# CONFIG_SERIAL_PUTS is not set
++# CONFIG_SERIAL_SEARCH_ALL is not set
++# CONFIG_SERIAL_PROBE_ALL is not set
++# CONFIG_VPL_DM_SERIAL is not set
++CONFIG_DEBUG_UART_MTK=y
++CONFIG_DEBUG_UART_SHIFT=0
++# CONFIG_DEBUG_UART_ANNOUNCE is not set
++# CONFIG_DEBUG_UART_SKIP_INIT is not set
++# CONFIG_ALTERA_JTAG_UART is not set
++# CONFIG_ALTERA_UART is not set
++# CONFIG_ARC_SERIAL is not set
++# CONFIG_ARM_DCC is not set
++# CONFIG_ATMEL_USART is not set
++# CONFIG_BCM6345_SERIAL is not set
++# CONFIG_COREBOOT_SERIAL is not set
++# CONFIG_CORTINA_UART is not set
++# CONFIG_FSL_LINFLEXUART is not set
++# CONFIG_FSL_LPUART is not set
++# CONFIG_MVEBU_A3700_UART is not set
++# CONFIG_MCFUART is not set
++# CONFIG_NULLDEV_SERIAL is not set
++# CONFIG_SYS_NS16550 is not set
++# CONFIG_PL01X_SERIAL is not set
++# CONFIG_ROCKCHIP_SERIAL is not set
++# CONFIG_XILINX_UARTLITE is not set
++# CONFIG_MSM_SERIAL is not set
++# CONFIG_MSM_GENI_SERIAL is not set
++# CONFIG_MXS_AUART_SERIAL is not set
++# CONFIG_OMAP_SERIAL is not set
++# CONFIG_SIFIVE_SERIAL is not set
++# CONFIG_ZYNQ_SERIAL is not set
++CONFIG_MTK_SERIAL=y
++# CONFIG_MT7620_SERIAL is not set
++# CONFIG_NPCM_SERIAL is not set
++# CONFIG_SM is not set
++# CONFIG_MESON_SM is not set
++# CONFIG_SMEM is not set
++
++#
++# Sound support
++#
++# CONFIG_SOUND is not set
++
++#
++# SOC (System On Chip) specific Drivers
++#
++# CONFIG_SOC_DEVICE is not set
++# CONFIG_SOC_TI is not set
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_SPI_MEM=y
++# CONFIG_SPI_DIRMAP is not set
++# CONFIG_ALTERA_SPI is not set
++# CONFIG_APPLE_SPI is not set
++# CONFIG_ATCSPI200_SPI is not set
++# CONFIG_ATMEL_SPI is not set
++# CONFIG_BCMSTB_SPI is not set
++# CONFIG_CORTINA_SFLASH is not set
++# CONFIG_CADENCE_QSPI is not set
++# CONFIG_CF_SPI is not set
++# CONFIG_DESIGNWARE_SPI is not set
++# CONFIG_EXYNOS_SPI is not set
++# CONFIG_FSL_DSPI is not set
++# CONFIG_FSL_QSPI is not set
++# CONFIG_GXP_SPI is not set
++# CONFIG_ICH_SPI is not set
++# CONFIG_IPROC_QSPI is not set
++# CONFIG_KIRKWOOD_SPI is not set
++# CONFIG_MICROCHIP_COREQSPI is not set
++# CONFIG_MPC8XXX_SPI is not set
++# CONFIG_MTK_SNOR is not set
++# CONFIG_MTK_SNFI_SPI is not set
++CONFIG_MTK_SPIM=y
++# CONFIG_MVEBU_A3700_SPI is not set
++# CONFIG_MXS_SPI is not set
++# CONFIG_SPI_MXIC is not set
++# CONFIG_NPCM_FIU_SPI is not set
++# CONFIG_NPCM_PSPI is not set
++# CONFIG_NXP_FSPI is not set
++# CONFIG_OMAP3_SPI is not set
++# CONFIG_PL022_SPI is not set
++# CONFIG_ROCKCHIP_SFC is not set
++# CONFIG_ROCKCHIP_SPI is not set
++# CONFIG_SPI_ASPEED_SMC is not set
++# CONFIG_SPI_SIFIVE is not set
++# CONFIG_SOFT_SPI is not set
++# CONFIG_SPI_SN_F_OSPI is not set
++# CONFIG_SPI_SUNXI is not set
++# CONFIG_TEGRA114_SPI is not set
++# CONFIG_TEGRA20_SFLASH is not set
++# CONFIG_TEGRA20_SLINK is not set
++# CONFIG_TEGRA210_QSPI is not set
++# CONFIG_TI_QSPI is not set
++# CONFIG_XILINX_SPI is not set
++# CONFIG_ZYNQ_SPI is not set
++# CONFIG_ZYNQ_QSPI is not set
++# CONFIG_ZYNQMP_GQSPI is not set
++# CONFIG_SH_QSPI is not set
++# CONFIG_MXC_SPI is not set
++
++#
++# SPMI support
++#
++# CONFIG_SPMI is not set
++# CONFIG_SYSINFO is not set
++
++#
++# System reset device drivers
++#
++# CONFIG_SYSRESET is not set
++# CONFIG_TEE is not set
++# CONFIG_DM_THERMAL is not set
++
++#
++# Timer Support
++#
++# CONFIG_TIMER is not set
++
++#
++# TPM support
++#
++CONFIG_USB=y
++CONFIG_DM_USB=y
++# CONFIG_DM_USB_GADGET is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_HOST=y
++CONFIG_USB_XHCI_HCD=y
++# CONFIG_USB_XHCI_DWC3 is not set
++# CONFIG_USB_XHCI_DWC3_OF_SIMPLE is not set
++CONFIG_USB_XHCI_MTK=y
++# CONFIG_USB_XHCI_FSL is not set
++# CONFIG_USB_XHCI_BRCM is not set
++# CONFIG_USB_EHCI_HCD is not set
++# CONFIG_USB_OHCI_HCD is not set
++# CONFIG_USB_UHCI_HCD is not set
++# CONFIG_USB_DWC2 is not set
++# CONFIG_USB_R8A66597_HCD is not set
++# CONFIG_USB_ISP1760 is not set
++# CONFIG_USB_CDNS3 is not set
++# CONFIG_USB_DWC3 is not set
++# CONFIG_USB_MTU3 is not set
++
++#
++# Legacy MUSB Support
++#
++# CONFIG_USB_MUSB_HCD is not set
++# CONFIG_USB_MUSB_UDC is not set
++
++#
++# MUSB Controller Driver
++#
++# CONFIG_USB_MUSB_HOST is not set
++# CONFIG_USB_MUSB_PIO_ONLY is not set
++
++#
++# USB Phy
++#
++# CONFIG_TWL4030_USB is not set
++# CONFIG_ROCKCHIP_USB2_PHY is not set
++
++#
++# ULPI drivers
++#
++
++#
++# USB peripherals
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_KEYBOARD is not set
++# CONFIG_USB_ONBOARD_HUB is not set
++CONFIG_USB_HUB_DEBOUNCE_TIMEOUT=1000
++# CONFIG_USB_HOST_ETHER is not set
++# CONFIG_USB_GADGET is not set
++# CONFIG_SPL_USB_GADGET is not set
++
++#
++# UFS Host Controller Support
++#
++# CONFIG_TI_J721E_UFS is not set
++
++#
++# Graphics support
++#
++# CONFIG_VIDEO is not set
++
++#
++# VirtIO Drivers
++#
++# CONFIG_VIRTIO_MMIO is not set
++
++#
++# 1-Wire support
++#
++# CONFIG_W1 is not set
++
++#
++# 1-wire EEPROM support
++#
++# CONFIG_W1_EEPROM is not set
++
++#
++# Watchdog Timer Support
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
++# CONFIG_IMX_WATCHDOG is not set
++# CONFIG_ULP_WATCHDOG is not set
++# CONFIG_WDT is not set
++# CONFIG_PHYS_TO_BUS is not set
++
++#
++# File systems
++#
++# CONFIG_FS_BTRFS is not set
++# CONFIG_FS_CBFS is not set
++# CONFIG_FS_EXT4 is not set
++CONFIG_FS_FAT=y
++CONFIG_FAT_WRITE=y
++CONFIG_FS_FAT_MAX_CLUSTSIZE=65536
++# CONFIG_FS_JFFS2 is not set
++CONFIG_UBIFS_SILENCE_MSG=y
++CONFIG_UBIFS_SILENCE_DEBUG_DUMP=y
++# CONFIG_FS_CRAMFS is not set
++# CONFIG_YAFFS2 is not set
++# CONFIG_FS_SQUASHFS is not set
++# CONFIG_FS_EROFS is not set
++
++#
++# Library routines
++#
++# CONFIG_ADDR_MAP is not set
++# CONFIG_SYS_TIMER_COUNTS_DOWN is not set
++# CONFIG_PHYSMEM is not set
++# CONFIG_BCH is not set
++# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
++CONFIG_CHARSET=y
++# CONFIG_DYNAMIC_CRC_TABLE is not set
++CONFIG_LIB_UUID=y
++# CONFIG_SEMIHOSTING is not set
++CONFIG_PRINTF=y
++CONFIG_SPRINTF=y
++CONFIG_STRTO=y
++CONFIG_SYS_HZ=1000
++# CONFIG_PANIC_HANG is not set
++CONFIG_REGEX=y
++CONFIG_LIB_RAND=y
++# CONFIG_LIB_HW_RAND is not set
++CONFIG_SUPPORT_ACPI=y
++# CONFIG_ACPI is not set
++CONFIG_RBTREE=y
++# CONFIG_BITREVERSE is not set
++# CONFIG_TRACE is not set
++# CONFIG_CIRCBUF is not set
++# CONFIG_CMD_DHRYSTONE is not set
++
++#
++# Security support
++#
++# CONFIG_AES is not set
++# CONFIG_ECDSA is not set
++# CONFIG_RSA is not set
++# CONFIG_TPM is not set
++
++#
++# Android Verified Boot
++#
++
++#
++# Hashing Support
++#
++# CONFIG_BLAKE2 is not set
++CONFIG_SHA1=y
++CONFIG_SHA256=y
++# CONFIG_SHA512 is not set
++# CONFIG_SHA384 is not set
++# CONFIG_SHA_HW_ACCEL is not set
++CONFIG_MD5=y
++CONFIG_CRC8=y
++CONFIG_CRC32=y
++
++#
++# Compression Support
++#
++# CONFIG_LZ4 is not set
++CONFIG_LZMA=y
++CONFIG_LZO=y
++CONFIG_GZIP=y
++# CONFIG_ZLIB_UNCOMPRESS is not set
++# CONFIG_BZIP2 is not set
++CONFIG_ZLIB=y
++# CONFIG_ZSTD is not set
++CONFIG_VPL_LZMA=y
++# CONFIG_SPL_GZIP is not set
++# CONFIG_ERRNO_STR is not set
++CONFIG_HEXDUMP=y
++# CONFIG_GETOPT is not set
++CONFIG_OF_LIBFDT=y
++CONFIG_OF_LIBFDT_ASSUME_MASK=0x0
++CONFIG_SYS_FDT_PAD=0x3000
++
++#
++# System tables
++#
++CONFIG_GENERATE_SMBIOS_TABLE=y
++# CONFIG_LIB_RATIONAL is not set
++CONFIG_SMBIOS=y
++# CONFIG_SMBIOS_PARSER is not set
++CONFIG_EFI_LOADER=y
++CONFIG_CMD_BOOTEFI_BOOTMGR=y
++CONFIG_EFI_VARIABLE_FILE_STORE=y
++# CONFIG_EFI_VARIABLE_NO_STORE is not set
++# CONFIG_EFI_VARIABLES_PRESEED is not set
++CONFIG_EFI_VAR_BUF_SIZE=131072
++# CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN is not set
++# CONFIG_EFI_RUNTIME_UPDATE_CAPSULE is not set
++CONFIG_EFI_CAPSULE_MAX=15
++CONFIG_EFI_DEVICE_PATH_TO_TEXT=y
++CONFIG_EFI_DEVICE_PATH_UTIL=y
++CONFIG_EFI_DT_FIXUP=y
++CONFIG_EFI_LOADER_HII=y
++CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y
++CONFIG_EFI_UNICODE_CAPITALIZATION=y
++# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set
++CONFIG_EFI_PLATFORM_LANG_CODES="en-US"
++CONFIG_EFI_HAVE_RUNTIME_RESET=y
++CONFIG_EFI_LOAD_FILE2_INITRD=y
++CONFIG_EFI_ECPT=y
++CONFIG_EFI_EBBR_2_1_CONFORMANCE=y
++# CONFIG_OPTEE_LIB is not set
++# CONFIG_OPTEE_IMAGE is not set
++# CONFIG_BOOTM_OPTEE is not set
++# CONFIG_TEST_FDTDEC is not set
++CONFIG_LIB_ELF=y
++CONFIG_LMB=y
++CONFIG_LMB_USE_MAX_REGIONS=y
++CONFIG_LMB_MAX_REGIONS=64
++# CONFIG_PHANDLE_CHECK_SEQ is not set
++
++#
++# Testing
++#
++# CONFIG_UNIT_TEST is not set
++# CONFIG_POST is not set
++
++#
++# Tools options
++#
++CONFIG_MKIMAGE_DTC_PATH="dtc"
++CONFIG_TOOLS_CRC32=y
++# CONFIG_TOOLS_LIBCRYPTO is not set
++CONFIG_TOOLS_FIT=y
++CONFIG_TOOLS_FIT_FULL_CHECK=y
++CONFIG_TOOLS_FIT_PRINT=y
++CONFIG_TOOLS_FIT_RSASSA_PSS=y
++CONFIG_TOOLS_FIT_SIGNATURE=y
++CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000
++CONFIG_TOOLS_FIT_VERBOSE=y
++CONFIG_TOOLS_MD5=y
++CONFIG_TOOLS_OF_LIBFDT=y
++CONFIG_TOOLS_SHA1=y
++CONFIG_TOOLS_SHA256=y
++CONFIG_TOOLS_SHA384=y
++CONFIG_TOOLS_SHA512=y
++# CONFIG_TOOLS_MKEFICAPSULE is not set
++# CONFIG_FSPI_CONF_HEADER is not set
++# CONFIG_TOOLS_MKFWUMDATA is not set
+--- /dev/null
++++ b/configs/mt7981_openwrt-one-spi-nand_defconfig
+@@ -0,0 +1,1815 @@
++#
++# Automatically generated file; DO NOT EDIT.
++# U-Boot 2024.01 Configuration
++#
++
++#
++# Compiler: aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r25206+8-d5e2177a6b) 12.3.0
++#
++CONFIG_CREATE_ARCH_SYMLINK=y
++CONFIG_SYS_CACHE_SHIFT_6=y
++CONFIG_SYS_CACHELINE_SIZE=64
++CONFIG_LINKER_LIST_ALIGN=8
++# CONFIG_ARC is not set
++CONFIG_ARM=y
++# CONFIG_M68K is not set
++# CONFIG_MICROBLAZE is not set
++# CONFIG_MIPS is not set
++# CONFIG_NIOS2 is not set
++# CONFIG_PPC is not set
++# CONFIG_RISCV is not set
++# CONFIG_SANDBOX is not set
++# CONFIG_SH is not set
++# CONFIG_X86 is not set
++# CONFIG_XTENSA is not set
++CONFIG_SYS_ARCH="arm"
++CONFIG_SYS_CPU="armv8"
++CONFIG_SYS_SOC="mediatek"
++CONFIG_SYS_VENDOR="mediatek"
++CONFIG_SYS_BOARD="mt7981"
++CONFIG_SYS_CONFIG_NAME="mt7981"
++
++#
++# Skipping low level initialization functions
++#
++# CONFIG_SKIP_LOWLEVEL_INIT is not set
++# CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_SYS_NONCACHED_MEMORY=0x100000
++# CONFIG_SYS_ICACHE_OFF is not set
++# CONFIG_SYS_DCACHE_OFF is not set
++
++#
++# ARM architecture
++#
++CONFIG_ARM64=y
++CONFIG_ARM64_CRC32=y
++CONFIG_COUNTER_FREQUENCY=0
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_INIT_SP_RELATIVE=y
++CONFIG_SYS_INIT_SP_BSS_OFFSET=524288
++# CONFIG_GIC_V3_ITS is not set
++CONFIG_STATIC_RELA=y
++CONFIG_DMA_ADDR_T_64BIT=y
++CONFIG_GPIO_EXTRA_HEADER=y
++CONFIG_ARM_ASM_UNIFIED=y
++# CONFIG_SYS_ARM_CACHE_CP15 is not set
++# CONFIG_SYS_ARM_MMU is not set
++# CONFIG_SYS_ARM_MPU is not set
++CONFIG_SYS_ARM_ARCH=8
++CONFIG_SYS_ARM_CACHE_WRITEBACK=y
++# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set
++# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set
++# CONFIG_ARCH_CPU_INIT is not set
++CONFIG_SYS_ARCH_TIMER=y
++CONFIG_ARM_SMCCC=y
++# CONFIG_SYS_L2_PL310 is not set
++# CONFIG_SPL_SYS_L2_PL310 is not set
++# CONFIG_SYS_L2CACHE_OFF is not set
++# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set
++# CONFIG_USE_ARCH_MEMCPY is not set
++# CONFIG_USE_ARCH_MEMSET is not set
++CONFIG_ARM64_SUPPORT_AARCH32=y
++# CONFIG_ARCH_AT91 is not set
++# CONFIG_ARCH_DAVINCI is not set
++# CONFIG_ARCH_HISTB is not set
++# CONFIG_ARCH_KIRKWOOD is not set
++# CONFIG_ARCH_MVEBU is not set
++# CONFIG_ARCH_ORION5X is not set
++# CONFIG_TARGET_STV0991 is not set
++# CONFIG_ARCH_BCM283X is not set
++# CONFIG_ARCH_BCMSTB is not set
++# CONFIG_ARCH_BCMBCA is not set
++# CONFIG_TARGET_VEXPRESS_CA9X4 is not set
++# CONFIG_TARGET_BCMNS is not set
++# CONFIG_TARGET_BCMNS2 is not set
++# CONFIG_TARGET_BCMNS3 is not set
++# CONFIG_ARCH_EXYNOS is not set
++# CONFIG_ARCH_S5PC1XX is not set
++# CONFIG_ARCH_HIGHBANK is not set
++# CONFIG_ARCH_INTEGRATOR is not set
++# CONFIG_ARCH_IPQ40XX is not set
++# CONFIG_ARCH_KEYSTONE is not set
++# CONFIG_ARCH_K3 is not set
++# CONFIG_ARCH_OMAP2PLUS is not set
++# CONFIG_ARCH_MESON is not set
++CONFIG_ARCH_MEDIATEK=y
++# CONFIG_ARCH_LPC32XX is not set
++# CONFIG_ARCH_IMX8 is not set
++# CONFIG_ARCH_IMX8M is not set
++# CONFIG_ARCH_IMX8ULP is not set
++# CONFIG_ARCH_IMX9 is not set
++# CONFIG_ARCH_IMXRT is not set
++# CONFIG_ARCH_MX23 is not set
++# CONFIG_ARCH_MX28 is not set
++# CONFIG_ARCH_MX31 is not set
++# CONFIG_ARCH_MX7ULP is not set
++# CONFIG_ARCH_MX7 is not set
++# CONFIG_ARCH_MX6 is not set
++# CONFIG_ARCH_MX5 is not set
++# CONFIG_ARCH_NEXELL is not set
++# CONFIG_ARCH_NPCM is not set
++# CONFIG_ARCH_APPLE is not set
++# CONFIG_ARCH_OWL is not set
++# CONFIG_ARCH_QEMU is not set
++# CONFIG_ARCH_RMOBILE is not set
++# CONFIG_ARCH_SNAPDRAGON is not set
++# CONFIG_ARCH_SOCFPGA is not set
++# CONFIG_ARCH_SUNXI is not set
++# CONFIG_ARCH_U8500 is not set
++# CONFIG_ARCH_VERSAL is not set
++# CONFIG_ARCH_VERSAL_NET is not set
++# CONFIG_ARCH_VF610 is not set
++# CONFIG_ARCH_ZYNQ is not set
++# CONFIG_ARCH_ZYNQMP_R5 is not set
++# CONFIG_ARCH_ZYNQMP is not set
++# CONFIG_ARCH_TEGRA is not set
++# CONFIG_ARCH_VEXPRESS64 is not set
++# CONFIG_TARGET_CORSTONE1000 is not set
++# CONFIG_TARGET_TOTAL_COMPUTE is not set
++# CONFIG_TARGET_LS2080A_EMU is not set
++# CONFIG_TARGET_LS1088AQDS is not set
++# CONFIG_TARGET_LS2080AQDS is not set
++# CONFIG_TARGET_LS2080ARDB is not set
++# CONFIG_TARGET_LS2081ARDB is not set
++# CONFIG_TARGET_LX2160ARDB is not set
++# CONFIG_TARGET_LX2160AQDS is not set
++# CONFIG_TARGET_LX2162AQDS is not set
++# CONFIG_TARGET_HIKEY is not set
++# CONFIG_TARGET_HIKEY960 is not set
++# CONFIG_TARGET_POPLAR is not set
++# CONFIG_TARGET_LS1012AQDS is not set
++# CONFIG_TARGET_LS1012ARDB is not set
++# CONFIG_TARGET_LS1012A2G5RDB is not set
++# CONFIG_TARGET_LS1012AFRWY is not set
++# CONFIG_TARGET_LS1012AFRDM is not set
++# CONFIG_TARGET_LS1028AQDS is not set
++# CONFIG_TARGET_LS1028ARDB is not set
++# CONFIG_TARGET_LS1088ARDB is not set
++# CONFIG_TARGET_LS1021AQDS is not set
++# CONFIG_TARGET_LS1021ATWR is not set
++# CONFIG_TARGET_PG_WCOM_SELI8 is not set
++# CONFIG_TARGET_PG_WCOM_EXPU1 is not set
++# CONFIG_TARGET_LS1021ATSN is not set
++# CONFIG_TARGET_LS1021AIOT is not set
++# CONFIG_TARGET_LS1043AQDS is not set
++# CONFIG_TARGET_LS1043ARDB is not set
++# CONFIG_TARGET_LS1046AQDS is not set
++# CONFIG_TARGET_LS1046ARDB is not set
++# CONFIG_TARGET_LS1046AFRWY is not set
++# CONFIG_TARGET_SL28 is not set
++# CONFIG_TARGET_TEN64 is not set
++# CONFIG_ARCH_UNIPHIER is not set
++# CONFIG_ARCH_SYNQUACER is not set
++# CONFIG_ARCH_STM32 is not set
++# CONFIG_ARCH_STI is not set
++# CONFIG_ARCH_STM32MP is not set
++# CONFIG_ARCH_ROCKCHIP is not set
++# CONFIG_ARCH_OCTEONTX is not set
++# CONFIG_ARCH_OCTEONTX2 is not set
++# CONFIG_TARGET_THUNDERX_88XX is not set
++# CONFIG_ARCH_ASPEED is not set
++# CONFIG_TARGET_DURIAN is not set
++# CONFIG_TARGET_POMELO is not set
++# CONFIG_TARGET_PRESIDIO_ASIC is not set
++# CONFIG_TARGET_XENGUEST_ARM64 is not set
++# CONFIG_ARCH_GXP is not set
++# CONFIG_STATIC_MACH_TYPE is not set
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_LEN=0x400000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_ENV_SOURCE_FILE=""
++CONFIG_SF_DEFAULT_SPEED=1000000
++CONFIG_SF_DEFAULT_MODE=0x0
++CONFIG_ENV_SIZE=0x1f000
++CONFIG_DM_GPIO=y
++CONFIG_DEFAULT_DEVICE_TREE="openwrt-one"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000
++CONFIG_DM_RESET=y
++CONFIG_SYS_MONITOR_LEN=0
++# CONFIG_MT8512 is not set
++# CONFIG_TARGET_MT7622 is not set
++# CONFIG_TARGET_MT7623 is not set
++# CONFIG_TARGET_MT7629 is not set
++CONFIG_TARGET_MT7981=y
++# CONFIG_TARGET_MT7986 is not set
++# CONFIG_TARGET_MT7988 is not set
++# CONFIG_TARGET_MT8183 is not set
++# CONFIG_TARGET_MT8512 is not set
++# CONFIG_TARGET_MT8516 is not set
++# CONFIG_TARGET_MT8518 is not set
++CONFIG_MTK_BROM_HEADER_INFO="media=snand;nandinfo=2k+64"
++CONFIG_RESET_BUTTON_LABEL="back"
++CONFIG_RESET_BUTTON_SETTLE_DELAY=0
++CONFIG_ERR_PTR_OFFSET=0x0
++# CONFIG_SPL is not set
++CONFIG_BOOTSTAGE_STASH_ADDR=0x0
++CONFIG_DEBUG_UART_BASE=0x11002000
++CONFIG_DEBUG_UART_CLOCK=40000000
++# CONFIG_DEBUG_UART_BOARD_INIT is not set
++CONFIG_IDENT_STRING=""
++CONFIG_SYS_CLK_FREQ=0
++# CONFIG_CHIP_DIP_SCAN is not set
++# CONFIG_CMO_BY_VA_ONLY is not set
++# CONFIG_ARMV8_MULTIENTRY is not set
++# CONFIG_ARMV8_SET_SMPEN is not set
++# CONFIG_ARMV8_SWITCH_TO_EL1 is not set
++
++#
++# ARMv8 secure monitor firmware
++#
++# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set
++CONFIG_PSCI_RESET=y
++# CONFIG_ARMV8_PSCI is not set
++# CONFIG_ARMV8_EA_EL3_FIRST is not set
++# CONFIG_ARMV8_CRYPTO is not set
++# CONFIG_CMD_DEKBLOB is not set
++# CONFIG_IMX_CAAM_DEK_ENCAP is not set
++# CONFIG_IMX_OPTEE_DEK_ENCAP is not set
++# CONFIG_IMX_SECO_DEK_ENCAP is not set
++# CONFIG_IMX_ELE_DEK_ENCAP is not set
++# CONFIG_CMD_HDMIDETECT is not set
++CONFIG_IMX_DCD_ADDR=0x00910000
++CONFIG_SYS_MEM_TOP_HIDE=0x0
++CONFIG_SYS_LOAD_ADDR=0x46000000
++
++#
++# ARM debug
++#
++CONFIG_BUILD_TARGET=""
++# CONFIG_PCI is not set
++CONFIG_FWU_NUM_BANKS=2
++CONFIG_FWU_NUM_IMAGES_PER_BANK=2
++CONFIG_DEBUG_UART=y
++# CONFIG_AHCI is not set
++# CONFIG_OF_BOARD_FIXUP is not set
++
++#
++# Functionality shared between NXP SoCs
++#
++# CONFIG_NXP_ESBC is not set
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++CONFIG_LOCALVERSION_AUTO=y
++CONFIG_CC_IS_GCC=y
++CONFIG_GCC_VERSION=120300
++CONFIG_CLANG_VERSION=0
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++# CONFIG_CC_OPTIMIZE_FOR_SPEED is not set
++# CONFIG_CC_OPTIMIZE_FOR_DEBUG is not set
++# CONFIG_OPTIMIZE_INLINING is not set
++CONFIG_ARCH_SUPPORTS_LTO=y
++# CONFIG_LTO is not set
++CONFIG_CC_HAS_ASM_INLINE=y
++# CONFIG_XEN is not set
++# CONFIG_ENV_VARS_UBOOT_CONFIG is not set
++# CONFIG_SYS_BOOT_GET_CMDLINE is not set
++# CONFIG_SYS_BOOT_GET_KBD is not set
++CONFIG_SYS_MALLOC_F=y
++# CONFIG_VALGRIND is not set
++CONFIG_EXPERT=y
++CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y
++# CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set
++# CONFIG_TOOLS_DEBUG is not set
++CONFIG_PHYS_64BIT=y
++CONFIG_FDT_64BIT=y
++# CONFIG_REMAKE_ELF is not set
++# CONFIG_HAS_BOARD_SIZE_LIMIT is not set
++# CONFIG_SYS_CUSTOM_LDSCRIPT is not set
++CONFIG_PLATFORM_ELFENTRY="_start"
++CONFIG_STACK_SIZE=0x1000000
++CONFIG_SYS_SRAM_BASE=0x0
++CONFIG_SYS_SRAM_SIZE=0x0
++# CONFIG_MP is not set
++CONFIG_HAVE_TEXT_BASE=y
++# CONFIG_HAVE_SYS_UBOOT_START is not set
++CONFIG_SYS_UBOOT_START=0x41e00000
++# CONFIG_DYNAMIC_SYS_CLK_FREQ is not set
++# CONFIG_API is not set
++
++#
++# Boot options
++#
++
++#
++# Boot images
++#
++# CONFIG_ANDROID_BOOT_IMAGE is not set
++# CONFIG_TIMESTAMP is not set
++CONFIG_FIT=y
++CONFIG_FIT_EXTERNAL_OFFSET=0x0
++CONFIG_FIT_FULL_CHECK=y
++# CONFIG_FIT_SIGNATURE is not set
++# CONFIG_FIT_CIPHER is not set
++# CONFIG_FIT_VERBOSE is not set
++# CONFIG_FIT_BEST_MATCH is not set
++CONFIG_FIT_PRINT=y
++# CONFIG_SPL_LOAD_FIT_FULL is not set
++CONFIG_PXE_UTILS=y
++CONFIG_BOOTSTD=y
++# CONFIG_BOOTSTD_FULL is not set
++# CONFIG_BOOTSTD_DEFAULTS is not set
++CONFIG_BOOTSTD_BOOTCOMMAND=y
++CONFIG_BOOTMETH_GLOBAL=y
++# CONFIG_BOOTMETH_CROS is not set
++CONFIG_BOOTMETH_EXTLINUX=y
++CONFIG_BOOTMETH_EXTLINUX_PXE=y
++CONFIG_BOOTMETH_EFILOADER=y
++CONFIG_BOOTMETH_VBE=y
++CONFIG_BOOTMETH_VBE_REQUEST=y
++CONFIG_BOOTMETH_VBE_SIMPLE=y
++CONFIG_BOOTMETH_VBE_SIMPLE_OS=y
++# CONFIG_BOOTMETH_SCRIPT is not set
++CONFIG_LEGACY_IMAGE_FORMAT=y
++# CONFIG_SUPPORT_RAW_INITRD is not set
++# CONFIG_CHROMEOS is not set
++# CONFIG_CHROMEOS_VBOOT is not set
++# CONFIG_RAMBOOT_PBL is not set
++CONFIG_SYS_BOOT_RAMDISK_HIGH=y
++# CONFIG_DISTRO_DEFAULTS is not set
++
++#
++# Boot timing
++#
++# CONFIG_BOOTSTAGE is not set
++CONFIG_BOOTSTAGE_STASH_SIZE=0x1000
++# CONFIG_SHOW_BOOT_PROGRESS is not set
++
++#
++# Boot media
++#
++CONFIG_NAND_BOOT=y
++# CONFIG_ONENAND_BOOT is not set
++# CONFIG_QSPI_BOOT is not set
++# CONFIG_SATA_BOOT is not set
++# CONFIG_SD_BOOT is not set
++# CONFIG_SD_BOOT_QSPI is not set
++CONFIG_SPI_BOOT=y
++
++#
++# Autoboot options
++#
++CONFIG_AUTOBOOT=y
++CONFIG_BOOTDELAY=2
++# CONFIG_AUTOBOOT_KEYED is not set
++# CONFIG_AUTOBOOT_USE_MENUKEY is not set
++CONFIG_AUTOBOOT_MENU_SHOW=y
++# CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE is not set
++# CONFIG_BOOT_RETRY is not set
++
++#
++# Image support
++#
++# CONFIG_IMAGE_PRE_LOAD is not set
++
++#
++# Devicetree fixup
++#
++# CONFIG_OF_BOARD_SETUP is not set
++# CONFIG_OF_SYSTEM_SETUP is not set
++# CONFIG_OF_STDOUT_VIA_ALIAS is not set
++# CONFIG_FDT_FIXUP_PARTITIONS is not set
++# CONFIG_FDT_SIMPLEFB is not set
++CONFIG_ARCH_FIXUP_FDT_MEMORY=y
++# CONFIG_USE_BOOTARGS is not set
++# CONFIG_BOOTARGS_SUBST is not set
++# CONFIG_USE_BOOTCOMMAND is not set
++CONFIG_USE_PREBOOT=y
++CONFIG_DEFAULT_FDT_FILE="openwrt-one"
++# CONFIG_SAVE_PREV_BL_FDT_ADDR is not set
++# CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR is not set
++
++#
++# Configuration editor
++#
++# CONFIG_CEDIT is not set
++
++#
++# Console
++#
++CONFIG_MENU=y
++# CONFIG_CONSOLE_RECORD is not set
++# CONFIG_DISABLE_CONSOLE is not set
++CONFIG_LOGLEVEL=7
++# CONFIG_SILENT_CONSOLE is not set
++# CONFIG_SPL_SILENT_CONSOLE is not set
++# CONFIG_TPL_SILENT_CONSOLE is not set
++# CONFIG_PRE_CONSOLE_BUFFER is not set
++CONFIG_CONSOLE_FLUSH_SUPPORT=y
++# CONFIG_CONSOLE_FLUSH_ON_NEWLINE is not set
++# CONFIG_CONSOLE_MUX is not set
++# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set
++# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set
++# CONFIG_SYS_CONSOLE_INFO_QUIET is not set
++# CONFIG_SYS_STDIO_DEREGISTER is not set
++# CONFIG_SPL_SYS_STDIO_DEREGISTER is not set
++# CONFIG_SYS_DEVICE_NULLDEV is not set
++
++#
++# Logging
++#
++CONFIG_LOG=y
++CONFIG_LOG_MAX_LEVEL=6
++CONFIG_LOG_DEFAULT_LEVEL=6
++CONFIG_LOG_CONSOLE=y
++# CONFIG_LOGF_FILE is not set
++# CONFIG_LOGF_LINE is not set
++# CONFIG_LOGF_FUNC is not set
++CONFIG_LOGF_FUNC_PAD=20
++# CONFIG_LOG_SYSLOG is not set
++# CONFIG_LOG_ERROR_RETURN is not set
++
++#
++# Init options
++#
++# CONFIG_BOARD_TYPES is not set
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DISPLAY_BOARDINFO=y
++# CONFIG_DISPLAY_BOARDINFO_LATE is not set
++
++#
++# Start-up hooks
++#
++# CONFIG_CYCLIC is not set
++CONFIG_EVENT=y
++CONFIG_EVENT_DYNAMIC=y
++# CONFIG_EVENT_DEBUG is not set
++# CONFIG_ARCH_MISC_INIT is not set
++# CONFIG_BOARD_EARLY_INIT_F is not set
++# CONFIG_BOARD_EARLY_INIT_R is not set
++# CONFIG_BOARD_POSTCLK_INIT is not set
++CONFIG_BOARD_LATE_INIT=y
++# CONFIG_CLOCKS is not set
++# CONFIG_HWCONFIG is not set
++CONFIG_LAST_STAGE_INIT=y
++# CONFIG_MISC_INIT_R is not set
++# CONFIG_SYS_MALLOC_BOOTPARAMS is not set
++# CONFIG_ID_EEPROM is not set
++# CONFIG_RESET_PHY_R is not set
++
++#
++# Security support
++#
++CONFIG_HASH=y
++# CONFIG_STACKPROTECTOR is not set
++# CONFIG_BOARD_RNG_SEED is not set
++
++#
++# Update support
++#
++# CONFIG_UPDATE_TFTP is not set
++# CONFIG_ANDROID_AB is not set
++
++#
++# Blob list
++#
++# CONFIG_BLOBLIST is not set
++CONFIG_SUPPORT_SPL=y
++# CONFIG_VPL is not set
++
++#
++# Command line interface
++#
++CONFIG_CMDLINE=y
++CONFIG_HUSH_PARSER=y
++CONFIG_CMDLINE_EDITING=y
++# CONFIG_CMDLINE_PS_SUPPORT is not set
++CONFIG_AUTO_COMPLETE=y
++CONFIG_SYS_LONGHELP=y
++CONFIG_SYS_PROMPT="OpenWrt One> "
++CONFIG_SYS_PROMPT_HUSH_PS2="> "
++CONFIG_SYS_MAXARGS=16
++CONFIG_SYS_CBSIZE=512
++CONFIG_SYS_PBSIZE=1049
++CONFIG_SYS_XTRACE=y
++CONFIG_BUILD_BIN2C=y
++
++#
++# Commands
++#
++
++#
++# Info commands
++#
++CONFIG_CMD_BDI=y
++# CONFIG_CMD_BDINFO_EXTRA is not set
++# CONFIG_CMD_CONFIG is not set
++CONFIG_CMD_CONSOLE=y
++CONFIG_CMD_CPU=y
++# CONFIG_CMD_HISTORY is not set
++CONFIG_CMD_LICENSE=y
++# CONFIG_CMD_PMC is not set
++
++#
++# Boot commands
++#
++CONFIG_CMD_BOOTD=y
++CONFIG_CMD_BOOTM=y
++# CONFIG_CMD_BOOTDEV is not set
++CONFIG_CMD_BOOTFLOW=y
++# CONFIG_CMD_BOOTMETH is not set
++CONFIG_BOOTM_EFI=y
++# CONFIG_CMD_BOOTZ is not set
++CONFIG_CMD_BOOTI=y
++CONFIG_BOOTM_LINUX=y
++# CONFIG_BOOTM_NETBSD is not set
++# CONFIG_BOOTM_OPENRTOS is not set
++# CONFIG_BOOTM_OSE is not set
++# CONFIG_BOOTM_PLAN9 is not set
++# CONFIG_BOOTM_RTEMS is not set
++# CONFIG_CMD_VBE is not set
++# CONFIG_BOOTM_VXWORKS is not set
++CONFIG_SYS_BOOTM_LEN=0x4000000
++CONFIG_CMD_BOOTEFI=y
++CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y
++# CONFIG_CMD_BOOTEFI_HELLO is not set
++# CONFIG_CMD_BOOTEFI_SELFTEST is not set
++CONFIG_CMD_BOOTMENU=y
++# CONFIG_CMD_ADTIMG is not set
++CONFIG_CMD_ELF=y
++CONFIG_CMD_FDT=y
++CONFIG_CMD_GO=y
++CONFIG_CMD_RUN=y
++CONFIG_CMD_IMI=y
++# CONFIG_CMD_IMLS is not set
++CONFIG_CMD_XIMG=y
++# CONFIG_CMD_ZBOOT is not set
++
++#
++# Environment commands
++#
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_EXPORTENV=y
++CONFIG_CMD_IMPORTENV=y
++CONFIG_CMD_EDITENV=y
++# CONFIG_CMD_GREPENV is not set
++CONFIG_CMD_SAVEENV=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_ENV_EXISTS=y
++CONFIG_CMD_ENV_READMEM=y
++# CONFIG_CMD_ENV_CALLBACK is not set
++CONFIG_CMD_ENV_FLAGS=y
++# CONFIG_CMD_NVEDIT_EFI is not set
++# CONFIG_CMD_NVEDIT_INDIRECT is not set
++# CONFIG_CMD_NVEDIT_INFO is not set
++# CONFIG_CMD_NVEDIT_LOAD is not set
++# CONFIG_CMD_NVEDIT_SELECT is not set
++
++#
++# Memory commands
++#
++# CONFIG_CMD_BINOP is not set
++# CONFIG_CMD_BLOBLIST is not set
++CONFIG_CMD_CRC32=y
++# CONFIG_CRC32_VERIFY is not set
++# CONFIG_CMD_EEPROM is not set
++# CONFIG_LOOPW is not set
++# CONFIG_CMD_MD5SUM is not set
++# CONFIG_CMD_MEMINFO is not set
++CONFIG_CMD_MEMORY=y
++# CONFIG_CMD_MEM_SEARCH is not set
++# CONFIG_CMD_MX_CYCLIC is not set
++CONFIG_CMD_RANDOM=y
++# CONFIG_CMD_MEMTEST is not set
++# CONFIG_CMD_SHA1SUM is not set
++CONFIG_CMD_STRINGS=y
++
++#
++# Compression commands
++#
++CONFIG_CMD_LZMADEC=y
++# CONFIG_CMD_UNLZ4 is not set
++# CONFIG_CMD_UNZIP is not set
++# CONFIG_CMD_ZIP is not set
++
++#
++# Device access commands
++#
++# CONFIG_CMD_ARMFLASH is not set
++# CONFIG_CMD_BIND is not set
++# CONFIG_CMD_CLK is not set
++# CONFIG_CMD_DEMO is not set
++# CONFIG_CMD_DFU is not set
++CONFIG_CMD_DM=y
++CONFIG_CMD_FLASH=y
++# CONFIG_CMD_FPGAD is not set
++# CONFIG_CMD_FUSE is not set
++CONFIG_CMD_GPIO=y
++# CONFIG_CMD_GPIO_READ is not set
++CONFIG_CMD_PWM=y
++# CONFIG_CMD_GPT is not set
++# CONFIG_RANDOM_UUID is not set
++# CONFIG_CMD_IDE is not set
++# CONFIG_CMD_IO is not set
++# CONFIG_CMD_IOTRACE is not set
++# CONFIG_CMD_I2C is not set
++CONFIG_CMD_LOADB=y
++# CONFIG_CMD_LOADM is not set
++CONFIG_CMD_LOADS=y
++# CONFIG_LOADS_ECHO is not set
++# CONFIG_CMD_SAVES is not set
++# CONFIG_SYS_LOADS_BAUD_CHANGE is not set
++CONFIG_CMD_LOADXY_TIMEOUT=90
++# CONFIG_CMD_LSBLK is not set
++# CONFIG_CMD_MBR is not set
++# CONFIG_CMD_CLONE is not set
++CONFIG_CMD_MTD=y
++CONFIG_CMD_NAND_EXT=y
++# CONFIG_CMD_ONENAND is not set
++# CONFIG_CMD_OSD is not set
++# CONFIG_CMD_PART is not set
++CONFIG_CMD_PCI=y
++CONFIG_CMD_PINMUX=y
++# CONFIG_CMD_POWEROFF is not set
++# CONFIG_CMD_READ is not set
++# CONFIG_CMD_SATA is not set
++# CONFIG_CMD_SDRAM is not set
++CONFIG_CMD_SF=y
++CONFIG_CMD_SF_TEST=y
++# CONFIG_CMD_SPI is not set
++# CONFIG_CMD_TSI148 is not set
++# CONFIG_CMD_UNIVERSE is not set
++CONFIG_CMD_USB=y
++# CONFIG_CMD_USB_SDP is not set
++# CONFIG_CMD_RKMTD is not set
++# CONFIG_CMD_WRITE is not set
++
++#
++# Shell scripting commands
++#
++# CONFIG_CMD_CAT is not set
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_SETEXPR=y
++# CONFIG_CMD_SETEXPR_FMT is not set
++# CONFIG_CMD_XXD is not set
++
++#
++# Android support commands
++#
++CONFIG_CMD_NET=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_DHCP=y
++# CONFIG_BOOTP_MAY_FAIL is not set
++CONFIG_BOOTP_BOOTPATH=y
++# CONFIG_BOOTP_VENDOREX is not set
++# CONFIG_BOOTP_BOOTFILESIZE is not set
++CONFIG_BOOTP_DNS=y
++# CONFIG_BOOTP_DNS2 is not set
++CONFIG_BOOTP_GATEWAY=y
++CONFIG_BOOTP_HOSTNAME=y
++# CONFIG_BOOTP_PREFER_SERVERIP is not set
++CONFIG_BOOTP_SUBNETMASK=y
++# CONFIG_BOOTP_NISDOMAIN is not set
++# CONFIG_BOOTP_NTPSERVER is not set
++# CONFIG_BOOTP_TIMEOFFSET is not set
++# CONFIG_CMD_PCAP is not set
++CONFIG_BOOTP_PXE=y
++CONFIG_BOOTP_PXE_CLIENTARCH=0x16
++# CONFIG_BOOTP_PXE_DHCP_OPTION is not set
++CONFIG_BOOTP_VCI_STRING="U-Boot.armv8"
++CONFIG_CMD_TFTPBOOT=y
++# CONFIG_CMD_TFTPPUT is not set
++CONFIG_CMD_TFTPSRV=y
++CONFIG_NET_TFTP_VARS=y
++CONFIG_CMD_RARP=y
++# CONFIG_CMD_NFS is not set
++# CONFIG_SYS_DISABLE_AUTOLOAD is not set
++# CONFIG_CMD_WGET is not set
++# CONFIG_CMD_MII is not set
++# CONFIG_CMD_MDIO is not set
++CONFIG_CMD_PING=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_ETHSW is not set
++CONFIG_CMD_PXE=y
++# CONFIG_CMD_WOL is not set
++
++#
++# Misc commands
++#
++# CONFIG_CMD_2048 is not set
++# CONFIG_CMD_BSP is not set
++CONFIG_CMD_BLOCK_CACHE=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++# CONFIG_CMD_CONITRACE is not set
++# CONFIG_CMD_CLS is not set
++# CONFIG_CMD_EFIDEBUG is not set
++CONFIG_CMD_EFICONFIG=y
++# CONFIG_CMD_EXCEPTION is not set
++CONFIG_CMD_LED=y
++# CONFIG_CMD_INI is not set
++# CONFIG_CMD_DATE is not set
++# CONFIG_CMD_TIME is not set
++# CONFIG_CMD_GETTIME is not set
++# CONFIG_CMD_PAUSE is not set
++CONFIG_CMD_SLEEP=y
++# CONFIG_CMD_TIMER is not set
++# CONFIG_CMD_SYSBOOT is not set
++# CONFIG_CMD_QFW is not set
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_PSTORE_MEM_SIZE=0x10000
++CONFIG_CMD_PSTORE_RECORD_SIZE=0x1000
++CONFIG_CMD_PSTORE_CONSOLE_SIZE=0x1000
++CONFIG_CMD_PSTORE_FTRACE_SIZE=0x1000
++CONFIG_CMD_PSTORE_PMSG_SIZE=0x1000
++CONFIG_CMD_PSTORE_ECC_SIZE=0
++# CONFIG_CMD_TERMINAL is not set
++CONFIG_CMD_UUID=y
++
++#
++# TI specific command line interface
++#
++
++#
++# Power commands
++#
++
++#
++# Security commands
++#
++# CONFIG_CMD_AES is not set
++# CONFIG_CMD_BLOB is not set
++CONFIG_CMD_HASH=y
++# CONFIG_CMD_HVC is not set
++CONFIG_CMD_SMC=y
++# CONFIG_HASH_VERIFY is not set
++
++#
++# Firmware commands
++#
++
++#
++# Filesystem commands
++#
++# CONFIG_CMD_BTRFS is not set
++# CONFIG_CMD_EROFS is not set
++# CONFIG_CMD_EXT2 is not set
++# CONFIG_CMD_EXT4 is not set
++CONFIG_CMD_FAT=y
++# CONFIG_CMD_SQUASHFS is not set
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
++# CONFIG_CMD_JFFS2 is not set
++# CONFIG_CMD_MTDPARTS is not set
++CONFIG_MTDIDS_DEFAULT=""
++CONFIG_MTDPARTS_DEFAULT=""
++# CONFIG_CMD_REISER is not set
++# CONFIG_CMD_ZFS is not set
++
++#
++# Debug commands
++#
++# CONFIG_CMD_DIAG is not set
++# CONFIG_CMD_EVENT is not set
++# CONFIG_CMD_LOG is not set
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++
++#
++# Partition Types
++#
++CONFIG_PARTITIONS=y
++# CONFIG_MAC_PARTITION is not set
++CONFIG_DOS_PARTITION=y
++# CONFIG_ISO_PARTITION is not set
++# CONFIG_AMIGA_PARTITION is not set
++# CONFIG_EFI_PARTITION is not set
++CONFIG_PARTITION_UUIDS=y
++CONFIG_SUPPORT_OF_CONTROL=y
++
++#
++# Device Tree Control
++#
++CONFIG_OF_CONTROL=y
++CONFIG_OF_REAL=y
++# CONFIG_OF_LIVE is not set
++CONFIG_OF_SEPARATE=y
++# CONFIG_OF_EMBED is not set
++# CONFIG_OF_BOARD is not set
++# CONFIG_OF_OMIT_DTB is not set
++CONFIG_DEVICE_TREE_INCLUDES=""
++CONFIG_OF_LIST="openwrt-one"
++# CONFIG_MULTI_DTB_FIT is not set
++CONFIG_OF_TAG_MIGRATE=y
++# CONFIG_OF_DTB_PROPS_REMOVE is not set
++
++#
++# Environment
++#
++CONFIG_ENV_SUPPORT=y
++CONFIG_SAVEENV=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_MIN_ENTRIES=64
++CONFIG_ENV_MAX_ENTRIES=512
++# CONFIG_ENV_IS_NOWHERE is not set
++# CONFIG_ENV_IS_IN_EEPROM is not set
++# CONFIG_ENV_IS_IN_FAT is not set
++# CONFIG_ENV_IS_IN_EXT4 is not set
++# CONFIG_ENV_IS_IN_FLASH is not set
++# CONFIG_ENV_IS_IN_MTD is not set
++# CONFIG_ENV_IS_IN_NAND is not set
++# CONFIG_ENV_IS_IN_NVRAM is not set
++# CONFIG_ENV_IS_IN_ONENAND is not set
++# CONFIG_ENV_IS_IN_REMOTE is not set
++# CONFIG_ENV_IS_IN_SPI_FLASH is not set
++CONFIG_ENV_IS_IN_UBI=y
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_ENV_UBI_PART="ubi"
++CONFIG_ENV_UBI_VOLUME="ubootenv"
++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
++# CONFIG_ENV_UBI_VOLUME_CREATE is not set
++CONFIG_ENV_UBI_VID_OFFSET=0
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_DEFAULT_ENV_FILE="openwrt-one-spi-nand_env"
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++# CONFIG_ENV_IMPORT_FDT is not set
++# CONFIG_ENV_APPEND is not set
++# CONFIG_ENV_WRITEABLE_LIST is not set
++# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set
++# CONFIG_USE_BOOTFILE is not set
++# CONFIG_USE_ETHPRIME is not set
++# CONFIG_USE_HOSTNAME is not set
++# CONFIG_VERSION_VARIABLE is not set
++CONFIG_NET=y
++CONFIG_ARP_TIMEOUT=5000
++CONFIG_NET_RETRY_COUNT=5
++CONFIG_PROT_UDP=y
++CONFIG_BOOTDEV_ETH=y
++# CONFIG_BOOTP_SEND_HOSTNAME is not set
++CONFIG_NET_RANDOM_ETHADDR=y
++# CONFIG_NETCONSOLE is not set
++# CONFIG_IP_DEFRAG is not set
++# CONFIG_SYS_FAULT_ECHO_LINK_DOWN is not set
++CONFIG_TFTP_BLOCKSIZE=1468
++# CONFIG_TFTP_PORT is not set
++CONFIG_TFTP_WINDOWSIZE=1
++# CONFIG_TFTP_TSIZE is not set
++# CONFIG_SERVERIP_FROM_PROXYDHCP is not set
++CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100
++# CONFIG_KEEP_SERVERADDR is not set
++# CONFIG_UDP_CHECKSUM is not set
++# CONFIG_BOOTP_SERVERIP is not set
++CONFIG_BOOTP_MAX_ROOT_PATH_LEN=64
++# CONFIG_USE_GATEWAYIP is not set
++# CONFIG_USE_IPADDR is not set
++# CONFIG_USE_NETMASK is not set
++# CONFIG_USE_ROOTPATH is not set
++# CONFIG_USE_SERVERIP is not set
++# CONFIG_PROT_TCP is not set
++# CONFIG_IPV6 is not set
++CONFIG_SYS_RX_ETH_BUFFER=4
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_DM=y
++# CONFIG_DM_WARN is not set
++# CONFIG_DM_DEBUG is not set
++# CONFIG_DM_STATS is not set
++CONFIG_DM_DEVICE_REMOVE=y
++CONFIG_DM_EVENT=y
++CONFIG_DM_STDIO=y
++CONFIG_DM_SEQ_ALIAS=y
++# CONFIG_DM_DMA is not set
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++# CONFIG_DEVRES is not set
++CONFIG_SIMPLE_BUS=y
++# CONFIG_SIMPLE_BUS_CORRECT_RANGE is not set
++# CONFIG_SIMPLE_PM_BUS is not set
++CONFIG_OF_TRANSLATE=y
++# CONFIG_TRANSLATION_OFFSET is not set
++CONFIG_DM_DEV_READ_INLINE=y
++# CONFIG_OFNODE_MULTI_TREE is not set
++# CONFIG_BOUNCE_BUFFER is not set
++# CONFIG_ADC is not set
++# CONFIG_ADC_EXYNOS is not set
++# CONFIG_ADC_SANDBOX is not set
++# CONFIG_SARADC_MESON is not set
++# CONFIG_SARADC_ROCKCHIP is not set
++# CONFIG_SATA is not set
++# CONFIG_SCSI_AHCI is not set
++
++#
++# SATA/SCSI device support
++#
++# CONFIG_AXI is not set
++
++#
++# Bus devices
++#
++CONFIG_BLK=y
++CONFIG_BLOCK_CACHE=y
++# CONFIG_BLKMAP is not set
++# CONFIG_EFI_MEDIA is not set
++# CONFIG_IDE is not set
++# CONFIG_LBA48 is not set
++# CONFIG_SYS_64BIT_LBA is not set
++# CONFIG_RKMTD is not set
++# CONFIG_BOOTCOUNT_LIMIT is not set
++
++#
++# Button Support
++#
++CONFIG_BUTTON=y
++# CONFIG_BUTTON_ADC is not set
++CONFIG_BUTTON_GPIO=y
++
++#
++# Cache Controller drivers
++#
++# CONFIG_CACHE is not set
++# CONFIG_L2X0_CACHE is not set
++# CONFIG_V5L2_CACHE is not set
++# CONFIG_NCORE_CACHE is not set
++# CONFIG_SIFIVE_CCACHE is not set
++
++#
++# Clock
++#
++CONFIG_CLK=y
++# CONFIG_CLK_CCF is not set
++# CONFIG_CLK_GPIO is not set
++# CONFIG_CLK_CDCE9XX is not set
++# CONFIG_CLK_ICS8N3QV01 is not set
++# CONFIG_CLK_K210 is not set
++# CONFIG_CLK_MPC83XX is not set
++# CONFIG_CLK_XLNX_CLKWZRD is not set
++# CONFIG_CLK_AT91 is not set
++# CONFIG_CLK_RCAR is not set
++# CONFIG_CLK_RCAR_CPG_LIB is not set
++# CONFIG_CLK_SIFIVE is not set
++# CONFIG_CLK_TI_AM3_DPLL is not set
++# CONFIG_CLK_TI_CTRL is not set
++# CONFIG_CLK_TI_GATE is not set
++# CONFIG_CLK_K3 is not set
++CONFIG_CPU=y
++# CONFIG_CPU_IMX is not set
++
++#
++# Hardware crypto devices
++#
++# CONFIG_DM_HASH is not set
++# CONFIG_FSL_CAAM is not set
++CONFIG_CAAM_64BIT=y
++# CONFIG_SYS_FSL_SEC_BE is not set
++# CONFIG_SYS_FSL_SEC_LE is not set
++# CONFIG_NPCM_AES is not set
++# CONFIG_NPCM_SHA is not set
++# CONFIG_DDR_SPD is not set
++# CONFIG_IMX_SNPS_DDR_PHY is not set
++
++#
++# Demo for driver model
++#
++# CONFIG_DM_DEMO is not set
++
++#
++# DFU support
++#
++
++#
++# DMA Support
++#
++# CONFIG_DMA is not set
++# CONFIG_DMA_LPC32XX is not set
++# CONFIG_TI_EDMA3 is not set
++# CONFIG_DMA_LEGACY is not set
++
++#
++# Extcon Support
++#
++# CONFIG_EXTCON is not set
++
++#
++# Fastboot support
++#
++# CONFIG_UDP_FUNCTION_FASTBOOT is not set
++# CONFIG_TCP_FUNCTION_FASTBOOT is not set
++CONFIG_FIRMWARE=y
++CONFIG_ARM_PSCI_FW=y
++# CONFIG_ZYNQMP_FIRMWARE is not set
++# CONFIG_ARM_SMCCC_FEATURES is not set
++# CONFIG_ARM_FFA_TRANSPORT is not set
++# CONFIG_SCMI_FIRMWARE is not set
++# CONFIG_DM_FUZZING_ENGINE is not set
++
++#
++# FPGA support
++#
++# CONFIG_FPGA_ALTERA is not set
++# CONFIG_FPGA_SOCFPGA is not set
++# CONFIG_FPGA_LATTICE is not set
++# CONFIG_FPGA_XILINX is not set
++# CONFIG_DM_FPGA is not set
++# CONFIG_FWU_MDATA is not set
++CONFIG_GPIO=y
++CONFIG_GPIO_HOG=y
++# CONFIG_DM_GPIO_LOOKUP_LABEL is not set
++# CONFIG_ALTERA_PIO is not set
++# CONFIG_BCM2835_GPIO is not set
++# CONFIG_DWAPB_GPIO is not set
++# CONFIG_AT91_GPIO is not set
++# CONFIG_ATMEL_PIO4 is not set
++# CONFIG_ASPEED_GPIO is not set
++# CONFIG_DA8XX_GPIO is not set
++# CONFIG_HIKEY_GPIO is not set
++# CONFIG_INTEL_BROADWELL_GPIO is not set
++# CONFIG_INTEL_GPIO is not set
++# CONFIG_INTEL_ICH6_GPIO is not set
++# CONFIG_IMX_RGPIO2P is not set
++# CONFIG_IPROC_GPIO is not set
++# CONFIG_HSDK_CREG_GPIO is not set
++# CONFIG_KIRKWOOD_GPIO is not set
++# CONFIG_LPC32XX_GPIO is not set
++# CONFIG_MCP230XX_GPIO is not set
++# CONFIG_MSM_GPIO is not set
++# CONFIG_MXC_GPIO is not set
++# CONFIG_MXS_GPIO is not set
++# CONFIG_NPCM_GPIO is not set
++# CONFIG_CMD_PCA953X is not set
++# CONFIG_ROCKCHIP_GPIO is not set
++# CONFIG_XILINX_GPIO is not set
++# CONFIG_TCA642X is not set
++# CONFIG_TEGRA_GPIO is not set
++# CONFIG_TEGRA186_GPIO is not set
++# CONFIG_VYBRID_GPIO is not set
++# CONFIG_SIFIVE_GPIO is not set
++# CONFIG_ZYNQ_GPIO is not set
++# CONFIG_DM_74X164 is not set
++# CONFIG_PCA953X is not set
++# CONFIG_MPC8XXX_GPIO is not set
++# CONFIG_MPC8XX_GPIO is not set
++# CONFIG_NX_GPIO is not set
++# CONFIG_NOMADIK_GPIO is not set
++# CONFIG_ZYNQMP_GPIO_MODEPIN is not set
++# CONFIG_SLG7XL45106_I2C_GPO is not set
++# CONFIG_TURRIS_OMNIA_MCU is not set
++# CONFIG_FTGPIO010 is not set
++
++#
++# Hardware Spinlock Support
++#
++# CONFIG_DM_HWSPINLOCK is not set
++CONFIG_I2C=y
++# CONFIG_DM_I2C is not set
++# CONFIG_SYS_I2C_LEGACY is not set
++# CONFIG_SPL_SYS_I2C_LEGACY is not set
++# CONFIG_SYS_I2C_FSL is not set
++# CONFIG_SYS_I2C_DW is not set
++# CONFIG_SYS_I2C_IMX_LPI2C is not set
++# CONFIG_SYS_I2C_MTK is not set
++# CONFIG_SYS_I2C_MICROCHIP is not set
++# CONFIG_SYS_I2C_MXC is not set
++# CONFIG_SYS_I2C_NPCM is not set
++# CONFIG_SYS_I2C_SOFT is not set
++# CONFIG_SYS_I2C_MV is not set
++# CONFIG_SYS_I2C_MVTWSI is not set
++CONFIG_INPUT=y
++# CONFIG_DM_KEYBOARD is not set
++# CONFIG_CROS_EC_KEYB is not set
++# CONFIG_TEGRA_KEYBOARD is not set
++# CONFIG_TWL4030_INPUT is not set
++
++#
++# IOMMU device drivers
++#
++# CONFIG_IOMMU is not set
++
++#
++# LED Support
++#
++CONFIG_LED=y
++# CONFIG_LED_PWM is not set
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++# CONFIG_LED_STATUS is not set
++
++#
++# Mailbox Controller Support
++#
++# CONFIG_DM_MAILBOX is not set
++
++#
++# Memory Controller drivers
++#
++# CONFIG_MEMORY is not set
++# CONFIG_ATMEL_EBI is not set
++# CONFIG_MFD_ATMEL_SMC is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MISC is not set
++# CONFIG_NVMEM is not set
++# CONFIG_SPL_NVMEM is not set
++# CONFIG_SMSC_LPC47M is not set
++# CONFIG_SMSC_SIO1007 is not set
++# CONFIG_CROS_EC is not set
++# CONFIG_DS4510 is not set
++# CONFIG_FSL_SEC_MON is not set
++# CONFIG_IRQ is not set
++# CONFIG_NPCM_HOST is not set
++# CONFIG_NUVOTON_NCT6102D is not set
++# CONFIG_PWRSEQ is not set
++# CONFIG_PCA9551_LED is not set
++# CONFIG_TEST_DRV is not set
++# CONFIG_USB_HUB_USB251XB is not set
++# CONFIG_TWL4030_LED is not set
++# CONFIG_WINBOND_W83627 is not set
++# CONFIG_FS_LOADER is not set
++
++#
++# MMC Host controller Support
++#
++# CONFIG_MMC is not set
++# CONFIG_MMC_BROKEN_CD is not set
++# CONFIG_DM_MMC is not set
++# CONFIG_FSL_ESDHC is not set
++# CONFIG_FSL_ESDHC_IMX is not set
++
++#
++# MTD Support
++#
++CONFIG_MTD_PARTITIONS=y
++CONFIG_MTD=y
++CONFIG_DM_MTD=y
++# CONFIG_MTD_NOR_FLASH is not set
++# CONFIG_MTD_CONCAT is not set
++# CONFIG_SYS_MTDPARTS_RUNTIME is not set
++# CONFIG_FLASH_CFI_DRIVER is not set
++# CONFIG_CFI_FLASH is not set
++# CONFIG_ALTERA_QSPI is not set
++# CONFIG_HBMC_AM654 is not set
++# CONFIG_SAMSUNG_ONENAND is not set
++# CONFIG_USE_SYS_MAX_FLASH_BANKS is not set
++CONFIG_MTD_NAND_CORE=y
++# CONFIG_MTD_RAW_NAND is not set
++CONFIG_MTD_SPI_NAND=y
++
++#
++# SPI Flash Support
++#
++CONFIG_DM_SPI_FLASH=y
++CONFIG_SPI_FLASH=y
++CONFIG_SF_DEFAULT_BUS=0
++CONFIG_SF_DEFAULT_CS=0
++# CONFIG_BOOTDEV_SPI_FLASH is not set
++CONFIG_SPI_FLASH_SFDP_SUPPORT=y
++CONFIG_SPI_FLASH_SMART_HWCAPS=y
++# CONFIG_SPI_NOR_BOOT_SOFT_RESET_EXT_INVERT is not set
++# CONFIG_SPI_FLASH_SOFT_RESET is not set
++# CONFIG_SPI_FLASH_BAR is not set
++CONFIG_SPI_FLASH_LOCK=y
++CONFIG_SPI_FLASH_UNLOCK_ALL=y
++# CONFIG_SPI_FLASH_ATMEL is not set
++CONFIG_SPI_FLASH_EON=y
++CONFIG_SPI_FLASH_GIGADEVICE=y
++CONFIG_SPI_FLASH_ISSI=y
++CONFIG_SPI_FLASH_MACRONIX=y
++CONFIG_SPI_FLASH_SPANSION=y
++# CONFIG_SPI_FLASH_S28HX_T is not set
++CONFIG_SPI_FLASH_STMICRO=y
++# CONFIG_SPI_FLASH_MT35XU is not set
++# CONFIG_SPI_FLASH_SST is not set
++CONFIG_SPI_FLASH_WINBOND=y
++CONFIG_SPI_FLASH_XMC=y
++CONFIG_SPI_FLASH_XTX=y
++# CONFIG_SPI_FLASH_ZBIT is not set
++CONFIG_SPI_FLASH_USE_4K_SECTORS=y
++# CONFIG_SPI_FLASH_DATAFLASH is not set
++CONFIG_SPI_FLASH_MTD=y
++
++#
++# UBI support
++#
++CONFIG_UBI_SILENCE_MSG=y
++CONFIG_MTD_UBI=y
++CONFIG_MTD_UBI_MODULE=y
++CONFIG_MTD_UBI_WL_THRESHOLD=4096
++CONFIG_MTD_UBI_BEB_LIMIT=20
++# CONFIG_MTD_UBI_FASTMAP is not set
++# CONFIG_NVMXIP is not set
++# CONFIG_NVMXIP_QSPI is not set
++# CONFIG_NMBM is not set
++
++#
++# Multiplexer drivers
++#
++# CONFIG_MULTIPLEXER is not set
++# CONFIG_BITBANGMII is not set
++# CONFIG_MV88E6352_SWITCH is not set
++CONFIG_PHYLIB=y
++# CONFIG_PHY_ADDR_ENABLE is not set
++# CONFIG_B53_SWITCH is not set
++# CONFIG_MV88E61XX_SWITCH is not set
++# CONFIG_PHYLIB_10G is not set
++# CONFIG_PHY_ADIN is not set
++# CONFIG_PHY_AIROHA is not set
++# CONFIG_PHY_AQUANTIA is not set
++# CONFIG_PHY_ATHEROS is not set
++# CONFIG_SPL_PHY_ATHEROS is not set
++# CONFIG_PHY_BROADCOM is not set
++# CONFIG_PHY_CORTINA is not set
++# CONFIG_PHY_DAVICOM is not set
++# CONFIG_PHY_ET1011C is not set
++# CONFIG_PHY_LXT is not set
++# CONFIG_PHY_MARVELL is not set
++# CONFIG_PHY_MARVELL_10G is not set
++# CONFIG_PHY_MESON_GXL is not set
++# CONFIG_PHY_MICREL is not set
++# CONFIG_PHY_MOTORCOMM is not set
++# CONFIG_PHY_MSCC is not set
++# CONFIG_PHY_NATSEMI is not set
++# CONFIG_PHY_NXP_C45_TJA11XX is not set
++# CONFIG_PHY_NXP_TJA11XX is not set
++# CONFIG_PHY_REALTEK is not set
++# CONFIG_PHY_SMSC is not set
++# CONFIG_PHY_TERANETICS is not set
++# CONFIG_PHY_TI is not set
++# CONFIG_PHY_TI_DP83867 is not set
++# CONFIG_PHY_TI_DP83869 is not set
++# CONFIG_PHY_TI_GENERIC is not set
++# CONFIG_PHY_VITESSE is not set
++# CONFIG_PHY_XILINX is not set
++# CONFIG_PHY_XILINX_GMII2RGMII is not set
++# CONFIG_PHY_XWAY is not set
++# CONFIG_PHY_ETHERNET_ID is not set
++CONFIG_PHY_FIXED=y
++# CONFIG_PHY_NCSI is not set
++# CONFIG_FSL_MEMAC is not set
++CONFIG_PHY_RESET_DELAY=0
++# CONFIG_FSL_PFE is not set
++CONFIG_ETH=y
++CONFIG_DM_ETH=y
++# CONFIG_DM_MDIO is not set
++# CONFIG_DM_ETH_PHY is not set
++CONFIG_NETDEVICES=y
++# CONFIG_PHY_GIGE is not set
++# CONFIG_ALTERA_TSE is not set
++# CONFIG_BCM_SF2_ETH is not set
++# CONFIG_BCMGENET is not set
++# CONFIG_BNXT_ETH is not set
++# CONFIG_CALXEDA_XGMAC is not set
++# CONFIG_DRIVER_DM9000 is not set
++# CONFIG_DWC_ETH_QOS is not set
++# CONFIG_EEPRO100 is not set
++# CONFIG_ETH_DESIGNWARE is not set
++# CONFIG_ETH_DESIGNWARE_MESON8B is not set
++# CONFIG_ETHOC is not set
++# CONFIG_FMAN_ENET is not set
++# CONFIG_FTMAC100 is not set
++# CONFIG_FTGMAC100 is not set
++# CONFIG_MCFFEC is not set
++# CONFIG_FSLDMAFEC is not set
++# CONFIG_KS8851_MLL is not set
++# CONFIG_LITEETH is not set
++# CONFIG_MACB is not set
++# CONFIG_NET_NPCM750 is not set
++# CONFIG_PCH_GBE is not set
++# CONFIG_RGMII is not set
++# CONFIG_MII is not set
++# CONFIG_RMII is not set
++# CONFIG_PCNET is not set
++# CONFIG_QE_UEC is not set
++# CONFIG_RTL8139 is not set
++# CONFIG_SMC911X is not set
++# CONFIG_SUN7I_GMAC is not set
++# CONFIG_SUN4I_EMAC is not set
++# CONFIG_SUN8I_EMAC is not set
++# CONFIG_SH_ETHER is not set
++# CONFIG_DRIVER_TI_CPSW is not set
++# CONFIG_DRIVER_TI_EMAC is not set
++# CONFIG_DRIVER_TI_KEYSTONE_NET is not set
++# CONFIG_TULIP is not set
++# CONFIG_XILINX_AXIEMAC is not set
++# CONFIG_VSC7385_ENET is not set
++# CONFIG_XILINX_EMACLITE is not set
++# CONFIG_ZYNQ_GEM is not set
++# CONFIG_SYS_DPAA_QBMAN is not set
++# CONFIG_TSEC_ENET is not set
++CONFIG_MEDIATEK_ETH=y
++# CONFIG_HIFEMAC_ETH is not set
++# CONFIG_HIGMACV300_ETH is not set
++# CONFIG_NVME is not set
++# CONFIG_NVME_APPLE is not set
++
++#
++# PCI Endpoint
++#
++# CONFIG_PCI_ENDPOINT is not set
++# CONFIG_X86_PCH7 is not set
++# CONFIG_X86_PCH9 is not set
++
++#
++# PHY Subsystem
++#
++CONFIG_PHY=y
++# CONFIG_NOP_PHY is not set
++# CONFIG_MIPI_DPHY_HELPERS is not set
++# CONFIG_BCM_SR_PCIE_PHY is not set
++# CONFIG_OMAP_USB2_PHY is not set
++CONFIG_PHY_MTK_TPHY=y
++
++#
++# Rockchip PHY driver
++#
++# CONFIG_PHY_CADENCE_SIERRA is not set
++# CONFIG_PHY_CADENCE_TORRENT is not set
++# CONFIG_MSM8916_USB_PHY is not set
++# CONFIG_MVEBU_COMPHY_SUPPORT is not set
++
++#
++# Pin controllers
++#
++CONFIG_PINCTRL=y
++CONFIG_PINCTRL_FULL=y
++CONFIG_PINCTRL_GENERIC=y
++CONFIG_PINMUX=y
++CONFIG_PINCONF=y
++CONFIG_PINCONF_RECURSIVE=y
++# CONFIG_PINCTRL_AT91 is not set
++# CONFIG_PINCTRL_AT91PIO4 is not set
++# CONFIG_PINCTRL_INTEL is not set
++# CONFIG_PINCTRL_QE is not set
++# CONFIG_PINCTRL_ROCKCHIP_RV1108 is not set
++# CONFIG_PINCTRL_SINGLE is not set
++# CONFIG_PINCTRL_STM32 is not set
++# CONFIG_PINCTRL_STMFX is not set
++# CONFIG_PINCTRL_K210 is not set
++CONFIG_PINCTRL_MTK=y
++# CONFIG_PINCTRL_MT7622 is not set
++# CONFIG_PINCTRL_MT7623 is not set
++# CONFIG_PINCTRL_MT7629 is not set
++CONFIG_PINCTRL_MT7981=y
++# CONFIG_PINCTRL_MT7986 is not set
++# CONFIG_PINCTRL_MT7988 is not set
++# CONFIG_PINCTRL_MT8512 is not set
++# CONFIG_PINCTRL_MT8516 is not set
++# CONFIG_PINCTRL_MT8518 is not set
++CONFIG_POWER=y
++# CONFIG_POWER_LEGACY is not set
++# CONFIG_ACPI_PMC is not set
++
++#
++# Power Domain Support
++#
++CONFIG_POWER_DOMAIN=y
++# CONFIG_APPLE_PMGR_POWER_DOMAIN is not set
++CONFIG_MTK_POWER_DOMAIN=y
++# CONFIG_DM_PMIC is not set
++# CONFIG_PMIC_TPS65217 is not set
++# CONFIG_POWER_TPS65218 is not set
++# CONFIG_POWER_TPS62362 is not set
++# CONFIG_DM_REGULATOR is not set
++# CONFIG_TPS6586X_POWER is not set
++# CONFIG_POWER_MT6323 is not set
++CONFIG_DM_PWM=y
++# CONFIG_PWM_ASPEED is not set
++# CONFIG_PWM_CADENCE_TTC is not set
++# CONFIG_PWM_CROS_EC is not set
++# CONFIG_PWM_EXYNOS is not set
++# CONFIG_PWM_IMX is not set
++# CONFIG_PWM_MESON is not set
++CONFIG_PWM_MTK=y
++# CONFIG_PWM_ROCKCHIP is not set
++# CONFIG_PWM_SANDBOX is not set
++# CONFIG_PWM_SIFIVE is not set
++# CONFIG_PWM_TEGRA is not set
++# CONFIG_PWM_SUNXI is not set
++# CONFIG_U_QE is not set
++# CONFIG_RAM is not set
++
++#
++# Reboot Mode Support
++#
++# CONFIG_DM_REBOOT_MODE is not set
++
++#
++# Remote Processor drivers
++#
++
++#
++# Reset Controller Support
++#
++# CONFIG_RESET_AST2500 is not set
++# CONFIG_RESET_AST2600 is not set
++CONFIG_RESET_MEDIATEK=y
++# CONFIG_RESET_HISILICON is not set
++# CONFIG_RESET_SYSCON is not set
++# CONFIG_RESET_SCMI is not set
++# CONFIG_RESET_DRA7 is not set
++# CONFIG_DM_RNG is not set
++
++#
++# Real Time Clock
++#
++# CONFIG_DM_RTC is not set
++# CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set
++# CONFIG_RTC_DS1337 is not set
++# CONFIG_RTC_DS1338 is not set
++# CONFIG_RTC_DS1374 is not set
++# CONFIG_RTC_DS3231 is not set
++# CONFIG_RTC_PCF8563 is not set
++# CONFIG_RTC_PT7C4338 is not set
++# CONFIG_RTC_PL031 is not set
++# CONFIG_RTC_S35392A is not set
++# CONFIG_RTC_MC13XXX is not set
++# CONFIG_RTC_MC146818 is not set
++# CONFIG_RTC_M41T62 is not set
++# CONFIG_SCSI is not set
++# CONFIG_DM_SCSI is not set
++CONFIG_SERIAL=y
++CONFIG_BAUDRATE=115200
++# CONFIG_DEFAULT_ENV_IS_RW is not set
++CONFIG_REQUIRE_SERIAL_CONSOLE=y
++# CONFIG_SPECIFY_CONSOLE_INDEX is not set
++CONFIG_SERIAL_PRESENT=y
++CONFIG_DM_SERIAL=y
++# CONFIG_SERIAL_RX_BUFFER is not set
++# CONFIG_SERIAL_PUTS is not set
++# CONFIG_SERIAL_SEARCH_ALL is not set
++# CONFIG_SERIAL_PROBE_ALL is not set
++# CONFIG_VPL_DM_SERIAL is not set
++CONFIG_DEBUG_UART_MTK=y
++CONFIG_DEBUG_UART_SHIFT=0
++# CONFIG_DEBUG_UART_ANNOUNCE is not set
++# CONFIG_DEBUG_UART_SKIP_INIT is not set
++# CONFIG_ALTERA_JTAG_UART is not set
++# CONFIG_ALTERA_UART is not set
++# CONFIG_ARC_SERIAL is not set
++# CONFIG_ARM_DCC is not set
++# CONFIG_ATMEL_USART is not set
++# CONFIG_BCM6345_SERIAL is not set
++# CONFIG_COREBOOT_SERIAL is not set
++# CONFIG_CORTINA_UART is not set
++# CONFIG_FSL_LINFLEXUART is not set
++# CONFIG_FSL_LPUART is not set
++# CONFIG_MVEBU_A3700_UART is not set
++# CONFIG_MCFUART is not set
++# CONFIG_NULLDEV_SERIAL is not set
++# CONFIG_SYS_NS16550 is not set
++# CONFIG_PL01X_SERIAL is not set
++# CONFIG_ROCKCHIP_SERIAL is not set
++# CONFIG_XILINX_UARTLITE is not set
++# CONFIG_MSM_SERIAL is not set
++# CONFIG_MSM_GENI_SERIAL is not set
++# CONFIG_MXS_AUART_SERIAL is not set
++# CONFIG_OMAP_SERIAL is not set
++# CONFIG_SIFIVE_SERIAL is not set
++# CONFIG_ZYNQ_SERIAL is not set
++CONFIG_MTK_SERIAL=y
++# CONFIG_MT7620_SERIAL is not set
++# CONFIG_NPCM_SERIAL is not set
++# CONFIG_SM is not set
++# CONFIG_MESON_SM is not set
++# CONFIG_SMEM is not set
++
++#
++# Sound support
++#
++# CONFIG_SOUND is not set
++
++#
++# SOC (System On Chip) specific Drivers
++#
++# CONFIG_SOC_DEVICE is not set
++# CONFIG_SOC_TI is not set
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_SPI_MEM=y
++# CONFIG_SPI_DIRMAP is not set
++# CONFIG_ALTERA_SPI is not set
++# CONFIG_APPLE_SPI is not set
++# CONFIG_ATCSPI200_SPI is not set
++# CONFIG_ATMEL_SPI is not set
++# CONFIG_BCMSTB_SPI is not set
++# CONFIG_CORTINA_SFLASH is not set
++# CONFIG_CADENCE_QSPI is not set
++# CONFIG_CF_SPI is not set
++# CONFIG_DESIGNWARE_SPI is not set
++# CONFIG_EXYNOS_SPI is not set
++# CONFIG_FSL_DSPI is not set
++# CONFIG_FSL_QSPI is not set
++# CONFIG_GXP_SPI is not set
++# CONFIG_ICH_SPI is not set
++# CONFIG_IPROC_QSPI is not set
++# CONFIG_KIRKWOOD_SPI is not set
++# CONFIG_MICROCHIP_COREQSPI is not set
++# CONFIG_MPC8XXX_SPI is not set
++# CONFIG_MTK_SNOR is not set
++# CONFIG_MTK_SNFI_SPI is not set
++CONFIG_MTK_SPIM=y
++# CONFIG_MVEBU_A3700_SPI is not set
++# CONFIG_MXS_SPI is not set
++# CONFIG_SPI_MXIC is not set
++# CONFIG_NPCM_FIU_SPI is not set
++# CONFIG_NPCM_PSPI is not set
++# CONFIG_NXP_FSPI is not set
++# CONFIG_OMAP3_SPI is not set
++# CONFIG_PL022_SPI is not set
++# CONFIG_ROCKCHIP_SFC is not set
++# CONFIG_ROCKCHIP_SPI is not set
++# CONFIG_SPI_ASPEED_SMC is not set
++# CONFIG_SPI_SIFIVE is not set
++# CONFIG_SOFT_SPI is not set
++# CONFIG_SPI_SN_F_OSPI is not set
++# CONFIG_SPI_SUNXI is not set
++# CONFIG_TEGRA114_SPI is not set
++# CONFIG_TEGRA20_SFLASH is not set
++# CONFIG_TEGRA20_SLINK is not set
++# CONFIG_TEGRA210_QSPI is not set
++# CONFIG_TI_QSPI is not set
++# CONFIG_XILINX_SPI is not set
++# CONFIG_ZYNQ_SPI is not set
++# CONFIG_ZYNQ_QSPI is not set
++# CONFIG_ZYNQMP_GQSPI is not set
++# CONFIG_SH_QSPI is not set
++# CONFIG_MXC_SPI is not set
++
++#
++# SPMI support
++#
++# CONFIG_SPMI is not set
++# CONFIG_SYSINFO is not set
++
++#
++# System reset device drivers
++#
++# CONFIG_SYSRESET is not set
++# CONFIG_TEE is not set
++# CONFIG_DM_THERMAL is not set
++
++#
++# Timer Support
++#
++# CONFIG_TIMER is not set
++
++#
++# TPM support
++#
++CONFIG_USB=y
++CONFIG_DM_USB=y
++# CONFIG_DM_USB_GADGET is not set
++
++#
++# USB Host Controller Drivers
++#
++CONFIG_USB_HOST=y
++CONFIG_USB_XHCI_HCD=y
++# CONFIG_USB_XHCI_DWC3 is not set
++# CONFIG_USB_XHCI_DWC3_OF_SIMPLE is not set
++CONFIG_USB_XHCI_MTK=y
++# CONFIG_USB_XHCI_FSL is not set
++# CONFIG_USB_XHCI_BRCM is not set
++# CONFIG_USB_EHCI_HCD is not set
++# CONFIG_USB_OHCI_HCD is not set
++# CONFIG_USB_UHCI_HCD is not set
++# CONFIG_USB_DWC2 is not set
++# CONFIG_USB_R8A66597_HCD is not set
++# CONFIG_USB_ISP1760 is not set
++# CONFIG_USB_CDNS3 is not set
++# CONFIG_USB_DWC3 is not set
++# CONFIG_USB_MTU3 is not set
++
++#
++# Legacy MUSB Support
++#
++# CONFIG_USB_MUSB_HCD is not set
++# CONFIG_USB_MUSB_UDC is not set
++
++#
++# MUSB Controller Driver
++#
++# CONFIG_USB_MUSB_HOST is not set
++# CONFIG_USB_MUSB_PIO_ONLY is not set
++
++#
++# USB Phy
++#
++# CONFIG_TWL4030_USB is not set
++# CONFIG_ROCKCHIP_USB2_PHY is not set
++
++#
++# ULPI drivers
++#
++
++#
++# USB peripherals
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_KEYBOARD is not set
++# CONFIG_USB_ONBOARD_HUB is not set
++CONFIG_USB_HUB_DEBOUNCE_TIMEOUT=1000
++# CONFIG_USB_HOST_ETHER is not set
++# CONFIG_USB_GADGET is not set
++# CONFIG_SPL_USB_GADGET is not set
++
++#
++# UFS Host Controller Support
++#
++# CONFIG_TI_J721E_UFS is not set
++
++#
++# Graphics support
++#
++# CONFIG_VIDEO is not set
++
++#
++# VirtIO Drivers
++#
++# CONFIG_VIRTIO_MMIO is not set
++
++#
++# 1-Wire support
++#
++# CONFIG_W1 is not set
++
++#
++# 1-wire EEPROM support
++#
++# CONFIG_W1_EEPROM is not set
++
++#
++# Watchdog Timer Support
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_WATCHDOG_TIMEOUT_MSECS=60000
++# CONFIG_IMX_WATCHDOG is not set
++# CONFIG_ULP_WATCHDOG is not set
++# CONFIG_WDT is not set
++# CONFIG_PHYS_TO_BUS is not set
++
++#
++# File systems
++#
++# CONFIG_FS_BTRFS is not set
++# CONFIG_FS_CBFS is not set
++# CONFIG_FS_EXT4 is not set
++CONFIG_FS_FAT=y
++CONFIG_FAT_WRITE=y
++CONFIG_FS_FAT_MAX_CLUSTSIZE=65536
++# CONFIG_FS_JFFS2 is not set
++CONFIG_UBIFS_SILENCE_MSG=y
++CONFIG_UBIFS_SILENCE_DEBUG_DUMP=y
++# CONFIG_FS_CRAMFS is not set
++# CONFIG_YAFFS2 is not set
++# CONFIG_FS_SQUASHFS is not set
++# CONFIG_FS_EROFS is not set
++
++#
++# Library routines
++#
++# CONFIG_ADDR_MAP is not set
++# CONFIG_SYS_TIMER_COUNTS_DOWN is not set
++# CONFIG_PHYSMEM is not set
++# CONFIG_BCH is not set
++# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set
++CONFIG_CHARSET=y
++# CONFIG_DYNAMIC_CRC_TABLE is not set
++CONFIG_LIB_UUID=y
++# CONFIG_SEMIHOSTING is not set
++CONFIG_PRINTF=y
++CONFIG_SPRINTF=y
++CONFIG_STRTO=y
++CONFIG_SYS_HZ=1000
++# CONFIG_PANIC_HANG is not set
++CONFIG_REGEX=y
++CONFIG_LIB_RAND=y
++# CONFIG_LIB_HW_RAND is not set
++CONFIG_SUPPORT_ACPI=y
++# CONFIG_ACPI is not set
++CONFIG_RBTREE=y
++# CONFIG_BITREVERSE is not set
++# CONFIG_TRACE is not set
++# CONFIG_CIRCBUF is not set
++# CONFIG_CMD_DHRYSTONE is not set
++
++#
++# Security support
++#
++# CONFIG_AES is not set
++# CONFIG_ECDSA is not set
++# CONFIG_RSA is not set
++# CONFIG_TPM is not set
++
++#
++# Android Verified Boot
++#
++
++#
++# Hashing Support
++#
++# CONFIG_BLAKE2 is not set
++CONFIG_SHA1=y
++CONFIG_SHA256=y
++# CONFIG_SHA512 is not set
++# CONFIG_SHA384 is not set
++# CONFIG_SHA_HW_ACCEL is not set
++CONFIG_MD5=y
++CONFIG_CRC8=y
++CONFIG_CRC32=y
++
++#
++# Compression Support
++#
++# CONFIG_LZ4 is not set
++CONFIG_LZMA=y
++CONFIG_LZO=y
++CONFIG_GZIP=y
++# CONFIG_ZLIB_UNCOMPRESS is not set
++# CONFIG_BZIP2 is not set
++CONFIG_ZLIB=y
++# CONFIG_ZSTD is not set
++CONFIG_VPL_LZMA=y
++# CONFIG_SPL_GZIP is not set
++# CONFIG_ERRNO_STR is not set
++CONFIG_HEXDUMP=y
++# CONFIG_GETOPT is not set
++CONFIG_OF_LIBFDT=y
++CONFIG_OF_LIBFDT_ASSUME_MASK=0x0
++CONFIG_SYS_FDT_PAD=0x3000
++
++#
++# System tables
++#
++CONFIG_GENERATE_SMBIOS_TABLE=y
++# CONFIG_LIB_RATIONAL is not set
++CONFIG_SMBIOS=y
++# CONFIG_SMBIOS_PARSER is not set
++CONFIG_EFI_LOADER=y
++CONFIG_CMD_BOOTEFI_BOOTMGR=y
++CONFIG_EFI_VARIABLE_FILE_STORE=y
++# CONFIG_EFI_VARIABLE_NO_STORE is not set
++# CONFIG_EFI_VARIABLES_PRESEED is not set
++CONFIG_EFI_VAR_BUF_SIZE=131072
++# CONFIG_EFI_SCROLL_ON_CLEAR_SCREEN is not set
++# CONFIG_EFI_RUNTIME_UPDATE_CAPSULE is not set
++CONFIG_EFI_CAPSULE_MAX=15
++CONFIG_EFI_DEVICE_PATH_TO_TEXT=y
++CONFIG_EFI_DEVICE_PATH_UTIL=y
++CONFIG_EFI_DT_FIXUP=y
++CONFIG_EFI_LOADER_HII=y
++CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y
++CONFIG_EFI_UNICODE_CAPITALIZATION=y
++# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set
++CONFIG_EFI_PLATFORM_LANG_CODES="en-US"
++CONFIG_EFI_HAVE_RUNTIME_RESET=y
++CONFIG_EFI_LOAD_FILE2_INITRD=y
++CONFIG_EFI_ECPT=y
++CONFIG_EFI_EBBR_2_1_CONFORMANCE=y
++# CONFIG_OPTEE_LIB is not set
++# CONFIG_OPTEE_IMAGE is not set
++# CONFIG_BOOTM_OPTEE is not set
++# CONFIG_TEST_FDTDEC is not set
++CONFIG_LIB_ELF=y
++CONFIG_LMB=y
++CONFIG_LMB_USE_MAX_REGIONS=y
++CONFIG_LMB_MAX_REGIONS=64
++# CONFIG_PHANDLE_CHECK_SEQ is not set
++
++#
++# Testing
++#
++# CONFIG_UNIT_TEST is not set
++# CONFIG_POST is not set
++
++#
++# Tools options
++#
++CONFIG_MKIMAGE_DTC_PATH="dtc"
++CONFIG_TOOLS_CRC32=y
++CONFIG_TOOLS_LIBCRYPTO=y
++CONFIG_TOOLS_FIT=y
++CONFIG_TOOLS_FIT_FULL_CHECK=y
++CONFIG_TOOLS_FIT_PRINT=y
++CONFIG_TOOLS_FIT_RSASSA_PSS=y
++CONFIG_TOOLS_FIT_SIGNATURE=y
++CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000
++CONFIG_TOOLS_FIT_VERBOSE=y
++CONFIG_TOOLS_MD5=y
++CONFIG_TOOLS_OF_LIBFDT=y
++CONFIG_TOOLS_SHA1=y
++CONFIG_TOOLS_SHA256=y
++CONFIG_TOOLS_SHA384=y
++CONFIG_TOOLS_SHA512=y
++# CONFIG_TOOLS_MKEFICAPSULE is not set
++# CONFIG_FSPI_CONF_HEADER is not set
++# CONFIG_TOOLS_MKFWUMDATA is not set
+--- /dev/null
++++ b/openwrt-one-nor_env
+@@ -0,0 +1,46 @@
++bl2_mtd_write=mtd erase bl2-nor &&  mtd write bl2-nor $loadaddr 0x0 0x40000
++bl2_tftp_write=tftpboot $loadaddr $bootfile_bl2_nor && run bl2_mtd_write
++bootcmd=run check_button ; run led_start ; mtd read recovery ${loadaddr} ; bootm ; run led_loop_error
++bootconf=config-1
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-openwrt_one-initramfs.itb
++bootfile_bl2_nor=openwrt-mediatek-filogic-openwrt_one-nor-preloader.bin
++bootfile_fip_nor=openwrt-mediatek-filogic-openwrt_one-nor-bl31-uboot.fip
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run bootcmd
++bootmenu_1=Boot system via TFTP.=run tftp_boot ; run bootmenu_confirm_return
++bootmenu_2=[31mUnlock NOR. (Make sure the NOR/WP jumper is populated)[0m=sf probe 1:0 && sf protect unlock 0x0 0x1000000 ; run bootmenu_confirm_return
++bootmenu_3=[31mLoad BL31+U-Boot FIP via TFTP then write to NOR.[0m=run fip_tftp_write ; run bootmenu_confirm_return
++bootmenu_4=[31mLoad BL2 preloader via TFTP then write to NOR.[0m=run bl2_tftp_write ; run bootmenu_confirm_return
++bootmenu_5=[31mLoad recovery system via TFTP then write to NOR.[0m=run tftp_write ; run bootmenu_confirm_return
++bootmenu_6=[31mLock NOR. (Remove jumper afterwards)[0m=sf probe 1:0 && sf protect lock 0x0 0x1000000 ; run bootmenu_confirm_return
++bootmenu_7=Reboot.=reset
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )  [0;36m[SPI-NOR][0m
++check_button=if button front ; then run usb_recovery ; run led_loop_error ; fi
++fip_mtd_write=mtd erase fip-nor && mtd write fip-nor $loadaddr
++fip_tftp_write=tftpboot $loadaddr $bootfile_fip_nor && run fip_mtd_write
++ipaddr=192.168.11.11
++led_done=led green off ; led white on
++led_loop_done=led white off ; led green on ; echo done ; while true ; do  sleep 1 ; done
++led_loop_error=led white off ; led green off ; while true ; do led red on ; sleep 1 ; led red off ; sleep 1 ; done
++led_boot=led green on ; led white on ; led red on
++led_start=led green off ; led red off; led white on
++loadaddr=0x46000000
++preboot=run led_boot
++recoverfile_bl2=openwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
++recoverfile_ubi=openwrt-mediatek-filogic-openwrt_one-factory.ubi
++recovery_write_bl2=mtd erase bl2 && for offset in 0x0 0x40000 0x80000; do mtd write bl2 $loadaddr $offset 0x40000 ; done
++recovery_write_ubi=mtd erase ubi && mtd write ubi $loadaddr 0 ${filesize}
++serverip=192.168.11.23
++tftp_boot=run led_start ; tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++tftp_write=run led_start ; tftpboot $loadaddr $bootfile && mtd erase recovery 0x0 ${filesize} && mtd write recovery $loadaddr 0x0 ${filesize}
++usb_recovery=run led_start ; usb start && run usb_recovery_bl2 && run usb_recovery_ubi && run led_loop_done
++usb_recovery_bl2=fatload usb 0:1 ${loadaddr} ${recoverfile_bl2} && run recovery_write_bl2
++usb_recovery_ubi=fatload usb 0:1 ${loadaddr} ${recoverfile_ubi} && run recovery_write_ubi
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; bootmenu
++_init_env=setenv _init_env ; echo Initialize Env ; run ubi_create_env ; saveenv
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+--- /dev/null
++++ b/openwrt-one-spi-nand_env
+@@ -0,0 +1,59 @@
++ipaddr=192.168.11.11
++serverip=192.168.11.23
++loadaddr=0x46000000
++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
++bootcmd=run check_buttons ; run led_start ; run boot_calibration ; run boot_production ; run boot_recovery
++bootconf=config-1
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-openwrt_one-initramfs.itb
++bootfile_bl2=openwrt-mediatek-filogic-openwrt_one-snand-preloader.bin
++bootfile_fip=openwrt-mediatek-filogic-openwrt_one-snand-bl31-uboot.fip
++bootfile_upg=openwrt-mediatek-filogic-openwrt_one-squashfs-sysupgrade.itb
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; run led_boot ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )  [0;36m[SPI-NAND][0m
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to NAND.=noboot=1 ; replacevol=1 ; run boot_tftp_production ; noboot= ; replacevol= ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to NAND.=noboot=1 ; replacevol=1 ; run boot_tftp_recovery ; noboot= ; replacevol= ; run bootmenu_confirm_return
++bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
++bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
++bootmenu_8=Reboot.=reset
++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
++boot_default=run bootcmd ; run boot_recovery ; replacevol=1 ; run boot_tftp_forever
++boot_calibration=ubi read $loadaddr calibration && bootm $loadaddr#$bootconf
++boot_production=led white on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led white off
++boot_recovery=led green on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led green off
++boot_tftp=run led_start ; tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++boot_tftp_forever=led green off ; led white off ; led red on ; while true ; do run boot_tftp_recovery ; led red off ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && test $replacevol = 1 && iminfo $loadaddr && run ubi_write_production ; if test $noboot = 1 ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && test $replacevol = 1 && iminfo $loadaddr && run ubi_write_recovery ; if test $noboot = 1 ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run ubi_write_fip && run reset_factory
++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run snand_write_bl2
++check_buttons=if button front ; then run boot_recovery ; run boot_tftp ; run led_loop_error ; else if button back ; then ; run usb_recover ; run led_loop_error ; fi ; fi
++led_boot=led green on ; led white on ; led red on
++led_done=led green on ; led white off ; led red off
++led_loop_error=led white off ; led green off ; while true ; do led red on ; sleep 1 ; led red off ; sleep 1 ; done
++led_start=led white on ; led green off ; led red off
++preboot=run led_boot
++reset_factory=mw $loadaddr 0xff 0x1f000 ; ubi write $loadaddr ubootenv 0x1f000 ; ubi write $loadaddr ubootenv2 0x1f000 ; ubi remove rootfs_data
++snand_write_bl2=mtd erase bl2 && for offset in 0x0 0x40000 0x80000 0xc0000 ; do mtd write bl2 $loadaddr $offset 0x40000 ; done
++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x1f000 dynamic ; ubi check ubootenv2 || ubi create ubootenv2 0x1f000 dynamic
++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
++usb_recover=run led_start ; usb start && run usb_recover_production && run led_loop_done
++usb_recover_production=fatload usb 0:1 ${loadaddr} ${bootfile_upg} && iminfo $loadaddr && run ubi_write_production
++ubi_write_fip=run ubi_remove_rootfs ; ubi check fip && ubi remove fip ; ubi create fip $filesize static && ubi write $loadaddr fip $filesize
++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; bootmenu
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"



From lede-commits at lists.infradead.org  Tue May 21 02:36:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 05:36:51 -0400
Subject: [openwrt/openwrt]  Revert "mediatek/filogic: add OpenWrt One support"
In-Reply-To: <171628421106.3375759.8027403211191049440@git-01.infra.openwrt.org>
References: <171628421106.3375759.8027403211191049440@git-01.infra.openwrt.org>
Message-ID: <mailman.37293.1716284220.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/47d308a46cdbca6c8634a6f26fdf8e75579df26b

commit 47d308a46cdbca6c8634a6f26fdf8e75579df26b
Author: John Crispin <john at phrozen.org>
AuthorDate: Tue May 21 11:35:05 2024 +0200

    Revert "mediatek/filogic: add OpenWrt One support"
    
    This reverts commit 797904b3cb4a5c575641c19e7f3989926e4c7902.
    
    There is a stray line in the commit description
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 target/linux/mediatek/dts/mt7981b-openwrt-one.dts  | 457 ---------------------
 .../filogic/base-files/etc/board.d/01_leds         |   6 -
 .../filogic/base-files/etc/board.d/02_network      |   3 +-
 .../etc/hotplug.d/firmware/11-mt76-caldata         |   3 -
 .../filogic/base-files/lib/upgrade/platform.sh     |   1 -
 target/linux/mediatek/image/filogic.mk             |  48 ---
 6 files changed, 1 insertion(+), 517 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
deleted file mode 100644
index b2223f8d76..0000000000
--- a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
+++ /dev/null
@@ -1,457 +0,0 @@
-// SPDX-License-Identifier: (GPL-2.0 OR MIT)
-
-/dts-v1/;
-#include "mt7981.dtsi"
-
-/ {
-	model = "OpenWrt One";
-	compatible = "openwrt,one", "mediatek,mt7981";
-
-	aliases {
-		ethernet0 = &gmac0;
-		ethernet1 = &gmac1;
-		serial0 = &uart0;
-		led-boot = &led_status_white;
-		led-failsafe = &led_status_red;
-		led-running = &led_status_green;
-		led-upgrade = &led_status_green;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-		rootdisk = <&ubi_fit_volume>;
-	};
-
-	memory {
-		reg = <0 0x40000000 0 0x40000000>;
-	};
-
-	reg_3p3v: regulator-3p3v {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-3.3V";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		regulator-boot-on;
-		regulator-always-on;
-	};
-
-	reg_5v: regulator-5v {
-		compatible = "regulator-fixed";
-		regulator-name = "fixed-5V";
-		regulator-min-microvolt = <5000000>;
-		regulator-max-microvolt = <5000000>;
-		regulator-boot-on;
-		regulator-always-on;
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-
-		user {
-			label = "user";
-			linux,code = <BTN_0>;
-			gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
-		};
-
-		reset {
-			label = "reset";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	pwm-leds {
-		compatible = "pwm-leds";
-
-		led_status_white: led-0 {
-			color = <LED_COLOR_ID_WHITE>;
-			function = LED_FUNCTION_STATUS;
-			pwms = <&pwm 0 10000>;
-			linux,default-trigger = "pattern";
-			led-pattern = <0 500 25 500>;
-		};
-
-		led_status_green: led-1 {
-			color = <LED_COLOR_ID_GREEN>;
-			function = LED_FUNCTION_STATUS;
-			pwms = <&pwm 1 10000>;
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		led_status_red: led-0 {
-			color = <LED_COLOR_ID_RED>;
-			function = LED_FUNCTION_STATUS;
-			gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
-		};
-
-		led-1 {
-			function = LED_FUNCTION_LAN;
-			color = <LED_COLOR_ID_AMBER>;
-			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
-		};
-
-		led-2 {
-			function = LED_FUNCTION_LAN;
-			color = <LED_COLOR_ID_GREEN>;
-			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	gpio-export {
-		compatible = "gpio-export";
-
-		 gpio-0 {
-			gpio-export,name = "mikrobus-reset";
-			gpio-export,output = <1>;
-			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
-		};
-
-		gpio-1 {
-			gpio-export,name = "watchdog-enable";
-			gpio-export,output = <1>;
-			gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
-		};
-
-		gpio-2 {
-			gpio-export,name = "usb-enable";
-			gpio-export,output = <1>;
-			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
-		};
-	};
-
-	gpio-watchdog {
-		compatible = "linux,wdt-gpio";
-		gpios = <&pio 8 GPIO_ACTIVE_LOW>;
-		hw_algo = "toggle";
-		hw_margin_ms = <25000>;
-		always-running;
-	};
-};
-
-&eth {
-	status = "okay";
-
-	gmac0: mac at 0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		phy-handle = <&phy15>;
-		phy-mode = "2500base-x";
-		nvmem-cell-names = "mac-address";
-		nvmem-cells = <&macaddr_factory_4>;
-	};
-
-	gmac1: mac at 1 {
-		compatible = "mediatek,eth-mac";
-		reg = <1>;
-		phy-mode = "gmii";
-		phy-handle = <&int_gbe_phy>;
-		nvmem-cell-names = "mac-address";
-		nvmem-cells = <&macaddr_factory_a>;
-	};
-};
-
-&mdio_bus {
-	phy15: phy at f {
-		reg = <0xf>;
-
-		airoha,pnswap-rx;
-
-		interrupt-parent = <&pio>;
-		interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
-		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
-		reset-assert-us = <10000>;
-		reset-deassert-us = <20000>;
-
-		phy-mode = "2500base-x";
-		full-duplex;
-		pause;
-
-		leds {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			led at 0 {
-				reg = <0>;
-				function = LED_FUNCTION_WAN;
-				color = <LED_COLOR_ID_AMBER>;
-			};
-
-			led at 1 {
-				reg = <1>;
-				function = LED_FUNCTION_WAN;
-				color = <LED_COLOR_ID_GREEN>;
-			};
-		};
-	};
-};
-
-&crypto {
-	status = "okay";
-};
-
-&pio {
-	spi0_flash_pins: spi0-pins {
-		mux {
-			function = "spi";
-			groups = "spi0", "spi0_wp_hold";
-		};
-
-		conf-pu {
-			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
-		};
-
-		conf-pd {
-			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
-		};
-	};
-
-	spi1_flash_pins: spi1-pins {
-		mux {
-			function = "spi";
-			groups = "spi1_1";
-		};
-
-		conf-pu {
-			pins = "SPI1_CS";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
-		};
-
-		conf-pd {
-			pins = "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
-		};
-	};
-
-	spi2_flash_pins: spi2-pins {
-		mux {
-			function = "spi";
-			groups = "spi2";
-		};
-
-		conf-pu {
-			pins = "SPI2_CS", "SPI2_WP";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
-		};
-
-		conf-pd {
-			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
-		};
-	};
-
-	i2c_pins: i2c-pins {
-		mux {
-			function = "i2c";
-			groups = "i2c0_0";
-		};
-	};
-
-	uart2_pins: uart2-pins {
-		mux {
-			function = "uart";
-			groups = "uart2_0_tx_rx";
-		};
-	};
-
-	pwm_pins: pwm-pins {
-		mux {
-			function = "pwm";
-			groups = "pwm0_0", "pwm1_1";
-		};
-	};
-
-	pcie_pins: pcie-pins {
-		mux {
-			function = "pcie";
-			groups = "pcie_pereset";
-		};
-	};
-};
-
-&pwm {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pwm_pins>;
-	status = "okay";
-};
-
-&i2c0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&i2c_pins>;
-	status = "okay";
-
-	rtc at 51 {
-		compatible = "nxp,pcf8563";
-		reg = <0x51>;
-	};
-};
-
-&spi0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi0_flash_pins>;
-	cs-gpios = <0>, <0>;
-	#address-cells = <1>;
-	#size-cells = <0>;
-	status = "okay";
-
-	flash at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "spi-nand";
-		reg = <1>;
-		spi-max-frequency = <52000000>;
-
-		spi-cal-enable;
-		spi-cal-mode = "read-data";
-		spi-cal-datalen = <7>;
-		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
-		spi-cal-addrlen = <5>;
-		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "bl2";
-				reg = <0x0 0x100000>;
-				read-only;
-			};
-
-			partition at 580000 {
-				label = "ubi";
-				reg = <0x100000 0x7F00000>;
-				compatible = "linux,ubi";
-
-				volumes {
-					ubi_fit_volume: ubi-volume-fit {
-						volname = "fit";
-					};
-				};
-			};
-		};
-	};
-};
-
-&spi1 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi1_flash_pins>;
-	status = "okay";
-};
-
-&spi2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi2_flash_pins>;
-	status = "okay";
-
-	flash at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-
-		spi-max-frequency = <52000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "bl2-nor";
-				reg = <0x00000 0x40000>;
-			};
-
-			partition at 40000 {
-				label = "factory";
-				reg = <0x40000 0xc0000>;
-				read-only;
-
-				nvmem-layout {
-					compatible = "fixed-layout";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					eeprom_factory_0: eeprom at 0 {
-						reg = <0x0 0x1000>;
-					};
-
-					macaddr_factory_4: macaddr at 4 {
-						compatible = "mac-base";
-						reg = <0x24 0x6>;
-						#nvmem-cell-cells = <1>;
-					};
-
-					macaddr_factory_a: macaddr at a {
-						compatible = "mac-base";
-						reg = <0x2a 0x6>;
-						#nvmem-cell-cells = <1>;
-					};
-				};
-			};
-
-			partition at 100000 {
-				label = "fip-nor";
-				reg = <0x100000 0x80000>;
-			};
-
-			partition at 180000 {
-				label = "recovery";
-				reg = <0x180000 0xc80000>;
-			};
-		};
-	};
-};
-
-&xhci {
-	phys = <&u2port0 PHY_TYPE_USB2>;
-	vusb33-supply = <&reg_3p3v>;
-	vbus-supply = <&reg_5v>;
-	mediatek,u3p-dis-msk = <0x01>;
-	status = "okay";
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&uart2 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart2_pins>;
-	status = "okay";
-};
-
-&usb_phy {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&wifi {
-	nvmem-cells = <&eeprom_factory_0>;
-	nvmem-cell-names = "eeprom";
-	status = "okay";
-};
-
-&pcie {
-	pinctrl-names = "default";
-	pinctrl-0 = <&pcie_pins>;
-	status = "okay";
-};
-
-&sgmiisys0 {
-	/delete-node/ mediatek,pnswap;
-};
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 ec239cb0cf..b5a2554671 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
@@ -59,12 +59,6 @@ openembed,som7981)
 	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
 	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
 	;;
-openwrt,one)
-	ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"
-	ucidef_set_led_netdev "wanlink" "WANLINK" "mdio-bus:0f:amber:wan" "eth0" "link"
-	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
-	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
-	;;
 routerich,ax3000)
 	ucidef_set_led_netdev "lan-1" "lan-1" "blue:lan-1" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-2" "lan2" "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 fc4bc07b2f..4de3cf044d 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
@@ -59,8 +59,7 @@ mediatek_setup_interfaces()
 	glinet,gl-mt3000|\
 	glinet,gl-x3000|\
 	glinet,gl-xe3000|\
-	openembed,som7981|\
-	openwrt,one)
+	openembed,som7981)
 		ucidef_set_interfaces_lan_wan eth1 eth0
 		;;
 	dlink,aquila-pro-ai-m30-a1)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
index 27a16e0fb7..bd68ef7415 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
@@ -31,9 +31,6 @@ case "$FIRMWARE" in
 			;;
 		esac
 		;;
-	openwrt,one)
-		caldata_extract "factory" 0x0 0x1000
-		;;
 	ubnt,unifi-6-plus)
 		caldata_extract_mmc "factory" 0x0 0x1000
 		;;
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 9b46111d33..e7b347dc5f 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -86,7 +86,6 @@ platform_do_upgrade() {
 	bananapi,bpi-r4-poe|\
 	mediatek,mt7988a-rfb|\
 	jdcloud,re-cp-03|\
-	openwrt,one|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index e85d67f2ae..5c2f67eb99 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -951,54 +951,6 @@ define Device/openembed_som7981
 endef
 TARGET_DEVICES += openembed_som7981
 
-define Build/append-openwrt-one-eeprom
-        dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@
-endef
-
-define Device/openwrt_one
-  DEVICE_VENDOR := OpenWrt
-  DEVICE_MODEL := One
-  DEVICE_DTS := mt7981b-openwrt-one
-  DEVICE_DTS_DIR := ../dts
-  DEVICE_DTC_FLAGS := --pad 4096
-  DEVICE_DTS_LOADADDR := 0x43f00000
-  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-rtc-pcf8563 kmod-usb3 kmod-nvme kmod-phy-airoha-en8811h
-  KERNEL_LOADADDR := 0x44000000
-  KERNEL := kernel-bin | gzip
-  KERNEL_INITRAMFS := kernel-bin | lzma | \
-	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
-  KERNEL_INITRAMFS_SUFFIX := .itb
-  KERNEL_IN_UBI := 1
-  UBOOTENV_IN_UBI := 1
-  IMAGES := sysupgrade.itb
-  IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
-  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
-  ARTIFACTS := \
-	nor-preloader.bin nor-bl31-uboot.fip \
-	snand-preloader.bin snand-bl31-uboot.fip \
-	factory.ubi snand-factory.bin nor-factory.bin
-  ARTIFACT/nor-preloader.bin		:= mt7981-bl2 nor-ddr4
-  ARTIFACT/nor-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-nor
-  ARTIFACT/snand-preloader.bin		:= mt7981-bl2 spim-nand-ubi-ddr4
-  ARTIFACT/snand-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-snand
-  ARTIFACT/factory.ubi			:= ubinize-image fit squashfs-sysupgrade.itb
-  ARTIFACT/snand-factory.bin		:= mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 256k | \
-					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 512k | \
-					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 768k | \
-					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 1024k | \
-					   ubinize-image fit squashfs-sysupgrade.itb
-  ARTIFACT/nor-factory.bin		:= mt7981-bl2 nor-ddr4 | pad-to 256k | \
-					   append-openwrt-one-eeprom | pad-to 1024k | \
-					   mt7981-bl31-uboot openwrt_one-nor | pad-to 512k | \
-					   append-image-stage initramfs.itb
-  UBINIZE_OPTS := -E 5
-  BLOCKSIZE := 128k
-  PAGESIZE := 2048
-  UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7981_openwrt_one-snand-u-boot.fip recovery=:$(KDIR)/tmp/openwrt-mediatek-filogic-openwrt_one-initramfs.itb \
-		   $(if $(wildcard $(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb), calibration=:$(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb)
-endef
-TARGET_DEVICES += openwrt_one
-
 define Device/qihoo_360t7
   DEVICE_VENDOR := Qihoo
   DEVICE_MODEL := 360T7



From lede-commits at lists.infradead.org  Tue May 21 02:36:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 05:36:52 -0400
Subject: [openwrt/openwrt]  mediatek/filogic: add OpenWrt One support
In-Reply-To: <171628421106.3375759.8027403211191049440@git-01.infra.openwrt.org>
References: <171628421106.3375759.8027403211191049440@git-01.infra.openwrt.org>
Message-ID: <mailman.37294.1716284220.1280.lede-commits@lists.infradead.org>

blogic pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dd58ad968a2877ef8a3f2f057e07c7b9683560cd

commit dd58ad968a2877ef8a3f2f057e07c7b9683560cd
Author: John Crispin <john at phrozen.org>
AuthorDate: Thu Apr 4 22:38:50 2024 +0200

    mediatek/filogic: add OpenWrt One support
    
    Specification:
     - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
     - 1GB RAM
     - 16MB NOR
     - 128MB NAND
     - 3 LEDs (red, green, blue, white)
     - 2 buttons (reset, user defined)
     - 1 2.5Gbit WAN port (Airoha EN8811h)
     - 1 1Gbit LAN ports
     - 1 single lane M.2 SSD slot
     - 1 mikroBus socket
     - externel HW WDT (25s refresh time)
     - i2c RTC (with battery backup)
    
    Serial Interface
     - UBS-C CDC-ACM
     - 3 Pins GND, RX, TX
     - Settings: 115200, 8N1
    
    MAC addresses are not populated on the early samples.
    
    Signed-off-by: John Crispin <john at phrozen.org>
---
 target/linux/mediatek/dts/mt7981b-openwrt-one.dts  | 457 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   6 +
 .../filogic/base-files/etc/board.d/02_network      |   3 +-
 .../etc/hotplug.d/firmware/11-mt76-caldata         |   3 +
 .../filogic/base-files/lib/upgrade/platform.sh     |   1 +
 target/linux/mediatek/image/filogic.mk             |  48 +++
 6 files changed, 517 insertions(+), 1 deletion(-)

diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
new file mode 100644
index 0000000000..b2223f8d76
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
@@ -0,0 +1,457 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+#include "mt7981.dtsi"
+
+/ {
+	model = "OpenWrt One";
+	compatible = "openwrt,one", "mediatek,mt7981";
+
+	aliases {
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
+		serial0 = &uart0;
+		led-boot = &led_status_white;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_green;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		rootdisk = <&ubi_fit_volume>;
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x40000000>;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		user {
+			label = "user";
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
+		};
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	pwm-leds {
+		compatible = "pwm-leds";
+
+		led_status_white: led-0 {
+			color = <LED_COLOR_ID_WHITE>;
+			function = LED_FUNCTION_STATUS;
+			pwms = <&pwm 0 10000>;
+			linux,default-trigger = "pattern";
+			led-pattern = <0 500 25 500>;
+		};
+
+		led_status_green: led-1 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			pwms = <&pwm 1 10000>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		led_status_red: led-0 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-1 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_AMBER>;
+			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		 gpio-0 {
+			gpio-export,name = "mikrobus-reset";
+			gpio-export,output = <1>;
+			gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio-1 {
+			gpio-export,name = "watchdog-enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 11 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio-2 {
+			gpio-export,name = "usb-enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	gpio-watchdog {
+		compatible = "linux,wdt-gpio";
+		gpios = <&pio 8 GPIO_ACTIVE_LOW>;
+		hw_algo = "toggle";
+		hw_margin_ms = <25000>;
+		always-running;
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-handle = <&phy15>;
+		phy-mode = "2500base-x";
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_4>;
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_a>;
+	};
+};
+
+&mdio_bus {
+	phy15: phy at f {
+		reg = <0xf>;
+
+		airoha,pnswap-rx;
+
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_EDGE_FALLING>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+		reset-assert-us = <10000>;
+		reset-deassert-us = <20000>;
+
+		phy-mode = "2500base-x";
+		full-duplex;
+		pause;
+
+		leds {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led at 0 {
+				reg = <0>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_AMBER>;
+			};
+
+			led at 1 {
+				reg = <1>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+		};
+	};
+};
+
+&crypto {
+	status = "okay";
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	spi1_flash_pins: spi1-pins {
+		mux {
+			function = "spi";
+			groups = "spi1_1";
+		};
+
+		conf-pu {
+			pins = "SPI1_CS";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	spi2_flash_pins: spi2-pins {
+		mux {
+			function = "spi";
+			groups = "spi2";
+		};
+
+		conf-pu {
+			pins = "SPI2_CS", "SPI2_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	i2c_pins: i2c-pins {
+		mux {
+			function = "i2c";
+			groups = "i2c0_0";
+		};
+	};
+
+	uart2_pins: uart2-pins {
+		mux {
+			function = "uart";
+			groups = "uart2_0_tx_rx";
+		};
+	};
+
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0_0", "pwm1_1";
+		};
+	};
+
+	pcie_pins: pcie-pins {
+		mux {
+			function = "pcie";
+			groups = "pcie_pereset";
+		};
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c_pins>;
+	status = "okay";
+
+	rtc at 51 {
+		compatible = "nxp,pcf8563";
+		reg = <0x51>;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	cs-gpios = <0>, <0>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x100000 0x7F00000>;
+				compatible = "linux,ubi";
+
+				volumes {
+					ubi_fit_volume: ubi-volume-fit {
+						volname = "fit";
+					};
+				};
+			};
+		};
+	};
+};
+
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi1_flash_pins>;
+	status = "okay";
+};
+
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_flash_pins>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2-nor";
+				reg = <0x00000 0x40000>;
+			};
+
+			partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0xc0000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x24 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					macaddr_factory_a: macaddr at a {
+						compatible = "mac-base";
+						reg = <0x2a 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 100000 {
+				label = "fip-nor";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition at 180000 {
+				label = "recovery";
+				reg = <0x180000 0xc80000>;
+			};
+		};
+	};
+};
+
+&xhci {
+	phys = <&u2port0 PHY_TYPE_USB2>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	mediatek,u3p-dis-msk = <0x01>;
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+};
+
+&pcie {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie_pins>;
+	status = "okay";
+};
+
+&sgmiisys0 {
+	/delete-node/ mediatek,pnswap;
+};
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 b5a2554671..ec239cb0cf 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
@@ -59,6 +59,12 @@ openembed,som7981)
 	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
 	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
 	;;
+openwrt,one)
+	ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"
+	ucidef_set_led_netdev "wanlink" "WANLINK" "mdio-bus:0f:amber:wan" "eth0" "link"
+	ucidef_set_led_netdev "lanact" "LANACT" "green:lan" "eth1" "rx tx"
+	ucidef_set_led_netdev "lanlink" "LANLINK" "amber:lan" "eth1" "link"
+	;;
 routerich,ax3000)
 	ucidef_set_led_netdev "lan-1" "lan-1" "blue:lan-1" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-2" "lan2" "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 4de3cf044d..fc4bc07b2f 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
@@ -59,7 +59,8 @@ mediatek_setup_interfaces()
 	glinet,gl-mt3000|\
 	glinet,gl-x3000|\
 	glinet,gl-xe3000|\
-	openembed,som7981)
+	openembed,som7981|\
+	openwrt,one)
 		ucidef_set_interfaces_lan_wan eth1 eth0
 		;;
 	dlink,aquila-pro-ai-m30-a1)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
index bd68ef7415..27a16e0fb7 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
@@ -31,6 +31,9 @@ case "$FIRMWARE" in
 			;;
 		esac
 		;;
+	openwrt,one)
+		caldata_extract "factory" 0x0 0x1000
+		;;
 	ubnt,unifi-6-plus)
 		caldata_extract_mmc "factory" 0x0 0x1000
 		;;
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index e7b347dc5f..9b46111d33 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -86,6 +86,7 @@ platform_do_upgrade() {
 	bananapi,bpi-r4-poe|\
 	mediatek,mt7988a-rfb|\
 	jdcloud,re-cp-03|\
+	openwrt,one|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 5c2f67eb99..e85d67f2ae 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -951,6 +951,54 @@ define Device/openembed_som7981
 endef
 TARGET_DEVICES += openembed_som7981
 
+define Build/append-openwrt-one-eeprom
+        dd if=$(STAGING_DIR_IMAGE)/mt7981_eeprom_mt7976_dbdc.bin >> $@
+endef
+
+define Device/openwrt_one
+  DEVICE_VENDOR := OpenWrt
+  DEVICE_MODEL := One
+  DEVICE_DTS := mt7981b-openwrt-one
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTC_FLAGS := --pad 4096
+  DEVICE_DTS_LOADADDR := 0x43f00000
+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-rtc-pcf8563 kmod-usb3 kmod-nvme kmod-phy-airoha-en8811h
+  KERNEL_LOADADDR := 0x44000000
+  KERNEL := kernel-bin | gzip
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  KERNEL_INITRAMFS_SUFFIX := .itb
+  KERNEL_IN_UBI := 1
+  UBOOTENV_IN_UBI := 1
+  IMAGES := sysupgrade.itb
+  IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
+  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | pad-rootfs | append-metadata
+  ARTIFACTS := \
+	nor-preloader.bin nor-bl31-uboot.fip \
+	snand-preloader.bin snand-bl31-uboot.fip \
+	factory.ubi snand-factory.bin nor-factory.bin
+  ARTIFACT/nor-preloader.bin		:= mt7981-bl2 nor-ddr4
+  ARTIFACT/nor-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-nor
+  ARTIFACT/snand-preloader.bin		:= mt7981-bl2 spim-nand-ubi-ddr4
+  ARTIFACT/snand-bl31-uboot.fip		:= mt7981-bl31-uboot openwrt_one-snand
+  ARTIFACT/factory.ubi			:= ubinize-image fit squashfs-sysupgrade.itb
+  ARTIFACT/snand-factory.bin		:= mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 256k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 512k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 768k | \
+					   mt7981-bl2 spim-nand-ubi-ddr4 | pad-to 1024k | \
+					   ubinize-image fit squashfs-sysupgrade.itb
+  ARTIFACT/nor-factory.bin		:= mt7981-bl2 nor-ddr4 | pad-to 256k | \
+					   append-openwrt-one-eeprom | pad-to 1024k | \
+					   mt7981-bl31-uboot openwrt_one-nor | pad-to 512k | \
+					   append-image-stage initramfs.itb
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  UBINIZE_PARTS := fip=:$(STAGING_DIR_IMAGE)/mt7981_openwrt_one-snand-u-boot.fip recovery=:$(KDIR)/tmp/openwrt-mediatek-filogic-openwrt_one-initramfs.itb \
+		   $(if $(wildcard $(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb), calibration=:$(TOPDIR)/openwrt-mediatek-filogic-openwrt_one-calibration.itb)
+endef
+TARGET_DEVICES += openwrt_one
+
 define Device/qihoo_360t7
   DEVICE_VENDOR := Qihoo
   DEVICE_MODEL := 360T7



From lede-commits at lists.infradead.org  Tue May 21 03:29:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 06:29:42 -0400
Subject: [openwrt/openwrt]  kernel: qca-nss-dp: add back printing attached
 PHY-s
In-Reply-To: <171628738241.3473071.8394791051246213631@git-01.infra.openwrt.org>
References: <171628738241.3473071.8394791051246213631@git-01.infra.openwrt.org>
Message-ID: <mailman.37377.1716287386.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1082c6556ea824ec6ff3cae05b4f0764d28552db

commit 1082c6556ea824ec6ff3cae05b4f0764d28552db
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 21 11:28:07 2024 +0200

    kernel: qca-nss-dp: add back printing attached PHY-s
    
    During the last update to 12.5.r2 printing of the attached PHY-s was
    removed, so lets bring it back as it is very helpfull for debugging
    OpenWrt issues without users having to modify NSS-DP to know if a PHY
    was attached.
    
    Refresh patches since nss_dp_main.c was edited.
    
    Link: https://github.com/openwrt/openwrt/pull/15537
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch   | 3 ++-
 ...0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch | 2 +-
 .../patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch      | 4 ++--
 ...0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch | 4 ++--
 ...0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch | 2 +-
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch b/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
index 20a7e6b350..518e961760 100644
--- a/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
+++ b/package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
@@ -149,7 +149,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  #if defined(NSS_DP_PPE_SUPPORT)
  	uint32_t vsi_id;
  	fal_port_t port_id;
-@@ -940,22 +883,15 @@ static int32_t nss_dp_probe(struct platf
+@@ -940,22 +883,16 @@ static int32_t nss_dp_probe(struct platf
  
  	dp_priv->drv_flags |= NSS_DP_PRIV_FLAG(INIT_DONE);
  
@@ -177,6 +177,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 +			netdev_err(netdev, "failed to connect to phy device\n");
 + 			goto phy_setup_fail;
 + 		}
++ 		phy_attached_info(dp_priv->phydev);
  	}
  
  #if defined(NSS_DP_PPE_SUPPORT)
diff --git a/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
index 8379fcf20c..5abf178d38 100644
--- a/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
@@ -26,7 +26,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -972,6 +972,10 @@ static int nss_dp_remove(struct platform
+@@ -970,6 +970,10 @@ static int nss_dp_remove(struct platform
  		if (!dp_priv)
  			continue;
  
diff --git a/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
index 68a9821ceb..08088954fb 100644
--- a/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -1163,6 +1163,8 @@ int __init nss_dp_init(void)
+@@ -1161,6 +1161,8 @@ int __init nss_dp_init(void)
   */
  void __exit nss_dp_exit(void)
  {
@@ -24,7 +24,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	/*
  	 * TODO Move this to soc_ops
  	 */
-@@ -1170,8 +1172,6 @@ void __exit nss_dp_exit(void)
+@@ -1168,8 +1170,6 @@ void __exit nss_dp_exit(void)
  		nss_dp_hal_cleanup();
  		dp_global_ctx.common_init_done = false;
  	}
diff --git a/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
index 2721d2cfba..f8daa525fe 100644
--- a/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -979,6 +979,9 @@ static int nss_dp_remove(struct platform
+@@ -977,6 +977,9 @@ static int nss_dp_remove(struct platform
  		dp_ops = dp_priv->data_plane_ops;
  		hal_ops = dp_priv->gmac_hal_ops;
  
@@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  		if (dp_priv->phydev)
  			phy_disconnect(dp_priv->phydev);
  
-@@ -990,7 +993,6 @@ static int nss_dp_remove(struct platform
+@@ -988,7 +991,6 @@ static int nss_dp_remove(struct platform
  #endif
  		hal_ops->exit(dp_priv->gmac_hal_ctx);
  		dp_ops->deinit(dp_priv->dpc);
diff --git a/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
index 3c99cae2d5..1633e009ea 100644
--- a/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
+++ b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/nss_dp_main.c
 +++ b/nss_dp_main.c
-@@ -983,7 +983,7 @@ static int nss_dp_remove(struct platform
+@@ -981,7 +981,7 @@ static int nss_dp_remove(struct platform
  		unregister_netdev(dp_priv->netdev);
  
  		if (dp_priv->phydev)



From lede-commits at lists.infradead.org  Tue May 21 11:15:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 14:15:06 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: sax1v1k: fix QCA8081 reset
In-Reply-To: <171631530633.237306.5550804928180968618@git-01.infra.openwrt.org>
References: <171631530633.237306.5550804928180968618@git-01.infra.openwrt.org>
Message-ID: <mailman.37519.1716315318.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cd9241db230e43387962cf13b4e8bbdc61f1581c

commit cd9241db230e43387962cf13b4e8bbdc61f1581c
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue May 21 19:24:06 2024 +0200

    qualcommax: ipq807x: sax1v1k: fix QCA8081 reset
    
    It seems that on Spectrum SAX1V1K QCA8081 is being brought out of reset
    too quickly and thus causing it to get stuck in an invalid autoneg
    register configuration mode.
    
    Setting an deasset delay seems to fix this, so lets set it.
    
    Fixes: #15493
    Link: https://github.com/openwrt/openwrt/pull/15541
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
index 01ac1c5fd6..fbb652a097 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
@@ -136,6 +136,7 @@
 		compatible = "ethernet-phy-id004d.d101";
 		reg = <28>;
 		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
+		reset-deassert-us = <10000>;
 	};
 };
 



From lede-commits at lists.infradead.org  Tue May 21 11:43:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 21 May 2024 14:43:24 -0400
Subject: [openwrt/openwrt]  scripts: fix revision calculation using new "main"
 branch
In-Reply-To: <171631700444.297339.16000501648300516053@git-01.infra.openwrt.org>
References: <171631700444.297339.16000501648300516053@git-01.infra.openwrt.org>
Message-ID: <mailman.37534.1716317008.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8

commit 9db53fb6aa261c4aa73da7d1ec6cf2d3b06b8fb8
Author: Marius Dinu <m95d+git at psihoexpert.ro>
AuthorDate: Tue May 21 18:08:33 2024 +0300

    scripts: fix revision calculation using new "main" branch
    
    Fix revision calculation when local branch is rebased on new "main" branch
    instead of "master".
    
    Signed-off-by: Marius Dinu <m95d+git at psihoexpert.ro>
    Link: https://github.com/openwrt/openwrt/pull/15538
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 scripts/getver.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/getver.sh b/scripts/getver.sh
index 61906040b1..0659d8004a 100755
--- a/scripts/getver.sh
+++ b/scripts/getver.sh
@@ -26,7 +26,7 @@ try_git() {
 	*)
 		BRANCH="$(git rev-parse --abbrev-ref HEAD)"
 		ORIGIN="$(git rev-parse --verify --symbolic-full-name ${BRANCH}@{u} 2>/dev/null)"
-		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name master@{u} 2>/dev/null)"
+		[ -n "$ORIGIN" ] || ORIGIN="$(git rev-parse --verify --symbolic-full-name main@{u} 2>/dev/null)"
 		REV="$(git rev-list ${REBOOT}..$GET_REV 2>/dev/null | wc -l | awk '{print $1}')"
 
 		if [ -n "$ORIGIN" ]; then



From lede-commits at lists.infradead.org  Wed May 22 02:58:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 05:58:15 -0400
Subject: [openwrt/openwrt]  tools/missing-macros: install files from
 HOST_BUILD_DIR instead of src
In-Reply-To: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
References: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
Message-ID: <mailman.37665.1716371906.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/46bcbe42236bbe058eaeb89a0d1a4f22926cfdf9

commit 46bcbe42236bbe058eaeb89a0d1a4f22926cfdf9
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:53:52 2024 +0200

    tools/missing-macros: install files from HOST_BUILD_DIR instead of src
    
    Install files from HOST_BUILD_DIR instead of src. These files are now
    correctly copied to HOST_BUILD_DIR and can be referenced from there.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/missing-macros/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/missing-macros/Makefile b/tools/missing-macros/Makefile
index edbcb84302..15a1cc9b97 100644
--- a/tools/missing-macros/Makefile
+++ b/tools/missing-macros/Makefile
@@ -20,9 +20,9 @@ endef
 
 define Host/Install
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
-	$(INSTALL_DATA) ./src/m4/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
+	$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
-	$(INSTALL_BIN) ./src/bin/* $(STAGING_DIR_HOST)/bin/
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
 	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2any
 	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2pdf
 	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2dvi



From lede-commits at lists.infradead.org  Wed May 22 02:58:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 05:58:14 -0400
Subject: [openwrt/openwrt]  host-build: always define Host/Prepare/Default
In-Reply-To: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
References: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
Message-ID: <mailman.37666.1716371909.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/725389b7c745b0fa68426986c9bca14171f16887

commit 725389b7c745b0fa68426986c9bca14171f16887
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:38:49 2024 +0200

    host-build: always define Host/Prepare/Default
    
    We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
    defined.
    
    This is mostly the case for Host packages that just provide files with
    the src directory and don't need to be downloaded/extracted.
    
    This was probably done lots of times ago due to quilt causing error as
    the patches directory wasn't present.
    This has changed now and quilt can correctly detect if no patches needs
    to be applied (instead of terminating with error)
    
    Always define Host/Prepare/Default to make tools/refresh correctly works
    as HOST_QUILT is hardcoded enabled for this make target and will
    complain for tool not prepared for quilt patches.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/host-build.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index 819fff5664..235caaa6fb 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -35,13 +35,11 @@ include $(INCLUDE_DIR)/autotools.mk
 _host_target:=$(if $(HOST_QUILT),,.)
 
 Host/Patch:=$(Host/Patch/Default)
-ifneq ($(strip $(HOST_UNPACK)),)
-  define Host/Prepare/Default
-	$(HOST_UNPACK)
+define Host/Prepare/Default
+	$(if $(strip $(HOST_UNPACK)),$(HOST_UNPACK))
 	[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)
 	$(Host/Patch)
-  endef
-endif
+endef
 
 define Host/Prepare
   $(call Host/Prepare/Default)



From lede-commits at lists.infradead.org  Wed May 22 02:58:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 05:58:16 -0400
Subject: [openwrt/openwrt]  tools/padjffs2: use Host/Prepare/Default instead
 of raw commands
In-Reply-To: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
References: <171637189423.2149380.4281412378482575140@git-01.infra.openwrt.org>
Message-ID: <mailman.37667.1716371909.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/01048c7456785bc4a45452c84d8f31635e1fa60b

commit 01048c7456785bc4a45452c84d8f31635e1fa60b
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:56:45 2024 +0200

    tools/padjffs2: use Host/Prepare/Default instead of raw commands
    
    Now that Host/Prepare/Default is always defined, we can use that instead
    of using raw commands to move files from the src directory to
    HOST_BUILD_DIR.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/padjffs2/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/padjffs2/Makefile b/tools/padjffs2/Makefile
index 422d14db30..b893fadce5 100644
--- a/tools/padjffs2/Makefile
+++ b/tools/padjffs2/Makefile
@@ -13,8 +13,7 @@ PKG_RELEASE:=1
 include $(INCLUDE_DIR)/host-build.mk
 
 define Host/Prepare
-	mkdir -p $(HOST_BUILD_DIR)
-	$(CP) ./src/* $(HOST_BUILD_DIR)/
+	$(call Host/Prepare/Default)
 	find $(HOST_BUILD_DIR) -name .svn | $(XARGS) rm -rf
 endef
 



From lede-commits at lists.infradead.org  Wed May 22 03:01:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:01:01 -0400
Subject: [openwrt/openwrt]  tools/missing-macros: install files from
 HOST_BUILD_DIR instead of src
In-Reply-To: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
References: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
Message-ID: <mailman.37668.1716372066.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/9897724adaaefdbd4da0067dced23efa9c536643

commit 9897724adaaefdbd4da0067dced23efa9c536643
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:53:52 2024 +0200

    tools/missing-macros: install files from HOST_BUILD_DIR instead of src
    
    Install files from HOST_BUILD_DIR instead of src. These files are now
    correctly copied to HOST_BUILD_DIR and can be referenced from there.
    
    (cherry picked from commit 46bcbe42236bbe058eaeb89a0d1a4f22926cfdf9)
    [ rebased on top of openwrt-23.05 ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/missing-macros/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/missing-macros/Makefile b/tools/missing-macros/Makefile
index 1e423621bd..0b1d568cbd 100644
--- a/tools/missing-macros/Makefile
+++ b/tools/missing-macros/Makefile
@@ -20,9 +20,9 @@ endef
 
 define Host/Install
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
-	$(INSTALL_DATA) ./src/m4/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
+	$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
-	$(INSTALL_BIN) ./src/bin/* $(STAGING_DIR_HOST)/bin/
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/bin/* $(STAGING_DIR_HOST)/bin/
 endef
 
 $(eval $(call HostBuild))



From lede-commits at lists.infradead.org  Wed May 22 03:01:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:01:00 -0400
Subject: [openwrt/openwrt]  host-build: always define Host/Prepare/Default
In-Reply-To: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
References: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
Message-ID: <mailman.37669.1716372066.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/d1fc2ea8c78db13a07c129296453454f72108bec

commit d1fc2ea8c78db13a07c129296453454f72108bec
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:38:49 2024 +0200

    host-build: always define Host/Prepare/Default
    
    We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
    defined.
    
    This is mostly the case for Host packages that just provide files with
    the src directory and don't need to be downloaded/extracted.
    
    This was probably done lots of times ago due to quilt causing error as
    the patches directory wasn't present.
    This has changed now and quilt can correctly detect if no patches needs
    to be applied (instead of terminating with error)
    
    Always define Host/Prepare/Default to make tools/refresh correctly works
    as HOST_QUILT is hardcoded enabled for this make target and will
    complain for tool not prepared for quilt patches.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 725389b7c745b0fa68426986c9bca14171f16887)
---
 include/host-build.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index dba6b819da..2d0c416f6e 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -35,13 +35,11 @@ include $(INCLUDE_DIR)/autotools.mk
 _host_target:=$(if $(HOST_QUILT),,.)
 
 Host/Patch:=$(Host/Patch/Default)
-ifneq ($(strip $(HOST_UNPACK)),)
-  define Host/Prepare/Default
-	$(HOST_UNPACK)
+define Host/Prepare/Default
+	$(if $(strip $(HOST_UNPACK)),$(HOST_UNPACK))
 	[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)
 	$(Host/Patch)
-  endef
-endif
+endef
 
 define Host/Prepare
   $(call Host/Prepare/Default)



From lede-commits at lists.infradead.org  Wed May 22 03:01:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:01:02 -0400
Subject: [openwrt/openwrt]  tools/padjffs2: use Host/Prepare/Default instead
 of raw commands
In-Reply-To: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
References: <171637206096.2155995.2770058963124197671@git-01.infra.openwrt.org>
Message-ID: <mailman.37670.1716372069.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/aa77c796fec90e3e328c5b33d9239bd4910f1e9a

commit aa77c796fec90e3e328c5b33d9239bd4910f1e9a
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 11:56:45 2024 +0200

    tools/padjffs2: use Host/Prepare/Default instead of raw commands
    
    Now that Host/Prepare/Default is always defined, we can use that instead
    of using raw commands to move files from the src directory to
    HOST_BUILD_DIR.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 01048c7456785bc4a45452c84d8f31635e1fa60b)
---
 tools/padjffs2/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/padjffs2/Makefile b/tools/padjffs2/Makefile
index 422d14db30..b893fadce5 100644
--- a/tools/padjffs2/Makefile
+++ b/tools/padjffs2/Makefile
@@ -13,8 +13,7 @@ PKG_RELEASE:=1
 include $(INCLUDE_DIR)/host-build.mk
 
 define Host/Prepare
-	mkdir -p $(HOST_BUILD_DIR)
-	$(CP) ./src/* $(HOST_BUILD_DIR)/
+	$(call Host/Prepare/Default)
 	find $(HOST_BUILD_DIR) -name .svn | $(XARGS) rm -rf
 endef
 



From lede-commits at lists.infradead.org  Wed May 22 03:24:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:24:58 -0400
Subject: [openwrt/openwrt]  quilt.mk: use CURDIR instead of ./ for PATCH_DIR
 and FILES_DIR
In-Reply-To: <171637349856.2207136.18063837865219065086@git-01.infra.openwrt.org>
References: <171637349856.2207136.18063837865219065086@git-01.infra.openwrt.org>
Message-ID: <mailman.37677.1716373502.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/61c50bd2ce4e1027544361291b789921cbe96166

commit 61c50bd2ce4e1027544361291b789921cbe96166
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Sep 25 02:26:43 2023 +0200

    quilt.mk: use CURDIR instead of ./ for PATCH_DIR and FILES_DIR
    
    To better reference them for diagnostic use, reference the PATCH_DIR and
    FILES_DIR with the absolute path instead of using ./ and reference by
    the relative location.
    
    No behaviour change intended.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit bb1bfb46020b38179ef97d30333c90ab00b71c97)
---
 include/quilt.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/quilt.mk b/include/quilt.mk
index 18cafe60a2..140d390528 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -34,8 +34,8 @@ endif
 ifneq ($(if $(DUMP),1,$(__quilt_inc)),1)
 __quilt_inc:=1
 
-PATCH_DIR?=./patches
-FILES_DIR?=./files
+PATCH_DIR?=$(CURDIR)/patches
+FILES_DIR?=$(CURDIR)/files
 HOST_PATCH_DIR?=$(PATCH_DIR)
 HOST_FILES_DIR?=$(FILES_DIR)
 



From lede-commits at lists.infradead.org  Wed May 22 03:24:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:24:59 -0400
Subject: [openwrt/openwrt]  quilt.mk: don't error on refresh/update if patches
 doesn't exist
In-Reply-To: <171637349856.2207136.18063837865219065086@git-01.infra.openwrt.org>
References: <171637349856.2207136.18063837865219065086@git-01.infra.openwrt.org>
Message-ID: <mailman.37678.1716373511.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/349c3c1605cd3bbed1579a096af6a7b6be3c518c

commit 349c3c1605cd3bbed1579a096af6a7b6be3c518c
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Sep 25 02:29:31 2023 +0200

    quilt.mk: don't error on refresh/update if patches doesn't exist
    
    The current code fails if we have package or host tools with no patches
    to apply. The error printend is the following: (taking ubus as an
    example)
    
    make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config'
    make[2]: 'conf' is up to date.
    make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config'
    make[1]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt'
    make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus'
    The source directory contains no quilt patches.
    make[2]: *** [Makefile:81: quilt-check] Error 1
    make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus'
    time: package/system/ubus/refresh#0.06#0.00#0.07
        ERROR: package/system/ubus failed to build.
    make[1]: *** [package/Makefile:120: package/system/ubus/refresh] Error 1
    make[1]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt'
    make: *** [/home/ansuel/openwrt-ansuel/openwrt/include/toplevel.mk:232: package/ubus/refresh] Error 2
    
    We exit 1 after saying that there are no patches because later in the
    function quilt pop fails to execute.
    
    Having no patches for a package and calling refresh should not be
    a critical error and the function should just do nothing.
    
    To handle this improve quilt.mk with the following addition.
    - If we don't have any patch for the package, we print a warning and we
      create an empty series. This is useful to trick quilt and make it do
      nothing.
      We also create a status file .quilt_no_patch to detect in the other
      function that we don't have patches to handle.
    - In refresh makefile target, we check if .quilt_no_patch exist and
      we skip quilt cleanup if this exist.
    - In RefreshDir function we change the logic and now we delete the
      patches directory and not only the content. This is done as a cleanup
      to clean case with empty patches directory.
    - In RefreshDir we check if .quilt_no_patch exist and we skip creating
      the patches directory and copying the refreshed patches.
    - In RefreshDir we delete at the end any trace of .quilt_no_patch if
      present.
    
    This is needed to support run like package/refresh that will run the
    refresh process on any package present in the buildroot.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 9536446965e853231e34c4e5dc4cf13f838b9e90)
---
 include/quilt.mk | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/include/quilt.mk b/include/quilt.mk
index 140d390528..a58390f6c5 100644
--- a/include/quilt.mk
+++ b/include/quilt.mk
@@ -106,13 +106,14 @@ define Kernel/Patch/Default
 endef
 
 define Quilt/RefreshDir
-	mkdir -p $(2)
-	-rm -f $(2)/* 2>/dev/null >/dev/null
-	@( \
+	-rm -rf $(2) 2>/dev/null >/dev/null
+	[ -f $(1)/.quilt_no_patch ] || mkdir -p $(2)
+	@[ -f $(1)/.quilt_no_patch ] || { \
 		for patch in $$$$($(if $(3),grep "^$(3)",cat) $(1)/patches/series | awk '{print $$$$1}'); do \
 			$(CP) -v "$(1)/patches/$$$$patch" $(2); \
 		done; \
-	)
+	}
+	@-rm -f $(1)/.quilt_no_patch 2>/dev/null >/dev/null;
 endef
 
 define Quilt/Refresh/Host
@@ -156,7 +157,7 @@ define Quilt/Template
 	}
 	@[ -f "$(1)/patches/series" ] || { \
 		echo "The source directory contains no quilt patches."; \
-		false; \
+		touch $(1)/patches/series $(1)/.quilt_no_patch; \
 	}
 	@[ -n "$$$$(ls $(1)/patches/series)" -o \
 	   "$$$$(cat $(1)/patches/series | $(MKHASH) md5)" = "$$(sort $(1)/patches/series | $(MKHASH) md5)" ] || { \
@@ -165,10 +166,12 @@ define Quilt/Template
 	}
 
   $(3)refresh: $(3)quilt-check
-	@cd "$(1)"; $(QUILT_CMD) pop -a -f >/dev/null 2>/dev/null
-	@cd "$(1)"; while $(QUILT_CMD) next 2>/dev/null >/dev/null && $(QUILT_CMD) push; do \
-		QUILT_DIFF_OPTS="-p" $(QUILT_CMD) refresh -p ab --no-index --no-timestamps; \
-	done; ! $(QUILT_CMD) next 2>/dev/null >/dev/null
+	@[ -f $(1)/.quilt_no_patch ] || { \
+		cd "$(1)"; $(QUILT_CMD) pop -a -f >/dev/null 2>/dev/null; \
+		while $(QUILT_CMD) next 2>/dev/null >/dev/null && $(QUILT_CMD) push; do \
+			QUILT_DIFF_OPTS="-p" $(QUILT_CMD) refresh -p ab --no-index --no-timestamps; \
+		done; ! $(QUILT_CMD) next 2>/dev/null >/dev/null; \
+	}
 	$(Quilt/Refresh/$(4))
 	
   $(3)update: $(3)quilt-check



From lede-commits at lists.infradead.org  Wed May 22 03:42:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 06:42:14 -0400
Subject: [openwrt/openwrt]  tools: refresh all patches
In-Reply-To: <171637453447.2242890.6168479262178432595@git-01.infra.openwrt.org>
References: <171637453447.2242890.6168479262178432595@git-01.infra.openwrt.org>
Message-ID: <mailman.37681.1716374540.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/28bf0137b4d6f73bb2ad94e286f3ac2a5d6388c6

commit 28bf0137b4d6f73bb2ad94e286f3ac2a5d6388c6
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed May 22 12:41:10 2024 +0200

    tools: refresh all patches
    
    Refresh all tools patches now that tools/refresh correctly works.
    
    CI now checks for them and actively complain if tools have unrefreshed
    patches.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../patches/021-merge-and-improve-makefiles.patch  | 10 +++---
 tools/ccache/patches/100-honour-copts.patch        |  2 +-
 tools/elftosb/patches/001-libm.patch               |  6 ++--
 tools/elftosb/patches/002-fix-header-path.patch    |  5 ++-
 .../001-add-cmake-ENABLE-configurables.patch       | 14 ++++-----
 .../001-add-make-ENABLE_DOCS-configurable.patch    | 14 ++++-----
 .../002-makefile-install-links-from-same-dir.patch | 23 ++++++--------
 tools/lzma/patches/001-large_files.patch           |  8 ++---
 tools/lzma/patches/002-lzmp.patch                  | 36 ++++++++--------------
 tools/lzma/patches/003-compile_fixes.patch         | 14 ++++-----
 .../001-add-cmake-ENABLE_DOCS-configurable.patch   |  8 ++---
 tools/patch/patches/050-CVE-2019-13636.patch       | 15 +++------
 tools/patch/patches/060-CVE-2019-13638.patch       |  9 ++----
 13 files changed, 67 insertions(+), 97 deletions(-)

diff --git a/tools/bzip2/patches/021-merge-and-improve-makefiles.patch b/tools/bzip2/patches/021-merge-and-improve-makefiles.patch
index 9d98c34bdb..f21d55e0e2 100644
--- a/tools/bzip2/patches/021-merge-and-improve-makefiles.patch
+++ b/tools/bzip2/patches/021-merge-and-improve-makefiles.patch
@@ -22,7 +22,7 @@
  
 --- a/Makefile
 +++ b/Makefile
-@@ -21,11 +21,38 @@
+@@ -21,11 +21,38 @@ RANLIB=ranlib
  LDFLAGS=
  
  BIGFILES=-D_FILE_OFFSET_BITS=64
@@ -64,7 +64,7 @@
  
  OBJS= blocksort.o  \
        huffman.o    \
-@@ -35,15 +62,38 @@
+@@ -35,15 +62,38 @@ OBJS= blocksort.o  \
        decompress.o \
        bzlib.o
  
@@ -109,7 +109,7 @@
  	rm -f libbz2.a
  	$(AR) cq libbz2.a $(OBJS)
  	@if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
-@@ -51,8 +101,18 @@
+@@ -51,8 +101,18 @@ libbz2.a: $(OBJS)
  		echo $(RANLIB) libbz2.a ; \
  		$(RANLIB) libbz2.a ; \
  	fi
@@ -129,7 +129,7 @@
  test: bzip2
  	@cat words1
  	./bzip2 -1  < sample1.ref > sample1.rb2
-@@ -69,69 +129,153 @@
+@@ -69,69 +129,153 @@ test: bzip2
  	cmp sample3.tst sample3.ref
  	@cat words3
  
@@ -318,7 +318,7 @@
  
  
  distclean: clean
-@@ -189,7 +333,6 @@
+@@ -189,7 +333,6 @@ dist: check manual
  	   $(DISTNAME)/bzmore.1 \
  	   $(DISTNAME)/bzgrep \
  	   $(DISTNAME)/bzgrep.1 \
diff --git a/tools/ccache/patches/100-honour-copts.patch b/tools/ccache/patches/100-honour-copts.patch
index da72af922d..91dc35536f 100644
--- a/tools/ccache/patches/100-honour-copts.patch
+++ b/tools/ccache/patches/100-honour-copts.patch
@@ -1,6 +1,6 @@
 --- a/src/ccache.cpp
 +++ b/src/ccache.cpp
-@@ -1813,6 +1813,7 @@ get_manifest_key(Context& ctx, Hash& has
+@@ -1815,6 +1815,7 @@ get_manifest_key(Context& ctx, Hash& has
                             "CPLUS_INCLUDE_PATH",
                             "OBJC_INCLUDE_PATH",
                             "OBJCPLUS_INCLUDE_PATH", // clang
diff --git a/tools/elftosb/patches/001-libm.patch b/tools/elftosb/patches/001-libm.patch
index 02705d24bb..6b49ac1af2 100644
--- a/tools/elftosb/patches/001-libm.patch
+++ b/tools/elftosb/patches/001-libm.patch
@@ -1,6 +1,6 @@
---- elftosb-10.12.01/makefile.rules	2012-03-15 11:01:44.979020178 -0400
-+++ elftosb-10.12.01/makefile.rules	2012-03-15 11:01:16.332761989 -0400
-@@ -101,7 +101,7 @@
+--- a/makefile.rules
++++ b/makefile.rules
+@@ -101,7 +101,7 @@ OBJ_FILES_KEYGEN =			\
  	keygen.o
  
  
diff --git a/tools/elftosb/patches/002-fix-header-path.patch b/tools/elftosb/patches/002-fix-header-path.patch
index 5e3b5091b9..5099b29644 100644
--- a/tools/elftosb/patches/002-fix-header-path.patch
+++ b/tools/elftosb/patches/002-fix-header-path.patch
@@ -5,9 +5,8 @@ others once multiarch becomes more common.
 This patch makes the types a relative path, and allows the system
 to use whatever include paths it feels are correct.
 
-diff -Naurp elftosb-10.12.01-orig/common/stdafx.h elftosb-10.12.01/common/stdafx.h
---- elftosb-10.12.01-orig/common/stdafx.h	2012-07-12 13:30:10.990249396 -0400
-+++ elftosb-10.12.01/common/stdafx.h	2012-07-12 13:30:06.858249391 -0400
+--- a/common/stdafx.h
++++ b/common/stdafx.h
 @@ -27,7 +27,7 @@
  // For Linux systems only, types.h only defines the signed
  // integer types.  This is not professional code.
diff --git a/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
index 9ab27fc924..e0ba410167 100644
--- a/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
+++ b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
@@ -1,6 +1,6 @@
---- a/CMakeLists.txt	2022-11-28 06:34:39.171209779 -0800
-+++ b/CMakeLists.txt	2022-11-28 06:33:13.368239757 -0800
-@@ -51,8 +51,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,8 +51,11 @@ endif()
  project(lzo VERSION 2.10 LANGUAGES C)
  
  # configuration options
@@ -14,7 +14,7 @@
  if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
      set(ENABLE_STATIC ON)
  endif()
-@@ -127,14 +130,20 @@
+@@ -127,14 +130,20 @@ macro(lzo_add_executable t)
      endif()
  endmacro()
  # main test driver
@@ -35,7 +35,7 @@
  # some boring internal test programs
  if(0)
      lzo_add_executable(align    tests/align.c)
-@@ -144,7 +153,7 @@
+@@ -144,7 +153,7 @@ if(0)
  endif()
  
  # miniLZO
@@ -44,7 +44,7 @@
      add_executable(testmini minilzo/testmini.c minilzo/minilzo.c)
      target_include_directories(testmini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/lzo") # needed for "lzoconf.h"
  endif()
-@@ -263,8 +272,10 @@
+@@ -263,8 +272,10 @@ add_test(NAME lzotest-03 COMMAND lzotest
  
  if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
  
@@ -57,7 +57,7 @@
  
  set(f include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h
      include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h
-@@ -285,7 +296,7 @@
+@@ -285,7 +296,7 @@ if(ENABLE_SHARED)
      )
  endif()
  
diff --git a/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch b/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch
index 5d6dca33f3..938e93cecf 100644
--- a/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch
+++ b/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch
@@ -1,6 +1,6 @@
-+++ a/programs/Makefile	2022-08-15 15:45:31.000000000 -0700
---- b/programs/Makefile	2022-11-28 16:34:21.315593784 -0800
-@@ -66,6 +66,7 @@
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -66,6 +66,7 @@ LZ4_VERSION=$(LIBVER)
  MD2ROFF   = ronn
  MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4 $(LZ4_VERSION)"
  
@@ -8,7 +8,7 @@
  
  default: lz4-release
  
-@@ -120,6 +121,7 @@
+@@ -120,6 +121,7 @@ lz4c32: CFLAGS += -m32
  lz4c32 : $(SRCFILES)
  	$(CC) $(FLAGS) $^ -o $@$(EXT)
  
@@ -16,7 +16,7 @@
  lz4.1: lz4.1.md $(LIBVER_SRC)
  	cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@
  
-@@ -130,6 +132,7 @@
+@@ -130,6 +132,7 @@ clean-man:
  
  preview-man: clean-man man
  	man ./lz4.1
@@ -24,7 +24,7 @@
  
  clean:
  ifeq ($(WINBASED),yes)
-@@ -172,16 +175,19 @@
+@@ -172,16 +175,19 @@ man1dir     ?= $(MAN1DIR)
  
  install: lz4
  	@echo Installing binaries in $(DESTDIR)$(bindir)
@@ -45,7 +45,7 @@
  	@echo lz4 installation completed
  
  uninstall:
-@@ -189,10 +195,12 @@
+@@ -189,10 +195,12 @@ uninstall:
  	$(RM) $(DESTDIR)$(bindir)/unlz4$(EXT)
  	$(RM) $(DESTDIR)$(bindir)/lz4$(EXT)
  	$(RM) $(DESTDIR)$(bindir)/lz4c$(EXT)
diff --git a/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch b/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch
index 159dc67f1a..6849071460 100644
--- a/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch
+++ b/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch
@@ -1,7 +1,6 @@
-diff -ur a/lib/Makefile b/lib/Makefile
---- a/lib/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/lib/Makefile	2022-12-05 00:00:59.172307488 -0800
-@@ -195,8 +195,8 @@
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -195,8 +195,8 @@ install: lib liblz4.pc
  	$(INSTALL_PROGRAM) dll/$(LIBLZ4_EXP) $(DESTDIR)$(libdir)
      else
  	$(INSTALL_PROGRAM) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)
@@ -12,10 +11,9 @@ diff -ur a/lib/Makefile b/lib/Makefile
      endif
    endif
  	@echo Installing headers in $(DESTDIR)$(includedir)
-diff -ur a/Makefile b/Makefile
---- a/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/Makefile	2022-12-04 23:42:09.693836654 -0800
-@@ -77,12 +77,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -77,12 +77,12 @@ build_tests:
  
  .PHONY: clean
  clean:
@@ -34,10 +32,9 @@ diff -ur a/Makefile b/Makefile
  	$(RM) lz4$(EXT)
  	$(RM) -r $(CMAKE_BUILD_DIR)
  	@echo Cleaning completed
-diff -ur a/programs/Makefile b/programs/Makefile
---- a/programs/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/programs/Makefile	2022-12-04 23:42:30.849582910 -0800
-@@ -138,7 +138,7 @@
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -138,7 +138,7 @@ clean:
  ifeq ($(WINBASED),yes)
  	$(RM) *.rc
  endif
@@ -46,7 +43,7 @@ diff -ur a/programs/Makefile b/programs/Makefile
  	$(RM) core *.o *.test tmp* \
             lz4$(EXT) lz4c$(EXT) lz4c32$(EXT) lz4-wlib$(EXT) \
             unlz4$(EXT) lz4cat$(EXT)
-@@ -177,16 +177,16 @@
+@@ -177,16 +177,16 @@ install: lz4
  	@echo Installing binaries in $(DESTDIR)$(bindir)
  	$(INSTALL_DIR) $(DESTDIR)$(bindir)/
  	$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
diff --git a/tools/lzma/patches/001-large_files.patch b/tools/lzma/patches/001-large_files.patch
index b95fe9e90f..65603f4976 100644
--- a/tools/lzma/patches/001-large_files.patch
+++ b/tools/lzma/patches/001-large_files.patch
@@ -1,8 +1,6 @@
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
-===================================================================
---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:00:54.000000000 +0200
-@@ -3,7 +3,7 @@
+--- a/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
++++ b/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+@@ -3,7 +3,7 @@ CXX = g++ -O2 -Wall
  CXX_C = gcc -O2 -Wall
  LIB = -lm
  RM = rm -f
diff --git a/tools/lzma/patches/002-lzmp.patch b/tools/lzma/patches/002-lzmp.patch
index 72d881cdb2..f1d45f45ff 100644
--- a/tools/lzma/patches/002-lzmp.patch
+++ b/tools/lzma/patches/002-lzmp.patch
@@ -1,7 +1,5 @@
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
 @@ -0,0 +1,895 @@
 +/*
 + * LZMA command line tool similar to gzip to encode and decode LZMA files.
@@ -898,10 +896,8 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
 +	return STATUS_OK;
 +}
 +
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/Exception.h
 @@ -0,0 +1,45 @@
 +/* A couple of exceptions for lzmp.
 + *
@@ -948,10 +944,8 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
 +
 +#endif
 +
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
-===================================================================
---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:00:54.000000000 +0200
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:06:13.000000000 +0200
+--- a/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
++++ b/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
 @@ -1,9 +1,10 @@
 -PROG = lzma
 +PROG = lzma_alone
@@ -965,7 +959,7 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
  
  ifdef SystemDrive
  IS_MINGW = 1
-@@ -45,12 +46,35 @@
+@@ -45,12 +46,35 @@ OBJS = \
    Lzma86Dec.o \
    Lzma86Enc.o \
  
@@ -1002,17 +996,15 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
  LzmaAlone.o: LzmaAlone.cpp
  	$(CXX) $(CFLAGS) LzmaAlone.cpp
  
-@@ -131,5 +153,5 @@
+@@ -131,5 +155,5 @@ Lzma86Enc.o: ../../../../C/LzmaUtil/Lzma
  	$(CXX_C) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c
  
  clean:
 -	-$(RM) $(PROG) $(OBJS)
 +	-$(RM) $(PROG) $(PROG2) $(OBJS)
  
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
 @@ -0,0 +1,31 @@
 +#ifndef LZMA_VERSION_H
 +#define LZMA_VERSION_H
@@ -1045,11 +1037,9 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
 +		"named COPYING.\n";
 +
 +#endif /* ifndef LZMA_VERSION_H */
-Index: lzma-4.65/CPP/Common/C_FileIO.h
-===================================================================
---- lzma-4.65.orig/CPP/Common/C_FileIO.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65/CPP/Common/C_FileIO.h	2009-06-01 22:06:56.000000000 +0200
-@@ -24,6 +24,7 @@
+--- a/CPP/Common/C_FileIO.h
++++ b/CPP/Common/C_FileIO.h
+@@ -24,6 +24,7 @@ public:
    bool Close();
    bool GetLength(UInt64 &length) const;
    off_t Seek(off_t distanceToMove, int moveMethod) const;
diff --git a/tools/lzma/patches/003-compile_fixes.patch b/tools/lzma/patches/003-compile_fixes.patch
index 49ae66b9c4..06f7a54aef 100644
--- a/tools/lzma/patches/003-compile_fixes.patch
+++ b/tools/lzma/patches/003-compile_fixes.patch
@@ -1,7 +1,6 @@
-diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/FileStreams.h
---- lzma-4.65/CPP/7zip/Common/FileStreams.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65.new/CPP/7zip/Common/FileStreams.h	2009-06-01 22:30:01.000000000 +0200
-@@ -72,6 +72,7 @@
+--- a/CPP/7zip/Common/FileStreams.h
++++ b/CPP/7zip/Common/FileStreams.h
+@@ -72,6 +72,7 @@ class COutFileStream:
    public IOutStream,
    public CMyUnknownImp
  {
@@ -9,10 +8,9 @@ diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/
    #ifdef USE_WIN_FILE
    NWindows::NFile::NIO::COutFile File;
    #else
-diff -urN lzma-4.65/CPP/Common/MyWindows.h lzma-4.65.new/CPP/Common/MyWindows.h
---- lzma-4.65/CPP/Common/MyWindows.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65.new/CPP/Common/MyWindows.h	2009-06-01 22:29:26.000000000 +0200
-@@ -101,8 +101,11 @@
+--- a/CPP/Common/MyWindows.h
++++ b/CPP/Common/MyWindows.h
+@@ -101,8 +101,11 @@ typedef LONG SCODE;
  
  #ifdef __cplusplus
  
diff --git a/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
index 01ebd33a39..27af782c1c 100644
--- a/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
+++ b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
@@ -1,6 +1,6 @@
---- a/CMakeLists.txt	2017-08-10 04:19:45.000000000 -0700
-+++ b/CMakeLists.txt	2022-11-28 17:21:03.453548350 -0800
-@@ -50,6 +50,9 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,6 +50,9 @@ endif()
  
  project(lzop VERSION 1.04 LANGUAGES C)
  
@@ -10,7 +10,7 @@
  # install directories
  if(NOT CMAKE_INSTALL_PREFIX)
      message(FATAL_ERROR "ERROR: CMAKE_INSTALL_PREFIX is not defined.")
-@@ -186,9 +189,11 @@
+@@ -186,9 +189,11 @@ if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
  
  install(TARGETS lzop DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
  
diff --git a/tools/patch/patches/050-CVE-2019-13636.patch b/tools/patch/patches/050-CVE-2019-13636.patch
index e62c3d4175..d819838bba 100644
--- a/tools/patch/patches/050-CVE-2019-13636.patch
+++ b/tools/patch/patches/050-CVE-2019-13636.patch
@@ -14,8 +14,6 @@ with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
  src/util.c | 14 +++++++++++---
  2 files changed, 21 insertions(+), 5 deletions(-)
 
-diff --git a/src/inp.c b/src/inp.c
-index 32d0919..22d7473 100644
 --- a/src/inp.c
 +++ b/src/inp.c
 @@ -238,8 +238,13 @@ plan_a (char const *filename)
@@ -52,11 +50,9 @@ index 32d0919..22d7473 100644
        || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
      pfatal ("Can't open file %s", quotearg (filename));
    if (TMPINNAME_needs_removal)
-diff --git a/src/util.c b/src/util.c
-index 1cc08ba..fb38307 100644
 --- a/src/util.c
 +++ b/src/util.c
-@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
+@@ -388,7 +388,7 @@ create_backup (char const *to, const str
  
  	  try_makedirs_errno = ENOENT;
  	  safe_unlink (bakname);
@@ -65,7 +61,7 @@ index 1cc08ba..fb38307 100644
  	    {
  	      if (errno != try_makedirs_errno)
  		pfatal ("Can't create file %s", quotearg (bakname));
-@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
+@@ -579,10 +579,13 @@ create_file (char const *file, int open_
  static void
  copy_to_fd (const char *from, int tofd)
  {
@@ -80,7 +76,7 @@ index 1cc08ba..fb38307 100644
      pfatal ("Can't reopen file %s", quotearg (from));
    while ((i = read (fromfd, buf, bufsize)) != 0)
      {
-@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
+@@ -625,6 +628,8 @@ copy_file (char const *from, char const
    else
      {
        assert (S_ISREG (mode));
@@ -89,7 +85,7 @@ index 1cc08ba..fb38307 100644
        tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
  			  to_dir_known_to_exist);
        copy_to_fd (from, tofd);
-@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
+@@ -640,9 +645,12 @@ copy_file (char const *from, char const
  void
  append_to_file (char const *from, char const *to)
  {
@@ -103,6 +99,3 @@ index 1cc08ba..fb38307 100644
      pfatal ("Can't reopen file %s", quotearg (to));
    copy_to_fd (from, tofd);
    if (close (tofd) != 0)
--- 
-cgit v1.0-41-gc330
-
diff --git a/tools/patch/patches/060-CVE-2019-13638.patch b/tools/patch/patches/060-CVE-2019-13638.patch
index 38caff628a..590cf186e7 100644
--- a/tools/patch/patches/060-CVE-2019-13638.patch
+++ b/tools/patch/patches/060-CVE-2019-13638.patch
@@ -9,11 +9,9 @@ command to avoid quoting vulnerabilities.
  src/pch.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
 
-diff --git a/src/pch.c b/src/pch.c
-index 4fd5a05..16e001a 100644
 --- a/src/pch.c
 +++ b/src/pch.c
-@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
+@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char c
  	    *outname_needs_removal = true;
  	    copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
  	  }
@@ -23,7 +21,7 @@ index 4fd5a05..16e001a 100644
  	fflush (stdout);
  
  	pid = fork();
-@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
+@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char c
  	else if (pid == 0)
  	  {
  	    dup2 (tmpfd, 0);
@@ -33,6 +31,3 @@ index 4fd5a05..16e001a 100644
  	    _exit (2);
  	  }
  	else
--- 
-cgit v1.0-41-gc330
-



From lede-commits at lists.infradead.org  Wed May 22 05:51:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 08:51:40 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x support Netgear Orbi Pro SXK80
In-Reply-To: <171638230051.2503472.6957198879658423447@git-01.infra.openwrt.org>
References: <171638230051.2503472.6957198879658423447@git-01.infra.openwrt.org>
Message-ID: <mailman.37709.1716382306.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0f5c28b96b4e04332b6e9f31280c57b03c672cfd

commit 0f5c28b96b4e04332b6e9f31280c57b03c672cfd
Author: Andrew Smith <gul.code at outlook.com>
AuthorDate: Mon Aug 21 09:48:45 2023 +0100

    qualcommax: ipq807x support Netgear Orbi Pro SXK80
    
    This commit adds support for Netgear Orbi Pro SXR80 and SXS80 (collectively known as SXK80)
    
    Specifications:
    ---------------
    * CPU: Qualcomm IPQ8074A Quad core Cortex-A53
    * RAM: 1024MB
    * Storage: SPI-NAND 512 MiB (Winbond W29N04GZ)
    * Ethernet: 4x 1G RJ45 ports (QCA8075) 1x 2.5G RJ45 LAN/WAN (QCA8081)
    * WLAN:
        - 2.4 GHz: Qualcomm QCN5024 4x4
        - 2x 5 GHz: Qualcomm QCN5054 4x4 (second radio high channels only)
    * LEDs:
        - Power: (Green and red)
        - Front: (Blue, green, red and white)
    * Buttons:
        - 1x Soft reset
        - 1x Sync/WPS
    * Power: 12V DC Jack
    
    Installation instructions (Telnet):
    -----------------------------------
    
    *Note, this guide assumes SXR80, for SXS80 change the firmware file name as appropriate
    
    1. Put firmware file openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb in root of TFTP server available at 192.168.1.10.
    2. Enable telnet by going to http://[ip of device]/debug.htm and clicking on the tickbox 'Enable telnet'
    3. Telnet into the device and login using the same username and password as the web interface:
    4. Run the following command:
    
    `fw_setenv bootcmd 'env default -a; saveenv; reset'`
    
    5. Reboot the router, once the web interface is available again re-enable telnet via http://[ip of device]/debug.htm and telnet into the device.
    
    6. Run the following command:
    
    `fw_printenv`
    
    It should look similar to the below:
    
    ```
    baudrate=115200
    bootargs=console=ttyMSM0,115200n8
    bootcmd=mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot
    bootdelay=2
    ipaddr=192.168.1.1
    netmask=255.255.255.0
    serverip=192.168.1.10
    soc_version_major=2
    soc_version_minor=0
    ```
    
    **If you see the message:**
    `Warning: Bad CRC, using default environment`
    **DO NOT CONTINUE, YOU WILL BRICK YOUR DEVICE**
    
    7. Run the following command:
    
    `fw_setenv originalboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; bootdni; boot_DNI_secureboot'`
    
    (This should match what's in the bootcmd variable displayed in step 6)
    
    8. Run the following commands:
    ```
    fw_setenv wrttftp 'mii write 0x0 0x0 0x800; sleep 1; nmrp; if tftpboot openwrt-qualcommax-ipq807x-netgear_sxr80-initramfs-uImage.itb; then bootm; fi; bootdni; boot_DNI_secureboot'
    fw_setenv wrtboot 'mii write 0x0 0x0 0x800; sleep 1; nmrp; nand read 0x40000000 0x1980000 0x06d00000; bootm 0x40000000'
    fw_setenv bootcmd 'run wrttftp'
    ```
    
    9. Ensure SXR/S device is attached via ethernet (LAN port) to the same ethernet segment as the TFTP server.
    
    10. Reboot the device, it should reboot into OpenWrt and be available on 192.168.1.1
    
    11. Once OpenWrt has booted, update the bootcmd using the following command:
    
    `fw_setenv bootcmd 'run wrtboot'`
    
    12. Flash the sysupgrade image
    
    13. It should boot into OpenWrt
    
    References to SXK80 GPL source:
    https://www.downloads.netgear.com/files/GPL/SXK80-V3.2.0.108_gpl_src.tar.bz2.zip
    
    Signed-off-by: Flole Systems <flole at flole.de>
    Signed-off-by: Andrew Smith <gul.code at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/14939
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../boot/uboot-envtools/files/qualcommax_ipq807x   |   6 +
 package/firmware/ipq-wifi/Makefile                 |   2 +
 target/linux/qualcommax/config-6.6                 |   2 +
 .../arch/arm64/boot/dts/qcom/ipq8074-sxk80.dtsi    | 541 +++++++++++++++++++++
 .../arch/arm64/boot/dts/qcom/ipq8074-sxr80.dts     |  11 +
 .../arch/arm64/boot/dts/qcom/ipq8074-sxs80.dts     |  11 +
 target/linux/qualcommax/image/ipq807x.mk           |  27 +
 .../ipq807x/base-files/etc/board.d/02_network      |   4 +
 .../etc/hotplug.d/firmware/11-ath11k-caldata       |   2 +
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   7 +
 .../ipq807x/base-files/lib/upgrade/platform.sh     |   2 +
 11 files changed, 615 insertions(+)

diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq807x b/package/boot/uboot-envtools/files/qualcommax_ipq807x
index 060871396b..4ae0de4e26 100644
--- a/package/boot/uboot-envtools/files/qualcommax_ipq807x
+++ b/package/boot/uboot-envtools/files/qualcommax_ipq807x
@@ -37,6 +37,12 @@ linksys,mx8500)
 	[ -n "$idx" ] && \
 		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
 	;;
+netgear,sxr80|\
+netgear,sxs80)
+	idx="$(find_mtd_index 0:appsblenv)"
+	[ -n "$idx" ] && \
+		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
+	;;
 redmi,ax6|\
 xiaomi,ax3600|\
 xiaomi,ax9000)
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 2ffd2e014c..fc578115f3 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -40,6 +40,7 @@ ALLWIFIBOARDS:= \
 	linksys_mx8500 \
 	netgear_lbr20 \
 	netgear_rax120v2 \
+	netgear_sxk80 \
 	netgear_wax214 \
 	netgear_wax218 \
 	netgear_wax620 \
@@ -161,6 +162,7 @@ $(eval $(call generate-ipq-wifi-package,linksys_mx5300,Linksys MX5300))
 $(eval $(call generate-ipq-wifi-package,linksys_mx8500,Linksys MX8500))
 $(eval $(call generate-ipq-wifi-package,netgear_lbr20,Netgear LBR20))
 $(eval $(call generate-ipq-wifi-package,netgear_rax120v2,Netgear RAX120v2))
+$(eval $(call generate-ipq-wifi-package,netgear_sxk80,Netgear SXK80))
 $(eval $(call generate-ipq-wifi-package,netgear_wax214,Netgear WAX214))
 $(eval $(call generate-ipq-wifi-package,netgear_wax218,Netgear WAX218))
 $(eval $(call generate-ipq-wifi-package,netgear_wax620,Netgear WAX620))
diff --git a/target/linux/qualcommax/config-6.6 b/target/linux/qualcommax/config-6.6
index 71b54041c5..1d05868caf 100644
--- a/target/linux/qualcommax/config-6.6
+++ b/target/linux/qualcommax/config-6.6
@@ -216,6 +216,7 @@ CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 # CONFIG_KPSS_XCC is not set
+CONFIG_LEDS_TLC591XX=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
@@ -441,6 +442,7 @@ CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
 # CONFIG_REGULATOR_CPR3 is not set
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxk80.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxk80.dtsi
new file mode 100644
index 0000000000..7f8b813749
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxk80.dtsi
@@ -0,0 +1,541 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2021, Flole <flole at flole.de>
+ * Copyright (c) 2023, Andrew Smith <gul.code at outlook.com>
+ */
+
+/dts-v1/;
+
+#include "ipq8074.dtsi"
+#include "ipq8074-ess.dtsi"
+#include "ipq8074-hk-cpu.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	aliases {
+		serial0 = &blsp1_uart5;
+		led-boot = &led_front_blue;
+		led-failsafe = &led_front_red;
+		led-running = &led_front_green;
+		led-upgrade = &led_front_white;
+		label-mac-device = &dp2;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " ubi.mtd=rootfs root=/dev/ubiblock0_0";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 54 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_front_blue: front-blue {
+			function = LED_FUNCTION_STATUS;
+			gpios = <&tlmm 33 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_BLUE>;
+		};
+
+		led_front_green: front-green {
+			function = LED_FUNCTION_STATUS;
+			gpios = <&tlmm 29 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+		};
+
+		led_front_red: front-red {
+			function = LED_FUNCTION_STATUS;
+			gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_RED>;
+		};
+
+		led_front_white: front-white {
+			function = LED_FUNCTION_STATUS;
+			gpios = <&tlmm 26 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_WHITE>;
+		};
+
+		led_power_green: power-green {
+			function = LED_FUNCTION_POWER;
+			gpios = <&tlmm 21 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			default-state = "on";
+		};
+
+		led_power_red: power-red {
+			function = LED_FUNCTION_POWER;
+			gpios = <&tlmm 22 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_RED>;
+			panic-indicator;
+		};
+	};
+};
+
+&tlmm {
+	mdio_pins: mdio-pins {
+		mdc {
+			pins = "gpio68";
+			function = "mdc";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		mdio {
+			pins = "gpio69";
+			function = "mdio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+
+	leds_pins: leds_pinmux {
+		led_power_green {
+			pins = "gpio21";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+
+		led_power_red {
+			pins = "gpio22";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+
+		led_white {
+			pins = "gpio26";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+
+		led_green {
+			pins = "gpio29";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+
+		led_red {
+			pins = "gpio31";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+
+		led_blue {
+			pins = "gpio33";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-down;
+		};
+	};
+};
+
+&blsp1_uart5 {
+	status = "okay";
+};
+
+&blsp1_i2c2 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
+	
+	tlc59208f at 27 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "ti,tlc59108";
+		reg = <0x27>;
+		
+		led at 0 {
+			label = "rgb:led0";
+			reg = <0>;
+			linux,default-trigger = "default-off";
+		};
+
+		led at 1 {
+			label = "rgb:led1";
+			reg = <1>;
+			linux,default-trigger = "default-off";
+		};
+
+		led at 2 {
+			label = "rgb:led2";
+			reg = <2>;
+			linux,default-trigger = "default-off";
+		};
+
+		led at 3 {
+			label = "rgb:led3";
+			reg = <3>;
+			linux,default-trigger = "default-off";
+		};
+	};
+};
+
+&prng {
+	status = "okay";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&qpic_nand {
+	status = "okay";
+
+	/*
+	 * Bootloader will find the NAND DT node by the compatible and
+	 * then "fixup" it by adding the partitions from the SMEM table
+	 * using the legacy bindings thus making it impossible for us
+	 * to change the partition table or utilize NVMEM for calibration.
+	 * So add a dummy partitions node that bootloader will populate
+	 * and set it as disabled so the kernel ignores it instead of
+	 * printing warnings due to the broken way bootloader adds the
+	 * partitions.
+	 */
+	partitions {
+		status = "disabled";
+	};
+
+	nand at 0 {
+		reg = <0>;
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "0:sbl1";
+				reg = <0x00 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "0:mibib";
+				reg = <0x100000 0x100000>;
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "0:bootconfig";
+				reg = <0x200000 0x80000>;
+				read-only;
+			};
+
+			partition at 280000 {
+				label = "0:bootconfig_1";
+				reg = <0x280000 0x80000>;
+				read-only;
+			};
+
+			partition at 300000 {
+				label = "0:qsee";
+				reg = <0x300000 0x300000>;
+				read-only;
+			};
+
+			partition at 600000 {
+				label = "0:qsee_1";
+				reg = <0x600000 0x300000>;
+				read-only;
+			};
+
+			partition at 900000 {
+				label = "0:devcfg";
+				reg = <0x900000 0x80000>;
+				read-only;
+			};
+
+			partition at 980000 {
+				label = "0:devcfg_1";
+				reg = <0x980000 0x80000>;
+				read-only;
+			};
+
+			partition at a00000 {
+				label = "0:apdp";
+				reg = <0xa00000 0x80000>;
+				read-only;
+			};
+
+			partition at a80000 {
+				label = "0:apdp_1";
+				reg = <0xa80000 0x80000>;
+				read-only;
+			};
+
+			partition at b00000 {
+				label = "0:rpm";
+				reg = <0xb00000 0x80000>;
+				read-only;
+			};
+
+			partition at b80000 {
+				label = "0:rpm_1";
+				reg = <0xb80000 0x80000>;
+				read-only;
+			};
+
+			partition at c00000 {
+				label = "0:cdt";
+				reg = <0xc00000 0x80000>;
+				read-only;
+			};
+
+			partition at c80000 {
+				label = "0:cdt_1";
+				reg = <0xc80000 0x80000>;
+				read-only;
+			};
+
+			partition at d00000 {
+				label = "0:appsblenv";
+				reg = <0xd00000 0x80000>;
+			};
+
+			partition at d80000 {
+				label = "0:appsbl";
+				reg = <0xd80000 0x100000>;
+				read-only;
+			};
+
+			partition at e80000 {
+				label = "0:appsbl_1";
+				reg = <0xe80000 0x100000>;
+				read-only;
+			};
+
+			partition at f80000 {
+				label = "0:art";
+				reg = <0xf80000 0x80000>;
+				read-only;
+			};
+
+			partition at 1000000 {
+				label = "0:art.bak";
+				reg = <0x1000000 0x80000>;
+				read-only;
+			};
+
+			partition at 1080000 {
+				label = "config";
+				reg = <0x1080000 0x100000>;
+			};
+
+			partition at 1180000 {
+				label = "boarddata1";
+				reg = <0x1180000 0x100000>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_boarddata1_0: macaddr at 0 {
+						reg = <0x0 0x6>;
+					};
+
+					macaddr_boarddata1_6: macaddr at 6 {
+						reg = <0x6 0x6>;
+					};
+				};
+			};
+
+			partition at 1280000 {
+				label = "boarddata2";
+				reg = <0x1280000 0x100000>;
+			};
+
+			partition at 1380000 {
+				label = "pot";
+				reg = <0x1380000 0x100000>;
+				read-only;
+			};
+
+			partition at 1480000 {
+				label = "dnidata";
+				reg = <0x1480000 0x500000>;
+				read-only;
+			};
+
+			partition at 1980000 {
+				label = "kernel";
+				reg = <0x1980000 0x620000>;
+			};
+
+			partition at 1fa0000 {
+				label = "rootfs";
+				reg = <0x1fa0000 0x66e0000>;
+			};
+
+			partition at 8680000 {
+				label = "kernel2";
+				reg = <0x8680000 0x620000>;
+				read-only;
+			};
+
+			partition at 8ca0000 {
+				label = "rootfs2";
+				reg = <0x8ca0000 0x66e0000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
+
+	ethernet-phy-package at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+
+		compatible = "qcom,qca8075-package";
+
+		qca8075_1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+
+		qca8075_2: ethernet-phy at 2 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <2>;
+		};
+
+		qca8075_3: ethernet-phy at 3 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <3>;
+		};
+
+		qca8075_4: ethernet-phy at 4 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <4>;
+		};
+	};
+
+	qca8081_28: ethernet-phy at 28 {
+		compatible = "ethernet-phy-id004d.d101";
+		reg = <28>;
+		reset-deassert-us = <10000>;
+		reset-gpios = <&tlmm 25 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&switch {
+	status = "okay";
+
+	switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4 | ESS_PORT5)>; /* lan port bitmap */
+	switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+	switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
+	switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
+
+	qcom,port_phyinfo {
+		port at 2 {
+			port_id = <2>;
+			phy_address = <1>;
+		};
+		port at 3 {
+			port_id = <3>;
+			phy_address = <2>;
+		};
+		port at 4 {
+			port_id = <4>;
+			phy_address = <3>;
+		};
+		port at 5 {
+			port_id = <5>;
+			phy_address = <4>;
+		};
+		port at 6 {
+			port_id = <6>;
+			phy_address = <28>;
+			port_mac_sel = "QGMAC_PORT";
+		};
+	};
+};
+
+&edma {
+	status = "okay";
+};
+
+&dp2 {
+	status = "okay";
+	phy-handle = <&qca8075_1>;
+	label = "lan2";
+	nvmem-cells = <&macaddr_boarddata1_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&dp3 {
+	status = "okay";
+	phy-handle = <&qca8075_2>;
+	label = "lan3";
+	nvmem-cells = <&macaddr_boarddata1_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&dp4 {
+	status = "okay";
+	phy-handle = <&qca8075_3>;
+	label = "lan4";
+	nvmem-cells = <&macaddr_boarddata1_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&dp5 {
+	status = "okay";
+	phy-handle = <&qca8075_4>;
+	label = "lan5";
+	nvmem-cells = <&macaddr_boarddata1_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&dp6 {
+	status = "okay";
+	phy-handle = <&qca8081_28>;
+	label = "wan";
+	nvmem-cells = <&macaddr_boarddata1_6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wifi {
+	status = "okay";
+
+	qcom,ath11k-calibration-variant = "Netgear-SXK80";
+};
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxr80.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxr80.dts
new file mode 100644
index 0000000000..d90e75da30
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxr80.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/* Copyright (c) 2021, Flole <flole at flole.de> */
+
+/dts-v1/;
+
+#include "ipq8074-sxk80.dtsi"
+
+/ {
+	model = "Netgear SXR80";
+	compatible = "netgear,sxr80", "qcom,ipq8074";
+};
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxs80.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxs80.dts
new file mode 100644
index 0000000000..0d7240cf07
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8074-sxs80.dts
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/* Copyright (c) 2021, Flole <flole at flole.de> */
+
+/dts-v1/;
+
+#include "ipq8074-sxk80.dtsi"
+
+/ {
+	model = "Netgear SXS80";
+	compatible = "netgear,sxs80", "qcom,ipq8074";
+};
diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index 007c73555e..b305c9dbaa 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -172,6 +172,33 @@ define Device/netgear_rax120v2
 endef
 TARGET_DEVICES += netgear_rax120v2
 
+define Device/netgear_sxk80
+	$(call Device/FitImage)
+	$(call Device/UbiFit)
+	DEVICE_PACKAGES += ipq-wifi-netgear_sxk80
+	DEVICE_VENDOR := Netgear
+	BLOCKSIZE := 128k
+	PAGESIZE := 2048
+	DEVICE_DTS_CONFIG := config at hk01
+	SOC := ipq8074
+	KERNEL_SIZE := 6272k
+	NETGEAR_HW_ID := 29766265+0+512+1024+4x4+4x4+4x4
+endef
+
+define Device/netgear_sxr80
+	$(call Device/netgear_sxk80)
+	DEVICE_MODEL := SXR80
+	NETGEAR_BOARD_ID := SXR80
+endef
+TARGET_DEVICES += netgear_sxr80
+
+define Device/netgear_sxs80
+	$(call Device/netgear_sxk80)
+	DEVICE_MODEL := SXS80
+	NETGEAR_BOARD_ID := SXS80
+endef
+TARGET_DEVICES += netgear_sxs80
+
 define Device/netgear_wax218
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index 380588bbab..0bf224f380 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -43,6 +43,10 @@ ipq807x_setup_interfaces()
 	netgear,rax120v2)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "wan"
 		;;
+	netgear,sxr80|\
+	netgear,sxs80)
+		ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan"
+		;;
 	netgear,wax218|\
 	netgear,wax620)
 		ucidef_set_interface_lan "lan" "dhcp"
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index 018e828859..a116d884e2 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -17,6 +17,8 @@ case "$FIRMWARE" in
 	edgecore,eap102|\
 	edimax,cax1800|\
 	linksys,mx5300|\
+	netgear,sxr80|\
+	netgear,sxs80|\
 	netgear,wax218|\
 	netgear,wax620|\
 	netgear,wax630|\
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 17284a0d9e..9552536ade 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -23,6 +23,13 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress
 		;;
+	netgear,sxr80|\
+	netgear,sxs80)
+		[ "$PHYNBR" = "0" ] && mtd_get_mac_binary boarddata1 0x0c > /sys${DEVPATH}/macaddress
+		#boarddata1 doesn't have a MAC for the 2G interface
+		[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(get_mac_label) > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "2" ] && mtd_get_mac_binary boarddata1 0x12 > /sys${DEVPATH}/macaddress
+		;;
 	zbtlink,zbt-z800ax)
 		[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) -1 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) -2 > /sys${DEVPATH}/macaddress
diff --git a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
index b99657fb4c..2008334213 100644
--- a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
@@ -49,6 +49,8 @@ platform_do_upgrade() {
 	dynalink,dl-wrx36|\
 	edimax,cax1800|\
 	netgear,rax120v2|\
+	netgear,sxr80|\
+	netgear,sxs80|\
 	netgear,wax218|\
 	netgear,wax620|\
 	netgear,wax630|\



From lede-commits at lists.infradead.org  Wed May 22 08:24:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 11:24:20 -0400
Subject: [openwrt/openwrt]  ipq40xx: dont panic on PSGMII calibration fail
In-Reply-To: <171639146032.2798570.4649850365201234867@git-01.infra.openwrt.org>
References: <171639146032.2798570.4649850365201234867@git-01.infra.openwrt.org>
Message-ID: <mailman.37735.1716391465.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4a78c46cbd64a69e0ce799d13a3c021260771b83

commit 4a78c46cbd64a69e0ce799d13a3c021260771b83
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed May 22 16:55:51 2024 +0200

    ipq40xx: dont panic on PSGMII calibration fail
    
    Currently, in case that PSGMII calibration fails it will panic the kernel
    which is not ideal and is preventing any debugging to be done.
    
    So, since PGMII calibration failing only means that wired networking wont
    work lets convet the panic() call to dev_error.
    
    Link: https://github.com/openwrt/openwrt/pull/15542
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
index e0331d28ab..20dd345c69 100644
--- a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
+++ b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
@@ -654,7 +654,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 +		}
 +	}
 +
-+	panic("PSGMII work is unstable !!! "
++	dev_err(priv->dev, "PSGMII work is unstable !!! "
 +		"Repeated recalibration attempts did not help(0x%x) !\n",
 +		test_result);
 +



From lede-commits at lists.infradead.org  Wed May 22 10:31:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 22 May 2024 13:31:18 -0400
Subject: [openwrt/openwrt]  build: generate private key for APK early
In-Reply-To: <171639907860.3065322.1200650008925376364@git-01.infra.openwrt.org>
References: <171639907860.3065322.1200650008925376364@git-01.infra.openwrt.org>
Message-ID: <mailman.37754.1716399082.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9a11bc3682dd7e95eb0534da9e2dbe3cdaa1c6de

commit 9a11bc3682dd7e95eb0534da9e2dbe3cdaa1c6de
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed May 22 16:19:45 2024 +0200

    build: generate private key for APK early
    
    Other than OPKG which only uses signed package list, APK uses
    individually signed packages in addition to signed package lists. Hence,
    in order to be able to generate package, the private key needs to be
    generated before compiling packages. Express that dependency and
    generate the private key before building any packages instead of doing
    so as part of the base-files package build.
    
    Fixes: d788ab376f ("build: add APK package build capabilities")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/Makefile            | 8 +++++++-
 package/base-files/Makefile | 6 ------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/Makefile b/package/Makefile
index 301a9e6cd5..eb7cfcf962 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -59,6 +59,12 @@ else
 	-$(foreach pdir,$(PACKAGE_SUBDIRS),$(if $(wildcard $(pdir)/*.ipk),ln -s $(pdir)/*.ipk $(PACKAGE_DIR_ALL);))
 endif
 
+$(BUILD_KEY_APK_SEC):
+	$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC)
+
+$(BUILD_KEY_APK_PUB): $(BUILD_KEY_APK_SEC)
+	$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
+
 $(curdir)/merge-index: $(curdir)/merge
 ifneq ($(CONFIG_USE_APK),)
 	(cd $(PACKAGE_DIR_ALL) && $(STAGING_DIR_HOST)/bin/apk mkndx \
@@ -75,7 +81,7 @@ endif
 ifndef SDK
   $(curdir)//compile = $(STAGING_DIR)/.prepared $(BIN_DIR)
 ifneq ($(CONFIG_USE_APK),)
-  $(curdir)/compile: $(curdir)/system/apk/host/compile
+  $(curdir)/compile: $(curdir)/system/apk/host/compile $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB)
 else
   $(curdir)/compile: $(curdir)/system/opkg/host/compile
 endif
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index 0aa7ecd854..4425bb346d 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -117,12 +117,6 @@ endef
 Build/Compile = $(Build/Compile/Default)
 
 ifneq ($(CONFIG_USE_APK),)
-  define Build/Configure
-	[ -s $(BUILD_KEY_APK_SEC) -a -s $(BUILD_KEY_APK_PUB) ] || \
-		$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
-		$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
-  endef
-
 ifndef CONFIG_BUILDBOT
   define Package/base-files/install-key
 	mkdir -p $(1)/etc/apk/keys



From lede-commits at lists.infradead.org  Thu May 23 02:49:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 05:49:10 -0400
Subject: [openwrt/openwrt]  tools: refresh all patches
In-Reply-To: <171645774989.838098.5506881389261312863@git-01.infra.openwrt.org>
References: <171645774989.838098.5506881389261312863@git-01.infra.openwrt.org>
Message-ID: <mailman.37932.1716457757.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/337b0c80cbbb2c76e80f9f970b03decedcd4c827

commit 337b0c80cbbb2c76e80f9f970b03decedcd4c827
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 18 12:14:20 2024 -0700

    tools: refresh all patches
    
    Refresh all tools patches now that tools/refresh correctly works.
    
    CI now checks for them and actively complain if tools have unrefreshed
    patches.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    [ reword commit message ]
    Link: https://github.com/openwrt/openwrt/pull/15524
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/elftosb/patches/001-libm.patch               |  6 ++--
 tools/elftosb/patches/002-fix-header-path.patch    |  5 ++-
 .../001-add-cmake-ENABLE-configurables.patch       | 14 ++++-----
 tools/lzma/patches/001-large_files.patch           |  8 ++---
 tools/lzma/patches/002-lzmp.patch                  | 36 ++++++++--------------
 tools/lzma/patches/003-compile_fixes.patch         | 14 ++++-----
 .../001-add-cmake-ENABLE_DOCS-configurable.patch   |  8 ++---
 tools/patch/patches/050-CVE-2019-13636.patch       | 15 +++------
 tools/patch/patches/060-CVE-2019-13638.patch       |  9 ++----
 9 files changed, 44 insertions(+), 71 deletions(-)

diff --git a/tools/elftosb/patches/001-libm.patch b/tools/elftosb/patches/001-libm.patch
index 02705d24bb..6b49ac1af2 100644
--- a/tools/elftosb/patches/001-libm.patch
+++ b/tools/elftosb/patches/001-libm.patch
@@ -1,6 +1,6 @@
---- elftosb-10.12.01/makefile.rules	2012-03-15 11:01:44.979020178 -0400
-+++ elftosb-10.12.01/makefile.rules	2012-03-15 11:01:16.332761989 -0400
-@@ -101,7 +101,7 @@
+--- a/makefile.rules
++++ b/makefile.rules
+@@ -101,7 +101,7 @@ OBJ_FILES_KEYGEN =			\
  	keygen.o
  
  
diff --git a/tools/elftosb/patches/002-fix-header-path.patch b/tools/elftosb/patches/002-fix-header-path.patch
index 5e3b5091b9..5099b29644 100644
--- a/tools/elftosb/patches/002-fix-header-path.patch
+++ b/tools/elftosb/patches/002-fix-header-path.patch
@@ -5,9 +5,8 @@ others once multiarch becomes more common.
 This patch makes the types a relative path, and allows the system
 to use whatever include paths it feels are correct.
 
-diff -Naurp elftosb-10.12.01-orig/common/stdafx.h elftosb-10.12.01/common/stdafx.h
---- elftosb-10.12.01-orig/common/stdafx.h	2012-07-12 13:30:10.990249396 -0400
-+++ elftosb-10.12.01/common/stdafx.h	2012-07-12 13:30:06.858249391 -0400
+--- a/common/stdafx.h
++++ b/common/stdafx.h
 @@ -27,7 +27,7 @@
  // For Linux systems only, types.h only defines the signed
  // integer types.  This is not professional code.
diff --git a/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
index 9ab27fc924..e0ba410167 100644
--- a/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
+++ b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
@@ -1,6 +1,6 @@
---- a/CMakeLists.txt	2022-11-28 06:34:39.171209779 -0800
-+++ b/CMakeLists.txt	2022-11-28 06:33:13.368239757 -0800
-@@ -51,8 +51,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,8 +51,11 @@ endif()
  project(lzo VERSION 2.10 LANGUAGES C)
  
  # configuration options
@@ -14,7 +14,7 @@
  if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
      set(ENABLE_STATIC ON)
  endif()
-@@ -127,14 +130,20 @@
+@@ -127,14 +130,20 @@ macro(lzo_add_executable t)
      endif()
  endmacro()
  # main test driver
@@ -35,7 +35,7 @@
  # some boring internal test programs
  if(0)
      lzo_add_executable(align    tests/align.c)
-@@ -144,7 +153,7 @@
+@@ -144,7 +153,7 @@ if(0)
  endif()
  
  # miniLZO
@@ -44,7 +44,7 @@
      add_executable(testmini minilzo/testmini.c minilzo/minilzo.c)
      target_include_directories(testmini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/lzo") # needed for "lzoconf.h"
  endif()
-@@ -263,8 +272,10 @@
+@@ -263,8 +272,10 @@ add_test(NAME lzotest-03 COMMAND lzotest
  
  if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
  
@@ -57,7 +57,7 @@
  
  set(f include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h
      include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h
-@@ -285,7 +296,7 @@
+@@ -285,7 +296,7 @@ if(ENABLE_SHARED)
      )
  endif()
  
diff --git a/tools/lzma/patches/001-large_files.patch b/tools/lzma/patches/001-large_files.patch
index b95fe9e90f..65603f4976 100644
--- a/tools/lzma/patches/001-large_files.patch
+++ b/tools/lzma/patches/001-large_files.patch
@@ -1,8 +1,6 @@
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
-===================================================================
---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:00:54.000000000 +0200
-@@ -3,7 +3,7 @@
+--- a/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
++++ b/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+@@ -3,7 +3,7 @@ CXX = g++ -O2 -Wall
  CXX_C = gcc -O2 -Wall
  LIB = -lm
  RM = rm -f
diff --git a/tools/lzma/patches/002-lzmp.patch b/tools/lzma/patches/002-lzmp.patch
index 72d881cdb2..f1d45f45ff 100644
--- a/tools/lzma/patches/002-lzmp.patch
+++ b/tools/lzma/patches/002-lzmp.patch
@@ -1,7 +1,5 @@
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
 @@ -0,0 +1,895 @@
 +/*
 + * LZMA command line tool similar to gzip to encode and decode LZMA files.
@@ -898,10 +896,8 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
 +	return STATUS_OK;
 +}
 +
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/Exception.h
 @@ -0,0 +1,45 @@
 +/* A couple of exceptions for lzmp.
 + *
@@ -948,10 +944,8 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
 +
 +#endif
 +
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
-===================================================================
---- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:00:54.000000000 +0200
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc	2009-06-01 22:06:13.000000000 +0200
+--- a/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
++++ b/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
 @@ -1,9 +1,10 @@
 -PROG = lzma
 +PROG = lzma_alone
@@ -965,7 +959,7 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
  
  ifdef SystemDrive
  IS_MINGW = 1
-@@ -45,12 +46,35 @@
+@@ -45,12 +46,35 @@ OBJS = \
    Lzma86Dec.o \
    Lzma86Enc.o \
  
@@ -1002,17 +996,15 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
  LzmaAlone.o: LzmaAlone.cpp
  	$(CXX) $(CFLAGS) LzmaAlone.cpp
  
-@@ -131,5 +153,5 @@
+@@ -131,5 +155,5 @@ Lzma86Enc.o: ../../../../C/LzmaUtil/Lzma
  	$(CXX_C) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c
  
  clean:
 -	-$(RM) $(PROG) $(OBJS)
 +	-$(RM) $(PROG) $(PROG2) $(OBJS)
  
-Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h	2009-06-01 22:01:10.000000000 +0200
+--- /dev/null
++++ b/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
 @@ -0,0 +1,31 @@
 +#ifndef LZMA_VERSION_H
 +#define LZMA_VERSION_H
@@ -1045,11 +1037,9 @@ Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
 +		"named COPYING.\n";
 +
 +#endif /* ifndef LZMA_VERSION_H */
-Index: lzma-4.65/CPP/Common/C_FileIO.h
-===================================================================
---- lzma-4.65.orig/CPP/Common/C_FileIO.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65/CPP/Common/C_FileIO.h	2009-06-01 22:06:56.000000000 +0200
-@@ -24,6 +24,7 @@
+--- a/CPP/Common/C_FileIO.h
++++ b/CPP/Common/C_FileIO.h
+@@ -24,6 +24,7 @@ public:
    bool Close();
    bool GetLength(UInt64 &length) const;
    off_t Seek(off_t distanceToMove, int moveMethod) const;
diff --git a/tools/lzma/patches/003-compile_fixes.patch b/tools/lzma/patches/003-compile_fixes.patch
index 49ae66b9c4..06f7a54aef 100644
--- a/tools/lzma/patches/003-compile_fixes.patch
+++ b/tools/lzma/patches/003-compile_fixes.patch
@@ -1,7 +1,6 @@
-diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/FileStreams.h
---- lzma-4.65/CPP/7zip/Common/FileStreams.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65.new/CPP/7zip/Common/FileStreams.h	2009-06-01 22:30:01.000000000 +0200
-@@ -72,6 +72,7 @@
+--- a/CPP/7zip/Common/FileStreams.h
++++ b/CPP/7zip/Common/FileStreams.h
+@@ -72,6 +72,7 @@ class COutFileStream:
    public IOutStream,
    public CMyUnknownImp
  {
@@ -9,10 +8,9 @@ diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/
    #ifdef USE_WIN_FILE
    NWindows::NFile::NIO::COutFile File;
    #else
-diff -urN lzma-4.65/CPP/Common/MyWindows.h lzma-4.65.new/CPP/Common/MyWindows.h
---- lzma-4.65/CPP/Common/MyWindows.h	2009-05-15 23:33:51.000000000 +0200
-+++ lzma-4.65.new/CPP/Common/MyWindows.h	2009-06-01 22:29:26.000000000 +0200
-@@ -101,8 +101,11 @@
+--- a/CPP/Common/MyWindows.h
++++ b/CPP/Common/MyWindows.h
+@@ -101,8 +101,11 @@ typedef LONG SCODE;
  
  #ifdef __cplusplus
  
diff --git a/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
index 01ebd33a39..27af782c1c 100644
--- a/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
+++ b/tools/lzop/patches/001-add-cmake-ENABLE_DOCS-configurable.patch
@@ -1,6 +1,6 @@
---- a/CMakeLists.txt	2017-08-10 04:19:45.000000000 -0700
-+++ b/CMakeLists.txt	2022-11-28 17:21:03.453548350 -0800
-@@ -50,6 +50,9 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -50,6 +50,9 @@ endif()
  
  project(lzop VERSION 1.04 LANGUAGES C)
  
@@ -10,7 +10,7 @@
  # install directories
  if(NOT CMAKE_INSTALL_PREFIX)
      message(FATAL_ERROR "ERROR: CMAKE_INSTALL_PREFIX is not defined.")
-@@ -186,9 +189,11 @@
+@@ -186,9 +189,11 @@ if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
  
  install(TARGETS lzop DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
  
diff --git a/tools/patch/patches/050-CVE-2019-13636.patch b/tools/patch/patches/050-CVE-2019-13636.patch
index e62c3d4175..d819838bba 100644
--- a/tools/patch/patches/050-CVE-2019-13636.patch
+++ b/tools/patch/patches/050-CVE-2019-13636.patch
@@ -14,8 +14,6 @@ with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
  src/util.c | 14 +++++++++++---
  2 files changed, 21 insertions(+), 5 deletions(-)
 
-diff --git a/src/inp.c b/src/inp.c
-index 32d0919..22d7473 100644
 --- a/src/inp.c
 +++ b/src/inp.c
 @@ -238,8 +238,13 @@ plan_a (char const *filename)
@@ -52,11 +50,9 @@ index 32d0919..22d7473 100644
        || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
      pfatal ("Can't open file %s", quotearg (filename));
    if (TMPINNAME_needs_removal)
-diff --git a/src/util.c b/src/util.c
-index 1cc08ba..fb38307 100644
 --- a/src/util.c
 +++ b/src/util.c
-@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
+@@ -388,7 +388,7 @@ create_backup (char const *to, const str
  
  	  try_makedirs_errno = ENOENT;
  	  safe_unlink (bakname);
@@ -65,7 +61,7 @@ index 1cc08ba..fb38307 100644
  	    {
  	      if (errno != try_makedirs_errno)
  		pfatal ("Can't create file %s", quotearg (bakname));
-@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
+@@ -579,10 +579,13 @@ create_file (char const *file, int open_
  static void
  copy_to_fd (const char *from, int tofd)
  {
@@ -80,7 +76,7 @@ index 1cc08ba..fb38307 100644
      pfatal ("Can't reopen file %s", quotearg (from));
    while ((i = read (fromfd, buf, bufsize)) != 0)
      {
-@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
+@@ -625,6 +628,8 @@ copy_file (char const *from, char const
    else
      {
        assert (S_ISREG (mode));
@@ -89,7 +85,7 @@ index 1cc08ba..fb38307 100644
        tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
  			  to_dir_known_to_exist);
        copy_to_fd (from, tofd);
-@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
+@@ -640,9 +645,12 @@ copy_file (char const *from, char const
  void
  append_to_file (char const *from, char const *to)
  {
@@ -103,6 +99,3 @@ index 1cc08ba..fb38307 100644
      pfatal ("Can't reopen file %s", quotearg (to));
    copy_to_fd (from, tofd);
    if (close (tofd) != 0)
--- 
-cgit v1.0-41-gc330
-
diff --git a/tools/patch/patches/060-CVE-2019-13638.patch b/tools/patch/patches/060-CVE-2019-13638.patch
index 38caff628a..590cf186e7 100644
--- a/tools/patch/patches/060-CVE-2019-13638.patch
+++ b/tools/patch/patches/060-CVE-2019-13638.patch
@@ -9,11 +9,9 @@ command to avoid quoting vulnerabilities.
  src/pch.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
 
-diff --git a/src/pch.c b/src/pch.c
-index 4fd5a05..16e001a 100644
 --- a/src/pch.c
 +++ b/src/pch.c
-@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
+@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char c
  	    *outname_needs_removal = true;
  	    copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
  	  }
@@ -23,7 +21,7 @@ index 4fd5a05..16e001a 100644
  	fflush (stdout);
  
  	pid = fork();
-@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
+@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char c
  	else if (pid == 0)
  	  {
  	    dup2 (tmpfd, 0);
@@ -33,6 +31,3 @@ index 4fd5a05..16e001a 100644
  	    _exit (2);
  	  }
  	else
--- 
-cgit v1.0-41-gc330
-



From lede-commits at lists.infradead.org  Thu May 23 02:49:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 05:49:09 -0400
Subject: [openwrt/openwrt]  tools/lz4: remove patches
In-Reply-To: <171645774989.838098.5506881389261312863@git-01.infra.openwrt.org>
References: <171645774989.838098.5506881389261312863@git-01.infra.openwrt.org>
Message-ID: <mailman.37933.1716457757.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8097aa0b3291bb41409d386000f866573533e849

commit 8097aa0b3291bb41409d386000f866573533e849
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed May 22 14:14:23 2024 -0700

    tools/lz4: remove patches
    
    meson is used to build it since 291b137. No need to patch Makefiles.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15524
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../001-add-make-ENABLE_DOCS-configurable.patch    | 60 ------------------
 .../002-makefile-install-links-from-same-dir.patch | 71 ----------------------
 2 files changed, 131 deletions(-)

diff --git a/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch b/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch
deleted file mode 100644
index 5d6dca33f3..0000000000
--- a/tools/lz4/patches/001-add-make-ENABLE_DOCS-configurable.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-+++ a/programs/Makefile	2022-08-15 15:45:31.000000000 -0700
---- b/programs/Makefile	2022-11-28 16:34:21.315593784 -0800
-@@ -66,6 +66,7 @@
- MD2ROFF   = ronn
- MD2ROFF_FLAGS = --roff --warnings --manual="User Commands" --organization="lz4 $(LZ4_VERSION)"
- 
-+ENABLE_DOCS ?= 1
- 
- default: lz4-release
- 
-@@ -120,6 +121,7 @@
- lz4c32 : $(SRCFILES)
- 	$(CC) $(FLAGS) $^ -o $@$(EXT)
- 
-+ifeq ($(ENABLE_DOCS),1)
- lz4.1: lz4.1.md $(LIBVER_SRC)
- 	cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | $(SED) -n '/^\.\\\".*/!p' > $@
- 
-@@ -130,6 +132,7 @@
- 
- preview-man: clean-man man
- 	man ./lz4.1
-+endif
- 
- clean:
- ifeq ($(WINBASED),yes)
-@@ -172,16 +175,19 @@
- 
- install: lz4
- 	@echo Installing binaries in $(DESTDIR)$(bindir)
--	$(INSTALL_DIR) $(DESTDIR)$(bindir)/ $(DESTDIR)$(man1dir)/
-+	$(INSTALL_DIR) $(DESTDIR)$(bindir)/
- 	$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
- 	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
- 	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
- 	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
-+ifeq ($(ENABLE_DOCS),1)
- 	@echo Installing man pages in $(DESTDIR)$(man1dir)
-+	$(INSTALL_DIR) $(DESTDIR)$(man1dir)/
- 	$(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
- 	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
- 	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4cat.1
- 	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/unlz4.1
-+endif
- 	@echo lz4 installation completed
- 
- uninstall:
-@@ -189,10 +195,12 @@
- 	$(RM) $(DESTDIR)$(bindir)/unlz4$(EXT)
- 	$(RM) $(DESTDIR)$(bindir)/lz4$(EXT)
- 	$(RM) $(DESTDIR)$(bindir)/lz4c$(EXT)
-+ifeq ($(ENABLE_DOCS),1)
- 	$(RM) $(DESTDIR)$(man1dir)/lz4.1
- 	$(RM) $(DESTDIR)$(man1dir)/lz4c.1
- 	$(RM) $(DESTDIR)$(man1dir)/lz4cat.1
- 	$(RM) $(DESTDIR)$(man1dir)/unlz4.1
-+endif
- 	@echo lz4 programs successfully uninstalled
- 
- endif
diff --git a/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch b/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch
deleted file mode 100644
index 159dc67f1a..0000000000
--- a/tools/lz4/patches/002-makefile-install-links-from-same-dir.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-diff -ur a/lib/Makefile b/lib/Makefile
---- a/lib/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/lib/Makefile	2022-12-05 00:00:59.172307488 -0800
-@@ -195,8 +195,8 @@
- 	$(INSTALL_PROGRAM) dll/$(LIBLZ4_EXP) $(DESTDIR)$(libdir)
-     else
- 	$(INSTALL_PROGRAM) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)
--	$(LN_SF) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT_MAJOR)
--	$(LN_SF) liblz4.$(SHARED_EXT_VER) $(DESTDIR)$(libdir)/liblz4.$(SHARED_EXT)
-+	(cd $(DESTDIR)$(libdir) && $(LN_SF) liblz4.$(SHARED_EXT_VER) liblz4.$(SHARED_EXT_MAJOR))
-+	(cd $(DESTDIR)$(libdir) && $(LN_SF) liblz4.$(SHARED_EXT_MAJOR) liblz4.$(SHARED_EXT))
-     endif
-   endif
- 	@echo Installing headers in $(DESTDIR)$(includedir)
-diff -ur a/Makefile b/Makefile
---- a/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/Makefile	2022-12-04 23:42:09.693836654 -0800
-@@ -77,12 +77,12 @@
- 
- .PHONY: clean
- clean:
--	$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
--	$(MAKE) -C $(PRGDIR) $@ > $(VOID)
--	$(MAKE) -C $(TESTDIR) $@ > $(VOID)
--	$(MAKE) -C $(EXDIR) $@ > $(VOID)
--	$(MAKE) -C $(FUZZDIR) $@ > $(VOID)
--	$(MAKE) -C contrib/gen_manual $@ > $(VOID)
-+	$(MAKE) -C $(LZ4DIR) $@
-+	$(MAKE) -C $(PRGDIR) $@
-+	$(MAKE) -C $(TESTDIR) $@
-+	$(MAKE) -C $(EXDIR) $@
-+	$(MAKE) -C $(FUZZDIR) $@
-+	$(MAKE) -C contrib/gen_manual $@
- 	$(RM) lz4$(EXT)
- 	$(RM) -r $(CMAKE_BUILD_DIR)
- 	@echo Cleaning completed
-diff -ur a/programs/Makefile b/programs/Makefile
---- a/programs/Makefile	2022-12-04 23:49:06.336839263 -0800
-+++ b/programs/Makefile	2022-12-04 23:42:30.849582910 -0800
-@@ -138,7 +138,7 @@
- ifeq ($(WINBASED),yes)
- 	$(RM) *.rc
- endif
--	$(MAKE) -C $(LZ4DIR) $@ > $(VOID)
-+	$(MAKE) -C $(LZ4DIR) $@
- 	$(RM) core *.o *.test tmp* \
-            lz4$(EXT) lz4c$(EXT) lz4c32$(EXT) lz4-wlib$(EXT) \
-            unlz4$(EXT) lz4cat$(EXT)
-@@ -177,16 +177,16 @@
- 	@echo Installing binaries in $(DESTDIR)$(bindir)
- 	$(INSTALL_DIR) $(DESTDIR)$(bindir)/
- 	$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
--	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
--	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
--	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
-+	(cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) lz4c$(EXT))
-+	(cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) lz4cat$(EXT))
-+	(cd $(DESTDIR)$(bindir) && $(LN_SF) lz4$(EXT) unlz4$(EXT))
- ifeq ($(ENABLE_DOCS),1)
- 	@echo Installing man pages in $(DESTDIR)$(man1dir)
- 	$(INSTALL_DIR) $(DESTDIR)$(man1dir)/
- 	$(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
--	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
--	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4cat.1
--	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/unlz4.1
-+	(cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 lz4c.1)
-+	(cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 lz4cat.1)
-+	(cd $(DESTDIR)$(man1dir) && $(LN_SF) lz4.1 unlz4.1)
- endif
- 	@echo lz4 installation completed
- 



From lede-commits at lists.infradead.org  Thu May 23 12:32:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:32:36 -0400
Subject: [openwrt/openwrt]  mediatek: fix broken PCIe caused by update to
 5.15.158
In-Reply-To: <171649275639.2020578.13577438195978812870@git-01.infra.openwrt.org>
References: <171649275639.2020578.13577438195978812870@git-01.infra.openwrt.org>
Message-ID: <mailman.38051.1716492763.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/0f1b249eac45506e1b1a090d3286d5cf01563fcc

commit 0f1b249eac45506e1b1a090d3286d5cf01563fcc
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 6 01:39:58 2024 +0300

    mediatek: fix broken PCIe caused by update to 5.15.158
    
    The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
    makes use of "syscon_regmap_lookup_by_phandle" which requires that
    "syscon" be in the compatible list.
    
    Without this patch, PCIe probe will fail with the following error:
    
    [    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie at 1a143000 ranges:
    [    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
    [    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
    [    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
    [    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22
    
    Fixes: 01c58a0d2a ("kernel: bump 5.15 to 5.15.158")
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
    (cherry picked from commit 8607372b410fbb24b08de97ff5941341d0870d6f)
---
 .../710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index a3247f1779..917a458d30 100644
--- a/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-5.15/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -30,6 +30,15 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		#interrupt-cells = <1>;
  		interrupt-map-mask = <0 0 0 7>;
+@@ -937,7 +943,7 @@
+ 	};
+ 
+ 	hifsys: clock-controller at 1af00000 {
+-		compatible = "mediatek,mt7622-hifsys";
++		compatible = "mediatek,mt7622-hifsys", "syscon";
+ 		reg = <0 0x1af00000 0 0x70>;
+ 		#clock-cells = <1>;
+ 	};
 --- a/drivers/pci/controller/pcie-mediatek.c
 +++ b/drivers/pci/controller/pcie-mediatek.c
 @@ -20,6 +20,7 @@



From lede-commits at lists.infradead.org  Thu May 23 12:40:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:40:30 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix creation of IBSS in legacy
 (non-HT) mode
In-Reply-To: <171649323076.2052655.13017331437187909709@git-01.infra.openwrt.org>
References: <171649323076.2052655.13017331437187909709@git-01.infra.openwrt.org>
Message-ID: <mailman.38052.1716493235.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a6bb1df40bc8819ac01ee169c429f0f36c25ed38

commit a6bb1df40bc8819ac01ee169c429f0f36c25ed38
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
AuthorDate: Wed Apr 3 14:32:08 2024 -0500

    wifi-scripts: fix creation of IBSS in legacy (non-HT) mode
    
    When an IBBS interface is configured for IBSS legacy mode, wdev.htmode
    is empty. This is empty string results in an empty positional argument
    to the "ibbs join" command, for example:
    
        iw dev phy0-ibss0 ibss join crymesh 2412 '' fixed-freq beacon-interval 100
    
    This empty argument is interpreted as an invalid HT mode by 'iw',
    causing the entire command to fail and print a "usage" message:
    
        daemon.notice netifd: radio0 (4527): Usage:    iw [options] \
            dev <devname> ibss join <SSID> <freq in MHz> ...
    
    Although nobody will ever need more than 640K of IBSS, explicitly use
    "NOHT" if an HT mode is not given. This fixes the problem.
    
    Fixes: e56c5f7b276a ("hostapd: add ucode support, use ucode for the main ubus object")
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
    Signed-off-by: Felix Fietkau <nbd at nbd.name> [extend to cover more cases]
    (cherry picked from commit cee9fcdb7350911f474544189817d25fd4070111)
---
 package/network/services/hostapd/files/wdev.uc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/files/wdev.uc b/package/network/services/hostapd/files/wdev.uc
index ff4d629fd6..d505e3035f 100644
--- a/package/network/services/hostapd/files/wdev.uc
+++ b/package/network/services/hostapd/files/wdev.uc
@@ -32,10 +32,11 @@ function iface_start(wdev)
 		wdev_config.macaddr = phydev.macaddr_next();
 	wdev_create(phy, ifname, wdev_config);
 	wdev_set_up(ifname, true);
+	let htmode = wdev.htmode || "NOHT";
 	if (wdev.freq)
-		system(`iw dev ${ifname} set freq ${wdev.freq} ${wdev.htmode}`);
+		system(`iw dev ${ifname} set freq ${wdev.freq} ${htmode}`);
 	if (wdev.mode == "adhoc") {
-		let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, wdev.htmode, "fixed-freq" ];
+		let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, htmode, "fixed-freq" ];
 		if (wdev.bssid)
 			push(cmd, wdev.bssid);
 		for (let key in [ "beacon-interval", "basic-rates", "mcast-rate", "keys" ])
@@ -43,7 +44,7 @@ function iface_start(wdev)
 				push(cmd, key, wdev[key]);
 		system(cmd);
 	} else if (wdev.mode == "mesh") {
-		let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, wdev.htmode ];
+		let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, htmode ];
 		for (let key in [ "mcast-rate", "beacon-interval" ])
 			if (wdev[key])
 				push(cmd, key, wdev[key]);



From lede-commits at lists.infradead.org  Thu May 23 12:59:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:59:23 -0400
Subject: [openwrt/openwrt]  mediatek: drop NMBM layout for Xiaomi WR30U
In-Reply-To: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
References: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
Message-ID: <mailman.38055.1716494365.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/51822a907e18fe699fc8f6e68a6ffa6bcc6a098a

commit 51822a907e18fe699fc8f6e68a6ffa6bcc6a098a
Author: Chuanhong Guo <gch981213 at gmail.com>
AuthorDate: Tue Jan 23 19:20:47 2024 +0800

    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 <gch981213 at gmail.com>
    (cherry picked from commit 1b7e62b20b1735fcdc498a35e005afcd775abcf4)
---
 package/boot/uboot-envtools/files/mediatek_filogic |  1 -
 .../mt7981b-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(-)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 65a17bde0e..48e59d6a6a 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -78,7 +78,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 at 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 1633006998..7d7d41362c 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
@@ -36,7 +36,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 687a5b3f8d..0eb27744e9 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
@@ -70,7 +70,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|\
@@ -145,7 +144,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 1a8f0b3745..872a5592f4 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -761,23 +761,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)



From lede-commits at lists.infradead.org  Thu May 23 12:59:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:59:21 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: fix failsafe mode on devices
 with no lan1
In-Reply-To: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
References: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
Message-ID: <mailman.38056.1716494365.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c82c1178c1577422b62c90a52fa412929696d491

commit c82c1178c1577422b62c90a52fa412929696d491
Author: Paul Geraedts <p.f.j.geraedts at gmail.com>
AuthorDate: Sat Feb 24 09:01:01 2024 +0100

    mediatek: filogic: fix failsafe mode on devices with no lan1
    
    Default to lan4 port, instead of (missing) lan1 port,
    to fix failsafe mode on Xiaomi AX3000T, WR30U, AX6000
    
    Build system: x86/64
    Build-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod
    Run-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod
    
    Signed-off-by: Paul Geraedts <p.f.j.geraedts at gmail.com>
    (cherry picked from commit 8256d06933e7542ecdd427b6a0ef4e87bb37d3f4)
---
 .../linux/mediatek/base-files/lib/preinit/05_set_preinit_iface   | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index d45f20fe62..8cab27a232 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -10,6 +10,15 @@ set_preinit_iface() {
 		ip link set eth0 up
 		ifname=eth0
 		;;
+	xiaomi,mi-router-ax3000t|\
+	xiaomi,mi-router-ax3000t-ubootmod|\
+	xiaomi,mi-router-wr30u-stock|\
+	xiaomi,mi-router-wr30u-ubootmod|\
+	xiaomi,redmi-router-ax6000-stock|\
+	xiaomi,redmi-router-ax6000-ubootmod)
+		ip link set eth0 up
+		ifname=lan4
+		;;
 	*)
 		ip link set eth0 up
 		ifname=lan1



From lede-commits at lists.infradead.org  Thu May 23 12:59:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:59:24 -0400
Subject: [openwrt/openwrt]  mediatek: fix sysupgrade error for WR30U
In-Reply-To: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
References: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
Message-ID: <mailman.38057.1716494367.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/9f9b600cd615a56c0839a58a4641beb4a90fa9e9

commit 9f9b600cd615a56c0839a58a4641beb4a90fa9e9
Author: Hank Moretti <mchank9999 at gmail.com>
AuthorDate: Mon Aug 28 15:45:05 2023 +0000

    mediatek: fix sysupgrade error for WR30U
    
    The NMBM-Enabled layout did not use fit image,
    it just need default process. So it was been removed in platform.sh.
    
    It will fix sysupgrade error for xiaomi,mi-router-wr30u-112m-nmbm.
    
    Signed-off-by: Hank Moretti <mchank9999 at gmail.com>
    (cherry picked from commit 02214ab8dce59ee6b599f8dfdacb0297dc5dcc24)
---
 target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 3a508acfd9..693d5753a5 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -124,7 +124,6 @@ platform_do_upgrade() {
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
 	xiaomi,mi-router-ax3000t-ubootmod|\
-	xiaomi,mi-router-wr30u-112m-nmbm|\
 	xiaomi,mi-router-wr30u-ubootmod|\
 	xiaomi,redmi-router-ax6000-ubootmod)
 		CI_KERNPART="fit"



From lede-commits at lists.infradead.org  Thu May 23 12:59:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 15:59:22 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: add support for Xiaomi AX3000T
In-Reply-To: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
References: <171649436141.2124776.8525917151707610880@git-01.infra.openwrt.org>
Message-ID: <mailman.38058.1716494371.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/f11e6e221ea14e4d8e7261f58815b246828197b7

commit f11e6e221ea14e4d8e7261f58815b246828197b7
Author: Dim Fish <dimfish at gmail.com>
AuthorDate: Mon Nov 27 12:01:34 2023 +0300

    mediatek: filogic: add support for Xiaomi AX3000T
    
      **SoC**: MediaTek MT7981B 2x A53
      **Flash**: ESMT F50L1G41LB 128MB
      **RAM**: NT52B128M16JR-FL 256MB
      **Ethernet**: 4x 10/100/1000 Mbps
      **Switch**: MediaTek MT7531AE
      **WiFi**: MediaTek MT7976C
      **Buttons**: Reset, Mesh
      **Power**: DC 12V 1A
    
    1. Get ssh access. Supported stock firmware **1.0.47**
       ```
       curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20set%20ssh_en%3D1%0A"
       curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20commit%0A"
       curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Ased%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%22debug%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear%0A"
       curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A"
       curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=********/api/misystem/arn_switch" -d "open=1&model=1&level=%0Apasswd%20-d%20root%0A
       ```
    
    2. Backup stock partitions
       ```
       nanddump -f /tmp/BL2.bin /dev/mtd1
       nanddump -f /tmp/Nvram.bin /dev/mtd2
       nanddump -f /tmp/Bdata.bin /dev/mtd3
       nanddump -f /tmp/Factory.bin /dev/mtd4
       nanddump -f /tmp/FIP.bin /dev/mtd5
       nanddump -f /tmp/ubi.bin /dev/mtd8
       nanddump -f /tmp/KF.bin /dev/mtd12
       ```
       Then transfer them to your computer in a safe place.
    
    3. Get firmware information `cat /proc/cmdline`
    
    4. Copy openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi to **/tmp** and flash
       If **firmware=0**
       ```
       ubiformat /dev/mtd9 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
       nvram set boot_wait=on
       nvram set uart_en=1
       nvram set flag_boot_rootfs=1
       nvram set flag_last_success=1
       nvram set flag_boot_success=1
       nvram set flag_try_sys1_failed=0
       nvram set flag_try_sys2_failed=0
       nvram commit
       reboot
       ```
       If **firmware=1**
       ```
       ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
       nvram set boot_wait=on
       nvram set uart_en=1
       nvram set flag_boot_rootfs=0
       nvram set flag_last_success=0
       nvram set flag_boot_success=1
       nvram set flag_try_sys1_failed=0
       nvram set flag_try_sys2_failed=0
       nvram commit
       reboot
       ```
    
       Then reboot your router, it should boot to the OpenWrt initramfs system now.
    
    5. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin
       `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin`
    
    1. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
       `ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`
    
       `reboot`
    
    2. Install kmod-mtd-rw
       `opkg update && opkg install kmod-mtd-rw`
    
       `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`
    
    3. Format ubi and create new ubootenv volume
       ```
       ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
       ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
       ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
       ```
    
    4. *(Optional **-10Mb** free space) Add recovery boot feature.*
       ```
       ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
       ubiupdatevol /dev/ubi0_2 /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
       ```
    
    5. Flash Openwrt U-Boot
       ```
       mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-preloader.bin BL2
       mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-bl31-uboot.fip FIP
       ```
    
    6. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb
       `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb`
    
    1. Force flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
       `sysupgrade -F -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`
    
    2. Format ubi and Nvram
       ```
       ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
       mtd erase Nvram
       ```
    
    3. Install kmod-mtd-rw
       `opkg update && opkg install kmod-mtd-rw`
    
       `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`
    
    4. Flash stock images from backup
       ```
       mtd write /tmp/BL2.bin BL2
       mtd write /tmp/FIP.bin FIP
       mtd write /tmp/ubi.bin ubi
       ```
       Then reboot your router, waiting it finished rollback in minutes.
    
       `ubiformat /dev/mtd7 -y -f /tmp/ubi.bin`
       Then reboot your router, waiting it finished rollback in minutes.
    
    Signed-off-by: Dim Fish <dimfish at gmail.com>
    (cherry picked from commit 7dbcc1215a56cc1da68c81bf92d7efa174c5e051)
---
 package/boot/uboot-envtools/files/mediatek_filogic |   2 +
 package/boot/uboot-mediatek/Makefile               |  13 +
 .../patches/440-add-xiaomi_mi-router-ax3000t.patch | 414 +++++++++++++++++++++
 .../mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts  |  16 +
 .../dts/mt7981b-xiaomi-mi-router-ax3000t.dts       |  34 ++
 .../dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi      |  29 ++
 ...u.dtsi => mt7981b-xiaomi-mi-router-common.dtsi} |  70 ++--
 .../dts/mt7981b-xiaomi-mi-router-wr30u.dtsi        | 252 +------------
 .../filogic/base-files/etc/board.d/01_leds         |   2 +-
 .../filogic/base-files/etc/board.d/02_network      |   4 +
 .../filogic/base-files/lib/upgrade/platform.sh     |   4 +
 target/linux/mediatek/image/filogic.mk             |  45 +++
 12 files changed, 608 insertions(+), 277 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 3551ab9c7d..65a17bde0e 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -77,6 +77,7 @@ zbtlink,zbt-z8102ax)
 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)
@@ -89,6 +90,7 @@ qihoo,360t7|\
 tplink,tl-xdr4288|\
 tplink,tl-xdr6086|\
 tplink,tl-xdr6088|\
+xiaomi,mi-router-ax3000t-ubootmod|\
 xiaomi,mi-router-wr30u-ubootmod|\
 xiaomi,redmi-router-ax6000-ubootmod)
 	. /lib/upgrade/nand.sh
diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile
index d0e59d1017..7fdad5c744 100644
--- a/package/boot/uboot-mediatek/Makefile
+++ b/package/boot/uboot-mediatek/Makefile
@@ -320,6 +320,18 @@ define U-Boot/mt7981_qihoo_360t7
   DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
 endef
 
+define U-Boot/mt7981_xiaomi_mi-router-ax3000t
+  NAME:=Xiaomi Router AX3000T
+  BUILD_SUBTARGET:=filogic
+  BUILD_DEVICES:=xiaomi_mi-router-ax3000t-ubootmod
+  UBOOT_CONFIG:=mt7981_xiaomi_mi-router-ax3000t
+  UBOOT_IMAGE:=u-boot.fip
+  BL2_BOOTDEV:=spim-nand
+  BL2_SOC:=mt7981
+  BL2_DDRTYPE:=ddr3
+  DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
+endef
+
 define U-Boot/mt7981_xiaomi_mi-router-wr30u
   NAME:=Xiaomi Router WR30U
   BUILD_SUBTARGET:=filogic
@@ -554,6 +566,7 @@ UBOOT_TARGETS := \
 	mt7981_rfb-sd \
 	mt7981_rfb-snfi \
 	mt7981_qihoo_360t7 \
+	mt7981_xiaomi_mi-router-ax3000t \
 	mt7981_xiaomi_mi-router-wr30u \
 	mt7986_bananapi_bpi-r3-emmc \
 	mt7986_bananapi_bpi-r3-sdmmc \
diff --git a/package/boot/uboot-mediatek/patches/440-add-xiaomi_mi-router-ax3000t.patch b/package/boot/uboot-mediatek/patches/440-add-xiaomi_mi-router-ax3000t.patch
new file mode 100644
index 0000000000..9b50166a94
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/440-add-xiaomi_mi-router-ax3000t.patch
@@ -0,0 +1,414 @@
+--- /dev/null
++++ b/configs/mt7981_xiaomi_mi-router-ax3000t_defconfig
+@@ -0,0 +1,163 @@
++CONFIG_ARM=y
++CONFIG_POSITION_INDEPENDENT=y
++CONFIG_ARCH_MEDIATEK=y
++CONFIG_TARGET_MT7981=y
++CONFIG_TEXT_BASE=0x41e00000
++CONFIG_SYS_MALLOC_F_LEN=0x4000
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_NR_DRAM_BANKS=1
++CONFIG_DEFAULT_DEVICE_TREE="mt7981_xiaomi_mi-router-ax3000t"
++CONFIG_DEFAULT_ENV_FILE="xiaomi_mi-router-ax3000t_env"
++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981_xiaomi_mi-router-ax3000t.dtb"
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_DEBUG_UART_BASE=0x11002000
++CONFIG_DEBUG_UART_CLOCK=40000000
++CONFIG_DEBUG_UART=y
++CONFIG_SYS_LOAD_ADDR=0x46000000
++CONFIG_SMBIOS_PRODUCT_NAME=""
++CONFIG_AUTOBOOT_KEYED=y
++CONFIG_BOOTDELAY=30
++CONFIG_AUTOBOOT_MENU_SHOW=y
++CONFIG_CFB_CONSOLE_ANSI=y
++CONFIG_BOARD_LATE_INIT=y
++CONFIG_BUTTON=y
++CONFIG_BUTTON_GPIO=y
++CONFIG_GPIO_HOG=y
++CONFIG_CMD_ENV_FLAGS=y
++CONFIG_FIT=y
++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
++CONFIG_LED=y
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++CONFIG_LOGLEVEL=7
++CONFIG_LOG=y
++CONFIG_SYS_PROMPT="MT7981> "
++CONFIG_CMD_BOOTMENU=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_CPU=y
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_DM=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ENV_READMEM=y
++CONFIG_CMD_ERASEENV=y
++# CONFIG_CMD_EXT4 is not set
++# CONFIG_CMD_FAT is not set
++CONFIG_CMD_FDT=y
++# CONFIG_CMD_FS_GENERIC is not set
++# CONFIG_CMD_FS_UUID is not set
++CONFIG_CMD_GPIO=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_HASH=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_LED=y
++CONFIG_CMD_LICENSE=y
++CONFIG_CMD_LINK_LOCAL=y
++# CONFIG_CMD_MBR is not set
++CONFIG_CMD_MTD=y
++# CONFIG_CMD_PCI is not set
++CONFIG_CMD_PSTORE=y
++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
++CONFIG_CMD_SF_TEST=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_PXE=y
++# CONFIG_CMD_PWM is not set
++CONFIG_CMD_SMC=y
++CONFIG_CMD_TFTPBOOT=y
++CONFIG_CMD_TFTPSRV=y
++CONFIG_CMD_UBI=y
++CONFIG_CMD_UBI_RENAME=y
++CONFIG_CMD_UBIFS=y
++CONFIG_CMD_ASKENV=y
++CONFIG_CMD_PART=y
++CONFIG_CMD_RARP=y
++CONFIG_CMD_SETEXPR=y
++CONFIG_CMD_SLEEP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_STRINGS=y
++# CONFIG_CMD_USB is not set
++# CONFIG_CMD_FLASH is not set
++CONFIG_CMD_UUID=y
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DM_MTD=y
++CONFIG_DM_REGULATOR=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_DM_REGULATOR_GPIO=y
++# CONFIG_DM_USB is not set
++# CONFIG_DM_PWM is not set
++# CONFIG_PWM_MTK is not set
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_VERSION_VARIABLE=y
++CONFIG_PARTITION_UUIDS=y
++CONFIG_NETCONSOLE=y
++CONFIG_REGMAP=y
++CONFIG_SYSCON=y
++CONFIG_CLK=y
++CONFIG_DM_GPIO=y
++# CONFIG_DM_SCSI is not set
++# CONFIG_AHCI is not set
++CONFIG_PHY=y
++# CONFIG_PHY_MTK_TPHY is not set
++CONFIG_PHY_FIXED=y
++CONFIG_MTK_AHCI=y
++CONFIG_DM_ETH=y
++CONFIG_MEDIATEK_ETH=y
++# CONFIG_PCI is not set
++# CONFIG_MMC is not set
++# CONFIG_DM_MMC is not set
++CONFIG_MTD=y
++CONFIG_MTD_UBI_FASTMAP=y
++# CONFIG_DM_PCI is not set
++# CONFIG_PCIE_MEDIATEK is not set
++CONFIG_PINCTRL=y
++CONFIG_PINCONF=y
++CONFIG_PINCTRL_MT7981=y
++CONFIG_POWER_DOMAIN=y
++CONFIG_PRE_CONSOLE_BUFFER=y
++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
++CONFIG_MTK_POWER_DOMAIN=y
++CONFIG_RAM=y
++CONFIG_DM_SERIAL=y
++CONFIG_MTK_SERIAL=y
++CONFIG_SPI=y
++CONFIG_DM_SPI=y
++CONFIG_MTK_SPI_NAND=y
++CONFIG_MTK_SPI_NAND_MTD=y
++CONFIG_SYSRESET_WATCHDOG=y
++CONFIG_WDT_MTK=y
++CONFIG_LZO=y
++CONFIG_ZSTD=y
++CONFIG_HEXDUMP=y
++CONFIG_RANDOM_UUID=y
++CONFIG_REGEX=y
++# CONFIG_USB is not set
++# CONFIG_USB_HOST is not set
++# CONFIG_USB_XHCI_HCD is not set
++# CONFIG_USB_XHCI_MTK is not set
++# CONFIG_USB_STORAGE is not set
++CONFIG_OF_EMBED=y
++CONFIG_ENV_OVERWRITE=y
++CONFIG_ENV_IS_IN_UBI=y
++CONFIG_ENV_UBI_PART="ubi"
++CONFIG_ENV_SIZE=0x1f000
++CONFIG_ENV_SIZE_REDUND=0x1f000
++CONFIG_ENV_UBI_VOLUME="ubootenv"
++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
++CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_MTD_SPI_NAND=y
++CONFIG_MTK_SPIM=y
++CONFIG_CMD_NAND=y
++CONFIG_CMD_NAND_TRIMFFS=y
++CONFIG_LMB_MAX_REGIONS=64
++CONFIG_USE_IPADDR=y
++CONFIG_IPADDR="192.168.1.1"
++CONFIG_USE_SERVERIP=y
++CONFIG_SERVERIP="192.168.1.254"
+--- /dev/null
++++ b/arch/arm/dts/mt7981_xiaomi_mi-router-ax3000t.dts
+@@ -0,0 +1,187 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (c) 2022 MediaTek Inc.
++ * Author: Sam Shih <sam.shih at mediatek.com>
++ */
++
++/dts-v1/;
++#include "mt7981.dtsi"
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/linux-event-codes.h>
++
++/ {
++	#address-cells = <1>;
++	#size-cells = <1>;
++	model = "Xiaomi Router AX3000T";
++	compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
++
++	chosen {
++		stdout-path = &uart0;
++		tick-timer = &timer0;
++	};
++
++	memory at 40000000 {
++		device_type = "memory";
++		reg = <0x40000000 0x10000000>;
++	};
++
++	gpio-keys {
++		compatible = "gpio-keys";
++
++		reset {
++			label = "reset";
++			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
++			linux,code = <KEY_RESTART>;
++		};
++
++		mesh {
++			label = "mesh";
++			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
++			linux,code = <BTN_9>;
++			linux,input-type = <EV_SW>;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		led_status_blue {
++			label = "blue:status";
++			gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
++		};
++
++		led_status_yellow {
++			label = "yellow:status";
++			gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
++		};
++	};
++};
++
++&uart0 {
++	mediatek,force-highspeed;
++	status = "okay";
++};
++
++&eth {
++	status = "okay";
++	mediatek,gmac-id = <0>;
++	phy-mode = "2500base-x";
++	mediatek,switch = "mt7531";
++	reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
++
++	fixed-link {
++		speed = <2500>;
++		full-duplex;
++	};
++};
++
++&pinctrl {
++	spic_pins: spi1-pins-func-1 {
++		mux {
++			function = "spi";
++			groups = "spi1_1";
++		};
++	};
++
++	uart1_pins: spi1-pins-func-3 {
++		mux {
++			function = "uart";
++			groups = "uart1_2";
++		};
++	};
++
++	spi_flash_pins: spi0-pins-func-1 {
++		mux {
++			function = "flash";
++			groups = "spi0", "spi0_wp_hold";
++		};
++
++		conf-pu {
++			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
++		};
++
++		conf-pd {
++			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
++			drive-strength = <MTK_DRIVE_8mA>;
++			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
++		};
++	};
++};
++
++&spi0 {
++	#address-cells = <1>;
++	#size-cells = <0>;
++	pinctrl-names = "default";
++	pinctrl-0 = <&spi_flash_pins>;
++	status = "okay";
++	must_tx;
++	enhance_timing;
++	dma_ext;
++	ipm_design;
++	support_quad;
++	tick_dly = <2>;
++	sample_sel = <0>;
++
++	spi_nand at 0 {
++		compatible = "spi-nand";
++		reg = <0>;
++		spi-max-frequency = <52000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition at 0 {
++				label = "bl2";
++				reg = <0x00 0x100000>;
++			};
++
++			partition at 100000 {
++				label = "Nvram";
++				reg = <0x100000 0x40000>;
++			};
++
++			partition at 140000 {
++				label = "Bdata";
++				reg = <0x140000 0x40000>;
++			};
++
++			partition at 180000 {
++				label = "factory";
++				reg = <0x180000 0x200000>;
++			};
++
++			partition at 380000 {
++				label = "fip";
++				reg = <0x380000 0x200000>;
++			};
++
++			partition at 580000 {
++				label = "crash";
++				reg = <0x580000 0x40000>;
++			};
++
++			partition at 5c0000 {
++				label = "crash_log";
++				reg = <0x5c0000 0x40000>;
++			};
++
++			partition at 600000 {
++				label = "ubi";
++				reg = <0x600000 0x7000000>;
++			};
++
++			partition at 7600000 {
++				label = "KF";
++				reg = <0x7600000 0x40000>;
++			};
++		};
++	};
++};
++
++&watchdog {
++	status = "disabled";
++};
+--- /dev/null
++++ b/xiaomi_mi-router-ax3000t_env
+@@ -0,0 +1,55 @@
++ipaddr=192.168.1.1
++serverip=192.168.1.254
++loadaddr=0x46000000
++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
++bootargs=console=ttyS0,115200n8 console_msg_format=syslog
++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
++bootconf=config-1
++bootdelay=0
++bootfile=openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
++bootfile_bl2=openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-preloader.bin
++bootfile_fip=openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-bl31-uboot.fip
++bootfile_upg=openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb
++bootled_pwr=yellow:status
++bootled_rec=blue:status
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
++bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
++bootmenu_8=Reboot.=reset
++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
++boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
++mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
++mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format
++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts
new file mode 100644
index 0000000000..809e625ce1
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t-ubootmod.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-ax3000t.dtsi"
+
+/ {
+	model = "Xiaomi Mi Router AX3000T (OpenWrt U-Boot layout)";
+	compatible = "xiaomi,mi-router-ax3000t-ubootmod", "mediatek,mt7981";
+};
+
+&partitions {
+	partition at 600000 {
+		label = "ubi";
+		reg = <0x600000 0x7000000>;
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts
new file mode 100644
index 0000000000..cc0d44fdf5
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-ax3000t.dtsi"
+
+/ {
+	model = "Xiaomi Mi Router AX3000T";
+	compatible = "xiaomi,mi-router-ax3000t", "mediatek,mt7981";
+};
+
+&spi_nand {
+	mediatek,nmbm;
+	mediatek,bmt-max-ratio = <1>;
+	mediatek,bmt-max-reserved-blocks = <64>;
+};
+
+&partitions {
+	// ubi_kernel is the ubi partition in stock.
+	partition at 600000 {
+		label = "ubi_kernel";
+		reg = <0x600000 0x2200000>;
+	};
+
+	/* ubi is the result of squashing
+	 * consecutive stock partitions:
+	 * - ubi1
+	 * - overlay
+	 * - data
+	 */
+	partition at 2800000 {
+		label = "ubi";
+		reg = <0x2800000 0x4e00000>;
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi
new file mode 100644
index 0000000000..7b6fde8465
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dtsi
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include "mt7981b-xiaomi-mi-router-common.dtsi"
+
+&gmac0 {
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_factory_4 (-2)>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c_pins>;
+	status = "okay";
+
+	nfc at 57 {
+		compatible = "nt082c";
+		reg = <0x57>;
+	};
+};
+
+&pio {
+	i2c_pins: i2c-pins {
+		mux {
+			function = "i2c";
+			groups = "i2c0_1";
+		};
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
similarity index 80%
copy from target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
copy to target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
index d09ae2a3e7..d6872395a9 100644
--- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
@@ -9,10 +9,10 @@
 / {
 	aliases {
 		serial0 = &uart0;
-		led-boot = &led_system_yellow;
-		led-failsafe = &led_system_yellow;
-		led-running = &led_system_blue;
-		led-upgrade = &led_system_yellow;
+		led-boot = &led_status_yellow;
+		led-failsafe = &led_status_yellow;
+		led-running = &led_status_blue;
+		led-upgrade = &led_status_yellow;
 	};
 
 	chosen {
@@ -26,42 +26,34 @@
 	gpio-keys {
 		compatible = "gpio-keys";
 
-		reset {
-			label = "reset";
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-
-		mesh {
+		button-mesh {
 			label = "mesh";
 			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
 			linux,code = <BTN_9>;
 			linux,input-type = <EV_SW>;
 		};
+
+		button-reset {
+			label = "reset";
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
 	};
 
-	leds {
+	leds: leds {
 		compatible = "gpio-leds";
 
-		led_system_blue: system_blue {
-			label = "blue:system";
+		led_status_blue: led-status-blue {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
 			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
 		};
 
-		led_system_yellow: system_yellow {
-			label = "yellow:system";
+		led_status_yellow: led-status-yellow {
+			color = <LED_COLOR_ID_YELLOW>;
+			function = LED_FUNCTION_STATUS;
 			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
 		};
-
-		led_network_blue {
-			label = "blue:network";
-			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
-		};
-
-		led_network_yellow {
-			label = "yellow:network";
-			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
-		};
 	};
 };
 
@@ -73,10 +65,6 @@
 		reg = <0>;
 		phy-mode = "2500base-x";
 
-		nvmem-cells = <&macaddr_factory_4>;
-		nvmem-cell-names = "mac-address";
-		mac-address-increment = <(-1)>;
-
 		fixed-link {
 			speed = <2500>;
 			full-duplex;
@@ -177,12 +165,20 @@
 				reg = <0x180000 0x200000>;
 				read-only;
 
-				compatible = "nvmem-cells";
-				#address-cells = <1>;
-				#size-cells = <1>;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
 
-				macaddr_factory_4: macaddr at 4 {
-					reg = <0x4 0x6>;
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x4 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
 				};
 			};
 
@@ -236,8 +232,8 @@
 
 &wifi {
 	status = "okay";
-
-	mediatek,mtd-eeprom = <&factory 0x0>;
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
 };
 
 &uart0 {
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
index d09ae2a3e7..87a2493a23 100644
--- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-wr30u.dtsi
@@ -1,249 +1,23 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 /dts-v1/;
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/gpio/gpio.h>
+#include "mt7981b-xiaomi-mi-router-common.dtsi"
 
-#include "mt7981.dtsi"
-
-/ {
-	aliases {
-		serial0 = &uart0;
-		led-boot = &led_system_yellow;
-		led-failsafe = &led_system_yellow;
-		led-running = &led_system_blue;
-		led-upgrade = &led_system_yellow;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	memory {
-		reg = <0 0x40000000 0 0x10000000>;
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-
-		reset {
-			label = "reset";
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-
-		mesh {
-			label = "mesh";
-			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-			linux,code = <BTN_9>;
-			linux,input-type = <EV_SW>;
-		};
-	};
-
-	leds {
-		compatible = "gpio-leds";
-
-		led_system_blue: system_blue {
-			label = "blue:system";
-			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
-		};
-
-		led_system_yellow: system_yellow {
-			label = "yellow:system";
-			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
-		};
-
-		led_network_blue {
-			label = "blue:network";
-			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
-		};
-
-		led_network_yellow {
-			label = "yellow:network";
-			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
-		};
-	};
-};
-
-&eth {
-	status = "okay";
-
-	gmac0: mac at 0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		phy-mode = "2500base-x";
-
-		nvmem-cells = <&macaddr_factory_4>;
-		nvmem-cell-names = "mac-address";
-		mac-address-increment = <(-1)>;
-
-		fixed-link {
-			speed = <2500>;
-			full-duplex;
-			pause;
-		};
-	};
+&gmac0 {
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_factory_4 (-1)>;
 };
 
-&mdio_bus {
-	switch: switch at 1f {
-		compatible = "mediatek,mt7531";
-		reg = <31>;
-		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
-		interrupt-controller;
-		#interrupt-cells = <1>;
-		interrupt-parent = <&pio>;
-		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+&leds {
+	led-wan-blue {
+		color = <LED_COLOR_ID_BLUE>;
+		function = LED_FUNCTION_WAN;
+		gpios = <&pio 11 GPIO_ACTIVE_LOW>;
 	};
-};
-
-&switch {
-	ports {
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		port at 0 {
-			reg = <0>;
-			label = "wan";
-		};
-
-		port at 1 {
-			reg = <1>;
-			label = "lan2";
-		};
-
-		port at 2 {
-			reg = <2>;
-			label = "lan3";
-		};
-
-		port at 3 {
-			reg = <3>;
-			label = "lan4";
-		};
-
-		port at 6 {
-			reg = <6>;
-			ethernet = <&gmac0>;
-			phy-mode = "2500base-x";
 
-			fixed-link {
-				speed = <2500>;
-				full-duplex;
-				pause;
-			};
-		};
+	led-wan-yellow {
+		color = <LED_COLOR_ID_YELLOW>;
+		function = LED_FUNCTION_WAN;
+		gpios = <&pio 12 GPIO_ACTIVE_LOW>;
 	};
 };
-
-&spi0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&spi0_flash_pins>;
-	status = "okay";
-
-	spi_nand: flash at 0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
-		compatible = "spi-nand";
-		reg = <0>;
-
-		spi-max-frequency = <52000000>;
-		spi-tx-bus-width = <4>;
-		spi-rx-bus-width = <4>;
-
-		partitions: partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "BL2";
-				reg = <0x00 0x100000>;
-				read-only;
-			};
-
-			partition at 100000 {
-				label = "Nvram";
-				reg = <0x100000 0x40000>;
-			};
-
-			partition at 140000 {
-				label = "Bdata";
-				reg = <0x140000 0x40000>;
-			};
-
-			factory: partition at 180000 {
-				label = "Factory";
-				reg = <0x180000 0x200000>;
-				read-only;
-
-				compatible = "nvmem-cells";
-				#address-cells = <1>;
-				#size-cells = <1>;
-
-				macaddr_factory_4: macaddr at 4 {
-					reg = <0x4 0x6>;
-				};
-			};
-
-			partition at 380000 {
-				label = "FIP";
-				reg = <0x380000 0x200000>;
-				read-only;
-			};
-
-			partition at 580000 {
-				label = "crash";
-				reg = <0x580000 0x40000>;
-				read-only;
-			};
-
-			partition at 5c0000 {
-				label = "crash_log";
-				reg = <0x5c0000 0x40000>;
-				read-only;
-			};
-
-			partition at 7600000 {
-				label = "KF";
-				reg = <0x7600000 0x40000>;
-				read-only;
-			};
-		};
-	};
-};
-
-&pio {
-	spi0_flash_pins: spi0-pins {
-		mux {
-			function = "spi";
-			groups = "spi0", "spi0_wp_hold";
-		};
-
-		conf-pu {
-			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
-		};
-
-		conf-pd {
-			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
-		};
-	};
-};
-
-&wifi {
-	status = "okay";
-
-	mediatek,mtd-eeprom = <&factory 0x0>;
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
-};
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 96793e39cd..1633006998 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
@@ -39,7 +39,7 @@ routerich,ax3000)
 xiaomi,mi-router-wr30u-112m-nmbm|\
 xiaomi,mi-router-wr30u-stock|\
 xiaomi,mi-router-wr30u-ubootmod)
-	ucidef_set_led_netdev "wan" "wan" "blue:network" "wan"
+	ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx"
 	;;
 xiaomi,redmi-router-ax6000-stock|\
 xiaomi,redmi-router-ax6000-ubootmod)
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 8843f05682..687a5b3f8d 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
@@ -68,6 +68,8 @@ mediatek_setup_interfaces()
 	tplink,tl-xdr6086)
 		ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
 		;;
+	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|\
@@ -141,6 +143,8 @@ mediatek_setup_macs()
 		wan_mac=$(macaddr_add "$lan_mac" 1)
 		label_mac=$wan_mac
 		;;
+	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|\
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index aae78647d0..3a508acfd9 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -49,6 +49,7 @@ xiaomi_initial_setup()
 
 	local board=$(board_name)
 	case "$board" in
+	xiaomi,mi-router-ax3000t|\
 	xiaomi,mi-router-wr30u-stock)
 		fw_setenv mtdparts "nmbm0:1024k(bl2),256k(Nvram),256k(Bdata),2048k(factory),2048k(fip),256k(crash),256k(crash_log),34816k(ubi),34816k(ubi1),32768k(overlay),12288k(data),256k(KF)"
 		;;
@@ -122,6 +123,7 @@ platform_do_upgrade() {
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
+	xiaomi,mi-router-ax3000t-ubootmod|\
 	xiaomi,mi-router-wr30u-112m-nmbm|\
 	xiaomi,mi-router-wr30u-ubootmod|\
 	xiaomi,redmi-router-ax6000-ubootmod)
@@ -137,6 +139,7 @@ platform_do_upgrade() {
 		EMMC_ROOT_DEV="$(cmdline_get_var root)"
 		emmc_do_upgrade "$1"
 		;;
+	xiaomi,mi-router-ax3000t|\
 	xiaomi,mi-router-wr30u-stock|\
 	xiaomi,redmi-router-ax6000-stock)
 		CI_KERN_UBIPART=ubi_kernel
@@ -223,6 +226,7 @@ platform_pre_upgrade() {
 	asus,tuf-ax6000)
 		asus_initial_setup
 		;;
+	xiaomi,mi-router-ax3000t|\
 	xiaomi,mi-router-wr30u-stock|\
 	xiaomi,redmi-router-ax6000-stock)
 		xiaomi_initial_setup
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 3a8f67dcad..1a8f0b3745 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -716,6 +716,51 @@ define Device/unielec_u7981-01-nand
 endef
 TARGET_DEVICES += unielec_u7981-01-nand
 
+define Device/xiaomi_mi-router-ax3000t
+  DEVICE_VENDOR := Xiaomi
+  DEVICE_MODEL := Mi Router AX3000T
+  DEVICE_DTS := mt7981b-xiaomi-mi-router-ax3000t
+  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-ax3000t
+
+define Device/xiaomi_mi-router-ax3000t-ubootmod
+  DEVICE_VENDOR := Xiaomi
+  DEVICE_MODEL := Mi Router AX3000T (OpenWrt U-Boot layout)
+  DEVICE_DTS := mt7981b-xiaomi-mi-router-ax3000t-ubootmod
+  DEVICE_DTS_DIR := ../dts
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
+  KERNEL_IN_UBI := 1
+  UBOOTENV_IN_UBI := 1
+  IMAGES := sysupgrade.itb
+  KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+  KERNEL := kernel-bin | gzip
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+        fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  IMAGE/sysupgrade.itb := append-kernel | \
+        fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
+  ARTIFACTS := preloader.bin bl31-uboot.fip
+  ARTIFACT/preloader.bin := mt7981-bl2 spim-nand-ddr3
+  ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot xiaomi_mi-router-ax3000t
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+  ARTIFACTS += initramfs-factory.ubi
+  ARTIFACT/initramfs-factory.ubi := append-image-stage initramfs-recovery.itb | ubinize-kernel
+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)



From lede-commits at lists.infradead.org  Thu May 23 13:04:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:04:21 -0400
Subject: [openwrt/openwrt]  mediatek: add support for Cudy TR3000 v1
In-Reply-To: <171649466154.2139830.14041740247043127817@git-01.infra.openwrt.org>
References: <171649466154.2139830.14041740247043127817@git-01.infra.openwrt.org>
Message-ID: <mailman.38061.1716494666.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ed3a80d088b6a41cb1d9d4ee257c20f412ef709f

commit ed3a80d088b6a41cb1d9d4ee257c20f412ef709f
Author: Luis Mita <luis at luismita.com>
AuthorDate: Tue May 7 11:48:37 2024 -0400

    mediatek: add support for Cudy TR3000 v1
    
    Hardware:
     - SoC: MediaTek MT7981B
     - CPU: 2x 1.3 GHz Cortex-A53
     - Flash: 128 MiB SPI NAND
     - RAM: 512 MiB
     - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
     - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
     - USB 3.0 port
     - Buttons: 1 Reset button, 1 slider button
     - LEDs: 1x Red, 1x White
     - Serial console: internal test points, 115200 8n1
     - Power: 5 VDC, 3 A
    
    MAC addresses:
    +---------+-------------------+-----------+
    |         | MAC               | Algorithm |
    +---------+-------------------+-----------+
    | WAN     | 80:af:ca:xx:xx:x1 | label+1   |
    | LAN     | 80:af:ca:xx:xx:x0 | label     |
    | WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
    | WLAN 5g | 82:af:ca:xx:xx:x0 |           |
    +---------+-------------------+-----------+
    
    Installation:
    The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below.
    
    To install using TFTP:
    1. Connect to UART.
    2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
    3. A u-boot shell will automatically open.
    4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
    5. Run these steps in u-boot using the name of your file.
    
    setenv bootfile initramfs-kernel.bin
    tftpboot
    bootm
    
    6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off.
    
    Signed-off-by: Luis Mita <luis at luismita.com>
    (cherry picked from commit 63b8d98dd0d2f7797ea5b5f25978590982bbbb5d)
---
 .../base-files/lib/preinit/05_set_preinit_iface    |   1 +
 .../linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts  | 232 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/02_network      |   1 +
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   1 +
 target/linux/mediatek/image/filogic.mk             |  17 ++
 5 files changed, 252 insertions(+)

diff --git a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
index 8cab27a232..bd0ed33582 100644
--- a/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
+++ b/target/linux/mediatek/base-files/lib/preinit/05_set_preinit_iface
@@ -1,5 +1,6 @@
 set_preinit_iface() {
 	case $(board_name) in
+	cudy,tr3000-v1|\
 	glinet,gl-mt3000)
 		ip link set eth1 up
 		ifname=eth1
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts
new file mode 100644
index 0000000000..2d18af860e
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-cudy-tr3000-v1.dts
@@ -0,0 +1,232 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "Cudy TR3000 v1";
+	compatible = "cudy,tr3000-v1", "mediatek,mt7981-spim-snand-rfb";
+
+	aliases {
+		label-mac-device = &gmac1;
+		led-boot = &led_status;
+		led-failsafe = &led_status;
+		led-running = &led_status;
+		led-upgrade = &led_status;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		mode {
+			label = "mode";
+			linux,input-type = <EV_SW>;
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status: led_0 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		led_1 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+	};
+
+	usb_vbus: regulator-usb {
+		compatible = "regulator-fixed";
+
+		regulator-name = "usb-vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+
+		gpio = <&pio 9 GPIO_ACTIVE_LOW>;
+		regulator-boot-on;
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+		phy-handle = <&phy1>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 1>;
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 0>;
+	};
+};
+
+&mdio_bus {
+	phy1: phy at 1 {
+		reg = <1>;
+		compatible = "ethernet-phy-ieee802.3-c45";
+		phy-mode = "2500base-x";
+		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+		interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
+		reset-assert-us = <100000>;
+		reset-deassert-us = <100000>;
+		realtek,aldps-enable;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+				read-only;
+			};
+
+			factory: partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x0200000>;
+				read-only;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "bdinfo";
+				reg = <0x380000 0x0040000>;
+				read-only;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_bdinfo_de00: macaddr at de00 {
+						compatible = "mac-base";
+						reg = <0xde00 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+
+			};
+
+			partition at 3C0000 {
+				label = "FIP";
+				reg = <0x3C0000 0x0200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x5C0000 0x4000000>;
+				compatible = "linux,ubi";
+			};
+		};
+	};
+};
+
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+	vbus-supply = <&usb_vbus>;
+};
+
+&wifi {
+	status = "okay";
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};
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 0eb27744e9..6885d5ff24 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
@@ -39,6 +39,7 @@ mediatek_setup_interfaces()
 	h3c,magic-nx30-pro)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" eth1
 		;;
+	cudy,tr3000-v1|\
 	glinet,gl-mt3000)
 		ucidef_set_interfaces_lan_wan eth1 eth0
 		;;
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 3441b41861..a3d8b387db 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -57,6 +57,7 @@ case "$board" in
 		esac
 		[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
 		;;
+	cudy,tr3000-v1|\
 	cudy,re3000-v1)
 		addr=$(mtd_get_mac_binary bdinfo 0xde00)
 		[ "$PHYNBR" = "0" ] && echo "$addr" > /sys${DEVPATH}/macaddress
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 872a5592f4..41de08f490 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -317,6 +317,23 @@ define Device/cudy_re3000-v1
 endef
 TARGET_DEVICES += cudy_re3000-v1
 
+define Device/cudy_tr3000-v1
+  DEVICE_VENDOR := Cudy
+  DEVICE_MODEL := TR3000
+  DEVICE_VARIANT := v1
+  DEVICE_DTS := mt7981b-cudy-tr3000-v1
+  DEVICE_DTS_DIR := ../dts
+  SUPPORTED_DEVICES += R47
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_IN_UBI := 1
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  DEVICE_PACKAGES := kmod-usb3 kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += cudy_tr3000-v1
+
 define Device/cudy_wr3000-v1
   DEVICE_VENDOR := Cudy
   DEVICE_MODEL := WR3000



From lede-commits at lists.infradead.org  Thu May 23 13:10:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:10:50 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.11.6
In-Reply-To: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
References: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
Message-ID: <mailman.38062.1716495054.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/6d6384fb45fc29054a0320e7523682f2654c6a33

commit 6d6384fb45fc29054a0320e7523682f2654c6a33
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Oct 12 06:23:02 2023 +0200

    libxml2: update to 2.11.6
    
    Release Notes:
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.11.5
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.11.6
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit 62277c485e79f6fe453a8a1bd54f271ae17c7490)
---
 package/libs/libxml2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index ed1965c019..b13e875de7 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.11.4
+PKG_VERSION:=2.11.6
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=737e1d7f8ab3f139729ca13a2494fd17bf30ddb4b7a427cf336252cab57f57f7
+PKG_HASH:=c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING



From lede-commits at lists.infradead.org  Thu May 23 13:10:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:10:53 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.12.4
In-Reply-To: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
References: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
Message-ID: <mailman.38063.1716495054.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ced6809554259bbb789e98f1e5e73b54fd70c216

commit ced6809554259bbb789e98f1e5e73b54fd70c216
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Jan 24 13:09:40 2024 +0100

    libxml2: update to 2.12.4
    
    Release Notes:
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.4
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit d82930c7c776d974e717ec958ca0c1019fea3b8f)
---
 package/libs/libxml2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index 9e70a0bd0a..030f7e45e8 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.12.3
+PKG_VERSION:=2.12.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa
+PKG_HASH:=497360e423cf0bd99eacdb7c6215dea92e6d6e89ee940393c2bae0e77cb9b7d0
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING



From lede-commits at lists.infradead.org  Thu May 23 13:10:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:10:54 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.12.5
In-Reply-To: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
References: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
Message-ID: <mailman.38064.1716495057.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/968d9430c687beada3eea768ed1bcd973d07f407

commit 968d9430c687beada3eea768ed1bcd973d07f407
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Mon Feb 12 23:48:46 2024 +0100

    libxml2: update to 2.12.5
    
    Release Notes:
    https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.5
    
    Fixes: CVE-2024-25062
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit c47b7571f0f874c746c5823f5e4d0f1b9b932697)
---
 package/libs/libxml2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index 030f7e45e8..86fa370771 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.12.4
+PKG_VERSION:=2.12.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=497360e423cf0bd99eacdb7c6215dea92e6d6e89ee940393c2bae0e77cb9b7d0
+PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING



From lede-commits at lists.infradead.org  Thu May 23 13:10:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:10:52 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.12.3
In-Reply-To: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
References: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
Message-ID: <mailman.38065.1716495060.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/6ea90db85736fb21b2c43bef69acbd0434282126

commit 6ea90db85736fb21b2c43bef69acbd0434282126
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Jan 4 00:30:57 2024 +0100

    libxml2: update to 2.12.3
    
    Release Notes:
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.2
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.3
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit 08ad3c963377ee853f87935929d33f19e5e34ef9)
---
 package/libs/libxml2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index d65085c9c1..9e70a0bd0a 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.12.1
+PKG_VERSION:=2.12.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb
+PKG_HASH:=8c8f1092340a89ff32bc44ad5c9693aff9bc8a7a3e161bb239666e5d15ac9aaa
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING



From lede-commits at lists.infradead.org  Thu May 23 13:10:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:10:51 -0400
Subject: [openwrt/openwrt]  libxml2: update to 2.12.1
In-Reply-To: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
References: <171649505017.2153355.12024953231217355609@git-01.infra.openwrt.org>
Message-ID: <mailman.38066.1716495060.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a8a8fbcaffe7d7d795c32ee4105c5528eb2a2778

commit a8a8fbcaffe7d7d795c32ee4105c5528eb2a2778
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Mon Dec 4 17:03:21 2023 +0100

    libxml2: update to 2.12.1
    
    Release Notes:
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.0
    - https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.1
    
    Remove patch:
    - 010-iconv.patch
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit 2963e1687bcc6b54737f8fd519726eb45c17abb9)
---
 package/libs/libxml2/Makefile                |  4 ++--
 package/libs/libxml2/patches/010-iconv.patch | 12 ------------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index b13e875de7..d65085c9c1 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libxml2
-PKG_VERSION:=2.11.6
+PKG_VERSION:=2.12.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNOME/libxml2/$(basename $(PKG_VERSION))
-PKG_HASH:=c90eee7506764abbe07bb616b82da452529609815aefef423d66ef080eb0c300
+PKG_HASH:=8982b9ccdf7f456e30d8f7012d50858c6623e495333b6191def455c7e95427eb
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
diff --git a/package/libs/libxml2/patches/010-iconv.patch b/package/libs/libxml2/patches/010-iconv.patch
deleted file mode 100644
index 92b09685c5..0000000000
--- a/package/libs/libxml2/patches/010-iconv.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -469,6 +469,9 @@ if(LIBXML2_WITH_PROGRAMS)
- 		add_executable(LibXml2::${PROGRAM} ALIAS ${PROGRAM})
- 		target_compile_definitions(${PROGRAM} PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
- 		target_link_libraries(${PROGRAM} LibXml2)
-+		if(LIBXML2_WITH_ICONV AND NOT Iconv_IS_BUILT_IN)
-+			target_link_libraries(${PROGRAM} iconv)
-+		endif()
- 		if(HAVE_LIBHISTORY)
- 			target_link_libraries(${PROGRAM} history)
- 		endif()



From lede-commits at lists.infradead.org  Thu May 23 13:18:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:18:56 -0400
Subject: [openwrt/openwrt]  ipq806x: rt4230w-rev6: fix status reporting via
 the LEDs
In-Reply-To: <171649553678.2167487.12081094776942432214@git-01.infra.openwrt.org>
References: <171649553678.2167487.12081094776942432214@git-01.infra.openwrt.org>
Message-ID: <mailman.38069.1716495541.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/08becaf62f4232f6bc60d899271529d66300d6ae

commit 08becaf62f4232f6bc60d899271529d66300d6ae
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Fri May 10 03:35:43 2024 -0300

    ipq806x: rt4230w-rev6: fix status reporting via the LEDs
    
    There is a custom LED controller between the 3 SoC GPIO outputs and
    the red and blue LEDs of the device. It implements a strange mapping
    that includes fixed, flashing, and breathing modes.
    
    The current DTS configuration causes OpenWrt to flash the LEDs over
    the controller's own flashing, resulting in chaotic output in boot,
    failsafe, and upgrade modes.
    
    This change fixes the LEDs in the best way possible as long as each
    OpenWrt running state is limited to be signaled by a single led.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15440
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 0868268c9fd4397411e9629eedda35b1547e798e)
---
 .../files-5.15/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts     | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
index 8d9601b632..77bb7a5cd5 100644
--- a/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
+++ b/target/linux/ipq806x/files-5.15/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
@@ -13,10 +13,10 @@
 	};
 
 	aliases {
-		led-boot = &ledctrl3;
+		led-boot = &ledctrl1;
 		led-failsafe = &ledctrl1;
-		led-running = &ledctrl2;
-		led-upgrade = &ledctrl3;
+		led-running = &ledctrl3;
+		led-upgrade = &ledctrl1;
 	};
 
 	chosen {
@@ -54,6 +54,7 @@
 		ledctrl2: ledctrl2 {
 			label = "ledctrl2";
 			gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "default-on";
 		};
 
 		ledctrl3: ledctrl3 {



From lede-commits at lists.infradead.org  Thu May 23 13:47:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:47:41 -0400
Subject: [openwrt/openwrt]  ramips: add support for TP-Link Archer MR200v5
In-Reply-To: <171649726174.2228530.16177765045243580334@git-01.infra.openwrt.org>
References: <171649726174.2228530.16177765045243580334@git-01.infra.openwrt.org>
Message-ID: <mailman.38072.1716497269.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2a2f53415ed8ed79778edb8135bdbb5e819e587b

commit 2a2f53415ed8ed79778edb8135bdbb5e819e587b
Author: Lea Teuberth <lea.teuberth at outlook.com>
AuthorDate: Tue Apr 2 11:30:32 2024 +0200

    ramips: add support for TP-Link Archer MR200v5
    
    Specifications:
            CPU:     MT7628AN 580MHz
            RAM:     64MB DDR2
            FLASH:   8MB EN25QH64 NOR SPI
            WIFI:    2.4GHz 2x2 MT7628 b/g/n internal
            WIFI:    5GHz 1x1 MT7610E ac/n PCI
            LTE:     Qualcomm MDM9207
            ETH:     4xLAN 100base-T integrated
            SWITCH:  RT3050-ESW Port 0,1,2,3: LAN, Port 6: CPU
            LEDS:    LAN, WAN, Power, 3x signal strength, WiFi
            BTNS:    Reset, WiFi toggle
            UART:    Near ETH ports, Vcc-GND-RX-TX, 115200, 8N1
    
    Installation:
            1. Update using recovery mode
            - set your IP to 192.168.0.225, subnet mask: 255.255.255.0
            - start tftp server, rename tftp-recovery.bin to
              tp_recovery.bin and place it into the server's directory
            - while holdig the "reset" button, power on the device
            - keep holding "reset" until the file is being transferred
    
    Notes:
            This board has only one MAC address programmed
            in the "romfile" partition:
            - MAC for phy0 (2.4GHz) at romfile 0xf100 (0)
            - MAC for phy1 (5GHz) at romfile 0xf100 (-1)
            - stock firmware re-uses phy0 MAC for ethernet
            - stock firmware uses romfile 0xf100 (1) for WWAN;
              not used since QMI interface is raw IP
    
    Signed-off-by: Lea Teuberth <lea.teuberth at outlook.com>
---
 .../ramips/dts/mt7628an_tplink_archer-mr200-v5.dts | 192 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |  15 ++
 .../ramips/mt76x8/base-files/etc/board.d/01_leds   |   4 +
 .../mt76x8/base-files/etc/board.d/02_network       |   5 +
 4 files changed, 216 insertions(+)

diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts
new file mode 100644
index 0000000000..177cd4db8a
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-mr200-v5.dts
@@ -0,0 +1,192 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "tplink,archer-mr200-v5", "mediatek,mt7628an-soc";
+	model = "TP-Link Archer MR200 v5";
+
+	aliases {
+		led-boot = &led_power;
+		led-failsafe = &led_power;
+		led-running = &led_power;
+		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
+	};
+	
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		lan {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		wan {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power: power {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
+		};
+
+		signal1 {
+			label = "white:signal1";
+			gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
+		};
+
+		signal2 {
+			label = "white:signal2";
+			gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+		};
+
+		signal3 {
+			label = "white:signal3";
+			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+		};
+
+		wlan {
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_WHITE>;
+			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		rfkill {
+			label = "rfkill";
+			gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RFKILL>;
+		};
+	};	
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <104000000>;
+		m25p,fast-read;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x20000>;
+				read-only;
+			};
+
+			partition at 20000 {
+				compatible = "tplink,firmware";
+				label = "firmware";
+				reg = <0x20000 0x7b0000>;
+			};
+
+			partition at 7d0000 {
+				label = "config";
+				reg = <0x7d0000 0x10000>;
+				read-only;
+			};
+
+			partition at 7e0000 {
+				label = "romfile";
+				reg = <0x7e0000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_romfile_f100: macaddr at f100 {
+						compatible = "mac-base";
+						reg = <0xf100 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 7f0000 {
+				label = "radio";
+				reg = <0x7f0000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_radio_0: eeprom at 0 {
+						reg = <0x0 0x400>;
+					};
+
+					eeprom_radio_8000: eeprom at 8000 {
+						reg = <0x8000 0x200>;
+					};
+				};
+			};
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "uart1", "wdt";
+		function = "gpio";
+	};
+};
+
+&wmac {
+	nvmem-cells = <&eeprom_radio_0>, <&macaddr_romfile_f100 0>;
+	nvmem-cell-names = "eeprom", "mac-address";
+	status = "okay";
+};
+
+&esw {
+	mediatek,portdisable = <0x30>;
+};
+
+&ethernet {
+	nvmem-cells = <&macaddr_romfile_f100 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	mt76 at 0,0 {
+		reg = <0x0000 0 0 0 0>;
+		ieee80211-freq-limit = <5000000 6000000>;
+		nvmem-cells = <&eeprom_radio_8000>, <&macaddr_romfile_f100 (-1)>;
+		nvmem-cell-names = "eeprom", "mac-address";
+	};
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index fc81266da9..37c5a034c4 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -606,6 +606,21 @@ define Device/tplink_archer-c50-v6
 endef
 TARGET_DEVICES += tplink_archer-c50-v6
 
+define Device/tplink_archer-mr200-v5
+  $(Device/tplink-v2)
+  IMAGE_SIZE := 7872k
+  DEVICE_MODEL := Archer MR200
+  DEVICE_VARIANT := v5
+  TPLINK_FLASHLAYOUT := 8MLmtk
+  TPLINK_HWID := 0x20000005
+  TPLINK_HWREV := 0x5
+  TPLINK_HWREVADD := 0x5
+  DEVICE_PACKAGES := kmod-mt76x0e uqmi kmod-usb2 kmod-usb-serial-option
+  IMAGES := sysupgrade.bin tftp-recovery.bin
+  IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin)
+endef
+TARGET_DEVICES += tplink_archer-mr200-v5
+
 define Device/tplink_re200-v2
   $(Device/tplink-safeloader)
   IMAGE_SIZE := 7808k
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
index da3ef154c0..324b57124f 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
@@ -83,6 +83,10 @@ tplink,archer-c50-v6)
 	ucidef_set_led_wlan "wlan2g" "wlan2g" "green:wlan2g" "phy0tpt"
 	ucidef_set_led_wlan "wlan5g" "wlan5g" "green:wlan5g" "phy1tpt"
 	;;
+tplink,archer-mr200-v5)
+	ucidef_set_led_netdev "lan" "lan" "white:lan" "eth0"
+	ucidef_set_led_netdev "wan" "wan" "white:wan" "wwan0"
+	;;
 tplink,re200-v2|\
 tplink,re200-v3|\
 tplink,re200-v4|\
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index fd8c086a85..9fee26e122 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -153,6 +153,11 @@ ramips_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t at eth0"
 		;;
+	tplink,archer-mr200-v5)
+		ucidef_add_switch "switch0" \
+			"0:lan" "1:lan" "2:lan" "3:lan" "6t at eth0"
+		ucidef_set_interface "wan" device "/dev/cdc-wdm0" protocol "qmi"
+		;;
 	tplink,tl-mr3020-v3)
 		ucidef_add_switch "switch0" \
 			"0:lan" "6 at eth0"



From lede-commits at lists.infradead.org  Thu May 23 13:49:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 16:49:28 -0400
Subject: [openwrt/openwrt]  usbmode: add Huawei E5785
In-Reply-To: <171649736857.2231729.6650293268383348669@git-01.infra.openwrt.org>
References: <171649736857.2231729.6650293268383348669@git-01.infra.openwrt.org>
Message-ID: <mailman.38073.1716497373.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6febb93cfd5ceb4c68ee5c870f5bc762b5248adb

commit 6febb93cfd5ceb4c68ee5c870f5bc762b5248adb
Author: Didier 'OdyX' Raboud <odyx at raksha.ch>
AuthorDate: Wed May 15 09:49:05 2024 +0200

    usbmode: add Huawei E5785
    
    This 4G/LTE modem is a WiFi hotspot, and also works as cdc_ether modem
    when plugged over USB. It needs usb-modeswitching. With HuaweiNewMode,
    it will modeswitch from 3426:1f01 (mass-storage) to 3426:14db
    (cdc_ether).
    
    Signed-off-by: Didier 'OdyX' Raboud <odyx at raksha.ch>
    Link: https://github.com/openwrt/openwrt/pull/15497
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/utils/usbmode/data/3426-1f01 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/utils/usbmode/data/3426-1f01 b/package/utils/usbmode/data/3426-1f01
new file mode 100644
index 0000000000..cd5b7e7055
--- /dev/null
+++ b/package/utils/usbmode/data/3426-1f01
@@ -0,0 +1,4 @@
+# Huawei E5785
+TargetVendor=0x3426
+TargetProduct=0x14db
+HuaweiNewMode=1



From lede-commits at lists.infradead.org  Thu May 23 15:10:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 23 May 2024 18:10:45 -0400
Subject: [openwrt/openwrt]  linux-atm: fix build with GCC 14
In-Reply-To: <171650224545.2520715.15853160810927848508@git-01.infra.openwrt.org>
References: <171650224545.2520715.15853160810927848508@git-01.infra.openwrt.org>
Message-ID: <mailman.38081.1716502257.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e024022c3370e94b7002ddd183ac9a622ab89d2

commit 3e024022c3370e94b7002ddd183ac9a622ab89d2
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 13 16:34:22 2024 +0300

    linux-atm: fix build with GCC 14
    
    Basic changes to make linux-atm build without any issues with GCC 14.
    
    Besides some errors caused by -Wpointer-sign, there was also an issue
    with socklen_t not being used for getsockopt() and accept()
    sometimes.
    
    I also updated the Debian patch to include the latest changes from
    version "1:2.5.1-5.1" in Debian Sid. This allowed me to drop
    "600-fix-format-errors.patch" and "700-include_sockios.patch".
    
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
---
 package/network/utils/linux-atm/Makefile           |   2 +-
 ...-debian_16.patch => 000-debian_2.5.1-5.1.patch} | 133 ++++++++++++++-------
 .../patches/510-remove-LINUX_NETDEVICE-hack.patch  |   4 +-
 .../linux-atm/patches/600-fix-format-errors.patch  |  11 --
 ...0-musl-include.patch => 600-musl-include.patch} |   0
 .../linux-atm/patches/700-fix-gcc14-build.patch    |  82 +++++++++++++
 .../linux-atm/patches/800-include_sockios.patch    |  21 ----
 7 files changed, 176 insertions(+), 77 deletions(-)

diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile
index 43f4b6556b..c48309da9c 100644
--- a/package/network/utils/linux-atm/Makefile
+++ b/package/network/utils/linux-atm/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=linux-atm
 PKG_VERSION:=2.5.2
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/$(PKG_NAME)
diff --git a/package/network/utils/linux-atm/patches/000-debian_16.patch b/package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch
similarity index 87%
rename from package/network/utils/linux-atm/patches/000-debian_16.patch
rename to package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch
index 4abaac07e8..27bf6b1ad1 100644
--- a/package/network/utils/linux-atm/patches/000-debian_16.patch
+++ b/package/network/utils/linux-atm/patches/000-debian_2.5.1-5.1.patch
@@ -1,3 +1,45 @@
+--- a/src/mpoad/mpcd.8
++++ b/src/mpoad/mpcd.8
+@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A
+ .B ]]
+ .SH DESCRIPTION
+ MPOA client
+-.SM(MPC) is responsible for creating and receiving
++.SM (MPC) is responsible for creating and receiving
+ internetwork layer shortcuts. Using these shortcuts MPCs forward
+ unicast internetwork layer packets effectively over ATM without need
+ for routing protocols.
+@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o
+ shortcuts is done with the help of
+ .SM MPOA
+ server
+-.SM(MPS).
++.SM (MPS).
+ .PP
+ Just as the Linux
+ .SM LAN
+--- a/src/led/zeppelin.8
++++ b/src/led/zeppelin.8
+@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using
+ recommended. Token Ring support has received less testing than its
+ Ethernet counterpart.
+ .SH FILES
+-.IP \fI/var/run/lec[interface number].pid\fP
++.IP \fI/var/run/lec[interface\ number].pid\fP
+ The file containing the process id of zeppelin.
+ .SH BUGS
+ John Bonham died 1980 and Led Zeppelin broke.
+--- a/src/sigd/atmsigd.conf.4
++++ b/src/sigd/atmsigd.conf.4
+@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e
+ .P
+ If an option is specified in \fBatmsigd.conf\fP and on the command
+ line, the command line has priority.
+-.COMPATIBILITY
++.SH COMPATIBILITY
+ Certain options used by past versions of \fBatmsigd\fP but no longer documented
+ on the man page are still recognized and supported, but they also yield a
+ warning message. Future versions of \fBatmsigd\fP will not recognize those
 --- a/src/arpd/io.c
 +++ b/src/arpd/io.c
 @@ -277,7 +277,8 @@ static void accept_new(void)
@@ -226,45 +268,52 @@
  
  	if (trans) {
  	    /* set send socket buffer if we are transmitting */    
---- a/src/mpoad/mpcd.8
-+++ b/src/mpoad/mpcd.8
-@@ -28,7 +28,7 @@ mpcd \- ATM MPOA (Multi\-Protocol Over A
- .B ]]
- .SH DESCRIPTION
- MPOA client
--.SM(MPC) is responsible for creating and receiving
-+.SM (MPC) is responsible for creating and receiving
- internetwork layer shortcuts. Using these shortcuts MPCs forward
- unicast internetwork layer packets effectively over ATM without need
- for routing protocols.
-@@ -43,7 +43,7 @@ accepts shortcuts and packets arriving o
- shortcuts is done with the help of
- .SM MPOA
- server
--.SM(MPS).
-+.SM (MPS).
- .PP
- Just as the Linux
- .SM LAN
---- a/src/led/zeppelin.8
-+++ b/src/led/zeppelin.8
-@@ -99,7 +99,7 @@ Ring and ATM parts of the ELAN, so using
- recommended. Token Ring support has received less testing than its
- Ethernet counterpart.
- .SH FILES
--.IP \fI/var/run/lec[interface number].pid\fP
-+.IP \fI/var/run/lec[interface\ number].pid\fP
- The file containing the process id of zeppelin.
- .SH BUGS
- John Bonham died 1980 and Led Zeppelin broke.
---- a/src/sigd/atmsigd.conf.4
-+++ b/src/sigd/atmsigd.conf.4
-@@ -125,7 +125,7 @@ a comment. The `#' character cannot be e
- .P
- If an option is specified in \fBatmsigd.conf\fP and on the command
- line, the command line has priority.
--.COMPATIBILITY
-+.SH COMPATIBILITY
- Certain options used by past versions of \fBatmsigd\fP but no longer documented
- on the man page are still recognized and supported, but they also yield a
- warning message. Future versions of \fBatmsigd\fP will not recognize those
+@@ -663,7 +664,7 @@ int no_check = 0;
+     exit(0);
+ 
+   usage:
+-    fprintf(stderr, Usage);
++    fprintf(stderr, "%s", Usage);
+     exit(1);
+ }
+ 
+--- a/src/arpd/arp.c
++++ b/src/arpd/arp.c
+@@ -17,6 +17,7 @@
+ #include <netinet/in.h> /* for ntohs, etc. */
+ #define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
+ #include <linux/types.h>
++#include <linux/if.h>
+ #include <linux/if_arp.h>
+ #include <linux/if_ether.h>
+ #include <atm.h>
+--- a/src/arpd/itf.c
++++ b/src/arpd/itf.c
+@@ -14,6 +14,7 @@
+ #include <sys/socket.h>
+ #define _LINUX_NETDEVICE_H /* glibc2 */
+ #include <linux/types.h>
++#include <linux/if.h>
+ #include <linux/if_arp.h>
+ 
+ #include "atmd.h"
+--- a/src/maint/atmdump.c
++++ b/src/maint/atmdump.c
+@@ -14,6 +14,7 @@
+ #include <sys/types.h>
+ #include <sys/time.h>
+ #include <sys/socket.h>
++#include <linux/sockios.h>
+ #include <netinet/in.h> /* for htonl and ntohl */
+ #include <atm.h>
+ 
+--- a/src/maint/saaldump.c
++++ b/src/maint/saaldump.c
+@@ -15,6 +15,7 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
++#include <linux/sockios.h>
+ #include <atm.h>
+ 
+ #include "pdu.h"
diff --git a/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch b/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch
index d76ec1eaf4..c16df18aa9 100644
--- a/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch
+++ b/package/network/utils/linux-atm/patches/510-remove-LINUX_NETDEVICE-hack.patch
@@ -28,8 +28,8 @@ in Linux 4.20.
  #include <sys/socket.h>
 -#define _LINUX_NETDEVICE_H /* glibc2 */
  #include <linux/types.h>
+ #include <linux/if.h>
  #include <linux/if_arp.h>
- 
 --- a/src/arpd/io.c
 +++ b/src/arpd/io.c
 @@ -21,7 +21,6 @@
@@ -48,5 +48,5 @@ in Linux 4.20.
  #include <netinet/in.h> /* for ntohs, etc. */
 -#define _LINUX_NETDEVICE_H /* very crude hack for glibc2 */
  #include <linux/types.h>
+ #include <linux/if.h>
  #include <linux/if_arp.h>
- #include <linux/if_ether.h>
diff --git a/package/network/utils/linux-atm/patches/600-fix-format-errors.patch b/package/network/utils/linux-atm/patches/600-fix-format-errors.patch
deleted file mode 100644
index ef484f2fa3..0000000000
--- a/package/network/utils/linux-atm/patches/600-fix-format-errors.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/test/ttcp.c
-+++ b/src/test/ttcp.c
-@@ -664,7 +664,7 @@ int no_check = 0;
-     exit(0);
- 
-   usage:
--    fprintf(stderr, Usage);
-+    fprintf(stderr, "%s", Usage);
-     exit(1);
- }
- 
diff --git a/package/network/utils/linux-atm/patches/700-musl-include.patch b/package/network/utils/linux-atm/patches/600-musl-include.patch
similarity index 100%
rename from package/network/utils/linux-atm/patches/700-musl-include.patch
rename to package/network/utils/linux-atm/patches/600-musl-include.patch
diff --git a/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch b/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch
new file mode 100644
index 0000000000..a19dc6c767
--- /dev/null
+++ b/package/network/utils/linux-atm/patches/700-fix-gcc14-build.patch
@@ -0,0 +1,82 @@
+--- a/src/arpd/io.c
++++ b/src/arpd/io.c
+@@ -615,7 +615,7 @@ int ip_itf_info(int number,uint32_t *ip,
+ int get_local(int fd,struct sockaddr_atmsvc *addr)
+ {
+     int result;
+-    size_t length;
++    socklen_t length;
+ 
+     length = sizeof(struct sockaddr_atmsvc);
+     result = getsockname(fd,(struct sockaddr *) addr,&length);
+--- a/src/led/conn.c
++++ b/src/led/conn.c
+@@ -405,7 +405,7 @@ Conn_t *accept_conn(Conn_t *conn)
+ {
+         Conn_t *new;
+         struct sockaddr_atmsvc addr;
+-        size_t len;
++        socklen_t len;
+         int fd;
+         char buff[MAX_ATM_ADDR_LEN+1];
+ 
+@@ -538,7 +538,7 @@ static int handle_accept(Conn_t *conn)
+  */
+ static int handle_data(Conn_t *conn)
+ {
+-        char buff[MAX_CTRL_FRAME];
++        unsigned char buff[MAX_CTRL_FRAME];
+         int retval;
+ 
+         retval = recv_frame(conn, buff, sizeof(buff));
+--- a/src/led/frames.c
++++ b/src/led/frames.c
+@@ -312,7 +312,7 @@ static void handle_ready_ind(Conn_t *con
+  * dependant handler functions.
+  * Returns < 0 for serious error
+  */
+-int handle_frame(Conn_t *conn, char *buff, int size)
++int handle_frame(Conn_t *conn, unsigned char *buff, int size)
+ {
+         struct ctrl_frame *frame;
+ 
+--- a/src/led/frames.h
++++ b/src/led/frames.h
+@@ -13,7 +13,7 @@ int validate_frame(unsigned char *buff,
+ void send_ready_ind(Conn_t *conn);
+ void send_register_req(void);
+ 
+-int handle_frame(Conn_t *conn, char *buff, int size);
++int handle_frame(Conn_t *conn, unsigned char *buff, int size);
+ uint32_t send_flush_req(Conn_t *conn);
+ 
+ void parse_tlvs(uint16_t opcode, unsigned char *tlvp, int numtlvs, int sizeoftlvs);
+--- a/src/led/join.c
++++ b/src/led/join.c
+@@ -43,7 +43,7 @@ static int read_join_rsp(char *buff, int
+ static int parse_join_rsp(unsigned char *buff, int size);
+ 
+ static int get_bus_addr(struct sockaddr_atmsvc *addr);
+-static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, char *buff, int buffsize);
++static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, unsigned char *buff, int buffsize);
+ 
+ /*
+  * 5.1, Initial state
+@@ -693,7 +693,7 @@ static int get_bus_addr(struct sockaddr_
+         fd_set rfds;
+         struct timeval tv;
+         int n = 0, retval, timeout;
+-        char buff[MAX_CTRL_FRAME];
++        unsigned char buff[MAX_CTRL_FRAME];
+ 
+         timeout = 4; /* wait response for 4 seconds */
+         lec_params.c7c_current_timeout = 1;
+@@ -740,7 +740,7 @@ static int get_bus_addr(struct sockaddr_
+  * Tries to read BUS ATM address in *addr
+  * returns < 0 for error, 0 for not found > 0 for success
+  */
+-static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, char *buff, int buffsize)
++static int read_bus_arp(Conn_t *conn, struct sockaddr_atmsvc *addr, unsigned char *buff, int buffsize)
+ {
+         int frame_size;
+         struct ctrl_frame *frame;
diff --git a/package/network/utils/linux-atm/patches/800-include_sockios.patch b/package/network/utils/linux-atm/patches/800-include_sockios.patch
deleted file mode 100644
index edb385ca10..0000000000
--- a/package/network/utils/linux-atm/patches/800-include_sockios.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/src/maint/saaldump.c	2020-03-29 22:58:01.089711789 +0200
-+++ b/src/maint/saaldump.c	2020-03-29 22:59:17.564639387 +0200
-@@ -6,6 +6,7 @@
- #include <config.h>
- #endif
-
-+#include <linux/sockios.h>
- #include <stdlib.h>
- #include <stdarg.h>
- #include <stdio.h>
---- a/src/maint/atmdump.c	2020-03-29 22:58:18.573694469 +0200
-+++ b/src/maint/atmdump.c	2020-03-29 22:58:49.956729365 +0200
-@@ -6,6 +6,7 @@
- #include <config.h>
- #endif
-
-+#include <linux/sockios.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <unistd.h>
-



From lede-commits at lists.infradead.org  Fri May 24 02:29:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 05:29:37 -0400
Subject: [openwrt/openwrt]  ath79: add support for 8Devices Carambola3 board
In-Reply-To: <171654297710.4112184.2743291400867306526@git-01.infra.openwrt.org>
References: <171654297710.4112184.2743291400867306526@git-01.infra.openwrt.org>
Message-ID: <mailman.38170.1716542986.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/febcfadc804d5877cb5e51483c51d2da6d04768c

commit febcfadc804d5877cb5e51483c51d2da6d04768c
Author: Andrey Bondar <a.bondar at 8devices.com>
AuthorDate: Fri May 10 16:22:14 2024 +0300

    ath79: add support for 8Devices Carambola3 board
    
    Carambola3 is a WiFi module based on Qualcomm/Atheros QCA4531
    http://wiki.8devices.com/carambola3
    
    Specification:
    
        - 650/600/216 MHz (CPU/DDR/AHB)
        - 128 MB of RAM (DDR2)
        - 32 MB of FLASH
        - 2T2R 2.4 GHz
        - 2x 10/100 Mbps Ethernet
        - 1x USB 2.0 Host socket
        - UART for serial console
        - 12x GPIO
    
    Flash instructions:
    
        Upgrading from ar71xx target:
        - Upload image into the board:
            scp openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin \
              root at 192.168.1.1/tmp/
        - Run sysupgrade
            sysupgrade -F /tmp/openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin
    
    Upgrading from u-boot:
        - Set up tftp server with openwrt-ath79-generic-8dev_carambola3-initramfs-kernel.bin
        - Go to u-boot (reboot and press ESC when prompted)
        - Set TFTP server IP
            setenv serverip 192.168.1.254
        - Set device ip from the same subnet
            setenv ipaddr 192.168.1.1
        - Copy new firmware to board
            tftpboot 0x82000000 initramfs.bin
        - Boot OpenWRT
            bootm 0x82000000
        - Upload image openwrt-ath79-generic-8dev_carambola3-squashfs-sysupgrade.bin into the board
        - Run sysupgrade.
    
    Signed-off-by: Andrey Bondar <a.bondar at 8devices.com>
    Link: https://github.com/openwrt/openwrt/pull/15514
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/qca9531_8dev_carambola3.dts | 133 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   4 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom         |   1 +
 target/linux/ath79/image/generic.mk                |  10 ++
 4 files changed, 148 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_8dev_carambola3.dts b/target/linux/ath79/dts/qca9531_8dev_carambola3.dts
new file mode 100644
index 0000000000..c019f2c3d1
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_8dev_carambola3.dts
@@ -0,0 +1,133 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca953x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "8dev,carambola3", "qca,qca9531";
+	model = "8devices Carambola3";
+
+	aliases {
+		label-mac-device = &wmac;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		lan {
+			label = "green:lan";
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+		};
+
+		wan {
+			label = "green:wan";
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&usb0 {
+	status = "okay";
+
+	dr_mode = "host";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&wdt {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+
+	/* Winbond W25Q256 SPI flash */
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <45000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x000000 0x040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x040000 0x040000>;
+			};
+
+			art: partition at 80000 {
+				label = "art";
+				reg = <0x080000 0x040000>;
+				read-only;
+
+				nvmem-layout {
+			     		compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_art_0: macaddr at 0 {
+						reg = <0x0 0x6>;
+					};
+
+					macaddr_art_6: macaddr at 6 {
+						reg = <0x6 0x6>;
+					};
+				};
+			};
+
+			partition at c0000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x0c0000 0xf40000>;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy0>;
+
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
+
+	gmac-config {
+		device = <&gmac>;
+
+		switch-phy-addr-swap = <1>;
+		switch-phy-swap = <1>;
+	};
+};
+
+&eth1 {
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+};
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 18fe436dbc..98d1b0a7ba 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
@@ -10,6 +10,10 @@ case "$board" in
 	ucidef_set_led_netdev "lan" "LAN" "orange:eth0" "eth0"
 	ucidef_set_led_switch "wan" "WAN" "orange:eth1" "switch0" "0x04"
 	;;
+8dev,carambola3)
+	ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" "link"
+	ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1" "link"
+	;;
 alcatel,hh40v)
 	ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan" "eth1" "tx rx"
 	ucidef_set_led_netdev "lan_link" "LAN Link" "orange:lan" "eth1" "link"
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index e5f4870e6f..1caba6aa7c 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -9,6 +9,7 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
 	case $board in
+	8dev,carambola3|\
 	8dev,lima)
 		caldata_extract "art" 0x1000 0x800
 		;;
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 90270a7a4e..ca72c8c6d8 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -204,6 +204,16 @@ define Device/8dev_carambola2
 endef
 TARGET_DEVICES += 8dev_carambola2
 
+define Device/8dev_carambola3
+  SOC := qca9531
+  DEVICE_VENDOR := 8devices
+  DEVICE_MODEL := Carambola3
+  DEVICE_PACKAGES := kmod-usb2
+  IMAGE_SIZE := 32768k
+  SUPPORTED_DEVICES += carambola3
+endef
+TARGET_DEVICES += 8dev_carambola3
+
 define Device/8dev_lima
   SOC := qca9531
   DEVICE_VENDOR := 8devices



From lede-commits at lists.infradead.org  Fri May 24 12:57:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 15:57:59 -0400
Subject: [openwrt/openwrt]  generic: 6.6: backports and add LED support for
 Aquantia PHYs
In-Reply-To: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
References: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
Message-ID: <mailman.38303.1716580695.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cccf98c7e8b37ef7f78f51df6210efe1483a514b

commit cccf98c7e8b37ef7f78f51df6210efe1483a514b
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat May 11 00:48:57 2024 +0100

    generic: 6.6: backports and add LED support for Aquantia PHYs
    
    Backport patch adding support for the AQR114C PHY and add support for
    PHY LEDs and polarity setting of Aquantia 3rd and 4th generation PHYs.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...net-phy-aquantia-enable-AQR112-and-AQR412.patch |  16 +-
 ...-aquantia-add-PHY_IDs-for-AQR112-variants.patch |   8 +-
 ...net-phy-aquantia-add-support-for-PHY-LEDs.patch | 368 +++++++++++++++++++++
 ...-net-phy-move-LED-polarity-to-phy_init_hw.patch | 100 ++++++
 4 files changed, 480 insertions(+), 12 deletions(-)

diff --git a/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch b/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
index ff2038d6f7..b3fb3c5020 100644
--- a/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
+++ b/target/linux/generic/hack-6.6/722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
@@ -15,9 +15,9 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
 
 --- a/drivers/net/phy/aquantia/aquantia_main.c
 +++ b/drivers/net/phy/aquantia/aquantia_main.c
-@@ -102,6 +102,29 @@
- #define AQR107_OP_IN_PROG_SLEEP		1000
- #define AQR107_OP_IN_PROG_TIMEOUT	100000
+@@ -127,6 +127,29 @@ struct aqr107_priv {
+ 	u64 sgmii_stats[AQR107_SGMII_STAT_SZ];
+ };
  
 +/* registers in MDIO_MMD_VEND1 region */
 +#define AQUANTIA_VND1_GLOBAL_SC			0x000
@@ -42,9 +42,9 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
 +#define AQUANTIA_VND1_GSYSCFG_5G		3
 +#define AQUANTIA_VND1_GSYSCFG_10G		4
 +
- struct aqr107_hw_stat {
- 	const char *name;
- 	int reg;
+ static int aqr107_get_sset_count(struct phy_device *phydev)
+ {
+ 	return AQR107_SGMII_STAT_SZ;
 @@ -233,6 +256,51 @@ static int aqr_config_aneg(struct phy_de
  	return genphy_c45_check_and_restart_aneg(phydev, changed);
  }
@@ -97,7 +97,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
  static int aqr_config_intr(struct phy_device *phydev)
  {
  	bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
-@@ -810,7 +878,7 @@ static struct phy_driver aqr_driver[] =
+@@ -838,7 +906,7 @@ static struct phy_driver aqr_driver[] =
  	PHY_ID_MATCH_MODEL(PHY_ID_AQR112),
  	.name		= "Aquantia AQR112",
  	.probe		= aqr107_probe,
@@ -106,7 +106,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean at nxp.com>
  	.config_intr	= aqr_config_intr,
  	.handle_interrupt = aqr_handle_interrupt,
  	.get_tunable    = aqr107_get_tunable,
-@@ -828,7 +896,7 @@ static struct phy_driver aqr_driver[] =
+@@ -863,7 +931,7 @@ static struct phy_driver aqr_driver[] =
  	PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
  	.name		= "Aquantia AQR412",
  	.probe		= aqr107_probe,
diff --git a/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch b/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
index 4a72b1bd2b..c93a77d6a4 100644
--- a/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
+++ b/target/linux/generic/hack-6.6/725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch
@@ -21,9 +21,9 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  #define MDIO_PHYXS_VEND_IF_STATUS		0xe812
  #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK	GENMASK(7, 3)
-@@ -992,6 +994,30 @@ static struct phy_driver aqr_driver[] =
- 	.get_stats	= aqr107_get_stats,
- 	.link_change_notify = aqr107_link_change_notify,
+@@ -1062,6 +1064,30 @@ static struct phy_driver aqr_driver[] =
+ 	.led_polarity_set = aqr_phy_led_polarity_set,
+ #endif
  },
 +{
 +	PHY_ID_MATCH_MODEL(PHY_ID_AQR112C),
@@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  };
  
  module_phy_driver(aqr_driver);
-@@ -1012,6 +1038,8 @@ static struct mdio_device_id __maybe_unu
+@@ -1082,6 +1108,8 @@ static struct mdio_device_id __maybe_unu
  	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
  	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
  	{ PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
diff --git a/target/linux/generic/pending-6.6/743-net-phy-aquantia-add-support-for-PHY-LEDs.patch b/target/linux/generic/pending-6.6/743-net-phy-aquantia-add-support-for-PHY-LEDs.patch
new file mode 100644
index 0000000000..ca3a2b5c87
--- /dev/null
+++ b/target/linux/generic/pending-6.6/743-net-phy-aquantia-add-support-for-PHY-LEDs.patch
@@ -0,0 +1,368 @@
+From c6a1759365fc35463138a7d9e335ee53f384b8df Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Fri, 10 May 2024 02:53:52 +0100
+Subject: [PATCH] net: phy: aquantia: add support for PHY LEDs
+
+Aquantia Ethernet PHYs got 3 LED output pins which are typically used
+to indicate link status and activity.
+Add a minimal LED controller driver supporting the most common uses
+with the 'netdev' trigger as well as software-driven forced control of
+the LEDs.
+
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/net/phy/aquantia/Makefile        |   3 +
+ drivers/net/phy/aquantia/aquantia.h      |  84 +++++++++++++
+ drivers/net/phy/aquantia/aquantia_leds.c | 152 +++++++++++++++++++++++
+ drivers/net/phy/aquantia/aquantia_main.c | 127 +++++++++++++------
+ 4 files changed, 329 insertions(+), 37 deletions(-)
+ create mode 100644 drivers/net/phy/aquantia/aquantia_leds.c
+
+--- a/drivers/net/phy/aquantia/Makefile
++++ b/drivers/net/phy/aquantia/Makefile
+@@ -3,4 +3,7 @@ aquantia-objs			+= aquantia_main.o aquan
+ ifdef CONFIG_HWMON
+ aquantia-objs			+= aquantia_hwmon.o
+ endif
++ifdef CONFIG_PHYLIB_LEDS
++aquantia-objs			+= aquantia_leds.o
++endif
+ obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia.o
+--- a/drivers/net/phy/aquantia/aquantia.h
++++ b/drivers/net/phy/aquantia/aquantia.h
+@@ -62,6 +62,26 @@
+ #define VEND1_THERMAL_PROV_LOW_TEMP_FAIL	0xc422
+ #define VEND1_THERMAL_PROV_HIGH_TEMP_WARN	0xc423
+ #define VEND1_THERMAL_PROV_LOW_TEMP_WARN	0xc424
++
++#define AQR_NUM_LEDS				3
++
++#define VEND1_GLOBAL_LED_PROV			0xc430
++#define AQR_LED_PROV(x)				(VEND1_GLOBAL_LED_PROV + x)
++#define VEND1_GLOBAL_LED_PROV_ACT_STRETCH	GENMASK(0, 1)
++#define VEND1_GLOBAL_LED_PROV_TX_ACT		BIT(2)
++#define VEND1_GLOBAL_LED_PROV_RX_ACT		BIT(3)
++#define VEND1_GLOBAL_LED_PROV_LINK_MASK		(GENMASK(15, 14) | GENMASK(8, 5))
++#define VEND1_GLOBAL_LED_PROV_LINK100		BIT(5)
++#define VEND1_GLOBAL_LED_PROV_LINK1000		BIT(6)
++#define VEND1_GLOBAL_LED_PROV_LINK10000		BIT(7)
++#define VEND1_GLOBAL_LED_PROV_FORCE_ON		BIT(8)
++#define VEND1_GLOBAL_LED_PROV_LINK2500		BIT(14)
++#define VEND1_GLOBAL_LED_PROV_LINK5000		BIT(15)
++
++#define VEND1_GLOBAL_LED_DRIVE			0xc438
++#define VEND1_GLOBAL_LED_DRIVE_VDD		BIT(1)
++#define AQR_LED_DRIVE(x)			(VEND1_GLOBAL_LED_DRIVE + x)
++
+ #define VEND1_THERMAL_STAT1			0xc820
+ #define VEND1_THERMAL_STAT2			0xc821
+ #define VEND1_THERMAL_STAT2_VALID		BIT(0)
+@@ -115,3 +135,23 @@ static inline int aqr_hwmon_probe(struct
+ #endif
+ 
+ int aqr_firmware_load(struct phy_device *phydev);
++
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++int aqr_phy_led_blink_set(struct phy_device *phydev, u8 index,
++			 unsigned long *delay_on,
++			 unsigned long *delay_off);
++
++int aqr_phy_led_brightness_set(struct phy_device *phydev,
++			       u8 index, enum led_brightness value);
++
++int aqr_phy_led_hw_is_supported(struct phy_device *phydev, u8 index,
++				unsigned long rules);
++
++int aqr_phy_led_hw_control_get(struct phy_device *phydev, u8 index,
++			       unsigned long *rules);
++
++int aqr_phy_led_hw_control_set(struct phy_device *phydev, u8 index,
++			       unsigned long rules);
++
++int aqr_phy_led_polarity_set(struct phy_device *phydev, int index, unsigned long modes);
++#endif
+--- /dev/null
++++ b/drivers/net/phy/aquantia/aquantia_leds.c
+@@ -0,0 +1,140 @@
++// SPDX-License-Identifier: GPL-2.0
++/* LED driver for Aquantia PHY
++ *
++ * Author: Daniel Golle <daniel at makrotopia.org>
++ */
++
++#include <linux/phy.h>
++
++#include "aquantia.h"
++
++int aqr_phy_led_brightness_set(struct phy_device *phydev,
++			       u8 index, enum led_brightness value)
++{
++	if (index > 2)
++		return -EINVAL;
++
++	return phy_modify_mmd(phydev, MDIO_MMD_VEND1, AQR_LED_PROV(index), VEND1_GLOBAL_LED_PROV_LINK_MASK |
++						    VEND1_GLOBAL_LED_PROV_FORCE_ON |
++						    VEND1_GLOBAL_LED_PROV_RX_ACT |
++						    VEND1_GLOBAL_LED_PROV_TX_ACT,
++						    value ? VEND1_GLOBAL_LED_PROV_FORCE_ON : 0);
++}
++
++static const unsigned long supported_triggers = (BIT(TRIGGER_NETDEV_LINK)        |
++						 BIT(TRIGGER_NETDEV_LINK_100)    |
++						 BIT(TRIGGER_NETDEV_LINK_1000)   |
++						 BIT(TRIGGER_NETDEV_LINK_2500)   |
++						 BIT(TRIGGER_NETDEV_LINK_5000)   |
++						 BIT(TRIGGER_NETDEV_LINK_10000)  |
++						 BIT(TRIGGER_NETDEV_RX)          |
++						 BIT(TRIGGER_NETDEV_TX));
++
++int aqr_phy_led_hw_is_supported(struct phy_device *phydev, u8 index,
++				unsigned long rules)
++{
++	if (index >= AQR_NUM_LEDS)
++		return -EINVAL;
++
++	/* All combinations of the supported triggers are allowed */
++	if (rules & ~supported_triggers)
++		return -EOPNOTSUPP;
++
++	return 0;
++}
++
++int aqr_phy_led_hw_control_get(struct phy_device *phydev, u8 index,
++			       unsigned long *rules)
++{
++	int val;
++
++	if (index >= AQR_NUM_LEDS)
++		return -EINVAL;
++
++	val = phy_read_mmd(phydev, MDIO_MMD_VEND1, AQR_LED_PROV(index));
++	if (val < 0)
++		return val;
++
++	*rules = 0;
++	if (val & VEND1_GLOBAL_LED_PROV_LINK100)
++		*rules |= BIT(TRIGGER_NETDEV_LINK_100);
++
++	if (val & VEND1_GLOBAL_LED_PROV_LINK1000)
++		*rules |= BIT(TRIGGER_NETDEV_LINK_1000);
++
++	if (val & VEND1_GLOBAL_LED_PROV_LINK2500)
++		*rules |= BIT(TRIGGER_NETDEV_LINK_2500);
++
++	if (val & VEND1_GLOBAL_LED_PROV_LINK5000)
++		*rules |= BIT(TRIGGER_NETDEV_LINK_5000);
++
++	if (val & VEND1_GLOBAL_LED_PROV_LINK10000)
++		*rules |= BIT(TRIGGER_NETDEV_LINK_10000);
++
++	if (val & VEND1_GLOBAL_LED_PROV_RX_ACT)
++		*rules |= BIT(TRIGGER_NETDEV_RX);
++
++	if (val & VEND1_GLOBAL_LED_PROV_TX_ACT)
++		*rules |= BIT(TRIGGER_NETDEV_TX);
++
++	return 0;
++}
++
++int aqr_phy_led_hw_control_set(struct phy_device *phydev, u8 index,
++			       unsigned long rules)
++{
++	u16 val = 0;
++
++	if (index >= AQR_NUM_LEDS)
++		return -EINVAL;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_100) | BIT(TRIGGER_NETDEV_LINK)))
++		val |= VEND1_GLOBAL_LED_PROV_LINK100;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_1000) | BIT(TRIGGER_NETDEV_LINK)))
++		val |= VEND1_GLOBAL_LED_PROV_LINK1000;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_2500) | BIT(TRIGGER_NETDEV_LINK)))
++		val |= VEND1_GLOBAL_LED_PROV_LINK2500;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_5000) | BIT(TRIGGER_NETDEV_LINK)))
++		val |= VEND1_GLOBAL_LED_PROV_LINK5000;
++
++	if (rules & (BIT(TRIGGER_NETDEV_LINK_10000) | BIT(TRIGGER_NETDEV_LINK)))
++		val |= VEND1_GLOBAL_LED_PROV_LINK10000;
++
++	if (rules & BIT(TRIGGER_NETDEV_RX))
++		val |= VEND1_GLOBAL_LED_PROV_RX_ACT;
++
++	if (rules & BIT(TRIGGER_NETDEV_TX))
++		val |= VEND1_GLOBAL_LED_PROV_TX_ACT;
++
++	return phy_modify_mmd(phydev, MDIO_MMD_VEND1, AQR_LED_PROV(index),
++						    VEND1_GLOBAL_LED_PROV_LINK_MASK |
++						    VEND1_GLOBAL_LED_PROV_FORCE_ON |
++						    VEND1_GLOBAL_LED_PROV_RX_ACT |
++						    VEND1_GLOBAL_LED_PROV_TX_ACT, val);
++}
++
++int aqr_phy_led_polarity_set(struct phy_device *phydev, int index, unsigned long modes)
++{
++	bool active_low = false;
++	u32 mode;
++
++	if (index >= AQR_NUM_LEDS)
++		return -EINVAL;
++
++	for_each_set_bit(mode, &modes, __PHY_LED_MODES_NUM) {
++		switch (mode) {
++		case PHY_LED_ACTIVE_LOW:
++			active_low = true;
++			break;
++		default:
++		return -EINVAL;
++		}
++	}
++
++	return phy_modify_mmd(phydev, MDIO_MMD_VEND1, AQR_LED_DRIVE(index),
++			      VEND1_GLOBAL_LED_DRIVE_VDD,
++			      active_low ? VEND1_GLOBAL_LED_DRIVE_VDD : 0);
++}
+--- a/drivers/net/phy/aquantia/aquantia_main.c
++++ b/drivers/net/phy/aquantia/aquantia_main.c
+@@ -740,6 +740,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQCS109),
+@@ -759,6 +766,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR111),
+@@ -778,6 +792,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR111B0),
+@@ -797,6 +818,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR405),
+@@ -823,6 +851,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
+@@ -841,6 +876,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR113),
+@@ -860,6 +902,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings    = aqr107_get_strings,
+ 	.get_stats      = aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR113C),
+@@ -879,6 +928,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings    = aqr107_get_strings,
+ 	.get_stats      = aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR114C),
+@@ -898,6 +954,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings    = aqr107_get_strings,
+ 	.get_stats      = aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ {
+ 	PHY_ID_MATCH_MODEL(PHY_ID_AQR813),
+@@ -917,6 +980,13 @@ static struct phy_driver aqr_driver[] =
+ 	.get_strings	= aqr107_get_strings,
+ 	.get_stats	= aqr107_get_stats,
+ 	.link_change_notify = aqr107_link_change_notify,
++#if IS_ENABLED(CONFIG_PHYLIB_LEDS)
++	.led_brightness_set = aqr_phy_led_brightness_set,
++	.led_hw_is_supported = aqr_phy_led_hw_is_supported,
++	.led_hw_control_set = aqr_phy_led_hw_control_set,
++	.led_hw_control_get = aqr_phy_led_hw_control_get,
++	.led_polarity_set = aqr_phy_led_polarity_set,
++#endif
+ },
+ };
+ 
diff --git a/target/linux/generic/pending-6.6/999-net-phy-move-LED-polarity-to-phy_init_hw.patch b/target/linux/generic/pending-6.6/999-net-phy-move-LED-polarity-to-phy_init_hw.patch
new file mode 100644
index 0000000000..22c4776827
--- /dev/null
+++ b/target/linux/generic/pending-6.6/999-net-phy-move-LED-polarity-to-phy_init_hw.patch
@@ -0,0 +1,100 @@
+From 6e6fff51ae5e54092611d174fa45fa78c237a415 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 21 May 2024 20:01:46 +0200
+Subject: [PATCH] net: phy: move LED polarity to phy_init_hw
+
+Some PHY reset the polarity on reset and this cause the LED to
+malfunction as LED polarity is configured only when LED is
+registered.
+
+To better handle this, move the LED polarity configuration in
+phy_init_hw to reconfigure it after PHY reset.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/net/phy/phy_device.c | 53 +++++++++++++++++++++++++-----------
+ 1 file changed, 37 insertions(+), 16 deletions(-)
+
+--- a/drivers/net/phy/phy_device.c
++++ b/drivers/net/phy/phy_device.c
+@@ -1223,6 +1223,37 @@ static int phy_poll_reset(struct phy_dev
+ 	return 0;
+ }
+ 
++static int of_phy_led_init(struct phy_device *phydev)
++{
++	struct phy_led *phyled;
++
++	list_for_each_entry(phyled, &phydev->leds, list) {
++		struct led_classdev *cdev = &phyled->led_cdev;
++		struct device_node *np = cdev->dev->of_node;
++		unsigned long modes = 0;
++		int err;
++
++		if (of_property_read_bool(np, "active-low"))
++			set_bit(PHY_LED_ACTIVE_LOW, &modes);
++		if (of_property_read_bool(np, "inactive-high-impedance"))
++			set_bit(PHY_LED_INACTIVE_HIGH_IMPEDANCE, &modes);
++
++		if (!modes)
++			continue;
++
++		/* Return error if asked to set polarity modes but not supported */
++		if (!phydev->drv->led_polarity_set)
++			return -EINVAL;
++
++		err = phydev->drv->led_polarity_set(phydev, phyled->index,
++						    modes);
++		if (err)
++			return err;
++	}
++
++	return 0;
++}
++
+ int phy_init_hw(struct phy_device *phydev)
+ {
+ 	int ret = 0;
+@@ -1259,6 +1290,12 @@ int phy_init_hw(struct phy_device *phyde
+ 			return ret;
+ 	}
+ 
++	if (IS_ENABLED(CONFIG_PHYLIB_LEDS)) {
++		ret = of_phy_led_init(phydev);
++		if (ret < 0)
++			return ret;
++	}
++
+ 	return 0;
+ }
+ EXPORT_SYMBOL(phy_init_hw);
+@@ -3204,7 +3241,6 @@ static int of_phy_led(struct phy_device
+ 	struct device *dev = &phydev->mdio.dev;
+ 	struct led_init_data init_data = {};
+ 	struct led_classdev *cdev;
+-	unsigned long modes = 0;
+ 	struct phy_led *phyled;
+ 	u32 index;
+ 	int err;
+@@ -3222,21 +3258,6 @@ static int of_phy_led(struct phy_device
+ 	if (index > U8_MAX)
+ 		return -EINVAL;
+ 
+-	if (of_property_read_bool(led, "active-low"))
+-		set_bit(PHY_LED_ACTIVE_LOW, &modes);
+-	if (of_property_read_bool(led, "inactive-high-impedance"))
+-		set_bit(PHY_LED_INACTIVE_HIGH_IMPEDANCE, &modes);
+-
+-	if (modes) {
+-		/* Return error if asked to set polarity modes but not supported */
+-		if (!phydev->drv->led_polarity_set)
+-			return -EINVAL;
+-
+-		err = phydev->drv->led_polarity_set(phydev, index, modes);
+-		if (err)
+-			return err;
+-	}
+-
+ 	phyled->index = index;
+ 	if (phydev->drv->led_brightness_set)
+ 		cdev->brightness_set_blocking = phy_led_set_brightness;



From lede-commits at lists.infradead.org  Fri May 24 12:58:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 15:58:00 -0400
Subject: [openwrt/openwrt]  mediatek: fix sysupgrade config backup on Adtran
 SmartRG devices
In-Reply-To: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
References: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
Message-ID: <mailman.38304.1716580695.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c82e106313fe7855381496e73dee2d189971d576

commit c82e106313fe7855381496e73dee2d189971d576
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Apr 20 02:59:31 2024 +0100

    mediatek: fix sysupgrade config backup on Adtran SmartRG devices
    
    Add missing call to emmc_copy_config which either writes the sysupgrade
    tar.gz backup file or clears the existing rootfs_data overlay.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 9b46111d33..5ccebb2565 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -241,6 +241,10 @@ platform_copy_config() {
 	glinet,gl-x3000|\
 	glinet,gl-xe3000|\
 	jdcloud,re-cp-03|\
+	smartrg,sdg-8612|\
+	smartrg,sdg-8614|\
+	smartrg,sdg-8622|\
+	smartrg,sdg-8632|\
 	ubnt,unifi-6-plus)
 		emmc_copy_config
 		;;



From lede-commits at lists.infradead.org  Fri May 24 12:58:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 15:58:01 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: add Adtran SmartRG Mount Stuart
 series
In-Reply-To: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
References: <171658067933.1153420.3829969924291428962@git-01.infra.openwrt.org>
Message-ID: <mailman.38305.1716580698.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c71b68acdd63b6e2760defb334bef5d65776ebea

commit c71b68acdd63b6e2760defb334bef5d65776ebea
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Apr 19 17:51:51 2024 +0100

    mediatek: filogic: add Adtran SmartRG Mount Stuart series
    
    Common specifications:
     * Mediatek MT7988A (4x Cortex-A73, up to 1.8 GHz clock speed)
     * 8 GiB eMMC
     * 2 GiB DDR4 RAM
     * 1x 10000M/1000M/100M + 3x 1000M/100M/10M LAN ports
     * MT7996 Tri-band (2.4G, 5G, 6G) 4T4R 802.11be Wi-Fi
     * Airoha AG3352 GPS
     * Renesas DA14531MOD Bluetooth
     * 2 buttons (Reset, Mesh/WPS)
     * uC-controlled RGB LED via I2C
     * 2x LED for each 1G port, 3x LED for each 10G port
     * USB 3.0 type A port
     * 3.3V-level 115200 baud UART console via 4-pin Dupont connector
       exposed at the bottom of the device
     * USB-C PD power input
    
    SDG-8733: 1x 10000M/1000M/100M WAN port
    SDG-8734: 1x USXGMII/10GBase-R/5GBase-R/2500Base-X/1000Base-X/SGMII SFP+
    
    Both models are also available in versions including 2x FXS POTS interfaces
    for analog phones. Those interfaces are not supported by OpenWrt.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-envtools/files/mediatek_filogic |   5 +
 .../mediatek/dts/mt7988a-smartrg-SDG-8733.dts      |  17 +
 .../mediatek/dts/mt7988a-smartrg-SDG-8734.dts      |  57 ++
 .../mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi    | 684 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |  15 +
 .../filogic/base-files/etc/board.d/02_network      |   4 +-
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   6 +
 .../base-files/lib/preinit/10_fix_eth_mac.sh       |   4 +-
 .../filogic/base-files/lib/upgrade/platform.sh     |   6 +-
 target/linux/mediatek/image/filogic.mk             |  25 +-
 10 files changed, 816 insertions(+), 7 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index c439af12c8..0a7494cd11 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -109,6 +109,11 @@ openembed,som7981)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
 	ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
 	;;
+smartrg,sdg-8733|\
+smartrg,sdg-8734)
+	local envdev=$(find_mmc_part "u-boot-env" "mmcblk0")
+	ubootenv_add_uci_config "$envdev" "0x0" "0x8000" "0x8000"
+	;;
 ubnt,unifi-6-plus)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
 	;;
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts
new file mode 100644
index 0000000000..c8c58271a3
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8733.dts
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 SmartRG Inc.
+ * Author: Chad Monroe <chad.monroe at smartrg.com>
+ */
+
+#include "mt7988a-smartrg-mt-stuart.dtsi"
+
+/ {
+	model = "SmartRG SDG-8733";
+	compatible = "smartrg,sdg-8733", "mediatek,mt7988a";
+};
+
+&gmac1 {
+	phy-connection-type = "usxgmii";
+	phy = <&phy0>;
+};
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts
new file mode 100644
index 0000000000..6eeb4993f5
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-SDG-8734.dts
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 SmartRG Inc.
+ * Author: Chad Monroe <chad.monroe at smartrg.com>
+ */
+
+#include "mt7988a-smartrg-mt-stuart.dtsi"
+
+/ {
+	model = "SmartRG SDG-8734";
+	compatible = "smartrg,sdg-8734", "mediatek,mt7988a";
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		sfp_green {
+			color = <LED_COLOR_ID_GREEN>;
+			function = "sfp";
+			gpios = <&pio 69 GPIO_ACTIVE_HIGH>;
+		};
+
+		sfp_red {
+			color = <LED_COLOR_ID_RED>;
+			function = "sfp";
+			gpios = <&pio 70 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	i2c_sfp1: i2c-gpio-0 {
+		pinctrl-names = "default";
+		pinctrl-0 = <&sfp_i2c_pins>;
+
+		compatible = "i2c-gpio";
+		sda-gpios = <&pio 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&pio 22 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	sfp1: sfp1 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c_sfp1>;
+		los-gpios = <&pio 32 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+		rate-select0-gpios = <&pio 34 GPIO_ACTIVE_HIGH>;
+		rate-select1-gpios = <&pio 33 GPIO_ACTIVE_HIGH>;
+		tx-disable-gpios = <&pio 36 GPIO_ACTIVE_HIGH>;
+		tx-fault-gpios = <&pio 37 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <4000>;
+	};
+};
+
+&gmac1 {
+	sfp = <&sfp1>;
+	managed = "in-band-status";
+};
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
new file mode 100644
index 0000000000..2b468f9bb3
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
@@ -0,0 +1,684 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2023 SmartRG Inc.
+ * Author: Chad Monroe <chad.monroe at smartrg.com>
+ */
+
+/dts-v1/;
+#include "mt7988a.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+#include <dt-bindings/regulator/richtek,rt5190a-regulator.h>
+
+/ {
+	aliases {
+		serial0 = &uart0;
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
+		led-boot = &led_sys_green;
+		led-failsafe = &led_sys_blue;
+		led-running = &led_sys_white;
+		led-upgrade = &led_sys_red;
+	};
+
+	chosen {
+		stdout-path = &uart0;
+		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf root=PARTLABEL=rootfs";
+	};
+
+	memory {
+		reg = <0x0 0x40000000 0x0 0x40000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/delete-node/ramoops at 42ff0000;
+
+		bootdata at 45000000 {
+			no-map;
+			reg = <0x0 0x45000000 0x0 0x00001000>;
+		};
+
+		ramoops_reserved: ramoops at 45001000 {
+			no-map;
+			compatible = "ramoops";
+			reg = <0x0 0x45001000 0x0 0x00140000>;
+			ftrace-size = <0x20000>;
+			record-size = <0x20000>;
+			console-size = <0x20000>;
+			pmsg-size = <0x80000>;
+		};
+	};
+
+	reg_1p8v: regulator-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		pinctrl-names = "default";
+		pinctrl-0 = <&button_pins>;
+
+		factory {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "sync";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 14 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		bluetooth_reset {
+			gpio-export,name = "bt_reset";
+			gpio-export,direction_may_change;
+			gpios = <&pio 20 GPIO_ACTIVE_HIGH>;
+		};
+
+		bluetooth_txrx_ctl {
+			gpio-export,name = "bt_txrx_ctl";
+			gpio-export,direction_may_change;
+			gpios = <&pio 74 GPIO_ACTIVE_HIGH>;
+		};
+
+		gps_enable {
+			gpio-export,name = "gps_enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		slic_interrupt {
+			gpio-export,name = "slic_interrupt";
+			gpio-export,direction_may_change;
+			gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
+		};
+
+		slic_reset {
+			gpio-export,name = "slic_reset";
+			gpio-export,output = <0>;
+			gpios = <&pio 72 GPIO_ACTIVE_HIGH>;
+		};
+
+		usb_enable {
+			gpio-export,name = "usb_enable";
+			gpio-export,output = <1>;
+			gpios = <&pio 63 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&cpu0 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu1 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu2 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu3 {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cci {
+	proc-supply = <&rt5190_buck3>;
+};
+
+&cpu_thermal {
+	/delete-node/cooling-maps;
+	/delete-node/trips;
+
+	trips {
+		cpu_trip_crit: crit {
+			temperature = <125000>;
+			hysteresis = <2000>;
+			type = "critical";
+		};
+
+		cpu_trip_hot: hot {
+			temperature = <120000>;
+			hysteresis = <2000>;
+			type = "hot";
+		};
+
+		cpu_trip_active_high: active-high {
+			temperature = <110000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		cpu_trip_active_med: active-med {
+			temperature = <80000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		cpu_trip_active_low: active-low {
+			temperature = <60000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+
+		cpu_trip_active_silent: active-silent {
+			temperature = <40000>;
+			hysteresis = <2000>;
+			type = "active";
+		};
+	};
+
+	cooling-maps {
+		cpu-active-high {
+			/* active: set fan to cooling level 3 */
+			cooling-device = <&fan 3 3>;
+			trip = <&cpu_trip_active_high>;
+		};
+
+		cpu-active-med {
+			/* active: set fan to cooling level 2 */
+			cooling-device = <&fan 2 2>;
+			trip = <&cpu_trip_active_med>;
+		};
+
+		cpu-active-low {
+			/* active: set fan to cooling level 1 */
+			cooling-device = <&fan 1 1>;
+			trip = <&cpu_trip_active_low>;
+		};
+
+		cpu-active-silent {
+			/* active: set fan to cooling level 0 */
+			cooling-device = <&fan 0 0>;
+			trip = <&cpu_trip_active_silent>;
+		};
+	};
+};
+
+&eth {
+	pinctrl-0 = <&mdio0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&fan {
+	pwms = <&pwm 0 40000 0>;
+
+	/**
+	 * set fan speed
+	 *
+	 * 0 = off
+	 * 61 = 24% duty cycle
+	 * 77 = 30% duty cycle
+	 * 102 = 40% duty cycle
+	 * 128 - 50% duty cycle
+	 * 255 = 100% duty cycle
+	 */
+	cooling-levels = <61 77 102 128>;
+
+	interrupt-parent = <&pio>;
+	interrupts = <21 IRQ_TYPE_EDGE_FALLING>;
+	pulses-per-revolution = <2>;
+
+	status = "okay";
+};
+
+&gmac0 {
+	status = "okay";
+};
+
+&gmac1 {
+	label = "wan";
+	status = "okay";
+	phy-mode = "usxgmii";
+};
+
+&gmac2 {
+	label = "lan1";
+	status = "okay";
+	phy-mode = "usxgmii";
+	phy-connection-type = "usxgmii";
+	phy = <&phy8>;
+};
+
+&gsw_phy0 {
+	status = "disabled";
+};
+
+&gsw_phy1 {
+	pinctrl-names = "gbe-led";
+	pinctrl-0 = <&gbe1_led0_pins>, <&gbe1_led1_pins>;
+};
+
+&gsw_phy1_led0 {
+	status = "okay";
+	color = <LED_COLOR_ID_GREEN>;
+};
+
+&gsw_phy1_led1 {
+	status = "okay";
+	color = <LED_COLOR_ID_AMBER>;
+};
+
+&gsw_phy2 {
+	pinctrl-names = "gbe-led";
+	pinctrl-0 = <&gbe2_led0_pins>, <&gbe2_led1_pins>;
+};
+
+&gsw_phy2_led0 {
+	status = "okay";
+	color = <LED_COLOR_ID_GREEN>;
+};
+
+&gsw_phy2_led1 {
+	status = "okay";
+	color = <LED_COLOR_ID_AMBER>;
+};
+
+&gsw_phy3 {
+	pinctrl-names = "gbe-led";
+	pinctrl-0 = <&gbe3_led0_pins>, <&gbe3_led1_pins>;
+};
+
+&gsw_phy3_led0 {
+	status = "okay";
+	color = <LED_COLOR_ID_GREEN>;
+};
+
+&gsw_phy3_led1 {
+	status = "okay";
+	color = <LED_COLOR_ID_AMBER>;
+};
+
+&i2c0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c0_pins>;
+	status = "okay";
+
+	rt5190a_64: rt5190a at 64 {
+		compatible = "richtek,rt5190a";
+		reg = <0x64>;
+		/*interrupts-extended = <&gpio26 0 IRQ_TYPE_LEVEL_LOW>;*/
+		vin2-supply = <&rt5190_buck1>;
+		vin3-supply = <&rt5190_buck1>;
+		vin4-supply = <&rt5190_buck1>;
+
+		regulators {
+			rt5190_buck1: buck1 {
+				regulator-name = "rt5190a-buck1";
+				regulator-min-microvolt = <5090000>;
+				regulator-max-microvolt = <5090000>;
+				regulator-allowed-modes =
+				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			buck2 {
+				regulator-name = "vcore";
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			rt5190_buck3: buck3 {
+				regulator-name = "vproc";
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <1400000>;
+				regulator-boot-on;
+			};
+			buck4 {
+				regulator-name = "rt5190a-buck4";
+				regulator-min-microvolt = <850000>;
+				regulator-max-microvolt = <850000>;
+				regulator-allowed-modes =
+				<RT5190A_OPMODE_AUTO RT5190A_OPMODE_FPWM>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+			ldo {
+				regulator-name = "rt5190a-ldo";
+				regulator-min-microvolt = <1200000>;
+				regulator-max-microvolt = <1200000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+		};
+	};
+};
+
+&i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2c1_pins>;
+	status = "okay";
+
+	system-leds {
+		compatible = "srg,sysled";
+		reg = <0x30>;
+
+		led_sys_red: system_red {
+			label = "red";
+			reg = <1>;
+		};
+
+		led_sys_green: system_green {
+			label = "green";
+			reg = <2>;
+		};
+
+		led_sys_blue: system_blue {
+			label = "blue";
+			reg = <3>;
+		};
+
+		led_sys_white: system_white {
+			label = "white";
+			reg = <4>;
+		};
+	};
+};
+
+&mdio_bus {
+	phy0: ethernet-phy at 0 {
+		/* AQR113C */
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <0>;
+
+		reset-gpios = <&pio 62 GPIO_ACTIVE_LOW>;
+		reset-assert-us = <100000>;
+		reset-deassert-us = <1000000>;
+
+		leds {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led at 0 {
+				reg = <0>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+
+			led at 1 {
+				reg = <1>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_ORANGE>;
+			};
+
+			led at 2 {
+				reg = <2>;
+				function = LED_FUNCTION_WAN;
+				color = <LED_COLOR_ID_WHITE>;
+				active-low;
+			};
+		};
+	};
+
+	phy8: ethernet-phy at 8 {
+		/* AQR113C */
+		compatible = "ethernet-phy-ieee802.3-c45";
+		reg = <8>;
+
+		reset-gpios = <&pio 71 GPIO_ACTIVE_LOW>;
+		reset-assert-us = <100000>;
+		reset-deassert-us = <1000000>;
+
+		leds {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			led at 0 {
+				reg = <0>;
+				function = LED_FUNCTION_LAN;
+				color = <LED_COLOR_ID_GREEN>;
+			};
+
+			led at 1 {
+				reg = <1>;
+				function = LED_FUNCTION_LAN;
+				color = <LED_COLOR_ID_ORANGE>;
+			};
+
+			led at 2 {
+				reg = <2>;
+				function = LED_FUNCTION_LAN;
+				color = <LED_COLOR_ID_WHITE>;
+				active-low;
+			};
+		};
+	};
+};
+
+&mmc0 {
+	pinctrl-names = "default", "state_uhs";
+	pinctrl-0 = <&mmc0_pins_emmc_51>;
+	pinctrl-1 = <&mmc0_pins_emmc_51>;
+	bus-width = <8>;
+	max-frequency = <200000000>;
+	cap-mmc-highspeed;
+	mmc-hs200-1_8v;
+	mmc-hs400-1_8v;
+	hs400-ds-delay = <0x12814>;
+	vmmc-supply = <&reg_3p3v>;
+	vqmmc-supply = <&reg_1p8v>;
+	non-removable;
+	no-sd;
+	no-sdio;
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	card at 0 {
+		#address-cells = <0>;
+		#size-cells = <0>;
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+
+			partitions {
+				block-partition-factory {
+					partname = "factory";
+
+					nvmem-layout {
+						compatible = "fixed-layout";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						eeprom_factory_0: eeprom at 0 {
+							reg = <0x0 0x1e00>;
+						};
+					};
+				};
+			};
+		};
+	};
+};
+
+&pcie0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie0_1_pins>;
+	reset-gpios = <&pio 7 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	pcie at 0,0 {
+		reg = <0x0000 0 0 0 0>;
+
+		mt7996 at 0,0 {
+			reg = <0x0000 0 0 0 0>;
+			nvmem-cells = <&eeprom_factory_0>;
+			nvmem-cell-names = "eeprom";
+			ieee80211-freq-limit = <2400000 2500000>, <5170000 5835000>, <5945000 7125000>;
+		};
+	};
+};
+
+&pcie1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pcie1_pins>;
+	status = "okay";
+};
+
+&pcie2 {
+	status = "disabled";
+};
+
+&pcie3 {
+	status = "disabled";
+};
+
+&pio {
+	button_pins: button-pins {
+		pins = "GPIO_RESET", "GPIO_WPS";
+		mediatek,pull-down-adv = <0>; /* bias-disable */
+	};
+
+	pcie0_1_pins: pcie0-pins-g1 {
+		mux {
+			function = "pcie";
+			groups = "pcie_2l_0_pereset", "pcie_clk_req_n0_0";
+		};
+	};
+
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0", "pwm1";
+		};
+	};
+
+	sfp_i2c_pins: sfp-i2c-pins {
+		conf-scl {
+			pins = "LED_A";
+			drive-strength =  <8>;
+			mediatek,pull-up-adv = <1>;
+		};
+		conf-sda {
+			pins = "LED_E";
+			drive-strength =  <8>;
+			mediatek,pull-up-adv = <0>;
+		};
+	};
+
+	uart1_pins: uart1-pins {
+		mux {
+			function = "uart";
+			groups = "uart1_2";
+		};
+	};
+
+	uart2_pins: uart2-pins {
+		mux {
+			function = "uart";
+			groups = "uart2";
+		};
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "disabled";
+
+	spi_nand: spi_nand at 0 {
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+		spi-tx-buswidth = <4>;
+		spi-rx-buswidth = <4>;
+	};
+
+};
+
+&ssusb0 {
+	status = "okay";
+};
+
+&ssusb1 {
+	status = "okay";
+};
+
+&switch {
+	status = "okay";
+
+	ports {
+		port at 0 {
+			status = "disabled";
+		};
+
+		port at 1 {
+			label = "lan2";
+		};
+
+		port at 2 {
+			label = "lan3";
+		};
+
+		port at 3 {
+			label = "lan4";
+		};
+	};
+};
+
+&tphy {
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>;
+	status = "okay";
+
+	/* Airoha AG3352 GPS */
+};
+
+&uart2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_pins>;
+	status = "okay";
+
+	/* DA14531MOD Bluetooth */
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&xphy {
+	status = "okay";
+};
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 ec239cb0cf..2b439f7320 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
@@ -72,6 +72,21 @@ 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"
 	;;
+smartrg,sdg-8733|\
+smartrg,sdg-8734)
+	ucidef_set_led_netdev "lan-1-green" "LAN1" "mdio-bus:08:green:lan" "lan1" "link_2500 link_5000"
+	ucidef_set_led_netdev "lan-1-orange" "LAN1" "mdio-bus:08:orange:lan" "lan1" "link_100 link_1000"
+	ucidef_set_led_netdev "lan-1-white" "LAN1" "mdio-bus:08:white:lan" "lan1" "link_10000"
+	ucidef_set_led_netdev "lan-2-green" "LAN2" "mt7530-0:01:green:lan" "lan2" "link_1000"
+	ucidef_set_led_netdev "lan-2-amber" "LAN2" "mt7530-0:01:amber:lan" "lan2" "link_100 link_10"
+	ucidef_set_led_netdev "lan-3-green" "LAN3" "mt7530-0:02:green:lan" "lan3" "link_1000"
+	ucidef_set_led_netdev "lan-3-amber" "LAN3" "mt7530-0:02:amber:lan" "lan3" "link_100 link_10"
+	ucidef_set_led_netdev "lan-4-green" "LAN4" "mt7530-0:03:green:lan" "lan4" "link_1000"
+	ucidef_set_led_netdev "lan-4-amber" "LAN4" "mt7530-0:03:amber:lan" "lan4" "link_100 link_10"
+	ucidef_set_led_netdev "wan-green" "WAN" "mdio-bus:00:green:wan" "wan" "link_2500 link_5000"
+	ucidef_set_led_netdev "wan-orange" "WAN" "mdio-bus:00:orange:wan" "wan" "link_100 link_1000"
+	ucidef_set_led_netdev "wan-white" "WAN" "mdio-bus:00:white:wan" "wan" "link_10000"
+	;;
 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 fc4bc07b2f..3e3d30cc23 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
@@ -166,7 +166,9 @@ mediatek_setup_macs()
 	smartrg,sdg-8612|\
 	smartrg,sdg-8614|\
 	smartrg,sdg-8622|\
-	smartrg,sdg-8632)
+	smartrg,sdg-8632|\
+	smartrg,sdg-8733|\
+	smartrg,sdg-8734)
 		label_mac=$(mmc_get_mac_ascii mfginfo MFG_MAC)
 		wan_mac=$label_mac
 		lan_mac=$(macaddr_add "$label_mac" 1)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index e0e1e1f1fc..e992eaa604 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -136,6 +136,12 @@ case "$board" in
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "2" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress
 		;;
+	smartrg,sdg-8733|\
+	smartrg,sdg-8634)
+		addr=$(mmc_get_mac_ascii mfginfo MFG_MAC)
+		[ "$PHYNBR" = "0" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "1" ] && macaddr_add $addr a > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "2" ] && macaddr_add $addr 6 > /sys${DEVPATH}/macaddress
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088)
diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
index 37b5be1334..2fe48b0ccf 100644
--- a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -22,7 +22,9 @@ preinit_set_mac_address() {
 		ip link set dev eth1 address "$(macaddr_add $addr 1)"
 		;;
 	smartrg,sdg-8612|\
-	smartrg,sdg-8614)
+	smartrg,sdg-8614|\
+	smartrg,sdg-8733|\
+	smartrg,sdg-8734)
 		addr=$(mmc_get_mac_ascii mfginfo MFG_MAC)
 		lan_addr=$(macaddr_add $addr 1)
 		ip link set dev wan address "$addr"
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 5ccebb2565..4a55ecc0ac 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -68,7 +68,9 @@ platform_do_upgrade() {
 	smartrg,sdg-8612|\
 	smartrg,sdg-8614|\
 	smartrg,sdg-8622|\
-	smartrg,sdg-8632)
+	smartrg,sdg-8632|\
+	smartrg,sdg-8733|\
+	smartrg,sdg-8734)
 		CI_KERNPART="kernel"
 		CI_ROOTPART="rootfs"
 		emmc_do_upgrade "$1"
@@ -245,6 +247,8 @@ platform_copy_config() {
 	smartrg,sdg-8614|\
 	smartrg,sdg-8622|\
 	smartrg,sdg-8632|\
+	smartrg,sdg-8733|\
+	smartrg,sdg-8734|\
 	ubnt,unifi-6-plus)
 		emmc_copy_config
 		;;
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 35baccf95e..fed550551f 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -140,8 +140,7 @@ TARGET_DEVICES += acer_predator-w6
 define Device/adtran_smartrg
   DEVICE_VENDOR := Adtran
   DEVICE_DTS_DIR := ../dts
-  DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-hwmon-pwmfan \
-		     kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
+  DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs kmod-hwmon-pwmfan
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
 
@@ -149,6 +148,7 @@ define Device/smartrg_sdg-8612
 $(call Device/adtran_smartrg)
   DEVICE_MODEL := SDG-8612
   DEVICE_DTS := mt7986a-smartrg-SDG-8612
+  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
 endef
 TARGET_DEVICES += smartrg_sdg-8612
 
@@ -156,6 +156,7 @@ define Device/smartrg_sdg-8614
 $(call Device/adtran_smartrg)
   DEVICE_MODEL := SDG-8614
   DEVICE_DTS := mt7986a-smartrg-SDG-8614
+  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
 endef
 TARGET_DEVICES += smartrg_sdg-8614
 
@@ -163,7 +164,7 @@ define Device/smartrg_sdg-8622
 $(call Device/adtran_smartrg)
   DEVICE_MODEL := SDG-8622
   DEVICE_DTS := mt7986a-smartrg-SDG-8622
-  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware
+  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware kmod-mt7986-firmware mt7986-wo-firmware
 endef
 TARGET_DEVICES += smartrg_sdg-8622
 
@@ -171,10 +172,26 @@ define Device/smartrg_sdg-8632
 $(call Device/adtran_smartrg)
   DEVICE_MODEL := SDG-8632
   DEVICE_DTS := mt7986a-smartrg-SDG-8632
-  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware
+  DEVICE_PACKAGES += kmod-mt7915e kmod-mt7915-firmware kmod-mt7986-firmware mt7986-wo-firmware
 endef
 TARGET_DEVICES += smartrg_sdg-8632
 
+define Device/smartrg_sdg-8733
+$(call Device/adtran_smartrg)
+  DEVICE_MODEL := SDG-8733
+  DEVICE_DTS := mt7988a-smartrg-SDG-8733
+  DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-usb3
+endef
+TARGET_DEVICES += smartrg_sdg-8733
+
+define Device/smartrg_sdg-8734
+$(call Device/adtran_smartrg)
+  DEVICE_MODEL := SDG-8734
+  DEVICE_DTS := mt7988a-smartrg-SDG-8734
+  DEVICE_PACKAGES += kmod-mt7996-firmware kmod-phy-aquantia kmod-sfp kmod-usb3
+endef
+TARGET_DEVICES += smartrg_sdg-8734
+
 define Device/asus_rt-ax59u
   DEVICE_VENDOR := ASUS
   DEVICE_MODEL := RT-AX59U



From lede-commits at lists.infradead.org  Fri May 24 19:56:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 22:56:16 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: fix white-space in package
 Makefile
In-Reply-To: <171660577562.2080551.223034966269215851@git-01.infra.openwrt.org>
References: <171660577562.2080551.223034966269215851@git-01.infra.openwrt.org>
Message-ID: <mailman.38327.1716605781.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/17ca4cccc659219b49fe8079a7bcd0c6fa8f9ce6

commit 17ca4cccc659219b49fe8079a7bcd0c6fa8f9ce6
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri May 24 22:38:34 2024 +0100

    uboot-mediatek: fix white-space in package Makefile
    
    Replace accidental spaces with tabs.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-mediatek/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile
index 057dd9c6c8..74ccd6109c 100644
--- a/package/boot/uboot-mediatek/Makefile
+++ b/package/boot/uboot-mediatek/Makefile
@@ -716,7 +716,7 @@ UBOOT_TARGETS := \
 	mt7622_ubnt_unifi-6-lr-v1 \
 	mt7622_ubnt_unifi-6-lr-v2 \
 	mt7622_ubnt_unifi-6-lr-v3 \
-  mt7622_xiaomi_redmi-router-ax6s-ubi-loader \
+	mt7622_xiaomi_redmi-router-ax6s-ubi-loader \
 	mt7623n_bpir2 \
 	mt7623a_unielec_u7623 \
 	mt7628_rfb \



From lede-commits at lists.infradead.org  Fri May 24 19:56:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 24 May 2024 22:56:15 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: refresh patches
In-Reply-To: <171660577562.2080551.223034966269215851@git-01.infra.openwrt.org>
References: <171660577562.2080551.223034966269215851@git-01.infra.openwrt.org>
Message-ID: <mailman.38328.1716605783.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ac424d098365603cc1df24947399268cae64529e

commit ac424d098365603cc1df24947399268cae64529e
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat May 25 03:52:41 2024 +0100

    uboot-mediatek: refresh patches
    
    Patch 290-mt7981-add-USB-nodes.patch needs a refresh.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch b/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch
index 574b541bfe..cb1648f5e8 100644
--- a/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch
+++ b/package/boot/uboot-mediatek/patches/290-mt7981-add-USB-nodes.patch
@@ -8,8 +8,6 @@ Signed-off-by: John Crispin <john at phrozen.org>
  arch/arm/dts/mt7981.dtsi | 47 ++++++++++++++++++++++++++++++++++++++++
  1 file changed, 47 insertions(+)
 
-diff --git a/arch/arm/dts/mt7981.dtsi b/arch/arm/dts/mt7981.dtsi
-index bda80ac9..6f4e5b9f 100644
 --- a/arch/arm/dts/mt7981.dtsi
 +++ b/arch/arm/dts/mt7981.dtsi
 @@ -6,6 +6,7 @@
@@ -71,6 +69,3 @@ index bda80ac9..6f4e5b9f 100644
 +		};
 +	};
  };
--- 
-2.34.1
-



From lede-commits at lists.infradead.org  Sat May 25 03:43:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 06:43:15 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: prevent faulty mac address
 assignment
In-Reply-To: <171663379526.3077028.17929873145244460228@git-01.infra.openwrt.org>
References: <171663379526.3077028.17929873145244460228@git-01.infra.openwrt.org>
Message-ID: <mailman.38363.1716633800.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a55ab9e1343e85021253e9c55f67adf33ad68f09

commit a55ab9e1343e85021253e9c55f67adf33ad68f09
Author: Leon M. Busch-George <leon at georgemail.eu>
AuthorDate: Fri May 17 20:10:25 2024 +0200

    mediatek: filogic: prevent faulty mac address assignment
    
    The vendor U-Boot on the Cudy M3000 and the Yuncore AX835 assign random
    mac addresses on boot and set the 'local-mac-address' property which
    prevents Openwrt from assigning the correct address from evmem.
    
    This patch removes the alias for ethernet0 so that U-Boot doesn't add the
    property, removes the workaround from 02_network, and adds back the nvmem
    definition for the M3000.
    
    Signed-off-by: Leon M. Busch-George <leon at georgemail.eu>
---
 target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts             | 4 ++--
 target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts             | 1 -
 target/linux/mediatek/filogic/base-files/etc/board.d/02_network | 3 ---
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
index e700d3728a..85bdabe474 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-m3000-v1.dts
@@ -9,7 +9,6 @@
 	compatible = "cudy,m3000-v1", "mediatek,mt7981-spim-snand-rfb";
 
 	aliases {
-		ethernet0 = &gmac0;
 		label-mac-device = &gmac0;
 		led-boot = &led_status;
 		led-failsafe = &led_status;
@@ -87,7 +86,8 @@
 		phy-mode = "2500base-x";
 		phy-handle = <&rtl8221b_phy>;
 
-		/* the MAC address assignment using nvmem-cells doesn't work, so it's done through 02_network */
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_bdinfo_de00 1>;
 	};
 
 	gmac1: mac at 1 {
diff --git a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
index 4e6e834276..8b716e8742 100644
--- a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
+++ b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
@@ -9,7 +9,6 @@
 	model = "YunCore AX835";
 
 	aliases {
-		ethernet0 = &gmac0;
 		led-boot = &led_system;
 		led-failsafe = &led_system;
 		led-running = &led_system;
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 3e3d30cc23..fcaeb698d7 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
@@ -137,9 +137,6 @@ mediatek_setup_macs()
 		;;
 		esac
 		;;
-	cudy,m3000-v1)
-		wan_mac=$(macaddr_add $(cat /sys/class/net/eth1/address) 1)
-		;;
 	h3c,magic-nx30-pro)
 		wan_mac=$(mtd_get_mac_ascii pdt_data_1 ethaddr)
 		lan_mac=$(macaddr_add "$wan_mac" 1)



From lede-commits at lists.infradead.org  Sat May 25 09:42:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 12:42:47 -0400
Subject: [openwrt/openwrt]  ipq40xx: eap1300: add eap1300ext as alt model
In-Reply-To: <171665536710.3968895.6458341392030796549@git-01.infra.openwrt.org>
References: <171665536710.3968895.6458341392030796549@git-01.infra.openwrt.org>
Message-ID: <mailman.38370.1716655382.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/85f6f882232367b64c7933fb4856fdf4999c6aae

commit 85f6f882232367b64c7933fb4856fdf4999c6aae
Author: Ryan Castellucci <code at ryanc.org>
AuthorDate: Mon May 6 15:12:10 2024 +0100

    ipq40xx: eap1300: add eap1300ext as alt model
    
    The EnGenius EAP1300 and EAP1300EXT use identical boards and firmware
    (as flashed) from the vendor.
    
    As with the EAP1300, the EAP1300EXT requires a specific firmware version
    to flash OpenWRT. Unfortunately, the required firmware is truncated on
    the vendor's website.
    
    A working file can be created as follows:
    
    ```
    curl \
    https://www.engeniustech.com/wp_firmware/eap1300-all-v3.5.3.5_c1.9.04.bin \
    | perl -pe 's/\x09EAP1300_A/\x0cEAP1300EXT_A/' \
    > eap1300ext-all-v3.5.3.5_c1.9.04.bin
    ```
    
    The file should have sha256:
    `58a1197a426139a12b03fd432334e677124cbe3384349bd7337f2ee71f1dcfd4`.
    
    Please see commit 2b4ac79 for further
    details.
    
    The vendor firmware must be decrypted before it can be flashed from
    OpenWRT. A tool able to do that is available from:
    
    https://github.com/ryancdotorg/enfringement/blob/main/decrypt.py
    
    Signed-off-by: Ryan Castellucci <code at ryanc.org>
---
 target/linux/ipq40xx/image/generic.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 444035ffe5..0fe7e02ed7 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -447,6 +447,8 @@ define Device/engenius_eap1300
 	$(call Device/FitImage)
 	DEVICE_VENDOR := EnGenius
 	DEVICE_MODEL := EAP1300
+	DEVICE_ALT0_VENDOR := EnGenius
+	DEVICE_ALT0_MODEL := EAP1300EXT
 	DEVICE_DTS_CONFIG := config at 4
 	BOARD_NAME := eap1300
 	SOC := qcom-ipq4018



From lede-commits at lists.infradead.org  Sat May 25 10:27:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 13:27:48 -0400
Subject: [openwrt/openwrt]  build: fix version info in cyclonedx sbom
In-Reply-To: <171665806824.4050564.2554285655367935660@git-01.infra.openwrt.org>
References: <171665806824.4050564.2554285655367935660@git-01.infra.openwrt.org>
Message-ID: <mailman.38375.1716658073.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d8939ff2d5daac4eb3ff932f38ea9d63e091697a

commit d8939ff2d5daac4eb3ff932f38ea9d63e091697a
Author: Akshay Bhat <nodeax at gmail.com>
AuthorDate: Fri Apr 19 11:26:45 2024 -0700

    build: fix version info in cyclonedx sbom
    
    Prior e8725a932e16eaf6ec51add8c084d959cbe32ff2, version used to be
    VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
    After e8725a932e16eaf6ec51add8c084d959cbe32ff2, the version is:
    VERSION:=$(PKG_VERSION)-r$(PKG_RELEASE)
    
    Hence the gen_*_cyclonedxsbom functions need to be updated to remove
    the trailing -r prefix in the version in order to generate correct
    version info in the SBOM.
    
    Signed-off-by: Akshay Bhat <nodeax at gmail.com>
---
 scripts/package-metadata.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index 2c7d3c624b..1e47052ba0 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -722,7 +722,7 @@ sub gen_image_cyclonedxsbom() {
 		if ($image_packages{$name}) {
 			$version = $image_packages{$name};
 		}
-		$version =~ s/-\d+$// if $version;
+		$version =~ s/-r\d+$// if $version;
 		if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) {
 			$version = $1;
 		}
@@ -775,7 +775,7 @@ sub gen_package_cyclonedxsbom() {
 		}
 
 		my $version = $pkg->{version};
-		$version =~ s/-\d+$// if $version;
+		$version =~ s/-r\d+$// if $version;
 		if ($name =~ /^(kernel|kmod-)/ and $version =~ /^(\d+\.\d+\.\d+)/) {
 			$version = $1;
 		}



From lede-commits at lists.infradead.org  Sat May 25 10:34:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 13:34:37 -0400
Subject: [openwrt/openwrt]  ramips: parameterize some values in
 Build/znet-header
In-Reply-To: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
References: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
Message-ID: <mailman.38376.1716658480.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cd2a6906daff74c417d939aa14704f5d98bc7501

commit cd2a6906daff74c417d939aa14704f5d98bc7501
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 11 14:14:16 2024 +0900

    ramips: parameterize some values in Build/znet-header
    
    Parameterize magic number and header length to use the device-specific
    values.
    
    example:
    
    On WRC-X1800GS, an additional ELECOM-specific header and a magic number
    "COMC" are required.
    
    Stock FW v1.18:
    
    $ hexdump -n $((0x40080)) -C wrc-x1800gs_v1.18.bin
    00000000  45 4c 45 43 4f 4d 00 00  57 52 43 2d 58 31 38 30  |ELECOM..WRC-X180|
    00000010  30 47 53 00 00 00 00 00  00 00 00 00 00 00 00 00  |0GS.............|
    00000020  00 00 00 00 00 00 00 00  31 2e 31 38 00 00 00 00  |........1.18....|
    00000030  00 00 00 00 00 00 00 00  43 4f 4d 43 04 00 ac 00  |........COMC....|
    00000040  40 f0 49 74 b1 e8 6a ca  e4 20 65 1f 34 2e 30 34  |@.It..j.. e.4.04|
    00000050  28 58 56 46 2e 31 29 62  31 37 00 00 00 00 00 00  |(XVF.1)b17......|
    00000060  00 00 00 00 00 00 00 00  ff ff ff ff ff ff ff ff  |................|
    00000070  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
    *
    00040000  d0 0d fe ed 00 36 9c c0  00 00 00 38 00 36 9a e0  |.....6.....8.6..|
    00040010  00 00 00 28 00 00 00 11  00 00 00 10 00 00 00 00  |...(............|
    00040020  00 00 00 6c 00 36 9a a8  00 00 00 00 00 00 00 00  |...l.6..........|
    00040030  00 00 00 00 00 00 00 00  00 00 00 01 00 00 00 00  |................|
    00040040  00 00 00 03 00 00 00 04  00 00 00 62 65 54 97 8f  |...........beT..|
    00040050  00 00 00 03 00 00 00 28  00 00 00 00 4d 49 50 53  |.......(....MIPS|
    00040060  20 4f 70 65 6e 57 72 74  20 46 49 54 20 28 46 6c  | OpenWrt FIT (Fl|
    00040070  61 74 74 65 6e 65 64 20  49 6d 61 67 65 20 54 72  |attened Image Tr|
    00040080
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 target/linux/ramips/image/mt7621.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 33fcc805d9..1c6cd237d3 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -99,13 +99,15 @@ endef
 
 define Build/znet-header
 	$(eval version=$(word 1,$(1)))
+	$(eval magic=$(if $(word 2,$(1)),$(word 2,$(1)),ZNET))
+	$(eval hdrlen=$(if $(word 3,$(1)),$(word 3,$(1)),0x30))
 	( \
 		data_size_crc="$$(dd if=$@ 2>/dev/null | gzip -c | \
 			tail -c 8 | od -An -N4 -tx4 --endian big | tr -d ' \n')"; \
 		payload_len="$$(dd if=$@ bs=4 count=1 skip=1 2>/dev/null | od -An -tdI --endian big | tr -d ' \n')"; \
 		payload_size_crc="$$(dd if=$@ ibs=1 count=$$payload_len 2>/dev/null | gzip -c | \
 			tail -c 8 | od -An -N4 -tx4 --endian big | tr -d ' \n')"; \
-		echo -ne "\x5A\x4E\x45\x54" | dd bs=4 count=1 conv=sync 2>/dev/null; \
+		echo -ne "$(magic)" | dd bs=4 count=1 conv=sync 2>/dev/null; \
 		echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tac | tr -d '\n')" | \
 			dd bs=4 count=1 conv=sync 2>/dev/null; \
 		echo -ne "$$(echo $$data_size_crc | sed 's/../\\x&/g')" | \
@@ -114,7 +116,7 @@ define Build/znet-header
 			dd bs=4 count=1 conv=sync 2>/dev/null; \
 		echo -ne "\x12\x34\x56\x78" | dd bs=4 count=1 conv=sync 2>/dev/null; \
 		echo -ne "$(version)" | dd bs=28 count=1 conv=sync 2>/dev/null; \
-		dd if=/dev/zero bs=262096 count=1 conv=sync 2>/dev/null | tr "\000" "\377"; \
+		dd if=/dev/zero bs=$$((0x40000 - $(hdrlen))) count=1 conv=sync 2>/dev/null | tr "\000" "\377"; \
 		cat $@; \
 	) > $@.new
 	mv $@.new $@



From lede-commits at lists.infradead.org  Sat May 25 10:34:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 13:34:36 -0400
Subject: [openwrt/openwrt]  uboot-envtools: add support for ELECOM WRC-X1800GS
In-Reply-To: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
References: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
Message-ID: <mailman.38377.1716658482.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8366e0d606d3d01c89d65eeb31e8c780024eb7ad

commit 8366e0d606d3d01c89d65eeb31e8c780024eb7ad
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 11 17:05:10 2024 +0900

    uboot-envtools: add support for ELECOM WRC-X1800GS
    
    Add support for ELECOM WRC-X1800GS on uboot-envtools, to update
    bootmenu_delay variable on sysupgrade.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 package/boot/uboot-envtools/files/ramips | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
index b0c22827eb..3deb46c295 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -70,6 +70,7 @@ zte,mf283plus)
 asus,rt-ax53u|\
 asus,rt-ax54|\
 belkin,rt1800|\
+elecom,wrc-x1800gs|\
 h3c,tx1800-plus|\
 h3c,tx1801-plus|\
 h3c,tx1806|\



From lede-commits at lists.infradead.org  Sat May 25 10:34:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 13:34:38 -0400
Subject: [openwrt/openwrt]  ramips: add support for ELECOM WRC-X1800GS
In-Reply-To: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
References: <171665847662.4061485.13673523850374766436@git-01.infra.openwrt.org>
Message-ID: <mailman.38378.1716658496.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/50ae9337d62ce7991f80436eadf4415179c039d2

commit 50ae9337d62ce7991f80436eadf4415179c039d2
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat May 11 15:35:50 2024 +0900

    ramips: add support for ELECOM WRC-X1800GS
    
    ELECOM WRC-X1800GS is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
    MT7621A.
    
    Specification:
    
    - SoC               : MediaTek MT7621A
    - RAM               : DDR3 256 MiB
    - Flash             : RAW-NAND 128 MiB (Macronix MX30LF1G28AD-TI)
    - WLAN              : 2.4/5 GHz 2T2R (MediaTek MT7915D)
    - Ethernet          : 5x 10/100/1000 Mbps
      - switch          : MediaTek MT7530 (SoC)
    - LEDs/Keys (GPIO)  : 7x/4x
    - UART              : pin-header on PCB ("J5")
      - arrangement     : 3.3V, TX, RX, NC, GND from tri-angle marking
      - settings        : 115200n8
    - Power             : 12 VDC, 1 A
    
    Flash instruction using initramfs-factory image:
    
    1. Boot WRC-X1800GS normally with "Router" mode
    2. Access to "http://192.168.2.1/" and open firmware update page
       ("?????????")
    3. Select the OpenWrt initramfs-factory image and click apply ("??")
       button
    4. After flashing initramfs-factory image and reboot, upload the
       sysupgrade image and perform sysupgrade with it
    5. Wait ~120 seconds to complete flashing
    
    Notes:
    
    - WRC-X1800GS has 2x os images. Those are switched on every firmware
      updating on stock firmware, but dual-boot feature on this device
      cannot be handled on OpenWrt. So the 1st image is always used on
      OpenWrt.
      This is controlled by "bootnum" variable embedded in "persist"
      partition (addr: 0x4).
    
    - WRC-X1800GS has 2x HW revisions. There are some small changes, but the
      same DeviceTree in stock firmware is used for both revisions.
      On this support of WRC-X1800GS, 2x green:wlan-2g-N LEDs are defined
      for each revision and the same default triggers are set.
    
    MAC addresses:
    
    LAN    : 38:97:A4:xx:xx:38 (Factory, 0x1fdfa (hex) / Ubootenv, ethaddr (text))
    WAN    : 38:97:A4:xx:xx:3B (Factory, 0x1fdf4 (hex))
    2.4 GHz: 38:97:A4:xx:xx:39
    5 GHz  : 38:97:A4:xx:xx:3A
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../linux/ramips/dts/mt7621_elecom_wrc-x1800gs.dts | 279 +++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |  21 ++
 .../mt7621/base-files/etc/board.d/02_network       |   1 +
 .../mt7621/base-files/lib/upgrade/platform.sh      |   6 +
 4 files changed, 307 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-x1800gs.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-x1800gs.dts
new file mode 100644
index 0000000000..c0bb5e4969
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-x1800gs.dts
@@ -0,0 +1,279 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "elecom,wrc-x1800gs", "mediatek,mt7621-soc";
+	model = "ELECOM WRC-X1800GS";
+
+	aliases {
+		led-boot = &led_power_green;
+		led-failsafe = &led_power_red;
+		led-running = &led_power_green;
+		led-upgrade = &led_power_green;
+		label-mac-device = &gmac0;
+	};
+
+	chosen {
+		bootargs-override = "console=ttyS0,115200n8";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		/* available on 1st HW rev. */
+		led-0 {
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			function-enumerator = <1>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led_power_green: led-1 {
+			gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+		};
+
+		led_power_red: led-2 {
+			gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_POWER;
+		};
+
+		led-3 {
+			gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+		};
+
+		led-4 {
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WPS;
+		};
+
+		led-5 {
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		/* available on 2nd HW rev. */
+		led-6 {
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			function-enumerator = <2>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led-7 {
+			gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+		};
+
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		button-reset {
+			label = "reset";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		switch-ap {
+			label = "ap";
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_0>;
+		};
+
+		switch-router {
+			label = "router";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			linux,code = <BTN_1>;
+		};
+
+		button-wps {
+			label = "wps";
+			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&nand {
+	status = "okay";
+	pinctrl-0 = <&nand_pins>;
+	pinctrl-names = "default";
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			reg = <0x0 0x100000>;
+			label = "u-boot";
+			read-only;
+		};
+
+		partition at 100000 {
+			reg = <0x100000 0x100000>;
+			label = "u-boot-env";
+		};
+
+		partition at 200000 {
+			reg = <0x200000 0x1c0000>;
+			label = "factory";
+			read-only;
+
+			nvmem-layout {
+				compatible = "fixed-layout";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				eeprom_factory_0: eeprom at 0 {
+					reg = <0x0 0xe00>;
+				};
+
+				precal_factory_e10: precal at e10 {
+					reg = <0xe10 0x19c10>;
+				};
+
+				macaddr_factory_1fdf4: macaddr at 1fdf4 {
+					reg = <0x1fdf4 0x6>;
+				};
+
+				macaddr_factory_1fdfa: macaddr at 1fdfa {
+					reg = <0x1fdfa 0x6>;
+				};
+			};
+		};
+
+		/* "RAS1" on stock fw */
+		partition at 3c0000 {
+			compatible = "fixed-partitions";
+			reg = <0x3c0000 0x3240000>;
+			label = "firmware";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				reg = <0x0 0x800000>;
+				label = "kernel";
+			};
+
+			partition at 800000 {
+				reg = <0x800000 0x2a40000>;
+				label = "ubi";
+			};
+		};
+
+		partition at 3600000 {
+			reg = <0x3600000 0x100000>;
+			label = "Config";
+			read-only;
+		};
+
+		/* "RAS2" on stock fw */
+		partition at 3700000 {
+			reg = <0x3700000 0x3240000>;
+			label = "firmware2";
+		};
+
+		partition at 6940000 {
+			reg = <0x6940000 0x100000>;
+			label = "Config_2";
+			read-only;
+		};
+
+		partition at 6a40000 {
+			reg = <0x6a40000 0x100000>;
+			label = "persist";
+		};
+
+		partition at 6b40000 {
+			reg = <0x6b40000 0x100000>;
+			label = "mesh";
+			read-only;
+		};
+
+		partition at 6c40000 {
+			reg = <0x6c40000 0x1340000>;
+			label = "backup";
+			read-only;
+		};
+	};
+};
+
+&gmac0 {
+	nvmem-cells = <&macaddr_factory_1fdfa>;
+	nvmem-cell-names = "mac-address";
+};
+
+&gmac1 {
+	status = "okay";
+	label = "wan";
+	phy-handle = <&ethphy0>;
+
+	nvmem-cells = <&macaddr_factory_1fdf4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&ethphy0 {
+	/delete-property/ interrupts;
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie1 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
+		nvmem-cell-names = "eeprom", "precal";
+		mediatek,disable-radar-background;
+	};
+};
+
+&pcie2 {
+	status = "disabled";
+};
+
+&switch0 {
+	ports {
+		port at 1 {
+			status = "okay";
+			label = "lan2";
+		};
+
+		port at 2 {
+			status = "okay";
+			label = "lan1";
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "uart3", "jtag", "wdt";
+		function = "gpio";
+	};
+};
+
+&uartlite {
+	pinctrl-0 = <&uart1_pins>;
+	pinctrl-names = "default";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 1c6cd237d3..ff071213ef 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -1120,6 +1120,27 @@ define Device/elecom_wrc-2533gst2
 endef
 TARGET_DEVICES += elecom_wrc-2533gst2
 
+define Device/elecom_wrc-x1800gs
+  $(Device/nand)
+  DEVICE_VENDOR := ELECOM
+  DEVICE_MODEL := WRC-X1800GS
+  KERNEL := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | \
+	znet-header 4.04(XVF.1)b90 COMC 0x68 | elecom-product-header WRC-X1800GS
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_SIZE := 8192k
+  IMAGE_SIZE := 51456k
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+  ARTIFACTS := initramfs-factory.bin
+  ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \
+	znet-header 4.04(XVF.1)b90 COMC 0x68 | elecom-product-header WRC-X1800GS | \
+	check-size
+endif
+  DEVICE_PACKAGES := kmod-mt7915-firmware
+endef
+TARGET_DEVICES += elecom_wrc-x1800gs
+
 define Device/etisalat_s3
   $(Device/sercomm_dxx)
   IMAGE_SIZE := 32768k
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 2ed8c38732..ea479ddd38 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -71,6 +71,7 @@ ramips_setup_interfaces()
 	asiarf,ap7621-nv1|\
 	beeline,smartbox-flash|\
 	beeline,smartbox-giga|\
+	elecom,wrc-x1800gs|\
 	glinet,gl-mt1300|\
 	iodata,wn-deax1800gr|\
 	iptime,a3002mesh|\
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 258bb1fe96..3c8c4b36ee 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -131,6 +131,12 @@ platform_do_upgrade() {
 	zyxel,nwa55axe)
 		nand_do_upgrade "$1"
 		;;
+	elecom,wrc-x1800gs)
+		[ "$(fw_printenv -n bootmenu_delay)" != "0" ] || \
+			fw_setenv bootmenu_delay 3
+		iodata_mstc_set_flag "bootnum" "persist" "0x4" "1,2" "1"
+		nand_do_upgrade "$1"
+		;;
 	iodata,wn-ax1167gr2|\
 	iodata,wn-ax2033gr|\
 	iodata,wn-dx1167r|\



From lede-commits at lists.infradead.org  Sat May 25 10:53:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 13:53:41 -0400
Subject: [openwrt/openwrt]  ath79: qca9563: add support for Amplifi Router HD
In-Reply-To: <171665962146.4098912.11576100785615198756@git-01.infra.openwrt.org>
References: <171665962146.4098912.11576100785615198756@git-01.infra.openwrt.org>
Message-ID: <mailman.38381.1716659626.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c5b7ec8cee497c3a84eb8ad90d88494f0812698c

commit c5b7ec8cee497c3a84eb8ad90d88494f0812698c
Author: Kristian Skramstad <kristian+github at 83.no>
AuthorDate: Wed Apr 17 15:14:59 2024 +0200

    ath79: qca9563: add support for Amplifi Router HD
    
    Hardware:
        SoC: Qualcomm Atheros QCA956X ver 1 rev 0
        CPU clock: 775.000 MHz
        Memory: 128 MB DDR2
        Flash: 32 MB SPI NOR mx25l25635e
        Switch: Atheros AR8327 rev. 4
        Ethernet: 5x 10/100/1000 Mbps (1 WAN + 4 LAN)
        Buttons: 1x Reset
        Serial: TX, RX, GND, VCC
        Baudrate: 115200
        Wifi: Qualcomm Atheros qca988x 802.11ac/n - 3x3
              Qualcomm Atheros AR9561 802.11b/g/n - 3x3
    
    Not working:
        Leds: 1x via a SPI controller
        Display: ST7789V or ILI9341V
        controlled by stm32f205.
    
    Note:
        DSA changes are ready, but we have an issue with
        ports not working after 20-30 minutes. So for now
        we use swconfig.
    
    Installation: serial connection only
    There is a J11 four pin connector. You need to connect TX, RX and GND.
    You can find very good information about the device here
    https://github.com/alexanderhenne/AFi-R?tab=readme-ov-file#finding-j11
    
    Upgrading via serial port:
    1.  Download the kernel initramfs image. Copy the image to a TFTP server
    2.  Connect to console on the AP, and connect the LAN1 port to your PC LAN
    3.  Stop autoboot to get to U-boot shell
        Interrupt the autoboot process by pressing any key when prompted
    4.  Transfer the kernel image with TFTP
        Set your ip address on your TFTP server to 192.168.1.254
        # tftpboot 0x81000000 amplifi-router-hd-initramfs-kernel.bin
    5.  Load the image
        # bootm 0x81000000
    6.  SCP sysupgrade image from your PC to the Amplifi HD
        (If you use a newer mac use scp -O)
        # scp openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin root at 192.168.1.1:/tmp/
    7.  Write sysupgrade to the firmware partition
        # mtd write /tmp/openwrt-ath79-generic-ubnt_amplifi-router-hd-squashfs-sysupgrade.bin firmware
    8.  Reboot your device
        # reboot
    
    Credit to alexanderhenne for all the information.
    
    Signed-off-by: Kristian Skramstad <kristian+github at 83.no>
---
 .../ath79/dts/qca9563_ubnt_amplifi-router-hd.dts   | 194 +++++++++++++++++++++
 .../generic/base-files/etc/board.d/02_network      |   4 +
 target/linux/ath79/image/generic-ubnt.mk           |  12 ++
 3 files changed, 210 insertions(+)

diff --git a/target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts b/target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts
new file mode 100644
index 0000000000..a322323899
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_ubnt_amplifi-router-hd.dts
@@ -0,0 +1,194 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "ubnt,amplifi-router-hd", "qca,qca9563";
+	model = "Ubiquiti AmpliFi Router HD";
+
+	aliases {
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "Reset button";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+
+	wifi at 0,0 {
+		compatible = "qcom,ath10k";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&cal_art_5000>;
+		nvmem-cell-names = "calibration";
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x000000 0x060000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				compatible = "u-boot,env";
+				label = "u-boot-env";
+				reg = <0x060000 0x010000>;
+			};
+
+			partition at 70000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x070000 0xb00000>;
+			};
+
+			partition at b70000 {
+				label = "cfg";
+				reg = <0xb70000 0x0c0000>;
+				read-only;
+			};
+
+			partition at c30000 {
+				label = "recovery";
+				reg = <0xc30000 0x3b0000>;
+				read-only;
+			};
+
+			partition at fe0000 {
+				label = "prst";
+				reg = <0xfe0000 0x010000>;
+				read-only;
+			};
+
+			partition at ff0000 {
+				/* eeprom */
+				label = "art";
+				reg = <0xff0000 0x010000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_art_0: macaddr at 0 {
+						compatible = "mac-base";
+						reg = <0x0 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					cal_art_1000: calibration at 1000 {
+						reg = <0x1000 0x440>;
+					};
+
+					cal_art_5000: calibration at 5000 {
+						reg = <0x5000 0x844>;
+					};
+				};
+			};
+
+			partition at 1000000 {
+				label = "bs1";
+				reg = <0x1000000 0x010000>;
+			};
+
+			partition at 1010000 {
+				label = "bs2";
+				reg = <0x1010000 0x010000>;
+				read-only;
+			};
+
+			partition at 1020000 {
+				label = "stats";
+				reg = <0x1020000 0x400000>;
+				read-only;
+			};
+
+			partition at 1420000 {
+				label = "fw_inactive";
+				reg = <0x1420000 0xb00000>;
+				read-only;
+			};
+
+			partition at 1f20000 {
+				label = "reserved";
+				reg = <0x1f20000 0x0e0000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+		phy-mode = "sgmii";
+
+		qca,ar8327-initvals = <
+			0x04 0x00000080 /* AR8327_REG_PAD0_MODE */
+			0x08 0x00000000 /* PORT5 PAD MODE CTRL */
+			0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
+			0x10 0x602613a0 /* AR8327_REG_POWER_ON_STRAP */
+			0x50 0xcc35cc35 /* AR8327_REG_LED_CTRL0 */
+			0x54 0xca35ca35 /* AR8327_REG_LED_CTRL1 */
+			0x58 0xc935c935 /* AR8327_REG_LED_CTRL2 */
+			0x5c 0x03ffff00 /* AR8327_REG_LED_CTRL3 */
+			0x7c 0x0000007e /* AR8327_REG_PORT_STATUS(0) */
+			0x94 0x00001080 /* AR8327_REG_PORT_STATUS(6) */
+		>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+	
+	pll-data = <0x03000101 0x00000101 0x00001919>;
+
+	phy-mode = "sgmii";
+	phy-handle = <&phy0>;
+
+	nvmem-cells = <&macaddr_art_0 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_art_0 (-2)>, <&cal_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
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 bf93dc8ba8..8af618d267 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
@@ -554,6 +554,10 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan:1" "3:lan:3" "4:lan:2"
 		;;
+	ubnt,amplifi-router-hd)
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "2:lan:1" "3:lan:3" "4:lan:2" "5:lan:4" "1:wan"
+		;;
 	ubnt,edgeswitch-5xp)
 		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index a4d118456f..f7bab4b697 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -18,6 +18,18 @@ define Device/ubnt_aircube-isp
 endef
 TARGET_DEVICES += ubnt_aircube-isp
 
+define Device/ubnt_amplifi-router-hd
+  IMAGE_SIZE := 11264k
+  UBNT_BOARD := AFi-R-HD
+  UBNT_TYPE := AFi-R
+  UBNT_VERSION := 3.6.3
+  SOC := qca9563
+  DEVICE_MODEL := AmpliFi Router HD
+  UBNT_CHIP := qca956x
+  DEVICE_PACKAGES += kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct kmod-usb2
+endef
+TARGET_DEVICES += ubnt_amplifi-router-hd
+
 define Device/ubnt_bullet-ac
   $(Device/ubnt-2wa)
   DEVICE_MODEL := Bullet AC



From lede-commits at lists.infradead.org  Sat May 25 11:05:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:24 -0400
Subject: [openwrt/openwrt]  mvebu: add common image definition for FortiGate
 devices
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38386.1716660329.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0618eae50672cb78efaea938a6a4b5eb4712b00e

commit 0618eae50672cb78efaea938a6a4b5eb4712b00e
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Mon Dec 4 21:02:13 2023 +0900

    mvebu: add common image definition for FortiGate devices
    
    Add a common definition of Fortinet FortiGate devices to
    image/cortexa9.mk for a preparation of adding support for
    other FortiGate 3xE/5xE devices.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 target/linux/mvebu/image/cortexa9.mk | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 7c68740e11..a73e3ff5e5 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -114,33 +114,31 @@ define Device/cznic_turris-omnia
 endef
 TARGET_DEVICES += cznic_turris-omnia
 
-define Device/fortinet_fg-30e
+define Device/fortinet
   DEVICE_VENDOR := Fortinet
-  DEVICE_MODEL := FortiGate 30E
   SOC := armada-385
   KERNEL := kernel-bin | append-dtb
-  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
-    gzip-filename FGT30E
   KERNEL_SIZE := 6144k
-  DEVICE_DTS := armada-385-fortinet-fg-30e
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \
     sysupgrade-tar rootfs=$$$$@ | append-metadata
   DEVICE_PACKAGES := kmod-hwmon-nct7802
 endef
+
+define Device/fortinet_fg-30e
+  $(Device/fortinet)
+  DEVICE_MODEL := FortiGate 30E
+  DEVICE_DTS := armada-385-fortinet-fg-30e
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
+    gzip-filename FGT30E
+endef
 TARGET_DEVICES += fortinet_fg-30e
 
 define Device/fortinet_fg-50e
-  DEVICE_VENDOR := Fortinet
+  $(Device/fortinet)
   DEVICE_MODEL := FortiGate 50E
-  SOC := armada-385
-  KERNEL := kernel-bin | append-dtb
+  DEVICE_DTS := armada-385-fortinet-fg-50e
   KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
     gzip-filename FGT50E
-  KERNEL_SIZE := 6144k
-  DEVICE_DTS := armada-385-fortinet-fg-50e
-  IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \
-    sysupgrade-tar rootfs=$$$$@ | append-metadata
-  DEVICE_PACKAGES := kmod-hwmon-nct7802
 endef
 TARGET_DEVICES += fortinet_fg-50e
 



From lede-commits at lists.infradead.org  Sat May 25 11:05:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:27 -0400
Subject: [openwrt/openwrt]  mvebu: separate common parts to new dtsi for
 FortiGate/FortiWiFi 5xE
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38387.1716660329.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f69d96a8e5ae30b1714b6f18f56b7ebcb6c1ecc1

commit f69d96a8e5ae30b1714b6f18f56b7ebcb6c1ecc1
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Tue Dec 5 22:15:38 2023 +0900

    mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 5xE
    
    Add a new dtsi which contains the common parts of Fortinet
    FortiGate/FortiWiFi 5xE series devices.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../dts/marvell/armada-385-fortinet-fg-50e.dts     | 169 +--------------------
 ...-fg-50e.dts => armada-385-fortinet-fg-5xe.dtsi} |   7 +-
 2 files changed, 3 insertions(+), 173 deletions(-)

diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
index c56a06fda0..01a9e36826 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
@@ -1,175 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "armada-385-fortinet-fg-xxe.dtsi"
+#include "armada-385-fortinet-fg-5xe.dtsi"
 
 / {
 	model = "Fortinet FortiGate 50E";
 	compatible = "fortinet,fg-50e", "marvell,armada385", "marvell,armada380";
-
-	memory at 0 {
-		device_type = "memory";
-		reg = <0x00000000 0x80000000>; /* 2GB */
-	};
-};
-
-&gpio_leds {
-	led-14 {
-		gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_GREEN>;
-		function = LED_FUNCTION_SPEED_WAN;
-		function-enumerator = <1>;
-		linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
-	};
-
-	led-15 {
-		gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_GREEN>;
-		function = LED_FUNCTION_SPEED_WAN;
-		function-enumerator = <2>;
-		linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
-	};
-
-	led-16 {
-		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_AMBER>;
-		function = LED_FUNCTION_SPEED_LAN;
-		function-enumerator = <5>;
-		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
-	};
-
-	led-17 {
-		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_GREEN>;
-		function = LED_FUNCTION_SPEED_LAN;
-		function-enumerator = <5>;
-		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
-	};
-};
-
-&pinctrl {
-	pmx_phy_switch_pins: phy-switch-pins {
-		marvell,pins = "mpp19", "mpp20", "mpp23", "mpp34", "mpp41";
-		marvell,function = "gpio";
-	};
-};
-
-&eth1 {
-	status = "okay";
-
-	phy-handle = <&ethphy0>;
-	phy-connection-type = "sgmii";
-	buffer-manager = <&bm>;
-	bm,pool-long = <2>;
-	nvmem-cells = <&macaddr_bdinfo_d880 1>;
-	nvmem-cell-names = "mac-address";
-};
-
-&eth2 {
-	status = "okay";
-
-	phy-handle = <&ethphy1>;
-	phy-connection-type = "sgmii";
-	buffer-manager = <&bm>;
-	bm,pool-long = <3>;
-	nvmem-cells = <&macaddr_bdinfo_d880 2>;
-	nvmem-cell-names = "mac-address";
-};
-
-&mdio {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio_pins>, <&pmx_phy_switch_pins>;
-
-	/* Marvell 88E1512 */
-	ethphy0: ethernet-phy at 0 {
-		compatible = "ethernet-phy-id0141,0dd1",
-			     "ethernet-phy-ieee802.3-c22";
-		reg = <0>;
-		interrupt-parent = <&gpio0>;
-		interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
-		reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
-		reset-assert-us = <10000>;
-		reset-deassert-us = <10000>;
-		/*
-		 * LINK/ACT   (Green): LED[0], Active Low
-		 * SPEED 100M (Amber): LED[1], Active High
-		 */
-		marvell,reg-init = <3 16 0 0x71>,
-				   <3 17 0 0x4>;
-	};
-
-	/* Marvell 88E1512 */
-	ethphy1: ethernet-phy at 1 {
-		compatible = "ethernet-phy-id0141,0dd1",
-			     "ethernet-phy-ieee802.3-c22";
-		reg = <1>;
-		interrupt-parent = <&gpio1>;
-		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
-		reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
-		reset-assert-us = <10000>;
-		reset-deassert-us = <10000>;
-		/*
-		 * LINK/ACT   (Green): LED[0], Active Low
-		 * SPEED 100M (Amber): LED[1], Active High
-		 */
-		marvell,reg-init = <3 16 0 0x71>,
-				   <3 17 0 0x4>;
-	};
-
-	/* Marvell 88E6176 */
-	switch at 2 {
-		compatible = "marvell,mv88e6085";
-		reg = <0x2>;
-		reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port at 0 {
-				reg = <0>;
-				label = "lan5";
-				nvmem-cells = <&macaddr_bdinfo_d880 7>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 1 {
-				reg = <1>;
-				label = "lan4";
-				nvmem-cells = <&macaddr_bdinfo_d880 6>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 2 {
-				reg = <2>;
-				label = "lan3";
-				nvmem-cells = <&macaddr_bdinfo_d880 5>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 3 {
-				reg = <3>;
-				label = "lan2";
-				nvmem-cells = <&macaddr_bdinfo_d880 4>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 4 {
-				reg = <4>;
-				label = "lan1";
-				nvmem-cells = <&macaddr_bdinfo_d880 3>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 6 {
-				reg = <6>;
-				ethernet = <&eth0>;
-				phy-connection-type = "rgmii-id";
-
-				fixed-link {
-					speed = <1000>;
-					full-duplex;
-				};
-			};
-		};
-	};
 };
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi
similarity index 96%
copy from target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
copy to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi
index c56a06fda0..063632d888 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-5xe.dtsi
@@ -3,9 +3,6 @@
 #include "armada-385-fortinet-fg-xxe.dtsi"
 
 / {
-	model = "Fortinet FortiGate 50E";
-	compatible = "fortinet,fg-50e", "marvell,armada385", "marvell,armada380";
-
 	memory at 0 {
 		device_type = "memory";
 		reg = <0x00000000 0x80000000>; /* 2GB */
@@ -83,7 +80,7 @@
 	ethphy0: ethernet-phy at 0 {
 		compatible = "ethernet-phy-id0141,0dd1",
 			     "ethernet-phy-ieee802.3-c22";
-		reg = <0>;
+		reg = <0x0>;
 		interrupt-parent = <&gpio0>;
 		interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
 		reset-gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
@@ -101,7 +98,7 @@
 	ethphy1: ethernet-phy at 1 {
 		compatible = "ethernet-phy-id0141,0dd1",
 			     "ethernet-phy-ieee802.3-c22";
-		reg = <1>;
+		reg = <0x1>;
 		interrupt-parent = <&gpio1>;
 		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
 		reset-gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;



From lede-commits at lists.infradead.org  Sat May 25 11:05:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:31 -0400
Subject: [openwrt/openwrt]  mvebu: add support for Fortinet FortiWiFi 51E
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38388.1716660332.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/34c875cf8bda8b34274880afba0c91089f1ca489

commit 34c875cf8bda8b34274880afba0c91089f1ca489
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Mar 8 21:54:14 2023 +0900

    mvebu: add support for Fortinet FortiWiFi 51E
    
    Fortinet FortiWiFi 51E (FWF-51E) is a UTM with 1x WLAN and 1x SSD, based
    on Armada 385 (88F6820).
    
    Specification:
    
    - SoC          : Marvell Armada 385 88F6820
    - RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
    - Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
    - SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
      - mode       : SATA III 6Gbps
      - power      : 3.3 VDC, 3.1 W (Max.)
    - Ethernet     : 7x 10/100/1000 Mbps
      - LAN 1-5    : Marvell 88E6176
      - WAN 1, 2   : Marvell 88E1512 (2x)
    - WLAN         : Fortinet EMP7618-FT (Atheros AR9382 (2T2R))
      - interface  : MiniPCIe
    - LEDs/Keys    : 18x/1x
    - UART         : "CONSOLE" port (RJ-45, RS-232C level)
      - port       : ttyS0
      - settings   : 9600bps 8n1
      - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                     5:GND, 6:RXD, 7:NC , 8:NC
      - note       : compatible with Cisco console cable
    - HW Monitoring: nuvoTon NCT7802Y
    - Power        : 12 VDC, 2 A
      - plug       : Molex 5557-02R
    
    Flash instruction using initramfs image:
    
     1. Power on FWF-51E and interrupt to show bootmenu
     2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
        and set baudrate to 9600 bps
     3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
        connect computer to "Image download port" in the parameters
     4. Prepare TFTP server with the parameters obtained above
     5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
        directory
     6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
        image from TFTP server
     7. Type "R" key when the following message is showed, to boot initramfs
        image without flashing to spi-nor flash
    
        "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"
    
     8. On initramfs image, backup mtd if needed
    
        minimum:
    
        - "firmware-info"
        - "kernel"
        - "rootfs"
    
     9. On initramfs image, upload sysupgrade image to the device and perform
        sysupgrade
    10. Wait ~200 seconds to complete flashing and rebooting.
        If the device is booted with stock firmware, login to bootmenu and
        call "[B]: Boot with backup firmware and set as default." to set the
        first OS image as default and boot it.
    
    Notes:
    
    - Both colors of Bi-color LEDs on the front panel cannot be turned on at
      the same time.
    
    - "PWR" and "Logo" LEDs are connected to power source directly.
    
    - The following partitions are added for OpenWrt.
      These partitions are contained in "uboot" partition (0x0-0x1fffff) on
      stock firmware.
    
      - "firmware-info"
      - "dtb"
      - "u-boot-env"
      - "board-info"
    
    Image header for bootmenu tftp:
    
      0x0 - 0xf  : ?
     0x10 - 0x2f : Image Name
     0x30 - 0x17f: ?
    0x180 - 0x183: Kernel Offset*
    0x184 - 0x187: Kernel Length*
    0x188 - 0x18b: RootFS Offset (ext2)*
    0x18c - 0x18f: RootFS Length (ext2)*
    0x190 - 0x193: DTB Offset
    0x194 - 0x197: DTB Length
    0x198 - 0x19b: Data Offset (jffs2)
    0x19c - 0x19f: Data Length (jffs2)
    0x1a0 - 0x1ff: ?
    
    *: required for initramfs image
    
    MAC addresses:
    
    (eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
    WAN 1 : 90:6C:AC:xx:xx:99
    WAN 2 : 90:6C:AC:xx:xx:9A
    LAN 1 : 90:6C:AC:xx:xx:9B
    LAN 2 : 90:6C:AC:xx:xx:9C
    LAN 3 : 90:6C:AC:xx:xx:9D
    LAN 4 : 90:6C:AC:xx:xx:9E
    LAN 5 : 90:6C:AC:xx:xx:9F
    WLAN  : 88:DC:96:xx:xx:xx (MiniPCIe Card)
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
    Tested-by: Raylynn Knight <rayknight at me.com>
---
 .../mvebu/cortexa9/base-files/etc/board.d/02_network |  3 ++-
 .../cortexa9/base-files/lib/upgrade/platform.sh      |  3 ++-
 .../boot/dts/marvell/armada-385-fortinet-fwf-51e.dts | 20 ++++++++++++++++++++
 target/linux/mvebu/image/cortexa9.mk                 | 10 ++++++++++
 4 files changed, 34 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
index 890c149d30..680af1ce67 100644
--- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
@@ -31,7 +31,8 @@ mvebu_setup_interfaces()
 	fortinet,fg-50e|\
 	fortinet,fg-51e|\
 	fortinet,fg-52e|\
-	fortinet,fwf-50e-2r)
+	fortinet,fwf-50e-2r|\
+	fortinet,fwf-51e)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
index 639f08cef6..a15823d8c6 100755
--- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
@@ -56,7 +56,8 @@ platform_do_upgrade() {
 	fortinet,fg-50e|\
 	fortinet,fg-51e|\
 	fortinet,fg-52e|\
-	fortinet,fwf-50e-2r)
+	fortinet,fwf-50e-2r|\
+	fortinet,fwf-51e)
 		fortinet_do_upgrade "$1"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-51e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-51e.dts
new file mode 100644
index 0000000000..d9ebd9f815
--- /dev/null
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-51e.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "armada-385-fortinet-fg-5xe.dtsi"
+
+/ {
+	model = "Fortinet FortiWiFi 51E";
+	compatible = "fortinet,fwf-51e", "marvell,armada385", "marvell,armada380";
+};
+
+&ahci0 {
+	status = "okay";
+};
+
+&pciec {
+	status = "okay";
+};
+
+&pcie2 {
+	status = "okay";
+};
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 5cefdb846a..b3b8960a32 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -171,6 +171,16 @@ define Device/fortinet_fwf-50e-2r
 endef
 TARGET_DEVICES += fortinet_fwf-50e-2r
 
+define Device/fortinet_fwf-51e
+  $(Device/fortinet)
+  DEVICE_MODEL := FortiWiFi 51E
+  DEVICE_DTS := armada-385-fortinet-fwf-51e
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
+    gzip-filename FWF51E
+  DEVICE_PACKAGES += kmod-ath9k wpad-basic-mbedtls
+endef
+TARGET_DEVICES += fortinet_fwf-51e
+
 define Device/globalscale_mirabox
   $(Device/NAND-512K)
   DEVICE_VENDOR := Globalscale



From lede-commits at lists.infradead.org  Sat May 25 11:05:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:28 -0400
Subject: [openwrt/openwrt]  mvebu: add support for Fortinet FortiGate 51E
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38391.1716660332.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d406498e1b9a5d8562eece7f77138a18ca8a0201

commit d406498e1b9a5d8562eece7f77138a18ca8a0201
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat Jan 20 15:34:41 2024 +0900

    mvebu: add support for Fortinet FortiGate 51E
    
    Fortinet FortiGate 51E (FG-51E) is a UTM, based on Armada 385 (88F6820).
    
    Specification:
    
    - SoC          : Marvell Armada 385 88F6820
    - RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
    - Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
    - SSD          : mSATA SSD 32 GB (A-DATA XM21E (AXM21ES3-32GM-B))
      - mode       : SATA III 6Gbps
      - power      : 3.3 VDC, 3.1 W (Max.)
    - Ethernet     : 7x 10/100/1000 Mbps
      - LAN 1-5    : Marvell 88E6176
      - WAN 1, 2   : Marvell 88E1512 (2x)
    - LEDs/Keys    : 18x/1x
    - UART         : "CONSOLE" port (RJ-45, RS-232C level)
      - port       : ttyS0
      - settings   : 9600bps 8n1
      - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                     5:GND, 6:RXD, 7:NC , 8:NC
      - note       : compatible with Cisco console cable
    - HW Monitoring: nuvoTon NCT7802Y
    - Power        : 12 VDC, 2.5 A
      - plug       : Molex 5557-02R
    
    Flash instruction using initramfs image:
    
     1. Power on FG-51E and interrupt to show bootmenu
     2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
        and set baudrate to 9600 bps
     3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
        connect computer to "Image download port" in the parameters
     4. Prepare TFTP server with the parameters obtained above
     5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
        directory
     6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
        image from TFTP server
     7. Type "R" key when the following message is showed, to boot initramfs
        image without flashing to spi-nor flash
    
        "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"
    
     8. On initramfs image, backup mtd if needed
    
        minimum:
    
        - "firmware-info"
        - "kernel"
        - "rootfs"
    
     9. On initramfs image, upload sysupgrade image to the device and perform
        sysupgrade
    10. Wait ~200 seconds to complete flashing and rebooting.
        If the device is booted with stock firmware, login to bootmenu and
        call "[B]: Boot with backup firmware and set as default." to set the
        first OS image as default and boot it.
    
    Notes:
    
    - Both colors of Bi-color LEDs on the front panel cannot be turned on at
      the same time.
    
    - "PWR" and "Logo" LEDs are connected to power source directly.
    
    - The following partitions are added for OpenWrt.
      These partitions are contained in "uboot" partition (0x0-0x1fffff) on
      stock firmware.
    
      - "firmware-info"
      - "dtb"
      - "u-boot-env"
      - "board-info"
    
    Image header for bootmenu tftp:
    
      0x0 - 0xf  : ?
     0x10 - 0x2f : Image Name
     0x30 - 0x17f: ?
    0x180 - 0x183: Kernel Offset*
    0x184 - 0x187: Kernel Length*
    0x188 - 0x18b: RootFS Offset (ext2)*
    0x18c - 0x18f: RootFS Length (ext2)*
    0x190 - 0x193: DTB Offset
    0x194 - 0x197: DTB Length
    0x198 - 0x19b: Data Offset (jffs2)
    0x19c - 0x19f: Data Length (jffs2)
    0x1a0 - 0x1ff: ?
    
    *: required for initramfs image
    
    MAC addresses:
    
    (eth0): 70:4C:A5:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
    WAN 1 : 70:4C:A5:xx:xx:99
    WAN 2 : 70:4C:A5:xx:xx:9A
    LAN 1 : 70:4C:A5:xx:xx:9B
    LAN 2 : 70:4C:A5:xx:xx:9C
    LAN 3 : 70:4C:A5:xx:xx:9D
    LAN 4 : 70:4C:A5:xx:xx:9E
    LAN 5 : 70:4C:A5:xx:xx:9F
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
    Tested-by: Raylynn Knight <rayknight at me.com>
---
 .../linux/mvebu/cortexa9/base-files/etc/board.d/02_network   |  3 ++-
 .../linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh  |  3 ++-
 .../arch/arm/boot/dts/marvell/armada-385-fortinet-fg-51e.dts | 12 ++++++++++++
 target/linux/mvebu/image/cortexa9.mk                         |  9 +++++++++
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
index b9ac2bb1ae..d936f829c6 100644
--- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
@@ -28,7 +28,8 @@ mvebu_setup_interfaces()
 	linksys,wrt32x)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
 		;;
-	fortinet,fg-50e)
+	fortinet,fg-50e|\
+	fortinet,fg-51e)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
index 7f45aa8a91..9f645eeb48 100755
--- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
@@ -53,7 +53,8 @@ platform_do_upgrade() {
 		legacy_sdcard_do_upgrade "$1"
 		;;
 	fortinet,fg-30e|\
-	fortinet,fg-50e)
+	fortinet,fg-50e|\
+	fortinet,fg-51e)
 		fortinet_do_upgrade "$1"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-51e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-51e.dts
new file mode 100644
index 0000000000..7bb61113c5
--- /dev/null
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-51e.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "armada-385-fortinet-fg-5xe.dtsi"
+
+/ {
+	model = "Fortinet FortiGate 51E";
+	compatible = "fortinet,fg-51e", "marvell,armada385", "marvell,armada380";
+};
+
+&ahci0 {
+	status = "okay";
+};
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index a73e3ff5e5..5319e543e5 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -142,6 +142,15 @@ define Device/fortinet_fg-50e
 endef
 TARGET_DEVICES += fortinet_fg-50e
 
+define Device/fortinet_fg-51e
+  $(Device/fortinet)
+  DEVICE_MODEL := FortiGate 51E
+  DEVICE_DTS := armada-385-fortinet-fg-51e
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
+    gzip-filename FGT51E
+endef
+TARGET_DEVICES += fortinet_fg-51e
+
 define Device/globalscale_mirabox
   $(Device/NAND-512K)
   DEVICE_VENDOR := Globalscale



From lede-commits at lists.infradead.org  Sat May 25 11:05:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:26 -0400
Subject: [openwrt/openwrt]  mvebu: separate common parts to new dtsi for
 FortiGate/FortiWiFi 3xE
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38392.1716660332.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/77663df75462cc3f937ac398d7dd23b41ed824cd

commit 77663df75462cc3f937ac398d7dd23b41ed824cd
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Tue Dec 5 22:15:38 2023 +0900

    mvebu: separate common parts to new dtsi for FortiGate/FortiWiFi 3xE
    
    Add a new dtsi which contains the common parts of Fortinet
    FortiGate/FortiWiFi 3xE series devices.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../dts/marvell/armada-385-fortinet-fg-30e.dts     | 93 +---------------------
 ...-fg-30e.dts => armada-385-fortinet-fg-3xe.dtsi} |  3 -
 2 files changed, 1 insertion(+), 95 deletions(-)

diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
index b73f0f1fd2..e9e6c29213 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
@@ -1,99 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "armada-385-fortinet-fg-xxe.dtsi"
+#include "armada-385-fortinet-fg-3xe.dtsi"
 
 / {
 	model = "Fortinet FortiGate 30E";
 	compatible = "fortinet,fg-30e", "marvell,armada385", "marvell,armada380";
-
-	memory at 0 {
-		device_type = "memory";
-		reg = <0x00000000 0x40000000>; /* 1GB */
-	};
-};
-
-&gpio_leds {
-	led-14 {
-		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_AMBER>;
-		function = LED_FUNCTION_SPEED_WAN;
-		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
-	};
-
-	led-15 {
-		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
-		color = <LED_COLOR_ID_GREEN>;
-		function = LED_FUNCTION_SPEED_WAN;
-		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
-	};
-};
-
-&pinctrl {
-	pmx_switch_pins: switch-pins {
-		marvell,pins = "mpp19";
-		marvell,function = "gpio";
-	};
-};
-
-&mdio {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio_pins>, <&pmx_switch_pins>;
-
-	/* Marvell 88E6176 */
-	switch at 2 {
-		compatible = "marvell,mv88e6085";
-		reg = <0x2>;
-		reset-gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
-
-		ports {
-			#address-cells = <1>;
-			#size-cells = <0>;
-
-			port at 0 {
-				reg = <0>;
-				label = "wan";
-				nvmem-cells = <&macaddr_bdinfo_d880 1>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 1 {
-				reg = <1>;
-				label = "lan4";
-				nvmem-cells = <&macaddr_bdinfo_d880 5>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 2 {
-				reg = <2>;
-				label = "lan3";
-				nvmem-cells = <&macaddr_bdinfo_d880 4>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 3 {
-				reg = <3>;
-				label = "lan2";
-				nvmem-cells = <&macaddr_bdinfo_d880 3>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 4 {
-				reg = <4>;
-				label = "lan1";
-				nvmem-cells = <&macaddr_bdinfo_d880 2>;
-				nvmem-cell-names = "mac-address";
-			};
-
-			port at 6 {
-				reg = <6>;
-				ethernet = <&eth0>;
-				phy-connection-type = "rgmii-id";
-
-				fixed-link {
-					speed = <1000>;
-					full-duplex;
-				};
-			};
-		};
-	};
 };
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-3xe.dtsi
similarity index 94%
copy from target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
copy to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-3xe.dtsi
index b73f0f1fd2..44dd42201d 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-3xe.dtsi
@@ -3,9 +3,6 @@
 #include "armada-385-fortinet-fg-xxe.dtsi"
 
 / {
-	model = "Fortinet FortiGate 30E";
-	compatible = "fortinet,fg-30e", "marvell,armada385", "marvell,armada380";
-
 	memory at 0 {
 		device_type = "memory";
 		reg = <0x00000000 0x40000000>; /* 1GB */



From lede-commits at lists.infradead.org  Sat May 25 11:05:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:25 -0400
Subject: [openwrt/openwrt]  mvebu: rename common dtsi of FortiGate 30E/50E
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38393.1716660336.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/73be4b9e488235dc9d86054ffd35cb8e14088191

commit 73be4b9e488235dc9d86054ffd35cb8e14088191
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Tue Dec 5 22:15:38 2023 +0900

    mvebu: rename common dtsi of FortiGate 30E/50E
    
    Rename the common dtsi of Fortinet FortiGate 30E/50E for the preparation
    of adding support for the other FortiGate/FortiWiFi 3xE/5xE devices.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts  | 2 +-
 .../files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts  | 2 +-
 ...{armada-385-fortinet-fg-x0e.dtsi => armada-385-fortinet-fg-xxe.dtsi} | 0
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
index dca6fbacf0..b73f0f1fd2 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "armada-385-fortinet-fg-x0e.dtsi"
+#include "armada-385-fortinet-fg-xxe.dtsi"
 
 / {
 	model = "Fortinet FortiGate 30E";
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
index cf13bb5fda..c56a06fda0 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include "armada-385-fortinet-fg-x0e.dtsi"
+#include "armada-385-fortinet-fg-xxe.dtsi"
 
 / {
 	model = "Fortinet FortiGate 50E";
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-xxe.dtsi
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-xxe.dtsi



From lede-commits at lists.infradead.org  Sat May 25 11:05:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:29 -0400
Subject: [openwrt/openwrt]  mvebu: add support for Fortinet FortiGate 52E
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38394.1716660336.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/38d6c99dc06afd23831e5b0d9d4f4c7347eb557c

commit 38d6c99dc06afd23831e5b0d9d4f4c7347eb557c
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Mar 8 21:54:14 2023 +0900

    mvebu: add support for Fortinet FortiGate 52E
    
    Fortinet FortiGate 52E (FG-52E) is a UTM, based on Armada 385 (88F6820).
    
    Specification:
    
    - SoC          : Marvell Armada 385 88F6820
    - RAM          : DDR3 2 GiB (4x Micron MT41K512M8DA-107, "D9SGQ")
    - Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
    - SSD          : mSATA SSD 64 GB (2x A-DATA XM21E (AXM21ES3-32GM-B))
      - mode       : SATA III 6Gbps
      - power      : 3.3 VDC, 3.1 W (Max.)
    - Ethernet     : 7x 10/100/1000 Mbps
      - LAN 1-5    : Marvell 88E6176
      - WAN 1, 2   : Marvell 88E1512 (2x)
    - LEDs/Keys    : 18x/1x
    - UART         : "CONSOLE" port (RJ-45, RS-232C level)
      - port       : ttyS0
      - settings   : 9600bps 8n1
      - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                     5:GND, 6:RXD, 7:NC , 8:NC
      - note       : compatible with Cisco console cable
    - HW Monitoring: nuvoTon NCT7802Y
    - Power        : 12 VDC, 2.5 A
      - plug       : Molex 5557-02R
    
    Flash instruction using initramfs image:
    
     1. Power on FG-52E and interrupt to show bootmenu
     2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
        and set baudrate to 9600 bps
     3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
        connect computer to "Image download port" in the parameters
     4. Prepare TFTP server with the parameters obtained above
     5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
        directory
     6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
        image from TFTP server
     7. Type "R" key when the following message is showed, to boot initramfs
        image without flashing to spi-nor flash
    
        "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"
    
     8. On initramfs image, backup mtd if needed
    
        minimum:
    
        - "firmware-info"
        - "kernel"
        - "rootfs"
    
     9. On initramfs image, upload sysupgrade image to the device and perform
        sysupgrade
    10. Wait ~200 seconds to complete flashing and rebooting.
        If the device is booted with stock firmware, login to bootmenu and
        call "[B]: Boot with backup firmware and set as default." to set the
        first OS image as default and boot it.
    
    Notes:
    
    - Both colors of Bi-color LEDs on the front panel cannot be turned on at
      the same time.
    
    - "PWR" and "Logo" LEDs are connected to power source directly.
    
    - The following partitions are added for OpenWrt.
      These partitions are contained in "uboot" partition (0x0-0x1fffff) on
      stock firmware.
    
      - "firmware-info"
      - "dtb"
      - "u-boot-env"
      - "board-info"
    
    Image header for bootmenu tftp:
    
      0x0 - 0xf  : ?
     0x10 - 0x2f : Image Name
     0x30 - 0x17f: ?
    0x180 - 0x183: Kernel Offset*
    0x184 - 0x187: Kernel Length*
    0x188 - 0x18b: RootFS Offset (ext2)*
    0x18c - 0x18f: RootFS Length (ext2)*
    0x190 - 0x193: DTB Offset
    0x194 - 0x197: DTB Length
    0x198 - 0x19b: Data Offset (jffs2)
    0x19c - 0x19f: Data Length (jffs2)
    0x1a0 - 0x1ff: ?
    
    *: required for initramfs image
    
    MAC addresses:
    
    (eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
    WAN 1 : 90:6C:AC:xx:xx:99
    WAN 2 : 90:6C:AC:xx:xx:9A
    LAN 1 : 90:6C:AC:xx:xx:9B
    LAN 2 : 90:6C:AC:xx:xx:9C
    LAN 3 : 90:6C:AC:xx:xx:9D
    LAN 4 : 90:6C:AC:xx:xx:9E
    LAN 5 : 90:6C:AC:xx:xx:9F
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../linux/mvebu/cortexa9/base-files/etc/board.d/02_network   |  3 ++-
 .../linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh  |  3 ++-
 .../arch/arm/boot/dts/marvell/armada-385-fortinet-fg-52e.dts | 12 ++++++++++++
 target/linux/mvebu/image/cortexa9.mk                         |  9 +++++++++
 4 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
index d936f829c6..b3dbce8542 100644
--- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
@@ -29,7 +29,8 @@ mvebu_setup_interfaces()
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
 		;;
 	fortinet,fg-50e|\
-	fortinet,fg-51e)
+	fortinet,fg-51e|\
+	fortinet,fg-52e)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
index 9f645eeb48..bc39ddcf50 100755
--- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
@@ -54,7 +54,8 @@ platform_do_upgrade() {
 		;;
 	fortinet,fg-30e|\
 	fortinet,fg-50e|\
-	fortinet,fg-51e)
+	fortinet,fg-51e|\
+	fortinet,fg-52e)
 		fortinet_do_upgrade "$1"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-52e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-52e.dts
new file mode 100644
index 0000000000..bcb0d05627
--- /dev/null
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-52e.dts
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "armada-385-fortinet-fg-5xe.dtsi"
+
+/ {
+	model = "Fortinet FortiGate 52E";
+	compatible = "fortinet,fg-52e", "marvell,armada385", "marvell,armada380";
+};
+
+&ahci0 {
+	status = "okay";
+};
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 5319e543e5..00f81dc4fc 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -151,6 +151,15 @@ define Device/fortinet_fg-51e
 endef
 TARGET_DEVICES += fortinet_fg-51e
 
+define Device/fortinet_fg-52e
+  $(Device/fortinet)
+  DEVICE_MODEL := FortiGate 52E
+  DEVICE_DTS := armada-385-fortinet-fg-52e
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
+    gzip-filename FGT52E
+endef
+TARGET_DEVICES += fortinet_fg-52e
+
 define Device/globalscale_mirabox
   $(Device/NAND-512K)
   DEVICE_VENDOR := Globalscale



From lede-commits at lists.infradead.org  Sat May 25 11:05:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:05:30 -0400
Subject: [openwrt/openwrt]  mvebu: add support for Fortinet FortiWiFi 50E-2R
In-Reply-To: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
References: <171666032412.4120797.13850137842224304001@git-01.infra.openwrt.org>
Message-ID: <mailman.38395.1716660336.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/26a2135c6d2aad07b46ee82ecac4c54900adb151

commit 26a2135c6d2aad07b46ee82ecac4c54900adb151
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Mar 8 21:54:14 2023 +0900

    mvebu: add support for Fortinet FortiWiFi 50E-2R
    
    Fortinet FortiWiFi 50E-2R (FWF-50E-2R) is a UTM with 2x WLAN, based on
    Armada 385 (88F6820).
    
    Specification:
    
    - SoC          : Marvell Armada 385 88F6820
    - RAM          : DDR3 2 GiB (4x Nanya NT5CC512M8EN-EK)
    - Flash        : SPI-NOR 128 MiB (Macronix MX66L1G45GMI-10G)
    - Ethernet     : 7x 10/100/1000 Mbps
      - LAN 1-5    : Marvell 88E6176
      - WAN 1, 2   : Marvell 88E1512 (2x)
    - WLAN         : Gemtek WMDQ-177ACN (Qualcomm Atheros QCA9892 (2T2R))
                     (2x)
      - interface  : MiniPCIe
    - LEDs/Keys    : 18x/1x
    - UART         : "CONSOLE" port (RJ-45, RS-232C level)
      - port       : ttyS0
      - settings   : 9600bps 8n1
      - assignment : 1:NC , 2:NC , 3:TXD, 4:GND,
                     5:GND, 6:RXD, 7:NC , 8:NC
      - note       : compatible with Cisco console cable
    - HW Monitoring: nuvoTon NCT7802Y
    - Power        : 12 VDC, 2.5 A
      - plug       : Molex 5557-02R
    
    Flash instruction using initramfs image:
    
     1. Power on FWF-50E-2R and interrupt to show bootmenu
     2. Call "[I]: System information." -> "[S]: Set serial port baudrate."
        and set baudrate to 9600 bps
     3. Call "[R]: Review TFTP parameters.", check TFTP parameters and
        connect computer to "Image download port" in the parameters
     4. Prepare TFTP server with the parameters obtained above
     5. Rename OpenWrt initramfs image to "image.out" and put to TFTP
        directory
     6. Call "[T]: Initiate TFTP firmware transfer." to download initramfs
        image from TFTP server
     7. Type "R" key when the following message is showed, to boot initramfs
        image without flashing to spi-nor flash
    
        "Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?"
    
     8. On initramfs image, backup mtd if needed
    
        minimum:
    
        - "firmware-info"
        - "kernel"
        - "rootfs"
    
     9. On initramfs image, upload sysupgrade image to the device and perform
        sysupgrade
    10. Wait ~200 seconds to complete flashing and rebooting.
        If the device is booted with stock firmware, login to bootmenu and
        call "[B]: Boot with backup firmware and set as default." to set the
        first OS image as default and boot it.
    
    Notes:
    
    - Both colors of Bi-color LEDs on the front panel cannot be turned on at
      the same time.
    
    - "PWR" and "Logo" LEDs are connected to power source directly.
    
    - The following partitions are added for OpenWrt.
      These partitions are contained in "uboot" partition (0x0-0x1fffff) on
      stock firmware.
    
      - "firmware-info"
      - "dtb"
      - "u-boot-env"
      - "board-info"
    
    Image header for bootmenu tftp:
    
      0x0 - 0xf  : ?
     0x10 - 0x2f : Image Name
     0x30 - 0x17f: ?
    0x180 - 0x183: Kernel Offset*
    0x184 - 0x187: Kernel Length*
    0x188 - 0x18b: RootFS Offset (ext2)*
    0x18c - 0x18f: RootFS Length (ext2)*
    0x190 - 0x193: DTB Offset
    0x194 - 0x197: DTB Length
    0x198 - 0x19b: Data Offset (jffs2)
    0x19c - 0x19f: Data Length (jffs2)
    0x1a0 - 0x1ff: ?
    
    *: required for initramfs image
    
    MAC addresses:
    
    (eth0): 90:6C:AC:xx:xx:98 (board-info (OpenWrt), 0xd880 (hex))
    WAN 1 : 90:6C:AC:xx:xx:99
    WAN 2 : 90:6C:AC:xx:xx:9A
    LAN 1 : 90:6C:AC:xx:xx:9B
    LAN 2 : 90:6C:AC:xx:xx:9C
    LAN 3 : 90:6C:AC:xx:xx:9D
    LAN 4 : 90:6C:AC:xx:xx:9E
    LAN 5 : 90:6C:AC:xx:xx:9F
    WLAN 1: 1C:49:7B:xx:xx:xx (MiniPCIe Card)
    WLAN 2: 1C:49:7B:xx:xx:xx (MiniPCIe Card)
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
    Tested-by: Raylynn Knight <rayknight at me.com>
---
 .../mvebu/cortexa9/base-files/etc/board.d/02_network |  3 ++-
 .../cortexa9/base-files/lib/upgrade/platform.sh      |  3 ++-
 .../dts/marvell/armada-385-fortinet-fwf-50e-2r.dts   | 20 ++++++++++++++++++++
 target/linux/mvebu/image/cortexa9.mk                 | 11 +++++++++++
 4 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
index b3dbce8542..890c149d30 100644
--- a/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
+++ b/target/linux/mvebu/cortexa9/base-files/etc/board.d/02_network
@@ -30,7 +30,8 @@ mvebu_setup_interfaces()
 		;;
 	fortinet,fg-50e|\
 	fortinet,fg-51e|\
-	fortinet,fg-52e)
+	fortinet,fg-52e|\
+	fortinet,fwf-50e-2r)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 lan5" "eth1 eth2"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
index bc39ddcf50..639f08cef6 100755
--- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/platform.sh
@@ -55,7 +55,8 @@ platform_do_upgrade() {
 	fortinet,fg-30e|\
 	fortinet,fg-50e|\
 	fortinet,fg-51e|\
-	fortinet,fg-52e)
+	fortinet,fg-52e|\
+	fortinet,fwf-50e-2r)
 		fortinet_do_upgrade "$1"
 		;;
 	iij,sa-w2)
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-50e-2r.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-50e-2r.dts
new file mode 100644
index 0000000000..eee9e6d942
--- /dev/null
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fwf-50e-2r.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "armada-385-fortinet-fg-5xe.dtsi"
+
+/ {
+	model = "Fortinet FortiWiFi 50E-2R";
+	compatible = "fortinet,fwf-50e-2r", "marvell,armada385", "marvell,armada380";
+};
+
+&pciec {
+	status = "okay";
+};
+
+&pcie1 {
+	status = "okay";
+};
+
+&pcie2 {
+	status = "okay";
+};
diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index 00f81dc4fc..5cefdb846a 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -160,6 +160,17 @@ define Device/fortinet_fg-52e
 endef
 TARGET_DEVICES += fortinet_fg-52e
 
+define Device/fortinet_fwf-50e-2r
+  $(Device/fortinet)
+  DEVICE_MODEL := FortiWiFi 50E-2R
+  DEVICE_DTS := armada-385-fortinet-fwf-50e-2r
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | fortigate-header | \
+    gzip-filename FW502R
+  DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct \
+    wpad-basic-mbedtls
+endef
+TARGET_DEVICES += fortinet_fwf-50e-2r
+
 define Device/globalscale_mirabox
   $(Device/NAND-512K)
   DEVICE_VENDOR := Globalscale



From lede-commits at lists.infradead.org  Sat May 25 11:19:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:39 -0400
Subject: [openwrt/openwrt]  ls-rcw: Bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38398.1716661183.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1cceadf3ce3bab1ddf67e8fd8e1362b9461a3741

commit 1cceadf3ce3bab1ddf67e8fd8e1362b9461a3741
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 10:47:48 2024 +0100

    ls-rcw: Bump to lf-6.6.3-1.0.0
    
    Bump ls-rcw package to lf-6.6.3-1.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/firmware/layerscape/ls-rcw/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile
index 3565c540d7..98ffe3c679 100644
--- a/package/firmware/layerscape/ls-rcw/Makefile
+++ b/package/firmware/layerscape/ls-rcw/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ls-rcw
-PKG_VERSION:=lf-6.1.1-1.0.0
+PKG_VERSION:=6.6.3.1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/rcw
-PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=6d505c1a60046a79c91b69cd6e26a2ef3515d7cb2999bdc9defcb664a1a5aef9
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=da45ce99a0ff85375673fa8c05110c3bda36dedca4ac66190809328f79878a0a
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sat May 25 11:19:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:42 -0400
Subject: [openwrt/openwrt]  tfa-layerscape: Bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38399.1716661186.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9d443409529f9e558bafa57276156c1bd1cc1b2f

commit 9d443409529f9e558bafa57276156c1bd1cc1b2f
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 12:29:08 2024 +0100

    tfa-layerscape: Bump to lf-6.6.3-1.0.0
    
    This commit bumps tfa-layerscape package to version lf-6.6.3-1.0.0
    
    Manually rebased:
    001-fiptool-hostbuild-fixes.patch
    004-plat-nxp-restore-ls1012afrdm-support.patch
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/boot/tfa-layerscape/Makefile               |  6 +--
 .../patches/001-fiptool-hostbuild-fixes.patch      | 46 +++++++++++-----------
 .../004-plat-nxp-restore-ls1012afrdm-support.patch | 31 +--------------
 3 files changed, 28 insertions(+), 55 deletions(-)

diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile
index b92516ceb0..bf155b926a 100644
--- a/package/boot/tfa-layerscape/Makefile
+++ b/package/boot/tfa-layerscape/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tfa-layerscape
-PKG_VERSION:=lf-6.1.1-1.0.0
+PKG_VERSION:=6.6.3.1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/atf
-PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=e109ca87a0f432529ab4d1fcd019adc0cd0d3684c96cdf770aac113f9bbe4bd6
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=28b731c1c4cc3226ccaef2142c61127f213c03cbd219df556c1d191e95f8470c
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 include $(INCLUDE_DIR)/host-build.mk
diff --git a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
index 50ce6528d7..050b4356ef 100644
--- a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
+++ b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -914,10 +914,6 @@ CRTTOOL			?=	${CRTTOOLPATH}/cert_create$
+@@ -953,10 +953,6 @@ CRTTOOL			?=	${CRTTOOLPATH}/cert_create$
  ENCTOOLPATH		?=	tools/encrypt_fw
  ENCTOOL			?=	${ENCTOOLPATH}/encrypt_fw${BIN_EXT}
  
@@ -10,8 +10,8 @@
 -
  # Variables for use with sptool
  SPTOOLPATH		?=	tools/sptool
- SPTOOL			?=	${SPTOOLPATH}/sptool${BIN_EXT}
-@@ -1322,13 +1318,6 @@ endif
+ SPTOOL			?=	${SPTOOLPATH}/sptool.py
+@@ -1409,13 +1405,6 @@ endif
  clean:
  	@echo "  CLEAN"
  	$(call SHELL_REMOVE_DIR,${BUILD_PLAT})
@@ -25,7 +25,7 @@
  	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
  	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} clean
  	${Q}${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
-@@ -1337,13 +1326,6 @@ realclean distclean:
+@@ -1424,13 +1413,6 @@ realclean distclean:
  	@echo "  REALCLEAN"
  	$(call SHELL_REMOVE_DIR,${BUILD_BASE})
  	$(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*)
@@ -36,28 +36,28 @@
 -# to pass the gnumake flags to nmake.
 -	${Q}set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) realclean
 -endif
- 	${Q}${MAKE} --no-print-directory -C ${SPTOOLPATH} clean
- 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
+ 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} realclean
  	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} realclean
-@@ -1400,7 +1382,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL}
+ 	${Q}${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
+@@ -1486,7 +1468,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL}
  	@${ECHO_BLANK_LINE}
  endif
  
 -${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL}
 +${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS}
-	$(eval ${CHECK_FIP_CMD})
-	${Q}${FIPTOOL} create ${FIP_ARGS} $@
-	${Q}${FIPTOOL} info $@
-@@ -1417,7 +1399,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTT
+ 	$(eval ${CHECK_FIP_CMD})
+ 	${Q}${FIPTOOL} create ${FIP_ARGS} $@
+ 	${Q}${FIPTOOL} info $@
+@@ -1503,7 +1485,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTT
  	@${ECHO_BLANK_LINE}
  endif
  
 -${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL}
 +${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS}
-	$(eval ${CHECK_FWU_FIP_CMD})
-	${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@
-	${Q}${FIPTOOL} info $@
-@@ -1425,19 +1407,9 @@ ${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP
+ 	$(eval ${CHECK_FWU_FIP_CMD})
+ 	${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@
+ 	${Q}${FIPTOOL} info $@
+@@ -1511,19 +1493,9 @@ ${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP
  	@echo "Built $@ successfully"
  	@${ECHO_BLANK_LINE}
  
@@ -67,29 +67,29 @@
  
 -${FIPTOOL}: FORCE
 -ifdef UNIX_MK
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} --no-print-directory -C ${FIPTOOLPATH}
+-	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${FIPTOOLPATH} all
 -else
 -# Clear the MAKEFLAGS as we do not want
 -# to pass the gnumake flags to nmake.
 -	${Q}set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL))
 -endif
 -
- sptool: ${SPTOOL}
- ${SPTOOL}: FORCE
-	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" SPTOOL=${SPTOOL} --no-print-directory -C ${SPTOOLPATH}
+ romlib.bin: libraries FORCE
+ 	${Q}${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES='${INCLUDES}' DEFINES='${DEFINES}' --no-print-directory -C ${ROMLIBPATH} all
+ 
 --- a/tools/fiptool/Makefile
 +++ b/tools/fiptool/Makefile
-@@ -48,7 +48,7 @@ all: ${PROJECT}
+@@ -67,7 +67,7 @@ all: ${PROJECT}
  
- ${PROJECT}: ${OBJECTS} Makefile
+ ${PROJECT}: --openssl ${OBJECTS} Makefile
  	@echo "  HOSTLD  $@"
 -	${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
 +	${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} $(LDFLAGS)
  	@${ECHO_BLANK_LINE}
  	@echo "Built $@ successfully"
  	@${ECHO_BLANK_LINE}
---- a/tools/nxp/plat_fiptool/plat_fiptool.mk	2023-05-20 22:28:28.079945619 +0200
-+++ b/tools/nxp/plat_fiptool/plat_fiptool.mk	2023-05-20 22:26:59.443307771 +0200
+--- a/tools/nxp/plat_fiptool/plat_fiptool.mk
++++ b/tools/nxp/plat_fiptool/plat_fiptool.mk
 @@ -22,11 +22,11 @@ INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_C
  $(shell rm ${PLAT_DEF_UUID_CONFIG_FILE_PATH}/${PLAT_DEF_UUID_CONFIG_FILE_NAME}.o)
  
diff --git a/package/boot/tfa-layerscape/patches/004-plat-nxp-restore-ls1012afrdm-support.patch b/package/boot/tfa-layerscape/patches/004-plat-nxp-restore-ls1012afrdm-support.patch
index fc9504f82f..1587da7ebf 100644
--- a/package/boot/tfa-layerscape/patches/004-plat-nxp-restore-ls1012afrdm-support.patch
+++ b/package/boot/tfa-layerscape/patches/004-plat-nxp-restore-ls1012afrdm-support.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] tfa-layerscape: Restore ls1012afrdm support
 Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik at protonmail.ch>
 ---
  plat/nxp/soc-ls1012a/ls1012afrdm/ddr_init.c   | 34 +++++++
- plat/nxp/soc-ls1012a/ls1012afrdm/plat_def.h   | 92 +++++++++++++++++++
+ plat/nxp/soc-ls1012a/ls1012afrdm/plat_def.h   | 83 +++++++++++++++++++
  plat/nxp/soc-ls1012a/ls1012afrdm/platform.mk  | 25 +++++
  .../soc-ls1012a/ls1012afrdm/platform_def.h    | 13 +++
  plat/nxp/soc-ls1012a/ls1012afrdm/policy.h     | 16 ++++
@@ -17,9 +17,6 @@ Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik at protonmail.ch>
  create mode 100644 plat/nxp/soc-ls1012a/ls1012afrdm/platform_def.h
  create mode 100644 plat/nxp/soc-ls1012a/ls1012afrdm/policy.h
 
-diff --git a/plat/nxp/soc-ls1012a/ls1012afrdm/ddr_init.c b/plat/nxp/soc-ls1012a/ls1012afrdm/ddr_init.c
-new file mode 100644
-index 000000000..8cb518540
 --- /dev/null
 +++ b/plat/nxp/soc-ls1012a/ls1012afrdm/ddr_init.c
 @@ -0,0 +1,34 @@
@@ -57,12 +54,9 @@ index 000000000..8cb518540
 +
 +	return NXP_DRAM0_SIZE;
 +}
-diff --git a/plat/nxp/soc-ls1012a/ls1012afrdm/plat_def.h b/plat/nxp/soc-ls1012a/ls1012afrdm/plat_def.h
-new file mode 100644
-index 000000000..eb745a0a3
 --- /dev/null
 +++ b/plat/nxp/soc-ls1012a/ls1012afrdm/plat_def.h
-@@ -0,0 +1,92 @@
+@@ -0,0 +1,83 @@
 +/*
 + * Copyright 2022 NXP
 + *
@@ -129,15 +123,6 @@ index 000000000..eb745a0a3
 +#define MAX_FIP_DEVICES		1
 +#endif
 +
-+#ifdef PLAT_FIP_OFFSET
-+#undef PLAT_FIP_OFFSET
-+#endif
-+#ifdef PLAT_FIP_MAX_SIZE
-+#undef PLAT_FIP_MAX_SIZE
-+#endif
-+#define PLAT_FIP_OFFSET		0x60000
-+#define PLAT_FIP_MAX_SIZE	0x170000
-+
 +/*
 + * ID of the secure physical generic timer interrupt used by the BL32.
 + */
@@ -155,9 +140,6 @@ index 000000000..eb745a0a3
 +#define PLAT_LS_G0_IRQ_PROPS(grp)
 +
 +#endif
-diff --git a/plat/nxp/soc-ls1012a/ls1012afrdm/platform.mk b/plat/nxp/soc-ls1012a/ls1012afrdm/platform.mk
-new file mode 100644
-index 000000000..270e92420
 --- /dev/null
 +++ b/plat/nxp/soc-ls1012a/ls1012afrdm/platform.mk
 @@ -0,0 +1,25 @@
@@ -186,9 +168,6 @@ index 000000000..270e92420
 +
 +# Adding SoC build info
 +include plat/nxp/soc-ls1012a/soc.mk
-diff --git a/plat/nxp/soc-ls1012a/ls1012afrdm/platform_def.h b/plat/nxp/soc-ls1012a/ls1012afrdm/platform_def.h
-new file mode 100644
-index 000000000..7daf1c02c
 --- /dev/null
 +++ b/plat/nxp/soc-ls1012a/ls1012afrdm/platform_def.h
 @@ -0,0 +1,13 @@
@@ -205,9 +184,6 @@ index 000000000..7daf1c02c
 +#include <plat_default_def.h>
 +
 +#endif /* PLATFORM_DEF_H */
-diff --git a/plat/nxp/soc-ls1012a/ls1012afrdm/policy.h b/plat/nxp/soc-ls1012a/ls1012afrdm/policy.h
-new file mode 100644
-index 000000000..a782d01c7
 --- /dev/null
 +++ b/plat/nxp/soc-ls1012a/ls1012afrdm/policy.h
 @@ -0,0 +1,16 @@
@@ -227,6 +203,3 @@ index 000000000..a782d01c7
 +#define POLICY_SMMU_PAGESZ_64K 0x0
 +
 +#endif /* POLICY_H */
--- 
-2.34.1
-



From lede-commits at lists.infradead.org  Sat May 25 11:19:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:43 -0400
Subject: [openwrt/openwrt]  kernel/layerscape: Create kernel files for v6.6
 (from v6.1)
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38400.1716661186.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0a22ccaad67b731b1808a53531475efb323a4802

commit 0a22ccaad67b731b1808a53531475efb323a4802
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 12:42:37 2024 +0100

    kernel/layerscape: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/layerscape/armv7/{config-6.1 => config-6.6}                  | 0
 target/linux/layerscape/armv8_64b/{config-6.1 => config-6.6}              | 0
 .../302-arm64-dts-ls1012a-update-with-ppfe-support.patch                  | 0
 .../303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch        | 0
 .../304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch        | 0
 .../305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch        | 0
 .../400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch        | 0
 .../{patches-6.1 => patches-6.6}/701-staging-add-fsl_ppfe-driver.patch    | 0
 .../702-phy-Add-2.5G-SGMII-interface-mode.patch                           | 0
 .../703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch        | 0
 .../704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch        | 0
 11 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/layerscape/armv7/config-6.1 b/target/linux/layerscape/armv7/config-6.6
similarity index 100%
rename from target/linux/layerscape/armv7/config-6.1
rename to target/linux/layerscape/armv7/config-6.6
diff --git a/target/linux/layerscape/armv8_64b/config-6.1 b/target/linux/layerscape/armv8_64b/config-6.6
similarity index 100%
rename from target/linux/layerscape/armv8_64b/config-6.1
rename to target/linux/layerscape/armv8_64b/config-6.6
diff --git a/target/linux/layerscape/patches-6.1/302-arm64-dts-ls1012a-update-with-ppfe-support.patch b/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
rename to target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
diff --git a/target/linux/layerscape/patches-6.1/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch b/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
rename to target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
diff --git a/target/linux/layerscape/patches-6.1/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch b/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
rename to target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
diff --git a/target/linux/layerscape/patches-6.1/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch b/target/linux/layerscape/patches-6.6/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
rename to target/linux/layerscape/patches-6.6/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
diff --git a/target/linux/layerscape/patches-6.1/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
rename to target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
diff --git a/target/linux/layerscape/patches-6.1/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/701-staging-add-fsl_ppfe-driver.patch
rename to target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
diff --git a/target/linux/layerscape/patches-6.1/702-phy-Add-2.5G-SGMII-interface-mode.patch b/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/702-phy-Add-2.5G-SGMII-interface-mode.patch
rename to target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
diff --git a/target/linux/layerscape/patches-6.1/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch b/target/linux/layerscape/patches-6.6/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
rename to target/linux/layerscape/patches-6.6/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
diff --git a/target/linux/layerscape/patches-6.1/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch b/target/linux/layerscape/patches-6.6/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.1/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch
rename to target/linux/layerscape/patches-6.6/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch



From lede-commits at lists.infradead.org  Sat May 25 11:19:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:46 -0400
Subject: [openwrt/openwrt]  generic: kernel add 6.6 missing symbols
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38401.1716661186.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c9ecca141ac756a27b08d25af01194429f139973

commit c9ecca141ac756a27b08d25af01194429f139973
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Tue Mar 26 11:07:09 2024 +0100

    generic: kernel add 6.6 missing symbols
    
    Found durring works on layerscape.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/generic/config-6.6 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index d6836ebfb8..e0dbd32c32 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -1141,6 +1141,7 @@ CONFIG_CRC32_SARWATE=y
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC_ITU_T is not set
 # CONFIG_CRC_T10DIF is not set
+# CONFIG_CROS_HPS_I2C is not set
 CONFIG_CROSS_COMPILE=""
 # CONFIG_CROSS_MEMORY_ATTACH is not set
 CONFIG_CRYPTO=y
@@ -1222,6 +1223,9 @@ CONFIG_CRYPTO_CTR=y
 # CONFIG_CRYPTO_DEV_CCREE is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM is not set
 # CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC is not set
+# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
+# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
+# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set
 # CONFIG_CRYPTO_DEV_HIFN_795X is not set
 # CONFIG_CRYPTO_DEV_HISI_SEC is not set
 # CONFIG_CRYPTO_DEV_HISI_ZIP is not set
@@ -2837,6 +2841,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
 # CONFIG_IMG_MDC_DMA is not set
 # CONFIG_IMX7D_ADC is not set
 # CONFIG_IMX8QXP_ADC is not set
+# CONFIG_IMX93_ADC is not set
 # CONFIG_IMX_IPUV3_CORE is not set
 # CONFIG_IMX_THERMAL is not set
 # CONFIG_INA2XX_ADC is not set
@@ -7799,6 +7804,9 @@ CONFIG_VHOST_MENU=y
 # CONFIG_VIDEO_IMX477 is not set
 # CONFIG_VIDEO_IMX519 is not set
 # CONFIG_VIDEO_IMX708 is not set
+# CONFIG_VIDEO_IMX7_CSI is not set
+# CONFIG_VIDEO_IMX8MQ_MIPI_CSI2 is not set
+# CONFIG_VIDEO_IMX8_ISI is not set
 # CONFIG_VIDEO_IMX8_JPEG is not set
 # CONFIG_VIDEO_IMX_MIPI_CSIS is not set
 # CONFIG_VIDEO_IMX_PXP is not set



From lede-commits at lists.infradead.org  Sat May 25 11:19:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:37 -0400
Subject: [openwrt/openwrt]  fman-ucode: Bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38402.1716661186.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00c59f8d04d6125908402fe62a50278677f1d488

commit 00c59f8d04d6125908402fe62a50278677f1d488
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 10:42:15 2024 +0100

    fman-ucode: Bump to lf-6.6.3-1.0.0
    
    Bump fman-ucode to version lf-6.6.3-1.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/firmware/layerscape/fman-ucode/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile
index 99729e0b83..3dc1bfcb14 100644
--- a/package/firmware/layerscape/fman-ucode/Makefile
+++ b/package/firmware/layerscape/fman-ucode/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fman-ucode
-PKG_VERSION:=lf-6.1.1-1.0.0
+PKG_VERSION:=6.6.3.1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-fm-ucode
-PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=d69792e0b03f2fd00cb9d69325d9817b43fb14dd1b27e41018b3ea69b25c55a5
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=6bb9dd8ae0ac7b2ba0e5bc5e0590732167844a1b2c9316fbdcdd04e600785b0c
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sat May 25 11:19:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:38 -0400
Subject: [openwrt/openwrt]  ls-ddr-phy: bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38405.1716661190.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b6af057cbf27374e1a2e088c5a6eab00c1bb9485

commit b6af057cbf27374e1a2e088c5a6eab00c1bb9485
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 10:44:47 2024 +0100

    ls-ddr-phy: bump to lf-6.6.3-1.0.0
    
    Bump ls-ddr-phy to version lf-6.6.3-1.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/firmware/layerscape/ls-ddr-phy/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile
index 848ee4e85f..ce39ea7dc6 100644
--- a/package/firmware/layerscape/ls-ddr-phy/Makefile
+++ b/package/firmware/layerscape/ls-ddr-phy/Makefile
@@ -6,13 +6,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ls-ddr-phy
-PKG_VERSION:=21.08
-PKG_RELEASE:=3
+PKG_VERSION:=6.6.3.1.0.0
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/NXP/ddr-phy-binary.git
-PKG_SOURCE_VERSION:=LSDK-21.08
-PKG_MIRROR_HASH:=2f9bf4f6b2410e436e4e606f981c71919b1896e4da4f204de483d9f7677a064d
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=7a1a35b3060adba875c507be3a5c800fa0c461103aaeb8eb0eab11f1f4b8139f
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 PKG_LICENSE:=EULA



From lede-commits at lists.infradead.org  Sat May 25 11:19:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:41 -0400
Subject: [openwrt/openwrt]  uboot-layerscape: bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38406.1716661190.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/35efee132963b0c3211e14ea68e79721561de195

commit 35efee132963b0c3211e14ea68e79721561de195
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 11:42:42 2024 +0100

    uboot-layerscape: bump to lf-6.6.3-1.0.0
    
    This commit bumps u-boot layerscape package to lf-6.6.3-1.0.0 version.
    
    Removed upstreamed:
    0001-board-ls1046ardb-force-PCI-device-enumeration.patch
    0002-board-ls1043ardb-force-PCI-device-enumeration.patch
    
    Manually rebased:
    0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/boot/uboot-layerscape/Makefile             |  9 ++---
 ...d-ls1046ardb-force-PCI-device-enumeration.patch | 33 ------------------
 ...d-ls1043ardb-force-PCI-device-enumeration.patch | 34 ------------------
 ...ape-adjust-LS1021A-IOT-config-for-OpenWrt.patch | 40 ++++++++++++----------
 4 files changed, 25 insertions(+), 91 deletions(-)

diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile
index 8c5e32587d..722f4f30b7 100644
--- a/package/boot/uboot-layerscape/Makefile
+++ b/package/boot/uboot-layerscape/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uboot-layerscape
-PKG_VERSION:=lf-6.1.1-1.0.0
+PKG_VERSION:=6.6.3.1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/u-boot
-PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=6cb3cd569f11f582375eb3af475a2a0d77fe602813337b64883ef01344be7bf6
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=dec5b6e4fe328b930f201fbf06a0a7b71a9dd72f38f16c9570188c0a7fea916a
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
@@ -30,19 +30,16 @@ endef
 define U-Boot/fsl_ls1012a-frdm
   NAME:=NXP LS1012AFRDM
   UBOOT_CONFIG:=ls1012afrdm_tfa
-  ENV_SIZE:=0x40000
 endef
 
 define U-Boot/fsl_ls1012a-rdb
   NAME:=NXP LS1012ARDB
   UBOOT_CONFIG:=ls1012ardb_tfa
-  ENV_SIZE:=0x40000
 endef
 
 define U-Boot/fsl_ls1012a-frwy-sdboot
   NAME:=NXP LS1012AFRWY
   UBOOT_CONFIG:=ls1012afrwy_tfa
-  ENV_SIZE:=0x10000
 endef
 
 define U-Boot/fsl_ls1028a-rdb
diff --git a/package/boot/uboot-layerscape/patches/0001-board-ls1046ardb-force-PCI-device-enumeration.patch b/package/boot/uboot-layerscape/patches/0001-board-ls1046ardb-force-PCI-device-enumeration.patch
deleted file mode 100644
index 25a6b16363..0000000000
--- a/package/boot/uboot-layerscape/patches/0001-board-ls1046ardb-force-PCI-device-enumeration.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 089b90b11008ec95a56da12e31d11e3f31a9bb26 Mon Sep 17 00:00:00 2001
-From: Martin Schiller <ms at dev.tdt.de>
-Date: Wed, 17 Nov 2021 07:29:55 +0100
-Subject: [PATCH] board: ls1046ardb: force PCI device enumeration
-
-Commit 045ecf899252 ("configs: enable DM_ETH support for LS1046ARDB")
-resulted in the PCI bus no longer being implicitly enumerated.
-
-However, this is necessary for the fdt pcie fixups to work.
-
-Therefore, similar to commit 8b6558bd4187 ("board: ls1088ardb:
-transition to DM_ETH"), pci_init() is now called in the board_init()
-routine when CONFIG_DM_ETH is active.
-
-Signed-off-by: Martin Schiller <ms at dev.tdt.de>
-CC: Priyanka Jain <priyanka.jain at nxp.com>
----
- board/freescale/ls1046ardb/ls1046ardb.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/board/freescale/ls1046ardb/ls1046ardb.c
-+++ b/board/freescale/ls1046ardb/ls1046ardb.c
-@@ -88,6 +88,10 @@ int board_init(void)
- 	ppa_init();
- #endif
- 
-+#if !defined(CONFIG_SYS_EARLY_PCI_INIT) && defined(CONFIG_DM_ETH)
-+	pci_init();
-+#endif
-+
- 	/* invert AQR105 IRQ pins polarity */
- 	out_be32(&scfg->intpcr, AQR105_IRQ_MASK);
- 
diff --git a/package/boot/uboot-layerscape/patches/0002-board-ls1043ardb-force-PCI-device-enumeration.patch b/package/boot/uboot-layerscape/patches/0002-board-ls1043ardb-force-PCI-device-enumeration.patch
deleted file mode 100644
index d38102a13c..0000000000
--- a/package/boot/uboot-layerscape/patches/0002-board-ls1043ardb-force-PCI-device-enumeration.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 64d2dffa8b51c1beb7e472690dcac965ac0f7ac4 Mon Sep 17 00:00:00 2001
-From: Martin Schiller <ms at dev.tdt.de>
-Date: Tue, 23 Nov 2021 07:24:19 +0100
-Subject: [PATCH] board: ls1043ardb: force PCI device enumeration
-
-Commit eb1986804d1d ("configs: enable DM_ETH support for LS1043ARDB")
-resulted in the PCI bus no longer being implicitly enumerated.
-
-However, this is necessary for the fdt pcie fixups to work.
-
-Therefore, similar to commit 8b6558bd4187 ("board: ls1088ardb:
-transition to DM_ETH"), pci_init() is now called in the board_init()
-routine when CONFIG_DM_ETH is active.
-
-Signed-off-by: Martin Schiller <ms at dev.tdt.de>
-CC: Priyanka Jain <priyanka.jain at nxp.com>
-CC: Camelia Groza <camelia.groza at nxp.com>
----
- board/freescale/ls1043ardb/ls1043ardb.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/board/freescale/ls1043ardb/ls1043ardb.c
-+++ b/board/freescale/ls1043ardb/ls1043ardb.c
-@@ -214,6 +214,10 @@ int board_init(void)
- 	ppa_init();
- #endif
- 
-+#if !defined(CONFIG_SYS_EARLY_PCI_INIT) && defined(CONFIG_DM_ETH)
-+	pci_init();
-+#endif
-+
- #ifdef CONFIG_U_QE
- 	u_qe_init();
- #endif
diff --git a/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch b/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
index 414f2541ac..fbd96c0fa9 100644
--- a/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
+++ b/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
@@ -1,4 +1,4 @@
-From b382eeafe01df21da3518b2f1dd7d22ee114efb0 Mon Sep 17 00:00:00 2001
+From 54a19a8c97608c71b440639c878f2f57b5add95d Mon Sep 17 00:00:00 2001
 From: Pawel Dembicki <paweldembicki at gmail.com>
 Date: Mon, 24 Oct 2022 14:19:38 +0200
 Subject: [PATCH] layerscape: adjust LS1021A-IOT config for OpenWrt
@@ -12,13 +12,30 @@ Let's enable it. U-boot is now bigger than 512K. Let's enlarge it to
 
 Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 ---
- configs/ls1021aiot_sdcard_defconfig | 3 +++
- include/configs/ls1021aiot.h        | 4 ++--
- 2 files changed, 5 insertions(+), 2 deletions(-)
+ configs/ls1021aiot_sdcard_defconfig | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
 
 --- a/configs/ls1021aiot_sdcard_defconfig
 +++ b/configs/ls1021aiot_sdcard_defconfig
-@@ -27,8 +27,11 @@ CONFIG_CMD_MII=y
+@@ -24,7 +24,7 @@ CONFIG_AHCI=y
+ CONFIG_LAYERSCAPE_NS_ACCESS=y
+ CONFIG_PCIE1=y
+ CONFIG_PCIE2=y
+-CONFIG_SYS_MONITOR_LEN=524288
++CONFIG_SYS_MONITOR_LEN=786432
+ CONFIG_OF_BOARD_SETUP=y
+ CONFIG_OF_STDOUT_VIA_ALIAS=y
+ CONFIG_RAMBOOT_PBL=y
+@@ -40,7 +40,7 @@ CONFIG_SPL_MAX_SIZE=0x1a000
+ CONFIG_SPL_PAD_TO=0x1c000
+ CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
+ CONFIG_SPL_BSS_START_ADDR=0x80100000
+-CONFIG_SPL_BSS_MAX_SIZE=0x80000
++CONFIG_SPL_BSS_MAX_SIZE=0xc0000
+ CONFIG_SPL_FSL_PBL=y
+ # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
+ CONFIG_SYS_SPL_MALLOC=y
+@@ -66,8 +66,11 @@ CONFIG_CMD_MII=y
  # CONFIG_CMD_MDIO is not set
  CONFIG_CMD_PING=y
  CONFIG_CMD_EXT2=y
@@ -30,16 +47,3 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  CONFIG_OF_CONTROL=y
  CONFIG_ENV_OVERWRITE=y
  CONFIG_ENV_IS_IN_MMC=y
---- a/include/configs/ls1021aiot.h
-+++ b/include/configs/ls1021aiot.h
-@@ -78,8 +78,8 @@
- 		CONFIG_SYS_MONITOR_LEN)
- #define CONFIG_SYS_SPL_MALLOC_SIZE	0x100000
- #define CONFIG_SPL_BSS_START_ADDR	0x80100000
--#define CONFIG_SPL_BSS_MAX_SIZE		0x80000
--#define CONFIG_SYS_MONITOR_LEN		0x80000
-+#define CONFIG_SPL_BSS_MAX_SIZE		0xc0000
-+#define CONFIG_SYS_MONITOR_LEN		0xc0000
- #endif
- 
- #define CONFIG_SYS_DDR_SDRAM_BASE	0x80000000UL



From lede-commits at lists.infradead.org  Sat May 25 11:19:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:45 -0400
Subject: [openwrt/openwrt]  layerscape: kernel: refresh 6.6 patches
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38407.1716661190.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/347212085bc5b1f1b94946c2e5cacb42bdc4a4c8

commit 347212085bc5b1f1b94946c2e5cacb42bdc4a4c8
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 14:33:54 2024 +0100

    layerscape: kernel: refresh 6.6 patches
    
    Taken refreshed version from Layerscape 6.6 tree:
    302-arm64-dts-ls1012a-update-with-ppfe-support.patch
    304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
    400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
    701-staging-add-fsl_ppfe-driver.patch
    702-phy-Add-2.5G-SGMII-interface-mode.patch
    704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch
    
    Removed:
    704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch (meld
    into 702)
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 ...rm64-dts-ls1012a-update-with-ppfe-support.patch | 196 +++++++--------------
 ...s1012a-frdm-workaround-by-updating-qspi-f.patch |   4 +-
 ...s1012a-rdb-workaround-by-updating-qspi-fl.patch |   2 +-
 ...-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch |   4 +-
 .../701-staging-add-fsl_ppfe-driver.patch          | 117 ++++++------
 .../702-phy-Add-2.5G-SGMII-interface-mode.patch    |  20 ++-
 ...-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch |  42 -----
 7 files changed, 141 insertions(+), 244 deletions(-)

diff --git a/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch b/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
index 70e624a2a9..bd69aa042d 100644
--- a/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
+++ b/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
@@ -1,19 +1,20 @@
-From 1bb35ff4ce33e65601c8d9c736be52e4aabd6252 Mon Sep 17 00:00:00 2001
-From: Calvin Johnson <calvin.johnson at nxp.com>
-Date: Sat, 16 Sep 2017 14:20:23 +0530
-Subject: [PATCH] arm64: dts: freescale: ls1012a: update with ppfe support
+From 008465a02bf29b366ca7a56dba48ad3a85417ba2 Mon Sep 17 00:00:00 2001
+From: Li Yang <leoyang.li at nxp.com>
+Date: Thu, 18 Nov 2021 21:46:21 -0600
+Subject: [PATCH] arm64: dts: ls1012a: add ppfe support to boards
 
-Update ls1012a dtsi and platform dts files with support for ppfe.
+Update ls1012a dtsi and platform dts files with
+support for ppfe.
 
 Signed-off-by: Calvin Johnson <calvin.johnson at nxp.com>
 Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
+Signed-off-by: Li Yang <leoyang.li at nxp.com>
 ---
- .../boot/dts/freescale/fsl-ls1012a-frdm.dts   | 43 +++++++++++++++++
- .../boot/dts/freescale/fsl-ls1012a-frwy.dts   | 43 +++++++++++++++++
- .../boot/dts/freescale/fsl-ls1012a-qds.dts    | 43 +++++++++++++++++
- .../boot/dts/freescale/fsl-ls1012a-rdb.dts    | 47 +++++++++++++++++++
+ .../boot/dts/freescale/fsl-ls1012a-frdm.dts   | 44 +++++++++++++++++++
+ .../boot/dts/freescale/fsl-ls1012a-qds.dts    | 43 ++++++++++++++++++
+ .../boot/dts/freescale/fsl-ls1012a-rdb.dts    | 40 +++++++++++++++++
  .../arm64/boot/dts/freescale/fsl-ls1012a.dtsi | 29 ++++++++++++
- 5 files changed, 205 insertions(+)
+ 4 files changed, 156 insertions(+)
 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
@@ -29,7 +30,7 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
  	sys_mclk: clock-mclk {
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
-@@ -95,6 +100,44 @@
+@@ -110,6 +115,45 @@
  	};
  };
  
@@ -43,15 +44,9 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x0>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x0>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x2>;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x0>;
 +		phy-mode = "sgmii";
-+		fsl,pfe-phy-if-flags = <0x0>;
-+
-+		mdio at 0 {
-+			reg = <0x1>; /* enabled/disabled */
-+		};
++		phy-handle = <&sgmii_phy1>;
 +	};
 +
 +	pfe_mac1: ethernet at 1 {
@@ -59,99 +54,43 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x1>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x1>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x1>;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x0>;
 +		phy-mode = "sgmii";
-+		fsl,pfe-phy-if-flags = <0x0>;
-+
-+		mdio at 0 {
-+			reg = <0x0>; /* enabled/disabled */
-+		};
++		phy-handle = <&sgmii_phy2>;
 +	};
-+};
 +
- &qspi {
- 	status = "okay";
- 
---- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frwy.dts
-+++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frwy.dts
-@@ -14,6 +14,11 @@
- / {
- 	model = "LS1012A FRWY Board";
- 	compatible = "fsl,ls1012a-frwy", "fsl,ls1012a";
-+
-+	aliases {
-+		ethernet0 = &pfe_mac0;
-+		ethernet1 = &pfe_mac1;
-+	};
- };
- 
- &duart0 {
-@@ -28,6 +33,44 @@
- 	status = "okay";
- };
- 
-+&pfe {
-+	status = "okay";
-+	#address-cells = <1>;
-+	#size-cells = <0>;
-+
-+	pfe_mac0: ethernet at 0 {
-+		compatible = "fsl,pfe-gemac-port";
++	mdio at 0 {
 +		#address-cells = <1>;
 +		#size-cells = <0>;
-+		reg = <0x0>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x0>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x2>;	/* PHY_ID */
-+		fsl,mdio-mux-val = <0x0>;
-+		phy-mode = "sgmii";
-+		fsl,pfe-phy-if-flags = <0x0>;
 +
-+		mdio at 0 {
-+			reg = <0x1>; /* enabled/disabled */
++		sgmii_phy1: ethernet-phy at 2 {
++			reg = <0x2>;
 +		};
-+	};
 +
-+	pfe_mac1: ethernet at 1 {
-+		compatible = "fsl,pfe-gemac-port";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0x1>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x1>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x1>;	/* PHY_ID */
-+		fsl,mdio-mux-val = <0x0>;
-+		phy-mode = "sgmii";
-+		fsl,pfe-phy-if-flags = <0x0>;
-+
-+		mdio at 0 {
-+			reg = <0x0>; /* enabled/disabled */
++		sgmii_phy2: ethernet-phy at 1 {
++			reg = <0x1>;
 +		};
 +	};
 +};
 +
- &qspi {
+ &sai2 {
  	status = "okay";
- 
+ };
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
-@@ -18,6 +18,11 @@
+@@ -16,6 +16,8 @@
+ 	aliases {
+ 		mmc0 = &esdhc0;
  		mmc1 = &esdhc1;
- 	};
- 
-+	aliases {
 +		ethernet0 = &pfe_mac0;
 +		ethernet1 = &pfe_mac1;
-+	};
-+
+ 	};
+ 
  	sys_mclk: clock-mclk {
- 		compatible = "fixed-clock";
- 		#clock-cells = <0>;
-@@ -132,6 +137,44 @@
- 		};
+@@ -148,6 +150,47 @@
  	};
  };
-+
+ 
 +&pfe {
 +	status = "okay";
 +	#address-cells = <1>;
@@ -162,15 +101,9 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x0>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x0>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x1>;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x2>;
 +		phy-mode = "sgmii-2500";
-+		fsl,pfe-phy-if-flags = <0x0>;
-+
-+		mdio at 0 {
-+			reg = <0x1>; /* enabled/disabled */
-+		};
++		phy-handle = <&sgmii_phy1>;
 +	};
 +
 +	pfe_mac1: ethernet at 1 {
@@ -178,35 +111,46 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x1>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x1>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x2>;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x3>;
 +		phy-mode = "sgmii-2500";
-+		fsl,pfe-phy-if-flags = <0x0>;
++		phy-handle = <&sgmii_phy2>;
++	};
++
++	mdio at 0 {
++		#address-cells = <1>;
++		#size-cells = <0>;
 +
-+		mdio at 0 {
-+			reg = <0x0>; /* enabled/disabled */
++		sgmii_phy1: ethernet-phy at 1 {
++			compatible = "ethernet-phy-ieee802.3-c45";
++			reg = <0x1>;
++		};
++
++		sgmii_phy2: ethernet-phy at 2 {
++			compatible = "ethernet-phy-ieee802.3-c45";
++			reg = <0x2>;
 +		};
 +	};
 +};
- 
- &qspi {
++
+ &sai2 {
  	status = "okay";
+ };
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
-@@ -16,6 +16,8 @@
- 
- 	aliases {
+@@ -18,6 +18,8 @@
  		serial0 = &duart0;
-+		ethernet0 = &pfe_mac0;
-+		ethernet1 = &pfe_mac1;
  		mmc0 = &esdhc0;
  		mmc1 = &esdhc1;
- 	};
-@@ -86,6 +88,44 @@
++		ethernet0 = &pfe_mac0;
++		ethernet1 = &pfe_mac1;
  	};
  };
  
+@@ -104,3 +106,41 @@
+ &sata {
+ 	status = "okay";
+ };
++
 +&pfe {
 +	status = "okay";
 +	#address-cells = <1>;
@@ -217,15 +161,9 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x0>;	/* GEM_ID */
-+		fsl,gemac-bus-id = <0x0>;	/* BUS_ID */
-+		fsl,gemac-phy-id = <0x2>;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x0>;
 +		phy-mode = "sgmii";
-+		fsl,pfe-phy-if-flags = <0x0>;
-+
-+		mdio at 0 {
-+			reg = <0x1>; /* enabled/disabled */
-+		};
++		phy-handle = <&sgmii_phy>;
 +	};
 +
 +	pfe_mac1: ethernet at 1 {
@@ -233,21 +171,23 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		#address-cells = <1>;
 +		#size-cells = <0>;
 +		reg = <0x1>;	/* GEM_ID */
-+		fsl,gemac-bus-id = < 0x1 >;	/* BUS_ID */
-+		fsl,gemac-phy-id = < 0x1 >;	/* PHY_ID */
 +		fsl,mdio-mux-val = <0x0>;
-+		phy-mode = "rgmii-txid";
-+		fsl,pfe-phy-if-flags = <0x0>;
++		phy-mode = "rgmii-id";
++		phy-handle = <&rgmii_phy>;
++	};
++	mdio at 0 {
++		#address-cells = <1>;
++		#size-cells = <0>;
 +
-+		mdio at 0 {
-+			reg = <0x0>; /* enabled/disabled */
++		sgmii_phy: ethernet-phy at 2 {
++			reg = <0x2>;
++		};
++
++		rgmii_phy: ethernet-phy at 1 {
++			reg = <0x1>;
 +		};
 +	};
 +};
-+
- &qspi {
- 	status = "okay";
- 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a.dtsi
 @@ -568,6 +568,35 @@
@@ -264,7 +204,7 @@ Signed-off-by: Anjaneyulu Jagarlmudi <anji.jagarlmudi at nxp.com>
 +		};
 +	};
 +
-+	pfe: pfe at 04000000 {
++	pfe: pfe at 4000000 {
 +		compatible = "fsl,pfe";
 +		reg =   <0x0 0x04000000 0x0 0xc00000>,	/* AXI 16M */
 +			<0x0 0x83400000 0x0 0xc00000>;  /* PFE DDR 12M */
diff --git a/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch b/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
index 5d19cb92dc..f42859b7ac 100644
--- a/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
+++ b/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
@@ -15,7 +15,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-frdm.dts
-@@ -148,8 +148,8 @@
+@@ -110,8 +110,8 @@
  		spi-max-frequency = <50000000>;
  		m25p,fast-read;
  		reg = <0>;
@@ -28,7 +28,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-qds.dts
-@@ -186,8 +186,8 @@
+@@ -145,8 +145,8 @@
  		spi-max-frequency = <50000000>;
  		m25p,fast-read;
  		reg = <0>;
diff --git a/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch b/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
index 53cfd193b7..fd1dff747b 100644
--- a/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
+++ b/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
@@ -16,7 +16,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls1012a-rdb.dts
-@@ -136,8 +136,8 @@
+@@ -98,8 +98,8 @@
  		spi-max-frequency = <50000000>;
  		m25p,fast-read;
  		reg = <0>;
diff --git a/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
index b06c0f8133..b85053eba9 100644
--- a/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
+++ b/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
@@ -1,4 +1,4 @@
-From 20b1193c8c1d81a8d44ae36e579f70e6fbab45b9 Mon Sep 17 00:00:00 2001
+From bd3fa0b0ed51dd6a6564c01d37b36ff475f87ed4 Mon Sep 17 00:00:00 2001
 From: Han Xu <han.xu at nxp.com>
 Date: Tue, 14 Apr 2020 11:58:44 -0500
 Subject: [PATCH] LF-20-3 mtd: spi-nor: Use 1 bit mode of spansion(s25fs512s)
@@ -15,7 +15,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
 
 --- a/drivers/mtd/spi-nor/spansion.c
 +++ b/drivers/mtd/spi-nor/spansion.c
-@@ -398,8 +398,8 @@ static const struct flash_info spansion_
+@@ -798,8 +798,8 @@ static const struct flash_info spansion_
  		MFR_FLAGS(USE_CLSR)
  	},
  	{ "s25fs512s",  INFO6(0x010220, 0x4d0081, 256 * 1024, 256)
diff --git a/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
index a52ac6201f..764d29f10d 100644
--- a/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
+++ b/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
@@ -1,4 +1,4 @@
-From 4bb50554937246443767e89d32e54df7a12396ca Mon Sep 17 00:00:00 2001
+From 9ee016f90af0bbcac576af881f1760ee9d9e38e0 Mon Sep 17 00:00:00 2001
 From: Calvin Johnson <calvin.johnson at nxp.com>
 Date: Sat, 16 Sep 2017 07:05:49 +0530
 Subject: [PATCH] staging: add fsl_ppfe driver
@@ -6,10 +6,8 @@ MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
-This is squash of all commits with ppfe driver taken from NXP 6.1 tree:
-https://github.com/nxp-qoriq/linux/tree/lf-6.1.y
-
-List of original commits:
+This is squash of all commits with ppfe driver taken from NXP 6.6 tree:
+https://github.com/nxp-qoriq/linux/tree/lf-6.6.y
 
 net: fsl_ppfe: dts binding for ppfe
 
@@ -577,7 +575,38 @@ staging: fsl_ppfe: Addressed build warnings
 
 Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam at nxp.com>
 
-Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
+staging: fsl_ppfe: Remove C45 check and related code in driver
+
+The MDIO core will not pass a C45 request via the C22 API call any
+more. So, removed the code. The old way of C45 muxed addresses is
+removed from the upstream kernel after clear seperation of C45 and
+C22.
+Upstream kernel commit details for reference:
+99d5fe9c7f3d net: mdio: Remove support for building C45 muxed addresses
+
+Signed-off-by: Chaitanya Sakinam <chaitanya.sakinam at nxp.com>
+
+staging: fsl_ppfe: update class_create() usage
+
+Cope with API change:
+1aaba11da9aa ("driver core: class: remove module * from class_create()")
+
+Signed-off-by: Krishna Chaitanya Sakinam <chaitanya.sakinam at nxp.com>
+
+LF-10777-2 staging: fsl_ppfe: remove unused pfe_eth_mdio_write_addr
+
+Fix the following build warning:
+drivers/staging/fsl_ppfe/pfe_eth.c:887:12: warning: ?pfe_eth_mdio_write_addr? defined but not used [-Wunused-function]
+  887 | static int pfe_eth_mdio_write_addr(struct mii_bus *bus, int mii_id,
+
+The only user of this API is MII_ADDR_C45 checking logic which
+was removed since the commit 9d95b13bd084 ("staging: fsl_ppfe: Remove
+C45 check and related code in driver"). So this API should be removed
+together as no users anymore.
+
+Fixes: 9d95b13bd084 ("staging: fsl_ppfe: Remove C45 check and related code in driver")
+Reviewed-by: Jason Liu <jason.hui.liu at nxp.com>
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 ---
  .../devicetree/bindings/net/fsl_ppfe/pfe.txt  |  199 ++
  MAINTAINERS                                   |    8 +
@@ -602,7 +631,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  drivers/staging/fsl_ppfe/pfe_ctrl.h           |  100 +
  drivers/staging/fsl_ppfe/pfe_debugfs.c        |   99 +
  drivers/staging/fsl_ppfe/pfe_debugfs.h        |   13 +
- drivers/staging/fsl_ppfe/pfe_eth.c            | 2588 +++++++++++++++++
+ drivers/staging/fsl_ppfe/pfe_eth.c            | 2550 +++++++++++++++++
  drivers/staging/fsl_ppfe/pfe_eth.h            |  175 ++
  drivers/staging/fsl_ppfe/pfe_firmware.c       |  398 +++
  drivers/staging/fsl_ppfe/pfe_firmware.h       |   21 +
@@ -619,7 +648,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  drivers/staging/fsl_ppfe/pfe_perfmon.h        |   26 +
  drivers/staging/fsl_ppfe/pfe_sysfs.c          |  840 ++++++
  drivers/staging/fsl_ppfe/pfe_sysfs.h          |   17 +
- 40 files changed, 11015 insertions(+)
+ 40 files changed, 10977 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/net/fsl_ppfe/pfe.txt
  create mode 100644 drivers/staging/fsl_ppfe/Kconfig
  create mode 100644 drivers/staging/fsl_ppfe/Makefile
@@ -862,7 +891,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +};
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -8255,6 +8255,14 @@ F:	drivers/ptp/ptp_qoriq.c
+@@ -8359,6 +8359,14 @@ F:	drivers/ptp/ptp_qoriq.c
  F:	drivers/ptp/ptp_qoriq_debugfs.c
  F:	include/linux/fsl/ptp_qoriq.h
  
@@ -879,7 +908,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  L:	linux-spi at vger.kernel.org
 --- a/drivers/staging/Kconfig
 +++ b/drivers/staging/Kconfig
-@@ -80,4 +80,6 @@ source "drivers/staging/qlge/Kconfig"
+@@ -78,4 +78,6 @@ source "drivers/staging/qlge/Kconfig"
  
  source "drivers/staging/vme_user/Kconfig"
  
@@ -888,7 +917,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  endif # STAGING
 --- a/drivers/staging/Makefile
 +++ b/drivers/staging/Makefile
-@@ -29,3 +29,4 @@ obj-$(CONFIG_PI433)		+= pi433/
+@@ -28,3 +28,4 @@ obj-$(CONFIG_PI433)		+= pi433/
  obj-$(CONFIG_XIL_AXIS_FIFO)	+= axis-fifo/
  obj-$(CONFIG_FIELDBUS_DEV)     += fieldbus/
  obj-$(CONFIG_QLGE)		+= qlge/
@@ -2678,7 +2707,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +	pr_debug("PFE CDEV assigned major number: %d\n", pfe_majno);
 +
 +	/* Register the class for the device */
-+	pfe_char_class = class_create(THIS_MODULE, PFE_CLASS_NAME);
++	pfe_char_class = class_create(PFE_CLASS_NAME);
 +	if (IS_ERR(pfe_char_class)) {
 +		pr_err(
 +		"Failed to init class for PFE CDEV. PFE CDEV not available.\n");
@@ -3233,7 +3262,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +#endif /* _PFE_DEBUGFS_H_ */
 --- /dev/null
 +++ b/drivers/staging/fsl_ppfe/pfe_eth.c
-@@ -0,0 +1,2588 @@
+@@ -0,0 +1,2550 @@
 +// SPDX-License-Identifier: GPL-2.0+
 +/*
 + * Copyright 2015-2016 Freescale Semiconductor, Inc.
@@ -4120,24 +4149,6 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +	return 0;
 +}
 +
-+static int pfe_eth_mdio_write_addr(struct mii_bus *bus, int mii_id,
-+				   int dev_addr, int regnum)
-+{
-+	struct pfe_mdio_priv_s *priv = (struct pfe_mdio_priv_s *)bus->priv;
-+
-+	__raw_writel(EMAC_MII_DATA_PA(mii_id) |
-+		     EMAC_MII_DATA_RA(dev_addr) |
-+		     EMAC_MII_DATA_TA | EMAC_MII_DATA(regnum),
-+		     priv->mdio_base + EMAC_MII_DATA_REG);
-+
-+	if (pfe_eth_mdio_timeout(priv, EMAC_MDIO_TIMEOUT)) {
-+		dev_err(&bus->dev, "phy MDIO address write timeout\n");
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
 +static int pfe_eth_mdio_write(struct mii_bus *bus, int mii_id, int regnum,
 +			      u16 value)
 +{
@@ -4147,22 +4158,12 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +	if ((mii_id) && (pfe->mdio_muxval[mii_id]))
 +		pfe_eth_mdio_mux(pfe->mdio_muxval[mii_id]);
 +
-+	if (regnum & MII_ADDR_C45) {
-+		pfe_eth_mdio_write_addr(bus, mii_id, (regnum >> 16) & 0x1f,
-+					regnum & 0xffff);
-+		__raw_writel(EMAC_MII_DATA_OP_CL45_WR |
-+			     EMAC_MII_DATA_PA(mii_id) |
-+			     EMAC_MII_DATA_RA((regnum >> 16) & 0x1f) |
-+			     EMAC_MII_DATA_TA | EMAC_MII_DATA(value),
-+			     priv->mdio_base + EMAC_MII_DATA_REG);
-+	} else {
-+		/* start a write op */
-+		__raw_writel(EMAC_MII_DATA_ST | EMAC_MII_DATA_OP_WR |
-+			     EMAC_MII_DATA_PA(mii_id) |
-+			     EMAC_MII_DATA_RA(regnum) |
-+			     EMAC_MII_DATA_TA | EMAC_MII_DATA(value),
-+			     priv->mdio_base + EMAC_MII_DATA_REG);
-+	}
++	/* start a write op */
++	__raw_writel(EMAC_MII_DATA_ST | EMAC_MII_DATA_OP_WR |
++		     EMAC_MII_DATA_PA(mii_id) |
++		     EMAC_MII_DATA_RA(regnum) |
++		     EMAC_MII_DATA_TA | EMAC_MII_DATA(value),
++		     priv->mdio_base + EMAC_MII_DATA_REG);
 +
 +	if (pfe_eth_mdio_timeout(priv, EMAC_MDIO_TIMEOUT)) {
 +		dev_err(&bus->dev, "%s: phy MDIO write timeout\n", __func__);
@@ -4180,22 +4181,12 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 +	if ((mii_id) && (pfe->mdio_muxval[mii_id]))
 +		pfe_eth_mdio_mux(pfe->mdio_muxval[mii_id]);
 +
-+	if (regnum & MII_ADDR_C45) {
-+		pfe_eth_mdio_write_addr(bus, mii_id, (regnum >> 16) & 0x1f,
-+					regnum & 0xffff);
-+		__raw_writel(EMAC_MII_DATA_OP_CL45_RD |
-+			     EMAC_MII_DATA_PA(mii_id) |
-+			     EMAC_MII_DATA_RA((regnum >> 16) & 0x1f) |
-+			     EMAC_MII_DATA_TA,
-+			     priv->mdio_base + EMAC_MII_DATA_REG);
-+	} else {
-+		/* start a read op */
-+		__raw_writel(EMAC_MII_DATA_ST | EMAC_MII_DATA_OP_RD |
-+			     EMAC_MII_DATA_PA(mii_id) |
-+			     EMAC_MII_DATA_RA(regnum) |
-+			     EMAC_MII_DATA_TA, priv->mdio_base +
-+			     EMAC_MII_DATA_REG);
-+	}
++	/* start a read op */
++	__raw_writel(EMAC_MII_DATA_ST | EMAC_MII_DATA_OP_RD |
++		     EMAC_MII_DATA_PA(mii_id) |
++		     EMAC_MII_DATA_RA(regnum) |
++		     EMAC_MII_DATA_TA, priv->mdio_base +
++		     EMAC_MII_DATA_REG);
 +
 +	if (pfe_eth_mdio_timeout(priv, EMAC_MDIO_TIMEOUT)) {
 +		dev_err(&bus->dev, "%s: phy MDIO read timeout\n", __func__);
diff --git a/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch b/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
index 8beee8f2dc..abb0a1e5ed 100644
--- a/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
+++ b/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
@@ -1,4 +1,4 @@
-From fd32b1bc9a49919d3d59a50d775d03fe7ca5e654 Mon Sep 17 00:00:00 2001
+From 3823e4e1078a95e26b9a69e88c9bf862b0267e1c Mon Sep 17 00:00:00 2001
 From: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
 Date: Wed, 29 Nov 2017 15:27:57 +0530
 Subject: [PATCH] phy: Add 2.5G SGMII interface mode
@@ -9,13 +9,13 @@ in existing phy_interface list
 Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
 ---
  drivers/net/phy/phy-core.c | 1 +
- drivers/net/phy/phylink.c  | 1 +
+ drivers/net/phy/phylink.c  | 2 ++
  include/linux/phy.h        | 3 +++
- 3 files changed, 5 insertions(+)
+ 3 files changed, 6 insertions(+)
 
 --- a/drivers/net/phy/phy-core.c
 +++ b/drivers/net/phy/phy-core.c
-@@ -136,6 +136,7 @@ int phy_interface_num_ports(phy_interfac
+@@ -138,6 +138,7 @@ int phy_interface_num_ports(phy_interfac
  	case PHY_INTERFACE_MODE_RXAUI:
  	case PHY_INTERFACE_MODE_XAUI:
  	case PHY_INTERFACE_MODE_1000BASEKX:
@@ -33,9 +33,17 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
  		return SPEED_2500;
  
  	case PHY_INTERFACE_MODE_5GBASER:
+@@ -526,6 +527,7 @@ unsigned long phylink_get_capabilities(p
+ 		break;
+ 
+ 	case PHY_INTERFACE_MODE_2500BASEX:
++	case PHY_INTERFACE_MODE_2500SGMII:
+ 		caps |= MAC_2500FD;
+ 		break;
+ 
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -159,6 +159,7 @@ typedef enum {
+@@ -165,6 +165,7 @@ typedef enum {
  	PHY_INTERFACE_MODE_10GKR,
  	PHY_INTERFACE_MODE_QUSGMII,
  	PHY_INTERFACE_MODE_1000BASEKX,
@@ -43,7 +51,7 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
  	PHY_INTERFACE_MODE_MAX,
  } phy_interface_t;
  
-@@ -280,6 +281,8 @@ static inline const char *phy_modes(phy_
+@@ -286,6 +287,8 @@ static inline const char *phy_modes(phy_
  		return "100base-x";
  	case PHY_INTERFACE_MODE_QUSGMII:
  		return "qusgmii";
diff --git a/target/linux/layerscape/patches-6.6/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch b/target/linux/layerscape/patches-6.6/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch
deleted file mode 100644
index 1a1d7a0ac7..0000000000
--- a/target/linux/layerscape/patches-6.6/704-net-phylink-treat-PHY_INTERFACE_MODE_2500SGMII-in-ph.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From eb57941154e2ad142c07d47e874a221328467349 Mon Sep 17 00:00:00 2001
-From: Ioana Ciornei <ioana.ciornei at nxp.com>
-Date: Thu, 2 Jun 2022 12:11:11 +0300
-Subject: [PATCH] net: phylink: treat PHY_INTERFACE_MODE_2500SGMII in
- phylink_get_linkmodes
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There is a downstream patch which adds a new interface type -
-PHY_INTERFACE_MODE_2500SGMII (which is really the same one as
-PHY_INTERFACE_MODE_2500BASEX).
-
-We backported from upstream the following phylink patch which, of
-course, does not treat the PHY_INTERFACE_MODE_2500SGMII interface mode
-in a switch case statement.
-	34ae2c09d46a ("net: phylink: add generic validate implementation")
-
-Because of this, we get the following build warning.
-
-drivers/net/phy/phylink.c: In function ?phylink_get_linkmodes?:
-drivers/net/phy/phylink.c:322:2: warning: enumeration value ?PHY_INTERFACE_MODE_2500SGMII? not handled in switch [-Wswitch]
-  322 |  switch (interface) {
-      |  ^~~~~~
-
-Fix it by treating the new interface mode in the switch-case statement.
-
-Signed-off-by: Ioana Ciornei <ioana.ciornei at nxp.com>
----
- drivers/net/phy/phylink.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/net/phy/phylink.c
-+++ b/drivers/net/phy/phylink.c
-@@ -505,6 +505,7 @@ unsigned long phylink_get_capabilities(p
- 		break;
- 
- 	case PHY_INTERFACE_MODE_2500BASEX:
-+	case PHY_INTERFACE_MODE_2500SGMII:
- 		caps |= MAC_2500FD;
- 		break;
- 



From lede-commits at lists.infradead.org  Sat May 25 11:19:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:40 -0400
Subject: [openwrt/openwrt]  ppfe-firmware: Bump to lf-6.6.3-1.0.0
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38413.1716661191.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/322f2c14246d1c84cb5c8a0247cf9457e61ac435

commit 322f2c14246d1c84cb5c8a0247cf9457e61ac435
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Mar 18 10:49:55 2024 +0100

    ppfe-firmware: Bump to lf-6.6.3-1.0.0
    
    Bump ppfe-firmware package to lf-6.6.3-1.0.0
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/firmware/layerscape/ppfe-firmware/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile
index b6a251098e..2b0c5f3207 100644
--- a/package/firmware/layerscape/ppfe-firmware/Makefile
+++ b/package/firmware/layerscape/ppfe-firmware/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ppfe
-PKG_VERSION:=lf-6.1.1-1.0.0
+PKG_VERSION:=6.6.3.1.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-engine-pfe-bin
-PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=59f5660f1b93314e3e073053195719eab7361f07d1a9e02896f9356b1a615873
+PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
+PKG_MIRROR_HASH:=836da0d1ace6c5896c434940b5f06ae9ddcb871959e9f5aa3df75d67e39aec41
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sat May 25 11:21:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:21:16 -0400
Subject: [openwrt/openwrt]  ramips: samknows whitebox v8: set wifi frequency
In-Reply-To: <171666127697.4151448.10060255609064973285@git-01.infra.openwrt.org>
References: <171666127697.4151448.10060255609064973285@git-01.infra.openwrt.org>
Message-ID: <mailman.38414.1716661281.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a2fc49b711fdde5d74aacd044ddf51f099c2e16

commit 1a2fc49b711fdde5d74aacd044ddf51f099c2e16
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun May 5 23:45:36 2024 +0200

    ramips: samknows whitebox v8: set wifi frequency
    
    Set the 2.4GHz frequency for WiFi.
    
    Fixes: #15391
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
index b5818a7e60..2eeb932752 100644
--- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
+++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
@@ -129,6 +129,7 @@
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&eeprom_factory_0>;
 		nvmem-cell-names = "eeprom";
+		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
 



From lede-commits at lists.infradead.org  Sat May 25 11:37:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:37:59 -0400
Subject: [openwrt/openwrt]  kernel/modules/other/mlx_wdt: add new package
In-Reply-To: <171666227934.4185111.10113485160010195524@git-01.infra.openwrt.org>
References: <171666227934.4185111.10113485160010195524@git-01.infra.openwrt.org>
Message-ID: <mailman.38417.1716662283.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0e56bd3eb591d6b2a3c96c7f913ea5651db7798e

commit 0e56bd3eb591d6b2a3c96c7f913ea5651db7798e
Author: Til Kaiser <mail at tk154.de>
AuthorDate: Sun Apr 28 15:16:57 2024 +0200

    kernel/modules/other/mlx_wdt: add new package
    
    This commit adds a new driver for the hardware watchdog
    on Mellanox systems.
    
    Signed-off-by: Til Kaiser <mail at tk154.de>
---
 package/kernel/linux/modules/other.mk | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index e227fd6a0f..916fd08ba0 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -244,6 +244,28 @@ endef
 $(eval $(call KernelPackage,lkdtm))
 
 
+define KernelPackage/mlx_wdt
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Mellanox Watchdog
+  DEPENDS:=@TARGET_x86 +kmod-regmap-core
+  KCONFIG:= \
+	CONFIG_MELLANOX_PLATFORM=y \
+	CONFIG_MLX_WDT
+  FILES:=$(LINUX_DIR)/drivers/watchdog/mlx_wdt.ko
+  AUTOLOAD:=$(call AutoProbe,mlx_wdt)
+endef
+
+define KernelPackage/mlx_wdt/description
+  This is the driver for the hardware watchdog on Mellanox systems.
+  This driver can be used together with the watchdog daemon.
+  It can also watch your kernel to make sure it doesn't freeze,
+  and if it does, it reboots your system after a certain amount of
+  time.
+endef
+
+$(eval $(call KernelPackage,mlx_wdt))
+
+
 define KernelPackage/pinctrl-mcp23s08
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Microchip MCP23xxx I/O expander



From lede-commits at lists.infradead.org  Sat May 25 11:38:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:38:00 -0400
Subject: [openwrt/openwrt]  kernel/modules/other/mlxreg: add new package
In-Reply-To: <171666227934.4185111.10113485160010195524@git-01.infra.openwrt.org>
References: <171666227934.4185111.10113485160010195524@git-01.infra.openwrt.org>
Message-ID: <mailman.38418.1716662283.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0a861a0c0f1aaafc05dc1e1ce22bce7231bcc1a7

commit 0a861a0c0f1aaafc05dc1e1ce22bce7231bcc1a7
Author: Til Kaiser <mail at tk154.de>
AuthorDate: Sun Apr 28 15:30:54 2024 +0200

    kernel/modules/other/mlxreg: add new package
    
    This commit adds a new mlxreg package, which allows access
    to Mellanox programmable device register space through sysfs
    interface for thermal control and hardware management.
    
    It also adds required Mellanox I?C drivers and packages
    for the "special" MSN4800 series and SN2201 platform.
    
    Signed-off-by: Til Kaiser <mail at tk154.de>
---
 package/kernel/linux/modules/i2c.mk   | 36 ++++++++++++++++++++
 package/kernel/linux/modules/other.mk | 64 +++++++++++++++++++++++++++++++++++
 2 files changed, 100 insertions(+)

diff --git a/package/kernel/linux/modules/i2c.mk b/package/kernel/linux/modules/i2c.mk
index 7cd69dbb95..3aaf560ea9 100644
--- a/package/kernel/linux/modules/i2c.mk
+++ b/package/kernel/linux/modules/i2c.mk
@@ -169,6 +169,24 @@ endef
 $(eval $(call KernelPackage,i2c-i801))
 
 
+I2C_MLXCPLD_MODULES:= \
+  CONFIG_I2C_MLXCPLD:drivers/i2c/busses/i2c-mlxcpld
+
+define KernelPackage/i2c-mlxcpld
+  $(call i2c_defaults,$(I2C_MLXCPLD_MODULES),59)
+  TITLE:=Mellanox I2C driver
+  DEPENDS:=@TARGET_x86_64 +kmod-regmap-core
+endef
+
+define KernelPackage/i2c-mlxcpld/description
+ This exposes the Mellanox platform I2C busses
+ to the linux I2C layer for X86 based systems.
+ Controller is implemented as CPLD logic.
+endef
+
+$(eval $(call KernelPackage,i2c-mlxcpld))
+
+
 I2C_MUX_MODULES:= \
   CONFIG_I2C_MUX:drivers/i2c/i2c-mux
 
@@ -200,6 +218,24 @@ endef
 $(eval $(call KernelPackage,i2c-mux-gpio))
 
 
+I2C_MUX_MLXCPLD_MODULES:= \
+  CONFIG_I2C_MUX_MLXCPLD:drivers/i2c/muxes/i2c-mux-mlxcpld
+
+define KernelPackage/i2c-mux-mlxcpld
+  $(call i2c_defaults,$(I2C_MUX_MLXCPLD_MODULES),51)
+  TITLE:=Mellanox CPLD based I2C multiplexer
+  DEPENDS:=+kmod-i2c-mlxcpld +kmod-i2c-mux
+endef
+
+define KernelPackage/i2c-mux-mlxcpld/description
+ This driver provides access to
+ I2C busses connected through a MUX, which is controlled
+ by a CPLD register.
+endef
+
+$(eval $(call KernelPackage,i2c-mux-mlxcpld))
+
+
 I2C_MUX_REG_MODULES:= \
   CONFIG_I2C_MUX_REG:drivers/i2c/muxes/i2c-mux-reg
 
diff --git a/package/kernel/linux/modules/other.mk b/package/kernel/linux/modules/other.mk
index 916fd08ba0..8f5c729068 100644
--- a/package/kernel/linux/modules/other.mk
+++ b/package/kernel/linux/modules/other.mk
@@ -266,6 +266,70 @@ endef
 $(eval $(call KernelPackage,mlx_wdt))
 
 
+define KernelPackage/mlxreg
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Mellanox platform register access
+  DEPENDS:=@TARGET_x86 +kmod-i2c-mux-mlxcpld
+  KCONFIG:= \
+	CONFIG_MELLANOX_PLATFORM=y \
+	CONFIG_MLX_PLATFORM \
+	CONFIG_MLXREG_HOTPLUG \
+	CONFIG_MLXREG_IO \
+	CONFIG_SENSORS_MLXREG_FAN \
+	CONFIG_LEDS_MLXREG
+  FILES:= \
+	$(LINUX_DIR)/drivers/platform/x86/mlx-platform.ko \
+	$(LINUX_DIR)/drivers/platform/mellanox/mlxreg-hotplug.ko \
+	$(LINUX_DIR)/drivers/platform/mellanox/mlxreg-io.ko \
+	$(LINUX_DIR)/drivers/hwmon/mlxreg-fan.ko \
+	$(LINUX_DIR)/drivers/leds/leds-mlxreg.ko
+  AUTOLOAD:=$(call AutoProbe,mlx-platform mlxreg-hotplug mlxreg-io mlxreg-fan leds-mlxreg)
+endef
+
+define KernelPackage/mlxreg/description
+  Allows access to Mellanox programmable device register
+  space through sysfs interface. The sets of registers for sysfs access
+  are defined per system type bases and include the registers related
+  to system resets operation, system reset causes monitoring and some
+  kinds of mux selection.
+endef
+
+$(eval $(call KernelPackage,mlxreg))
+
+
+define KernelPackage/mlxreg-lc
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Mellanox line card platform support
+  DEPENDS:=kmod-mlxreg +kmod-regmap-i2c
+  KCONFIG:=CONFIG_MLXREG_LC
+  FILES:=$(LINUX_DIR)/drivers/platform/mellanox/mlxreg-lc.ko
+  AUTOLOAD:=$(call AutoProbe,mlxreg-lc)
+endef
+
+define KernelPackage/mlxreg-lc/description
+  Provides support for the Mellanox MSN4800-XX line cards,
+  which are the part of MSN4800 Ethernet modular switch systems.
+endef
+
+$(eval $(call KernelPackage,mlxreg-lc))
+
+
+define KernelPackage/mlxreg-sn2201
+  SUBMENU:=$(OTHER_MENU)
+  TITLE:=Nvidia SN2201 platform support
+  DEPENDS:=kmod-mlxreg +kmod-regmap-i2c
+  KCONFIG:=CONFIG_NVSW_SN2201
+  FILES:=$(LINUX_DIR)/drivers/platform/mellanox/nvsw-sn2201.ko
+  AUTOLOAD:=$(call AutoProbe,nvsw-sn2201)
+endef
+
+define KernelPackage/mlxreg-sn2201/description
+  Provides support for the Nvidia SN2201 platform.
+endef
+
+$(eval $(call KernelPackage,mlxreg-sn2201))
+
+
 define KernelPackage/pinctrl-mcp23s08
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Microchip MCP23xxx I/O expander



From lede-commits at lists.infradead.org  Sat May 25 11:19:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:48 -0400
Subject: [openwrt/openwrt]  layerscape: adjust dts path in image scripts
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38419.1716662440.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d73a66be61a3a8a2ae3b420485346aa4cd6e1b73

commit d73a66be61a3a8a2ae3b420485346aa4cd6e1b73
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Wed Mar 27 13:08:39 2024 +0100

    layerscape: adjust dts path in image scripts
    
    After the spliting dts folder of ARM architecture in upstream,
    layerscape routines need to be adjusted for new solution.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/layerscape/image/Makefile     |  2 +-
 target/linux/layerscape/image/armv7.mk     |  9 +++++++--
 target/linux/layerscape/image/armv8_64b.mk | 31 ++++++++++++++----------------
 3 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile
index f2ac9b6f04..a4885e8912 100644
--- a/target/linux/layerscape/image/Makefile
+++ b/target/linux/layerscape/image/Makefile
@@ -33,7 +33,7 @@ define Build/ls-append
 endef
 
 define Build/ls-append-dtb
-	dd if=$(DTS_DIR)/$(1).dtb >> $@
+	dd if=$(DEVICE_DTS_DIR)/$(1).dtb >> $@
 endef
 
 define Build/ls-append-kernel
diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk
index fe396212e7..916f92eacf 100644
--- a/target/linux/layerscape/image/armv7.mk
+++ b/target/linux/layerscape/image/armv7.mk
@@ -6,8 +6,13 @@ define Device/Default
   PROFILES := Default
   FILESYSTEMS := squashfs
   IMAGES := firmware.bin sysupgrade.bin
+ifdef CONFIG_LINUX_6_1
+  DEVICE_DTS_DIR := $(DTS_DIR)
+else
+  DEVICE_DTS_DIR := $(DTS_DIR)/nxp/ls
+endif
   KERNEL := kernel-bin | uImage none
-  KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
   KERNEL_NAME := zImage
   KERNEL_LOADADDR := 0x80008000
   DEVICE_DTS = $(lastword $(subst _, ,$(1)))
@@ -20,7 +25,7 @@ define Device/Default
 endef
 
 define Device/fsl-sdboot
-  KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
   IMAGES := sdcard.img.gz sysupgrade.bin
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk
index 259bacee31..4bce779984 100644
--- a/target/linux/layerscape/image/armv8_64b.mk
+++ b/target/linux/layerscape/image/armv8_64b.mk
@@ -5,11 +5,12 @@
 define Device/Default
   PROFILES := Default
   IMAGES := firmware.bin sysupgrade.bin
+  DEVICE_DTS_DIR := $(DTS_DIR)/freescale
+  DEVICE_DTS = $(subst _,-,$(1))
   FILESYSTEMS := squashfs
   KERNEL := kernel-bin | gzip | uImage gzip
-  KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
   KERNEL_LOADADDR := 0x80000000
-  DEVICE_DTS = freescale/$(subst _,-,$(1))
   IMAGE_SIZE := 64m
   IMAGE/sysupgrade.bin = \
     ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \
@@ -19,7 +20,7 @@ define Device/Default
 endef
 
 define Device/fsl-sdboot
-  KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
   IMAGES := sdcard.img.gz sysupgrade.bin
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
 endef
@@ -45,7 +46,7 @@ define Device/fsl_ls1012a-frdm
     append-kernel | pad-to $$(BLOCKSIZE) | \
     append-rootfs | pad-rootfs | \
     check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
-  KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL := kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
 endef
 TARGET_DEVICES += fsl_ls1012a-frdm
 
@@ -81,7 +82,7 @@ define Device/fsl_ls1012a-frwy-sdboot
     layerscape-ppfe \
     trusted-firmware-a-ls1012a-frwy-sdboot \
     kmod-ppfe
-  DEVICE_DTS := freescale/fsl-ls1012a-frwy
+  DEVICE_DTS := fsl-ls1012a-frwy
   IMAGES += firmware.bin
   IMAGE/firmware.bin := \
     ls-clean | \
@@ -102,8 +103,7 @@ define Device/fsl_ls1028a-rdb
   DEVICE_VENDOR := NXP
   DEVICE_MODEL := LS1028A-RDB
   DEVICE_VARIANT := Default
-  DEVICE_DTS := freescale/fsl-ls1028a-rdb
-  KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+  KERNEL = kernel-bin | gzip | fit gzip $$(DEVICE_DTS_DIR)/$$(DEVICE_DTS).dtb
   DEVICE_PACKAGES += \
     trusted-firmware-a-ls1028a-rdb \
     kmod-hwmon-ina2xx \
@@ -128,7 +128,7 @@ define Device/fsl_ls1028a-rdb-sdboot
   DEVICE_VENDOR := NXP
   DEVICE_MODEL := LS1028A-RDB
   DEVICE_VARIANT := SD Card Boot
-  DEVICE_DTS := freescale/fsl-ls1028a-rdb
+  DEVICE_DTS := fsl-ls1028a-rdb
   DEVICE_PACKAGES += \
     trusted-firmware-a-ls1028a-rdb-sdboot \
     kmod-hwmon-ina2xx \
@@ -157,7 +157,6 @@ define Device/fsl_ls1043a-rdb
     kmod-ahci-qoriq \
     kmod-hwmon-ina2xx \
     kmod-hwmon-lm90
-  DEVICE_DTS := freescale/fsl-ls1043a-rdb
   IMAGE/firmware.bin := \
     ls-clean | \
     ls-append $(1)-bl2.pbl | pad-to 1M | \
@@ -183,7 +182,7 @@ define Device/fsl_ls1043a-rdb-sdboot
     kmod-ahci-qoriq \
     kmod-hwmon-ina2xx \
     kmod-hwmon-lm90
-  DEVICE_DTS := freescale/fsl-ls1043a-rdb
+  DEVICE_DTS := fsl-ls1043a-rdb
   IMAGE/sdcard.img.gz := \
     ls-clean | \
     ls-append-sdhead $(1) | pad-to 4K | \
@@ -203,7 +202,6 @@ define Device/fsl_ls1046a-frwy
   DEVICE_PACKAGES += \
     layerscape-fman \
     trusted-firmware-a-ls1046a-frwy
-  DEVICE_DTS := freescale/fsl-ls1046a-frwy
   IMAGE/firmware.bin := \
     ls-clean | \
     ls-append $(1)-bl2.pbl | pad-to 1M | \
@@ -224,7 +222,7 @@ define Device/fsl_ls1046a-frwy-sdboot
   DEVICE_PACKAGES += \
     layerscape-fman \
     trusted-firmware-a-ls1046a-frwy-sdboot
-  DEVICE_DTS := freescale/fsl-ls1046a-frwy
+  DEVICE_DTS := fsl-ls1046a-frwy
   IMAGE/sdcard.img.gz := \
     ls-clean | \
     ls-append-sdhead $(1) | pad-to 4K | \
@@ -249,7 +247,6 @@ define Device/fsl_ls1046a-rdb
     kmod-ahci-qoriq \
     kmod-hwmon-ina2xx \
     kmod-hwmon-lm90
-  DEVICE_DTS := freescale/fsl-ls1046a-rdb
   IMAGE/firmware.bin := \
     ls-clean | \
     ls-append $(1)-bl2.pbl | pad-to 1M | \
@@ -275,7 +272,7 @@ define Device/fsl_ls1046a-rdb-sdboot
     kmod-ahci-qoriq \
     kmod-hwmon-ina2xx \
     kmod-hwmon-lm90
-  DEVICE_DTS := freescale/fsl-ls1046a-rdb
+  DEVICE_DTS := fsl-ls1046a-rdb
   IMAGE/sdcard.img.gz := \
     ls-clean | \
     ls-append-sdhead $(1) | pad-to 4K | \
@@ -329,7 +326,7 @@ define Device/fsl_ls1088a-rdb-sdboot
     kmod-ahci-qoriq \
     kmod-hwmon-ina2xx \
     kmod-hwmon-lm90
-  DEVICE_DTS := freescale/fsl-ls1088a-rdb
+  DEVICE_DTS := fsl-ls1088a-rdb
   IMAGE/sdcard.img.gz := \
     ls-clean | \
     ls-append-sdhead $(1) | pad-to 4K | \
@@ -404,7 +401,7 @@ define Device/fsl_lx2160a-rdb-sdboot
     layerscape-ddr-phy \
     trusted-firmware-a-lx2160a-rdb-sdboot \
     restool
-  DEVICE_DTS := freescale/fsl-lx2160a-rdb
+  DEVICE_DTS := fsl-lx2160a-rdb
   IMAGE/sdcard.img.gz := \
     ls-clean | \
     ls-append-sdhead $(1) | pad-to 4K | \
@@ -438,7 +435,7 @@ define Device/traverse_ten64_mtd
   KERNEL_ENTRY_POINT := 0x80000000
   FDT_LOADADDR := 0x90000000
   KERNEL_SUFFIX := -kernel.itb
-  DEVICE_DTS := freescale/fsl-ls1088a-ten64
+  DEVICE_DTS := fsl-ls1088a-ten64
   IMAGES := nand.ubi sysupgrade.bin
   KERNEL := kernel-bin | gzip | traverse-fit-ls1088 gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb $$(FDT_LOADADDR)
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata



From lede-commits at lists.infradead.org  Sat May 25 11:19:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:49 -0400
Subject: [openwrt/openwrt]  layerscape: add 6.6 testing kernel
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38420.1716663137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1b24cbeede332b461a917355a7b04c12b4869769

commit 1b24cbeede332b461a917355a7b04c12b4869769
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Wed Mar 27 13:12:11 2024 +0100

    layerscape: add 6.6 testing kernel
    
    Support is ready. Let's enable 6.6 as testing version.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/layerscape/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile
index 79aa8f1474..30b9fb8f73 100644
--- a/target/linux/layerscape/Makefile
+++ b/target/linux/layerscape/Makefile
@@ -8,6 +8,7 @@ BOARD:=layerscape
 BOARDNAME:=NXP Layerscape
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 rootfs-part boot-part
 SUBTARGETS:=armv8_64b armv7



From lede-commits at lists.infradead.org  Sat May 25 11:19:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 25 May 2024 14:19:47 -0400
Subject: [openwrt/openwrt]  layerscape: refresh 6.6 config
In-Reply-To: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
References: <171666117750.4148292.12373834354531001363@git-01.infra.openwrt.org>
Message-ID: <mailman.38423.1716663566.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ec956af626422e39ab6bdc796726f631e8a2349a

commit ec956af626422e39ab6bdc796726f631e8a2349a
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Tue Mar 26 11:08:05 2024 +0100

    layerscape: refresh 6.6 config
    
    Mostly done by 'make kernel_oldconfig'.
    
    armv8_64b has added one entry manually:
    CONFIG_CRYPTO_CURVE25519=y
    
    as workaround for error:
    aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
            `crypto_engine_register_kpp':
    crypto_engine.c:687: undefined reference to `crypto_register_kpp'
    crypto_engine.c:687:(.text+0x57c): relocation truncated to fit:
            R_AARCH64_CALL26 against undefined symbol `crypto_register_kpp'
    aarch64-openwrt-linux-musl-ld: crypto/crypto_engine.o: in function
            `crypto_engine_unregister_kpp':
    crypto/crypto_engine.c:693: undefined reference to `crypto_unregister_kpp'
    crypto_engine.c:693:(.text+0x5a0): relocation truncated to fit:
            R_AARCH64_CALL26 against undefined symbol `crypto_unregister_kpp'
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/layerscape/armv7/config-6.6     | 42 +++++++++-------
 target/linux/layerscape/armv8_64b/config-6.6 | 73 ++++++++++++++++------------
 2 files changed, 65 insertions(+), 50 deletions(-)

diff --git a/target/linux/layerscape/armv7/config-6.6 b/target/linux/layerscape/armv7/config-6.6
index a4744623e4..63c49df174 100644
--- a/target/linux/layerscape/armv7/config-6.6
+++ b/target/linux/layerscape/armv7/config-6.6
@@ -13,11 +13,11 @@ CONFIG_ARCH_MULTIPLATFORM=y
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_MXC=y
-CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_APPENDED_DTB=y
@@ -55,7 +55,6 @@ CONFIG_ARM_THUMBEE=y
 CONFIG_ARM_UNWIND=y
 CONFIG_ARM_VIRT_EXT=y
 CONFIG_ATAGS=y
-CONFIG_AUTOFS4_FS=y
 CONFIG_AUTOFS_FS=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BATTERY_SBS=y
@@ -75,6 +74,7 @@ CONFIG_BLK_PM=y
 CONFIG_BOUNCE=y
 CONFIG_BRCMSTB_GISB_ARB=y
 CONFIG_BROADCOM_PHY=y
+CONFIG_BUFFER_HEAD=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
 CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
@@ -154,16 +154,17 @@ CONFIG_CRASH_CORE=y
 CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRC_CCITT=y
 CONFIG_CROSS_MEMORY_ATTACH=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
@@ -215,7 +216,6 @@ CONFIG_FHANDLE=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FREEZER=y
-# CONFIG_FSL_DPAA2_SWITCH is not set
 CONFIG_FSL_EDMA=y
 CONFIG_FSL_GUTS=y
 CONFIG_FSL_IFC=y
@@ -228,6 +228,7 @@ CONFIG_FS_MBCACHE=y
 CONFIG_FS_POSIX_ACL=y
 CONFIG_FTRACE=y
 # CONFIG_FTRACE_SYSCALLS is not set
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FUSE_FS=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_CACHE=y
@@ -235,6 +236,7 @@ CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -253,7 +255,6 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_PINCONF=y
@@ -279,13 +280,14 @@ CONFIG_GPIO_VF610=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HAVE_SMP=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
 CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
 # CONFIG_HIST_TRIGGERS is not set
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HVC_DRIVER=y
 CONFIG_HW_CONSOLE=y
@@ -323,6 +325,8 @@ CONFIG_IMX_SDMA=y
 # CONFIG_IMX_WEIM is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
+# CONFIG_INPUT_BBNSM_PWRKEY is not set
+# CONFIG_IOMMUFD is not set
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
@@ -345,6 +349,7 @@ CONFIG_KEXEC=y
 CONFIG_KEXEC_CORE=y
 CONFIG_KMAP_LOCAL=y
 CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_LEGACY_DIRECT_IO=y
 CONFIG_LIBFDT=y
 CONFIG_LOCALVERSION_AUTO=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
@@ -361,7 +366,6 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 # CONFIG_MDIO_GPIO is not set
-CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MEMORY_ISOLATION=y
 # CONFIG_MFD_HI6421_SPMI is not set
@@ -380,6 +384,7 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y
 CONFIG_MMC_SDHCI_OF_ESDHC=y
 # CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MSDOS_FS=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
@@ -404,20 +409,22 @@ CONFIG_MTD_UBI_BEB_LIMIT=20
 # CONFIG_MTD_UBI_BLOCK is not set
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_MX3_IPU=y
-CONFIG_MX3_IPU_IRQS=4
 CONFIG_MXC_CLK=y
 # CONFIG_MXS_DMA is not set
 CONFIG_NAMESPACES=y
 CONFIG_NATIONAL_PHY=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NEON=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_NS=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_SWITCHDEV=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
@@ -430,6 +437,7 @@ CONFIG_NTFS_FS=y
 CONFIG_NVMEM=y
 # CONFIG_NVMEM_IMX_IIM is not set
 # CONFIG_NVMEM_IMX_OCOTP_ELE is not set
+CONFIG_NVMEM_LAYOUTS=y
 # CONFIG_NVMEM_SNVS_LPGPR is not set
 # CONFIG_NVMEM_SPMI_SDAM is not set
 CONFIG_NVMEM_SYSFS=y
@@ -471,13 +479,13 @@ CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_ECAM=y
 CONFIG_PCI_HOST_COMMON=y
 CONFIG_PCI_HOST_GENERIC=y
-# CONFIG_PCI_IMX6 is not set
+# CONFIG_PCI_IMX6_HOST is not set
 CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PID_NS=y
 CONFIG_PINCTRL=y
@@ -512,10 +520,7 @@ CONFIG_PROC_CHILDREN=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PSTORE=y
 CONFIG_PSTORE_COMPRESS=y
-CONFIG_PSTORE_COMPRESS_DEFAULT="deflate"
 CONFIG_PSTORE_CONSOLE=y
-CONFIG_PSTORE_DEFLATE_COMPRESS=y
-CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT=y
 CONFIG_PSTORE_PMSG=y
 CONFIG_PSTORE_RAM=y
 CONFIG_PTP_1588_CLOCK=y
@@ -542,6 +547,7 @@ CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_BBNSM is not set
 # CONFIG_RTC_DRV_CMOS is not set
 CONFIG_RTC_DRV_DS1307=y
 CONFIG_RTC_DRV_DS3232=y
@@ -565,6 +571,7 @@ CONFIG_SERIAL_8250_DWLIB=y
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PCILIB=y
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 CONFIG_SERIAL_CONEXANT_DIGICOLOR=y
 CONFIG_SERIAL_CONEXANT_DIGICOLOR_CONSOLE=y
@@ -617,15 +624,14 @@ CONFIG_SPI_SPIDEV=y
 CONFIG_SPI_XILINX=y
 CONFIG_SPMI=y
 # CONFIG_SPMI_HISI3670 is not set
-# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SQUASHFS_FILE_CACHE=y
 # CONFIG_SQUASHFS_FILE_DIRECT is not set
 CONFIG_SQUASHFS_LZO=y
 CONFIG_SQUASHFS_ZLIB=y
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
-CONFIG_SRCU=y
+# CONFIG_SSIF_IPMI_BMC is not set
 CONFIG_STACKTRACE=y
 CONFIG_STAGING_BOARD=y
 # CONFIG_STRIP_ASM_SYMS is not set
diff --git a/target/linux/layerscape/armv8_64b/config-6.6 b/target/linux/layerscape/armv8_64b/config-6.6
index a2a4a633af..71692ef4ee 100644
--- a/target/linux/layerscape/armv8_64b/config-6.6
+++ b/target/linux/layerscape/armv8_64b/config-6.6
@@ -2,7 +2,9 @@ CONFIG_64BIT=y
 CONFIG_AQUANTIA_PHY=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
+CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_FORCE_MAX_ORDER=10
 CONFIG_ARCH_HIBERNATION_HEADER=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
@@ -12,7 +14,6 @@ CONFIG_ARCH_MMAP_RND_BITS=18
 CONFIG_ARCH_MMAP_RND_BITS_MAX=33
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_NXP=y
 CONFIG_ARCH_PROC_KCORE_TEXT=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
@@ -82,13 +83,13 @@ CONFIG_AUDIT=y
 CONFIG_AUDITSYSCALL=y
 CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
 CONFIG_AUDIT_GENERIC=y
-CONFIG_AUTOFS4_FS=y
 CONFIG_AUTOFS_FS=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BALLOON_COMPACTION=y
 CONFIG_BATTERY_BQ27XXX=y
 # CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set
 CONFIG_BATTERY_BQ27XXX_I2C=y
+CONFIG_BLK_CGROUP_PUNT_BIO=y
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_BSG_COMMON=y
@@ -107,6 +108,8 @@ CONFIG_BSD_PROCESS_ACCT_V3=y
 CONFIG_BTRFS_FS=y
 # CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set
 CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_BUFFER_HEAD=y
+CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y
 CONFIG_CAVIUM_ERRATUM_22375=y
 CONFIG_CAVIUM_ERRATUM_23144=y
 CONFIG_CAVIUM_ERRATUM_23154=y
@@ -165,6 +168,7 @@ CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
 CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_THERMAL=y
@@ -175,6 +179,7 @@ CONFIG_CRC32_SLICEBY8=y
 CONFIG_CRC64=y
 CONFIG_CRC64_ROCKSOFT=y
 CONFIG_CRC7=y
+CONFIG_CRC_CCITT=y
 CONFIG_CRC_ITU_T=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CROSS_MEMORY_ATTACH=y
@@ -191,6 +196,7 @@ CONFIG_CRYPTO_CRC64_ROCKSOFT=y
 CONFIG_CRYPTO_CRCT10DIF=y
 CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
 CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_CURVE25519=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_DES=y
 CONFIG_CRYPTO_DEV_FSL_CAAM=y
@@ -200,8 +206,6 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_COMMON=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI=y
-# CONFIG_CRYPTO_DEV_FSL_CAAM_DEBUG is not set
-# CONFIG_CRYPTO_DEV_FSL_CAAM_INTC is not set
 CONFIG_CRYPTO_DEV_FSL_CAAM_JR=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_PKC_API=y
 CONFIG_CRYPTO_DEV_FSL_CAAM_PRNG_API=y
@@ -214,7 +218,9 @@ CONFIG_CRYPTO_GHASH_ARM64_CE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y
 CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_SHA256=y
 CONFIG_CRYPTO_LIB_UTILS=y
@@ -241,10 +247,12 @@ CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DIMLIB=y
 CONFIG_DMADEVICES=y
 CONFIG_DMATEST=y
+CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_DIRECT_REMAP=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_ENGINE_RAID=y
+# CONFIG_DMA_NUMA_CMA is not set
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
 CONFIG_DMA_SHARED_BUFFER=y
@@ -258,7 +266,6 @@ CONFIG_DUMMY_CONSOLE=y
 CONFIG_EDAC_SUPPORT=y
 CONFIG_EEPROM_AT24=y
 CONFIG_ELF_CORE=y
-# CONFIG_EMBEDDED is not set
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_POSIX_ACL=y
@@ -274,9 +281,11 @@ CONFIG_FB_ARMCLCD=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
+CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
 CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
 CONFIG_FB_SYS_FOPS=y
@@ -297,11 +306,11 @@ CONFIG_FSL_DPAA=y
 CONFIG_FSL_DPAA2_ETH=y
 CONFIG_FSL_DPAA2_PTP_CLOCK=y
 # CONFIG_FSL_DPAA2_QDMA is not set
-# CONFIG_FSL_DPAA2_SWITCH is not set
 # CONFIG_FSL_DPAA_CHECKING is not set
 CONFIG_FSL_DPAA_ETH=y
 CONFIG_FSL_EDMA=y
 CONFIG_FSL_ENETC=y
+CONFIG_FSL_ENETC_CORE=y
 CONFIG_FSL_ENETC_IERB=y
 CONFIG_FSL_ENETC_MDIO=y
 CONFIG_FSL_ENETC_PTP_CLOCK=y
@@ -320,6 +329,8 @@ CONFIG_FSL_XGMAC_MDIO=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FUNCTION_ALIGNMENT=4
+CONFIG_FUNCTION_ALIGNMENT_4B=y
 CONFIG_FUSE_FS=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_CACHE=y
@@ -327,8 +338,9 @@ CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
 CONFIG_GARP=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
-CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
+CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_NUMA=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
@@ -349,7 +361,6 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_SCHED_CLOCK=y
@@ -370,21 +381,13 @@ CONFIG_GRO_CELLS=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HIBERNATE_CALLBACKS=y
 CONFIG_HIBERNATION=y
 CONFIG_HIBERNATION_SNAPSHOT_DEV=y
-CONFIG_HID=y
-CONFIG_HID_A4TECH=y
-CONFIG_HID_APPLE=y
-CONFIG_HID_BELKIN=y
-CONFIG_HID_CHERRY=y
-CONFIG_HID_CYPRESS=y
-CONFIG_HID_EZKEY=y
-CONFIG_HID_GENERIC=y
-CONFIG_HID_KENSINGTON=y
-CONFIG_HID_MICROSOFT=y
-CONFIG_HID_MONTEREY=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
@@ -426,6 +429,7 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_VIVALDIFMAP=y
 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
 CONFIG_INTERVAL_TREE=y
+# CONFIG_IOMMUFD is not set
 CONFIG_IOMMU_API=y
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
@@ -458,6 +462,7 @@ CONFIG_KEXEC_CORE=y
 CONFIG_KEYBOARD_ATKBD=y
 CONFIG_KEYBOARD_GPIO=y
 CONFIG_KSM=y
+CONFIG_LEGACY_DIRECT_IO=y
 CONFIG_LIBCRC32C=y
 CONFIG_LIBFDT=y
 CONFIG_LOCALVERSION_AUTO=y
@@ -480,7 +485,6 @@ CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 # CONFIG_MDIO_GPIO is not set
-CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MEMORY_BALLOON=y
 CONFIG_MEMORY_ISOLATION=y
@@ -499,6 +503,7 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y
 CONFIG_MMC_SDHCI_OF_ESDHC=y
 # CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MMU_NOTIFIER=y
 CONFIG_MODULES_USE_ELF_RELA=y
 CONFIG_MODULE_FORCE_LOAD=y
@@ -554,18 +559,23 @@ CONFIG_NAMESPACES=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
 CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
+CONFIG_NEED_SG_DMA_FLAGS=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 CONFIG_NET_DEVLINK=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MSCC_FELIX=y
+CONFIG_NET_DSA_MSCC_FELIX_DSA_LIB=y
 CONFIG_NET_DSA_TAG_OCELOT=y
 CONFIG_NET_DSA_TAG_OCELOT_8021Q=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_NS=y
 CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_SWITCHDEV=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_ISO8859_1=y
@@ -578,6 +588,7 @@ CONFIG_NUMA_BALANCING=y
 CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYERSCAPE_SFP=y
+CONFIG_NVMEM_LAYOUTS=y
 # CONFIG_NVMEM_SPMI_SDAM is not set
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
@@ -627,14 +638,14 @@ CONFIG_PCI_HOST_GENERIC=y
 CONFIG_PCI_IOV=y
 CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCS_LYNX=y
+CONFIG_PER_VMA_LOCK=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 # CONFIG_PHY_FSL_LYNX_28G is not set
-CONFIG_PHY_XGENE=y
 CONFIG_PID_IN_CONTEXTIDR=y
 CONFIG_PID_NS=y
 CONFIG_PL330_DMA=y
@@ -658,7 +669,6 @@ CONFIG_PREEMPT_COUNT=y
 # CONFIG_PREEMPT_NONE is not set
 CONFIG_PREEMPT_RCU=y
 CONFIG_PRINTK_TIME=y
-CONFIG_PRINT_QUOTA_WARNING=y
 CONFIG_PROC_CHILDREN=y
 CONFIG_PROFILING=y
 CONFIG_PTP_1588_CLOCK=y
@@ -721,6 +731,7 @@ CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PCILIB=y
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
 CONFIG_SERIAL_8250_SHARE_IRQ=y
 CONFIG_SERIAL_AMBA_PL011=y
@@ -740,8 +751,6 @@ CONFIG_SERIO_AMBAKMI=y
 CONFIG_SERIO_LIBPS2=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SG_POOL=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
 CONFIG_SMP=y
 CONFIG_SOCK_DIAG=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
@@ -761,14 +770,12 @@ CONFIG_SPI_NXP_FLEXSPI=y
 CONFIG_SPI_PL022=y
 CONFIG_SPMI=y
 # CONFIG_SPMI_HISI3670 is not set
-# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SQUASHFS_FILE_CACHE=y
 # CONFIG_SQUASHFS_FILE_DIRECT is not set
 # CONFIG_SQUASHFS_XZ is not set
 CONFIG_SQUASHFS_ZLIB=y
 CONFIG_SRAM=y
-CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
@@ -802,7 +809,6 @@ CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
 CONFIG_TRANS_TABLE=y
 CONFIG_TREE_RCU=y
 CONFIG_TREE_SRCU=y
-# CONFIG_UACCE is not set
 CONFIG_UBIFS_FS=y
 # CONFIG_UCLAMP_TASK is not set
 CONFIG_UIO=y
@@ -825,9 +831,11 @@ CONFIG_UTS_NS=y
 CONFIG_VEXPRESS_CONFIG=y
 CONFIG_VFAT_FS=y
 CONFIG_VFIO=y
+# CONFIG_VFIO_AMBA is not set
+CONFIG_VFIO_CONTAINER=y
 CONFIG_VFIO_FSL_MC=y
+CONFIG_VFIO_GROUP=y
 CONFIG_VFIO_IOMMU_TYPE1=y
-# CONFIG_VFIO_MDEV is not set
 # CONFIG_VFIO_NOIOMMU is not set
 CONFIG_VFIO_PCI=y
 CONFIG_VFIO_PCI_CORE=y
@@ -837,6 +845,7 @@ CONFIG_VFIO_VIRQFD=y
 CONFIG_VGA_ARB=y
 CONFIG_VGA_ARB_MAX_GPUS=16
 CONFIG_VIDEOMODE_HELPERS=y
+CONFIG_VIDEO_CMDLINE=y
 CONFIG_VIRTIO=y
 CONFIG_VIRTIO_ANCHOR=y
 CONFIG_VIRTIO_BALLOON=y



From lede-commits at lists.infradead.org  Sun May 26 15:33:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 26 May 2024 18:33:18 -0400
Subject: [openwrt/openwrt]  ath79: add support for Dell SonicPoint ACe
 APL26-0AE
In-Reply-To: <171676279853.3808229.4860290227755844343@git-01.infra.openwrt.org>
References: <171676279853.3808229.4860290227755844343@git-01.infra.openwrt.org>
Message-ID: <mailman.38484.1716762810.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f7f8099aa3ae551df14b3b2bac332a80e861a690

commit f7f8099aa3ae551df14b3b2bac332a80e861a690
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed Apr 17 17:01:55 2024 +0200

    ath79: add support for Dell SonicPoint ACe APL26-0AE
    
    Dell/SonicWall APL26-0AE (marketed as SonicPoint ACe) is a dual band
    wireless access point. End of life as of 2022-07-31.
    
    Specification
    SoC: QualcommAtheros QCA9550
    RAM: 256 MB DDR2
    Flash: 32 MB SPI NOR
    WIFI: 2.4 GHz 3T3R integrated
          5 GHz 3T3R QCA9890 oversized Mini PCIe card
    Ethernet: 2x 10/100/1000 Mbps QCA8334
              port labeled lan1 is PoE capable (802.3at)
    USB: 1x 2.0
    LEDs: LEDs: 6x which 5 are GPIO controlled and two of them are dual color
    Buttons: 2x GPIO controlled
    Serial: RJ-45 port, SonicWall pinout
            baud: 115200, parity: none, flow control: none
    
    Before flashing, be sure to have a copy of factory firmware, in case You
    wish to revert to original firmware.
    All described procedures were done in following environment:
    ROM Version: SonicROM (U-Boot) 8.0.0.0-11o
    SafeMode Firmware Version: SonicOS 8.0.0.0-14o
    Firmware Version: SonicOS 9.0.1.0
    In case of other versions, following installation instructions might be
    ineffective.
    
    Installation
    1. Prepare TFTP server with OpenWrt sysupgrade image and rename that
       image to "sp_fw.bin".
    2. Connect to one of LAN ports.
    3. Connect to serial port.
    4. Hold the reset button (small through hole on side of the unit),
       power on the device and when prompted to stop autoboot, hit any key.
       The held button can now be released.
    5. Alter U-Boot environment with following commands:
        setenv bootcmd bootm 0x9F110000
        saveenv
    6. Adjust "ipaddr" (access point, default is 192.168.1.1) and "serverip"
       (TFTP server, default is 192.168.1.10) addresses in U-Boot
       environment, then run following commands:
        tftp 0x80060000 sp_fw.bin
        erase 0x9F110000 +0x1EF0000
        cp.b 0x80060000 0x9F110000 $filesize
    7. After successful flashing, execute:
        boot
    8. The access point will boot to OpenWrt. Wait few minutes, until the
        wrench LED will stop blinking, then it's ready for configuration.
    
    Known issues
    Initramfs image can't be bigger than specified kernel size, otherwise
    bootloader will throw LZMA decompressing error. Switching to lzma-loader
    should workaround that.
    This device has Winbond 25Q256FVFG and doesn't have reliable reset, which
    causes hang on reboot, thus broken-flash-reset needs to be added. This
    property addition causes dispaly of "scary" warning on each boot, take
    this warnig into consideration.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/boot/uboot-envtools/files/ath79            |   3 +
 target/linux/ath79/dts/qca9550_dell_apl26-0ae.dts  | 228 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   4 +
 .../generic/base-files/etc/board.d/02_network      |   4 +
 target/linux/ath79/image/generic.mk                |  16 ++
 5 files changed, 255 insertions(+)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 4a6e7e4d0a..099aebcfa2 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -109,6 +109,9 @@ buffalo,wzr-hp-g300nh-s|\
 linksys,ea4500-v3)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
 	;;
+dell,apl26-0ae)
+	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x10000"
+	;;
 domywifi,dw33d)
 	ubootenv_add_uci_config "/dev/mtd4" "0x0" "0x10000" "0x10000"
 	;;
diff --git a/target/linux/ath79/dts/qca9550_dell_apl26-0ae.dts b/target/linux/ath79/dts/qca9550_dell_apl26-0ae.dts
new file mode 100644
index 0000000000..6ef2eb846d
--- /dev/null
+++ b/target/linux/ath79/dts/qca9550_dell_apl26-0ae.dts
@@ -0,0 +1,228 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "qca955x.dtsi"
+
+/ {
+	model = "Dell SonicPoint ACe (APL26-0AE)";
+	compatible = "dell,apl26-0ae", "qca,qca9550", "qca,qca9558";
+
+	aliases {
+		label-mac-device = &eth0;
+		led-boot = &led_wrench;
+		led-failsafe = &led_wrench;
+		led-upgrade = &led_wrench;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		button-reset {
+			label = "reset";
+			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		/* Accessible only after disassembling the casing */
+		button-service {
+			label = "service";
+			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_POWER>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		led-lan1-amber {
+			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <1>;
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		led-lan1-green {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <1>;
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+		};
+
+		led-lan2-amber {
+			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <2>;
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+
+		led-lan2-green {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <2>;
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		led-wlan2g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			linux,default-trigger = "phy1tpt";
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		led-wlan5g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			linux,default-trigger = "phy0tpt";
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led_wrench: led-wrench {
+			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_sysinfo_50 0>;
+	nvmem-cell-names = "mac-address";
+	phy-handle = <&phy0>;
+	pll-data = <0xa6000000 0x00000101 0x00001616>;
+};
+
+&eth1 {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_sysinfo_50 1>;
+	nvmem-cell-names = "mac-address";
+	pll-data = <0x03000101 0x00000101 0x00001616>;
+
+	fixed-link {
+		speed = <1000>;
+		full-duplex;
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+
+		qca,ar8327-initvals = <
+			0x04 0x07680000 /* PORT0 PAD MODE CTRL */
+			0x0c 0x00000080 /* PORT6 PAD MODE CTRL */
+			0x10 0x40000000 /* POWER_ON_STRAP */
+			0x50 0xffb7c405 /* LED0 CTRL */
+			0x54 0xffb7c305 /* LED1 CTRL */
+			0x58 0xffb7c033 /* LED2 CTRL */
+			0x5c 0x03ffff00 /* LED3 CTRL */
+			0x7c 0x0000007e /* PORT0_STATUS */
+			0x94 0x0000007e /* PORT6_STATUS */
+		>;
+	};
+};
+
+&pcie0 {
+	status = "okay";
+
+	wifi at 0,0 {
+		compatible = "qcom,ath10k";
+		reg = <0x0000 0 0 0 0>;
+
+		/* OEM overwrites EEPROM stored adress and so do we */
+		nvmem-cells = <&macaddr_sysinfo_50 2>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+		broken-flash-reset;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0000000 0x0080000>;
+				read-only;
+			};
+
+			partition at 80000 {
+				label = "u-boot-env";
+				reg = <0x0080000 0x0040000>;
+			};
+
+			partition at c0000 {
+				label = "sysinfo";
+				reg = <0x00c0000 0x0040000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_sysinfo_50: macaddr at 50 {
+						compatible = "mac-base";
+						reg = <0x50 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 100000 {
+				label = "art";
+				reg = <0x0100000 0x0010000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					cal_art_1000: calibration at 1000 {
+						reg = <0x1000 0x440>;
+					};
+				};
+			};
+
+			partition at 110000 {
+				label = "firmware";
+				reg = <0x0110000 0x1ef0000>;
+				compatible = "denx,uimage";
+			};
+		};
+	};
+};
+
+&usb_phy0 {
+	status = "okay";
+};
+
+&usb0 {
+	status = "okay";
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_sysinfo_50 10>, <&cal_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
+};
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 98d1b0a7ba..143309a8b2 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
@@ -232,6 +232,10 @@ compex,wpj531-16m)
 	ucidef_set_led_rssi "sig3" "SIG3" "green:sig3" "wlan0" "65" "100"
 	ucidef_set_led_rssi "sig4" "SIG4" "green:sig4" "wlan0" "50" "100"
 	;;
+dell,apl26-0ae)
+	ucidef_set_led_switch "lan1" "LAN1" "amber:lan-1" "switch0" "0x04"
+	ucidef_set_led_switch "lan2" "LAN2" "amber:lan-2" "switch0" "0x08"
+	;;
 devolo,dlan-pro-1200plus-ac|\
 devolo,magic-2-wifi)
 	ucidef_set_led_netdev "plcw" "dLAN" "white:dlan" "eth0.1" "rx"
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 8af618d267..7905d6e496 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
@@ -288,6 +288,10 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"1:wan" "5:lan" "6 at eth0"
 		;;
+	dell,apl26-0ae)
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "2:lan:1" "3:lan:2" "6 at eth1"
+		;;
 	devolo,dlan-pro-1200plus-ac|\
 	devolo,magic-2-wifi)
 		ucidef_add_switch "switch0" \
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index ca72c8c6d8..0da5a0ef8d 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -944,6 +944,22 @@ define Device/compex_wpj563
 endef
 TARGET_DEVICES += compex_wpj563
 
+define Device/dell_apl26-0ae
+  SOC := qca9550
+  DEVICE_VENDOR := Dell
+  DEVICE_MODEL := SonicPoint
+  DEVICE_VARIANT := ACe (APL26-0AE)
+  DEVICE_ALT0_VENDOR := SonicWall
+  DEVICE_ALT0_MODEL := SonicPoint
+  DEVICE_ALT0_VARIANT := ACe (APL26-0AE)
+  DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct kmod-usb2
+  KERNEL_SIZE := 5952k
+  IMAGE_SIZE := 31680k
+  IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
+	append-rootfs | pad-rootfs | check-size | append-metadata
+endef
+TARGET_DEVICES += dell_apl26-0ae
+
 define Device/devolo_dlan-pro-1200plus-ac
   SOC := ar9344
   DEVICE_VENDOR := devolo



From lede-commits at lists.infradead.org  Mon May 27 06:46:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 27 May 2024 09:46:33 -0400
Subject: [openwrt/openwrt]  lantiq: switch to kernel 6.1
In-Reply-To: <171681759305.1759250.13967521514691248583@git-01.infra.openwrt.org>
References: <171681759305.1759250.13967521514691248583@git-01.infra.openwrt.org>
Message-ID: <mailman.38684.1716817602.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7514d9bb6f7239fc5c962590b31bd3b6cd0ea7c5

commit 7514d9bb6f7239fc5c962590b31bd3b6cd0ea7c5
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Wed May 15 10:34:18 2024 +0200

    lantiq: switch to kernel 6.1
    
    Let's switch the lantiq target to use kernel 6.1 by default.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/lantiq/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile
index d900416d3a..98ed307d80 100644
--- a/target/linux/lantiq/Makefile
+++ b/target/linux/lantiq/Makefile
@@ -9,8 +9,7 @@ BOARDNAME:=Lantiq
 FEATURES:=squashfs
 SUBTARGETS:=xrx200 xway xway_legacy falcon ase
 
-KERNEL_PATCHVER:=5.15
-KERNEL_TESTING_PATCHVER:=6.1
+KERNEL_PATCHVER:=6.1
 
 define Target/Description
 	Build firmware images for Lantiq SoC



From lede-commits at lists.infradead.org  Mon May 27 23:36:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 02:36:48 -0400
Subject: [openwrt/openwrt]  lantiq: disable building of ZyXEL P-2812HNU F1
In-Reply-To: <171687820865.3839697.5121594072707442342@git-01.infra.openwrt.org>
References: <171687820865.3839697.5121594072707442342@git-01.infra.openwrt.org>
Message-ID: <mailman.38891.1716878217.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ec3b11d370b7ed209124165971f242c2d634ecc

commit 9ec3b11d370b7ed209124165971f242c2d634ecc
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Tue May 28 08:06:10 2024 +0200

    lantiq: disable building of ZyXEL P-2812HNU F1
    
    Disable image building for the board, since the kernel of the main branch
    is to big to fit into the kernel partition.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/lantiq/image/vr9.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk
index a9df6598d7..dc307e1ee4 100644
--- a/target/linux/lantiq/image/vr9.mk
+++ b/target/linux/lantiq/image/vr9.mk
@@ -377,6 +377,7 @@ define Device/zyxel_p-2812hnu-f1
   DEVICE_PACKAGES := kmod-rt2800-pci wpad-basic-mbedtls kmod-usb-dwc2 kmod-usb-ledtrig-usbport
   KERNEL_SIZE := 3072k
   SUPPORTED_DEVICES += P2812HNUF1
+  DEFAULT := n
 endef
 TARGET_DEVICES += zyxel_p-2812hnu-f1
 



From lede-commits at lists.infradead.org  Tue May 28 01:41:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 04:41:54 -0400
Subject: [openwrt/openwrt]  ebtables: fix compilation with GCC14
In-Reply-To: <171688571476.4115411.522951683170124456@git-01.infra.openwrt.org>
References: <171688571476.4115411.522951683170124456@git-01.infra.openwrt.org>
Message-ID: <mailman.38940.1716885720.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/32e4c50d24d08570c6ae34d05922f1d9d879c0f2

commit 32e4c50d24d08570c6ae34d05922f1d9d879c0f2
Author: Georgi Valkov <gvalkov at gmail.com>
AuthorDate: Mon May 27 23:23:20 2024 +0300

    ebtables: fix compilation with GCC14
    
    Remove 100-musl_fix.patch, which is no longer needed
    and causes a build error with gcc-14.
    
    Fixes:
    useful_functions.c:63:41: error: passing argument 1 of 'ether_ntoa' from incompatible pointer type [-Wincompatible-pointer-types]
       63 |                 printf("%s", ether_ntoa((struct ether_addr *) mac));
          |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
          |                                         |
          |                                         struct ether_addr *
    In file included from include/ebtables_u.h:28,
                     from useful_functions.c:25:
    /Volumes/wrt3200/openwrt/staging_dir/toolchain-arm_cortex-a9+vfpv3-d16_gcc-14.1.0_musl_eabi/include/netinet/ether.h:10:19: note: expected 'const struct ether_addr *' but argument is of type 'struct ether_addr *'
       10 | char *ether_ntoa (const struct ether_addr *);
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~~
    
    Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15576
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/utils/ebtables/Makefile                   |  2 +-
 package/network/utils/ebtables/patches/100-musl_fix.patch | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile
index 32a452b068..1eae868d7a 100644
--- a/package/network/utils/ebtables/Makefile
+++ b/package/network/utils/ebtables/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ebtables
 PKG_SOURCE_DATE:=2018-06-27
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_URL:=https://git.netfilter.org/ebtables
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/utils/ebtables/patches/100-musl_fix.patch b/package/network/utils/ebtables/patches/100-musl_fix.patch
deleted file mode 100644
index f393ea7d91..0000000000
--- a/package/network/utils/ebtables/patches/100-musl_fix.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/include/ebtables_u.h
-+++ b/include/ebtables_u.h
-@@ -23,6 +23,7 @@
- 
- #ifndef EBTABLES_U_H
- #define EBTABLES_U_H
-+#define _NETINET_IF_ETHER_H
- #include <netinet/in.h>
- #include <netinet/ether.h>
- #include <linux/netfilter_bridge/ebtables.h>



From lede-commits at lists.infradead.org  Tue May 28 13:07:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 16:07:12 -0400
Subject: [openwrt/openwrt]  linux-firmware: Update to version 20240513
In-Reply-To: <171692683219.1500545.1955381295471286740@git-01.infra.openwrt.org>
References: <171692683219.1500545.1955381295471286740@git-01.infra.openwrt.org>
Message-ID: <mailman.39229.1716926839.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2650e7ac1b4b95714847ec2c8e60c5651f44e5dc

commit 2650e7ac1b4b95714847ec2c8e60c5651f44e5dc
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon May 27 00:40:49 2024 +0200

    linux-firmware: Update to version 20240513
    
    This updates the following firmware files:
    airoha-en8811h-firmware/lib/firmware/airoha/EthMD32.DSP.bin
    airoha-en8811h-firmware/lib/firmware/airoha/EthMD32.dm.bin
    amdgpu-firmware/ (Many files)
    ibt-firmware/lib/firmware/intel/ibt-0040-0041.sfi
    ibt-firmware/lib/firmware/intel/ibt-0040-1020.sfi
    ibt-firmware/lib/firmware/intel/ibt-0040-1050.sfi
    ibt-firmware/lib/firmware/intel/ibt-0040-2120.sfi
    ibt-firmware/lib/firmware/intel/ibt-0040-4150.sfi
    ibt-firmware/lib/firmware/intel/ibt-0041-0041.sfi
    ibt-firmware/lib/firmware/intel/ibt-0180-0041.sfi
    ibt-firmware/lib/firmware/intel/ibt-0180-1050.sfi
    ibt-firmware/lib/firmware/intel/ibt-0180-4150.sfi
    ibt-firmware/lib/firmware/intel/ibt-0291-0291.ddc
    ibt-firmware/lib/firmware/intel/ibt-0291-0291.sfi
    ibt-firmware/lib/firmware/intel/ibt-1040-0041.sfi
    ibt-firmware/lib/firmware/intel/ibt-1040-1020.sfi
    ibt-firmware/lib/firmware/intel/ibt-1040-1050.sfi
    ibt-firmware/lib/firmware/intel/ibt-1040-2120.sfi
    ibt-firmware/lib/firmware/intel/ibt-1040-4150.sfi
    ibt-firmware/lib/firmware/intel/ibt-17-16-1.sfi
    ibt-firmware/lib/firmware/intel/ibt-17-2.sfi
    ibt-firmware/lib/firmware/intel/ibt-18-16-1.sfi
    ibt-firmware/lib/firmware/intel/ibt-18-2.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-0-0.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-0-1.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-0-4.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-16-4.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-240-1.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-240-4.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-32-0.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-32-1.sfi
    ibt-firmware/lib/firmware/intel/ibt-19-32-4.sfi
    ibt-firmware/lib/firmware/intel/ibt-20-0-3.sfi
    ibt-firmware/lib/firmware/intel/ibt-20-1-3.sfi
    ibt-firmware/lib/firmware/intel/ibt-20-1-4.sfi
    iwlwifi-firmware-ax200/lib/firmware/iwlwifi-cc-a0-77.ucode
    iwlwifi-firmware-ax201/lib/firmware/iwlwifi-QuZ-a0-hr-b0-77.ucode
    iwlwifi-firmware-ax210/lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm
    iwlwifi-firmware-be200/lib/firmware/iwlwifi-gl-c0-fm-c0.pnvm
    iwlwifi-firmware-iwl9000/lib/firmware/iwlwifi-9000-pu-b0-jf-b0-46.ucode
    iwlwifi-firmware-iwl9260/lib/firmware/iwlwifi-9260-th-b0-jf-b0-46.ucode
    mt7921bt-firmware/lib/firmware/mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin
    mt7922bt-firmware/lib/firmware/mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin
    rtl8852ce-firmware/lib/firmware/rtw89/rtw8852c_fw.bin
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/linux-firmware/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile
index b86177b91a..f256a1efe4 100644
--- a/package/firmware/linux-firmware/Makefile
+++ b/package/firmware/linux-firmware/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
-PKG_VERSION:=20240220
+PKG_VERSION:=20240513
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=bf0f239dc0801e9d6bf5d5fb3e2f549575632cf4688f4348184199cb02c2bcd7
+PKG_HASH:=9f05edb99668135d37cedc4fdd18aac2802dc9e4566e086e6c6c2e321f3ecc4e
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 



From lede-commits at lists.infradead.org  Tue May 28 13:09:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 16:09:33 -0400
Subject: [openwrt/openwrt]  kernel: kmod-ipt-clusterip: Depend on kernel 5.15
 and 6.1
In-Reply-To: <171692697223.1504707.783602987455155266@git-01.infra.openwrt.org>
References: <171692697223.1504707.783602987455155266@git-01.infra.openwrt.org>
Message-ID: <mailman.39230.1716926975.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/72f0e5184ef22e7bf0e07008574b77d6d82661da

commit 72f0e5184ef22e7bf0e07008574b77d6d82661da
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 22:27:53 2024 +0200

    kernel: kmod-ipt-clusterip: Depend on kernel 5.15 and 6.1
    
    The kernel module was removed in kernel 6.3.
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9db5d918e2c07fa09fab18bc7addf3408da0c76f
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/netfilter.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk
index da3e69e49a..76697f5d2f 100644
--- a/package/kernel/linux/modules/netfilter.mk
+++ b/package/kernel/linux/modules/netfilter.mk
@@ -807,7 +807,7 @@ define KernelPackage/ipt-clusterip
   KCONFIG:=$(KCONFIG_IPT_CLUSTERIP)
   FILES:=$(foreach mod,$(IPT_CLUSTERIP-m),$(LINUX_DIR)/net/$(mod).ko)
   AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CLUSTERIP-m)))
-  $(call AddDepends/ipt,+kmod-nf-conntrack)
+  $(call AddDepends/ipt,+kmod-nf-conntrack @LINUX_5_15||LINUX_6_1)
 endef
 
 define KernelPackage/ipt-clusterip/description



From lede-commits at lists.infradead.org  Tue May 28 13:09:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 16:09:32 -0400
Subject: [openwrt/openwrt]  kernel: kmod-can-usb-esd: Fix build on kernel 6.6
In-Reply-To: <171692697223.1504707.783602987455155266@git-01.infra.openwrt.org>
References: <171692697223.1504707.783602987455155266@git-01.infra.openwrt.org>
Message-ID: <mailman.39231.1716926980.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ee1983a2ffc2deb4564fd2ebcbead8035dae9e25

commit ee1983a2ffc2deb4564fd2ebcbead8035dae9e25
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 22:24:59 2024 +0200

    kernel: kmod-can-usb-esd: Fix build on kernel 6.6
    
    The kernel module and configuration option was renamed from esd_usb2.ko
    to esd_usb.ko in kernel 6.0. Adapt the kernel package.
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5e910bdedc84c1f196863cebdf27c1806449c27c
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/can.mk | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/package/kernel/linux/modules/can.mk b/package/kernel/linux/modules/can.mk
index eda9b0c487..603976ef5f 100644
--- a/package/kernel/linux/modules/can.mk
+++ b/package/kernel/linux/modules/can.mk
@@ -235,9 +235,13 @@ $(eval $(call KernelPackage,can-usb-ems))
 
 define KernelPackage/can-usb-esd
   TITLE:=ESD USB/2 CAN/USB interface
-  KCONFIG:=CONFIG_CAN_ESD_USB2
-  FILES:=$(LINUX_DIR)/drivers/net/can/usb/esd_usb2.ko
-  AUTOLOAD:=$(call AutoProbe,esd_usb2)
+  KCONFIG:= \
+	CONFIG_CAN_ESD_USB2 at lt6.0 \
+	CONFIG_CAN_ESD_USB at ge6.0
+  FILES:= \
+	$(LINUX_DIR)/drivers/net/can/usb/esd_usb2.ko at lt6.0 \
+	$(LINUX_DIR)/drivers/net/can/usb/esd_usb.ko at ge6.0
+  AUTOLOAD:=$(call AutoProbe,esd_usb2 esd_usb)
   $(call AddDepends/can,+kmod-usb-core)
 endef
 



From lede-commits at lists.infradead.org  Tue May 28 13:12:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 16:12:57 -0400
Subject: [openwrt/openwrt]  malta: Use kernel 6.6 by default
In-Reply-To: <171692717776.1511552.2423473447535047@git-01.infra.openwrt.org>
References: <171692717776.1511552.2423473447535047@git-01.infra.openwrt.org>
Message-ID: <mailman.39234.1716927182.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5f0e59134950d0c60fa33daf9af3d83389357452

commit 5f0e59134950d0c60fa33daf9af3d83389357452
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 20:03:09 2024 +0200

    malta: Use kernel 6.6 by default
    
    All 4 subtargets are compiling fine and booting up in qemu.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/malta/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
index b159b19144..319e06579e 100644
--- a/target/linux/malta/Makefile
+++ b/target/linux/malta/Makefile
@@ -10,8 +10,7 @@ SUBTARGETS:=le be le64 be64
 INITRAMFS_EXTRA_FILES:=
 FEATURES:=cpiogz ext4 ramdisk squashfs targz
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Tue May 28 13:12:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 16:12:58 -0400
Subject: [openwrt/openwrt]  malta: Remove kernel 6.1 configuration
In-Reply-To: <171692717776.1511552.2423473447535047@git-01.infra.openwrt.org>
References: <171692717776.1511552.2423473447535047@git-01.infra.openwrt.org>
Message-ID: <mailman.39235.1716927182.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3a2706ed108d7005f85bf416712986132ff38138

commit 3a2706ed108d7005f85bf416712986132ff38138
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 20:04:33 2024 +0200

    malta: Remove kernel 6.1 configuration
    
    Malta is using kernel 6.6 by default now, remove configuration for
    kernel 6.1.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/malta/config-6.1 | 265 ------------------------------------------
 1 file changed, 265 deletions(-)

diff --git a/target/linux/malta/config-6.1 b/target/linux/malta/config-6.1
deleted file mode 100644
index 9ce439ee38..0000000000
--- a/target/linux/malta/config-6.1
+++ /dev/null
@@ -1,265 +0,0 @@
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
-CONFIG_ARCH_MMAP_RND_BITS_MAX=15
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-CONFIG_ATA=y
-CONFIG_ATA_PIIX=y
-CONFIG_BLK_DEV_BSG=y
-CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BLK_DEV_BSG_COMMON=y
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_BOARD_SCACHE=y
-CONFIG_BOOT_ELF32=y
-CONFIG_BUILTIN_DTB=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLKBLD_I8253=y
-CONFIG_CLKEVT_I8253=y
-CONFIG_CLKSRC_I8253=y
-CONFIG_CLKSRC_MIPS_GIC=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_PREFETCH=y
-# CONFIG_CPU_HAS_SMARTMIPS is not set
-CONFIG_CPU_HAS_SYNC=y
-# CONFIG_CPU_MICROMIPS is not set
-# CONFIG_CPU_MIPS32 is not set
-# CONFIG_CPU_MIPS32_3_5_FEATURES is not set
-# CONFIG_CPU_MIPS32_R1 is not set
-# CONFIG_CPU_MIPS32_R2 is not set
-# CONFIG_CPU_MIPS32_R5 is not set
-# CONFIG_CPU_MIPS32_R5_FEATURES is not set
-# CONFIG_CPU_MIPS32_R6 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-# CONFIG_CPU_MIPS64_R6 is not set
-# CONFIG_CPU_MIPSR1 is not set
-# CONFIG_CPU_MIPSR2 is not set
-# CONFIG_CPU_MIPSR2_IRQ_EI is not set
-# CONFIG_CPU_MIPSR2_IRQ_VI is not set
-CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
-# CONFIG_CPU_NEVADA is not set
-CONFIG_CPU_R4K_CACHE_TLB=y
-# CONFIG_CPU_RM7000 is not set
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CSRC_R4K=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_DNOTIFY=y
-CONFIG_DTC=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_EXT4_FS=y
-CONFIG_F2FS_FS=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_LIB_ASHLDI3=y
-CONFIG_GENERIC_LIB_ASHRDI3=y
-CONFIG_GENERIC_LIB_CMPDI2=y
-CONFIG_GENERIC_LIB_LSHRDI3=y
-CONFIG_GENERIC_LIB_UCMPDI2=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GLOB=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HW_CONSOLE=y
-CONFIG_I8253=y
-CONFIG_I8253_LOCK=y
-CONFIG_I8259=y
-CONFIG_INPUT=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_MIPS_CPU=y
-CONFIG_IRQ_WORK=y
-CONFIG_ISA_DMA_API=y
-CONFIG_JBD2=y
-CONFIG_JFFS2_FS_POSIX_ACL=y
-CONFIG_JFFS2_FS_SECURITY=y
-CONFIG_KALLSYMS=y
-CONFIG_KERNEL_GZIP=y
-# CONFIG_KERNEL_XZ is not set
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_MD=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MIGRATION=y
-CONFIG_MIPS=y
-CONFIG_MIPS_ASID_BITS=8
-CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_BONITO64=y
-CONFIG_MIPS_CLOCK_VSYSCALL=y
-CONFIG_MIPS_CM=y
-CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_MIPS_CPC=y
-CONFIG_MIPS_CPU_SCACHE=y
-CONFIG_MIPS_EBPF_JIT=y
-CONFIG_MIPS_EXTERNAL_TIMER=y
-CONFIG_MIPS_GIC=y
-CONFIG_MIPS_L1_CACHE_SHIFT=6
-CONFIG_MIPS_L1_CACHE_SHIFT_6=y
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
-CONFIG_MIPS_MALTA=y
-CONFIG_MIPS_MSC=y
-CONFIG_MIPS_MT=y
-CONFIG_MIPS_MT_FPAFF=y
-CONFIG_MIPS_MT_SMP=y
-CONFIG_MIPS_NO_APPENDED_DTB=y
-CONFIG_MIPS_NR_CPU_NR_MAP=2
-CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD_CFI_STAA=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NLS=y
-CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-CONFIG_NO_HZ=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NR_CPUS=2
-CONFIG_NVMEM=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_PADATA=y
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_PATA_LEGACY=y
-CONFIG_PATA_TIMINGS=y
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DRIVERS_LEGACY=y
-CONFIG_PCI_GT64XXX_PCI0=y
-CONFIG_PCSPKR_PLATFORM=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_PIIX4_POWEROFF=y
-CONFIG_POWER_RESET_SYSCON=y
-CONFIG_PRINT_QUOTA_WARNING=y
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_QFMT_V2=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_QUOTA=y
-CONFIG_QUOTACTL=y
-CONFIG_QUOTA_TREE=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_RELAY=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_MC146818_LIB=y
-CONFIG_SATA_HOST=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SECCOMP=y
-CONFIG_SECCOMP_FILTER=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIO=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SG_POOL=y
-CONFIG_SMP=y
-CONFIG_SMP_UP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SRCU=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SYNC_R4K=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_CPU_MIPS32_R2=y
-CONFIG_SYS_HAS_CPU_MIPS32_R3_5=y
-CONFIG_SYS_HAS_CPU_MIPS32_R5=y
-CONFIG_SYS_HAS_CPU_MIPS32_R6=y
-CONFIG_SYS_HAS_CPU_MIPS64_R1=y
-CONFIG_SYS_HAS_CPU_MIPS64_R2=y
-CONFIG_SYS_HAS_CPU_MIPS64_R6=y
-CONFIG_SYS_HAS_CPU_NEVADA=y
-CONFIG_SYS_HAS_CPU_RM7000=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_HIGHMEM=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_SYS_SUPPORTS_MICROMIPS=y
-CONFIG_SYS_SUPPORTS_MIPS16=y
-CONFIG_SYS_SUPPORTS_MIPS_CMP=y
-CONFIG_SYS_SUPPORTS_MIPS_CPS=y
-CONFIG_SYS_SUPPORTS_MULTITHREADING=y
-CONFIG_SYS_SUPPORTS_RELOCATABLE=y
-CONFIG_SYS_SUPPORTS_SCHED_SMT=y
-CONFIG_SYS_SUPPORTS_SMARTMIPS=y
-CONFIG_SYS_SUPPORTS_SMP=y
-CONFIG_SYS_SUPPORTS_VPE_LOADER=y
-CONFIG_SYS_SUPPORTS_ZBOOT=y
-CONFIG_TARGET_ISA_REV=1
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_VXFS_FS=y
-CONFIG_WAR_ICACHE_REFILLS=y
-CONFIG_XPS=y
-CONFIG_ZBOOT_LOAD_ADDRESS=0x0



From lede-commits at lists.infradead.org  Tue May 28 14:55:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 17:55:50 -0400
Subject: [openwrt/openwrt]  toolchain: gcc: update to 13.3
In-Reply-To: <171693335096.1717408.8985763070858746187@git-01.infra.openwrt.org>
References: <171693335096.1717408.8985763070858746187@git-01.infra.openwrt.org>
Message-ID: <mailman.39250.1716933355.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3b63abfbfce7aff54023c7b1eff3f13c85693369

commit 3b63abfbfce7aff54023c7b1eff3f13c85693369
Author: Olcay Korkmaz <nuke_mania at hotmail.com>
AuthorDate: Tue May 28 22:42:41 2024 +0300

    toolchain: gcc: update to 13.3
    
    Release Notes:
    https://gcc.gnu.org/pipermail/gcc/2024-May/243980.html
    
    Remove upstreamed patches:
    - patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
    - patches-13.x/021-libcc1-fix-vector-include.patch
    - patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
    - patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch
    
    Refresh patches:
    - patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
    - patches-13.x/970-macos_arm64-building-fix.patch
    
    Signed-off-by: Olcay Korkmaz <nuke_mania at hotmail.com>
---
 toolchain/gcc/Config.version                       |   2 +-
 toolchain/gcc/common.mk                            |   4 +-
 ...e-ctype.h-after-C-standard-headers-to-avo.patch | 139 ---------------------
 .../021-libcc1-fix-vector-include.patch            |  65 ----------
 .../300-mips_Os_cpu_rtx_cost_model.patch           |   2 +-
 .../400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch    |  41 ------
 .../401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch |  43 -------
 .../970-macos_arm64-building-fix.patch             |   2 +-
 8 files changed, 5 insertions(+), 293 deletions(-)

diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index dab1190564..dc2ff9bff0 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -16,7 +16,7 @@ config GCC_VERSION
 	default "11.3.0"	if GCC_VERSION_11
 	default "12.3.0"	if GCC_VERSION_12
 	default "14.1.0"	if GCC_VERSION_14
-	default "13.2.0"
+	default "13.3.0"
 
 config GCC_USE_DEFAULT_VERSION
 	bool
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index f5db99f869..2161ce72e4 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -38,8 +38,8 @@ ifeq ($(PKG_VERSION),12.3.0)
   PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b
 endif
 
-ifeq ($(PKG_VERSION),13.2.0)
-  PKG_HASH:=e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da
+ifeq ($(PKG_VERSION),13.3.0)
+  PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083
 endif
 
 ifeq ($(PKG_VERSION),14.1.0)
diff --git a/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch b/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
deleted file mode 100644
index 986d19057f..0000000000
--- a/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
-From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
-Date: Thu, 7 Mar 2024 14:36:03 +0100
-Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
- over-poisoning
-
-When building gcc's C++ sources against recent libc++, the poisoning of
-the ctype macros due to including safe-ctype.h before including C++
-standard headers such as <list>, <map>, etc, causes many compilation
-errors, similar to:
-
-  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
-  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
-  In file included from /usr/include/c++/v1/vector:321:
-  In file included from
-  /usr/include/c++/v1/__format/formatter_bool.h:20:
-  In file included from
-  /usr/include/c++/v1/__format/formatter_integral.h:32:
-  In file included from /usr/include/c++/v1/locale:202:
-  /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
-  only applies to structs, variables, functions, and namespaces
-    546 |     _LIBCPP_INLINE_VISIBILITY
-        |     ^
-  /usr/include/c++/v1/__config:813:37: note: expanded from macro
-  '_LIBCPP_INLINE_VISIBILITY'
-    813 | #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
-        |                                     ^
-  /usr/include/c++/v1/__config:792:26: note: expanded from macro
-  '_LIBCPP_HIDE_FROM_ABI'
-    792 |
-    __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
-  _LIBCPP_VERSIONED_IDENTIFIER))))
-        |                          ^
-  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
-  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
-  In file included from /usr/include/c++/v1/vector:321:
-  In file included from
-  /usr/include/c++/v1/__format/formatter_bool.h:20:
-  In file included from
-  /usr/include/c++/v1/__format/formatter_integral.h:32:
-  In file included from /usr/include/c++/v1/locale:202:
-  /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
-  declaration list
-    547 |     char_type toupper(char_type __c) const
-        |                                     ^
-  /usr/include/c++/v1/__locale:553:48: error: too many arguments
-  provided to function-like macro invocation
-    553 |     const char_type* toupper(char_type* __low, const
-    char_type* __high) const
-        |                                                ^
-  /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
-  macro 'toupper' defined here
-    146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
-        |         ^
-
-This is because libc++ uses different transitive includes than
-libstdc++, and some of those transitive includes pull in various ctype
-declarations (typically via <locale>).
-
-There was already a special case for including <string> before
-safe-ctype.h, so move the rest of the C++ standard header includes to
-the same location, to fix the problem.
-
-gcc/ChangeLog:
-
-	* system.h: Include safe-ctype.h after C++ standard headers.
-
-Signed-off-by: Dimitry Andric <dimitry at andric.com>
----
- gcc/system.h | 39 ++++++++++++++++++---------------------
- 1 file changed, 18 insertions(+), 21 deletions(-)
-
-diff --git a/gcc/system.h b/gcc/system.h
-index b0edab02885..ab29fc19776 100644
---- a/gcc/system.h
-+++ b/gcc/system.h
-@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
- #undef fread_unlocked
- #undef fwrite_unlocked
- 
--/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
--   the ctype macros through safe-ctype.h */
--
--#ifdef __cplusplus
--#ifdef INCLUDE_STRING
--# include <string>
--#endif
--#endif
--
--/* There are an extraordinary number of issues with <ctype.h>.
--   The last straw is that it varies with the locale.  Use libiberty's
--   replacement instead.  */
--#include "safe-ctype.h"
--
--#include <sys/types.h>
--
--#include <errno.h>
--
--#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
--extern int errno;
--#endif
-+/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
-+   poisoning the ctype macros through safe-ctype.h */
- 
- #ifdef __cplusplus
- #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
-@@ -229,6 +210,9 @@ extern int errno;
- #ifdef INCLUDE_SET
- # include <set>
- #endif
-+#ifdef INCLUDE_STRING
-+# include <string>
-+#endif
- #ifdef INCLUDE_VECTOR
- # include <vector>
- #endif
-@@ -245,6 +229,19 @@ extern int errno;
- # include <type_traits>
- #endif
- 
-+/* There are an extraordinary number of issues with <ctype.h>.
-+   The last straw is that it varies with the locale.  Use libiberty's
-+   replacement instead.  */
-+#include "safe-ctype.h"
-+
-+#include <sys/types.h>
-+
-+#include <errno.h>
-+
-+#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
-+extern int errno;
-+#endif
-+
- /* Some of glibc's string inlines cause warnings.  Plus we'd rather
-    rely on (and therefore test) GCC's string builtins.  */
- #define __NO_STRING_INLINES
--- 
-2.39.3
-
diff --git a/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch b/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch
deleted file mode 100644
index b6b15cd1c6..0000000000
--- a/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
-From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
-Date: Sat, 16 Mar 2024 09:50:00 +0100
-Subject: [PATCH] libcc1: fix <vector> include
-
-Use INCLUDE_VECTOR before including system.h, instead of directly
-including <vector>, to avoid running into poisoned identifiers.
-
-Signed-off-by: Dimitry Andric <dimitry at andric.com>
-
-libcc1/ChangeLog:
-
-	PR middle-end/111632
-	* libcc1plugin.cc: Fix include.
-	* libcp1plugin.cc: Fix include.
----
- libcc1/libcc1plugin.cc | 3 +--
- libcc1/libcp1plugin.cc | 3 +--
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
-index 72d17c3b81c..e64847466f4 100644
---- a/libcc1/libcc1plugin.cc
-+++ b/libcc1/libcc1plugin.cc
-@@ -32,6 +32,7 @@
- #undef PACKAGE_VERSION
- 
- #define INCLUDE_MEMORY
-+#define INCLUDE_VECTOR
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
-@@ -69,8 +70,6 @@
- #include "gcc-c-interface.h"
- #include "context.hh"
- 
--#include <vector>
--
- using namespace cc1_plugin;
- 
- 

-diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
-index 0eff7c68d29..da68c5d0ac1 100644
---- a/libcc1/libcp1plugin.cc
-+++ b/libcc1/libcp1plugin.cc
-@@ -33,6 +33,7 @@
- #undef PACKAGE_VERSION
- 
- #define INCLUDE_MEMORY
-+#define INCLUDE_VECTOR
- #include "gcc-plugin.h"
- #include "system.h"
- #include "coretypes.h"
-@@ -71,8 +72,6 @@
- #include "rpc.hh"
- #include "context.hh"
- 
--#include <vector>
--
- using namespace cc1_plugin;
- 
- 

--- 
-2.39.3
-
diff --git a/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
index ce21e0433d..2ca42ad777 100644
--- a/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
+++ b/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/gcc/config/mips/mips.cc
 +++ b/gcc/config/mips/mips.cc
-@@ -20213,7 +20213,7 @@ mips_option_override (void)
+@@ -20219,7 +20219,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */
diff --git a/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch b/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index 4fddc3f77e..0000000000
--- a/toolchain/gcc/patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From a80c68a08604b0ac625ac7fc59eae40b551b1176 Mon Sep 17 00:00:00 2001
-From: Peng Fan <fanpeng at loongson.cn>
-Date: Wed, 19 Apr 2023 16:23:42 +0800
-Subject: [PATCH] LoongArch: Fix MUSL_DYNAMIC_LINKER
-
-The system based on musl has no '/lib64', so change it.
-
-https://wiki.musl-libc.org/guidelines-for-distributions.html,
-"Multilib/multi-arch" section of this introduces it.
-
-gcc/
-	* config/loongarch/gnu-user.h (MUSL_DYNAMIC_LINKER): Redefine.
-
-Signed-off-by: Peng Fan <fanpeng at loongson.cn>
-Suggested-by: Xi Ruoyao <xry111 at xry111.site>
----
- gcc/config/loongarch/gnu-user.h | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
-index aecaa02a199..fa1a5211419 100644
---- a/gcc/config/loongarch/gnu-user.h
-+++ b/gcc/config/loongarch/gnu-user.h
-@@ -33,9 +33,14 @@ along with GCC; see the file COPYING3.  If not see
- #define GLIBC_DYNAMIC_LINKER \
-   "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
- 
-+#define MUSL_ABI_SPEC \
-+  "%{mabi=lp64d:-lp64d}" \
-+  "%{mabi=lp64f:-lp64f}" \
-+  "%{mabi=lp64s:-lp64s}"
-+
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER \
--  "/lib" ABI_GRLEN_SPEC "/ld-musl-loongarch-" ABI_SPEC ".so.1"
-+  "/lib/ld-musl-loongarch" ABI_GRLEN_SPEC MUSL_ABI_SPEC ".so.1"
- 
- #undef GNU_USER_TARGET_LINK_SPEC
- #define GNU_USER_TARGET_LINK_SPEC \
--- 
-2.39.3
diff --git a/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch b/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch
deleted file mode 100644
index 218a692578..0000000000
--- a/toolchain/gcc/patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 8bccee51f0deac64b79cd9ad75df599422f4c8ff Mon Sep 17 00:00:00 2001
-From: Lulu Cheng <chenglulu at loongson.cn>
-Date: Sat, 18 Nov 2023 11:04:42 +0800
-Subject: [PATCH] LoongArch: Modify MUSL_DYNAMIC_LINKER.
-
-Use no suffix at all in the musl dynamic linker name for hard
-float ABI. Use -sf and -sp suffixes in musl dynamic linker name
-for soft float and single precision ABIs. The following table
-outlines the musl interpreter names for the LoongArch64 ABI names.
-
-musl interpreter            | LoongArch64 ABI
---------------------------- | -----------------
-ld-musl-loongarch64.so.1    | loongarch64-lp64d
-ld-musl-loongarch64-sp.so.1 | loongarch64-lp64f
-ld-musl-loongarch64-sf.so.1 | loongarch64-lp64s
-
-gcc/ChangeLog:
-
-	* config/loongarch/gnu-user.h (MUSL_ABI_SPEC): Modify suffix.
----
- gcc/config/loongarch/gnu-user.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/config/loongarch/gnu-user.h b/gcc/config/loongarch/gnu-user.h
-index 9616d6e8a0b..e9f4bcef1d4 100644
---- a/gcc/config/loongarch/gnu-user.h
-+++ b/gcc/config/loongarch/gnu-user.h
-@@ -34,9 +34,9 @@ along with GCC; see the file COPYING3.  If not see
-   "/lib" ABI_GRLEN_SPEC "/ld-linux-loongarch-" ABI_SPEC ".so.1"
- 
- #define MUSL_ABI_SPEC \
--  "%{mabi=lp64d:-lp64d}" \
--  "%{mabi=lp64f:-lp64f}" \
--  "%{mabi=lp64s:-lp64s}"
-+  "%{mabi=lp64d:}" \
-+  "%{mabi=lp64f:-sp}" \
-+  "%{mabi=lp64s:-sf}"
- 
- #undef MUSL_DYNAMIC_LINKER
- #define MUSL_DYNAMIC_LINKER \
--- 
-2.39.3
-
diff --git a/toolchain/gcc/patches-13.x/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches-13.x/970-macos_arm64-building-fix.patch
index 7844268e7e..a0470b1396 100644
--- a/toolchain/gcc/patches-13.x/970-macos_arm64-building-fix.patch
+++ b/toolchain/gcc/patches-13.x/970-macos_arm64-building-fix.patch
@@ -17,7 +17,7 @@ Date:   Mon Aug 16 13:16:21 2021 +0100
 
 --- a/gcc/config/aarch64/aarch64.h
 +++ b/gcc/config/aarch64/aarch64.h
-@@ -1185,7 +1185,7 @@ extern enum aarch64_code_model aarch64_c
+@@ -1195,7 +1195,7 @@ extern enum aarch64_code_model aarch64_c
  
  /* Extra specs when building a native AArch64-hosted compiler.
     Option rewriting rules based on host system.  */



From lede-commits at lists.infradead.org  Tue May 28 15:51:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 28 May 2024 18:51:52 -0400
Subject: [openwrt/openwrt]  mediatek: add missing ';;' in shell switch case
 block
In-Reply-To: <171693671220.1892498.8768599996722511551@git-01.infra.openwrt.org>
References: <171693671220.1892498.8768599996722511551@git-01.infra.openwrt.org>
Message-ID: <mailman.39255.1716936716.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4f078bf3775e50c4f9c166be6305ebf48ad799dc

commit 4f078bf3775e50c4f9c166be6305ebf48ad799dc
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 28 23:50:15 2024 +0100

    mediatek: add missing ';;' in shell switch case block
    
    Add missing ';;' to the end of shell switch case statement.
    
    Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
    Reported-by: @gl-dude
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index e992eaa604..90142b7fef 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -142,6 +142,7 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr a > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "2" ] && macaddr_add $addr 6 > /sys${DEVPATH}/macaddress
+		;;
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088)



From lede-commits at lists.infradead.org  Wed May 29 01:42:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 04:42:03 -0400
Subject: [openwrt/openwrt]  ramips: gdma: remove slave_id field
In-Reply-To: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
References: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
Message-ID: <mailman.39428.1716972132.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2240320d7f53d4ca3d7d1313466dcda67ebd3b30

commit 2240320d7f53d4ca3d7d1313466dcda67ebd3b30
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon May 27 12:41:48 2024 +0000

    ramips: gdma: remove slave_id field
    
    Fix compile error:
    drivers/dma/ralink-gdma.c: In function 'gdma_dma_config':
    drivers/dma/ralink-gdma.c:197:40: error: 'struct dma_slave_config' has no member named 'slave_id'
      197 |                 chan->slave_id = config->slave_id;
          |                                        ^~
    drivers/dma/ralink-gdma.c:206:40: error: 'struct dma_slave_config' has no member named 'slave_id'
      206 |                 chan->slave_id = config->slave_id;
          |                                        ^~
    make[8]: *** [scripts/Makefile.build:243: drivers/dma/ralink-gdma.o] Error 1
    
    ref: https://lore.kernel.org/all/20211122222203.4103644-1-arnd at kernel.org/
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ramips/files/drivers/dma/ralink-gdma.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/linux/ramips/files/drivers/dma/ralink-gdma.c b/target/linux/ramips/files/drivers/dma/ralink-gdma.c
index b5229bc6ea..e510a05ebb 100644
--- a/target/linux/ramips/files/drivers/dma/ralink-gdma.c
+++ b/target/linux/ramips/files/drivers/dma/ralink-gdma.c
@@ -194,7 +194,6 @@ static int gdma_dma_config(struct dma_chan *c,
 			dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n");
 			return -EINVAL;
 		}
-		chan->slave_id = config->slave_id;
 		chan->fifo_addr = config->dst_addr;
 		chan->burst_size = gdma_dma_maxburst(config->dst_maxburst);
 		break;
@@ -203,7 +202,6 @@ static int gdma_dma_config(struct dma_chan *c,
 			dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n");
 			return -EINVAL;
 		}
-		chan->slave_id = config->slave_id;
 		chan->fifo_addr = config->src_addr;
 		chan->burst_size = gdma_dma_maxburst(config->src_maxburst);
 		break;



From lede-commits at lists.infradead.org  Wed May 29 01:42:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 04:42:04 -0400
Subject: [openwrt/openwrt]  ramips: modules: remove symbol CONFIG_DW_DMAC_PCI
In-Reply-To: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
References: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
Message-ID: <mailman.39429.1716972132.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db49d995bb5b81d50296ea5c6707992760e278c9

commit db49d995bb5b81d50296ea5c6707992760e278c9
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon May 27 12:48:46 2024 +0000

    ramips: modules: remove symbol CONFIG_DW_DMAC_PCI
    
    The DW_DMAC_PCI symbol won't be automatically selected at all.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ramips/modules.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk
index 1b7fb6b7b3..f32b82aef8 100644
--- a/target/linux/ramips/modules.mk
+++ b/target/linux/ramips/modules.mk
@@ -77,7 +77,6 @@ define KernelPackage/dma-ralink
   DEPENDS:=@TARGET_ramips @!TARGET_ramips_rt288x
   KCONFIG:= \
 	CONFIG_DMADEVICES=y \
-	CONFIG_DW_DMAC_PCI=n \
 	CONFIG_RALINK_GDMA
   FILES:= \
 	$(LINUX_DIR)/drivers/dma/virt-dma.ko \
@@ -97,7 +96,6 @@ define KernelPackage/hsdma-mtk
   DEPENDS:=@TARGET_ramips @TARGET_ramips_mt7621
   KCONFIG:= \
 	CONFIG_DMADEVICES=y \
-	CONFIG_DW_DMAC_PCI=n \
 	CONFIG_MTK_HSDMA
   FILES:= \
 	$(LINUX_DIR)/drivers/dma/virt-dma.ko \



From lede-commits at lists.infradead.org  Wed May 29 01:42:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 04:42:02 -0400
Subject: [openwrt/openwrt]  ramips: add back the gdma driver
In-Reply-To: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
References: <171697212218.3019047.2103499695914510253@git-01.infra.openwrt.org>
Message-ID: <mailman.39430.1716972135.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ccd50abd9f8cfce788c9b5175d3d5639065f64da

commit ccd50abd9f8cfce788c9b5175d3d5639065f64da
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon May 27 08:55:42 2024 +0000

    ramips: add back the gdma driver
    
    The gdma driver has been removed from the upstream. Let's move it
    to the local files. This patch also removed unsupported compatible
    string and sub-target.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ramips/dts/mt7620a.dtsi               |   2 +-
 .../linux/ramips/files/drivers/dma/ralink-gdma.c   | 917 +++++++++++++++++++++
 target/linux/ramips/modules.mk                     |   8 +-
 target/linux/ramips/mt7620/config-6.6              |   1 +
 target/linux/ramips/mt7621/config-6.6              |   1 +
 target/linux/ramips/mt76x8/config-6.6              |   1 +
 .../804-dma-ralink-add-back-gdma-driver.patch      |  39 +
 target/linux/ramips/rt305x/config-6.6              |   1 +
 target/linux/ramips/rt3883/config-6.6              |   1 +
 9 files changed, 966 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a.dtsi b/target/linux/ramips/dts/mt7620a.dtsi
index 0fa503e7a2..65122304c9 100644
--- a/target/linux/ramips/dts/mt7620a.dtsi
+++ b/target/linux/ramips/dts/mt7620a.dtsi
@@ -294,7 +294,7 @@
 		};
 
 		gdma: gdma at 2800 {
-			compatible = "ralink,mt7620a-gdma", "ralink,rt3883-gdma";
+			compatible = "ralink,rt3883-gdma";
 			reg = <0x2800 0x800>;
 
 			resets = <&sysc 14>;
diff --git a/target/linux/ramips/files/drivers/dma/ralink-gdma.c b/target/linux/ramips/files/drivers/dma/ralink-gdma.c
new file mode 100644
index 0000000000..b5229bc6ea
--- /dev/null
+++ b/target/linux/ramips/files/drivers/dma/ralink-gdma.c
@@ -0,0 +1,917 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ *  GDMA4740 DMAC support
+ */
+
+#include <linux/dmaengine.h>
+#include <linux/dma-mapping.h>
+#include <linux/err.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/irq.h>
+#include <linux/of_dma.h>
+#include <linux/reset.h>
+#include <linux/of_device.h>
+
+#include "virt-dma.h"
+
+#define GDMA_REG_SRC_ADDR(x)		(0x00 + (x) * 0x10)
+#define GDMA_REG_DST_ADDR(x)		(0x04 + (x) * 0x10)
+
+#define GDMA_REG_CTRL0(x)		(0x08 + (x) * 0x10)
+#define GDMA_REG_CTRL0_TX_MASK		0xffff
+#define GDMA_REG_CTRL0_TX_SHIFT		16
+#define GDMA_REG_CTRL0_CURR_MASK	0xff
+#define GDMA_REG_CTRL0_CURR_SHIFT	8
+#define	GDMA_REG_CTRL0_SRC_ADDR_FIXED	BIT(7)
+#define GDMA_REG_CTRL0_DST_ADDR_FIXED	BIT(6)
+#define GDMA_REG_CTRL0_BURST_MASK	0x7
+#define GDMA_REG_CTRL0_BURST_SHIFT	3
+#define	GDMA_REG_CTRL0_DONE_INT		BIT(2)
+#define	GDMA_REG_CTRL0_ENABLE		BIT(1)
+#define GDMA_REG_CTRL0_SW_MODE          BIT(0)
+
+#define GDMA_REG_CTRL1(x)		(0x0c + (x) * 0x10)
+#define GDMA_REG_CTRL1_SEG_MASK		0xf
+#define GDMA_REG_CTRL1_SEG_SHIFT	22
+#define GDMA_REG_CTRL1_REQ_MASK		0x3f
+#define GDMA_REG_CTRL1_SRC_REQ_SHIFT	16
+#define GDMA_REG_CTRL1_DST_REQ_SHIFT	8
+#define GDMA_REG_CTRL1_NEXT_MASK	0x1f
+#define GDMA_REG_CTRL1_NEXT_SHIFT	3
+#define GDMA_REG_CTRL1_COHERENT		BIT(2)
+#define GDMA_REG_CTRL1_FAIL		BIT(1)
+#define GDMA_REG_CTRL1_MASK		BIT(0)
+
+#define GDMA_REG_UNMASK_INT		0x200
+#define GDMA_REG_DONE_INT		0x204
+
+#define GDMA_REG_GCT			0x220
+#define GDMA_REG_GCT_CHAN_MASK		0x3
+#define GDMA_REG_GCT_CHAN_SHIFT		3
+#define GDMA_REG_GCT_VER_MASK		0x3
+#define GDMA_REG_GCT_VER_SHIFT		1
+#define GDMA_REG_GCT_ARBIT_RR		BIT(0)
+
+#define GDMA_REG_REQSTS			0x2a0
+#define GDMA_REG_ACKSTS			0x2a4
+#define GDMA_REG_FINSTS			0x2a8
+
+/* for RT305X gdma registers */
+#define GDMA_RT305X_CTRL0_REQ_MASK	0xf
+#define GDMA_RT305X_CTRL0_SRC_REQ_SHIFT	12
+#define GDMA_RT305X_CTRL0_DST_REQ_SHIFT	8
+
+#define GDMA_RT305X_CTRL1_FAIL		BIT(4)
+#define GDMA_RT305X_CTRL1_NEXT_MASK	0x7
+#define GDMA_RT305X_CTRL1_NEXT_SHIFT	1
+
+#define GDMA_RT305X_STATUS_INT		0x80
+#define GDMA_RT305X_STATUS_SIGNAL	0x84
+#define GDMA_RT305X_GCT			0x88
+
+/* for MT7621 gdma registers */
+#define GDMA_REG_PERF_START(x)		(0x230 + (x) * 0x8)
+#define GDMA_REG_PERF_END(x)		(0x234 + (x) * 0x8)
+
+enum gdma_dma_transfer_size {
+	GDMA_TRANSFER_SIZE_4BYTE	= 0,
+	GDMA_TRANSFER_SIZE_8BYTE	= 1,
+	GDMA_TRANSFER_SIZE_16BYTE	= 2,
+	GDMA_TRANSFER_SIZE_32BYTE	= 3,
+	GDMA_TRANSFER_SIZE_64BYTE	= 4,
+};
+
+struct gdma_dma_sg {
+	dma_addr_t src_addr;
+	dma_addr_t dst_addr;
+	u32 len;
+};
+
+struct gdma_dma_desc {
+	struct virt_dma_desc vdesc;
+
+	enum dma_transfer_direction direction;
+	bool cyclic;
+
+	u32 residue;
+	unsigned int num_sgs;
+	struct gdma_dma_sg sg[];
+};
+
+struct gdma_dmaengine_chan {
+	struct virt_dma_chan vchan;
+	unsigned int id;
+	unsigned int slave_id;
+
+	dma_addr_t fifo_addr;
+	enum gdma_dma_transfer_size burst_size;
+
+	struct gdma_dma_desc *desc;
+	unsigned int next_sg;
+};
+
+struct gdma_dma_dev {
+	struct dma_device ddev;
+	struct device_dma_parameters dma_parms;
+	struct gdma_data *data;
+	void __iomem *base;
+	struct tasklet_struct task;
+	volatile unsigned long chan_issued;
+	atomic_t cnt;
+
+	struct gdma_dmaengine_chan chan[];
+};
+
+struct gdma_data {
+	int chancnt;
+	u32 done_int_reg;
+	void (*init)(struct gdma_dma_dev *dma_dev);
+	int (*start_transfer)(struct gdma_dmaengine_chan *chan);
+};
+
+static struct gdma_dma_dev *gdma_dma_chan_get_dev(
+	struct gdma_dmaengine_chan *chan)
+{
+	return container_of(chan->vchan.chan.device, struct gdma_dma_dev,
+		ddev);
+}
+
+static struct gdma_dmaengine_chan *to_gdma_dma_chan(struct dma_chan *c)
+{
+	return container_of(c, struct gdma_dmaengine_chan, vchan.chan);
+}
+
+static struct gdma_dma_desc *to_gdma_dma_desc(struct virt_dma_desc *vdesc)
+{
+	return container_of(vdesc, struct gdma_dma_desc, vdesc);
+}
+
+static inline uint32_t gdma_dma_read(struct gdma_dma_dev *dma_dev,
+				     unsigned int reg)
+{
+	return readl(dma_dev->base + reg);
+}
+
+static inline void gdma_dma_write(struct gdma_dma_dev *dma_dev,
+				  unsigned int reg, uint32_t val)
+{
+	writel(val, dma_dev->base + reg);
+}
+
+static enum gdma_dma_transfer_size gdma_dma_maxburst(u32 maxburst)
+{
+	if (maxburst < 2)
+		return GDMA_TRANSFER_SIZE_4BYTE;
+	else if (maxburst < 4)
+		return GDMA_TRANSFER_SIZE_8BYTE;
+	else if (maxburst < 8)
+		return GDMA_TRANSFER_SIZE_16BYTE;
+	else if (maxburst < 16)
+		return GDMA_TRANSFER_SIZE_32BYTE;
+	else
+		return GDMA_TRANSFER_SIZE_64BYTE;
+}
+
+static int gdma_dma_config(struct dma_chan *c,
+			   struct dma_slave_config *config)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
+
+	if (config->device_fc) {
+		dev_err(dma_dev->ddev.dev, "not support flow controller\n");
+		return -EINVAL;
+	}
+
+	switch (config->direction) {
+	case DMA_MEM_TO_DEV:
+		if (config->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) {
+			dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n");
+			return -EINVAL;
+		}
+		chan->slave_id = config->slave_id;
+		chan->fifo_addr = config->dst_addr;
+		chan->burst_size = gdma_dma_maxburst(config->dst_maxburst);
+		break;
+	case DMA_DEV_TO_MEM:
+		if (config->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES) {
+			dev_err(dma_dev->ddev.dev, "only support 4 byte buswidth\n");
+			return -EINVAL;
+		}
+		chan->slave_id = config->slave_id;
+		chan->fifo_addr = config->src_addr;
+		chan->burst_size = gdma_dma_maxburst(config->src_maxburst);
+		break;
+	default:
+		dev_err(dma_dev->ddev.dev, "direction type %d error\n",
+			config->direction);
+		return -EINVAL;
+	}
+
+	return 0;
+}
+
+static int gdma_dma_terminate_all(struct dma_chan *c)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
+	unsigned long flags, timeout;
+	LIST_HEAD(head);
+	int i = 0;
+
+	spin_lock_irqsave(&chan->vchan.lock, flags);
+	chan->desc = NULL;
+	clear_bit(chan->id, &dma_dev->chan_issued);
+	vchan_get_all_descriptors(&chan->vchan, &head);
+	spin_unlock_irqrestore(&chan->vchan.lock, flags);
+
+	vchan_dma_desc_free_list(&chan->vchan, &head);
+
+	/* wait dma transfer complete */
+	timeout = jiffies + msecs_to_jiffies(5000);
+	while (gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id)) &
+			GDMA_REG_CTRL0_ENABLE) {
+		if (time_after_eq(jiffies, timeout)) {
+			dev_err(dma_dev->ddev.dev, "chan %d wait timeout\n",
+				chan->id);
+			/* restore to init value */
+			gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), 0);
+			break;
+		}
+		cpu_relax();
+		i++;
+	}
+
+	if (i)
+		dev_dbg(dma_dev->ddev.dev, "terminate chan %d loops %d\n",
+			chan->id, i);
+
+	return 0;
+}
+
+static void rt305x_dump_reg(struct gdma_dma_dev *dma_dev, int id)
+{
+	dev_dbg(dma_dev->ddev.dev, "chan %d, src %08x, dst %08x, ctr0 %08x, ctr1 %08x, intr %08x, signal %08x\n",
+		id,
+		gdma_dma_read(dma_dev, GDMA_REG_SRC_ADDR(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_DST_ADDR(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_CTRL0(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_CTRL1(id)),
+		gdma_dma_read(dma_dev, GDMA_RT305X_STATUS_INT),
+		gdma_dma_read(dma_dev, GDMA_RT305X_STATUS_SIGNAL));
+}
+
+static int rt305x_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
+{
+	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
+	dma_addr_t src_addr, dst_addr;
+	struct gdma_dma_sg *sg;
+	u32 ctrl0, ctrl1;
+
+	/* verify chan is already stopped */
+	ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
+	if (unlikely(ctrl0 & GDMA_REG_CTRL0_ENABLE)) {
+		dev_err(dma_dev->ddev.dev, "chan %d is start(%08x).\n",
+			chan->id, ctrl0);
+		rt305x_dump_reg(dma_dev, chan->id);
+		return -EINVAL;
+	}
+
+	sg = &chan->desc->sg[chan->next_sg];
+	if (chan->desc->direction == DMA_MEM_TO_DEV) {
+		src_addr = sg->src_addr;
+		dst_addr = chan->fifo_addr;
+		ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED |
+			(8 << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) |
+			(chan->slave_id << GDMA_RT305X_CTRL0_DST_REQ_SHIFT);
+	} else if (chan->desc->direction == DMA_DEV_TO_MEM) {
+		src_addr = chan->fifo_addr;
+		dst_addr = sg->dst_addr;
+		ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED |
+			(chan->slave_id << GDMA_RT305X_CTRL0_SRC_REQ_SHIFT) |
+			(8 << GDMA_RT305X_CTRL0_DST_REQ_SHIFT);
+	} else if (chan->desc->direction == DMA_MEM_TO_MEM) {
+		/*
+		 * TODO: memcpy function have bugs. sometime it will copy
+		 * more 8 bytes data when using dmatest verify.
+		 */
+		src_addr = sg->src_addr;
+		dst_addr = sg->dst_addr;
+		ctrl0 = GDMA_REG_CTRL0_SW_MODE |
+			(8 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) |
+			(8 << GDMA_REG_CTRL1_DST_REQ_SHIFT);
+	} else {
+		dev_err(dma_dev->ddev.dev, "direction type %d error\n",
+			chan->desc->direction);
+		return -EINVAL;
+	}
+
+	ctrl0 |= (sg->len << GDMA_REG_CTRL0_TX_SHIFT) |
+		 (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) |
+		 GDMA_REG_CTRL0_DONE_INT | GDMA_REG_CTRL0_ENABLE;
+	ctrl1 = chan->id << GDMA_REG_CTRL1_NEXT_SHIFT;
+
+	chan->next_sg++;
+	gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr);
+	gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr);
+	gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1);
+
+	/* make sure next_sg is update */
+	wmb();
+	gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0);
+
+	return 0;
+}
+
+static void rt3883_dump_reg(struct gdma_dma_dev *dma_dev, int id)
+{
+	dev_dbg(dma_dev->ddev.dev, "chan %d, src %08x, dst %08x, ctr0 %08x, ctr1 %08x, unmask %08x, done %08x, req %08x, ack %08x, fin %08x\n",
+		id,
+		gdma_dma_read(dma_dev, GDMA_REG_SRC_ADDR(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_DST_ADDR(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_CTRL0(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_CTRL1(id)),
+		gdma_dma_read(dma_dev, GDMA_REG_UNMASK_INT),
+		gdma_dma_read(dma_dev, GDMA_REG_DONE_INT),
+		gdma_dma_read(dma_dev, GDMA_REG_REQSTS),
+		gdma_dma_read(dma_dev, GDMA_REG_ACKSTS),
+		gdma_dma_read(dma_dev, GDMA_REG_FINSTS));
+}
+
+static int rt3883_gdma_start_transfer(struct gdma_dmaengine_chan *chan)
+{
+	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
+	dma_addr_t src_addr, dst_addr;
+	struct gdma_dma_sg *sg;
+	u32 ctrl0, ctrl1;
+
+	/* verify chan is already stopped */
+	ctrl0 = gdma_dma_read(dma_dev, GDMA_REG_CTRL0(chan->id));
+	if (unlikely(ctrl0 & GDMA_REG_CTRL0_ENABLE)) {
+		dev_err(dma_dev->ddev.dev, "chan %d is start(%08x).\n",
+			chan->id, ctrl0);
+		rt3883_dump_reg(dma_dev, chan->id);
+		return -EINVAL;
+	}
+
+	sg = &chan->desc->sg[chan->next_sg];
+	if (chan->desc->direction == DMA_MEM_TO_DEV) {
+		src_addr = sg->src_addr;
+		dst_addr = chan->fifo_addr;
+		ctrl0 = GDMA_REG_CTRL0_DST_ADDR_FIXED;
+		ctrl1 = (32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) |
+			(chan->slave_id << GDMA_REG_CTRL1_DST_REQ_SHIFT);
+	} else if (chan->desc->direction == DMA_DEV_TO_MEM) {
+		src_addr = chan->fifo_addr;
+		dst_addr = sg->dst_addr;
+		ctrl0 = GDMA_REG_CTRL0_SRC_ADDR_FIXED;
+		ctrl1 = (chan->slave_id << GDMA_REG_CTRL1_SRC_REQ_SHIFT) |
+			(32 << GDMA_REG_CTRL1_DST_REQ_SHIFT) |
+			GDMA_REG_CTRL1_COHERENT;
+	} else if (chan->desc->direction == DMA_MEM_TO_MEM) {
+		src_addr = sg->src_addr;
+		dst_addr = sg->dst_addr;
+		ctrl0 = GDMA_REG_CTRL0_SW_MODE;
+		ctrl1 = (32 << GDMA_REG_CTRL1_SRC_REQ_SHIFT) |
+			(32 << GDMA_REG_CTRL1_DST_REQ_SHIFT) |
+			GDMA_REG_CTRL1_COHERENT;
+	} else {
+		dev_err(dma_dev->ddev.dev, "direction type %d error\n",
+			chan->desc->direction);
+		return -EINVAL;
+	}
+
+	ctrl0 |= (sg->len << GDMA_REG_CTRL0_TX_SHIFT) |
+		 (chan->burst_size << GDMA_REG_CTRL0_BURST_SHIFT) |
+		 GDMA_REG_CTRL0_DONE_INT | GDMA_REG_CTRL0_ENABLE;
+	ctrl1 |= chan->id << GDMA_REG_CTRL1_NEXT_SHIFT;
+
+	chan->next_sg++;
+	gdma_dma_write(dma_dev, GDMA_REG_SRC_ADDR(chan->id), src_addr);
+	gdma_dma_write(dma_dev, GDMA_REG_DST_ADDR(chan->id), dst_addr);
+	gdma_dma_write(dma_dev, GDMA_REG_CTRL1(chan->id), ctrl1);
+
+	/* make sure next_sg is update */
+	wmb();
+	gdma_dma_write(dma_dev, GDMA_REG_CTRL0(chan->id), ctrl0);
+
+	return 0;
+}
+
+static inline int gdma_start_transfer(struct gdma_dma_dev *dma_dev,
+				      struct gdma_dmaengine_chan *chan)
+{
+	return dma_dev->data->start_transfer(chan);
+}
+
+static int gdma_next_desc(struct gdma_dmaengine_chan *chan)
+{
+	struct virt_dma_desc *vdesc;
+
+	vdesc = vchan_next_desc(&chan->vchan);
+	if (!vdesc) {
+		chan->desc = NULL;
+		return 0;
+	}
+	chan->desc = to_gdma_dma_desc(vdesc);
+	chan->next_sg = 0;
+
+	return 1;
+}
+
+static void gdma_dma_chan_irq(struct gdma_dma_dev *dma_dev,
+			      struct gdma_dmaengine_chan *chan)
+{
+	struct gdma_dma_desc *desc;
+	unsigned long flags;
+	int chan_issued;
+
+	chan_issued = 0;
+	spin_lock_irqsave(&chan->vchan.lock, flags);
+	desc = chan->desc;
+	if (desc) {
+		if (desc->cyclic) {
+			vchan_cyclic_callback(&desc->vdesc);
+			if (chan->next_sg == desc->num_sgs)
+				chan->next_sg = 0;
+			chan_issued = 1;
+		} else {
+			desc->residue -= desc->sg[chan->next_sg - 1].len;
+			if (chan->next_sg == desc->num_sgs) {
+				list_del(&desc->vdesc.node);
+				vchan_cookie_complete(&desc->vdesc);
+				chan_issued = gdma_next_desc(chan);
+			} else {
+				chan_issued = 1;
+			}
+		}
+	} else {
+		dev_dbg(dma_dev->ddev.dev, "chan %d no desc to complete\n",
+			chan->id);
+	}
+	if (chan_issued)
+		set_bit(chan->id, &dma_dev->chan_issued);
+	spin_unlock_irqrestore(&chan->vchan.lock, flags);
+}
+
+static irqreturn_t gdma_dma_irq(int irq, void *devid)
+{
+	struct gdma_dma_dev *dma_dev = devid;
+	u32 done, done_reg;
+	unsigned int i;
+
+	done_reg = dma_dev->data->done_int_reg;
+	done = gdma_dma_read(dma_dev, done_reg);
+	if (unlikely(!done))
+		return IRQ_NONE;
+
+	/* clean done bits */
+	gdma_dma_write(dma_dev, done_reg, done);
+
+	i = 0;
+	while (done) {
+		if (done & 0x1) {
+			gdma_dma_chan_irq(dma_dev, &dma_dev->chan[i]);
+			atomic_dec(&dma_dev->cnt);
+		}
+		done >>= 1;
+		i++;
+	}
+
+	/* start only have work to do */
+	if (dma_dev->chan_issued)
+		tasklet_schedule(&dma_dev->task);
+
+	return IRQ_HANDLED;
+}
+
+static void gdma_dma_issue_pending(struct dma_chan *c)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_dev *dma_dev = gdma_dma_chan_get_dev(chan);
+	unsigned long flags;
+
+	spin_lock_irqsave(&chan->vchan.lock, flags);
+	if (vchan_issue_pending(&chan->vchan) && !chan->desc) {
+		if (gdma_next_desc(chan)) {
+			set_bit(chan->id, &dma_dev->chan_issued);
+			tasklet_schedule(&dma_dev->task);
+		} else {
+			dev_dbg(dma_dev->ddev.dev, "chan %d no desc to issue\n",
+				chan->id);
+		}
+	}
+	spin_unlock_irqrestore(&chan->vchan.lock, flags);
+}
+
+static struct dma_async_tx_descriptor *gdma_dma_prep_slave_sg(
+		struct dma_chan *c, struct scatterlist *sgl,
+		unsigned int sg_len, enum dma_transfer_direction direction,
+		unsigned long flags, void *context)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_desc *desc;
+	struct scatterlist *sg;
+	unsigned int i;
+
+	desc = kzalloc(struct_size(desc, sg, sg_len), GFP_ATOMIC);
+	if (!desc) {
+		dev_err(c->device->dev, "alloc sg decs error\n");
+		return NULL;
+	}
+	desc->residue = 0;
+
+	for_each_sg(sgl, sg, sg_len, i) {
+		if (direction == DMA_MEM_TO_DEV) {
+			desc->sg[i].src_addr = sg_dma_address(sg);
+		} else if (direction == DMA_DEV_TO_MEM) {
+			desc->sg[i].dst_addr = sg_dma_address(sg);
+		} else {
+			dev_err(c->device->dev, "direction type %d error\n",
+				direction);
+			goto free_desc;
+		}
+
+		if (unlikely(sg_dma_len(sg) > GDMA_REG_CTRL0_TX_MASK)) {
+			dev_err(c->device->dev, "sg len too large %d\n",
+				sg_dma_len(sg));
+			goto free_desc;
+		}
+		desc->sg[i].len = sg_dma_len(sg);
+		desc->residue += sg_dma_len(sg);
+	}
+
+	desc->num_sgs = sg_len;
+	desc->direction = direction;
+	desc->cyclic = false;
+
+	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
+
+free_desc:
+	kfree(desc);
+	return NULL;
+}
+
+static struct dma_async_tx_descriptor *gdma_dma_prep_dma_memcpy(
+		struct dma_chan *c, dma_addr_t dest, dma_addr_t src,
+		size_t len, unsigned long flags)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_desc *desc;
+	unsigned int num_periods, i;
+	size_t xfer_count;
+
+	if (len <= 0)
+		return NULL;
+
+	chan->burst_size = gdma_dma_maxburst(len >> 2);
+
+	xfer_count = GDMA_REG_CTRL0_TX_MASK;
+	num_periods = DIV_ROUND_UP(len, xfer_count);
+
+	desc = kzalloc(struct_size(desc, sg, num_periods), GFP_ATOMIC);
+	if (!desc) {
+		dev_err(c->device->dev, "alloc memcpy decs error\n");
+		return NULL;
+	}
+	desc->residue = len;
+
+	for (i = 0; i < num_periods; i++) {
+		desc->sg[i].src_addr = src;
+		desc->sg[i].dst_addr = dest;
+		if (len > xfer_count)
+			desc->sg[i].len = xfer_count;
+		else
+			desc->sg[i].len = len;
+		src += desc->sg[i].len;
+		dest += desc->sg[i].len;
+		len -= desc->sg[i].len;
+	}
+
+	desc->num_sgs = num_periods;
+	desc->direction = DMA_MEM_TO_MEM;
+	desc->cyclic = false;
+
+	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
+}
+
+static struct dma_async_tx_descriptor *gdma_dma_prep_dma_cyclic(
+	struct dma_chan *c, dma_addr_t buf_addr, size_t buf_len,
+	size_t period_len, enum dma_transfer_direction direction,
+	unsigned long flags)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct gdma_dma_desc *desc;
+	unsigned int num_periods, i;
+
+	if (buf_len % period_len)
+		return NULL;
+
+	if (period_len > GDMA_REG_CTRL0_TX_MASK) {
+		dev_err(c->device->dev, "cyclic len too large %d\n",
+			period_len);
+		return NULL;
+	}
+
+	num_periods = buf_len / period_len;
+	desc = kzalloc(struct_size(desc, sg, num_periods), GFP_ATOMIC);
+	if (!desc) {
+		dev_err(c->device->dev, "alloc cyclic decs error\n");
+		return NULL;
+	}
+	desc->residue = buf_len;
+
+	for (i = 0; i < num_periods; i++) {
+		if (direction == DMA_MEM_TO_DEV) {
+			desc->sg[i].src_addr = buf_addr;
+		} else if (direction == DMA_DEV_TO_MEM) {
+			desc->sg[i].dst_addr = buf_addr;
+		} else {
+			dev_err(c->device->dev, "direction type %d error\n",
+				direction);
+			goto free_desc;
+		}
+		desc->sg[i].len = period_len;
+		buf_addr += period_len;
+	}
+
+	desc->num_sgs = num_periods;
+	desc->direction = direction;
+	desc->cyclic = true;
+
+	return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
+
+free_desc:
+	kfree(desc);
+	return NULL;
+}
+
+static enum dma_status gdma_dma_tx_status(struct dma_chan *c,
+					  dma_cookie_t cookie,
+					  struct dma_tx_state *state)
+{
+	struct gdma_dmaengine_chan *chan = to_gdma_dma_chan(c);
+	struct virt_dma_desc *vdesc;
+	enum dma_status status;
+	unsigned long flags;
+	struct gdma_dma_desc *desc;
+
+	status = dma_cookie_status(c, cookie, state);
+	if (status == DMA_COMPLETE || !state)
+		return status;
+
+	spin_lock_irqsave(&chan->vchan.lock, flags);
+	desc = chan->desc;
+	if (desc && (cookie == desc->vdesc.tx.cookie)) {
+		/*
+		 * We never update edesc->residue in the cyclic case, so we
+		 * can tell the remaining room to the end of the circular
+		 * buffer.
+		 */
+		if (desc->cyclic)
+			state->residue = desc->residue -
+				((chan->next_sg - 1) * desc->sg[0].len);
+		else
+			state->residue = desc->residue;
+	} else {
+		vdesc = vchan_find_desc(&chan->vchan, cookie);
+		if (vdesc)
+			state->residue = to_gdma_dma_desc(vdesc)->residue;
+	}
+	spin_unlock_irqrestore(&chan->vchan.lock, flags);
+
+	dev_dbg(c->device->dev, "tx residue %d bytes\n", state->residue);
+
+	return status;
+}
+
+static void gdma_dma_free_chan_resources(struct dma_chan *c)
+{
+	vchan_free_chan_resources(to_virt_chan(c));
+}
+
+static void gdma_dma_desc_free(struct virt_dma_desc *vdesc)
+{
+	kfree(container_of(vdesc, struct gdma_dma_desc, vdesc));
+}
+
+static void gdma_dma_tasklet(struct tasklet_struct *t)
+{
+	struct gdma_dma_dev *dma_dev = from_tasklet(dma_dev, t, task);
+	struct gdma_dmaengine_chan *chan;
+	static unsigned int last_chan;
+	unsigned int i, chan_mask;
+
+	/* record last chan to round robin all chans */
+	i = last_chan;
+	chan_mask = dma_dev->data->chancnt - 1;
+	do {
+		/*
+		 * on mt7621. when verify with dmatest with all
+		 * channel is enable. we need to limit only two
+		 * channel is working at the same time. otherwise the
+		 * data will have problem.
+		 */
+		if (atomic_read(&dma_dev->cnt) >= 2) {
+			last_chan = i;
+			break;
+		}
+
+		if (test_and_clear_bit(i, &dma_dev->chan_issued)) {
+			chan = &dma_dev->chan[i];
+			if (chan->desc) {
+				atomic_inc(&dma_dev->cnt);
+				gdma_start_transfer(dma_dev, chan);
+			} else {
+				dev_dbg(dma_dev->ddev.dev,
+					"chan %d no desc to issue\n",
+					chan->id);
+			}
+			if (!dma_dev->chan_issued)
+				break;
+		}
+
+		i = (i + 1) & chan_mask;
+	} while (i != last_chan);
+}
+
+static void rt305x_gdma_init(struct gdma_dma_dev *dma_dev)
+{
+	u32 gct;
+
+	/* all chans round robin */
+	gdma_dma_write(dma_dev, GDMA_RT305X_GCT, GDMA_REG_GCT_ARBIT_RR);
+
+	gct = gdma_dma_read(dma_dev, GDMA_RT305X_GCT);
+	dev_info(dma_dev->ddev.dev, "revision: %d, channels: %d\n",
+		 (gct >> GDMA_REG_GCT_VER_SHIFT) & GDMA_REG_GCT_VER_MASK,
+		 8 << ((gct >> GDMA_REG_GCT_CHAN_SHIFT) &
+			GDMA_REG_GCT_CHAN_MASK));
+}
+
+static void rt3883_gdma_init(struct gdma_dma_dev *dma_dev)
+{
+	u32 gct;
+
+	/* all chans round robin */
+	gdma_dma_write(dma_dev, GDMA_REG_GCT, GDMA_REG_GCT_ARBIT_RR);
+
+	gct = gdma_dma_read(dma_dev, GDMA_REG_GCT);
+	dev_info(dma_dev->ddev.dev, "revision: %d, channels: %d\n",
+		 (gct >> GDMA_REG_GCT_VER_SHIFT) & GDMA_REG_GCT_VER_MASK,
+		 8 << ((gct >> GDMA_REG_GCT_CHAN_SHIFT) &
+			GDMA_REG_GCT_CHAN_MASK));
+}
+
+static struct gdma_data rt305x_gdma_data = {
+	.chancnt = 8,
+	.done_int_reg = GDMA_RT305X_STATUS_INT,
+	.init = rt305x_gdma_init,
+	.start_transfer = rt305x_gdma_start_transfer,
+};
+
+static struct gdma_data rt3883_gdma_data = {
+	.chancnt = 16,
+	.done_int_reg = GDMA_REG_DONE_INT,
+	.init = rt3883_gdma_init,
+	.start_transfer = rt3883_gdma_start_transfer,
+};
+
+static const struct of_device_id gdma_of_match_table[] = {
+	{ .compatible = "ralink,rt305x-gdma", .data = &rt305x_gdma_data },
+	{ .compatible = "ralink,rt3883-gdma", .data = &rt3883_gdma_data },
+	{ },
+};
+MODULE_DEVICE_TABLE(of, gdma_of_match_table);
+
+static int gdma_dma_probe(struct platform_device *pdev)
+{
+	const struct of_device_id *match;
+	struct gdma_dmaengine_chan *chan;
+	struct gdma_dma_dev *dma_dev;
+	struct dma_device *dd;
+	unsigned int i;
+	int ret;
+	int irq;
+	void __iomem *base;
+	struct gdma_data *data;
+
+	ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (ret)
+		return ret;
+
+	match = of_match_device(gdma_of_match_table, &pdev->dev);
+	if (!match)
+		return -EINVAL;
+	data = (struct gdma_data *)match->data;
+
+	dma_dev = devm_kzalloc(&pdev->dev,
+			       struct_size(dma_dev, chan, data->chancnt),
+			       GFP_KERNEL);
+	if (!dma_dev)
+		return -EINVAL;
+	dma_dev->data = data;
+
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (IS_ERR(base))
+		return PTR_ERR(base);
+	dma_dev->base = base;
+	tasklet_setup(&dma_dev->task, gdma_dma_tasklet);
+
+	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return -EINVAL;
+	ret = devm_request_irq(&pdev->dev, irq, gdma_dma_irq,
+			       0, dev_name(&pdev->dev), dma_dev);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to request irq\n");
+		return ret;
+	}
+
+	ret = device_reset(&pdev->dev);
+	if (ret)
+		dev_err(&pdev->dev, "failed to reset: %d\n", ret);
+
+	dd = &dma_dev->ddev;
+	dma_cap_set(DMA_MEMCPY, dd->cap_mask);
+	dma_cap_set(DMA_SLAVE, dd->cap_mask);
+	dma_cap_set(DMA_CYCLIC, dd->cap_mask);
+	dd->device_free_chan_resources = gdma_dma_free_chan_resources;
+	dd->device_prep_dma_memcpy = gdma_dma_prep_dma_memcpy;
+	dd->device_prep_slave_sg = gdma_dma_prep_slave_sg;
+	dd->device_prep_dma_cyclic = gdma_dma_prep_dma_cyclic;
+	dd->device_config = gdma_dma_config;
+	dd->device_terminate_all = gdma_dma_terminate_all;
+	dd->device_tx_status = gdma_dma_tx_status;
+	dd->device_issue_pending = gdma_dma_issue_pending;
+
+	dd->src_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
+	dd->dst_addr_widths = BIT(DMA_SLAVE_BUSWIDTH_4_BYTES);
+	dd->directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
+	dd->residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
+
+	dd->dev = &pdev->dev;
+	dd->dev->dma_parms = &dma_dev->dma_parms;
+	dma_set_max_seg_size(dd->dev, GDMA_REG_CTRL0_TX_MASK);
+	INIT_LIST_HEAD(&dd->channels);
+
+	for (i = 0; i < data->chancnt; i++) {
+		chan = &dma_dev->chan[i];
+		chan->id = i;
+		chan->vchan.desc_free = gdma_dma_desc_free;
+		vchan_init(&chan->vchan, dd);
+	}
+
+	/* init hardware */
+	data->init(dma_dev);
+
+	ret = dma_async_device_register(dd);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to register dma device\n");
+		return ret;
+	}
+
+	ret = of_dma_controller_register(pdev->dev.of_node,
+					 of_dma_xlate_by_chan_id, dma_dev);
+	if (ret) {
+		dev_err(&pdev->dev, "failed to register of dma controller\n");
+		goto err_unregister;
+	}
+
+	platform_set_drvdata(pdev, dma_dev);
+
+	return 0;
+
+err_unregister:
+	dma_async_device_unregister(dd);
+	return ret;
+}
+
+static int gdma_dma_remove(struct platform_device *pdev)
+{
+	struct gdma_dma_dev *dma_dev = platform_get_drvdata(pdev);
+
+	tasklet_kill(&dma_dev->task);
+	of_dma_controller_free(pdev->dev.of_node);
+	dma_async_device_unregister(&dma_dev->ddev);
+
+	return 0;
+}
+
+static struct platform_driver gdma_dma_driver = {
+	.probe = gdma_dma_probe,
+	.remove = gdma_dma_remove,
+	.driver = {
+		.name = "gdma-rt2880",
+		.of_match_table = gdma_of_match_table,
+	},
+};
+module_platform_driver(gdma_dma_driver);
+
+MODULE_DESCRIPTION("Ralink/MTK DMA driver");
+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk
index 429bb2cd26..1b7fb6b7b3 100644
--- a/target/linux/ramips/modules.mk
+++ b/target/linux/ramips/modules.mk
@@ -74,19 +74,19 @@ $(eval $(call KernelPackage,i2c-mt7628))
 define KernelPackage/dma-ralink
   SUBMENU:=Other modules
   TITLE:=Ralink GDMA Engine
-  DEPENDS:=@TARGET_ramips
+  DEPENDS:=@TARGET_ramips @!TARGET_ramips_rt288x
   KCONFIG:= \
 	CONFIG_DMADEVICES=y \
 	CONFIG_DW_DMAC_PCI=n \
-	CONFIG_DMA_RALINK
+	CONFIG_RALINK_GDMA
   FILES:= \
 	$(LINUX_DIR)/drivers/dma/virt-dma.ko \
-	$(LINUX_DIR)/drivers/staging/ralink-gdma/ralink-gdma.ko
+	$(LINUX_DIR)/drivers/dma/ralink-gdma.ko
   AUTOLOAD:=$(call AutoLoad,52,ralink-gdma)
 endef
 
 define KernelPackage/dma-ralink/description
- Kernel modules for enable ralink dma engine.
+ Kernel modules for enable ralink gdma engine.
 endef
 
 $(eval $(call KernelPackage,dma-ralink))
diff --git a/target/linux/ramips/mt7620/config-6.6 b/target/linux/ramips/mt7620/config-6.6
index 839b201cf1..bf96543344 100644
--- a/target/linux/ramips/mt7620/config-6.6
+++ b/target/linux/ramips/mt7620/config-6.6
@@ -179,6 +179,7 @@ CONFIG_PINCTRL_MTK_MTMIPS=y
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_RALINK=y
+# CONFIG_RALINK_GDMA is not set
 CONFIG_RALINK_WDT=y
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
diff --git a/target/linux/ramips/mt7621/config-6.6 b/target/linux/ramips/mt7621/config-6.6
index 9225a9c35c..a77d868624 100644
--- a/target/linux/ramips/mt7621/config-6.6
+++ b/target/linux/ramips/mt7621/config-6.6
@@ -242,6 +242,7 @@ CONFIG_QCOM_NET_PHYLIB=y
 CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_RALINK=y
+# CONFIG_RALINK_GDMA is not set
 # CONFIG_RALINK_WDT is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
diff --git a/target/linux/ramips/mt76x8/config-6.6 b/target/linux/ramips/mt76x8/config-6.6
index b03b220a71..db1281ad54 100644
--- a/target/linux/ramips/mt76x8/config-6.6
+++ b/target/linux/ramips/mt76x8/config-6.6
@@ -173,6 +173,7 @@ CONFIG_PINCTRL_MTK_MTMIPS=y
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_RALINK=y
+# CONFIG_RALINK_GDMA is not set
 # CONFIG_RALINK_WDT is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
diff --git a/target/linux/ramips/patches-6.6/804-dma-ralink-add-back-gdma-driver.patch b/target/linux/ramips/patches-6.6/804-dma-ralink-add-back-gdma-driver.patch
new file mode 100644
index 0000000000..3d2bdbaf40
--- /dev/null
+++ b/target/linux/ramips/patches-6.6/804-dma-ralink-add-back-gdma-driver.patch
@@ -0,0 +1,39 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Mon, 27 May 2024 08:25:57 +0000
+Subject: [PATCH] dma: ralink: add back gdma driver
+
+The upstream staging driver has been removed[1] since kernel v5.17.
+
+[1] 5bfc10690c6c ("staging: ralink-gdma: remove driver from tree")
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ drivers/dma/Kconfig  | 6 ++++++
+ drivers/dma/Makefile | 1 +
+ 2 files changed, 7 insertions(+)
+
+--- a/drivers/dma/Kconfig
++++ b/drivers/dma/Kconfig
+@@ -532,6 +532,12 @@ config PLX_DMA
+ 	  These are exposed via extra functions on the switch's
+ 	  upstream port. Each function exposes one DMA channel.
+ 
++config RALINK_GDMA
++	tristate "RALINK GDMA support"
++	depends on RALINK && !SOC_RT288X
++	select DMA_ENGINE
++	select DMA_VIRTUAL_CHANNELS
++
+ config STE_DMA40
+ 	bool "ST-Ericsson DMA40 support"
+ 	depends on ARCH_U8500
+--- a/drivers/dma/Makefile
++++ b/drivers/dma/Makefile
+@@ -64,6 +64,7 @@ obj-$(CONFIG_PL330_DMA) += pl330.o
+ obj-$(CONFIG_PLX_DMA) += plx_dma.o
+ obj-$(CONFIG_PPC_BESTCOMM) += bestcomm/
+ obj-$(CONFIG_PXA_DMA) += pxa_dma.o
++obj-$(CONFIG_RALINK_GDMA) += ralink-gdma.o
+ obj-$(CONFIG_RENESAS_DMA) += sh/
+ obj-$(CONFIG_SF_PDMA) += sf-pdma/
+ obj-$(CONFIG_STE_DMA40) += ste_dma40.o ste_dma40_ll.o
diff --git a/target/linux/ramips/rt305x/config-6.6 b/target/linux/ramips/rt305x/config-6.6
index 5d2e4f3766..27bf316c68 100644
--- a/target/linux/ramips/rt305x/config-6.6
+++ b/target/linux/ramips/rt305x/config-6.6
@@ -159,6 +159,7 @@ CONFIG_PINCTRL_RT305X=y
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_RALINK=y
+# CONFIG_RALINK_GDMA is not set
 # CONFIG_RALINK_ILL_ACC is not set
 CONFIG_RALINK_WDT=y
 CONFIG_RANDSTRUCT_NONE=y
diff --git a/target/linux/ramips/rt3883/config-6.6 b/target/linux/ramips/rt3883/config-6.6
index afb3fb6787..b272c751ed 100644
--- a/target/linux/ramips/rt3883/config-6.6
+++ b/target/linux/ramips/rt3883/config-6.6
@@ -159,6 +159,7 @@ CONFIG_PINCTRL_RT3883=y
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_RALINK=y
+# CONFIG_RALINK_GDMA is not set
 CONFIG_RALINK_WDT=y
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y



From lede-commits at lists.infradead.org  Wed May 29 01:44:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 04:44:00 -0400
Subject: [openwrt/openwrt]  tools/mkimage: update to v2024.04
In-Reply-To: <171697224083.3022237.17921487714107335605@git-01.infra.openwrt.org>
References: <171697224083.3022237.17921487714107335605@git-01.infra.openwrt.org>
Message-ID: <mailman.39461.1716972384.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6f2244735f8b09ec8a5e3ca4c5936084c1163022

commit 6f2244735f8b09ec8a5e3ca4c5936084c1163022
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Fri Apr 5 12:18:41 2024 +0200

    tools/mkimage: update to v2024.04
    
    Update to latest version.
    
    Refresh patches:
    - 030-allow-to-use-different-magic.patch
    - 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/mkimage/Makefile                                             | 4 ++--
 tools/mkimage/patches/030-allow-to-use-different-magic.patch       | 4 ++--
 tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index ae744f9bf3..6d2cc5f764 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2024.01
+PKG_VERSION:=2024.04
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
 	https://mirror.cyberbits.eu/u-boot \
 	https://ftp.denx.de/pub/u-boot \
 	ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
+PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
 
diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
index f2f57965f6..bcbdc4d6cd 100644
--- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch
+++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
@@ -24,7 +24,7 @@ This patch makes it possible to set a custom image magic.
  		"          -a ==> set load address to 'addr' (hex)\n"
  		"          -e ==> set entry point to 'ep' (hex)\n"
  		"          -n ==> set image name to 'name'\n"
-@@ -159,7 +161,7 @@ static int add_content(int type, const c
+@@ -160,7 +162,7 @@ static int add_content(int type, const c
  }
  
  static const char optstring[] =
@@ -33,7 +33,7 @@ This patch makes it possible to set a custom image magic.
  
  static const struct option longopts[] = {
  	{ "load-address", required_argument, NULL, 'a' },
-@@ -302,6 +304,14 @@ static void process_args(int argc, char
+@@ -303,6 +305,14 @@ static void process_args(int argc, char
  		case 'l':
  			params.lflag = 1;
  			break;
diff --git a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
index f2e3b9b053..ed6824b11a 100644
--- a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
+++ b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
@@ -14,7 +14,7 @@ https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917
 
 --- a/tools/Kconfig
 +++ b/tools/Kconfig
-@@ -31,7 +31,7 @@ config TOOLS_FIT
+@@ -36,7 +36,7 @@ config TOOLS_FIT
  	  Enable FIT support in the tools builds.
  
  config TOOLS_FIT_FULL_CHECK



From lede-commits at lists.infradead.org  Wed May 29 02:19:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 05:19:12 -0400
Subject: [openwrt/openwrt]  scripts: Add GNU ftp mirror redirector for GNU and
 Savannah
In-Reply-To: <171697435270.3089861.3119016511139899205@git-01.infra.openwrt.org>
References: <171697435270.3089861.3119016511139899205@git-01.infra.openwrt.org>
Message-ID: <mailman.39474.1716974364.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6510eb3b5d612ea7a70c4a8d9b83639e3b46e221

commit 6510eb3b5d612ea7a70c4a8d9b83639e3b46e221
Author: Sahil Dhiman <sahil at hopbox.in>
AuthorDate: Sat May 25 15:27:12 2024 +0530

    scripts: Add GNU ftp mirror redirector for GNU and Savannah
    
    Add GNU's redirector which automatically redirect user to nearby online
    mirror.
    
    Signed-off-by: Sahil Dhiman <sahil at hopbox.in>
    Link: https://github.com/openwrt/openwrt/pull/15557
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 scripts/download.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/download.pl b/scripts/download.pl
index c14ec07e44..3c57bcff22 100755
--- a/scripts/download.pl
+++ b/scripts/download.pl
@@ -272,6 +272,7 @@ foreach my $mirror (@ARGV) {
 			push @mirrors, "https://raw.githubusercontent.com/$1";
 		}
 	} elsif ($mirror =~ /^\@GNU\/(.+)$/) {
+		push @mirrors, "https://ftpmirror.gnu.org/$1";
 		push @mirrors, "https://mirror.csclub.uwaterloo.ca/gnu/$1";
 		push @mirrors, "https://mirror.netcologne.de/gnu/$1";
 		push @mirrors, "https://ftp.kddilabs.jp/GNU/gnu/$1";
@@ -282,6 +283,7 @@ foreach my $mirror (@ARGV) {
 		push @mirrors, "https://mirrors.tuna.tsinghua.edu.cn/gnu/$1";
 		push @mirrors, "https://mirrors.ustc.edu.cn/gnu/$1";
 	} elsif ($mirror =~ /^\@SAVANNAH\/(.+)$/) {
+		push @mirrors, "https://download.savannah.nongnu.org/releases/$1";
 		push @mirrors, "https://mirror.netcologne.de/savannah/$1";
 		push @mirrors, "https://mirror.csclub.uwaterloo.ca/nongnu/$1";
 		push @mirrors, "https://ftp.acc.umu.se/mirror/gnu.org/savannah/$1";



From lede-commits at lists.infradead.org  Wed May 29 14:29:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 17:29:52 -0400
Subject: [openwrt/openwrt]  d1: switch default to 6.6
In-Reply-To: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
References: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
Message-ID: <mailman.39721.1717018197.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/745ad016d173a4af21750f9913115fa410650498

commit 745ad016d173a4af21750f9913115fa410650498
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed May 29 10:53:55 2024 +0200

    d1: switch default to 6.6
    
    Switch the default kernel to 6.6.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/d1/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/d1/Makefile b/target/linux/d1/Makefile
index 2f505500b2..a60af57afa 100644
--- a/target/linux/d1/Makefile
+++ b/target/linux/d1/Makefile
@@ -11,8 +11,7 @@ FEATURES:=ext4 squashfs
 KERNELNAME:=Image dtbs
 SUBTARGETS:=generic
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Wed May 29 14:29:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 17:29:51 -0400
Subject: [openwrt/openwrt]  d1: 6.6: set testing kernel
In-Reply-To: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
References: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
Message-ID: <mailman.39722.1717018197.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e78a0cf3ce6e23185f02d450febb82da986ef0e4

commit e78a0cf3ce6e23185f02d450febb82da986ef0e4
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sun May 26 00:56:33 2024 +0200

    d1: 6.6: set testing kernel
    
    Allow selecting 6.6 as testing kernel on d1.
    
    Runtime-tested: Nezha D1
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/d1/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/d1/Makefile b/target/linux/d1/Makefile
index 69e28d4811..2f505500b2 100644
--- a/target/linux/d1/Makefile
+++ b/target/linux/d1/Makefile
@@ -12,6 +12,7 @@ KERNELNAME:=Image dtbs
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Wed May 29 14:29:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 17:29:50 -0400
Subject: [openwrt/openwrt]  d1: refresh kernel config
In-Reply-To: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
References: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
Message-ID: <mailman.39723.1717018198.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8b1d74371bcbe36479ff5958be483a0ac1ec16ca

commit 8b1d74371bcbe36479ff5958be483a0ac1ec16ca
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sun May 26 00:54:24 2024 +0200

    d1: refresh kernel config
    
    Refresh kernel config, and enable thermal features.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/d1/config-6.6 | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/target/linux/d1/config-6.6 b/target/linux/d1/config-6.6
index ef2112f706..957c3fba4d 100644
--- a/target/linux/d1/config-6.6
+++ b/target/linux/d1/config-6.6
@@ -1,4 +1,5 @@
 CONFIG_64BIT=y
+# CONFIG_ACPI is not set
 # CONFIG_AHCI_SUNXI is not set
 CONFIG_ARCH_CLOCKSOURCE_INIT=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
@@ -13,9 +14,11 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUNXI=y
+# CONFIG_ARCH_THEAD is not set
 CONFIG_ARCH_WANTS_THP_SWAP=y
 CONFIG_ASN1=y
 CONFIG_ASSOCIATIVE_ARRAY=y
+# CONFIG_AX45MP_L2_CACHE is not set
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
@@ -70,6 +73,7 @@ CONFIG_EFI_STUB=y
 # CONFIG_EFI_TEST is not set
 # CONFIG_EFI_ZBOOT is not set
 CONFIG_ELF_CORE=y
+# CONFIG_ERRATA_ANDES is not set
 # CONFIG_ERRATA_SIFIVE is not set
 CONFIG_ERRATA_THEAD=y
 CONFIG_ERRATA_THEAD_CMO=y
@@ -145,11 +149,13 @@ CONFIG_IOMMU_API=y
 CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
 # CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
 CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IOMMUFD is not set
 CONFIG_IO_URING=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_STACKS=y
 CONFIG_IRQ_WORK=y
 CONFIG_JBD2=y
 CONFIG_KALLSYMS=y
@@ -288,8 +294,14 @@ CONFIG_RISCV_BOOT_SPINWAIT=y
 CONFIG_RISCV_DMA_NONCOHERENT=y
 CONFIG_RISCV_INTC=y
 CONFIG_RISCV_ISA_C=y
+CONFIG_RISCV_ISA_FALLBACK=y
+CONFIG_RISCV_ISA_SVNAPOT=y
 CONFIG_RISCV_ISA_SVPBMT=y
+CONFIG_RISCV_ISA_V=y
+CONFIG_RISCV_ISA_V_DEFAULT_ENABLE=y
+CONFIG_RISCV_ISA_ZBB=y
 CONFIG_RISCV_ISA_ZICBOM=y
+CONFIG_RISCV_ISA_ZICBOZ=y
 CONFIG_RISCV_SBI=y
 CONFIG_RISCV_SBI_V01=y
 CONFIG_RISCV_TIMER=y
@@ -315,6 +327,7 @@ CONFIG_SIFIVE_PLIC=y
 CONFIG_SLUB_DEBUG=y
 CONFIG_SMP=y
 # CONFIG_SND_SUN20I_CODEC is not set
+# CONFIG_SND_SUN20I_D1_CODEC_ANALOG is not set
 # CONFIG_SND_SUN4I_I2S is not set
 # CONFIG_SND_SUN50I_DMIC is not set
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
@@ -337,6 +350,7 @@ CONFIG_STMMAC_ETH=y
 CONFIG_STMMAC_PLATFORM=y
 CONFIG_SUN20I_D1_CCU=y
 CONFIG_SUN20I_D1_R_CCU=y
+CONFIG_SUN20I_GPADC=y
 # CONFIG_SUN4I_EMAC is not set
 CONFIG_SUN4I_TIMER=y
 CONFIG_SUN50I_IOMMU=y
@@ -344,7 +358,7 @@ CONFIG_SUN6I_MSGBOX=y
 CONFIG_SUN6I_RTC_CCU=y
 CONFIG_SUN8I_DE2_CCU=y
 # CONFIG_SUN8I_R_CCU is not set
-# CONFIG_SUN8I_THERMAL is not set
+CONFIG_SUN8I_THERMAL=y
 CONFIG_SUNXI_CCU=y
 # CONFIG_SUNXI_RSB is not set
 CONFIG_SUNXI_SRAM=y
@@ -354,7 +368,14 @@ CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 # CONFIG_SYSFB_SIMPLEFB is not set
 CONFIG_SYSFS_SYSCALL=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_THREAD_SIZE_ORDER=2
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y



From lede-commits at lists.infradead.org  Wed May 29 14:29:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 17:29:47 -0400
Subject: [openwrt/openwrt]  kernel/d1: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
References: <171701818724.503707.163558364915870651@git-01.infra.openwrt.org>
Message-ID: <mailman.39730.1717018205.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/99fcc902705bb17da6ff1d9435efe80a8b737928

commit 99fcc902705bb17da6ff1d9435efe80a8b737928
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sun May 26 00:51:10 2024 +0200

    kernel/d1: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/d1/{config-6.1 => config-6.6}                                | 0
 .../0001-dt-bindings-net-bluetooth-realtek-Add-RTL8723DS.patch            | 0
 .../0002-clk-sunxi-ng-mp-Avoid-computing-the-rate-twice.patch             | 0
 .../0003-dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch         | 0
 .../0004-dt-bindings-net-sun8i-emac-Add-properties-from-dwmac.patch       | 0
 .../0005-dt-bindings-display-sun8i-a83t-dw-hdmi-Remove-phy-ce.patch       | 0
 .../0006-dt-bindings-display-Add-D1-HDMI-compatibles.patch                | 0
 .../0007-drm-sun4i-Add-support-for-D1-HDMI.patch                          | 0
 .../0008-drm-sun4i-sun8i-hdmi-phy-Add-support-for-D1-PHY.patch            | 0
 .../0009-drm-sun4i-Copy-in-BSP-code-for-D1-HDMI-PHY.patch                 | 0
 .../0010-riscv-mm-Use-IOMMU-for-DMA-when-available.patch                  | 0
 .../0011-genirq-Add-support-for-oneshot-safe-threaded-EOIs.patch          | 0
 .../0012-irqchip-sifive-plic-Enable-oneshot-safe-threaded-EOI.patch       | 0
 .../0013-irqchip-sifive-plic-Support-wake-IRQs.patch                      | 0
 .../0014-mmc-sunxi-mmc-Correct-the-maximum-segment-size.patch             | 0
 .../0015-dt-bindings-display-Add-bindings-for-ClockworkPi-CWD.patch       | 0
 .../0016-dt-bindings-display-Add-Sitronix-ST7701s-panel-bindi.patch       | 0
 .../0017-drm-panel-Add-driver-for-ST7701s-DPI-LCD-panel.patch             | 0
 .../0018-nvmem-sunxi_sid-Drop-the-workaround-on-A64.patch                 | 0
 .../0019-dt-bindings-nvmem-Allow-bit-offsets-greater-than-a-b.patch       | 0
 .../0020-regulator-dt-bindings-Add-Allwinner-D1-LDOs.patch                | 0
 .../0021-regulator-sun20i-Add-support-for-Allwinner-D1-LDOs.patch         | 0
 .../0022-dt-bindings-sram-sunxi-sram-Add-optional-regulators-.patch       | 0
 .../0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch             | 0
 .../0024-MAINTAINERS-Match-the-sun20i-family-of-Allwinner-SoC.patch       | 0
 .../0025-dt-bindings-riscv-Add-T-HEAD-C906-and-C910-compatibl.patch       | 0
 .../0026-dt-bindings-vendor-prefixes-Add-Allwinner-D1-board-v.patch       | 0
 .../0027-dt-bindings-riscv-Add-Allwinner-D1-board-compatibles.patch       | 0
 .../0028-riscv-dts-allwinner-Add-the-D1-SoC-base-devicetree.patch         | 0
 .../0029-riscv-dts-allwinner-Add-Allwinner-D1-Nezha-devicetre.patch       | 0
 .../0030-riscv-dts-allwinner-Add-Sipeed-Lichee-RV-devicetrees.patch       | 0
 .../0031-riscv-dts-allwinner-Add-MangoPi-MQ-Pro-devicetree.patch          | 0
 .../0032-riscv-dts-allwinner-Add-Dongshan-Nezha-STU-devicetre.patch       | 0
 .../0033-riscv-dts-allwinner-Add-ClockworkPi-and-DevTerm-devi.patch       | 0
 .../0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch          | 0
 .../0035-riscv-defconfig-Enable-the-Allwinner-D1-platform-and.patch       | 0
 .../0036-riscv-dts-allwinner-Add-Bluetooth-PCM-audio.patch                | 0
 .../0037-dt-bindings-crypto-sun8i-ce-Add-compatible-for-D1.patch          | 0
 .../0038-crypto-sun8i-ce-Add-TRNG-clock-to-D1-variant.patch               | 0
 .../0039-riscv-dts-allwinner-d1-Add-crypto-engine-support.patch           | 0
 .../0040-ASoC-sun50i-dmic-dt-bindings-Add-D1-compatible-strin.patch       | 0
 .../0041-riscv-dts-allwinner-d1-Add-DMIC-node.patch                       | 0
 .../0042-riscv-dts-allwinner-Add-DMIC-sound-cards.patch                   | 0
 .../0043-hwspinlock-sun6i-Clarify-bank-counting-logic.patch               | 0
 .../0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch               | 0
 .../0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch           | 0
 .../0046-dt-bindings-hwlock-sun6i-Add-per-SoC-compatibles.patch           | 0
 .../0047-ASoC-sun4i-i2s-Also-set-capture-DMA-width.patch                  | 0
 target/linux/d1/{patches-6.1 => patches-6.6}/0048-todo.patch              | 0
 .../0049-dt-bindings-iommu-sun50i-Add-compatible-for-Allwinne.patch       | 0
 .../0050-iommu-sun50i-Support-variants-without-an-external-re.patch       | 0
 .../0051-iommu-sun50i-Ensure-bypass-is-disabled.patch                     | 0
 .../0052-iommu-sun50i-Add-support-for-the-D1-variant.patch                | 0
 .../0053-riscv-dts-allwinner-d1-Add-IOMMU-node.patch                      | 0
 .../0054-dt-bindings-leds-Add-Allwinner-A100-LED-controller.patch         | 0
 .../0055-leds-sun50i-a100-New-driver-for-the-A100-LED-control.patch       | 0
 .../0056-arm64-dts-allwinner-a100-Add-LED-controller-node.patch           | 0
 .../0057-riscv-dts-allwinner-d1-Add-LED-controller-node.patch             | 0
 .../0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch              | 0
 .../0059-pwm-sun8i-v536-document-device-tree-bindings.patch               | 0
 .../0060-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-driver.patch          | 0
 .../0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch       | 0
 .../0062-pwm-sun8i-v536-Add-support-for-the-Allwinner-D1.patch            | 0
 .../0063-riscv-dts-allwinner-d1-Add-PWM-support.patch                     | 0
 .../0064-riscv-dts-allwinner-d1-Hook-up-PWM-controlled-CPU-vo.patch       | 0
 .../0065-riscv-dts-allwinner-mangopi-mq-pro-Add-PWM-LED.patch             | 0
 .../0066-ASoC-dt-bindings-sun4i-spdif-Require-resets-for-H6.patch         | 0
 .../0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch         | 0
 .../0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch       | 0
 .../0069-ASoC-sun4i-spdif-Simplify-code-around-optional-reset.patch       | 0
 .../0070-ASoC-sun4i-spdif-Add-support-for-separate-RX-TX-cloc.patch       | 0
 .../0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch            | 0
 .../0072-riscv-dts-allwinner-d1-Add-SPDIF-support.patch                   | 0
 .../0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch           | 0
 .../0074-dt-bindings-spi-sun6i-Add-R329-variant.patch                     | 0
 .../0075-spi-spi-sun6i-Use-a-struct-for-quirks.patch                      | 0
 .../0076-spi-spi-sun6i-Add-Allwinner-R329-support.patch                   | 0
 .../0077-spi-spi-sun6i-Dual-Quad-RX-Support.patch                         | 0
 .../0078-riscv-dts-allwinner-Add-SPI-support.patch                        | 0
 .../0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch            | 0
 .../0080-riscv-dts-allwinner-d1-Add-thermal-sensor-and-zone.patch         | 0
 .../0081-ASoC-sun20i-codec-New-driver-for-D1-internal-codec.patch         | 0
 .../0082-ASoC-sun20i-codec-What-is-this-ramp-thing.patch                  | 0
 .../0083-riscv-dts-allwinner-d1-Add-sound-cards-to-boards.patch           | 0
 .../0084-drm-sun4i-dsi-Allow-panel-attach-before-card-registr.patch       | 0
 .../0085-drm-sun4i-mixer-Remove-unused-CMA-headers.patch                  | 0
 .../0086-drm-sun4i-decouple-TCON_DCLK_DIV-value-from-pll_mipi.patch       | 0
 .../0087-drm-sun4i-tcon-Always-protect-the-LCD-dotclock-rate.patch        | 0
 .../0088-drm-sun4i-tcon_top-Register-reset-clock-gates-in-pro.patch       | 0
 .../0089-riscv-dts-allwinner-lichee-rv-86-panel-480p-Add-pane.patch       | 0
 .../0090-riscv-dts-allwinner-d1-Add-DSI-pipeline.patch                    | 0
 .../0091-riscv-dts-allwinner-devterm-Add-DSI-panel-and-backli.patch       | 0
 .../0092-dt-bindings-display-sun4i-tcon-Add-external-LVDS-PHY.patch       | 0
 .../0093-riscv-dts-allwinner-d1-Add-LVDS0-PHY.patch                       | 0
 .../0094-dt-bindings-display-sun6i-dsi-Fix-clock-conditional.patch        | 0
 .../0095-dt-bindings-display-sun6i-dsi-Add-the-A100-variant.patch         | 0
 .../0096-drm-sun4i-dsi-Add-a-variant-structure.patch                      | 0
 .../0097-drm-sun4i-dsi-Add-the-A100-variant.patch                         | 0
 .../0098-riscv-Move-cast-inside-kernel_mapping_-pv-a_to_-vp-a.patch       | 0
 .../0099-dt-bindings-sun6i-a31-mipi-dphy-Add-the-interrupts-p.patch       | 0
 .../0100-ARM-dts-sun8i-a33-Add-DPHY-interrupt.patch                       | 0
 .../0101-arm64-dts-allwinner-a64-Add-DPHY-interrupt.patch                 | 0
 .../0102-dt-bindings-sun6i-a31-mipi-dphy-Add-the-A100-DPHY-va.patch       | 0
 .../0103-phy-allwinner-phy-sun6i-mipi-dphy-Make-RX-support-op.patch       | 0
 .../0104-phy-allwinner-phy-sun6i-mipi-dphy-Set-enable-bit-las.patch       | 0
 .../0105-phy-allwinner-phy-sun6i-mipi-dphy-Add-a-variant-powe.patch       | 0
 .../0106-phy-allwinner-phy-sun6i-mipi-dphy-Add-the-A100-DPHY-.patch       | 0
 .../0107-drm-panel-Add-driver-for-Clockwork-cwd686-panel.patch            | 0
 .../0108-drm-panel-cwd686-Add-regulators.patch                            | 0
 .../0109-drm-panel-cwd686-Make-reset-gpio-mandatory.patch                 | 0
 .../0110-drm-panel-cwd686-Increase-post-reset-delay.patch                 | 0
 .../0111-drm-panel-cwd686-Use-vendor-panel-init-sequence.patch            | 0
 .../{patches-6.1 => patches-6.6}/0112-drm-panel-cwd686-Fix-timings.patch  | 0
 .../0113-drm-panel-cwd686-Disable-burst.patch                             | 0
 .../0114-drm-panel-cwd686-Use-the-init-sequence-from-the-R-01.patch       | 0
 .../0115-drm-panel-cwd686-Power-up-sequence.patch                         | 0
 .../0116-drm-panel-cwd686-Why-is-this-not-getting-called.patch            | 0
 .../0117-riscv-dts-allwinner-d1-Add-video-engine-node.patch               | 0
 118 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/d1/config-6.1 b/target/linux/d1/config-6.6
similarity index 100%
rename from target/linux/d1/config-6.1
rename to target/linux/d1/config-6.6
diff --git a/target/linux/d1/patches-6.1/0001-dt-bindings-net-bluetooth-realtek-Add-RTL8723DS.patch b/target/linux/d1/patches-6.6/0001-dt-bindings-net-bluetooth-realtek-Add-RTL8723DS.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0001-dt-bindings-net-bluetooth-realtek-Add-RTL8723DS.patch
rename to target/linux/d1/patches-6.6/0001-dt-bindings-net-bluetooth-realtek-Add-RTL8723DS.patch
diff --git a/target/linux/d1/patches-6.1/0002-clk-sunxi-ng-mp-Avoid-computing-the-rate-twice.patch b/target/linux/d1/patches-6.6/0002-clk-sunxi-ng-mp-Avoid-computing-the-rate-twice.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0002-clk-sunxi-ng-mp-Avoid-computing-the-rate-twice.patch
rename to target/linux/d1/patches-6.6/0002-clk-sunxi-ng-mp-Avoid-computing-the-rate-twice.patch
diff --git a/target/linux/d1/patches-6.1/0003-dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch b/target/linux/d1/patches-6.6/0003-dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0003-dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch
rename to target/linux/d1/patches-6.6/0003-dt-bindings-net-sun8i-emac-Add-phy-supply-property.patch
diff --git a/target/linux/d1/patches-6.1/0004-dt-bindings-net-sun8i-emac-Add-properties-from-dwmac.patch b/target/linux/d1/patches-6.6/0004-dt-bindings-net-sun8i-emac-Add-properties-from-dwmac.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0004-dt-bindings-net-sun8i-emac-Add-properties-from-dwmac.patch
rename to target/linux/d1/patches-6.6/0004-dt-bindings-net-sun8i-emac-Add-properties-from-dwmac.patch
diff --git a/target/linux/d1/patches-6.1/0005-dt-bindings-display-sun8i-a83t-dw-hdmi-Remove-phy-ce.patch b/target/linux/d1/patches-6.6/0005-dt-bindings-display-sun8i-a83t-dw-hdmi-Remove-phy-ce.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0005-dt-bindings-display-sun8i-a83t-dw-hdmi-Remove-phy-ce.patch
rename to target/linux/d1/patches-6.6/0005-dt-bindings-display-sun8i-a83t-dw-hdmi-Remove-phy-ce.patch
diff --git a/target/linux/d1/patches-6.1/0006-dt-bindings-display-Add-D1-HDMI-compatibles.patch b/target/linux/d1/patches-6.6/0006-dt-bindings-display-Add-D1-HDMI-compatibles.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0006-dt-bindings-display-Add-D1-HDMI-compatibles.patch
rename to target/linux/d1/patches-6.6/0006-dt-bindings-display-Add-D1-HDMI-compatibles.patch
diff --git a/target/linux/d1/patches-6.1/0007-drm-sun4i-Add-support-for-D1-HDMI.patch b/target/linux/d1/patches-6.6/0007-drm-sun4i-Add-support-for-D1-HDMI.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0007-drm-sun4i-Add-support-for-D1-HDMI.patch
rename to target/linux/d1/patches-6.6/0007-drm-sun4i-Add-support-for-D1-HDMI.patch
diff --git a/target/linux/d1/patches-6.1/0008-drm-sun4i-sun8i-hdmi-phy-Add-support-for-D1-PHY.patch b/target/linux/d1/patches-6.6/0008-drm-sun4i-sun8i-hdmi-phy-Add-support-for-D1-PHY.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0008-drm-sun4i-sun8i-hdmi-phy-Add-support-for-D1-PHY.patch
rename to target/linux/d1/patches-6.6/0008-drm-sun4i-sun8i-hdmi-phy-Add-support-for-D1-PHY.patch
diff --git a/target/linux/d1/patches-6.1/0009-drm-sun4i-Copy-in-BSP-code-for-D1-HDMI-PHY.patch b/target/linux/d1/patches-6.6/0009-drm-sun4i-Copy-in-BSP-code-for-D1-HDMI-PHY.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0009-drm-sun4i-Copy-in-BSP-code-for-D1-HDMI-PHY.patch
rename to target/linux/d1/patches-6.6/0009-drm-sun4i-Copy-in-BSP-code-for-D1-HDMI-PHY.patch
diff --git a/target/linux/d1/patches-6.1/0010-riscv-mm-Use-IOMMU-for-DMA-when-available.patch b/target/linux/d1/patches-6.6/0010-riscv-mm-Use-IOMMU-for-DMA-when-available.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0010-riscv-mm-Use-IOMMU-for-DMA-when-available.patch
rename to target/linux/d1/patches-6.6/0010-riscv-mm-Use-IOMMU-for-DMA-when-available.patch
diff --git a/target/linux/d1/patches-6.1/0011-genirq-Add-support-for-oneshot-safe-threaded-EOIs.patch b/target/linux/d1/patches-6.6/0011-genirq-Add-support-for-oneshot-safe-threaded-EOIs.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0011-genirq-Add-support-for-oneshot-safe-threaded-EOIs.patch
rename to target/linux/d1/patches-6.6/0011-genirq-Add-support-for-oneshot-safe-threaded-EOIs.patch
diff --git a/target/linux/d1/patches-6.1/0012-irqchip-sifive-plic-Enable-oneshot-safe-threaded-EOI.patch b/target/linux/d1/patches-6.6/0012-irqchip-sifive-plic-Enable-oneshot-safe-threaded-EOI.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0012-irqchip-sifive-plic-Enable-oneshot-safe-threaded-EOI.patch
rename to target/linux/d1/patches-6.6/0012-irqchip-sifive-plic-Enable-oneshot-safe-threaded-EOI.patch
diff --git a/target/linux/d1/patches-6.1/0013-irqchip-sifive-plic-Support-wake-IRQs.patch b/target/linux/d1/patches-6.6/0013-irqchip-sifive-plic-Support-wake-IRQs.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0013-irqchip-sifive-plic-Support-wake-IRQs.patch
rename to target/linux/d1/patches-6.6/0013-irqchip-sifive-plic-Support-wake-IRQs.patch
diff --git a/target/linux/d1/patches-6.1/0014-mmc-sunxi-mmc-Correct-the-maximum-segment-size.patch b/target/linux/d1/patches-6.6/0014-mmc-sunxi-mmc-Correct-the-maximum-segment-size.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0014-mmc-sunxi-mmc-Correct-the-maximum-segment-size.patch
rename to target/linux/d1/patches-6.6/0014-mmc-sunxi-mmc-Correct-the-maximum-segment-size.patch
diff --git a/target/linux/d1/patches-6.1/0015-dt-bindings-display-Add-bindings-for-ClockworkPi-CWD.patch b/target/linux/d1/patches-6.6/0015-dt-bindings-display-Add-bindings-for-ClockworkPi-CWD.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0015-dt-bindings-display-Add-bindings-for-ClockworkPi-CWD.patch
rename to target/linux/d1/patches-6.6/0015-dt-bindings-display-Add-bindings-for-ClockworkPi-CWD.patch
diff --git a/target/linux/d1/patches-6.1/0016-dt-bindings-display-Add-Sitronix-ST7701s-panel-bindi.patch b/target/linux/d1/patches-6.6/0016-dt-bindings-display-Add-Sitronix-ST7701s-panel-bindi.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0016-dt-bindings-display-Add-Sitronix-ST7701s-panel-bindi.patch
rename to target/linux/d1/patches-6.6/0016-dt-bindings-display-Add-Sitronix-ST7701s-panel-bindi.patch
diff --git a/target/linux/d1/patches-6.1/0017-drm-panel-Add-driver-for-ST7701s-DPI-LCD-panel.patch b/target/linux/d1/patches-6.6/0017-drm-panel-Add-driver-for-ST7701s-DPI-LCD-panel.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0017-drm-panel-Add-driver-for-ST7701s-DPI-LCD-panel.patch
rename to target/linux/d1/patches-6.6/0017-drm-panel-Add-driver-for-ST7701s-DPI-LCD-panel.patch
diff --git a/target/linux/d1/patches-6.1/0018-nvmem-sunxi_sid-Drop-the-workaround-on-A64.patch b/target/linux/d1/patches-6.6/0018-nvmem-sunxi_sid-Drop-the-workaround-on-A64.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0018-nvmem-sunxi_sid-Drop-the-workaround-on-A64.patch
rename to target/linux/d1/patches-6.6/0018-nvmem-sunxi_sid-Drop-the-workaround-on-A64.patch
diff --git a/target/linux/d1/patches-6.1/0019-dt-bindings-nvmem-Allow-bit-offsets-greater-than-a-b.patch b/target/linux/d1/patches-6.6/0019-dt-bindings-nvmem-Allow-bit-offsets-greater-than-a-b.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0019-dt-bindings-nvmem-Allow-bit-offsets-greater-than-a-b.patch
rename to target/linux/d1/patches-6.6/0019-dt-bindings-nvmem-Allow-bit-offsets-greater-than-a-b.patch
diff --git a/target/linux/d1/patches-6.1/0020-regulator-dt-bindings-Add-Allwinner-D1-LDOs.patch b/target/linux/d1/patches-6.6/0020-regulator-dt-bindings-Add-Allwinner-D1-LDOs.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0020-regulator-dt-bindings-Add-Allwinner-D1-LDOs.patch
rename to target/linux/d1/patches-6.6/0020-regulator-dt-bindings-Add-Allwinner-D1-LDOs.patch
diff --git a/target/linux/d1/patches-6.1/0021-regulator-sun20i-Add-support-for-Allwinner-D1-LDOs.patch b/target/linux/d1/patches-6.6/0021-regulator-sun20i-Add-support-for-Allwinner-D1-LDOs.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0021-regulator-sun20i-Add-support-for-Allwinner-D1-LDOs.patch
rename to target/linux/d1/patches-6.6/0021-regulator-sun20i-Add-support-for-Allwinner-D1-LDOs.patch
diff --git a/target/linux/d1/patches-6.1/0022-dt-bindings-sram-sunxi-sram-Add-optional-regulators-.patch b/target/linux/d1/patches-6.6/0022-dt-bindings-sram-sunxi-sram-Add-optional-regulators-.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0022-dt-bindings-sram-sunxi-sram-Add-optional-regulators-.patch
rename to target/linux/d1/patches-6.6/0022-dt-bindings-sram-sunxi-sram-Add-optional-regulators-.patch
diff --git a/target/linux/d1/patches-6.1/0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch b/target/linux/d1/patches-6.6/0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch
rename to target/linux/d1/patches-6.6/0023-soc-sunxi-sram-Only-iterate-over-SRAM-children.patch
diff --git a/target/linux/d1/patches-6.1/0024-MAINTAINERS-Match-the-sun20i-family-of-Allwinner-SoC.patch b/target/linux/d1/patches-6.6/0024-MAINTAINERS-Match-the-sun20i-family-of-Allwinner-SoC.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0024-MAINTAINERS-Match-the-sun20i-family-of-Allwinner-SoC.patch
rename to target/linux/d1/patches-6.6/0024-MAINTAINERS-Match-the-sun20i-family-of-Allwinner-SoC.patch
diff --git a/target/linux/d1/patches-6.1/0025-dt-bindings-riscv-Add-T-HEAD-C906-and-C910-compatibl.patch b/target/linux/d1/patches-6.6/0025-dt-bindings-riscv-Add-T-HEAD-C906-and-C910-compatibl.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0025-dt-bindings-riscv-Add-T-HEAD-C906-and-C910-compatibl.patch
rename to target/linux/d1/patches-6.6/0025-dt-bindings-riscv-Add-T-HEAD-C906-and-C910-compatibl.patch
diff --git a/target/linux/d1/patches-6.1/0026-dt-bindings-vendor-prefixes-Add-Allwinner-D1-board-v.patch b/target/linux/d1/patches-6.6/0026-dt-bindings-vendor-prefixes-Add-Allwinner-D1-board-v.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0026-dt-bindings-vendor-prefixes-Add-Allwinner-D1-board-v.patch
rename to target/linux/d1/patches-6.6/0026-dt-bindings-vendor-prefixes-Add-Allwinner-D1-board-v.patch
diff --git a/target/linux/d1/patches-6.1/0027-dt-bindings-riscv-Add-Allwinner-D1-board-compatibles.patch b/target/linux/d1/patches-6.6/0027-dt-bindings-riscv-Add-Allwinner-D1-board-compatibles.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0027-dt-bindings-riscv-Add-Allwinner-D1-board-compatibles.patch
rename to target/linux/d1/patches-6.6/0027-dt-bindings-riscv-Add-Allwinner-D1-board-compatibles.patch
diff --git a/target/linux/d1/patches-6.1/0028-riscv-dts-allwinner-Add-the-D1-SoC-base-devicetree.patch b/target/linux/d1/patches-6.6/0028-riscv-dts-allwinner-Add-the-D1-SoC-base-devicetree.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0028-riscv-dts-allwinner-Add-the-D1-SoC-base-devicetree.patch
rename to target/linux/d1/patches-6.6/0028-riscv-dts-allwinner-Add-the-D1-SoC-base-devicetree.patch
diff --git a/target/linux/d1/patches-6.1/0029-riscv-dts-allwinner-Add-Allwinner-D1-Nezha-devicetre.patch b/target/linux/d1/patches-6.6/0029-riscv-dts-allwinner-Add-Allwinner-D1-Nezha-devicetre.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0029-riscv-dts-allwinner-Add-Allwinner-D1-Nezha-devicetre.patch
rename to target/linux/d1/patches-6.6/0029-riscv-dts-allwinner-Add-Allwinner-D1-Nezha-devicetre.patch
diff --git a/target/linux/d1/patches-6.1/0030-riscv-dts-allwinner-Add-Sipeed-Lichee-RV-devicetrees.patch b/target/linux/d1/patches-6.6/0030-riscv-dts-allwinner-Add-Sipeed-Lichee-RV-devicetrees.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0030-riscv-dts-allwinner-Add-Sipeed-Lichee-RV-devicetrees.patch
rename to target/linux/d1/patches-6.6/0030-riscv-dts-allwinner-Add-Sipeed-Lichee-RV-devicetrees.patch
diff --git a/target/linux/d1/patches-6.1/0031-riscv-dts-allwinner-Add-MangoPi-MQ-Pro-devicetree.patch b/target/linux/d1/patches-6.6/0031-riscv-dts-allwinner-Add-MangoPi-MQ-Pro-devicetree.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0031-riscv-dts-allwinner-Add-MangoPi-MQ-Pro-devicetree.patch
rename to target/linux/d1/patches-6.6/0031-riscv-dts-allwinner-Add-MangoPi-MQ-Pro-devicetree.patch
diff --git a/target/linux/d1/patches-6.1/0032-riscv-dts-allwinner-Add-Dongshan-Nezha-STU-devicetre.patch b/target/linux/d1/patches-6.6/0032-riscv-dts-allwinner-Add-Dongshan-Nezha-STU-devicetre.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0032-riscv-dts-allwinner-Add-Dongshan-Nezha-STU-devicetre.patch
rename to target/linux/d1/patches-6.6/0032-riscv-dts-allwinner-Add-Dongshan-Nezha-STU-devicetre.patch
diff --git a/target/linux/d1/patches-6.1/0033-riscv-dts-allwinner-Add-ClockworkPi-and-DevTerm-devi.patch b/target/linux/d1/patches-6.6/0033-riscv-dts-allwinner-Add-ClockworkPi-and-DevTerm-devi.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0033-riscv-dts-allwinner-Add-ClockworkPi-and-DevTerm-devi.patch
rename to target/linux/d1/patches-6.6/0033-riscv-dts-allwinner-Add-ClockworkPi-and-DevTerm-devi.patch
diff --git a/target/linux/d1/patches-6.1/0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch b/target/linux/d1/patches-6.6/0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch
rename to target/linux/d1/patches-6.6/0034-riscv-Add-the-Allwinner-SoC-family-Kconfig-option.patch
diff --git a/target/linux/d1/patches-6.1/0035-riscv-defconfig-Enable-the-Allwinner-D1-platform-and.patch b/target/linux/d1/patches-6.6/0035-riscv-defconfig-Enable-the-Allwinner-D1-platform-and.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0035-riscv-defconfig-Enable-the-Allwinner-D1-platform-and.patch
rename to target/linux/d1/patches-6.6/0035-riscv-defconfig-Enable-the-Allwinner-D1-platform-and.patch
diff --git a/target/linux/d1/patches-6.1/0036-riscv-dts-allwinner-Add-Bluetooth-PCM-audio.patch b/target/linux/d1/patches-6.6/0036-riscv-dts-allwinner-Add-Bluetooth-PCM-audio.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0036-riscv-dts-allwinner-Add-Bluetooth-PCM-audio.patch
rename to target/linux/d1/patches-6.6/0036-riscv-dts-allwinner-Add-Bluetooth-PCM-audio.patch
diff --git a/target/linux/d1/patches-6.1/0037-dt-bindings-crypto-sun8i-ce-Add-compatible-for-D1.patch b/target/linux/d1/patches-6.6/0037-dt-bindings-crypto-sun8i-ce-Add-compatible-for-D1.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0037-dt-bindings-crypto-sun8i-ce-Add-compatible-for-D1.patch
rename to target/linux/d1/patches-6.6/0037-dt-bindings-crypto-sun8i-ce-Add-compatible-for-D1.patch
diff --git a/target/linux/d1/patches-6.1/0038-crypto-sun8i-ce-Add-TRNG-clock-to-D1-variant.patch b/target/linux/d1/patches-6.6/0038-crypto-sun8i-ce-Add-TRNG-clock-to-D1-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0038-crypto-sun8i-ce-Add-TRNG-clock-to-D1-variant.patch
rename to target/linux/d1/patches-6.6/0038-crypto-sun8i-ce-Add-TRNG-clock-to-D1-variant.patch
diff --git a/target/linux/d1/patches-6.1/0039-riscv-dts-allwinner-d1-Add-crypto-engine-support.patch b/target/linux/d1/patches-6.6/0039-riscv-dts-allwinner-d1-Add-crypto-engine-support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0039-riscv-dts-allwinner-d1-Add-crypto-engine-support.patch
rename to target/linux/d1/patches-6.6/0039-riscv-dts-allwinner-d1-Add-crypto-engine-support.patch
diff --git a/target/linux/d1/patches-6.1/0040-ASoC-sun50i-dmic-dt-bindings-Add-D1-compatible-strin.patch b/target/linux/d1/patches-6.6/0040-ASoC-sun50i-dmic-dt-bindings-Add-D1-compatible-strin.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0040-ASoC-sun50i-dmic-dt-bindings-Add-D1-compatible-strin.patch
rename to target/linux/d1/patches-6.6/0040-ASoC-sun50i-dmic-dt-bindings-Add-D1-compatible-strin.patch
diff --git a/target/linux/d1/patches-6.1/0041-riscv-dts-allwinner-d1-Add-DMIC-node.patch b/target/linux/d1/patches-6.6/0041-riscv-dts-allwinner-d1-Add-DMIC-node.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0041-riscv-dts-allwinner-d1-Add-DMIC-node.patch
rename to target/linux/d1/patches-6.6/0041-riscv-dts-allwinner-d1-Add-DMIC-node.patch
diff --git a/target/linux/d1/patches-6.1/0042-riscv-dts-allwinner-Add-DMIC-sound-cards.patch b/target/linux/d1/patches-6.6/0042-riscv-dts-allwinner-Add-DMIC-sound-cards.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0042-riscv-dts-allwinner-Add-DMIC-sound-cards.patch
rename to target/linux/d1/patches-6.6/0042-riscv-dts-allwinner-Add-DMIC-sound-cards.patch
diff --git a/target/linux/d1/patches-6.1/0043-hwspinlock-sun6i-Clarify-bank-counting-logic.patch b/target/linux/d1/patches-6.6/0043-hwspinlock-sun6i-Clarify-bank-counting-logic.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0043-hwspinlock-sun6i-Clarify-bank-counting-logic.patch
rename to target/linux/d1/patches-6.6/0043-hwspinlock-sun6i-Clarify-bank-counting-logic.patch
diff --git a/target/linux/d1/patches-6.1/0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch b/target/linux/d1/patches-6.6/0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch
rename to target/linux/d1/patches-6.6/0044-hwspinlock-sun6i-Fix-driver-to-match-binding.patch
diff --git a/target/linux/d1/patches-6.1/0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch b/target/linux/d1/patches-6.6/0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch
rename to target/linux/d1/patches-6.6/0045-dt-bindings-hwlock-sun6i-Add-interrupts-property.patch
diff --git a/target/linux/d1/patches-6.1/0046-dt-bindings-hwlock-sun6i-Add-per-SoC-compatibles.patch b/target/linux/d1/patches-6.6/0046-dt-bindings-hwlock-sun6i-Add-per-SoC-compatibles.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0046-dt-bindings-hwlock-sun6i-Add-per-SoC-compatibles.patch
rename to target/linux/d1/patches-6.6/0046-dt-bindings-hwlock-sun6i-Add-per-SoC-compatibles.patch
diff --git a/target/linux/d1/patches-6.1/0047-ASoC-sun4i-i2s-Also-set-capture-DMA-width.patch b/target/linux/d1/patches-6.6/0047-ASoC-sun4i-i2s-Also-set-capture-DMA-width.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0047-ASoC-sun4i-i2s-Also-set-capture-DMA-width.patch
rename to target/linux/d1/patches-6.6/0047-ASoC-sun4i-i2s-Also-set-capture-DMA-width.patch
diff --git a/target/linux/d1/patches-6.1/0048-todo.patch b/target/linux/d1/patches-6.6/0048-todo.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0048-todo.patch
rename to target/linux/d1/patches-6.6/0048-todo.patch
diff --git a/target/linux/d1/patches-6.1/0049-dt-bindings-iommu-sun50i-Add-compatible-for-Allwinne.patch b/target/linux/d1/patches-6.6/0049-dt-bindings-iommu-sun50i-Add-compatible-for-Allwinne.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0049-dt-bindings-iommu-sun50i-Add-compatible-for-Allwinne.patch
rename to target/linux/d1/patches-6.6/0049-dt-bindings-iommu-sun50i-Add-compatible-for-Allwinne.patch
diff --git a/target/linux/d1/patches-6.1/0050-iommu-sun50i-Support-variants-without-an-external-re.patch b/target/linux/d1/patches-6.6/0050-iommu-sun50i-Support-variants-without-an-external-re.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0050-iommu-sun50i-Support-variants-without-an-external-re.patch
rename to target/linux/d1/patches-6.6/0050-iommu-sun50i-Support-variants-without-an-external-re.patch
diff --git a/target/linux/d1/patches-6.1/0051-iommu-sun50i-Ensure-bypass-is-disabled.patch b/target/linux/d1/patches-6.6/0051-iommu-sun50i-Ensure-bypass-is-disabled.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0051-iommu-sun50i-Ensure-bypass-is-disabled.patch
rename to target/linux/d1/patches-6.6/0051-iommu-sun50i-Ensure-bypass-is-disabled.patch
diff --git a/target/linux/d1/patches-6.1/0052-iommu-sun50i-Add-support-for-the-D1-variant.patch b/target/linux/d1/patches-6.6/0052-iommu-sun50i-Add-support-for-the-D1-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0052-iommu-sun50i-Add-support-for-the-D1-variant.patch
rename to target/linux/d1/patches-6.6/0052-iommu-sun50i-Add-support-for-the-D1-variant.patch
diff --git a/target/linux/d1/patches-6.1/0053-riscv-dts-allwinner-d1-Add-IOMMU-node.patch b/target/linux/d1/patches-6.6/0053-riscv-dts-allwinner-d1-Add-IOMMU-node.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0053-riscv-dts-allwinner-d1-Add-IOMMU-node.patch
rename to target/linux/d1/patches-6.6/0053-riscv-dts-allwinner-d1-Add-IOMMU-node.patch
diff --git a/target/linux/d1/patches-6.1/0054-dt-bindings-leds-Add-Allwinner-A100-LED-controller.patch b/target/linux/d1/patches-6.6/0054-dt-bindings-leds-Add-Allwinner-A100-LED-controller.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0054-dt-bindings-leds-Add-Allwinner-A100-LED-controller.patch
rename to target/linux/d1/patches-6.6/0054-dt-bindings-leds-Add-Allwinner-A100-LED-controller.patch
diff --git a/target/linux/d1/patches-6.1/0055-leds-sun50i-a100-New-driver-for-the-A100-LED-control.patch b/target/linux/d1/patches-6.6/0055-leds-sun50i-a100-New-driver-for-the-A100-LED-control.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0055-leds-sun50i-a100-New-driver-for-the-A100-LED-control.patch
rename to target/linux/d1/patches-6.6/0055-leds-sun50i-a100-New-driver-for-the-A100-LED-control.patch
diff --git a/target/linux/d1/patches-6.1/0056-arm64-dts-allwinner-a100-Add-LED-controller-node.patch b/target/linux/d1/patches-6.6/0056-arm64-dts-allwinner-a100-Add-LED-controller-node.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0056-arm64-dts-allwinner-a100-Add-LED-controller-node.patch
rename to target/linux/d1/patches-6.6/0056-arm64-dts-allwinner-a100-Add-LED-controller-node.patch
diff --git a/target/linux/d1/patches-6.1/0057-riscv-dts-allwinner-d1-Add-LED-controller-node.patch b/target/linux/d1/patches-6.6/0057-riscv-dts-allwinner-d1-Add-LED-controller-node.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0057-riscv-dts-allwinner-d1-Add-LED-controller-node.patch
rename to target/linux/d1/patches-6.6/0057-riscv-dts-allwinner-d1-Add-LED-controller-node.patch
diff --git a/target/linux/d1/patches-6.1/0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch b/target/linux/d1/patches-6.6/0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch
rename to target/linux/d1/patches-6.6/0058-riscv-dts-allwinner-d1-Add-RGB-LEDs-to-boards.patch
diff --git a/target/linux/d1/patches-6.1/0059-pwm-sun8i-v536-document-device-tree-bindings.patch b/target/linux/d1/patches-6.6/0059-pwm-sun8i-v536-document-device-tree-bindings.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0059-pwm-sun8i-v536-document-device-tree-bindings.patch
rename to target/linux/d1/patches-6.6/0059-pwm-sun8i-v536-document-device-tree-bindings.patch
diff --git a/target/linux/d1/patches-6.1/0060-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-driver.patch b/target/linux/d1/patches-6.6/0060-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-driver.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0060-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-driver.patch
rename to target/linux/d1/patches-6.6/0060-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-driver.patch
diff --git a/target/linux/d1/patches-6.1/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch b/target/linux/d1/patches-6.6/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
rename to target/linux/d1/patches-6.6/0061-squash-pwm-sunxi-Add-Allwinner-SoC-PWM-controller-dr.patch
diff --git a/target/linux/d1/patches-6.1/0062-pwm-sun8i-v536-Add-support-for-the-Allwinner-D1.patch b/target/linux/d1/patches-6.6/0062-pwm-sun8i-v536-Add-support-for-the-Allwinner-D1.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0062-pwm-sun8i-v536-Add-support-for-the-Allwinner-D1.patch
rename to target/linux/d1/patches-6.6/0062-pwm-sun8i-v536-Add-support-for-the-Allwinner-D1.patch
diff --git a/target/linux/d1/patches-6.1/0063-riscv-dts-allwinner-d1-Add-PWM-support.patch b/target/linux/d1/patches-6.6/0063-riscv-dts-allwinner-d1-Add-PWM-support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0063-riscv-dts-allwinner-d1-Add-PWM-support.patch
rename to target/linux/d1/patches-6.6/0063-riscv-dts-allwinner-d1-Add-PWM-support.patch
diff --git a/target/linux/d1/patches-6.1/0064-riscv-dts-allwinner-d1-Hook-up-PWM-controlled-CPU-vo.patch b/target/linux/d1/patches-6.6/0064-riscv-dts-allwinner-d1-Hook-up-PWM-controlled-CPU-vo.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0064-riscv-dts-allwinner-d1-Hook-up-PWM-controlled-CPU-vo.patch
rename to target/linux/d1/patches-6.6/0064-riscv-dts-allwinner-d1-Hook-up-PWM-controlled-CPU-vo.patch
diff --git a/target/linux/d1/patches-6.1/0065-riscv-dts-allwinner-mangopi-mq-pro-Add-PWM-LED.patch b/target/linux/d1/patches-6.6/0065-riscv-dts-allwinner-mangopi-mq-pro-Add-PWM-LED.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0065-riscv-dts-allwinner-mangopi-mq-pro-Add-PWM-LED.patch
rename to target/linux/d1/patches-6.6/0065-riscv-dts-allwinner-mangopi-mq-pro-Add-PWM-LED.patch
diff --git a/target/linux/d1/patches-6.1/0066-ASoC-dt-bindings-sun4i-spdif-Require-resets-for-H6.patch b/target/linux/d1/patches-6.6/0066-ASoC-dt-bindings-sun4i-spdif-Require-resets-for-H6.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0066-ASoC-dt-bindings-sun4i-spdif-Require-resets-for-H6.patch
rename to target/linux/d1/patches-6.6/0066-ASoC-dt-bindings-sun4i-spdif-Require-resets-for-H6.patch
diff --git a/target/linux/d1/patches-6.1/0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch b/target/linux/d1/patches-6.6/0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch
rename to target/linux/d1/patches-6.6/0067-ASoC-dt-bindings-sun4i-spdif-Add-compatible-for-D1.patch
diff --git a/target/linux/d1/patches-6.1/0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch b/target/linux/d1/patches-6.6/0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch
rename to target/linux/d1/patches-6.6/0068-ASoC-sun4i-spdif-Assert-reset-when-removing-the-devi.patch
diff --git a/target/linux/d1/patches-6.1/0069-ASoC-sun4i-spdif-Simplify-code-around-optional-reset.patch b/target/linux/d1/patches-6.6/0069-ASoC-sun4i-spdif-Simplify-code-around-optional-reset.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0069-ASoC-sun4i-spdif-Simplify-code-around-optional-reset.patch
rename to target/linux/d1/patches-6.6/0069-ASoC-sun4i-spdif-Simplify-code-around-optional-reset.patch
diff --git a/target/linux/d1/patches-6.1/0070-ASoC-sun4i-spdif-Add-support-for-separate-RX-TX-cloc.patch b/target/linux/d1/patches-6.6/0070-ASoC-sun4i-spdif-Add-support-for-separate-RX-TX-cloc.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0070-ASoC-sun4i-spdif-Add-support-for-separate-RX-TX-cloc.patch
rename to target/linux/d1/patches-6.6/0070-ASoC-sun4i-spdif-Add-support-for-separate-RX-TX-cloc.patch
diff --git a/target/linux/d1/patches-6.1/0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch b/target/linux/d1/patches-6.6/0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch
rename to target/linux/d1/patches-6.6/0071-ASoC-sun4i-spdif-Add-support-for-the-D1-variant.patch
diff --git a/target/linux/d1/patches-6.1/0072-riscv-dts-allwinner-d1-Add-SPDIF-support.patch b/target/linux/d1/patches-6.6/0072-riscv-dts-allwinner-d1-Add-SPDIF-support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0072-riscv-dts-allwinner-d1-Add-SPDIF-support.patch
rename to target/linux/d1/patches-6.6/0072-riscv-dts-allwinner-d1-Add-SPDIF-support.patch
diff --git a/target/linux/d1/patches-6.1/0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch b/target/linux/d1/patches-6.6/0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch
rename to target/linux/d1/patches-6.6/0073-ASoC-sun4i-spdif-Add-support-for-separate-resets.patch
diff --git a/target/linux/d1/patches-6.1/0074-dt-bindings-spi-sun6i-Add-R329-variant.patch b/target/linux/d1/patches-6.6/0074-dt-bindings-spi-sun6i-Add-R329-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0074-dt-bindings-spi-sun6i-Add-R329-variant.patch
rename to target/linux/d1/patches-6.6/0074-dt-bindings-spi-sun6i-Add-R329-variant.patch
diff --git a/target/linux/d1/patches-6.1/0075-spi-spi-sun6i-Use-a-struct-for-quirks.patch b/target/linux/d1/patches-6.6/0075-spi-spi-sun6i-Use-a-struct-for-quirks.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0075-spi-spi-sun6i-Use-a-struct-for-quirks.patch
rename to target/linux/d1/patches-6.6/0075-spi-spi-sun6i-Use-a-struct-for-quirks.patch
diff --git a/target/linux/d1/patches-6.1/0076-spi-spi-sun6i-Add-Allwinner-R329-support.patch b/target/linux/d1/patches-6.6/0076-spi-spi-sun6i-Add-Allwinner-R329-support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0076-spi-spi-sun6i-Add-Allwinner-R329-support.patch
rename to target/linux/d1/patches-6.6/0076-spi-spi-sun6i-Add-Allwinner-R329-support.patch
diff --git a/target/linux/d1/patches-6.1/0077-spi-spi-sun6i-Dual-Quad-RX-Support.patch b/target/linux/d1/patches-6.6/0077-spi-spi-sun6i-Dual-Quad-RX-Support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0077-spi-spi-sun6i-Dual-Quad-RX-Support.patch
rename to target/linux/d1/patches-6.6/0077-spi-spi-sun6i-Dual-Quad-RX-Support.patch
diff --git a/target/linux/d1/patches-6.1/0078-riscv-dts-allwinner-Add-SPI-support.patch b/target/linux/d1/patches-6.6/0078-riscv-dts-allwinner-Add-SPI-support.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0078-riscv-dts-allwinner-Add-SPI-support.patch
rename to target/linux/d1/patches-6.6/0078-riscv-dts-allwinner-Add-SPI-support.patch
diff --git a/target/linux/d1/patches-6.1/0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch b/target/linux/d1/patches-6.6/0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch
rename to target/linux/d1/patches-6.6/0079-dt-bindings-thermal-sun8i-Add-compatible-for-D1.patch
diff --git a/target/linux/d1/patches-6.1/0080-riscv-dts-allwinner-d1-Add-thermal-sensor-and-zone.patch b/target/linux/d1/patches-6.6/0080-riscv-dts-allwinner-d1-Add-thermal-sensor-and-zone.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0080-riscv-dts-allwinner-d1-Add-thermal-sensor-and-zone.patch
rename to target/linux/d1/patches-6.6/0080-riscv-dts-allwinner-d1-Add-thermal-sensor-and-zone.patch
diff --git a/target/linux/d1/patches-6.1/0081-ASoC-sun20i-codec-New-driver-for-D1-internal-codec.patch b/target/linux/d1/patches-6.6/0081-ASoC-sun20i-codec-New-driver-for-D1-internal-codec.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0081-ASoC-sun20i-codec-New-driver-for-D1-internal-codec.patch
rename to target/linux/d1/patches-6.6/0081-ASoC-sun20i-codec-New-driver-for-D1-internal-codec.patch
diff --git a/target/linux/d1/patches-6.1/0082-ASoC-sun20i-codec-What-is-this-ramp-thing.patch b/target/linux/d1/patches-6.6/0082-ASoC-sun20i-codec-What-is-this-ramp-thing.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0082-ASoC-sun20i-codec-What-is-this-ramp-thing.patch
rename to target/linux/d1/patches-6.6/0082-ASoC-sun20i-codec-What-is-this-ramp-thing.patch
diff --git a/target/linux/d1/patches-6.1/0083-riscv-dts-allwinner-d1-Add-sound-cards-to-boards.patch b/target/linux/d1/patches-6.6/0083-riscv-dts-allwinner-d1-Add-sound-cards-to-boards.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0083-riscv-dts-allwinner-d1-Add-sound-cards-to-boards.patch
rename to target/linux/d1/patches-6.6/0083-riscv-dts-allwinner-d1-Add-sound-cards-to-boards.patch
diff --git a/target/linux/d1/patches-6.1/0084-drm-sun4i-dsi-Allow-panel-attach-before-card-registr.patch b/target/linux/d1/patches-6.6/0084-drm-sun4i-dsi-Allow-panel-attach-before-card-registr.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0084-drm-sun4i-dsi-Allow-panel-attach-before-card-registr.patch
rename to target/linux/d1/patches-6.6/0084-drm-sun4i-dsi-Allow-panel-attach-before-card-registr.patch
diff --git a/target/linux/d1/patches-6.1/0085-drm-sun4i-mixer-Remove-unused-CMA-headers.patch b/target/linux/d1/patches-6.6/0085-drm-sun4i-mixer-Remove-unused-CMA-headers.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0085-drm-sun4i-mixer-Remove-unused-CMA-headers.patch
rename to target/linux/d1/patches-6.6/0085-drm-sun4i-mixer-Remove-unused-CMA-headers.patch
diff --git a/target/linux/d1/patches-6.1/0086-drm-sun4i-decouple-TCON_DCLK_DIV-value-from-pll_mipi.patch b/target/linux/d1/patches-6.6/0086-drm-sun4i-decouple-TCON_DCLK_DIV-value-from-pll_mipi.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0086-drm-sun4i-decouple-TCON_DCLK_DIV-value-from-pll_mipi.patch
rename to target/linux/d1/patches-6.6/0086-drm-sun4i-decouple-TCON_DCLK_DIV-value-from-pll_mipi.patch
diff --git a/target/linux/d1/patches-6.1/0087-drm-sun4i-tcon-Always-protect-the-LCD-dotclock-rate.patch b/target/linux/d1/patches-6.6/0087-drm-sun4i-tcon-Always-protect-the-LCD-dotclock-rate.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0087-drm-sun4i-tcon-Always-protect-the-LCD-dotclock-rate.patch
rename to target/linux/d1/patches-6.6/0087-drm-sun4i-tcon-Always-protect-the-LCD-dotclock-rate.patch
diff --git a/target/linux/d1/patches-6.1/0088-drm-sun4i-tcon_top-Register-reset-clock-gates-in-pro.patch b/target/linux/d1/patches-6.6/0088-drm-sun4i-tcon_top-Register-reset-clock-gates-in-pro.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0088-drm-sun4i-tcon_top-Register-reset-clock-gates-in-pro.patch
rename to target/linux/d1/patches-6.6/0088-drm-sun4i-tcon_top-Register-reset-clock-gates-in-pro.patch
diff --git a/target/linux/d1/patches-6.1/0089-riscv-dts-allwinner-lichee-rv-86-panel-480p-Add-pane.patch b/target/linux/d1/patches-6.6/0089-riscv-dts-allwinner-lichee-rv-86-panel-480p-Add-pane.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0089-riscv-dts-allwinner-lichee-rv-86-panel-480p-Add-pane.patch
rename to target/linux/d1/patches-6.6/0089-riscv-dts-allwinner-lichee-rv-86-panel-480p-Add-pane.patch
diff --git a/target/linux/d1/patches-6.1/0090-riscv-dts-allwinner-d1-Add-DSI-pipeline.patch b/target/linux/d1/patches-6.6/0090-riscv-dts-allwinner-d1-Add-DSI-pipeline.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0090-riscv-dts-allwinner-d1-Add-DSI-pipeline.patch
rename to target/linux/d1/patches-6.6/0090-riscv-dts-allwinner-d1-Add-DSI-pipeline.patch
diff --git a/target/linux/d1/patches-6.1/0091-riscv-dts-allwinner-devterm-Add-DSI-panel-and-backli.patch b/target/linux/d1/patches-6.6/0091-riscv-dts-allwinner-devterm-Add-DSI-panel-and-backli.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0091-riscv-dts-allwinner-devterm-Add-DSI-panel-and-backli.patch
rename to target/linux/d1/patches-6.6/0091-riscv-dts-allwinner-devterm-Add-DSI-panel-and-backli.patch
diff --git a/target/linux/d1/patches-6.1/0092-dt-bindings-display-sun4i-tcon-Add-external-LVDS-PHY.patch b/target/linux/d1/patches-6.6/0092-dt-bindings-display-sun4i-tcon-Add-external-LVDS-PHY.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0092-dt-bindings-display-sun4i-tcon-Add-external-LVDS-PHY.patch
rename to target/linux/d1/patches-6.6/0092-dt-bindings-display-sun4i-tcon-Add-external-LVDS-PHY.patch
diff --git a/target/linux/d1/patches-6.1/0093-riscv-dts-allwinner-d1-Add-LVDS0-PHY.patch b/target/linux/d1/patches-6.6/0093-riscv-dts-allwinner-d1-Add-LVDS0-PHY.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0093-riscv-dts-allwinner-d1-Add-LVDS0-PHY.patch
rename to target/linux/d1/patches-6.6/0093-riscv-dts-allwinner-d1-Add-LVDS0-PHY.patch
diff --git a/target/linux/d1/patches-6.1/0094-dt-bindings-display-sun6i-dsi-Fix-clock-conditional.patch b/target/linux/d1/patches-6.6/0094-dt-bindings-display-sun6i-dsi-Fix-clock-conditional.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0094-dt-bindings-display-sun6i-dsi-Fix-clock-conditional.patch
rename to target/linux/d1/patches-6.6/0094-dt-bindings-display-sun6i-dsi-Fix-clock-conditional.patch
diff --git a/target/linux/d1/patches-6.1/0095-dt-bindings-display-sun6i-dsi-Add-the-A100-variant.patch b/target/linux/d1/patches-6.6/0095-dt-bindings-display-sun6i-dsi-Add-the-A100-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0095-dt-bindings-display-sun6i-dsi-Add-the-A100-variant.patch
rename to target/linux/d1/patches-6.6/0095-dt-bindings-display-sun6i-dsi-Add-the-A100-variant.patch
diff --git a/target/linux/d1/patches-6.1/0096-drm-sun4i-dsi-Add-a-variant-structure.patch b/target/linux/d1/patches-6.6/0096-drm-sun4i-dsi-Add-a-variant-structure.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0096-drm-sun4i-dsi-Add-a-variant-structure.patch
rename to target/linux/d1/patches-6.6/0096-drm-sun4i-dsi-Add-a-variant-structure.patch
diff --git a/target/linux/d1/patches-6.1/0097-drm-sun4i-dsi-Add-the-A100-variant.patch b/target/linux/d1/patches-6.6/0097-drm-sun4i-dsi-Add-the-A100-variant.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0097-drm-sun4i-dsi-Add-the-A100-variant.patch
rename to target/linux/d1/patches-6.6/0097-drm-sun4i-dsi-Add-the-A100-variant.patch
diff --git a/target/linux/d1/patches-6.1/0098-riscv-Move-cast-inside-kernel_mapping_-pv-a_to_-vp-a.patch b/target/linux/d1/patches-6.6/0098-riscv-Move-cast-inside-kernel_mapping_-pv-a_to_-vp-a.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0098-riscv-Move-cast-inside-kernel_mapping_-pv-a_to_-vp-a.patch
rename to target/linux/d1/patches-6.6/0098-riscv-Move-cast-inside-kernel_mapping_-pv-a_to_-vp-a.patch
diff --git a/target/linux/d1/patches-6.1/0099-dt-bindings-sun6i-a31-mipi-dphy-Add-the-interrupts-p.patch b/target/linux/d1/patches-6.6/0099-dt-bindings-sun6i-a31-mipi-dphy-Add-the-interrupts-p.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0099-dt-bindings-sun6i-a31-mipi-dphy-Add-the-interrupts-p.patch
rename to target/linux/d1/patches-6.6/0099-dt-bindings-sun6i-a31-mipi-dphy-Add-the-interrupts-p.patch
diff --git a/target/linux/d1/patches-6.1/0100-ARM-dts-sun8i-a33-Add-DPHY-interrupt.patch b/target/linux/d1/patches-6.6/0100-ARM-dts-sun8i-a33-Add-DPHY-interrupt.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0100-ARM-dts-sun8i-a33-Add-DPHY-interrupt.patch
rename to target/linux/d1/patches-6.6/0100-ARM-dts-sun8i-a33-Add-DPHY-interrupt.patch
diff --git a/target/linux/d1/patches-6.1/0101-arm64-dts-allwinner-a64-Add-DPHY-interrupt.patch b/target/linux/d1/patches-6.6/0101-arm64-dts-allwinner-a64-Add-DPHY-interrupt.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0101-arm64-dts-allwinner-a64-Add-DPHY-interrupt.patch
rename to target/linux/d1/patches-6.6/0101-arm64-dts-allwinner-a64-Add-DPHY-interrupt.patch
diff --git a/target/linux/d1/patches-6.1/0102-dt-bindings-sun6i-a31-mipi-dphy-Add-the-A100-DPHY-va.patch b/target/linux/d1/patches-6.6/0102-dt-bindings-sun6i-a31-mipi-dphy-Add-the-A100-DPHY-va.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0102-dt-bindings-sun6i-a31-mipi-dphy-Add-the-A100-DPHY-va.patch
rename to target/linux/d1/patches-6.6/0102-dt-bindings-sun6i-a31-mipi-dphy-Add-the-A100-DPHY-va.patch
diff --git a/target/linux/d1/patches-6.1/0103-phy-allwinner-phy-sun6i-mipi-dphy-Make-RX-support-op.patch b/target/linux/d1/patches-6.6/0103-phy-allwinner-phy-sun6i-mipi-dphy-Make-RX-support-op.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0103-phy-allwinner-phy-sun6i-mipi-dphy-Make-RX-support-op.patch
rename to target/linux/d1/patches-6.6/0103-phy-allwinner-phy-sun6i-mipi-dphy-Make-RX-support-op.patch
diff --git a/target/linux/d1/patches-6.1/0104-phy-allwinner-phy-sun6i-mipi-dphy-Set-enable-bit-las.patch b/target/linux/d1/patches-6.6/0104-phy-allwinner-phy-sun6i-mipi-dphy-Set-enable-bit-las.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0104-phy-allwinner-phy-sun6i-mipi-dphy-Set-enable-bit-las.patch
rename to target/linux/d1/patches-6.6/0104-phy-allwinner-phy-sun6i-mipi-dphy-Set-enable-bit-las.patch
diff --git a/target/linux/d1/patches-6.1/0105-phy-allwinner-phy-sun6i-mipi-dphy-Add-a-variant-powe.patch b/target/linux/d1/patches-6.6/0105-phy-allwinner-phy-sun6i-mipi-dphy-Add-a-variant-powe.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0105-phy-allwinner-phy-sun6i-mipi-dphy-Add-a-variant-powe.patch
rename to target/linux/d1/patches-6.6/0105-phy-allwinner-phy-sun6i-mipi-dphy-Add-a-variant-powe.patch
diff --git a/target/linux/d1/patches-6.1/0106-phy-allwinner-phy-sun6i-mipi-dphy-Add-the-A100-DPHY-.patch b/target/linux/d1/patches-6.6/0106-phy-allwinner-phy-sun6i-mipi-dphy-Add-the-A100-DPHY-.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0106-phy-allwinner-phy-sun6i-mipi-dphy-Add-the-A100-DPHY-.patch
rename to target/linux/d1/patches-6.6/0106-phy-allwinner-phy-sun6i-mipi-dphy-Add-the-A100-DPHY-.patch
diff --git a/target/linux/d1/patches-6.1/0107-drm-panel-Add-driver-for-Clockwork-cwd686-panel.patch b/target/linux/d1/patches-6.6/0107-drm-panel-Add-driver-for-Clockwork-cwd686-panel.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0107-drm-panel-Add-driver-for-Clockwork-cwd686-panel.patch
rename to target/linux/d1/patches-6.6/0107-drm-panel-Add-driver-for-Clockwork-cwd686-panel.patch
diff --git a/target/linux/d1/patches-6.1/0108-drm-panel-cwd686-Add-regulators.patch b/target/linux/d1/patches-6.6/0108-drm-panel-cwd686-Add-regulators.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0108-drm-panel-cwd686-Add-regulators.patch
rename to target/linux/d1/patches-6.6/0108-drm-panel-cwd686-Add-regulators.patch
diff --git a/target/linux/d1/patches-6.1/0109-drm-panel-cwd686-Make-reset-gpio-mandatory.patch b/target/linux/d1/patches-6.6/0109-drm-panel-cwd686-Make-reset-gpio-mandatory.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0109-drm-panel-cwd686-Make-reset-gpio-mandatory.patch
rename to target/linux/d1/patches-6.6/0109-drm-panel-cwd686-Make-reset-gpio-mandatory.patch
diff --git a/target/linux/d1/patches-6.1/0110-drm-panel-cwd686-Increase-post-reset-delay.patch b/target/linux/d1/patches-6.6/0110-drm-panel-cwd686-Increase-post-reset-delay.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0110-drm-panel-cwd686-Increase-post-reset-delay.patch
rename to target/linux/d1/patches-6.6/0110-drm-panel-cwd686-Increase-post-reset-delay.patch
diff --git a/target/linux/d1/patches-6.1/0111-drm-panel-cwd686-Use-vendor-panel-init-sequence.patch b/target/linux/d1/patches-6.6/0111-drm-panel-cwd686-Use-vendor-panel-init-sequence.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0111-drm-panel-cwd686-Use-vendor-panel-init-sequence.patch
rename to target/linux/d1/patches-6.6/0111-drm-panel-cwd686-Use-vendor-panel-init-sequence.patch
diff --git a/target/linux/d1/patches-6.1/0112-drm-panel-cwd686-Fix-timings.patch b/target/linux/d1/patches-6.6/0112-drm-panel-cwd686-Fix-timings.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0112-drm-panel-cwd686-Fix-timings.patch
rename to target/linux/d1/patches-6.6/0112-drm-panel-cwd686-Fix-timings.patch
diff --git a/target/linux/d1/patches-6.1/0113-drm-panel-cwd686-Disable-burst.patch b/target/linux/d1/patches-6.6/0113-drm-panel-cwd686-Disable-burst.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0113-drm-panel-cwd686-Disable-burst.patch
rename to target/linux/d1/patches-6.6/0113-drm-panel-cwd686-Disable-burst.patch
diff --git a/target/linux/d1/patches-6.1/0114-drm-panel-cwd686-Use-the-init-sequence-from-the-R-01.patch b/target/linux/d1/patches-6.6/0114-drm-panel-cwd686-Use-the-init-sequence-from-the-R-01.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0114-drm-panel-cwd686-Use-the-init-sequence-from-the-R-01.patch
rename to target/linux/d1/patches-6.6/0114-drm-panel-cwd686-Use-the-init-sequence-from-the-R-01.patch
diff --git a/target/linux/d1/patches-6.1/0115-drm-panel-cwd686-Power-up-sequence.patch b/target/linux/d1/patches-6.6/0115-drm-panel-cwd686-Power-up-sequence.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0115-drm-panel-cwd686-Power-up-sequence.patch
rename to target/linux/d1/patches-6.6/0115-drm-panel-cwd686-Power-up-sequence.patch
diff --git a/target/linux/d1/patches-6.1/0116-drm-panel-cwd686-Why-is-this-not-getting-called.patch b/target/linux/d1/patches-6.6/0116-drm-panel-cwd686-Why-is-this-not-getting-called.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0116-drm-panel-cwd686-Why-is-this-not-getting-called.patch
rename to target/linux/d1/patches-6.6/0116-drm-panel-cwd686-Why-is-this-not-getting-called.patch
diff --git a/target/linux/d1/patches-6.1/0117-riscv-dts-allwinner-d1-Add-video-engine-node.patch b/target/linux/d1/patches-6.6/0117-riscv-dts-allwinner-d1-Add-video-engine-node.patch
similarity index 100%
rename from target/linux/d1/patches-6.1/0117-riscv-dts-allwinner-d1-Add-video-engine-node.patch
rename to target/linux/d1/patches-6.6/0117-riscv-dts-allwinner-d1-Add-video-engine-node.patch



From lede-commits at lists.infradead.org  Wed May 29 15:05:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 18:05:51 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.32
In-Reply-To: <171702035004.568463.13220512679524753413@git-01.infra.openwrt.org>
References: <171702035004.568463.13220512679524753413@git-01.infra.openwrt.org>
Message-ID: <mailman.39763.1717020354.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bd571e1b020edfa2be679f4c92a544fa47c0e14

commit 7bd571e1b020edfa2be679f4c92a544fa47c0e14
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Sat May 25 13:03:59 2024 -0400

    kernel: bump 6.6 to 6.6.32
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.32
    
    Only kernel checksum was updated/no patches needed a rebase.
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 8fd2d83189..896c95ea7d 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .31
-LINUX_KERNEL_HASH-6.6.31 = d6ecff966f8c95ec4cb3bb303904f757b7de6a6bcfef0d0771cb852158e61c20
+LINUX_VERSION-6.6 = .32
+LINUX_KERNEL_HASH-6.6.32 = aaa824eaf07f61911d22b75ff090a403c3dd0bd73e23933e0bba8b5971436ce1



From lede-commits at lists.infradead.org  Wed May 29 15:05:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 29 May 2024 18:05:50 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.31
In-Reply-To: <171702035004.568463.13220512679524753413@git-01.infra.openwrt.org>
References: <171702035004.568463.13220512679524753413@git-01.infra.openwrt.org>
Message-ID: <mailman.39764.1717020357.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/10d77b9bc3355aa63dbecb5eac101ddcc978dddc

commit 10d77b9bc3355aa63dbecb5eac101ddcc978dddc
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Fri May 17 07:43:59 2024 -0400

    kernel: bump 6.6 to 6.6.31
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.31
    
    Removed upstreamed:
            backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch[1]
            backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch[2]
            backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch[3]
            backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch[4]
            pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch[5]
            pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch[6]
            pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch[7]
            pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch[8]
            pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch[9a,b]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=7f7b0ebb37afc5070d122318e3651d7cb8c4f01c
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=af276a5ac8e938c8b058e3e124073cc1e322d98b
    3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=78b6092d78341e423e5f6afae4d9f401b561aca7
    4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=26e2fe4cab10e67f116f4a2eecc393824bb294b8
    5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=65fbc7a11d063236e1f1dcebb38eeaa3ccbe2dbc
    6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cfe34d86ef9765c388f145039006bb79b6c81ac6
    7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=1ce60741d7e17dcf707e3bdebed4442ae30bdd02
    8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=23e25d2fc777cd0cc77c2f857f93e9b13ee789b9
    9a. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cce311f8bbbf9d24eacc39af3228cd104e079396
    9b. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/drivers/mtd/mtdcore.c?id=v6.6.31&id2=v6.6.30
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |   4 +-
 ...se-ipv6-ext-headers-without-frag0-invalid.patch | 107 -------
 ...-udp-bad-offset-in-socket-lookup-by-addin.patch | 178 -----------
 ...dd-flush-check-in-udp_gro_receive_segment.patch |  48 ---
 ...01-nvmem-qfprom-Mark-core-clk-as-optional.patch |   2 +-
 ...xplicit-config-option-to-read-old-syntax-.patch | 330 ---------------------
 .../generic/hack-6.6/259-regmap_dynamic.patch      |   2 +-
 ...1-net-dsa-mv88e6xxx-disable-ATU-violation.patch |   2 +-
 .../hack-6.6/721-net-add-packet-mangeling.patch    |   4 +-
 ...ook-for-OTP-legacy-NVMEM-cells-if-proper-.patch |  44 ---
 .../generic/pending-6.6/655-increase_skb_pad.patch |   2 +-
 ...fix-multicast-to-unicast-with-fraglist-GS.patch |  23 --
 ...ject-skb_copy-_expand-for-fraglist-GSO-sk.patch |  59 ----
 ...fix-corrupted-ethernet-header-on-multicas.patch |  42 ---
 ...ge-add-knob-for-filtering-rx-tx-BPDU-pack.patch |   4 +-
 ...xxx-Request-assisted-learning-on-CPU-port.patch |   2 +-
 .../778-net-l2tp-drop-flow-hash-on-forward.patch   |  31 --
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |   2 +-
 18 files changed, 12 insertions(+), 874 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 7b447be076..8fd2d83189 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .30
-LINUX_KERNEL_HASH-6.6.30 = b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6
+LINUX_VERSION-6.6 = .31
+LINUX_KERNEL_HASH-6.6.31 = d6ecff966f8c95ec4cb3bb303904f757b7de6a6bcfef0d0771cb852158e61c20
diff --git a/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch b/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
deleted file mode 100644
index d0fed02005..0000000000
--- a/target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From: Richard Gobert <richardbgobert at gmail.com>
-Date: Wed, 3 Jan 2024 15:44:21 +0100
-Subject: [PATCH] net: gro: parse ipv6 ext headers without frag0 invalidation
-
-The existing code always pulls the IPv6 header and sets the transport
-offset initially. Then optionally again pulls any extension headers in
-ipv6_gso_pull_exthdrs and sets the transport offset again on return from
-that call. skb->data is set at the start of the first extension header
-before calling ipv6_gso_pull_exthdrs, and must disable the frag0
-optimization because that function uses pskb_may_pull/pskb_pull instead of
-skb_gro_ helpers. It sets the GRO offset to the TCP header with
-skb_gro_pull and sets the transport header. Then returns skb->data to its
-position before this block.
-
-This commit introduces a new helper function - ipv6_gro_pull_exthdrs -
-which is used in ipv6_gro_receive to pull ipv6 ext headers instead of
-ipv6_gso_pull_exthdrs. Thus, there is no modification of skb->data, all
-operations use skb_gro_* helpers, and the frag0 fast path can be taken for
-IPv6 packets with ext headers.
-
-Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
-Reviewed-by: Willem de Bruijn <willemb at google.com>
-Reviewed-by: David Ahern <dsahern at kernel.org>
-Reviewed-by: Eric Dumazet <edumazet at google.com>
-Link: https://lore.kernel.org/r/504130f6-b56c-4dcc-882c-97942c59f5b7 at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
-
---- a/net/ipv6/ip6_offload.c
-+++ b/net/ipv6/ip6_offload.c
-@@ -37,6 +37,40 @@
- 		INDIRECT_CALL_L4(cb, f2, f1, head, skb);	\
- })
- 
-+static int ipv6_gro_pull_exthdrs(struct sk_buff *skb, int off, int proto)
-+{
-+	const struct net_offload *ops = NULL;
-+	struct ipv6_opt_hdr *opth;
-+
-+	for (;;) {
-+		int len;
-+
-+		ops = rcu_dereference(inet6_offloads[proto]);
-+
-+		if (unlikely(!ops))
-+			break;
-+
-+		if (!(ops->flags & INET6_PROTO_GSO_EXTHDR))
-+			break;
-+
-+		opth = skb_gro_header(skb, off + sizeof(*opth), off);
-+		if (unlikely(!opth))
-+			break;
-+
-+		len = ipv6_optlen(opth);
-+
-+		opth = skb_gro_header(skb, off + len, off);
-+		if (unlikely(!opth))
-+			break;
-+		proto = opth->nexthdr;
-+
-+		off += len;
-+	}
-+
-+	skb_gro_pull(skb, off - skb_network_offset(skb));
-+	return proto;
-+}
-+
- static int ipv6_gso_pull_exthdrs(struct sk_buff *skb, int proto)
- {
- 	const struct net_offload *ops = NULL;
-@@ -206,28 +240,25 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
- 		goto out;
- 
- 	skb_set_network_header(skb, off);
--	skb_gro_pull(skb, sizeof(*iph));
--	skb_set_transport_header(skb, skb_gro_offset(skb));
- 
--	flush += ntohs(iph->payload_len) != skb_gro_len(skb);
-+	flush += ntohs(iph->payload_len) != skb->len - hlen;
- 
- 	proto = iph->nexthdr;
- 	ops = rcu_dereference(inet6_offloads[proto]);
- 	if (!ops || !ops->callbacks.gro_receive) {
--		pskb_pull(skb, skb_gro_offset(skb));
--		skb_gro_frag0_invalidate(skb);
--		proto = ipv6_gso_pull_exthdrs(skb, proto);
--		skb_gro_pull(skb, -skb_transport_offset(skb));
--		skb_reset_transport_header(skb);
--		__skb_push(skb, skb_gro_offset(skb));
-+		proto = ipv6_gro_pull_exthdrs(skb, hlen, proto);
- 
- 		ops = rcu_dereference(inet6_offloads[proto]);
- 		if (!ops || !ops->callbacks.gro_receive)
- 			goto out;
- 
--		iph = ipv6_hdr(skb);
-+		iph = skb_gro_network_header(skb);
-+	} else {
-+		skb_gro_pull(skb, sizeof(*iph));
- 	}
- 
-+	skb_set_transport_header(skb, skb_gro_offset(skb));
-+
- 	NAPI_GRO_CB(skb)->proto = proto;
- 
- 	flush--;
diff --git a/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch b/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch
deleted file mode 100644
index c5d8497dee..0000000000
--- a/target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From: Richard Gobert <richardbgobert at gmail.com>
-Date: Tue, 30 Apr 2024 16:35:54 +0200
-Subject: [PATCH] net: gro: fix udp bad offset in socket lookup by adding
- {inner_}network_offset to napi_gro_cb
-
-Commits a602456 ("udp: Add GRO functions to UDP socket") and 57c67ff ("udp:
-additional GRO support") introduce incorrect usage of {ip,ipv6}_hdr in the
-complete phase of gro. The functions always return skb->network_header,
-which in the case of encapsulated packets at the gro complete phase, is
-always set to the innermost L3 of the packet. That means that calling
-{ip,ipv6}_hdr for skbs which completed the GRO receive phase (both in
-gro_list and *_gro_complete) when parsing an encapsulated packet's _outer_
-L3/L4 may return an unexpected value.
-
-This incorrect usage leads to a bug in GRO's UDP socket lookup.
-udp{4,6}_lib_lookup_skb functions use ip_hdr/ipv6_hdr respectively. These
-*_hdr functions return network_header which will point to the innermost L3,
-resulting in the wrong offset being used in __udp{4,6}_lib_lookup with
-encapsulated packets.
-
-This patch adds network_offset and inner_network_offset to napi_gro_cb, and
-makes sure both are set correctly.
-
-To fix the issue, network_offsets union is used inside napi_gro_cb, in
-which both the outer and the inner network offsets are saved.
-
-Reproduction example:
-
-Endpoint configuration example (fou + local address bind)
-
-    # ip fou add port 6666 ipproto 4
-    # ip link add name tun1 type ipip remote 2.2.2.1 local 2.2.2.2 encap fou encap-dport 5555 encap-sport 6666 mode ipip
-    # ip link set tun1 up
-    # ip a add 1.1.1.2/24 dev tun1
-
-Netperf TCP_STREAM result on net-next before patch is applied:
-
-net-next main, GRO enabled:
-    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
-    Recv   Send    Send
-    Socket Socket  Message  Elapsed
-    Size   Size    Size     Time     Throughput
-    bytes  bytes   bytes    secs.    10^6bits/sec
-
-    131072  16384  16384    5.28        2.37
-
-net-next main, GRO disabled:
-    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
-    Recv   Send    Send
-    Socket Socket  Message  Elapsed
-    Size   Size    Size     Time     Throughput
-    bytes  bytes   bytes    secs.    10^6bits/sec
-
-    131072  16384  16384    5.01     2745.06
-
-patch applied, GRO enabled:
-    $ netperf -H 1.1.1.2 -t TCP_STREAM -l 5
-    Recv   Send    Send
-    Socket Socket  Message  Elapsed
-    Size   Size    Size     Time     Throughput
-    bytes  bytes   bytes    secs.    10^6bits/sec
-
-    131072  16384  16384    5.01     2877.38
-
-Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
-Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
-Reviewed-by: Eric Dumazet <edumazet at google.com>
-Reviewed-by: Willem de Bruijn <willemb at google.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
-
---- a/include/net/gro.h
-+++ b/include/net/gro.h
-@@ -86,6 +86,15 @@ struct napi_gro_cb {
- 
- 	/* used to support CHECKSUM_COMPLETE for tunneling protocols */
- 	__wsum	csum;
-+
-+	/* L3 offsets */
-+	union {
-+		struct {
-+			u16 network_offset;
-+			u16 inner_network_offset;
-+		};
-+		u16 network_offsets[2];
-+	};
- };
- 
- #define NAPI_GRO_CB(skb) ((struct napi_gro_cb *)(skb)->cb)
---- a/net/8021q/vlan_core.c
-+++ b/net/8021q/vlan_core.c
-@@ -478,6 +478,8 @@ static struct sk_buff *vlan_gro_receive(
- 	if (unlikely(!vhdr))
- 		goto out;
- 
-+	NAPI_GRO_CB(skb)->network_offsets[NAPI_GRO_CB(skb)->encap_mark] = hlen;
-+
- 	type = vhdr->h_vlan_encapsulated_proto;
- 
- 	ptype = gro_find_receive_by_type(type);
---- a/net/core/gro.c
-+++ b/net/core/gro.c
-@@ -373,6 +373,7 @@ static inline void skb_gro_reset_offset(
- 	const struct skb_shared_info *pinfo = skb_shinfo(skb);
- 	const skb_frag_t *frag0 = &pinfo->frags[0];
- 
-+	NAPI_GRO_CB(skb)->network_offset = 0;
- 	NAPI_GRO_CB(skb)->data_offset = 0;
- 	NAPI_GRO_CB(skb)->frag0 = NULL;
- 	NAPI_GRO_CB(skb)->frag0_len = 0;
---- a/net/ipv4/af_inet.c
-+++ b/net/ipv4/af_inet.c
-@@ -1571,6 +1571,7 @@ struct sk_buff *inet_gro_receive(struct
- 	/* The above will be needed by the transport layer if there is one
- 	 * immediately following this IP hdr.
- 	 */
-+	NAPI_GRO_CB(skb)->inner_network_offset = off;
- 
- 	/* Note : No need to call skb_gro_postpull_rcsum() here,
- 	 * as we already checked checksum over ipv4 header was 0
---- a/net/ipv4/udp.c
-+++ b/net/ipv4/udp.c
-@@ -534,7 +534,8 @@ static inline struct sock *__udp4_lib_lo
- struct sock *udp4_lib_lookup_skb(const struct sk_buff *skb,
- 				 __be16 sport, __be16 dport)
- {
--	const struct iphdr *iph = ip_hdr(skb);
-+	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
-+	const struct iphdr *iph = (struct iphdr *)(skb->data + offset);
- 	struct net *net = dev_net(skb->dev);
- 	int iif, sdif;
- 
---- a/net/ipv4/udp_offload.c
-+++ b/net/ipv4/udp_offload.c
-@@ -718,7 +718,8 @@ EXPORT_SYMBOL(udp_gro_complete);
- 
- INDIRECT_CALLABLE_SCOPE int udp4_gro_complete(struct sk_buff *skb, int nhoff)
- {
--	const struct iphdr *iph = ip_hdr(skb);
-+	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
-+	const struct iphdr *iph = (struct iphdr *)(skb->data + offset);
- 	struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
- 
- 	/* do fraglist only if there is no outer UDP encap (or we already processed it) */
---- a/net/ipv6/ip6_offload.c
-+++ b/net/ipv6/ip6_offload.c
-@@ -240,6 +240,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
- 		goto out;
- 
- 	skb_set_network_header(skb, off);
-+	NAPI_GRO_CB(skb)->inner_network_offset = off;
- 
- 	flush += ntohs(iph->payload_len) != skb->len - hlen;
- 
---- a/net/ipv6/udp.c
-+++ b/net/ipv6/udp.c
-@@ -275,7 +275,8 @@ static struct sock *__udp6_lib_lookup_sk
- struct sock *udp6_lib_lookup_skb(const struct sk_buff *skb,
- 				 __be16 sport, __be16 dport)
- {
--	const struct ipv6hdr *iph = ipv6_hdr(skb);
-+	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
-+	const struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + offset);
- 	struct net *net = dev_net(skb->dev);
- 	int iif, sdif;
- 
---- a/net/ipv6/udp_offload.c
-+++ b/net/ipv6/udp_offload.c
-@@ -164,7 +164,8 @@ flush:
- 
- INDIRECT_CALLABLE_SCOPE int udp6_gro_complete(struct sk_buff *skb, int nhoff)
- {
--	const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
-+	const u16 offset = NAPI_GRO_CB(skb)->network_offsets[skb->encapsulation];
-+	const struct ipv6hdr *ipv6h = (struct ipv6hdr *)(skb->data + offset);
- 	struct udphdr *uh = (struct udphdr *)(skb->data + nhoff);
- 
- 	/* do fraglist only if there is no outer UDP encap (or we already processed it) */
diff --git a/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch b/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
deleted file mode 100644
index 72b76dd938..0000000000
--- a/target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From: Richard Gobert <richardbgobert at gmail.com>
-Date: Tue, 30 Apr 2024 16:35:55 +0200
-Subject: [PATCH] net: gro: add flush check in udp_gro_receive_segment
-
-GRO-GSO path is supposed to be transparent and as such L3 flush checks are
-relevant to all UDP flows merging in GRO. This patch uses the same logic
-and code from tcp_gro_receive, terminating merge if flush is non zero.
-
-Fixes: e20cf8d3f1f7 ("udp: implement GRO for plain UDP sockets.")
-Signed-off-by: Richard Gobert <richardbgobert at gmail.com>
-Reviewed-by: Willem de Bruijn <willemb at google.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
-
---- a/net/ipv4/udp_offload.c
-+++ b/net/ipv4/udp_offload.c
-@@ -471,6 +471,7 @@ static struct sk_buff *udp_gro_receive_s
- 	struct sk_buff *p;
- 	unsigned int ulen;
- 	int ret = 0;
-+	int flush;
- 
- 	/* requires non zero csum, for symmetry with GSO */
- 	if (!uh->check) {
-@@ -504,13 +505,22 @@ static struct sk_buff *udp_gro_receive_s
- 			return p;
- 		}
- 
-+		flush = NAPI_GRO_CB(p)->flush;
-+
-+		if (NAPI_GRO_CB(p)->flush_id != 1 ||
-+		    NAPI_GRO_CB(p)->count != 1 ||
-+		    !NAPI_GRO_CB(p)->is_atomic)
-+			flush |= NAPI_GRO_CB(p)->flush_id;
-+		else
-+			NAPI_GRO_CB(p)->is_atomic = false;
-+
- 		/* Terminate the flow on len mismatch or if it grow "too much".
- 		 * Under small packet flood GRO count could elsewhere grow a lot
- 		 * leading to excessive truesize values.
- 		 * On len mismatch merge the first packet shorter than gso_size,
- 		 * otherwise complete the GRO packet.
- 		 */
--		if (ulen > ntohs(uh2->len)) {
-+		if (ulen > ntohs(uh2->len) || flush) {
- 			pp = p;
- 		} else {
- 			if (NAPI_GRO_CB(skb)->is_flist) {
diff --git a/target/linux/generic/backport-6.6/816-v6.7-0001-nvmem-qfprom-Mark-core-clk-as-optional.patch b/target/linux/generic/backport-6.6/816-v6.7-0001-nvmem-qfprom-Mark-core-clk-as-optional.patch
index 66d4028140..c83d4fc579 100644
--- a/target/linux/generic/backport-6.6/816-v6.7-0001-nvmem-qfprom-Mark-core-clk-as-optional.patch
+++ b/target/linux/generic/backport-6.6/816-v6.7-0001-nvmem-qfprom-Mark-core-clk-as-optional.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/drivers/nvmem/qfprom.c
 +++ b/drivers/nvmem/qfprom.c
-@@ -423,12 +423,12 @@ static int qfprom_probe(struct platform_
+@@ -424,12 +424,12 @@ static int qfprom_probe(struct platform_
  		if (IS_ERR(priv->vcc))
  			return PTR_ERR(priv->vcc);
  
diff --git a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
deleted file mode 100644
index 12c77c17af..0000000000
--- a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
+++ /dev/null
@@ -1,330 +0,0 @@
-From 2cc3b37f5b6df8189d55d0e812d9658ce256dfec Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Fri, 20 Oct 2023 11:55:41 +0100
-Subject: [PATCH] nvmem: add explicit config option to read old syntax fixed OF
- cells
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Binding for fixed NVMEM cells defined directly as NVMEM device subnodes
-has been deprecated. It has been replaced by the "fixed-layout" NVMEM
-layout binding.
-
-New syntax is meant to be clearer and should help avoiding imprecise
-bindings.
-
-NVMEM subsystem already supports the new binding. It should be a good
-idea to limit support for old syntax to existing drivers that actually
-support & use it (we can't break backward compatibility!). That way we
-additionally encourage new bindings & drivers to ignore deprecated
-binding.
-
-It wasn't clear (to me) if rtc and w1 code actually uses old syntax
-fixed cells. I enabled them to don't risk any breakage.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-[for meson-{efuse,mx-efuse}.c]
-Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
-[for mtk-efuse.c, nvmem/core.c, nvmem-provider.h]
-Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-[MT8192, MT8195 Chromebooks]
-Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-[for microchip-otpc.c]
-Reviewed-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-[SAMA7G5-EK]
-Tested-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
-Link: https://lore.kernel.org/r/20231020105545.216052-3-srinivas.kandagatla at linaro.org
-Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
----
- drivers/mtd/mtdcore.c          | 2 ++
- drivers/nvmem/apple-efuses.c   | 1 +
- drivers/nvmem/core.c           | 8 +++++---
- drivers/nvmem/imx-ocotp-scu.c  | 1 +
- drivers/nvmem/imx-ocotp.c      | 1 +
- drivers/nvmem/meson-efuse.c    | 1 +
- drivers/nvmem/meson-mx-efuse.c | 1 +
- drivers/nvmem/microchip-otpc.c | 1 +
- drivers/nvmem/mtk-efuse.c      | 1 +
- drivers/nvmem/qcom-spmi-sdam.c | 1 +
- drivers/nvmem/qfprom.c         | 1 +
- drivers/nvmem/rave-sp-eeprom.c | 1 +
- drivers/nvmem/rockchip-efuse.c | 1 +
- drivers/nvmem/sc27xx-efuse.c   | 1 +
- drivers/nvmem/sec-qfprom.c     | 1 +
- drivers/nvmem/sprd-efuse.c     | 1 +
- drivers/nvmem/stm32-romem.c    | 1 +
- drivers/nvmem/sunplus-ocotp.c  | 1 +
- drivers/nvmem/sunxi_sid.c      | 1 +
- drivers/nvmem/uniphier-efuse.c | 1 +
- drivers/nvmem/zynqmp_nvmem.c   | 1 +
- drivers/rtc/nvmem.c            | 1 +
- drivers/w1/slaves/w1_ds250x.c  | 1 +
- include/linux/nvmem-provider.h | 2 ++
- 24 files changed, 30 insertions(+), 3 deletions(-)
-
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -552,6 +552,7 @@ static int mtd_nvmem_add(struct mtd_info
- 	config.dev = &mtd->dev;
- 	config.name = dev_name(&mtd->dev);
- 	config.owner = THIS_MODULE;
-+	config.add_legacy_fixed_of_cells = of_device_is_compatible(node, "nvmem-cells");
- 	config.reg_read = mtd_nvmem_reg_read;
- 	config.size = mtd->size;
- 	config.word_size = 1;
-@@ -898,6 +899,7 @@ static struct nvmem_device *mtd_otp_nvme
- 	config.name = compatible;
- 	config.id = NVMEM_DEVID_AUTO;
- 	config.owner = THIS_MODULE;
-+	config.add_legacy_fixed_of_cells = true;
- 	config.type = NVMEM_TYPE_OTP;
- 	config.root_only = true;
- 	config.ignore_wp = true;
---- a/drivers/nvmem/apple-efuses.c
-+++ b/drivers/nvmem/apple-efuses.c
-@@ -36,6 +36,7 @@ static int apple_efuses_probe(struct pla
- 	struct resource *res;
- 	struct nvmem_config config = {
- 		.dev = &pdev->dev,
-+		.add_legacy_fixed_of_cells = true,
- 		.read_only = true,
- 		.reg_read = apple_efuses_read,
- 		.stride = sizeof(u32),
---- a/drivers/nvmem/core.c
-+++ b/drivers/nvmem/core.c
-@@ -1003,9 +1003,11 @@ struct nvmem_device *nvmem_register(cons
- 	if (rval)
- 		goto err_remove_cells;
- 
--	rval = nvmem_add_cells_from_legacy_of(nvmem);
--	if (rval)
--		goto err_remove_cells;
-+	if (config->add_legacy_fixed_of_cells) {
-+		rval = nvmem_add_cells_from_legacy_of(nvmem);
-+		if (rval)
-+			goto err_remove_cells;
-+	}
- 
- 	rval = nvmem_add_cells_from_fixed_layout(nvmem);
- 	if (rval)
---- a/drivers/nvmem/imx-ocotp-scu.c
-+++ b/drivers/nvmem/imx-ocotp-scu.c
-@@ -220,6 +220,7 @@ static int imx_scu_ocotp_write(void *con
- 
- static struct nvmem_config imx_scu_ocotp_nvmem_config = {
- 	.name = "imx-scu-ocotp",
-+	.add_legacy_fixed_of_cells = true,
- 	.read_only = false,
- 	.word_size = 4,
- 	.stride = 1,
---- a/drivers/nvmem/imx-ocotp.c
-+++ b/drivers/nvmem/imx-ocotp.c
-@@ -615,6 +615,7 @@ static int imx_ocotp_probe(struct platfo
- 		return PTR_ERR(priv->clk);
- 
- 	priv->params = of_device_get_match_data(&pdev->dev);
-+	imx_ocotp_nvmem_config.add_legacy_fixed_of_cells = true;
- 	imx_ocotp_nvmem_config.size = 4 * priv->params->nregs;
- 	imx_ocotp_nvmem_config.dev = dev;
- 	imx_ocotp_nvmem_config.priv = priv;
---- a/drivers/nvmem/meson-efuse.c
-+++ b/drivers/nvmem/meson-efuse.c
-@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat
- 
- 	econfig->dev = dev;
- 	econfig->name = dev_name(dev);
-+	econfig->add_legacy_fixed_of_cells = true;
- 	econfig->stride = 1;
- 	econfig->word_size = 1;
- 	econfig->reg_read = meson_efuse_read;
---- a/drivers/nvmem/meson-mx-efuse.c
-+++ b/drivers/nvmem/meson-mx-efuse.c
-@@ -210,6 +210,7 @@ static int meson_mx_efuse_probe(struct p
- 	efuse->config.owner = THIS_MODULE;
- 	efuse->config.dev = &pdev->dev;
- 	efuse->config.priv = efuse;
-+	efuse->config.add_legacy_fixed_of_cells = true;
- 	efuse->config.stride = drvdata->word_size;
- 	efuse->config.word_size = drvdata->word_size;
- 	efuse->config.size = SZ_512;
---- a/drivers/nvmem/microchip-otpc.c
-+++ b/drivers/nvmem/microchip-otpc.c
-@@ -261,6 +261,7 @@ static int mchp_otpc_probe(struct platfo
- 		return ret;
- 
- 	mchp_nvmem_config.dev = otpc->dev;
-+	mchp_nvmem_config.add_legacy_fixed_of_cells = true;
- 	mchp_nvmem_config.size = size;
- 	mchp_nvmem_config.priv = otpc;
- 	nvmem = devm_nvmem_register(&pdev->dev, &mchp_nvmem_config);
---- a/drivers/nvmem/mtk-efuse.c
-+++ b/drivers/nvmem/mtk-efuse.c
-@@ -83,6 +83,7 @@ static int mtk_efuse_probe(struct platfo
- 		return PTR_ERR(priv->base);
- 
- 	pdata = device_get_match_data(dev);
-+	econfig.add_legacy_fixed_of_cells = true;
- 	econfig.stride = 1;
- 	econfig.word_size = 1;
- 	econfig.reg_read = mtk_reg_read;
---- a/drivers/nvmem/qcom-spmi-sdam.c
-+++ b/drivers/nvmem/qcom-spmi-sdam.c
-@@ -142,6 +142,7 @@ static int sdam_probe(struct platform_de
- 	sdam->sdam_config.name = "spmi_sdam";
- 	sdam->sdam_config.id = NVMEM_DEVID_AUTO;
- 	sdam->sdam_config.owner = THIS_MODULE;
-+	sdam->sdam_config.add_legacy_fixed_of_cells = true;
- 	sdam->sdam_config.stride = 1;
- 	sdam->sdam_config.word_size = 1;
- 	sdam->sdam_config.reg_read = sdam_read;
---- a/drivers/nvmem/qfprom.c
-+++ b/drivers/nvmem/qfprom.c
-@@ -357,6 +357,7 @@ static int qfprom_probe(struct platform_
- {
- 	struct nvmem_config econfig = {
- 		.name = "qfprom",
-+		.add_legacy_fixed_of_cells = true,
- 		.stride = 1,
- 		.word_size = 1,
- 		.id = NVMEM_DEVID_AUTO,
---- a/drivers/nvmem/rave-sp-eeprom.c
-+++ b/drivers/nvmem/rave-sp-eeprom.c
-@@ -328,6 +328,7 @@ static int rave_sp_eeprom_probe(struct p
- 	of_property_read_string(np, "zii,eeprom-name", &config.name);
- 	config.priv		= eeprom;
- 	config.dev		= dev;
-+	config.add_legacy_fixed_of_cells	= true;
- 	config.size		= size;
- 	config.reg_read		= rave_sp_eeprom_reg_read;
- 	config.reg_write	= rave_sp_eeprom_reg_write;
---- a/drivers/nvmem/rockchip-efuse.c
-+++ b/drivers/nvmem/rockchip-efuse.c
-@@ -205,6 +205,7 @@ static int rockchip_rk3399_efuse_read(vo
- 
- static struct nvmem_config econfig = {
- 	.name = "rockchip-efuse",
-+	.add_legacy_fixed_of_cells = true,
- 	.stride = 1,
- 	.word_size = 1,
- 	.read_only = true,
---- a/drivers/nvmem/sc27xx-efuse.c
-+++ b/drivers/nvmem/sc27xx-efuse.c
-@@ -247,6 +247,7 @@ static int sc27xx_efuse_probe(struct pla
- 	econfig.reg_read = sc27xx_efuse_read;
- 	econfig.priv = efuse;
- 	econfig.dev = &pdev->dev;
-+	econfig.add_legacy_fixed_of_cells = true;
- 	nvmem = devm_nvmem_register(&pdev->dev, &econfig);
- 	if (IS_ERR(nvmem)) {
- 		dev_err(&pdev->dev, "failed to register nvmem config\n");
---- a/drivers/nvmem/sec-qfprom.c
-+++ b/drivers/nvmem/sec-qfprom.c
-@@ -47,6 +47,7 @@ static int sec_qfprom_probe(struct platf
- {
- 	struct nvmem_config econfig = {
- 		.name = "sec-qfprom",
-+		.add_legacy_fixed_of_cells = true,
- 		.stride = 1,
- 		.word_size = 1,
- 		.id = NVMEM_DEVID_AUTO,
---- a/drivers/nvmem/sprd-efuse.c
-+++ b/drivers/nvmem/sprd-efuse.c
-@@ -408,6 +408,7 @@ static int sprd_efuse_probe(struct platf
- 	econfig.read_only = false;
- 	econfig.name = "sprd-efuse";
- 	econfig.size = efuse->data->blk_nums * SPRD_EFUSE_BLOCK_WIDTH;
-+	econfig.add_legacy_fixed_of_cells = true;
- 	econfig.reg_read = sprd_efuse_read;
- 	econfig.reg_write = sprd_efuse_write;
- 	econfig.priv = efuse;
---- a/drivers/nvmem/stm32-romem.c
-+++ b/drivers/nvmem/stm32-romem.c
-@@ -207,6 +207,7 @@ static int stm32_romem_probe(struct plat
- 	priv->cfg.priv = priv;
- 	priv->cfg.owner = THIS_MODULE;
- 	priv->cfg.type = NVMEM_TYPE_OTP;
-+	priv->cfg.add_legacy_fixed_of_cells = true;
- 
- 	priv->lower = 0;
- 
---- a/drivers/nvmem/sunplus-ocotp.c
-+++ b/drivers/nvmem/sunplus-ocotp.c
-@@ -145,6 +145,7 @@ disable_clk:
- 
- static struct nvmem_config sp_ocotp_nvmem_config = {
- 	.name = "sp-ocotp",
-+	.add_legacy_fixed_of_cells = true,
- 	.read_only = true,
- 	.word_size = 1,
- 	.size = QAC628_OTP_SIZE,
---- a/drivers/nvmem/sunxi_sid.c
-+++ b/drivers/nvmem/sunxi_sid.c
-@@ -153,6 +153,7 @@ static int sunxi_sid_probe(struct platfo
- 	nvmem_cfg->dev = dev;
- 	nvmem_cfg->name = "sunxi-sid";
- 	nvmem_cfg->type = NVMEM_TYPE_OTP;
-+	nvmem_cfg->add_legacy_fixed_of_cells = true;
- 	nvmem_cfg->read_only = true;
- 	nvmem_cfg->size = cfg->size;
- 	nvmem_cfg->word_size = 1;
---- a/drivers/nvmem/uniphier-efuse.c
-+++ b/drivers/nvmem/uniphier-efuse.c
-@@ -52,6 +52,7 @@ static int uniphier_efuse_probe(struct p
- 	econfig.size = resource_size(res);
- 	econfig.priv = priv;
- 	econfig.dev = dev;
-+	econfig.add_legacy_fixed_of_cells = true;
- 	nvmem = devm_nvmem_register(dev, &econfig);
- 
- 	return PTR_ERR_OR_ZERO(nvmem);
---- a/drivers/nvmem/zynqmp_nvmem.c
-+++ b/drivers/nvmem/zynqmp_nvmem.c
-@@ -58,6 +58,7 @@ static int zynqmp_nvmem_probe(struct pla
- 
- 	priv->dev = dev;
- 	econfig.dev = dev;
-+	econfig.add_legacy_fixed_of_cells = true;
- 	econfig.reg_read = zynqmp_nvmem_read;
- 	econfig.priv = priv;
- 
---- a/drivers/rtc/nvmem.c
-+++ b/drivers/rtc/nvmem.c
-@@ -21,6 +21,7 @@ int devm_rtc_nvmem_register(struct rtc_d
- 
- 	nvmem_config->dev = dev;
- 	nvmem_config->owner = rtc->owner;
-+	nvmem_config->add_legacy_fixed_of_cells = true;
- 	nvmem = devm_nvmem_register(dev, nvmem_config);
- 	if (IS_ERR(nvmem))
- 		dev_err(dev, "failed to register nvmem device for RTC\n");
---- a/drivers/w1/slaves/w1_ds250x.c
-+++ b/drivers/w1/slaves/w1_ds250x.c
-@@ -168,6 +168,7 @@ static int w1_eprom_add_slave(struct w1_
- 	struct nvmem_device *nvmem;
- 	struct nvmem_config nvmem_cfg = {
- 		.dev = &sl->dev,
-+		.add_legacy_fixed_of_cells = true,
- 		.reg_read = w1_nvmem_read,
- 		.type = NVMEM_TYPE_OTP,
- 		.read_only = true,
---- a/include/linux/nvmem-provider.h
-+++ b/include/linux/nvmem-provider.h
-@@ -82,6 +82,7 @@ struct nvmem_cell_info {
-  * @owner:	Pointer to exporter module. Used for refcounting.
-  * @cells:	Optional array of pre-defined NVMEM cells.
-  * @ncells:	Number of elements in cells.
-+ * @add_legacy_fixed_of_cells:	Read fixed NVMEM cells from old OF syntax.
-  * @keepout:	Optional array of keepout ranges (sorted ascending by start).
-  * @nkeepout:	Number of elements in the keepout array.
-  * @type:	Type of the nvmem storage
-@@ -112,6 +113,7 @@ struct nvmem_config {
- 	struct module		*owner;
- 	const struct nvmem_cell_info	*cells;
- 	int			ncells;
-+	bool			add_legacy_fixed_of_cells;
- 	const struct nvmem_keepout *keepout;
- 	unsigned int		nkeepout;
- 	enum nvmem_type		type;
diff --git a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
index 8a799679bf..cb93c96da6 100644
--- a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/property.h>
-@@ -3433,3 +3434,5 @@ static int __init regmap_initcall(void)
+@@ -3470,3 +3471,5 @@ static int __init regmap_initcall(void)
  	return 0;
  }
  postcore_initcall(regmap_initcall);
diff --git a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
index 69e19c3b47..89c98f6fbc 100644
--- a/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
+++ b/target/linux/generic/hack-6.6/711-net-dsa-mv88e6xxx-disable-ATU-violation.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] net/dsa/mv88e6xxx: disable ATU violation
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -3353,6 +3353,9 @@ static int mv88e6xxx_setup_port(struct m
+@@ -3365,6 +3365,9 @@ static int mv88e6xxx_setup_port(struct m
  	else
  		reg = 1 << port;
  
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 9b6358979c..b51a324027 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3080,6 +3080,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3095,6 +3095,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3245,16 +3249,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3260,16 +3264,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch b/target/linux/generic/pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch
deleted file mode 100644
index d9d15a4048..0000000000
--- a/target/linux/generic/pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Wed, 27 Mar 2024 23:18:51 +0100
-Subject: [PATCH] mtd: don't look for OTP legacy NVMEM cells if proper node
- doesn't exist
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If node with "user-otp" / "factory-otp" compatible doesn't exist it's
-important to prevent NVMEM core from looking for legacy NVMEM cells.
-Otherwise it would look for them in the device node.
-
-This fixes treating NAND controller attached chips as NVMEM cell.
-Problem example:
-[    0.410107] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xdc
-[    0.416531] nand: Macronix MX30LF4G18AC
-[    0.420409] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
-[    0.428022] iproc_nand 18028000.nand-controller: detected 512MiB total, 128KiB blocks, 2KiB pages, 16B OOB, 8-bit, BCH-8
-[    0.438991] Scanning device for bad blocks
-(...)
-[    2.848418] nvmem user-otp1: nvmem: invalid reg on /nand-controller at 18028000/nand at 0
-[    2.856126] iproc_nand 18028000.nand-controller: error -EINVAL: Failed to register OTP NVMEM device
-
-This long standing issue was exposed by the support for Macronix OTP.
-
-Reported-by: Christian Marangi <ansuelsmth at gmail.com>
-Fixes: 4b361cfa8624 ("mtd: core: add OTP nvmem provider support")
-Fixes: e87161321a40 ("mtd: rawnand: macronix: OTP access for MX30LFxG18AC")
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
- drivers/mtd/mtdcore.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -931,7 +931,7 @@ static struct nvmem_device *mtd_otp_nvme
- 	config.name = compatible;
- 	config.id = NVMEM_DEVID_AUTO;
- 	config.owner = THIS_MODULE;
--	config.add_legacy_fixed_of_cells = true;
-+	config.add_legacy_fixed_of_cells = !!np;
- 	config.type = NVMEM_TYPE_OTP;
- 	config.root_only = true;
- 	config.ignore_wp = true;
diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
index 31a40f1cdf..ce7db566e5 100644
--- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3047,7 +3047,7 @@ static inline int pskb_network_may_pull(
+@@ -3062,7 +3062,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch b/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
deleted file mode 100644
index 8361bb16a3..0000000000
--- a/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sat, 27 Apr 2024 18:54:25 +0200
-Subject: [PATCH] net: bridge: fix multicast-to-unicast with fraglist GSO
-
-Calling skb_copy on a SKB_GSO_FRAGLIST skb is not valid, since it returns
-an invalid linearized skb. This code only needs to change the ethernet
-header, so pskb_copy is the right function to call here.
-
-Fixes: 6db6f0eae605 ("bridge: multicast to unicast")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/bridge/br_forward.c
-+++ b/net/bridge/br_forward.c
-@@ -266,7 +266,7 @@ static void maybe_deliver_addr(struct ne
- 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
- 		return;
- 
--	skb = skb_copy(skb, GFP_ATOMIC);
-+	skb = pskb_copy(skb, GFP_ATOMIC);
- 	if (!skb) {
- 		DEV_STATS_INC(dev, tx_dropped);
- 		return;
diff --git a/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch b/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
deleted file mode 100644
index 215b4756ac..0000000000
--- a/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sat, 27 Apr 2024 19:29:45 +0200
-Subject: [PATCH] net: core: reject skb_copy(_expand) for fraglist GSO skbs
-
-SKB_GSO_FRAGLIST skbs must not be linearized, otherwise they become
-invalid. Return NULL if such an skb is passed to skb_copy or
-skb_copy_expand, in order to prevent a crash on a potential later
-call to skb_gso_segment.
-
-Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/core/skbuff.c
-+++ b/net/core/skbuff.c
-@@ -1971,11 +1971,17 @@ static inline int skb_alloc_rx_flag(cons
- 
- struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
- {
--	int headerlen = skb_headroom(skb);
--	unsigned int size = skb_end_offset(skb) + skb->data_len;
--	struct sk_buff *n = __alloc_skb(size, gfp_mask,
--					skb_alloc_rx_flag(skb), NUMA_NO_NODE);
-+	struct sk_buff *n;
-+	unsigned int size;
-+	int headerlen;
- 
-+	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
-+		return NULL;
-+
-+	headerlen = skb_headroom(skb);
-+	size = skb_end_offset(skb) + skb->data_len;
-+	n = __alloc_skb(size, gfp_mask,
-+			skb_alloc_rx_flag(skb), NUMA_NO_NODE);
- 	if (!n)
- 		return NULL;
- 
-@@ -2303,12 +2309,17 @@ struct sk_buff *skb_copy_expand(const st
- 	/*
- 	 *	Allocate the copy buffer
- 	 */
--	struct sk_buff *n = __alloc_skb(newheadroom + skb->len + newtailroom,
--					gfp_mask, skb_alloc_rx_flag(skb),
--					NUMA_NO_NODE);
--	int oldheadroom = skb_headroom(skb);
- 	int head_copy_len, head_copy_off;
-+	struct sk_buff *n;
-+	int oldheadroom;
-+
-+	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
-+		return NULL;
- 
-+	oldheadroom = skb_headroom(skb);
-+	n = __alloc_skb(newheadroom + skb->len + newtailroom,
-+			gfp_mask, skb_alloc_rx_flag(skb),
-+			NUMA_NO_NODE);
- 	if (!n)
- 		return NULL;
- 
diff --git a/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch b/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
deleted file mode 100644
index fb2fab24e3..0000000000
--- a/target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Sun, 5 May 2024 20:36:56 +0200
-Subject: [PATCH] net: bridge: fix corrupted ethernet header on
- multicast-to-unicast
-
-The change from skb_copy to pskb_copy unfortunately changed the data
-copying to omit the ethernet header, since it was pulled before reaching
-this point. Fix this by calling __skb_push/pull around pskb_copy.
-
-Fixes: 59c878cbcdd8 ("net: bridge: fix multicast-to-unicast with fraglist GSO")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/net/bridge/br_forward.c
-+++ b/net/bridge/br_forward.c
-@@ -258,6 +258,7 @@ static void maybe_deliver_addr(struct ne
- {
- 	struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
- 	const unsigned char *src = eth_hdr(skb)->h_source;
-+	struct sk_buff *nskb;
- 
- 	if (!should_deliver(p, skb))
- 		return;
-@@ -266,12 +267,16 @@ static void maybe_deliver_addr(struct ne
- 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
- 		return;
- 
--	skb = pskb_copy(skb, GFP_ATOMIC);
--	if (!skb) {
-+	__skb_push(skb, ETH_HLEN);
-+	nskb = pskb_copy(skb, GFP_ATOMIC);
-+	__skb_pull(skb, ETH_HLEN);
-+	if (!nskb) {
- 		DEV_STATS_INC(dev, tx_dropped);
- 		return;
- 	}
- 
-+	skb = nskb;
-+	__skb_pull(skb, ETH_HLEN);
- 	if (!is_broadcast_ether_addr(addr))
- 		memcpy(eth_hdr(skb)->h_dest, addr, ETH_ALEN);
- 
diff --git a/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
index dd5608b243..2e5d956437 100644
--- a/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
+++ b/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -134,7 +134,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		return -EMSGSIZE;
  
  	timerval = br_timer_value(&p->message_age_timer);
-@@ -901,6 +903,7 @@ static const struct nla_policy br_port_p
+@@ -902,6 +904,7 @@ static const struct nla_policy br_port_p
  	[IFLA_BRPORT_MCAST_MAX_GROUPS] = { .type = NLA_U32 },
  	[IFLA_BRPORT_NEIGH_VLAN_SUPPRESS] = NLA_POLICY_MAX(NLA_U8, 1),
  	[IFLA_BRPORT_BACKUP_NHID] = { .type = NLA_U32 },
@@ -142,7 +142,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  };
  
  /* Change the state of the port and notify spanning tree */
-@@ -969,6 +972,7 @@ static int br_setport(struct net_bridge_
+@@ -970,6 +973,7 @@ static int br_setport(struct net_bridge_
  	br_set_port_flag(p, tb, IFLA_BRPORT_MAB, BR_PORT_MAB);
  	br_set_port_flag(p, tb, IFLA_BRPORT_NEIGH_VLAN_SUPPRESS,
  			 BR_NEIGH_VLAN_SUPPRESS);
diff --git a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 28d89eb0fe..ea3c6c8fe9 100644
--- a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -6935,6 +6935,7 @@ static int mv88e6xxx_register_switch(str
+@@ -6947,6 +6947,7 @@ static int mv88e6xxx_register_switch(str
  	ds->ops = &mv88e6xxx_switch_ops;
  	ds->ageing_time_min = chip->info->age_time_coeff;
  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
diff --git a/target/linux/generic/pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch b/target/linux/generic/pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch
deleted file mode 100644
index a2c0edcbbf..0000000000
--- a/target/linux/generic/pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4a44a52f16ccd3d03e0cb5fb437a5eb31a5f9f05 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Mon, 26 Feb 2024 21:39:34 +0100
-Subject: [PATCH] net l2tp: drop flow hash on forward
-
-Drop the flow-hash of the skb when forwarding to the L2TP netdev.
-
-This avoids the L2TP qdisc from using the flow-hash from the outer
-packet, which is identical for every flow within the tunnel.
-
-This does not affect every platform but is specific for the ethernet
-driver. It depends on the platform including L4 information in the
-flow-hash.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- net/l2tp/l2tp_eth.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/net/l2tp/l2tp_eth.c
-+++ b/net/l2tp/l2tp_eth.c
-@@ -136,6 +136,9 @@ static void l2tp_eth_dev_recv(struct l2t
- 	/* checksums verified by L2TP */
- 	skb->ip_summed = CHECKSUM_NONE;
- 
-+	/* drop outer flow-hash */
-+	skb_clear_hash(skb);
-+
- 	skb_dst_drop(skb);
- 	nf_reset_ct(skb);
- 
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 97b41d29ad..f535ef2d89 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4642,6 +4642,9 @@ enum skb_ext_id {
+@@ -4657,6 +4657,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Thu May 30 03:08:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 06:08:30 -0400
Subject: [openwrt/openwrt]  generic: move accepted patches for mtk_eth_soc to
 backport-6.6
In-Reply-To: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
References: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
Message-ID: <mailman.39940.1717063719.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8730f9e5365956887b75632df29c4b2305cd82e4

commit 8730f9e5365956887b75632df29c4b2305cd82e4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 28 23:48:16 2024 +0100

    generic: move accepted patches for mtk_eth_soc to backport-6.6
    
    In preparation to update to upcoming Linux 6.6.33 move accepted patches
    from mediatek target to backport folder, so moving to newer Linux 6.6
    releases becomes easier and also other patches on top can be applied
    more easily.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...-mediatek-split-tx-and-rx-fields-in-mtk_.patch} | 102 +++++++++++----------
 ...-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch} |  35 ++++---
 ...t-mtk_eth_soc-compile-out-netsys-v2-code-.patch |   4 +-
 ...t-mtk_eth_soc-add-paths-and-SerDes-modes-.patch |   6 +-
 4 files changed, 79 insertions(+), 68 deletions(-)

diff --git a/target/linux/mediatek/patches-6.6/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch b/target/linux/generic/backport-6.6/751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
similarity index 83%
rename from target/linux/mediatek/patches-6.6/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
rename to target/linux/generic/backport-6.6/751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
index d4517af447..22aceecc53 100644
--- a/target/linux/mediatek/patches-6.6/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
+++ b/target/linux/generic/backport-6.6/751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
@@ -1,13 +1,19 @@
+From 5d0fad48d2dec175ecb999974b94203c577973ef Mon Sep 17 00:00:00 2001
 From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Thu, 2 Nov 2023 16:47:07 +0100
-Subject: [PATCH net-next 1/2] net: ethernet: mediatek: split tx and rx fields
- in mtk_soc_data struct
+Date: Wed, 8 May 2024 11:43:34 +0100
+Subject: [PATCH] net: ethernet: mediatek: split tx and rx fields in
+ mtk_soc_data struct
 
 Split tx and rx fields in mtk_soc_data struct. This is a preliminary
-patch to roll back to QDMA for MT7986 SoC in order to fix a hw hang
-if the device receives a corrupted packet.
+patch to roll back to ADMAv1 for MT7986 and MT7981 SoC in order to fix a
+hw hang if the device receives a corrupted packet when using ADMAv2.0.
 
+Fixes: 197c9e9b17b1 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset")
 Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Przemek Kitszel <przemyslaw.kitszel at intel.com>
+Link: https://lore.kernel.org/r/70a799b1f060ec2f57883e88ccb420ac0fb0abb5.1715164770.git.daniel at makrotopia.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 ---
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 210 ++++++++++++--------
  drivers/net/ethernet/mediatek/mtk_eth_soc.h |  29 +--
@@ -15,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1281,7 +1281,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1138,7 +1138,7 @@ static int mtk_init_fq_dma(struct mtk_et
  		eth->scratch_ring = eth->sram_base;
  	else
  		eth->scratch_ring = dma_alloc_coherent(eth->dma_dev,
@@ -24,7 +30,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  						       &eth->phy_scratch_ring,
  						       GFP_KERNEL);
  	if (unlikely(!eth->scratch_ring))
-@@ -1297,16 +1297,16 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1154,16 +1154,16 @@ static int mtk_init_fq_dma(struct mtk_et
  	if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr)))
  		return -ENOMEM;
  
@@ -44,7 +50,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  		txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
  		txd->txd4 = 0;
-@@ -1555,7 +1555,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1412,7 +1412,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	if (itxd == ring->last_free)
  		return -ENOMEM;
  
@@ -53,7 +59,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	memset(itx_buf, 0, sizeof(*itx_buf));
  
  	txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size,
-@@ -1596,7 +1596,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1453,7 +1453,7 @@ static int mtk_tx_map(struct sk_buff *sk
  
  			memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
  			txd_info.size = min_t(unsigned int, frag_size,
@@ -62,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			txd_info.qid = queue;
  			txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
  					!(frag_size - txd_info.size);
-@@ -1609,7 +1609,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1466,7 +1466,7 @@ static int mtk_tx_map(struct sk_buff *sk
  			mtk_tx_set_dma_desc(dev, txd, &txd_info);
  
  			tx_buf = mtk_desc_to_tx_buf(ring, txd,
@@ -71,7 +77,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			if (new_desc)
  				memset(tx_buf, 0, sizeof(*tx_buf));
  			tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
-@@ -1652,7 +1652,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1509,7 +1509,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	} else {
  		int next_idx;
  
@@ -80,7 +86,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  					 ring->dma_size);
  		mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0);
  	}
-@@ -1661,7 +1661,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1518,7 +1518,7 @@ static int mtk_tx_map(struct sk_buff *sk
  
  err_dma:
  	do {
@@ -89,7 +95,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  		/* unmap dma */
  		mtk_tx_unmap(eth, tx_buf, NULL, false);
-@@ -1686,7 +1686,7 @@ static int mtk_cal_txd_req(struct mtk_et
+@@ -1543,7 +1543,7 @@ static int mtk_cal_txd_req(struct mtk_et
  		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
  			frag = &skb_shinfo(skb)->frags[i];
  			nfrags += DIV_ROUND_UP(skb_frag_size(frag),
@@ -98,7 +104,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		}
  	} else {
  		nfrags += skb_shinfo(skb)->nr_frags;
-@@ -1827,7 +1827,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
+@@ -1650,7 +1650,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
  
  		ring = &eth->rx_ring[i];
  		idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@@ -107,7 +113,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (rxd->rxd2 & RX_DMA_DONE) {
  			ring->calc_idx_update = true;
  			return ring;
-@@ -1995,7 +1995,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1818,7 +1818,7 @@ static int mtk_xdp_submit_frame(struct m
  	}
  	htxd = txd;
  
@@ -116,7 +122,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	memset(tx_buf, 0, sizeof(*tx_buf));
  	htx_buf = tx_buf;
  
-@@ -2014,7 +2014,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1837,7 +1837,7 @@ static int mtk_xdp_submit_frame(struct m
  				goto unmap;
  
  			tx_buf = mtk_desc_to_tx_buf(ring, txd,
@@ -125,7 +131,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			memset(tx_buf, 0, sizeof(*tx_buf));
  			n_desc++;
  		}
-@@ -2052,7 +2052,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1875,7 +1875,7 @@ static int mtk_xdp_submit_frame(struct m
  	} else {
  		int idx;
  
@@ -134,7 +140,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size),
  			MT7628_TX_CTX_IDX0);
  	}
-@@ -2063,7 +2063,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1886,7 +1886,7 @@ static int mtk_xdp_submit_frame(struct m
  
  unmap:
  	while (htxd != txd) {
@@ -143,7 +149,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		mtk_tx_unmap(eth, tx_buf, NULL, false);
  
  		htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
-@@ -2194,7 +2194,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2017,7 +2017,7 @@ static int mtk_poll_rx(struct napi_struc
  			goto rx_done;
  
  		idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@@ -152,7 +158,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		data = ring->data[idx];
  
  		if (!mtk_rx_get_desc(eth, &trxd, rxd))
-@@ -2329,7 +2329,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2152,7 +2152,7 @@ static int mtk_poll_rx(struct napi_struc
  			rxdcsum = &trxd.rxd4;
  		}
  
@@ -161,7 +167,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			skb->ip_summed = CHECKSUM_UNNECESSARY;
  		else
  			skb_checksum_none_assert(skb);
-@@ -2453,7 +2453,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2276,7 +2276,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
  			break;
  
  		tx_buf = mtk_desc_to_tx_buf(ring, desc,
@@ -170,7 +176,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (!tx_buf->data)
  			break;
  
-@@ -2504,7 +2504,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -2327,7 +2327,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
  		}
  		mtk_tx_unmap(eth, tx_buf, &bq, true);
  
@@ -179,7 +185,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		ring->last_free = desc;
  		atomic_inc(&ring->free_count);
  
-@@ -2594,7 +2594,7 @@ static int mtk_napi_rx(struct napi_struc
+@@ -2417,7 +2417,7 @@ static int mtk_napi_rx(struct napi_struc
  	do {
  		int rx_done;
  
@@ -188,7 +194,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			reg_map->pdma.irq_status);
  		rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth);
  		rx_done_total += rx_done;
-@@ -2610,10 +2610,10 @@ static int mtk_napi_rx(struct napi_struc
+@@ -2433,10 +2433,10 @@ static int mtk_napi_rx(struct napi_struc
  			return budget;
  
  	} while (mtk_r32(eth, reg_map->pdma.irq_status) &
@@ -201,7 +207,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  	return rx_done_total;
  }
-@@ -2622,7 +2622,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2445,7 +2445,7 @@ static int mtk_tx_alloc(struct mtk_eth *
  {
  	const struct mtk_soc_data *soc = eth->soc;
  	struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -210,7 +216,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	struct mtk_tx_dma_v2 *txd;
  	int ring_size;
  	u32 ofs, val;
-@@ -2745,14 +2745,14 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -2568,14 +2568,14 @@ static void mtk_tx_clean(struct mtk_eth
  	}
  	if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) {
  		dma_free_coherent(eth->dma_dev,
@@ -227,7 +233,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  ring->dma_pdma, ring->phys_pdma);
  		ring->dma_pdma = NULL;
  	}
-@@ -2807,15 +2807,15 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2630,15 +2630,15 @@ static int mtk_rx_alloc(struct mtk_eth *
  	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) ||
  	    rx_flag != MTK_RX_FLAGS_NORMAL) {
  		ring->dma = dma_alloc_coherent(eth->dma_dev,
@@ -247,7 +253,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	}
  
  	if (!ring->dma)
-@@ -2826,7 +2826,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2649,7 +2649,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  		dma_addr_t dma_addr;
  		void *data;
  
@@ -256,7 +262,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (ring->page_pool) {
  			data = mtk_page_pool_get_buff(ring->page_pool,
  						      &dma_addr, GFP_KERNEL);
-@@ -2917,7 +2917,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2740,7 +2740,7 @@ static void mtk_rx_clean(struct mtk_eth
  			if (!ring->data[i])
  				continue;
  
@@ -265,7 +271,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			if (!rxd->rxd1)
  				continue;
  
-@@ -2934,7 +2934,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2757,7 +2757,7 @@ static void mtk_rx_clean(struct mtk_eth
  
  	if (!in_sram && ring->dma) {
  		dma_free_coherent(eth->dma_dev,
@@ -274,7 +280,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  ring->dma, ring->phys);
  		ring->dma = NULL;
  	}
-@@ -3297,7 +3297,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -3120,7 +3120,7 @@ static void mtk_dma_free(struct mtk_eth
  			netdev_reset_queue(eth->netdev[i]);
  	if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
  		dma_free_coherent(eth->dma_dev,
@@ -283,7 +289,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  eth->scratch_ring, eth->phy_scratch_ring);
  		eth->scratch_ring = NULL;
  		eth->phy_scratch_ring = 0;
-@@ -3347,7 +3347,7 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -3170,7 +3170,7 @@ static irqreturn_t mtk_handle_irq_rx(int
  
  	eth->rx_events++;
  	if (likely(napi_schedule_prep(&eth->rx_napi))) {
@@ -292,7 +298,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		__napi_schedule(&eth->rx_napi);
  	}
  
-@@ -3373,9 +3373,9 @@ static irqreturn_t mtk_handle_irq(int ir
+@@ -3196,9 +3196,9 @@ static irqreturn_t mtk_handle_irq(int ir
  	const struct mtk_reg_map *reg_map = eth->soc->reg_map;
  
  	if (mtk_r32(eth, reg_map->pdma.irq_mask) &
@@ -304,7 +310,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mtk_handle_irq_rx(irq, _eth);
  	}
  	if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
-@@ -3393,10 +3393,10 @@ static void mtk_poll_controller(struct n
+@@ -3216,10 +3216,10 @@ static void mtk_poll_controller(struct n
  	struct mtk_eth *eth = mac->hw;
  
  	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -317,7 +323,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  }
  #endif
  
-@@ -3563,7 +3563,7 @@ static int mtk_open(struct net_device *d
+@@ -3383,7 +3383,7 @@ static int mtk_open(struct net_device *d
  		napi_enable(&eth->tx_napi);
  		napi_enable(&eth->rx_napi);
  		mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@@ -326,7 +332,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		refcount_set(&eth->dma_refcnt, 1);
  	}
  	else
-@@ -3647,7 +3647,7 @@ static int mtk_stop(struct net_device *d
+@@ -3467,7 +3467,7 @@ static int mtk_stop(struct net_device *d
  	mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
  
  	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -335,7 +341,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	napi_disable(&eth->tx_napi);
  	napi_disable(&eth->rx_napi);
  
-@@ -4126,9 +4126,9 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3943,9 +3943,9 @@ static int mtk_hw_init(struct mtk_eth *e
  
  	/* FE int grouping */
  	mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
@@ -347,7 +353,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
  
  	if (mtk_is_netsys_v3_or_greater(eth)) {
-@@ -5305,11 +5305,15 @@ static const struct mtk_soc_data mt2701_
+@@ -5037,11 +5037,15 @@ static const struct mtk_soc_data mt2701_
  	.required_clks = MT7623_CLKS_BITMAP,
  	.required_pctl = true,
  	.version = 1,
@@ -368,7 +374,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5325,11 +5329,15 @@ static const struct mtk_soc_data mt7621_
+@@ -5057,11 +5061,15 @@ static const struct mtk_soc_data mt7621_
  	.offload_version = 1,
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -389,7 +395,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5347,11 +5355,15 @@ static const struct mtk_soc_data mt7622_
+@@ -5079,11 +5087,15 @@ static const struct mtk_soc_data mt7622_
  	.hash_offset = 2,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -410,7 +416,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5368,11 +5380,15 @@ static const struct mtk_soc_data mt7623_
+@@ -5100,11 +5112,15 @@ static const struct mtk_soc_data mt7623_
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
  	.disable_pll_modes = true,
@@ -431,7 +437,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5387,11 +5403,15 @@ static const struct mtk_soc_data mt7629_
+@@ -5119,11 +5135,15 @@ static const struct mtk_soc_data mt7629_
  	.required_pctl = false,
  	.has_accounting = true,
  	.version = 1,
@@ -452,7 +458,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5409,11 +5429,15 @@ static const struct mtk_soc_data mt7981_
+@@ -5141,11 +5161,15 @@ static const struct mtk_soc_data mt7981_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@@ -473,7 +479,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5431,11 +5455,15 @@ static const struct mtk_soc_data mt7986_
+@@ -5163,11 +5187,15 @@ static const struct mtk_soc_data mt7986_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@@ -494,7 +500,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5453,11 +5481,15 @@ static const struct mtk_soc_data mt7988_
+@@ -5185,11 +5213,15 @@ static const struct mtk_soc_data mt7988_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
@@ -515,7 +521,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5470,11 +5502,15 @@ static const struct mtk_soc_data rt5350_
+@@ -5202,11 +5234,15 @@ static const struct mtk_soc_data rt5350_
  	.required_clks = MT7628_CLKS_BITMAP,
  	.required_pctl = false,
  	.version = 1,
@@ -560,7 +566,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  #define RX_DMA_VTAG		BIT(15)
  #define RX_DMA_ADDR64_MASK	GENMASK(3, 0)
  #if IS_ENABLED(CONFIG_64BIT)
-@@ -1209,10 +1209,9 @@ struct mtk_reg_map {
+@@ -1153,10 +1153,9 @@ struct mtk_reg_map {
   * @foe_entry_size		Foe table entry size.
   * @has_accounting		Bool indicating support for accounting of
   *				offloaded flows.
@@ -574,7 +580,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
   * @dma_max_len			Max DMA tx/rx buffer length.
   * @dma_len_offset		Tx/Rx DMA length field offset.
   */
-@@ -1230,13 +1229,17 @@ struct mtk_soc_data {
+@@ -1174,13 +1173,17 @@ struct mtk_soc_data {
  	bool		has_accounting;
  	bool		disable_pll_modes;
  	struct {
diff --git a/target/linux/mediatek/patches-6.6/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch b/target/linux/generic/backport-6.6/751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
similarity index 71%
rename from target/linux/mediatek/patches-6.6/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
rename to target/linux/generic/backport-6.6/751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
index 6b84f70110..e71ff0923c 100644
--- a/target/linux/mediatek/patches-6.6/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
+++ b/target/linux/generic/backport-6.6/751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
@@ -1,23 +1,28 @@
+From 4d572e867bdb372bb4add39a0fa495c6a9c9a8da Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
-Date: Tue, 10 Oct 2023 21:06:43 +0200
-Subject: [PATCH net-next 2/2] net: ethernet: mediatek: use QDMA instead of
- ADMAv2 on MT7981 and MT7986
+Date: Wed, 8 May 2024 11:43:56 +0100
+Subject: [PATCH] net: ethernet: mediatek: use ADMAv1 instead of ADMAv2.0 on
+ MT7981 and MT7986
 
-ADMA is plagued by RX hangs which can't easily detected and happen upon
-receival of a corrupted package.
-Use QDMA just like on netsys v1 which is also still present and usable, and
-doesn't suffer from that problem.
+ADMAv2.0 is plagued by RX hangs which can't easily detected and happen upon
+receival of a corrupted Ethernet frame.
 
+Use ADMAv1 instead which is also still present and usable, and doesn't
+suffer from that problem.
+
+Fixes: 197c9e9b17b1 ("net: ethernet: mtk_eth_soc: introduce support for mt7986 chipset")
 Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
 Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Link: https://lore.kernel.org/r/57cef74bbd0c243366ad1ff4221e3f72f437ec80.1715164770.git.daniel at makrotopia.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 ---
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 46 ++++++++++-----------
  1 file changed, 23 insertions(+), 23 deletions(-)
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -113,16 +113,16 @@ static const struct mtk_reg_map mt7986_r
+@@ -110,16 +110,16 @@ static const struct mtk_reg_map mt7986_r
  	.tx_irq_mask		= 0x461c,
  	.tx_irq_status		= 0x4618,
  	.pdma = {
@@ -44,7 +49,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	},
  	.qdma = {
  		.qtx_cfg	= 0x4400,
-@@ -1249,7 +1249,7 @@ static bool mtk_rx_get_desc(struct mtk_e
+@@ -1106,7 +1106,7 @@ static bool mtk_rx_get_desc(struct mtk_e
  	rxd->rxd1 = READ_ONCE(dma_rxd->rxd1);
  	rxd->rxd3 = READ_ONCE(dma_rxd->rxd3);
  	rxd->rxd4 = READ_ONCE(dma_rxd->rxd4);
@@ -53,7 +58,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		rxd->rxd5 = READ_ONCE(dma_rxd->rxd5);
  		rxd->rxd6 = READ_ONCE(dma_rxd->rxd6);
  	}
-@@ -2201,7 +2201,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2024,7 +2024,7 @@ static int mtk_poll_rx(struct napi_struc
  			break;
  
  		/* find out which mac the packet come from. values start at 1 */
@@ -62,7 +67,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5);
  
  			switch (val) {
-@@ -2313,7 +2313,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2136,7 +2136,7 @@ static int mtk_poll_rx(struct napi_struc
  		skb->dev = netdev;
  		bytes += skb->len;
  
@@ -71,7 +76,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5);
  			hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY;
  			if (hash != MTK_RXD5_FOE_ENTRY)
-@@ -2863,7 +2863,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2686,7 +2686,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  
  		rxd->rxd3 = 0;
  		rxd->rxd4 = 0;
@@ -80,7 +85,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			rxd->rxd5 = 0;
  			rxd->rxd6 = 0;
  			rxd->rxd7 = 0;
-@@ -4072,7 +4072,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3889,7 +3889,7 @@ static int mtk_hw_init(struct mtk_eth *e
  	else
  		mtk_hw_reset(eth);
  
@@ -89,7 +94,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		/* Set FE to PDMAv2 if necessary */
  		val = mtk_r32(eth, MTK_FE_GLO_MISC);
  		mtk_w32(eth,  val | BIT(4), MTK_FE_GLO_MISC);
-@@ -5435,11 +5435,11 @@ static const struct mtk_soc_data mt7981_
+@@ -5167,11 +5167,11 @@ static const struct mtk_soc_data mt7981_
  		.dma_len_offset = 8,
  	},
  	.rx = {
@@ -105,7 +110,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	},
  };
  
-@@ -5461,11 +5461,11 @@ static const struct mtk_soc_data mt7986_
+@@ -5193,11 +5193,11 @@ static const struct mtk_soc_data mt7986_
  		.dma_len_offset = 8,
  	},
  	.rx = {
diff --git a/target/linux/generic/pending-6.6/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch b/target/linux/generic/pending-6.6/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch
index decf647bce..36abf45798 100644
--- a/target/linux/generic/pending-6.6/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch
+++ b/target/linux/generic/pending-6.6/732-00-net-ethernet-mtk_eth_soc-compile-out-netsys-v2-code-.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -1326,6 +1326,22 @@ struct mtk_mac {
+@@ -1329,6 +1329,22 @@ struct mtk_mac {
  /* the struct describing the SoC. these are declared in the soc_xyz.c files */
  extern const struct of_device_id of_mtk_match[];
  
@@ -34,7 +34,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static inline bool mtk_is_netsys_v1(struct mtk_eth *eth)
  {
  	return eth->soc->version == 1;
-@@ -1340,6 +1356,7 @@ static inline bool mtk_is_netsys_v3_or_g
+@@ -1343,6 +1359,7 @@ static inline bool mtk_is_netsys_v3_or_g
  {
  	return eth->soc->version > 2;
  }
diff --git a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
index aedeedece9..a52213d87a 100644
--- a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
+++ b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
@@ -893,7 +893,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  struct mtk_tx_dma_desc_info {
  	dma_addr_t	addr;
-@@ -1314,6 +1371,9 @@ struct mtk_mac {
+@@ -1317,6 +1374,9 @@ struct mtk_mac {
  	struct device_node		*of_node;
  	struct phylink			*phylink;
  	struct phylink_config		phylink_config;
@@ -903,7 +903,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	struct mtk_eth			*hw;
  	struct mtk_hw_stats		*hw_stats;
  	__be32				hwlro_ip[MTK_MAX_LRO_IP_CNT];
-@@ -1437,6 +1497,19 @@ static inline u32 mtk_get_ib2_multicast_
+@@ -1440,6 +1500,19 @@ static inline u32 mtk_get_ib2_multicast_
  	return MTK_FOE_IB2_MULTICAST;
  }
  
@@ -923,7 +923,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  /* read the hardware status register */
  void mtk_stats_update_mac(struct mtk_mac *mac);
  
-@@ -1445,8 +1518,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
+@@ -1448,8 +1521,10 @@ u32 mtk_r32(struct mtk_eth *eth, unsigne
  u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg);
  
  int mtk_gmac_sgmii_path_setup(struct mtk_eth *eth, int mac_id);



From lede-commits at lists.infradead.org  Thu May 30 03:08:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 06:08:31 -0400
Subject: [openwrt/openwrt]  generic: backport accepted and pending patches for
 mtk_eth_soc
In-Reply-To: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
References: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
Message-ID: <mailman.39941.1717063720.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f3d2829b51f366840e93f21f3c1c76d07ec28fba

commit f3d2829b51f366840e93f21f3c1c76d07ec28fba
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed May 29 02:41:30 2024 +0100

    generic: backport accepted and pending patches for mtk_eth_soc
    
    Backport a bunch of fixes and improvements for WED and PPE, mostly
    for MT7988.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...t-mtk_wed-fix-firmware-loading-for-MT7986.patch | 113 +++++++++++++++++++++
 ...t-mtk_wed-remove-wo-pointer-in-wo_r32-wo_.patch |  51 ++++++++++
 ...t-mtk_wed-rely-on-__dev_alloc_page-in-mtk.patch |  26 +++++
 ...t-mtk_wed-add-support-for-devices-with-mo.patch |  91 +++++++++++++++++
 ...ethernet-mtk_eth_soc-enable-threaded-NAPI.patch |   2 +-
 ...t-mtk_eth_soc-work-around-issue-with-send.patch |   6 +-
 ...t-mtk_eth_soc-add-paths-and-SerDes-modes-.patch |  18 ++--
 ...t-mtk_wed-rename-mtk_wed_get_memory_regio.patch |   2 +-
 ...t-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch |  32 +++++-
 ...net-mtk_wed-move-ilm-a-dedicated-dts-node.patch |   4 +-
 ...net-mtk_wed-move-dlm-a-dedicated-dts-node.patch |   4 +-
 11 files changed, 326 insertions(+), 23 deletions(-)

diff --git a/target/linux/generic/backport-6.6/752-21-v6.7-net-ethernet-mtk_wed-fix-firmware-loading-for-MT7986.patch b/target/linux/generic/backport-6.6/752-21-v6.7-net-ethernet-mtk_wed-fix-firmware-loading-for-MT7986.patch
new file mode 100644
index 0000000000..3b0795c536
--- /dev/null
+++ b/target/linux/generic/backport-6.6/752-21-v6.7-net-ethernet-mtk_wed-fix-firmware-loading-for-MT7986.patch
@@ -0,0 +1,113 @@
+From 52ea72ad0daa0f29535b4cef39257616c5a211d3 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 24 Oct 2023 00:00:19 +0200
+Subject: [PATCH 1/5] net: ethernet: mtk_wed: fix firmware loading for MT7986
+ SoC
+
+The WED mcu firmware does not contain all the memory regions defined in
+the dts reserved_memory node (e.g. MT7986 WED firmware does not contain
+cpu-boot region).
+Reverse the mtk_wed_mcu_run_firmware() logic to check all the fw
+sections are defined in the dts reserved_memory node.
+
+Fixes: c6d961aeaa77 ("net: ethernet: mtk_wed: move mem_region array out of mtk_wed_mcu_load_firmware")
+Tested-by: Frank Wunderlich <frank-w at public-files.de>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Jacob Keller <jacob.e.keller at intel.com>
+Link: https://lore.kernel.org/r/d983cbfe8ea562fef9264de8f0c501f7d5705bd5.1698098381.git.lorenzo at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 48 +++++++++++----------
+ 1 file changed, 25 insertions(+), 23 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -258,16 +258,12 @@ mtk_wed_get_memory_region(struct mtk_wed
+ }
+ 
+ static int
+-mtk_wed_mcu_run_firmware(struct mtk_wed_wo *wo, const struct firmware *fw,
+-			 struct mtk_wed_wo_memory_region *region)
++mtk_wed_mcu_run_firmware(struct mtk_wed_wo *wo, const struct firmware *fw)
+ {
+ 	const u8 *first_region_ptr, *region_ptr, *trailer_ptr, *ptr = fw->data;
+ 	const struct mtk_wed_fw_trailer *trailer;
+ 	const struct mtk_wed_fw_region *fw_region;
+ 
+-	if (!region->phy_addr || !region->size)
+-		return 0;
+-
+ 	trailer_ptr = fw->data + fw->size - sizeof(*trailer);
+ 	trailer = (const struct mtk_wed_fw_trailer *)trailer_ptr;
+ 	region_ptr = trailer_ptr - trailer->num_region * sizeof(*fw_region);
+@@ -275,33 +271,41 @@ mtk_wed_mcu_run_firmware(struct mtk_wed_
+ 
+ 	while (region_ptr < trailer_ptr) {
+ 		u32 length;
++		int i;
+ 
+ 		fw_region = (const struct mtk_wed_fw_region *)region_ptr;
+ 		length = le32_to_cpu(fw_region->len);
+-
+-		if (region->phy_addr != le32_to_cpu(fw_region->addr))
+-			goto next;
+-
+-		if (region->size < length)
+-			goto next;
+-
+ 		if (first_region_ptr < ptr + length)
+ 			goto next;
+ 
+-		if (region->shared && region->consumed)
+-			return 0;
++		for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
++			struct mtk_wed_wo_memory_region *region;
+ 
+-		if (!region->shared || !region->consumed) {
+-			memcpy_toio(region->addr, ptr, length);
+-			region->consumed = true;
+-			return 0;
++			region = &mem_region[i];
++			if (region->phy_addr != le32_to_cpu(fw_region->addr))
++				continue;
++
++			if (region->size < length)
++				continue;
++
++			if (region->shared && region->consumed)
++				break;
++
++			if (!region->shared || !region->consumed) {
++				memcpy_toio(region->addr, ptr, length);
++				region->consumed = true;
++				break;
++			}
+ 		}
++
++		if (i == ARRAY_SIZE(mem_region))
++			return -EINVAL;
+ next:
+ 		region_ptr += sizeof(*fw_region);
+ 		ptr += length;
+ 	}
+ 
+-	return -EINVAL;
++	return 0;
+ }
+ 
+ static int
+@@ -360,11 +364,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 	dev_info(wo->hw->dev, "MTK WED WO Chip ID %02x Region %d\n",
+ 		 trailer->chip_id, trailer->num_region);
+ 
+-	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
+-		ret = mtk_wed_mcu_run_firmware(wo, fw, &mem_region[i]);
+-		if (ret)
+-			goto out;
+-	}
++	ret = mtk_wed_mcu_run_firmware(wo, fw);
++	if (ret)
++		goto out;
+ 
+ 	/* set the start address */
+ 	if (!mtk_wed_is_v3_or_greater(wo->hw) && wo->hw->index)
diff --git a/target/linux/generic/backport-6.6/752-22-v6.7-net-ethernet-mtk_wed-remove-wo-pointer-in-wo_r32-wo_.patch b/target/linux/generic/backport-6.6/752-22-v6.7-net-ethernet-mtk_wed-remove-wo-pointer-in-wo_r32-wo_.patch
new file mode 100644
index 0000000000..c1bb3f5b02
--- /dev/null
+++ b/target/linux/generic/backport-6.6/752-22-v6.7-net-ethernet-mtk_wed-remove-wo-pointer-in-wo_r32-wo_.patch
@@ -0,0 +1,51 @@
+From 7aa8defd3495208289abcc629946af26a2af3391 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 24 Oct 2023 00:01:30 +0200
+Subject: [PATCH 2/5] net: ethernet: mtk_wed: remove wo pointer in
+ wo_r32/wo_w32 signature
+
+wo pointer is no longer used in wo_r32 and wo_w32 routines so get rid of
+it.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/530537db0872f7523deff21f0a5dfdd9b75fdc9d.1698098459.git.lorenzo at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/mediatek/mtk_wed_mcu.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -32,12 +32,12 @@ static struct mtk_wed_wo_memory_region m
+ 	},
+ };
+ 
+-static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
++static u32 wo_r32(u32 reg)
+ {
+ 	return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
+ }
+ 
+-static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
++static void wo_w32(u32 reg, u32 val)
+ {
+ 	writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
+ }
+@@ -373,13 +373,13 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 		boot_cr = MTK_WO_MCU_CFG_LS_WA_BOOT_ADDR_ADDR;
+ 	else
+ 		boot_cr = MTK_WO_MCU_CFG_LS_WM_BOOT_ADDR_ADDR;
+-	wo_w32(wo, boot_cr, mem_region[MTK_WED_WO_REGION_EMI].phy_addr >> 16);
++	wo_w32(boot_cr, mem_region[MTK_WED_WO_REGION_EMI].phy_addr >> 16);
+ 	/* wo firmware reset */
+-	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
++	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
+ 
+-	val = wo_r32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
++	val = wo_r32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
+ 	      MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
+-	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
++	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
+ out:
+ 	release_firmware(fw);
+ 
diff --git a/target/linux/generic/backport-6.6/752-23-v6.8-net-ethernet-mtk_wed-rely-on-__dev_alloc_page-in-mtk.patch b/target/linux/generic/backport-6.6/752-23-v6.8-net-ethernet-mtk_wed-rely-on-__dev_alloc_page-in-mtk.patch
new file mode 100644
index 0000000000..7cbf6bd732
--- /dev/null
+++ b/target/linux/generic/backport-6.6/752-23-v6.8-net-ethernet-mtk_wed-rely-on-__dev_alloc_page-in-mtk.patch
@@ -0,0 +1,26 @@
+From 65aacd457eaf5d0c958ed8030ec46f99ea808dd9 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Fri, 17 Nov 2023 17:39:22 +0100
+Subject: [PATCH 3/5] net: ethernet: mtk_wed: rely on __dev_alloc_page in
+ mtk_wed_tx_buffer_alloc
+
+Simplify the code and use __dev_alloc_page() instead of __dev_alloc_pages()
+with order 0 in mtk_wed_tx_buffer_alloc routine
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/ethernet/mediatek/mtk_wed.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -670,7 +670,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 		void *buf;
+ 		int s;
+ 
+-		page = __dev_alloc_pages(GFP_KERNEL, 0);
++		page = __dev_alloc_page(GFP_KERNEL);
+ 		if (!page)
+ 			return -ENOMEM;
+ 
diff --git a/target/linux/generic/backport-6.6/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch b/target/linux/generic/backport-6.6/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch
new file mode 100644
index 0000000000..b08f3aaadd
--- /dev/null
+++ b/target/linux/generic/backport-6.6/752-24-v6.8-net-ethernet-mtk_wed-add-support-for-devices-with-mo.patch
@@ -0,0 +1,91 @@
+From 5f5997322584b6257543d4d103f81484b8006d84 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Fri, 17 Nov 2023 17:42:59 +0100
+Subject: [PATCH 4/5] net: ethernet: mtk_wed: add support for devices with more
+ than 4GB of dram
+
+Introduce WED offloading support for boards with more than 4GB of
+memory.
+
+Co-developed-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/1c7efdf5d384ea7af3c0209723e40b2ee0f956bf.1700239272.git.lorenzo at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 ++++-
+ drivers/net/ethernet/mediatek/mtk_wed.c     | 8 +++++---
+ drivers/net/ethernet/mediatek/mtk_wed_wo.c  | 3 ++-
+ 3 files changed, 11 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1158,15 +1158,18 @@ static int mtk_init_fq_dma(struct mtk_et
+ 	phy_ring_tail = eth->phy_scratch_ring + soc->tx.desc_size * (cnt - 1);
+ 
+ 	for (i = 0; i < cnt; i++) {
++		dma_addr_t addr = dma_addr + i * MTK_QDMA_PAGE_SIZE;
+ 		struct mtk_tx_dma_v2 *txd;
+ 
+ 		txd = eth->scratch_ring + i * soc->tx.desc_size;
+-		txd->txd1 = dma_addr + i * MTK_QDMA_PAGE_SIZE;
++		txd->txd1 = addr;
+ 		if (i < cnt - 1)
+ 			txd->txd2 = eth->phy_scratch_ring +
+ 				    (i + 1) * soc->tx.desc_size;
+ 
+ 		txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
++		if (MTK_HAS_CAPS(soc->caps, MTK_36BIT_DMA))
++			txd->txd3 |= TX_DMA_PREP_ADDR64(addr);
+ 		txd->txd4 = 0;
+ 		if (mtk_is_netsys_v2_or_greater(eth)) {
+ 			txd->txd5 = 0;
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -691,10 +691,11 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 
+ 		for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) {
+ 			struct mtk_wdma_desc *desc = desc_ptr;
++			u32 ctrl;
+ 
+ 			desc->buf0 = cpu_to_le32(buf_phys);
+ 			if (!mtk_wed_is_v3_or_greater(dev->hw)) {
+-				u32 txd_size, ctrl;
++				u32 txd_size;
+ 
+ 				txd_size = dev->wlan.init_buf(buf, buf_phys,
+ 							      token++);
+@@ -708,11 +709,11 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 					ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG0 |
+ 						FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2,
+ 							   MTK_WED_BUF_SIZE - txd_size);
+-				desc->ctrl = cpu_to_le32(ctrl);
+ 				desc->info = 0;
+ 			} else {
+-				desc->ctrl = cpu_to_le32(token << 16);
++				ctrl = token << 16 | TX_DMA_PREP_ADDR64(buf_phys);
+ 			}
++			desc->ctrl = cpu_to_le32(ctrl);
+ 
+ 			desc_ptr += desc_size;
+ 			buf += MTK_WED_BUF_SIZE;
+@@ -811,6 +812,7 @@ mtk_wed_hwrro_buffer_alloc(struct mtk_we
+ 		buf_phys = page_phys;
+ 		for (s = 0; s < MTK_WED_RX_BUF_PER_PAGE; s++) {
+ 			desc->buf0 = cpu_to_le32(buf_phys);
++			desc->token = cpu_to_le32(RX_DMA_PREP_ADDR64(buf_phys));
+ 			buf_phys += MTK_WED_PAGE_BUF_SIZE;
+ 			desc++;
+ 		}
+--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.c
+@@ -142,7 +142,8 @@ mtk_wed_wo_queue_refill(struct mtk_wed_w
+ 		dma_addr_t addr;
+ 		void *buf;
+ 
+-		buf = page_frag_alloc(&q->cache, q->buf_size, GFP_ATOMIC);
++		buf = page_frag_alloc(&q->cache, q->buf_size,
++				      GFP_ATOMIC | GFP_DMA32);
+ 		if (!buf)
+ 			break;
+ 
diff --git a/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
index e73cf9a899..ca5fe771d1 100644
--- a/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
+++ b/target/linux/generic/pending-6.6/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4981,6 +4981,8 @@ static int mtk_probe(struct platform_dev
+@@ -4984,6 +4984,8 @@ static int mtk_probe(struct platform_dev
  	 * for NAPI to work
  	 */
  	init_dummy_netdev(&eth->dummy_dev);
diff --git a/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
index a64561bf92..438f83953a 100644
--- a/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
+++ b/target/linux/generic/pending-6.6/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
@@ -24,7 +24,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <net/page_pool/helpers.h>
  
  #include "mtk_eth_soc.h"
-@@ -1578,12 +1579,28 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1581,12 +1582,28 @@ static void mtk_wake_queue(struct mtk_et
  	}
  }
  
@@ -53,7 +53,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	bool gso = false;
  	int tx_num;
  
-@@ -1605,6 +1622,18 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1608,6 +1625,18 @@ static netdev_tx_t mtk_start_xmit(struct
  		return NETDEV_TX_BUSY;
  	}
  
@@ -72,7 +72,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	/* TSO: fill MSS info in tcp checksum field */
  	if (skb_is_gso(skb)) {
  		if (skb_cow_head(skb, 0)) {
-@@ -1620,8 +1649,14 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1623,8 +1652,14 @@ static netdev_tx_t mtk_start_xmit(struct
  		}
  	}
  
diff --git a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
index a52213d87a..ba7699ecad 100644
--- a/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
+++ b/target/linux/generic/pending-6.6/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
@@ -490,7 +490,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	.mac_finish = mtk_mac_finish,
  	.mac_link_down = mtk_mac_link_down,
  	.mac_link_up = mtk_mac_link_up,
-@@ -3390,6 +3531,9 @@ static int mtk_open(struct net_device *d
+@@ -3393,6 +3534,9 @@ static int mtk_open(struct net_device *d
  	struct mtk_eth *eth = mac->hw;
  	int i, err;
  
@@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
  	if (err) {
  		netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3519,6 +3663,9 @@ static int mtk_stop(struct net_device *d
+@@ -3522,6 +3666,9 @@ static int mtk_stop(struct net_device *d
  	for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
  		mtk_ppe_stop(eth->ppe[i]);
  
@@ -510,7 +510,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	return 0;
  }
  
-@@ -4516,6 +4663,7 @@ static const struct net_device_ops mtk_n
+@@ -4519,6 +4666,7 @@ static const struct net_device_ops mtk_n
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
  	const __be32 *_id = of_get_property(np, "reg", NULL);
@@ -518,7 +518,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	phy_interface_t phy_mode;
  	struct phylink *phylink;
  	struct mtk_mac *mac;
-@@ -4552,16 +4700,41 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4555,16 +4703,41 @@ static int mtk_add_mac(struct mtk_eth *e
  	mac->id = id;
  	mac->hw = eth;
  	mac->of_node = np;
@@ -568,7 +568,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	}
  
  	memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
-@@ -4644,8 +4817,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4647,8 +4820,21 @@ static int mtk_add_mac(struct mtk_eth *e
  		phy_interface_zero(mac->phylink_config.supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  mac->phylink_config.supported_interfaces);
@@ -590,7 +590,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	phylink = phylink_create(&mac->phylink_config,
  				 of_fwnode_handle(mac->of_node),
  				 phy_mode, &mtk_phylink_ops);
-@@ -4696,6 +4882,26 @@ free_netdev:
+@@ -4699,6 +4885,26 @@ free_netdev:
  	return err;
  }
  
@@ -617,7 +617,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
  {
  	struct net_device *dev, *tmp;
-@@ -4842,7 +5048,8 @@ static int mtk_probe(struct platform_dev
+@@ -4845,7 +5051,8 @@ static int mtk_probe(struct platform_dev
  			regmap_write(cci, 0, 3);
  	}
  
@@ -627,7 +627,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		err = mtk_sgmii_init(eth);
  
  		if (err)
-@@ -4953,6 +5160,24 @@ static int mtk_probe(struct platform_dev
+@@ -4956,6 +5163,24 @@ static int mtk_probe(struct platform_dev
  		}
  	}
  
@@ -652,7 +652,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
  		err = devm_request_irq(eth->dev, eth->irq[0],
  				       mtk_handle_irq, 0,
-@@ -5055,6 +5280,11 @@ static int mtk_remove(struct platform_de
+@@ -5058,6 +5283,11 @@ static int mtk_remove(struct platform_de
  		mtk_stop(eth->netdev[i]);
  		mac = netdev_priv(eth->netdev[i]);
  		phylink_disconnect_phy(mac->phylink);
diff --git a/target/linux/mediatek/patches-6.6/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch b/target/linux/mediatek/patches-6.6/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
index 30be53518a..465f0eaf27 100644
--- a/target/linux/mediatek/patches-6.6/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
+++ b/target/linux/mediatek/patches-6.6/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
@@ -26,7 +26,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  {
  	struct reserved_mem *rmem;
  	struct device_node *np;
-@@ -321,7 +321,7 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+@@ -325,7 +325,7 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
  		if (index < 0)
  			continue;
  
diff --git a/target/linux/mediatek/patches-6.6/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch b/target/linux/mediatek/patches-6.6/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
index b4bea2087b..43014c5d12 100644
--- a/target/linux/mediatek/patches-6.6/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
+++ b/target/linux/mediatek/patches-6.6/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
@@ -23,9 +23,12 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
-@@ -34,12 +34,23 @@ static struct mtk_wed_wo_memory_region m
+@@ -32,14 +32,25 @@ static struct mtk_wed_wo_memory_region m
+ 	},
+ };
  
- static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
+-static u32 wo_r32(u32 reg)
++static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
  {
 -	return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
 +	u32 val;
@@ -39,7 +42,8 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +	return val;
  }
  
- static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
+-static void wo_w32(u32 reg, u32 val)
++static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
  {
 -	writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
 +	if (wo->boot_regmap)
@@ -49,7 +53,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  }
  
  static struct sk_buff *
-@@ -313,6 +324,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+@@ -317,6 +328,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
  	u32 val, boot_cr;
  	int ret, i;
  
@@ -59,7 +63,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	/* load firmware region metadata */
  	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
  		int index = of_property_match_string(wo->hw->node,
-@@ -321,6 +335,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+@@ -325,6 +339,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
  		if (index < 0)
  			continue;
  
@@ -69,6 +73,24 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		ret = mtk_wed_get_reserved_memory_region(wo->hw, index, &mem_region[i]);
  		if (ret)
  			return ret;
+@@ -373,13 +390,13 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 		boot_cr = MTK_WO_MCU_CFG_LS_WA_BOOT_ADDR_ADDR;
+ 	else
+ 		boot_cr = MTK_WO_MCU_CFG_LS_WM_BOOT_ADDR_ADDR;
+-	wo_w32(boot_cr, mem_region[MTK_WED_WO_REGION_EMI].phy_addr >> 16);
++	wo_w32(wo, boot_cr, mem_region[MTK_WED_WO_REGION_EMI].phy_addr >> 16);
+ 	/* wo firmware reset */
+-	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
++	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
+ 
+-	val = wo_r32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
++	val = wo_r32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
+ 	      MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
+-	wo_w32(MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
++	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
+ out:
+ 	release_firmware(fw);
+ 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h
 @@ -231,6 +231,7 @@ struct mtk_wed_wo_queue {
diff --git a/target/linux/mediatek/patches-6.6/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-6.6/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
index b4ba5b0d2d..641c2597f7 100644
--- a/target/linux/mediatek/patches-6.6/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
+++ b/target/linux/mediatek/patches-6.6/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
@@ -20,7 +20,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
-@@ -316,6 +316,39 @@ next:
+@@ -320,6 +320,39 @@ next:
  }
  
  static int
@@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
  {
  	const struct mtk_wed_fw_trailer *trailer;
-@@ -324,14 +357,20 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+@@ -328,14 +361,20 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
  	u32 val, boot_cr;
  	int ret, i;
  
diff --git a/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
index c92fcd43ce..abb6591b7d 100644
--- a/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
+++ b/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
@@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1320,6 +1320,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1322,6 +1322,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  	struct device_node *np;
  	int index;
  
@@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	index = of_property_match_string(dev->hw->node, "memory-region-names",
  					 "wo-dlm");
  	if (index < 0)
-@@ -1336,6 +1354,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1338,6 +1356,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  		return -ENODEV;
  
  	dev->rro.miod_phys = rmem->base;



From lede-commits at lists.infradead.org  Thu May 30 03:08:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 06:08:29 -0400
Subject: [openwrt/openwrt]  kernel: add missing patch header
In-Reply-To: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
References: <171706370993.2189420.11621882457645834561@git-01.infra.openwrt.org>
Message-ID: <mailman.39944.1717063720.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bc59bf2a3565949e66f453b1ae18cfc279981391

commit bc59bf2a3565949e66f453b1ae18cfc279981391
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue May 28 01:49:36 2024 +0100

    kernel: add missing patch header
    
    Make sure all patches can again be applied using 'git am' on the
    corresponding linux-stable git tree.
    
    Fixes: a7ae4ed0a3 ("kernel: fix tools build breakage on macos with x86")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/generic/hack-6.6/200-tools_portability.patch | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/generic/hack-6.6/200-tools_portability.patch b/target/linux/generic/hack-6.6/200-tools_portability.patch
index 2ea8a68537..5d2b20dcb7 100644
--- a/target/linux/generic/hack-6.6/200-tools_portability.patch
+++ b/target/linux/generic/hack-6.6/200-tools_portability.patch
@@ -1,3 +1,10 @@
+From a7ae4ed0a3951c45d4a59ee575951b64ae4a23fb Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 7 May 2024 12:22:15 +0200
+Subject: [PATCH] kernel: fix tools build breakage on macos with x86
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
 --- a/tools/scripts/Makefile.include
 +++ b/tools/scripts/Makefile.include
 @@ -72,8 +72,6 @@ $(call allow-override,CXX,$(CROSS_COMPIL



From lede-commits at lists.infradead.org  Thu May 30 04:08:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 07:08:05 -0400
Subject: [openwrt/openwrt]  generic: 6.6: net: sfp-bus: fix SFP mode detect
 from bitrate
In-Reply-To: <171706728542.2311897.3025403344460185879@git-01.infra.openwrt.org>
References: <171706728542.2311897.3025403344460185879@git-01.infra.openwrt.org>
Message-ID: <mailman.39977.1717067293.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a1a9572f43776c3fed46c4545e93fbbb25d923c2

commit a1a9572f43776c3fed46c4545e93fbbb25d923c2
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu May 30 12:06:26 2024 +0100

    generic: 6.6: net: sfp-bus: fix SFP mode detect from bitrate
    
    Backport commit fixing detection of SFP modules which has been broken
    since Linux 6.4 for some modules.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...-sfp-bus-fix-SFP-mode-detect-from-bitrate.patch | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/target/linux/generic/backport-6.6/701-v6.8-net-sfp-bus-fix-SFP-mode-detect-from-bitrate.patch b/target/linux/generic/backport-6.6/701-v6.8-net-sfp-bus-fix-SFP-mode-detect-from-bitrate.patch
new file mode 100644
index 0000000000..83145012b9
--- /dev/null
+++ b/target/linux/generic/backport-6.6/701-v6.8-net-sfp-bus-fix-SFP-mode-detect-from-bitrate.patch
@@ -0,0 +1,46 @@
+From 97eb5d51b4a584a60e5d096bdb6b33edc9f50d8d Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Mon, 15 Jan 2024 12:43:38 +0000
+Subject: [PATCH] net: sfp-bus: fix SFP mode detect from bitrate
+
+The referenced commit moved the setting of the Autoneg and pause bits
+early in sfp_parse_support(). However, we check whether the modes are
+empty before using the bitrate to set some modes. Setting these bits
+so early causes that test to always be false, preventing this working,
+and thus some modules that used to work no longer do.
+
+Move them just before the call to the quirk.
+
+Fixes: 8110633db49d ("net: sfp-bus: allow SFP quirks to override Autoneg and pause bits")
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Link: https://lore.kernel.org/r/E1rPMJW-001Ahf-L0 at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/sfp-bus.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/phy/sfp-bus.c
++++ b/drivers/net/phy/sfp-bus.c
+@@ -151,10 +151,6 @@ void sfp_parse_support(struct sfp_bus *b
+ 	unsigned int br_min, br_nom, br_max;
+ 	__ETHTOOL_DECLARE_LINK_MODE_MASK(modes) = { 0, };
+ 
+-	phylink_set(modes, Autoneg);
+-	phylink_set(modes, Pause);
+-	phylink_set(modes, Asym_Pause);
+-
+ 	/* Decode the bitrate information to MBd */
+ 	br_min = br_nom = br_max = 0;
+ 	if (id->base.br_nominal) {
+@@ -339,6 +335,10 @@ void sfp_parse_support(struct sfp_bus *b
+ 		}
+ 	}
+ 
++	phylink_set(modes, Autoneg);
++	phylink_set(modes, Pause);
++	phylink_set(modes, Asym_Pause);
++
+ 	if (bus->sfp_quirk && bus->sfp_quirk->modes)
+ 		bus->sfp_quirk->modes(id, modes, interfaces);
+ 



From lede-commits at lists.infradead.org  Thu May 30 13:46:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 16:46:43 -0400
Subject: [openwrt/openwrt]  armsr: Remove kernel 6.1 configuration
In-Reply-To: <171710200273.3691172.3295874891673341277@git-01.infra.openwrt.org>
References: <171710200273.3691172.3295874891673341277@git-01.infra.openwrt.org>
Message-ID: <mailman.40125.1717102009.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fd47fdf527b45f07235193c80f07562b44e50aef

commit fd47fdf527b45f07235193c80f07562b44e50aef
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon May 27 00:00:19 2024 +0200

    armsr: Remove kernel 6.1 configuration
    
    Armsr is using kernel 6.6 by default now, remove configuration for
    kernel 6.1.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/armsr/armv7/config-6.1 |  78 ----
 target/linux/armsr/armv8/config-6.1 | 800 ------------------------------------
 target/linux/armsr/config-6.1       | 336 ---------------
 3 files changed, 1214 deletions(-)

diff --git a/target/linux/armsr/armv7/config-6.1 b/target/linux/armsr/armv7/config-6.1
deleted file mode 100644
index 664ef2e05b..0000000000
--- a/target/linux/armsr/armv7/config-6.1
+++ /dev/null
@@ -1,78 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_V6_V7=y
-CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_MMAP_RND_BITS=8
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_VIRT=y
-CONFIG_ARM=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_HEAVY_MB=y
-# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-CONFIG_ARM_LPAE=y
-CONFIG_ARM_PATCH_IDIV=y
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_PSCI=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ARM_VIRT_EXT=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_CACHE_L2X0=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_SPECTRE=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_V7=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DMA_OPS=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_VDSO_32=y
-CONFIG_HARDEN_BRANCH_PREDICTOR=y
-CONFIG_HAVE_SMP=y
-CONFIG_HZ_FIXED=0
-CONFIG_HZ_PERIODIC=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_NEON=y
-CONFIG_NR_CPUS=4
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_OUTER_CACHE=y
-CONFIG_OUTER_CACHE_SYNC=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_RTC_MC146818_LIB=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SMP_ON_UP=y
-CONFIG_SWP_EMULATE=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USE_OF=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZBOOT_ROM_BSS=0
-CONFIG_ZBOOT_ROM_TEXT=0
diff --git a/target/linux/armsr/armv8/config-6.1 b/target/linux/armsr/armv8/config-6.1
deleted file mode 100644
index 0ead973064..0000000000
--- a/target/linux/armsr/armv8/config-6.1
+++ /dev/null
@@ -1,800 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_ACPI_APEI=y
-CONFIG_ACPI_HMAT=y
-CONFIG_ACPI_PCC=y
-CONFIG_AHCI_IMX=y
-CONFIG_AHCI_MVEBU=y
-CONFIG_AHCI_QORIQ=y
-CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y
-CONFIG_ARCH_BCM=y
-CONFIG_ARCH_BCM2835=y
-# CONFIG_ARCH_BCMBCA is not set
-CONFIG_ARCH_BCM_IPROC=y
-CONFIG_ARCH_BRCMSTB=y
-CONFIG_ARCH_HISI=y
-CONFIG_ARCH_INTEL_SOCFPGA=y
-CONFIG_ARCH_LAYERSCAPE=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=24
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_MVEBU=y
-CONFIG_ARCH_MXC=y
-CONFIG_ARCH_NXP=y
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ARCH_R8A774A1=y
-CONFIG_ARCH_R8A774B1=y
-CONFIG_ARCH_R8A774C0=y
-CONFIG_ARCH_R8A774E1=y
-# CONFIG_ARCH_R8A77950 is not set
-# CONFIG_ARCH_R8A77951 is not set
-# CONFIG_ARCH_R8A77960 is not set
-# CONFIG_ARCH_R8A77961 is not set
-# CONFIG_ARCH_R8A77965 is not set
-# CONFIG_ARCH_R8A77970 is not set
-# CONFIG_ARCH_R8A77980 is not set
-# CONFIG_ARCH_R8A77990 is not set
-# CONFIG_ARCH_R8A77995 is not set
-# CONFIG_ARCH_R8A779A0 is not set
-# CONFIG_ARCH_R8A779F0 is not set
-# CONFIG_ARCH_R8A779G0 is not set
-CONFIG_ARCH_R9A07G043=y
-CONFIG_ARCH_R9A07G044=y
-CONFIG_ARCH_R9A07G054=y
-CONFIG_ARCH_R9A09G011=y
-CONFIG_ARCH_RENESAS=y
-CONFIG_ARCH_ROCKCHIP=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_SUNXI=y
-CONFIG_ARCH_SYNQUACER=y
-CONFIG_ARCH_THUNDER=y
-CONFIG_ARCH_THUNDER2=y
-CONFIG_ARCH_VEXPRESS=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ARCH_ZYNQMP=y
-CONFIG_ARM64=y
-CONFIG_ARM64_4K_PAGES=y
-CONFIG_ARM64_AMU_EXTN=y
-CONFIG_ARM64_BTI=y
-CONFIG_ARM64_CNP=y
-CONFIG_ARM64_CRYPTO=y
-CONFIG_ARM64_E0PD=y
-CONFIG_ARM64_EPAN=y
-CONFIG_ARM64_ERRATUM_1024718=y
-CONFIG_ARM64_ERRATUM_1165522=y
-CONFIG_ARM64_ERRATUM_1286807=y
-CONFIG_ARM64_ERRATUM_1319367=y
-CONFIG_ARM64_ERRATUM_1418040=y
-CONFIG_ARM64_ERRATUM_1463225=y
-CONFIG_ARM64_ERRATUM_1508412=y
-CONFIG_ARM64_ERRATUM_1530923=y
-CONFIG_ARM64_ERRATUM_1542419=y
-CONFIG_ARM64_ERRATUM_1742098=y
-CONFIG_ARM64_ERRATUM_2051678=y
-CONFIG_ARM64_ERRATUM_2054223=y
-CONFIG_ARM64_ERRATUM_2067961=y
-CONFIG_ARM64_ERRATUM_2077057=y
-CONFIG_ARM64_ERRATUM_2441007=y
-CONFIG_ARM64_ERRATUM_2441009=y
-CONFIG_ARM64_ERRATUM_2457168=y
-CONFIG_ARM64_ERRATUM_2658417=y
-CONFIG_ARM64_ERRATUM_819472=y
-CONFIG_ARM64_ERRATUM_824069=y
-CONFIG_ARM64_ERRATUM_826319=y
-CONFIG_ARM64_ERRATUM_827319=y
-CONFIG_ARM64_ERRATUM_832075=y
-CONFIG_ARM64_ERRATUM_834220=y
-CONFIG_ARM64_ERRATUM_843419=y
-CONFIG_ARM64_ERRATUM_845719=y
-CONFIG_ARM64_HW_AFDBM=y
-CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_MTE=y
-CONFIG_ARM64_PAGE_SHIFT=12
-CONFIG_ARM64_PAN=y
-CONFIG_ARM64_PA_BITS=48
-CONFIG_ARM64_PA_BITS_48=y
-CONFIG_ARM64_PTR_AUTH=y
-CONFIG_ARM64_PTR_AUTH_KERNEL=y
-CONFIG_ARM64_RAS_EXTN=y
-CONFIG_ARM64_SME=y
-CONFIG_ARM64_SVE=y
-CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_TLB_RANGE=y
-CONFIG_ARM64_VA_BITS=48
-CONFIG_ARM64_VA_BITS_48=y
-CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y
-CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y
-CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y
-CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y
-# CONFIG_ARMADA_37XX_RWTM_MBOX is not set
-CONFIG_ARMADA_37XX_WATCHDOG=y
-CONFIG_ARMADA_THERMAL=y
-CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
-# CONFIG_ARM_DMC620_PMU is not set
-# CONFIG_ARM_MHU_V2 is not set
-CONFIG_ARM_PSCI_CPUIDLE=y
-CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y
-CONFIG_ARM_SBSA_WATCHDOG=y
-CONFIG_ARM_SCPI_POWER_DOMAIN=y
-CONFIG_ARM_SCPI_PROTOCOL=y
-CONFIG_ARM_SMCCC_SOC_ID=y
-CONFIG_ARM_SMC_WATCHDOG=y
-CONFIG_ARM_SMMU=y
-# CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT is not set
-# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set
-CONFIG_ARM_SMMU_V3=y
-# CONFIG_ARM_SMMU_V3_PMU is not set
-# CONFIG_ARM_SMMU_V3_SVA is not set
-CONFIG_ATOMIC64_SELFTEST=y
-CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
-# CONFIG_AXI_DMAC is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-# CONFIG_BCM2711_THERMAL is not set
-CONFIG_BCM2835_MBOX=y
-CONFIG_BCM2835_POWER=y
-# CONFIG_BCM2835_THERMAL is not set
-# CONFIG_BCM2835_VCHIQ is not set
-CONFIG_BCM2835_WDT=y
-# CONFIG_BCMGENET is not set
-# CONFIG_BCM_CYGNUS_PHY is not set
-# CONFIG_BCM_FLEXRM_MBOX is not set
-# CONFIG_BCM_NS_THERMAL is not set
-# CONFIG_BCM_PDC_MBOX is not set
-# CONFIG_BCM_SR_THERMAL is not set
-CONFIG_BCM_VIDEOCORE=y
-# CONFIG_BGMAC_PLATFORM is not set
-CONFIG_BLK_PM=y
-# CONFIG_BRCMSTB_PM is not set
-# CONFIG_BRCMSTB_THERMAL is not set
-CONFIG_BRCM_USB_PINMAP=y
-CONFIG_CAVIUM_ERRATUM_22375=y
-CONFIG_CAVIUM_ERRATUM_23144=y
-CONFIG_CAVIUM_ERRATUM_23154=y
-CONFIG_CAVIUM_ERRATUM_27456=y
-CONFIG_CAVIUM_ERRATUM_30115=y
-CONFIG_CAVIUM_TX2_ERRATUM_219=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_CLK_BCM2711_DVP=y
-CONFIG_CLK_BCM2835=y
-CONFIG_CLK_BCM_NS2=y
-CONFIG_CLK_BCM_SR=y
-CONFIG_CLK_IMX8MM=y
-CONFIG_CLK_IMX8MN=y
-CONFIG_CLK_IMX8MP=y
-CONFIG_CLK_IMX8MQ=y
-CONFIG_CLK_IMX8QXP=y
-CONFIG_CLK_IMX8ULP=y
-CONFIG_CLK_IMX93=y
-CONFIG_CLK_INTEL_SOCFPGA=y
-CONFIG_CLK_INTEL_SOCFPGA64=y
-CONFIG_CLK_LS1028A_PLLDIG=y
-CONFIG_CLK_PX30=y
-CONFIG_CLK_QORIQ=y
-CONFIG_CLK_RASPBERRYPI=y
-CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y
-CONFIG_CLK_RENESAS=y
-CONFIG_CLK_RK3308=y
-CONFIG_CLK_RK3328=y
-CONFIG_CLK_RK3368=y
-CONFIG_CLK_RK3399=y
-CONFIG_CLK_RK3568=y
-CONFIG_CLK_SP810=y
-CONFIG_CLK_SUNXI=y
-CONFIG_CLK_SUNXI_CLOCKS=y
-# CONFIG_CLK_SUNXI_PRCM_SUN6I is not set
-# CONFIG_CLK_SUNXI_PRCM_SUN8I is not set
-# CONFIG_CLK_SUNXI_PRCM_SUN9I is not set
-CONFIG_CLK_VEXPRESS_OSC=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=19
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=32
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-# CONFIG_CMA_SYSFS is not set
-# CONFIG_COMMON_CLK_FSL_FLEXSPI is not set
-# CONFIG_COMMON_CLK_FSL_SAI is not set
-CONFIG_COMMON_CLK_HI3516CV300=y
-CONFIG_COMMON_CLK_HI3519=y
-CONFIG_COMMON_CLK_HI3559A=y
-CONFIG_COMMON_CLK_HI3660=y
-CONFIG_COMMON_CLK_HI3670=y
-CONFIG_COMMON_CLK_HI3798CV200=y
-CONFIG_COMMON_CLK_HI6220=y
-CONFIG_COMMON_CLK_HI655X=y
-CONFIG_COMMON_CLK_ROCKCHIP=y
-CONFIG_COMMON_CLK_SCPI=y
-CONFIG_COMMON_CLK_ZYNQMP=y
-CONFIG_COMMON_RESET_HI3660=y
-CONFIG_COMMON_RESET_HI6220=y
-# CONFIG_COMPAT_32BIT_TIME is not set
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_PM=y
-CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_BS=y
-CONFIG_CRYPTO_AES_ARM64_CE=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
-CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
-CONFIG_CRYPTO_AES_ARM64_NEON_BLK=y
-CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
-CONFIG_CRYPTO_CHACHA20=y
-CONFIG_CRYPTO_CHACHA20_NEON=y
-CONFIG_CRYPTO_CRYPTD=y
-# CONFIG_CRYPTO_DEV_ALLWINNER is not set
-# CONFIG_CRYPTO_DEV_BCM_SPU is not set
-# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM is not set
-# CONFIG_CRYPTO_DEV_HISI_HPRE is not set
-# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set
-# CONFIG_CRYPTO_DEV_HISI_TRNG is not set
-# CONFIG_CRYPTO_DEV_OCTEONTX2_CPT is not set
-# CONFIG_CRYPTO_DEV_ROCKCHIP is not set
-# CONFIG_CRYPTO_DEV_ZYNQMP_AES is not set
-# CONFIG_CRYPTO_DEV_ZYNQMP_SHA3 is not set
-CONFIG_CRYPTO_GHASH_ARM64_CE=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
-CONFIG_CRYPTO_POLYVAL_ARM64_CE=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA1_ARM64_CE=y
-CONFIG_CRYPTO_SHA256_ARM64=y
-CONFIG_CRYPTO_SHA2_ARM64_CE=y
-CONFIG_CRYPTO_SHA512_ARM64=y
-CONFIG_CRYPTO_SIMD=y
-# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
-# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
-# CONFIG_DEV_DAX_HMEM is not set
-CONFIG_DMA_BCM2835=y
-CONFIG_DMA_CMA=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DMA_SUN6I=y
-CONFIG_DRM=y
-CONFIG_DRM_BOCHS=y
-CONFIG_DRM_BRIDGE=y
-# CONFIG_DRM_FSL_LDB is not set
-CONFIG_DRM_GEM_SHMEM_HELPER=y
-# CONFIG_DRM_IMX8QM_LDB is not set
-# CONFIG_DRM_IMX8QXP_LDB is not set
-# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set
-# CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set
-# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set
-# CONFIG_DRM_IMX_DCSS is not set
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_QXL=y
-# CONFIG_DRM_RCAR_DU is not set
-# CONFIG_DRM_ROCKCHIP is not set
-CONFIG_DRM_TTM=y
-CONFIG_DRM_TTM_HELPER=y
-# CONFIG_DRM_V3D is not set
-CONFIG_DRM_VIRTIO_GPU=y
-CONFIG_DRM_VRAM_HELPER=y
-# CONFIG_DWMAC_SUN8I is not set
-# CONFIG_DWMAC_SUNXI is not set
-CONFIG_DW_WATCHDOG=y
-CONFIG_EFI_CAPSULE_LOADER=y
-CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
-CONFIG_EFI_SOFT_RESERVE=y
-CONFIG_EFI_VARS_PSTORE=y
-# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
-CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_MX3=y
-# CONFIG_FB_SH_MOBILE_LCDC is not set
-# CONFIG_FB_XILINX is not set
-CONFIG_FRAME_POINTER=y
-# CONFIG_FSL_DPAA is not set
-# CONFIG_FSL_DPAA2_QDMA is not set
-CONFIG_FSL_ERRATUM_A008585=y
-# CONFIG_FSL_IMX8_DDR_PMU is not set
-# CONFIG_FSL_PQ_MDIO is not set
-CONFIG_FUJITSU_ERRATUM_010001=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-# CONFIG_GIANFAR is not set
-CONFIG_GPIO_BCM_XGS_IPROC=y
-CONFIG_GPIO_BRCMSTB=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_GPIO_MPC8XXX=y
-CONFIG_GPIO_MXC=y
-CONFIG_GPIO_RASPBERRYPI_EXP=y
-CONFIG_GPIO_ROCKCHIP=y
-CONFIG_GPIO_THUNDERX=y
-CONFIG_GPIO_XLP=y
-CONFIG_GPIO_ZYNQ=y
-CONFIG_GPIO_ZYNQMP_MODEPIN=y
-CONFIG_HDMI=y
-CONFIG_HI3660_MBOX=y
-CONFIG_HI6220_MBOX=y
-CONFIG_HISILICON_ERRATUM_161600802=y
-CONFIG_HISILICON_LPC=y
-CONFIG_HISI_PMU=y
-CONFIG_HISI_THERMAL=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_ACPI=y
-# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y
-# CONFIG_HW_RANDOM_HISI is not set
-CONFIG_HW_RANDOM_VIRTIO=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_ALTERA=y
-# CONFIG_I2C_BCM2835 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HIX5HD2 is not set
-CONFIG_I2C_IMX=y
-CONFIG_I2C_IMX_LPI2C=y
-CONFIG_I2C_RIIC=y
-# CONFIG_I2C_RZV2M is not set
-# CONFIG_I2C_SLAVE_TESTUNIT is not set
-CONFIG_I2C_SYNQUACER=y
-CONFIG_I2C_THUNDERX=y
-# CONFIG_I2C_XLP9XX is not set
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-# CONFIG_IMX2_WDT is not set
-# CONFIG_IMX8MM_THERMAL is not set
-# CONFIG_IMX8QXP_ADC is not set
-# CONFIG_IMX_DMA is not set
-# CONFIG_IMX_DSP is not set
-CONFIG_IMX_INTMUX=y
-CONFIG_IMX_IRQSTEER=y
-CONFIG_IMX_MBOX=y
-# CONFIG_IMX_MU_MSI is not set
-CONFIG_IMX_SCU=y
-CONFIG_IMX_SCU_PD=y
-# CONFIG_IMX_SC_THERMAL is not set
-# CONFIG_IMX_SC_WDT is not set
-# CONFIG_IMX_SDMA is not set
-# CONFIG_IMX_WEIM is not set
-# CONFIG_INPUT_HISI_POWERKEY is not set
-# CONFIG_INPUT_IBM_PANEL is not set
-# CONFIG_INTEL_STRATIX10_RSU is not set
-# CONFIG_INTEL_STRATIX10_SERVICE is not set
-CONFIG_INTERCONNECT=y
-CONFIG_INTERCONNECT_IMX=y
-CONFIG_INTERCONNECT_IMX8MM=y
-CONFIG_INTERCONNECT_IMX8MN=y
-CONFIG_INTERCONNECT_IMX8MP=y
-CONFIG_INTERCONNECT_IMX8MQ=y
-# CONFIG_IOMMU_DEBUGFS is not set
-# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
-CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
-CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
-# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
-# CONFIG_IOMMU_IO_PGTABLE_DART is not set
-# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set
-CONFIG_IOMMU_SUPPORT=y
-# CONFIG_IPMMU_VMSA is not set
-# CONFIG_K3_DMA is not set
-CONFIG_KCMP=y
-# CONFIG_KEYBOARD_IMX_SC_KEY is not set
-# CONFIG_KEYBOARD_SUN4I_LRADC is not set
-CONFIG_KSM=y
-CONFIG_KVM=y
-CONFIG_LCD_CLASS_DEVICE=m
-# CONFIG_LCD_PLATFORM is not set
-# CONFIG_MAILBOX_TEST is not set
-CONFIG_MARVELL_10G_PHY=y
-# CONFIG_MARVELL_CN10K_DDR_PMU is not set
-# CONFIG_MARVELL_CN10K_TAD_PMU is not set
-CONFIG_MDIO_BCM_IPROC=y
-CONFIG_MDIO_BUS_MUX_BCM_IPROC=y
-CONFIG_MDIO_SUN4I=y
-# CONFIG_MFD_ALTERA_A10SR is not set
-CONFIG_MFD_ALTERA_SYSMGR=y
-# CONFIG_MFD_AXP20X_RSB is not set
-CONFIG_MFD_CORE=y
-CONFIG_MFD_HI655X_PMIC=y
-# CONFIG_MFD_KHADAS_MCU is not set
-CONFIG_MFD_SUN4I_GPADC=y
-# CONFIG_MFD_SUN6I_PRCM is not set
-CONFIG_MFD_SYSCON=y
-CONFIG_MFD_VEXPRESS_SYSREG=y
-CONFIG_MMC=y
-CONFIG_MMC_ARMMMCI=y
-CONFIG_MMC_BCM2835=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_CAVIUM_THUNDERX=y
-CONFIG_MMC_DW=y
-# CONFIG_MMC_DW_BLUEFIELD is not set
-# CONFIG_MMC_DW_EXYNOS is not set
-# CONFIG_MMC_DW_HI3798CV200 is not set
-# CONFIG_MMC_DW_K3 is not set
-# CONFIG_MMC_DW_PCI is not set
-CONFIG_MMC_DW_PLTFM=y
-CONFIG_MMC_DW_ROCKCHIP=y
-# CONFIG_MMC_MXC is not set
-CONFIG_MMC_RICOH_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_ACPI=y
-CONFIG_MMC_SDHCI_CADENCE=y
-CONFIG_MMC_SDHCI_ESDHC_IMX=y
-CONFIG_MMC_SDHCI_IPROC=y
-CONFIG_MMC_SDHCI_OF_ESDHC=y
-CONFIG_MMC_SDHCI_PCI=y
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MMC_SDHI=y
-CONFIG_MMC_SDHI_INTERNAL_DMAC=y
-# CONFIG_MMC_SDHI_SYS_DMAC is not set
-# CONFIG_MMC_SH_MMCIF is not set
-CONFIG_MMC_SUNXI=y
-CONFIG_MODULES_USE_ELF_RELA=y
-# CONFIG_MVNETA is not set
-# CONFIG_MVPP2 is not set
-# CONFIG_MV_XOR is not set
-# CONFIG_MX3_IPU is not set
-CONFIG_MXC_CLK=y
-CONFIG_MXC_CLK_SCU=y
-# CONFIG_MXS_DMA is not set
-CONFIG_NEED_SG_DMA_LENGTH=y
-# CONFIG_NET_VENDOR_ALLWINNER is not set
-CONFIG_NODES_SHIFT=4
-CONFIG_NOP_USB_XCEIV=y
-CONFIG_NO_HZ=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NR_CPUS=256
-CONFIG_NUMA=y
-CONFIG_NUMA_BALANCING=y
-CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
-# CONFIG_NVHE_EL2_DEBUG is not set
-CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y
-# CONFIG_NVMEM_IMX_IIM is not set
-# CONFIG_NVMEM_IMX_OCOTP_ELE is not set
-CONFIG_NVMEM_IMX_OCOTP_SCU=y
-# CONFIG_NVMEM_LAYERSCAPE_SFP is not set
-CONFIG_NVMEM_ROCKCHIP_EFUSE=y
-# CONFIG_NVMEM_ROCKCHIP_OTP is not set
-# CONFIG_NVMEM_SNVS_LPGPR is not set
-# CONFIG_NVMEM_SUNXI_SID is not set
-# CONFIG_NVMEM_ZYNQMP is not set
-CONFIG_PCC=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_ARMADA_8K=y
-CONFIG_PCIE_BRCMSTB=y
-CONFIG_PCIE_HISI_STB=y
-CONFIG_PCIE_IPROC_MSI=y
-CONFIG_PCIE_IPROC_PLATFORM=y
-CONFIG_PCIE_LAYERSCAPE=y
-CONFIG_PCIE_MOBIVEIL_PLAT=y
-# CONFIG_PCIE_RCAR_EP is not set
-CONFIG_PCIE_RCAR_HOST=y
-CONFIG_PCIE_ROCKCHIP=y
-# CONFIG_PCIE_ROCKCHIP_DW_HOST is not set
-CONFIG_PCIE_ROCKCHIP_HOST=y
-CONFIG_PCIE_XILINX_CPM=y
-CONFIG_PCIE_XILINX_NWL=y
-CONFIG_PCI_AARDVARK=y
-CONFIG_PCI_HISI=y
-CONFIG_PCI_HOST_THUNDER_ECAM=y
-CONFIG_PCI_HOST_THUNDER_PEM=y
-CONFIG_PCI_IMX6=y
-CONFIG_PCI_IOV=y
-CONFIG_PCI_LAYERSCAPE=y
-CONFIG_PCI_PASID=y
-# CONFIG_PCI_RCAR_GEN2 is not set
-CONFIG_PHY_BCM_SR_PCIE=y
-CONFIG_PHY_BCM_SR_USB=y
-CONFIG_PHY_BRCM_SATA=y
-CONFIG_PHY_BRCM_USB=y
-CONFIG_PHY_FSL_IMX8M_PCIE=y
-# CONFIG_PHY_FSL_LYNX_28G is not set
-CONFIG_PHY_HI3660_USB=y
-CONFIG_PHY_HI3670_PCIE=y
-CONFIG_PHY_HI3670_USB=y
-CONFIG_PHY_HI6220_USB=y
-CONFIG_PHY_HISI_INNO_USB2=y
-# CONFIG_PHY_HISTB_COMBPHY is not set
-# CONFIG_PHY_MIXEL_LVDS_PHY is not set
-CONFIG_PHY_MVEBU_A3700_COMPHY=y
-CONFIG_PHY_MVEBU_A3700_UTMI=y
-CONFIG_PHY_MVEBU_A38X_COMPHY=y
-CONFIG_PHY_MVEBU_CP110_COMPHY=y
-CONFIG_PHY_NS2_PCIE=y
-CONFIG_PHY_NS2_USB_DRD=y
-# CONFIG_PHY_RCAR_GEN2 is not set
-CONFIG_PHY_RCAR_GEN3_PCIE=y
-CONFIG_PHY_RCAR_GEN3_USB2=y
-CONFIG_PHY_RCAR_GEN3_USB3=y
-# CONFIG_PHY_ROCKCHIP_DP is not set
-# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set
-CONFIG_PHY_ROCKCHIP_EMMC=y
-# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set
-# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set
-# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set
-CONFIG_PHY_ROCKCHIP_INNO_USB2=y
-# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set
-CONFIG_PHY_ROCKCHIP_PCIE=y
-CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y
-CONFIG_PHY_ROCKCHIP_TYPEC=y
-# CONFIG_PHY_ROCKCHIP_USB is not set
-CONFIG_PHY_SUN4I_USB=y
-CONFIG_PHY_SUN50I_USB3=y
-# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
-CONFIG_PHY_SUN9I_USB=y
-# CONFIG_PHY_XILINX_ZYNQMP is not set
-CONFIG_PINCTRL_IMX=y
-CONFIG_PINCTRL_IMX8DXL=y
-CONFIG_PINCTRL_IMX8MM=y
-CONFIG_PINCTRL_IMX8MN=y
-CONFIG_PINCTRL_IMX8MP=y
-CONFIG_PINCTRL_IMX8MQ=y
-CONFIG_PINCTRL_IMX8QM=y
-CONFIG_PINCTRL_IMX8QXP=y
-CONFIG_PINCTRL_IMX8ULP=y
-CONFIG_PINCTRL_IMX93=y
-# CONFIG_PINCTRL_IMXRT1050 is not set
-# CONFIG_PINCTRL_IMXRT1170 is not set
-CONFIG_PINCTRL_IMX_SCU=y
-CONFIG_PINCTRL_IPROC_GPIO=y
-CONFIG_PINCTRL_NS2_MUX=y
-CONFIG_PINCTRL_ROCKCHIP=y
-# CONFIG_PINCTRL_SUN20I_D1 is not set
-CONFIG_PINCTRL_SUN4I_A10=y
-CONFIG_PINCTRL_SUN50I_A100=y
-CONFIG_PINCTRL_SUN50I_A100_R=y
-CONFIG_PINCTRL_SUN50I_A64=y
-CONFIG_PINCTRL_SUN50I_A64_R=y
-CONFIG_PINCTRL_SUN50I_H5=y
-CONFIG_PINCTRL_SUN50I_H6=y
-CONFIG_PINCTRL_SUN50I_H616=y
-CONFIG_PINCTRL_SUN50I_H616_R=y
-CONFIG_PINCTRL_SUN50I_H6_R=y
-CONFIG_PINCTRL_SUN5I=y
-# CONFIG_PINCTRL_SUN6I_A31 is not set
-# CONFIG_PINCTRL_SUN6I_A31_R is not set
-# CONFIG_PINCTRL_SUN8I_A23 is not set
-# CONFIG_PINCTRL_SUN8I_A23_R is not set
-# CONFIG_PINCTRL_SUN8I_A33 is not set
-# CONFIG_PINCTRL_SUN8I_A83T is not set
-# CONFIG_PINCTRL_SUN8I_A83T_R is not set
-# CONFIG_PINCTRL_SUN8I_H3 is not set
-# CONFIG_PINCTRL_SUN8I_H3_R is not set
-# CONFIG_PINCTRL_SUN8I_V3S is not set
-# CONFIG_PINCTRL_SUN9I_A80 is not set
-# CONFIG_PINCTRL_SUN9I_A80_R is not set
-CONFIG_PINCTRL_ZYNQMP=y
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_GENERIC_DOMAINS=y
-CONFIG_PM_GENERIC_DOMAINS_OF=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_HISI=y
-CONFIG_POWER_RESET_VEXPRESS=y
-CONFIG_POWER_SUPPLY=y
-# CONFIG_PTP_1588_CLOCK_DTE is not set
-# CONFIG_PWM_BCM2835 is not set
-CONFIG_QCOM_FALKOR_ERRATUM_1003=y
-CONFIG_QCOM_FALKOR_ERRATUM_1009=y
-CONFIG_QCOM_FALKOR_ERRATUM_E1041=y
-CONFIG_QCOM_QDF2400_ERRATUM_0065=y
-CONFIG_QORIQ_THERMAL=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RASPBERRYPI_FIRMWARE=y
-CONFIG_RASPBERRYPI_POWER=y
-CONFIG_RANDOMIZE_BASE=y
-CONFIG_RANDOMIZE_MODULE_REGION_FULL=y
-CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RELOCATABLE=y
-# CONFIG_RAVB is not set
-CONFIG_RCAR_DMAC=y
-# CONFIG_RCAR_GEN3_THERMAL is not set
-# CONFIG_RCAR_THERMAL is not set
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_ANATOP=y
-CONFIG_REGULATOR_AXP20X=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_HI655X=y
-CONFIG_REGULATOR_PFUZE100=y
-# CONFIG_REGULATOR_VEXPRESS is not set
-CONFIG_RENESAS_OSTM=y
-# CONFIG_RENESAS_RZAWDT is not set
-# CONFIG_RENESAS_RZG2LWDT is not set
-# CONFIG_RENESAS_RZN1WDT is not set
-CONFIG_RENESAS_USB_DMAC=y
-# CONFIG_RENESAS_WDT is not set
-# CONFIG_RESET_BRCMSTB is not set
-CONFIG_RESET_IMX7=y
-# CONFIG_RESET_RASPBERRYPI is not set
-CONFIG_RESET_RZG2L_USBPHY_CTRL=y
-CONFIG_ROCKCHIP_IODOMAIN=y
-CONFIG_ROCKCHIP_IOMMU=y
-# CONFIG_ROCKCHIP_MBOX is not set
-CONFIG_ROCKCHIP_PM_DOMAINS=y
-# CONFIG_ROCKCHIP_SARADC is not set
-# CONFIG_ROCKCHIP_THERMAL is not set
-CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
-# CONFIG_RTC_DRV_BRCMSTB is not set
-# CONFIG_RTC_DRV_FSL_FTM_ALARM is not set
-# CONFIG_RTC_DRV_IMXDI is not set
-# CONFIG_RTC_DRV_IMX_SC is not set
-CONFIG_RTC_DRV_MV=y
-# CONFIG_RTC_DRV_MXC is not set
-# CONFIG_RTC_DRV_MXC_V2 is not set
-# CONFIG_RTC_DRV_SH is not set
-CONFIG_RTC_I2C_AND_SPI=y
-# CONFIG_RZG2L_ADC is not set
-# CONFIG_RZG2L_THERMAL is not set
-CONFIG_RZ_DMAC=y
-CONFIG_SATA_SIL24=y
-# CONFIG_SCHED_CORE is not set
-CONFIG_SCHED_MC=y
-CONFIG_SCHED_SMT=y
-# CONFIG_SENSORS_ARM_SCPI is not set
-CONFIG_SERIAL_8250_BCM2835AUX=y
-CONFIG_SERIAL_8250_BCM7271=y
-# CONFIG_SERIAL_8250_EXAR is not set
-CONFIG_SERIAL_8250_FSL=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_FSL_LINFLEXUART=y
-CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
-CONFIG_SERIAL_FSL_LPUART=y
-CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
-CONFIG_SERIAL_IMX=y
-CONFIG_SERIAL_IMX_CONSOLE=y
-CONFIG_SERIAL_IMX_EARLYCON=y
-CONFIG_SERIAL_MVEBU_CONSOLE=y
-CONFIG_SERIAL_MVEBU_UART=y
-CONFIG_SERIAL_SAMSUNG=y
-CONFIG_SERIAL_SAMSUNG_CONSOLE=y
-# CONFIG_SMC91X is not set
-# CONFIG_SND_SOC_RCAR is not set
-# CONFIG_SND_SOC_RZ is not set
-# CONFIG_SND_SOC_SH4_FSI is not set
-# CONFIG_SND_SUN4I_I2S is not set
-# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
-# CONFIG_SND_SUN50I_DMIC is not set
-# CONFIG_SND_SUN8I_CODEC is not set
-# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
-# CONFIG_SNI_NETSEC is not set
-CONFIG_SOCIONEXT_SYNQUACER_PREITS=y
-CONFIG_SOC_IMX8M=y
-CONFIG_SOC_IMX9=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPI_ARMADA_3700=y
-# CONFIG_SPI_BCM2835 is not set
-CONFIG_SPI_FSL_LPSPI=y
-# CONFIG_SPI_FSL_QUADSPI is not set
-# CONFIG_SPI_HISI_KUNPENG is not set
-# CONFIG_SPI_HISI_SFC is not set
-# CONFIG_SPI_HISI_SFC_V3XX is not set
-CONFIG_SPI_IMX=y
-# CONFIG_SPI_ROCKCHIP_SFC is not set
-# CONFIG_SPI_RSPI is not set
-# CONFIG_SPI_SH_HSPI is not set
-# CONFIG_SPI_SH_MSIOF is not set
-# CONFIG_SPI_SUN4I is not set
-# CONFIG_SPI_SUN6I is not set
-# CONFIG_SPI_SYNQUACER is not set
-CONFIG_SPI_THUNDERX=y
-# CONFIG_SPI_XLP is not set
-CONFIG_STUB_CLK_HI3660=y
-CONFIG_STUB_CLK_HI6220=y
-CONFIG_SUN50I_A100_CCU=y
-CONFIG_SUN50I_A100_R_CCU=y
-CONFIG_SUN50I_A64_CCU=y
-CONFIG_SUN50I_H616_CCU=y
-CONFIG_SUN50I_H6_CCU=y
-CONFIG_SUN50I_H6_R_CCU=y
-CONFIG_SUN50I_IOMMU=y
-CONFIG_SUN6I_MSGBOX=y
-CONFIG_SUN6I_RTC_CCU=y
-# CONFIG_SUN8I_A83T_CCU is not set
-CONFIG_SUN8I_DE2_CCU=y
-# CONFIG_SUN8I_H3_CCU is not set
-CONFIG_SUN8I_R_CCU=y
-CONFIG_SUN8I_THERMAL=y
-CONFIG_SUNXI_CCU=y
-CONFIG_SUNXI_RSB=y
-CONFIG_SUNXI_WATCHDOG=y
-CONFIG_SYNC_FILE=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-# CONFIG_TCG_TIS_SYNQUACER is not set
-CONFIG_THREAD_INFO_IN_TASK=y
-# CONFIG_THUNDERX2_PMU is not set
-CONFIG_TRANSPARENT_HUGEPAGE=y
-CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
-# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
-# CONFIG_TURRIS_MOX_RWTM is not set
-CONFIG_TYPEC=y
-# CONFIG_TYPEC_ANX7411 is not set
-# CONFIG_TYPEC_DP_ALTMODE is not set
-# CONFIG_TYPEC_FUSB302 is not set
-# CONFIG_TYPEC_HD3SS3220 is not set
-# CONFIG_TYPEC_MUX_FSA4480 is not set
-# CONFIG_TYPEC_MUX_PI3USB30532 is not set
-# CONFIG_TYPEC_RT1711H is not set
-# CONFIG_TYPEC_RT1719 is not set
-# CONFIG_TYPEC_STUSB160X is not set
-CONFIG_TYPEC_TCPCI=y
-# CONFIG_TYPEC_TCPCI_MAXIM is not set
-CONFIG_TYPEC_TCPM=y
-# CONFIG_TYPEC_TPS6598X is not set
-# CONFIG_TYPEC_WUSB3801 is not set
-# CONFIG_UACCE is not set
-CONFIG_UNMAP_KERNEL_AT_EL0=y
-# CONFIG_USB_BRCMSTB is not set
-CONFIG_USB_CHIPIDEA=y
-CONFIG_USB_CHIPIDEA_GENERIC=y
-CONFIG_USB_CHIPIDEA_HOST=y
-CONFIG_USB_CHIPIDEA_IMX=y
-CONFIG_USB_CHIPIDEA_PCI=y
-CONFIG_USB_CHIPIDEA_UDC=y
-CONFIG_USB_DWC3=y
-CONFIG_USB_DWC3_DUAL_ROLE=y
-# CONFIG_USB_DWC3_GADGET is not set
-CONFIG_USB_DWC3_HAPS=y
-# CONFIG_USB_DWC3_HOST is not set
-CONFIG_USB_DWC3_IMX8MP=y
-# CONFIG_USB_DWC3_OF_SIMPLE is not set
-CONFIG_USB_DWC3_PCI=y
-# CONFIG_USB_DWC3_ULPI is not set
-CONFIG_USB_DWC3_XILINX=y
-CONFIG_USB_EHCI_FSL=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_HCD_ORION=y
-CONFIG_USB_EHCI_HCD_PLATFORM=y
-# CONFIG_USB_EMXX is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_MXS_PHY=y
-CONFIG_USB_OHCI_EXYNOS=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_PCI=y
-CONFIG_USB_OHCI_HCD_PLATFORM=y
-CONFIG_USB_OTG=y
-CONFIG_USB_OTG_FSM=y
-CONFIG_USB_RENESAS_USB3=y
-CONFIG_USB_RENESAS_USBHS=y
-CONFIG_USB_RENESAS_USBHS_HCD=y
-CONFIG_USB_RENESAS_USBHS_UDC=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_HISTB=y
-CONFIG_USB_XHCI_MVEBU=y
-CONFIG_USB_XHCI_PLATFORM=y
-CONFIG_VEXPRESS_CONFIG=y
-CONFIG_VIDEOMODE_HELPERS=y
-CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
-# CONFIG_VIRTIO_IOMMU is not set
-CONFIG_VIRTUALIZATION=y
-CONFIG_VMAP_STACK=y
-CONFIG_WDAT_WDT=y
-# CONFIG_XILINX_AMS is not set
-# CONFIG_XILINX_INTC is not set
-CONFIG_XLNX_EVENT_MANAGER=y
-CONFIG_ZONE_DMA32=y
-CONFIG_ZYNQMP_FIRMWARE=y
-# CONFIG_ZYNQMP_FIRMWARE_DEBUG is not set
-CONFIG_ZYNQMP_PM_DOMAINS=y
-CONFIG_ZYNQMP_POWER=y
diff --git a/target/linux/armsr/config-6.1 b/target/linux/armsr/config-6.1
deleted file mode 100644
index d1dac69da4..0000000000
--- a/target/linux/armsr/config-6.1
+++ /dev/null
@@ -1,336 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_9P_FS=y
-# CONFIG_9P_FS_POSIX_ACL is not set
-# CONFIG_9P_FS_SECURITY is not set
-# CONFIG_A64FX_DIAG is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_APEI=y
-CONFIG_ACPI_APEI_EINJ=y
-# CONFIG_ACPI_APEI_ERST_DEBUG is not set
-CONFIG_ACPI_APEI_GHES=y
-CONFIG_ACPI_APEI_MEMORY_FAILURE=y
-CONFIG_ACPI_APEI_PCIEAER=y
-CONFIG_ACPI_BATTERY=y
-# CONFIG_ACPI_BGRT is not set
-CONFIG_ACPI_BUTTON=y
-CONFIG_ACPI_CCA_REQUIRED=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_CPPC_CPUFREQ=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_GENERIC_GSI=y
-CONFIG_ACPI_GTDT=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_I2C_OPREGION=y
-CONFIG_ACPI_IORT=y
-CONFIG_ACPI_MCFG=y
-# CONFIG_ACPI_PCI_SLOT is not set
-# CONFIG_ACPI_PFRUT is not set
-CONFIG_ACPI_PPTT=y
-CONFIG_ACPI_PRMT=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TINY_POWER_BUTTON is not set
-# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=24
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ARM64=y
-CONFIG_ARM64_4K_PAGES=y
-# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set
-CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_PAGE_SHIFT=12
-CONFIG_ARM64_PA_BITS=48
-CONFIG_ARM64_PA_BITS_48=y
-CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_VA_BITS=39
-CONFIG_ARM64_VA_BITS_39=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_ARCH_TIMER=y
-CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_GIC_V2M=y
-CONFIG_ARM_GIC_V3=y
-CONFIG_ARM_GIC_V3_ITS=y
-CONFIG_ARM_GIC_V3_ITS_PCI=y
-CONFIG_ARM_PSCI_FW=y
-# CONFIG_ARM_SMMU_V3_PMU is not set
-CONFIG_ATA=y
-CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
-CONFIG_BALLOON_COMPACTION=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_NVME=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_BLK_MQ_VIRTIO=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-# CONFIG_COMPAT_32BIT_TIME is not set
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_RMAP=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DMADEVICES=y
-CONFIG_DMA_ACPI=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_REMAP=y
-CONFIG_DMI=y
-CONFIG_DMIID=y
-CONFIG_DMI_SYSFS=y
-CONFIG_DTC=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EFI=y
-CONFIG_EFIVAR_FS=y
-CONFIG_EFI_ARMSTUB_DTB_LOADER=y
-# CONFIG_EFI_BOOTLOADER_CONTROL is not set
-# CONFIG_EFI_CAPSULE_LOADER is not set
-# CONFIG_EFI_COCO_SECRET is not set
-# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
-# CONFIG_EFI_DISABLE_PCI_DMA is not set
-# CONFIG_EFI_DISABLE_RUNTIME is not set
-CONFIG_EFI_EARLYCON=y
-CONFIG_EFI_ESRT=y
-CONFIG_EFI_GENERIC_STUB=y
-# CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER is not set
-CONFIG_EFI_PARAMS_FROM_FDT=y
-CONFIG_EFI_RUNTIME_WRAPPERS=y
-CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
-# CONFIG_EFI_ZBOOT is not set
-CONFIG_EXT4_FS=y
-CONFIG_F2FS_FS=y
-CONFIG_FAILOVER=y
-CONFIG_FB_EFI=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_AUTOSELECT=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
-# CONFIG_GPIO_HISI is not set
-CONFIG_GPIO_PL061=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HOTPLUG_PCI_ACPI=y
-CONFIG_HVC_DRIVER=y
-CONFIG_HZ_PERIODIC=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_HID_ACPI=y
-# CONFIG_I2C_HISI is not set
-# CONFIG_I2C_SLAVE_TESTUNIT is not set
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_JBD2=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY_BALLOON=y
-CONFIG_MIGRATION=y
-# CONFIG_MLXBF_GIGE is not set
-CONFIG_MMC_SDHCI_ACPI=y
-CONFIG_MODULES_USE_ELF_RELA=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_MVMDIO=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NET_9P=y
-# CONFIG_NET_9P_DEBUG is not set
-# CONFIG_NET_9P_FD is not set
-CONFIG_NET_9P_VIRTIO=y
-CONFIG_NET_FAILOVER=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NLS=y
-CONFIG_NR_CPUS=256
-CONFIG_NVMEM=y
-CONFIG_NVME_CORE=y
-# CONFIG_NVME_MULTIPATH is not set
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_PADATA=y
-CONFIG_PAGE_REPORTING=y
-CONFIG_PARTITION_PERCPU=y
-CONFIG_PCI=y
-# CONFIG_PCIE_HISI_ERR is not set
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_ECAM=y
-CONFIG_PCI_HOST_COMMON=y
-CONFIG_PCI_HOST_GENERIC=y
-CONFIG_PCI_LABEL=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
-CONFIG_PGTABLE_LEVELS=3
-CONFIG_PHYS_ADDR_T_64BIT=y
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RATIONAL=y
-# CONFIG_RESET_ATTACK_MITIGATION is not set
-CONFIG_RFS_ACCEL=y
-CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
-CONFIG_RPS=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_EFI=y
-CONFIG_RTC_DRV_PL031=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-CONFIG_SATA_AHCI=y
-CONFIG_SATA_AHCI_PLATFORM=y
-CONFIG_SATA_HOST=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SCSI_VIRTIO=y
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_FSL=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_SERIAL_EARLYCON=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SG_POOL=y
-CONFIG_SMP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SRCU=y
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_SWIOTLB=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYSFB=y
-# CONFIG_SYSFB_SIMPLEFB is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
-CONFIG_THERMAL_GOV_STEP_WISE=y
-CONFIG_THERMAL_OF=y
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_ACPI=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-# CONFIG_UACCE is not set
-CONFIG_UCS2_STRING=y
-CONFIG_UNMAP_KERNEL_AT_EL0=y
-CONFIG_USB=y
-CONFIG_USB_HID=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_PCI=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_PCI=y
-CONFIG_VIRTIO=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_PCI_LEGACY=y
-CONFIG_VIRTIO_PCI_LIB=y
-CONFIG_VMAP_STACK=y
-CONFIG_WATCHDOG_CORE=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-# CONFIG_VT_HW_CONSOLE_BINDING is not set
-CONFIG_XPS=y
-CONFIG_ZONE_DMA32=y



From lede-commits at lists.infradead.org  Thu May 30 13:46:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 16:46:42 -0400
Subject: [openwrt/openwrt]  armsr: Use kernel 6.6 by default
In-Reply-To: <171710200273.3691172.3295874891673341277@git-01.infra.openwrt.org>
References: <171710200273.3691172.3295874891673341277@git-01.infra.openwrt.org>
Message-ID: <mailman.40128.1717102011.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00f7b252c57d60a965ccdc162f4a32108d2f896c

commit 00f7b252c57d60a965ccdc162f4a32108d2f896c
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 23:59:39 2024 +0200

    armsr: Use kernel 6.6 by default
    
    All 2 subtargets are compiling fine and booting up in qemu.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/armsr/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/armsr/Makefile b/target/linux/armsr/Makefile
index c2e57e52da..02b0eda607 100644
--- a/target/linux/armsr/Makefile
+++ b/target/linux/armsr/Makefile
@@ -9,8 +9,7 @@ BOARDNAME:=Arm SystemReady (EFI) compliant
 FEATURES:=fpu pci pcie rtc usb boot-part rootfs-part
 FEATURES+=cpiogz ext4 ramdisk squashfs targz vmdk
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Thu May 30 15:30:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 18:30:39 -0400
Subject: [openwrt/openwrt]  x86: use kernel 6.6 by default
In-Reply-To: <171710823944.3978444.11043055914143300042@git-01.infra.openwrt.org>
References: <171710823944.3978444.11043055914143300042@git-01.infra.openwrt.org>
Message-ID: <mailman.40136.1717108252.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/06d5d7b7bf2452c318f7ccc0a7248cf2491c9134

commit 06d5d7b7bf2452c318f7ccc0a7248cf2491c9134
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu May 30 01:03:24 2024 +0200

    x86: use kernel 6.6 by default
    
    Switch to Linux kernel version 6.6.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index b4ac2a5ec8..f5f39d8421 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -10,8 +10,7 @@ BOARDNAME:=x86
 FEATURES:=squashfs ext4 vdi vmdk vhdx pcmcia targz fpu boot-part rootfs-part
 SUBTARGETS:=generic legacy geode 64
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 KERNELNAME:=bzImage
 



From lede-commits at lists.infradead.org  Thu May 30 15:30:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 30 May 2024 18:30:40 -0400
Subject: [openwrt/openwrt]  x86: drop 6.1 support
In-Reply-To: <171710823944.3978444.11043055914143300042@git-01.infra.openwrt.org>
References: <171710823944.3978444.11043055914143300042@git-01.infra.openwrt.org>
Message-ID: <mailman.40137.1717108255.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/50e26e6fd7a7447678f3d34c22fed82caf40aad4

commit 50e26e6fd7a7447678f3d34c22fed82caf40aad4
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu May 30 01:05:55 2024 +0200

    x86: drop 6.1 support
    
    Drop configs, files and patches for Linux 6.1.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/64/config-6.1                     | 607 ---------------------
 target/linux/x86/config-6.1                        | 464 ----------------
 target/linux/x86/generic/config-6.1                | 509 -----------------
 target/linux/x86/geode/config-6.1                  | 176 ------
 target/linux/x86/legacy/config-6.1                 | 262 ---------
 .../x86/patches-6.1/100-fix_cs5535_clockevt.patch  |  13 -
 .../patches-6.1/103-pcengines_apu6_platform.patch  | 280 ----------
 7 files changed, 2311 deletions(-)

diff --git a/target/linux/x86/64/config-6.1 b/target/linux/x86/64/config-6.1
deleted file mode 100644
index 3767fd4b9b..0000000000
--- a/target/linux/x86/64/config-6.1
+++ /dev/null
@@ -1,607 +0,0 @@
-CONFIG_64BIT=y
-# CONFIG_ACER_WMI is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_BATTERY=y
-# CONFIG_ACPI_BGRT is not set
-CONFIG_ACPI_BUTTON=y
-# CONFIG_ACPI_CMPC is not set
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_CPPC_LIB=y
-CONFIG_ACPI_CPU_FREQ_PSS=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_DPTF is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-CONFIG_ACPI_FAN=y
-# CONFIG_ACPI_FPDT is not set
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_HOTPLUG_IOAPIC=y
-# CONFIG_ACPI_I2C_OPREGION is not set
-CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
-CONFIG_ACPI_LPIT=y
-CONFIG_ACPI_PCC=y
-# CONFIG_ACPI_PCI_SLOT is not set
-# CONFIG_ACPI_PFRUT is not set
-CONFIG_ACPI_PRMT=y
-CONFIG_ACPI_PROCESSOR=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_PROCESSOR_CSTATE=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
-# CONFIG_ACPI_SBS is not set
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
-# CONFIG_ACPI_TAD is not set
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TOSHIBA is not set
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ACRN_GUEST is not set
-# CONFIG_ADV_SWBUTTON is not set
-CONFIG_AGP=y
-# CONFIG_AGP_AMD64 is not set
-CONFIG_AGP_INTEL=y
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_AMD_HSMP is not set
-CONFIG_AMD_IOMMU=y
-CONFIG_AMD_IOMMU_V2=y
-# CONFIG_AMD_PMC is not set
-# CONFIG_AMD_PMF is not set
-# CONFIG_AMD_PTDMA is not set
-# CONFIG_AMD_SFH_HID is not set
-CONFIG_ARCH_CPUIDLE_HALTPOLL=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
-CONFIG_ARCH_MMAP_RND_BITS=28
-CONFIG_ARCH_MMAP_RND_BITS_MAX=32
-CONFIG_ARCH_MMAP_RND_BITS_MIN=28
-CONFIG_ARCH_NR_GPIO=1024
-CONFIG_ARCH_SPARSEMEM_DEFAULT=y
-CONFIG_ARCH_WANTS_THP_SWAP=y
-# CONFIG_ASUS_TF103C_DOCK is not set
-# CONFIG_ASUS_WMI is not set
-CONFIG_AUDIT_ARCH=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BALLOON_COMPACTION=y
-CONFIG_BLK_DEV_BSGLIB=y
-CONFIG_BLK_DEV_BSG_COMMON=y
-CONFIG_BLK_DEV_INTEGRITY=y
-CONFIG_BLK_DEV_INTEGRITY_T10=y
-CONFIG_BLK_DEV_NVME=y
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_MQ_VIRTIO=y
-CONFIG_BLK_PM=y
-# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
-CONFIG_BTT=y
-CONFIG_CDROM=y
-CONFIG_CONNECTOR=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
-CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
-CONFIG_CPU_IBPB_ENTRY=y
-CONFIG_CPU_IBRS_ENTRY=y
-# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SRSO=y
-CONFIG_CPU_UNRET_ENTRY=y
-CONFIG_CRC_T10DIF=y
-CONFIG_CRYPTO_AES_NI_INTEL=y
-# CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set
-CONFIG_CRYPTO_BLAKE2S_X86=y
-# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
-# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set
-# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set
-# CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
-# CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set
-# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set
-CONFIG_CRYPTO_CRCT10DIF=y
-# CONFIG_CRYPTO_CRCT10DIF_PCLMUL is not set
-CONFIG_CRYPTO_CRYPTD=y
-# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
-CONFIG_CRYPTO_LRW=y
-# CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set
-# CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set
-# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set
-# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
-# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set
-# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
-# CONFIG_CRYPTO_SHA1_SSSE3 is not set
-# CONFIG_CRYPTO_SHA256_SSSE3 is not set
-# CONFIG_CRYPTO_SHA512_SSSE3 is not set
-CONFIG_CRYPTO_SIMD=y
-# CONFIG_CRYPTO_SM3_AVX_X86_64 is not set
-# CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64 is not set
-# CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64 is not set
-# CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set
-# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
-# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
-CONFIG_CRYPTO_XTS=y
-# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-CONFIG_DMA_ACPI=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DRM=y
-CONFIG_DRM_BOCHS=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_GEM_SHMEM_HELPER=y
-# CONFIG_DRM_HYPERV is not set
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_GVT=y
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_MIPI_DSI=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_TTM=y
-CONFIG_DRM_TTM_HELPER=y
-CONFIG_DRM_VIRTIO_GPU=y
-CONFIG_DRM_VRAM_HELPER=y
-CONFIG_EFI=y
-CONFIG_EFIVAR_FS=m
-# CONFIG_EFI_BOOTLOADER_CONTROL is not set
-# CONFIG_EFI_CAPSULE_LOADER is not set
-# CONFIG_EFI_COCO_SECRET is not set
-# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
-# CONFIG_EFI_DISABLE_PCI_DMA is not set
-# CONFIG_EFI_DISABLE_RUNTIME is not set
-CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
-CONFIG_EFI_EARLYCON=y
-CONFIG_EFI_ESRT=y
-# CONFIG_EFI_FAKE_MEMMAP is not set
-CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
-# CONFIG_EFI_MIXED is not set
-# CONFIG_EFI_PGT_DUMP is not set
-# CONFIG_EFI_RCI2_TABLE is not set
-CONFIG_EFI_RUNTIME_MAP=y
-CONFIG_EFI_RUNTIME_WRAPPERS=y
-# CONFIG_EFI_SECRET is not set
-CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
-# CONFIG_EFI_VARS is not set
-CONFIG_FAILOVER=y
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_EFI=y
-CONFIG_FB_HYPERV=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_SIMPLE=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-CONFIG_FB_TILEBLITTING=y
-# CONFIG_FB_VESA is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-CONFIG_FREEZER=y
-CONFIG_FUSION_SAS=y
-CONFIG_FW_CACHE=y
-CONFIG_GART_IOMMU=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CPU=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_PENDING_IRQ=y
-# CONFIG_GIGABYTE_WMI is not set
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_ICH=y
-CONFIG_GPIO_SCH=y
-CONFIG_HALTPOLL_CPUIDLE=y
-CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
-CONFIG_HDMI=y
-CONFIG_HIBERNATE_CALLBACKS=y
-CONFIG_HID_BATTERY_STRENGTH=y
-CONFIG_HID_GENERIC=y
-CONFIG_HID_HYPERV_MOUSE=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_ACPI=y
-# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HOTPLUG_SMT=y
-CONFIG_HPET=y
-CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
-# CONFIG_HUAWEI_WMI is not set
-CONFIG_HVC_DRIVER=y
-CONFIG_HVC_IRQ=y
-CONFIG_HVC_XEN=y
-CONFIG_HVC_XEN_FRONTEND=y
-CONFIG_HWMON=y
-CONFIG_HWMON_VID=y
-CONFIG_HW_RANDOM_AMD=y
-CONFIG_HW_RANDOM_INTEL=y
-CONFIG_HW_RANDOM_VIRTIO=y
-CONFIG_HYPERV=y
-CONFIG_HYPERVISOR_GUEST=y
-CONFIG_HYPERV_BALLOON=y
-CONFIG_HYPERV_IOMMU=y
-CONFIG_HYPERV_KEYBOARD=y
-CONFIG_HYPERV_NET=y
-CONFIG_HYPERV_STORAGE=y
-# CONFIG_HYPERV_TESTING is not set
-CONFIG_HYPERV_TIMER=y
-CONFIG_HYPERV_UTILS=y
-# CONFIG_HYPERV_VSOCKETS is not set
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
-# CONFIG_IA32_EMULATION is not set
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
-CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
-CONFIG_INTEL_GTT=y
-CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_IDXD is not set
-# CONFIG_INTEL_IDXD_COMPAT is not set
-CONFIG_INTEL_IOMMU=y
-# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
-CONFIG_INTEL_IOMMU_FLOPPY_WA=y
-CONFIG_INTEL_IOMMU_PERF_EVENTS=y
-# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
-# CONFIG_INTEL_IOMMU_SVM is not set
-# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MEI_HDCP is not set
-# CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
-CONFIG_INTEL_PCH_THERMAL=y
-# CONFIG_INTEL_SAR_INT1092 is not set
-# CONFIG_INTEL_SCU_PLATFORM is not set
-CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
-CONFIG_INTEL_SOC_DTS_THERMAL=y
-# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
-CONFIG_INTEL_TDX_GUEST=y
-# CONFIG_INTEL_TURBO_MAX_3 is not set
-# CONFIG_INTEL_TXT is not set
-# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
-# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
-# CONFIG_INTEL_WMI_THUNDERBOLT is not set
-CONFIG_INTERVAL_TREE=y
-CONFIG_IOASID=y
-CONFIG_IOMMU_API=y
-# CONFIG_IOMMU_DEBUG is not set
-# CONFIG_IOMMU_DEBUGFS is not set
-CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
-# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
-# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
-CONFIG_IOMMU_DMA=y
-CONFIG_IOMMU_HELPER=y
-CONFIG_IOMMU_IOVA=y
-CONFIG_IOMMU_SUPPORT=y
-CONFIG_IOSF_MBI=y
-# CONFIG_IOSF_MBI_DEBUG is not set
-CONFIG_IRQ_MSI_IOMMU=y
-CONFIG_IRQ_REMAP=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_ISO9660_FS=y
-CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y
-CONFIG_KCMP=y
-CONFIG_KVM_GUEST=y
-CONFIG_LEDS_GPIO=y
-# CONFIG_LEGACY_VSYSCALL_EMULATE is not set
-CONFIG_LEGACY_VSYSCALL_NONE=y
-# CONFIG_LEGACY_VSYSCALL_XONLY is not set
-# CONFIG_LG_LAPTOP is not set
-CONFIG_LIBNVDIMM=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_LPC_ICH=y
-CONFIG_LPC_SCH=y
-CONFIG_MAILBOX=y
-# CONFIG_MAXSMP is not set
-CONFIG_MEMORY_BALLOON=y
-CONFIG_MEMREGION=y
-# CONFIG_MERAKI_MX100 is not set
-CONFIG_MFD_CORE=y
-# CONFIG_MFD_INTEL_LPSS_ACPI is not set
-# CONFIG_MFD_INTEL_PMC_BXT is not set
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_CQHCI=y
-CONFIG_MMC_RICOH_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_ACPI=y
-CONFIG_MMC_SDHCI_IO_ACCESSORS=y
-CONFIG_MMC_SDHCI_PCI=y
-# CONFIG_MMC_SDHCI_PLTFM is not set
-# CONFIG_MMC_WBSD is not set
-CONFIG_MMU_NOTIFIER=y
-CONFIG_MODULES_USE_ELF_RELA=y
-# CONFIG_MPSC is not set
-# CONFIG_MSI_WMI is not set
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-# CONFIG_MXM_WMI is not set
-CONFIG_ND_BLK=y
-CONFIG_ND_BTT=y
-CONFIG_ND_CLAIM=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NET_FAILOVER=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-# CONFIG_NITRO_ENCLAVES is not set
-CONFIG_NR_CPUS=512
-CONFIG_NR_CPUS_DEFAULT=64
-CONFIG_NR_CPUS_RANGE_BEGIN=2
-CONFIG_NR_CPUS_RANGE_END=512
-# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
-CONFIG_NVME_CORE=y
-CONFIG_NVME_HWMON=y
-CONFIG_NVME_MULTIPATH=y
-CONFIG_OUTPUT_FORMAT="elf64-x86-64"
-CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_REPORTING=y
-CONFIG_PAGE_TABLE_ISOLATION=y
-CONFIG_PARAVIRT=y
-CONFIG_PARAVIRT_CLOCK=y
-# CONFIG_PARAVIRT_DEBUG is not set
-CONFIG_PARAVIRT_SPINLOCKS=y
-CONFIG_PARAVIRT_XXL=y
-CONFIG_PATA_AMD=y
-CONFIG_PATA_ATIIXP=y
-CONFIG_PATA_MPIIX=y
-CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_TIMINGS=y
-CONFIG_PATA_VIA=y
-CONFIG_PCC=y
-# CONFIG_PCENGINES_APU2 is not set
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_PME=y
-CONFIG_PCI_HYPERV=y
-CONFIG_PCI_HYPERV_INTERFACE=y
-# CONFIG_PCI_MMCONFIG is not set
-CONFIG_PCI_XEN=y
-# CONFIG_PEAQ_WMI is not set
-CONFIG_PGTABLE_LEVELS=4
-CONFIG_PHYSICAL_ALIGN=0x1000000
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_ALDERLAKE=y
-CONFIG_PINCTRL_BAYTRAIL=y
-CONFIG_PINCTRL_BROXTON=y
-CONFIG_PINCTRL_CANNONLAKE=y
-CONFIG_PINCTRL_CHERRYVIEW=y
-CONFIG_PINCTRL_DENVERTON=y
-CONFIG_PINCTRL_ELKHARTLAKE=y
-CONFIG_PINCTRL_EMMITSBURG=y
-CONFIG_PINCTRL_GEMINILAKE=y
-CONFIG_PINCTRL_INTEL=y
-CONFIG_PINCTRL_JASPERLAKE=y
-CONFIG_PINCTRL_LAKEFIELD=y
-CONFIG_PINCTRL_LEWISBURG=y
-CONFIG_PINCTRL_LYNXPOINT=y
-CONFIG_PINCTRL_METEORLAKE=y
-CONFIG_PINCTRL_SUNRISEPOINT=y
-CONFIG_PINCTRL_TIGERLAKE=y
-CONFIG_PM=y
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PM_CLK=y
-CONFIG_PM_SLEEP=y
-CONFIG_PM_SLEEP_SMP=y
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_PPS=y
-CONFIG_PROC_EVENTS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_KVM=y
-CONFIG_PTP_1588_CLOCK_VMW=y
-CONFIG_PVH=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RAS=y
-CONFIG_RELAY=y
-CONFIG_RELOCATABLE=y
-CONFIG_RESET_ATTACK_MITIGATION=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_SATA_AHCI=y
-# CONFIG_SCHED_CORE is not set
-CONFIG_SCHED_MC=y
-CONFIG_SCHED_MC_PRIO=y
-CONFIG_SCHED_SMT=y
-CONFIG_SCSI_SAS_ATTRS=y
-CONFIG_SCSI_VIRTIO=y
-# CONFIG_SENSORS_ASUS_EC is not set
-# CONFIG_SENSORS_ASUS_WMI is not set
-CONFIG_SENSORS_CORETEMP=y
-CONFIG_SENSORS_FAM15H_POWER=y
-CONFIG_SENSORS_I5500=y
-CONFIG_SENSORS_K8TEMP=y
-CONFIG_SENSORS_K10TEMP=y
-CONFIG_SENSORS_VIA_CPUTEMP=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
-CONFIG_SLS=y
-CONFIG_SMP=y
-# CONFIG_SND_HDA_CTL_DEV_ID is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
-# CONFIG_SND_SOC_AMD_ACP6x is not set
-# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
-# CONFIG_SND_SOC_AMD_PS is not set
-# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
-# CONFIG_SND_SOC_INTEL_AVS is not set
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_MANUAL=y
-# CONFIG_SPARSEMEM_VMEMMAP is not set
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_STACK_VALIDATION=y
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_SWIOTLB=y
-CONFIG_SWIOTLB_XEN=y
-CONFIG_SYNC_FILE=y
-# CONFIG_SYSTEM76_ACPI is not set
-CONFIG_SYS_HYPERVISOR=y
-CONFIG_THERMAL_GOV_USER_SPACE=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
-# CONFIG_THINKPAD_LMI is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_WMI is not set
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-# CONFIG_UACCE is not set
-# CONFIG_UCLAMP_TASK is not set
-CONFIG_UCS2_STRING=y
-# CONFIG_UNWINDER_ORC is not set
-CONFIG_USB_STORAGE=y
-# CONFIG_VIDEO_IPU3_CIO2 is not set
-CONFIG_VIRTIO=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
-CONFIG_VIRTIO_IOMMU=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_PCI_LEGACY=y
-CONFIG_VIRTIO_PCI_LIB=y
-# CONFIG_VIRTIO_PMEM is not set
-# CONFIG_VIRTIO_VSOCKETS is not set
-CONFIG_VIRTIO_VSOCKETS_COMMON=y
-CONFIG_VIRT_DRIVERS=y
-CONFIG_VMAP_PFN=y
-CONFIG_VMAP_STACK=y
-# CONFIG_VMD is not set
-CONFIG_VMGENID=y
-CONFIG_VMWARE_BALLOON=y
-CONFIG_VMWARE_PVSCSI=y
-CONFIG_VMWARE_VMCI=y
-CONFIG_VMWARE_VMCI_VSOCKETS=y
-CONFIG_VMXNET3=y
-CONFIG_VSOCKETS=y
-CONFIG_VSOCKETS_LOOPBACK=y
-CONFIG_VT_CONSOLE_SLEEP=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WIRELESS_HOTKEY is not set
-# CONFIG_WMI_BMOF is not set
-# CONFIG_X86_5LEVEL is not set
-CONFIG_X86_64=y
-CONFIG_X86_64_SMP=y
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
-CONFIG_X86_AMD_FREQ_SENSITIVITY=y
-CONFIG_X86_AMD_PLATFORM_DEVICE=y
-CONFIG_X86_AMD_PSTATE=y
-# CONFIG_X86_AMD_PSTATE_UT is not set
-CONFIG_X86_CPUID=y
-CONFIG_X86_DIRECT_GBPAGES=y
-CONFIG_X86_HV_CALLBACK_VECTOR=y
-CONFIG_X86_INTEL_LPSS=y
-# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set
-CONFIG_X86_INTEL_PSTATE=y
-# CONFIG_X86_KERNEL_IBT is not set
-CONFIG_X86_MINIMUM_CPU_FAMILY=64
-# CONFIG_X86_PCC_CPUFREQ is not set
-CONFIG_X86_PKG_TEMP_THERMAL=y
-# CONFIG_X86_PMEM_LEGACY is not set
-CONFIG_X86_PM_TIMER=y
-# CONFIG_X86_POWERNOW_K8 is not set
-# CONFIG_X86_VSYSCALL_EMULATION is not set
-CONFIG_X86_X2APIC=y
-# CONFIG_X86_X32 is not set
-# CONFIG_X86_X32_ABI is not set
-CONFIG_XEN=y
-CONFIG_XENFS=y
-CONFIG_XEN_512GB=y
-CONFIG_XEN_ACPI=y
-CONFIG_XEN_ACPI_PROCESSOR=y
-CONFIG_XEN_AUTO_XLATE=y
-# CONFIG_XEN_BACKEND is not set
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_BLKDEV_FRONTEND=y
-CONFIG_XEN_COMPAT_XENFS=y
-CONFIG_XEN_DEBUG_FS=y
-CONFIG_XEN_DEV_EVTCHN=y
-CONFIG_XEN_DOM0=y
-CONFIG_XEN_EFI=y
-CONFIG_XEN_FBDEV_FRONTEND=y
-CONFIG_XEN_GNTDEV=y
-CONFIG_XEN_GRANT_DEV_ALLOC=y
-CONFIG_XEN_HAVE_PVMMU=y
-CONFIG_XEN_HAVE_VPMU=y
-# CONFIG_XEN_MCE_LOG is not set
-CONFIG_XEN_NETDEV_FRONTEND=y
-CONFIG_XEN_PCIDEV_FRONTEND=y
-CONFIG_XEN_PRIVCMD=y
-CONFIG_XEN_PV=y
-CONFIG_XEN_PVH=y
-CONFIG_XEN_PVHVM=y
-CONFIG_XEN_PVHVM_GUEST=y
-CONFIG_XEN_PVHVM_SMP=y
-CONFIG_XEN_PV_DOM0=y
-CONFIG_XEN_PV_MSR_SAFE=y
-CONFIG_XEN_PV_SMP=y
-CONFIG_XEN_SAVE_RESTORE=y
-CONFIG_XEN_SCSI_FRONTEND=y
-CONFIG_XEN_SYMS=y
-CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_VIRTIO=y
-# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
-CONFIG_XEN_WDT=y
-CONFIG_XEN_XENBUS_FRONTEND=y
-# CONFIG_XIAOMI_WMI is not set
-CONFIG_XPS=y
-# CONFIG_YOGABOOK_WMI is not set
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZONE_DMA32=y
diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1
deleted file mode 100644
index 6c9f30cf91..0000000000
--- a/target/linux/x86/config-6.1
+++ /dev/null
@@ -1,464 +0,0 @@
-# CONFIG_60XX_WDT is not set
-# CONFIG_64BIT is not set
-# CONFIG_ACPI is not set
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-# CONFIG_ALIM1535_WDT is not set
-# CONFIG_ALIX is not set
-CONFIG_AMD_NB=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_CLOCKSOURCE_INIT=y
-CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
-CONFIG_ARCH_NR_GPIO=512
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SPLIT_ARG64=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USES_PG_UNCACHED=y
-CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ATA=y
-CONFIG_ATA_GENERIC=y
-CONFIG_ATA_PIIX=y
-# CONFIG_BARCO_P50_GPIO is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_BOUNCE=y
-CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
-CONFIG_CC_NO_ARRAY_BOUNDS=y
-CONFIG_CLKBLD_I8253=y
-CONFIG_CLKEVT_I8253=y
-CONFIG_CLKSRC_I8253=y
-CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
-CONFIG_COMPAT_32=y
-CONFIG_COMPAT_32BIT_TIME=y
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_CONSOLE_TRANSLATIONS=y
-# CONFIG_CPU5_WDT is not set
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_GOV_ATTR_SET=y
-CONFIG_CPU_FREQ_GOV_COMMON=y
-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
-CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
-# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_SUP_AMD=y
-CONFIG_CPU_SUP_CENTAUR=y
-CONFIG_CPU_SUP_CYRIX_32=y
-CONFIG_CPU_SUP_HYGON=y
-CONFIG_CPU_SUP_INTEL=y
-CONFIG_CPU_SUP_TRANSMETA_32=y
-CONFIG_CPU_SUP_UMC_32=y
-CONFIG_CPU_SUP_VORTEX_32=y
-CONFIG_CPU_SUP_ZHAOXIN=y
-CONFIG_CRASH_CORE=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_CRC32=y
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_CRC32_PCLMUL is not set
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
-CONFIG_CRYPTO_LIB_SHA1=y
-CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
-# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
-# CONFIG_CX_ECAT is not set
-CONFIG_DCACHE_WORD_ACCESS=y
-# CONFIG_DEBUG_BOOT_PARAMS is not set
-# CONFIG_DEBUG_ENTRY is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set
-CONFIG_DEBUG_MEMORY_INIT=y
-CONFIG_DEBUG_MISC=y
-# CONFIG_DEBUG_NMI_SELFTEST is not set
-# CONFIG_DEBUG_TLBFLUSH is not set
-CONFIG_DECOMPRESS_BZIP2=y
-CONFIG_DECOMPRESS_GZIP=y
-CONFIG_DMADEVICES=y
-CONFIG_DMI=y
-CONFIG_DMIID=y
-CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
-CONFIG_DMI_SYSFS=y
-# CONFIG_DM_AUDIT is not set
-CONFIG_DNOTIFY=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_DYNAMIC_SIGFRAME=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_EARLY_PRINTK_DBGP is not set
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-# CONFIG_EDD is not set
-CONFIG_EFI_HANDOVER_PROTOCOL=y
-# CONFIG_EISA is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_EXAR_WDT is not set
-CONFIG_EXCLUSIVE_SYSTEM_RAM=y
-CONFIG_EXT4_FS=y
-CONFIG_F2FS_FS=y
-# CONFIG_F71808E_WDT is not set
-CONFIG_FIRMWARE_MEMMAP=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FRAME_POINTER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FUSION=y
-# CONFIG_FUSION_CTL is not set
-# CONFIG_FUSION_LOGGING is not set
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_SPI=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
-# CONFIG_GDS_FORCE_MITIGATION is not set
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_ENTRY=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
-CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_VDSO_32=y
-# CONFIG_GEOS is not set
-CONFIG_GLOB=y
-CONFIG_GPIO_CDEV=y
-# CONFIG_HANGCHECK_TIMER is not set
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
-CONFIG_HIGHMEM=y
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_HIGHPTE=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_GEODE=y
-CONFIG_HW_RANDOM_VIA=y
-# CONFIG_HYPERVISOR_GUEST is not set
-CONFIG_HZ_PERIODIC=y
-CONFIG_I8253_LOCK=y
-CONFIG_IA32_FEAT_CTL=y
-# CONFIG_IB700_WDT is not set
-# CONFIG_IBMASR is not set
-# CONFIG_IBM_RTL is not set
-# CONFIG_IE6XX_WDT is not set
-CONFIG_ILLEGAL_POINTER_VALUE=0
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_VIVALDIFMAP=y
-CONFIG_INSTRUCTION_DECODER=y
-# CONFIG_INTEL_HFI_THERMAL is not set
-# CONFIG_INTEL_LDMA is not set
-# CONFIG_INTEL_PCH_THERMAL is not set
-# CONFIG_INTEL_POWERCLAMP is not set
-# CONFIG_INTEL_SCU_PCI is not set
-# CONFIG_INTEL_TCC_COOLING is not set
-# CONFIG_INTEL_VSEC is not set
-# CONFIG_IOSF_MBI is not set
-CONFIG_IO_DELAY_0X80=y
-# CONFIG_IO_DELAY_0XED is not set
-# CONFIG_IO_DELAY_NONE is not set
-# CONFIG_IO_DELAY_UDELAY is not set
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-# CONFIG_ISA is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_IT8712F_WDT is not set
-# CONFIG_IT87_WDT is not set
-# CONFIG_ITCO_WDT is not set
-CONFIG_JBD2=y
-CONFIG_KALLSYMS=y
-CONFIG_KEXEC=y
-CONFIG_KEXEC_CORE=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KMAP_LOCAL=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-# CONFIG_M486 is not set
-# CONFIG_M486SX is not set
-# CONFIG_M586 is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M586TSC is not set
-CONFIG_M686=y
-# CONFIG_MACHZ_WDT is not set
-# CONFIG_MATOM is not set
-# CONFIG_MCORE2 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MELAN is not set
-CONFIG_MEMFD_CREATE=y
-# CONFIG_MFD_INTEL_LPSS_PCI is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-CONFIG_MICROCODE=y
-CONFIG_MICROCODE_AMD=y
-CONFIG_MICROCODE_INTEL=y
-CONFIG_MICROCODE_LATE_LOADING=y
-CONFIG_MIGRATION=y
-CONFIG_MITIGATION_RFDS=y
-CONFIG_MITIGATION_SPECTRE_BHI=y
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-CONFIG_MMU_GATHER_MERGE_VMAS=y
-# CONFIG_MODIFY_LDT_SYSCALL is not set
-CONFIG_MODULES_TREE_LOOKUP=y
-CONFIG_MODULES_USE_ELF_REL=y
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MTD is not set
-CONFIG_MTRR=y
-# CONFIG_MTRR_SANITIZER is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_MVIAC7 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MWINCHIPC6 is not set
-CONFIG_NAMESPACES=y
-CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-# CONFIG_NET5501 is not set
-# CONFIG_NET_NS is not set
-CONFIG_NLS=y
-# CONFIG_NOHIGHMEM is not set
-CONFIG_NR_CPUS=1
-CONFIG_NR_CPUS_DEFAULT=1
-CONFIG_NR_CPUS_RANGE_BEGIN=1
-CONFIG_NR_CPUS_RANGE_END=1
-# CONFIG_NSC_GPIO is not set
-CONFIG_NVRAM=y
-# CONFIG_OF is not set
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-# CONFIG_OLPC is not set
-CONFIG_OUTPUT_FORMAT="elf32-i386"
-# CONFIG_P2SB is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
-CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PC104=y
-# CONFIG_PC8736x_GPIO is not set
-# CONFIG_PC87413_WDT is not set
-# CONFIG_PCENGINES_APU2 is not set
-CONFIG_PCI=y
-CONFIG_PCI_ATS=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_GOANY=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-CONFIG_PCI_IOV=y
-CONFIG_PCI_LABEL=y
-CONFIG_PCI_LOCKLESS_CONFIG=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
-CONFIG_PCSPKR_PLATFORM=y
-CONFIG_PERF_EVENTS=y
-# CONFIG_PERF_EVENTS_AMD_BRS is not set
-# CONFIG_PERF_EVENTS_AMD_UNCORE is not set
-CONFIG_PERF_EVENTS_INTEL_CSTATE=y
-CONFIG_PERF_EVENTS_INTEL_RAPL=y
-CONFIG_PERF_EVENTS_INTEL_UNCORE=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYSICAL_ALIGN=0x100000
-CONFIG_PHYSICAL_START=0x1000000
-# CONFIG_PHY_INTEL_LGM_EMMC is not set
-CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PREEMPT_NONE_BUILD=y
-# CONFIG_PROCESSOR_SELECT is not set
-CONFIG_PROC_PAGE_MONITOR=y
-CONFIG_PROC_PID_ARCH_STATUS=y
-# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-# CONFIG_PUNIT_ATOM_DEBUG is not set
-CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RATIONAL=y
-CONFIG_RD_BZIP2=y
-CONFIG_RD_GZIP=y
-CONFIG_RETHUNK=y
-CONFIG_RETPOLINE=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_MC146818_LIB=y
-CONFIG_SATA_HOST=y
-# CONFIG_SBC7240_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-# CONFIG_SC1200_WDT is not set
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SCx200=y
-CONFIG_SCx200HR_TIMER=y
-# CONFIG_SCx200_GPIO is not set
-# CONFIG_SCx200_WDT is not set
-CONFIG_SERIAL_8250_PCI=y
-# CONFIG_SERIAL_LANTIQ is not set
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SG_POOL=y
-# CONFIG_SIEMENS_SIMATIC_IPC is not set
-# CONFIG_SMSC37B787_WDT is not set
-# CONFIG_SMSC_SCH311X_WDT is not set
-CONFIG_SOFTIRQ_ON_OWN_STACK=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPECULATION_MITIGATIONS=y
-CONFIG_SRCU=y
-# CONFIG_STATIC_CALL_SELFTEST is not set
-# CONFIG_STRICT_SIGALTSTACK_SIZE is not set
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-# CONFIG_SYSFB_SIMPLEFB is not set
-# CONFIG_TELCLOCK is not set
-# CONFIG_TEST_FPU is not set
-CONFIG_THERMAL=y
-CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
-CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
-CONFIG_THERMAL_GOV_STEP_WISE=y
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TINY_SRCU=y
-# CONFIG_TOSHIBA is not set
-# CONFIG_TQMX86_WDT is not set
-CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
-CONFIG_UNWINDER_FRAME_POINTER=y
-# CONFIG_UNWINDER_GUESS is not set
-CONFIG_UP_LATE_INIT=y
-CONFIG_USB=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_EHCI_PCI=y
-CONFIG_USB_HID=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_PCI=y
-# CONFIG_USB_OHCI_HCD_PLATFORM is not set
-CONFIG_USB_PCI=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_UHCI_HCD=y
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_PCI=y
-# CONFIG_USB_XHCI_PLATFORM is not set
-# CONFIG_USER_NS is not set
-CONFIG_USER_STACKTRACE_SUPPORT=y
-CONFIG_VGA_CONSOLE=y
-# CONFIG_VIA_WDT is not set
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-# CONFIG_WAFER_WDT is not set
-# CONFIG_WINMATE_FM07_KEYS is not set
-CONFIG_X86=y
-CONFIG_X86_32=y
-# CONFIG_X86_32_IRIS is not set
-# CONFIG_X86_ANCIENT_MCE is not set
-# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
-CONFIG_X86_CMOV=y
-CONFIG_X86_CMPXCHG64=y
-# CONFIG_X86_CPA_STATISTICS is not set
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-# CONFIG_X86_CPUID is not set
-# CONFIG_X86_CPU_RESCTRL is not set
-CONFIG_X86_DEBUGCTLMSR=y
-# CONFIG_X86_DEBUG_FPU is not set
-# CONFIG_X86_DECODER_SELFTEST is not set
-# CONFIG_X86_EXTENDED_PLATFORM is not set
-CONFIG_X86_FEATURE_NAMES=y
-CONFIG_X86_GENERIC=y
-# CONFIG_X86_GX_SUSPMOD is not set
-# CONFIG_X86_INTEL_PSTATE is not set
-# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
-CONFIG_X86_INTEL_TSX_MODE_OFF=y
-# CONFIG_X86_INTEL_TSX_MODE_ON is not set
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_INTERNODE_CACHE_SHIFT=6
-CONFIG_X86_IOPL_IOPERM=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_L1_CACHE_SHIFT=6
-# CONFIG_X86_LEGACY_VM86 is not set
-CONFIG_X86_LOCAL_APIC=y
-# CONFIG_X86_LONGRUN is not set
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCELOG_LEGACY is not set
-CONFIG_X86_MCE_AMD=y
-# CONFIG_X86_MCE_INJECT is not set
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_THRESHOLD=y
-CONFIG_X86_MINIMUM_CPU_FAMILY=6
-CONFIG_X86_MPPARSE=y
-CONFIG_X86_MSR=y
-# CONFIG_X86_P4_CLOCKMOD is not set
-CONFIG_X86_PAT=y
-CONFIG_X86_PLATFORM_DEVICES=y
-# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
-# CONFIG_X86_PLATFORM_DRIVERS_HP is not set
-# CONFIG_X86_POWERNOW_K6 is not set
-# CONFIG_X86_POWERNOW_K7 is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-# CONFIG_X86_SPEEDSTEP_ICH is not set
-# CONFIG_X86_SPEEDSTEP_SMI is not set
-CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
-CONFIG_X86_THERMAL_VECTOR=y
-CONFIG_X86_TSC=y
-CONFIG_X86_UMIP=y
-CONFIG_X86_UP_APIC=y
-CONFIG_X86_UP_IOAPIC=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_VERBOSE_BOOTUP=y
-CONFIG_X86_VMX_FEATURE_NAMES=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_XZ_DEC_X86=y
-CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/x86/generic/config-6.1 b/target/linux/x86/generic/config-6.1
deleted file mode 100644
index b7c79de273..0000000000
--- a/target/linux/x86/generic/config-6.1
+++ /dev/null
@@ -1,509 +0,0 @@
-# CONFIG_3C515 is not set
-# CONFIG_ACER_WMI is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_BATTERY=y
-# CONFIG_ACPI_BGRT is not set
-CONFIG_ACPI_BUTTON=y
-# CONFIG_ACPI_CMPC is not set
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_CPU_FREQ_PSS=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_DPTF is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-# CONFIG_ACPI_FAN is not set
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_HOTPLUG_IOAPIC=y
-# CONFIG_ACPI_I2C_OPREGION is not set
-CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
-# CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_PROCESSOR=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_PROCESSOR_CSTATE=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
-# CONFIG_ACPI_SBS is not set
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
-CONFIG_ACPI_TAD=y
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TOSHIBA is not set
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ADV_SWBUTTON is not set
-CONFIG_AGP=y
-# CONFIG_AGP_ALI is not set
-# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD64 is not set
-# CONFIG_AGP_ATI is not set
-# CONFIG_AGP_EFFICEON is not set
-CONFIG_AGP_INTEL=y
-# CONFIG_AGP_NVIDIA is not set
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_SWORKS is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_AMD_PMC is not set
-# CONFIG_AMD_PMF is not set
-# CONFIG_APM is not set
-CONFIG_ARCH_CPUIDLE_HALTPOLL=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
-# CONFIG_ASUS_TF103C_DOCK is not set
-# CONFIG_ASUS_WMI is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BALLOON_COMPACTION=y
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_MQ_VIRTIO=y
-CONFIG_BLK_PM=y
-# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
-CONFIG_BTT=y
-CONFIG_CDROM=y
-CONFIG_CONNECTOR=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
-CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
-# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_RMAP=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-# CONFIG_CS89x0_ISA is not set
-# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
-CONFIG_DMA_ACPI=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DRM=y
-CONFIG_DRM_BOCHS=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_GEM_SHMEM_HELPER=y
-# CONFIG_DRM_HYPERV is not set
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_MIPI_DSI=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_TTM=y
-CONFIG_DRM_TTM_HELPER=y
-CONFIG_DRM_VIRTIO_GPU=y
-CONFIG_DRM_VRAM_HELPER=y
-CONFIG_EFI=y
-CONFIG_EFIVAR_FS=m
-# CONFIG_EFI_BOOTLOADER_CONTROL is not set
-# CONFIG_EFI_CAPSULE_LOADER is not set
-# CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH is not set
-# CONFIG_EFI_COCO_SECRET is not set
-# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
-# CONFIG_EFI_DISABLE_PCI_DMA is not set
-# CONFIG_EFI_DISABLE_RUNTIME is not set
-CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
-CONFIG_EFI_EARLYCON=y
-CONFIG_EFI_ESRT=y
-# CONFIG_EFI_FAKE_MEMMAP is not set
-CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
-# CONFIG_EFI_PGT_DUMP is not set
-# CONFIG_EFI_RCI2_TABLE is not set
-CONFIG_EFI_RUNTIME_MAP=y
-CONFIG_EFI_RUNTIME_WRAPPERS=y
-CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
-# CONFIG_EFI_VARS is not set
-# CONFIG_EL3 is not set
-CONFIG_FAILOVER=y
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_EFI=y
-CONFIG_FB_HYPERV=y
-# CONFIG_FB_I810 is not set
-CONFIG_FB_SIMPLE=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-# CONFIG_FB_VESA is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-CONFIG_FREEZER=y
-CONFIG_FW_CACHE=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_GENERIC_PINCONF=y
-# CONFIG_GIGABYTE_WMI is not set
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GUP_GET_PTE_LOW_HIGH=y
-CONFIG_HALTPOLL_CPUIDLE=y
-CONFIG_HDMI=y
-CONFIG_HIBERNATE_CALLBACKS=y
-CONFIG_HID_BATTERY_STRENGTH=y
-CONFIG_HID_GENERIC=y
-CONFIG_HID_HYPERV_MOUSE=y
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_ACPI=y
-# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
-# CONFIG_HOTPLUG_PCI_COMPAQ is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_IBM is not set
-CONFIG_HOTPLUG_PCI_PCIE=y
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HOTPLUG_SMT=y
-CONFIG_HPET=y
-CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
-# CONFIG_HUAWEI_WMI is not set
-CONFIG_HVC_DRIVER=y
-CONFIG_HVC_IRQ=y
-CONFIG_HVC_XEN=y
-CONFIG_HVC_XEN_FRONTEND=y
-CONFIG_HWMON=y
-CONFIG_HWMON_VID=y
-CONFIG_HW_RANDOM_VIRTIO=y
-CONFIG_HYPERV=y
-CONFIG_HYPERVISOR_GUEST=y
-CONFIG_HYPERV_BALLOON=y
-CONFIG_HYPERV_KEYBOARD=y
-CONFIG_HYPERV_NET=y
-CONFIG_HYPERV_STORAGE=y
-# CONFIG_HYPERV_TESTING is not set
-CONFIG_HYPERV_TIMER=y
-CONFIG_HYPERV_UTILS=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
-# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
-CONFIG_INTEL_GTT=y
-CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MEI_HDCP is not set
-# CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
-CONFIG_INTEL_PCH_THERMAL=y
-# CONFIG_INTEL_SAR_INT1092 is not set
-# CONFIG_INTEL_SCU_PLATFORM is not set
-CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
-CONFIG_INTEL_SOC_DTS_THERMAL=y
-# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
-# CONFIG_INTEL_WMI_THUNDERBOLT is not set
-CONFIG_INTERVAL_TREE=y
-CONFIG_IOSF_MBI=y
-# CONFIG_IOSF_MBI_DEBUG is not set
-CONFIG_IRQ_BYPASS_MANAGER=y
-CONFIG_ISA=y
-CONFIG_ISAPNP=y
-CONFIG_ISA_BUS_API=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-CONFIG_KCMP=y
-CONFIG_KVM=y
-CONFIG_KVM_AMD=y
-CONFIG_KVM_ASYNC_PF=y
-CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
-CONFIG_KVM_GUEST=y
-CONFIG_KVM_INTEL=y
-CONFIG_KVM_MMIO=y
-CONFIG_KVM_VFIO=y
-# CONFIG_KVM_XEN is not set
-CONFIG_KVM_XFER_TO_GUEST_WORK=y
-# CONFIG_LANCE is not set
-# CONFIG_LG_LAPTOP is not set
-CONFIG_LIBNVDIMM=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-# CONFIG_M686 is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_MEMORY_BALLOON=y
-CONFIG_MEMREGION=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_INTEL_LPSS=y
-CONFIG_MFD_INTEL_LPSS_ACPI=y
-# CONFIG_MFD_INTEL_PMC_BXT is not set
-# CONFIG_MIXCOMWD is not set
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_CQHCI=y
-CONFIG_MMC_RICOH_MMC=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_IO_ACCESSORS=y
-CONFIG_MMC_SDHCI_PCI=y
-# CONFIG_MMC_SDHCI_PLTFM is not set
-# CONFIG_MMC_WBSD is not set
-CONFIG_MMU_NOTIFIER=y
-# CONFIG_MOUSE_BCM5974 is not set
-# CONFIG_MOUSE_CYAPA is not set
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-# CONFIG_MOUSE_PS2_BYD is not set
-# CONFIG_MOUSE_PS2_CYPRESS is not set
-# CONFIG_MOUSE_PS2_ELANTECH is not set
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SMBUS=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_VMMOUSE is not set
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_MPENTIUM4=y
-# CONFIG_MSI_WMI is not set
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-# CONFIG_MXM_WMI is not set
-CONFIG_ND_BLK=y
-CONFIG_ND_BTT=y
-CONFIG_ND_CLAIM=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NET_FAILOVER=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NO_HZ=y
-CONFIG_NR_CPUS=4
-CONFIG_NR_CPUS_DEFAULT=8
-CONFIG_NR_CPUS_RANGE_BEGIN=2
-CONFIG_NR_CPUS_RANGE_END=8
-# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
-CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_REPORTING=y
-CONFIG_PAGE_TABLE_ISOLATION=y
-CONFIG_PARAVIRT=y
-CONFIG_PARAVIRT_CLOCK=y
-# CONFIG_PARAVIRT_DEBUG is not set
-CONFIG_PARAVIRT_SPINLOCKS=y
-CONFIG_PATA_AMD=y
-CONFIG_PATA_ATIIXP=y
-CONFIG_PATA_MPIIX=y
-CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_SC1200=y
-CONFIG_PATA_TIMINGS=y
-CONFIG_PATA_VIA=y
-# CONFIG_PCENGINES_APU2 is not set
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_PME=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCI_XEN=y
-# CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
-CONFIG_PGTABLE_LEVELS=3
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_ALDERLAKE=y
-CONFIG_PINCTRL_BAYTRAIL=y
-CONFIG_PINCTRL_BROXTON=y
-CONFIG_PINCTRL_CANNONLAKE=y
-CONFIG_PINCTRL_CHERRYVIEW=y
-CONFIG_PINCTRL_DENVERTON=y
-CONFIG_PINCTRL_ELKHARTLAKE=y
-CONFIG_PINCTRL_EMMITSBURG=y
-CONFIG_PINCTRL_GEMINILAKE=y
-CONFIG_PINCTRL_INTEL=y
-CONFIG_PINCTRL_JASPERLAKE=y
-CONFIG_PINCTRL_LAKEFIELD=y
-CONFIG_PINCTRL_LEWISBURG=y
-CONFIG_PINCTRL_LYNXPOINT=y
-CONFIG_PINCTRL_METEORLAKE=y
-CONFIG_PINCTRL_SUNRISEPOINT=y
-CONFIG_PINCTRL_TIGERLAKE=y
-CONFIG_PM=y
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PM_CLK=y
-CONFIG_PM_SLEEP=y
-CONFIG_PM_SLEEP_SMP=y
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-# CONFIG_PNPBIOS is not set
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_PPS=y
-CONFIG_PREEMPT_NOTIFIERS=y
-CONFIG_PROC_EVENTS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_KVM=y
-CONFIG_PTP_1588_CLOCK_VMW=y
-CONFIG_PVH=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RAS=y
-CONFIG_RELAY=y
-CONFIG_RELOCATABLE=y
-CONFIG_RESET_ATTACK_MITIGATION=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_SATA_AHCI=y
-CONFIG_SATA_VIA=y
-# CONFIG_SCHED_CORE is not set
-CONFIG_SCHED_INFO=y
-CONFIG_SCHED_SMT=y
-# CONFIG_SCSI_FDOMAIN_ISA is not set
-CONFIG_SCSI_VIRTIO=y
-# CONFIG_SENSORS_ASUS_EC is not set
-# CONFIG_SENSORS_ASUS_WMI is not set
-CONFIG_SENSORS_CORETEMP=y
-CONFIG_SENSORS_FAM15H_POWER=y
-CONFIG_SENSORS_I5500=y
-CONFIG_SENSORS_K8TEMP=y
-CONFIG_SENSORS_K10TEMP=y
-CONFIG_SENSORS_VIA_CPUTEMP=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
-CONFIG_SMP=y
-# CONFIG_SND_HDA_CTL_DEV_ID is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
-# CONFIG_SND_SOC_AMD_ACP6x is not set
-# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
-# CONFIG_SND_SOC_AMD_PS is not set
-# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
-# CONFIG_SND_SOC_INTEL_AVS is not set
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_SWIOTLB=y
-CONFIG_SYNC_FILE=y
-# CONFIG_SYSTEM76_ACPI is not set
-CONFIG_SYS_HYPERVISOR=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_THERMAL_GOV_USER_SPACE=y
-CONFIG_THERMAL_HWMON=y
-CONFIG_THERMAL_WRITABLE_TRIPS=y
-# CONFIG_THINKPAD_LMI is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_WMI is not set
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-# CONFIG_UCLAMP_TASK is not set
-CONFIG_UCS2_STRING=y
-CONFIG_USB_STORAGE=y
-CONFIG_USER_RETURN_NOTIFIER=y
-CONFIG_VHOST=y
-CONFIG_VHOST_IOTLB=y
-CONFIG_VHOST_NET=y
-# CONFIG_VIDEO_IPU3_CIO2 is not set
-CONFIG_VIRTIO=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
-CONFIG_VIRTIO_INPUT=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_PCI_LEGACY=y
-CONFIG_VIRTIO_PCI_LIB=y
-# CONFIG_VIRTIO_PMEM is not set
-CONFIG_VIRTUALIZATION=y
-CONFIG_VMAP_PFN=y
-CONFIG_VT_CONSOLE_SLEEP=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WDT is not set
-# CONFIG_WIRELESS_HOTKEY is not set
-# CONFIG_WMI_BMOF is not set
-CONFIG_X86_32_SMP=y
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
-CONFIG_X86_AMD_FREQ_SENSITIVITY=y
-CONFIG_X86_AMD_PLATFORM_DEVICE=y
-CONFIG_X86_AMD_PSTATE=y
-# CONFIG_X86_AMD_PSTATE_UT is not set
-# CONFIG_X86_BIGSMP is not set
-CONFIG_X86_CPUID=y
-# CONFIG_X86_E_POWERSAVER is not set
-CONFIG_X86_HV_CALLBACK_VECTOR=y
-CONFIG_X86_INTEL_LPSS=y
-CONFIG_X86_INTEL_PSTATE=y
-CONFIG_X86_INTERNODE_CACHE_SHIFT=7
-CONFIG_X86_L1_CACHE_SHIFT=7
-# CONFIG_X86_LONGHAUL is not set
-CONFIG_X86_NEED_RELOCS=y
-CONFIG_X86_PAE=y
-# CONFIG_X86_PCC_CPUFREQ is not set
-CONFIG_X86_PKG_TEMP_THERMAL=y
-# CONFIG_X86_PMEM_LEGACY is not set
-CONFIG_X86_PM_TIMER=y
-# CONFIG_X86_POWERNOW_K8 is not set
-CONFIG_XEN=y
-CONFIG_XENFS=y
-CONFIG_XEN_ACPI=y
-CONFIG_XEN_AUTO_XLATE=y
-# CONFIG_XEN_BACKEND is not set
-CONFIG_XEN_BALLOON=y
-CONFIG_XEN_BLKDEV_FRONTEND=y
-CONFIG_XEN_COMPAT_XENFS=y
-CONFIG_XEN_DEBUG_FS=y
-CONFIG_XEN_DEV_EVTCHN=y
-CONFIG_XEN_FBDEV_FRONTEND=y
-CONFIG_XEN_GNTDEV=y
-CONFIG_XEN_GRANT_DEV_ALLOC=y
-CONFIG_XEN_NETDEV_FRONTEND=y
-CONFIG_XEN_PRIVCMD=y
-CONFIG_XEN_PVH=y
-CONFIG_XEN_PVHVM=y
-CONFIG_XEN_PVHVM_GUEST=y
-CONFIG_XEN_PVHVM_SMP=y
-CONFIG_XEN_SAVE_RESTORE=y
-CONFIG_XEN_SCSI_FRONTEND=y
-CONFIG_XEN_SYS_HYPERVISOR=y
-CONFIG_XEN_VIRTIO=y
-# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
-CONFIG_XEN_WDT=y
-CONFIG_XEN_XENBUS_FRONTEND=y
-# CONFIG_XIAOMI_WMI is not set
-CONFIG_XPS=y
-# CONFIG_YOGABOOK_WMI is not set
-CONFIG_ZLIB_DEFLATE=y
diff --git a/target/linux/x86/geode/config-6.1 b/target/linux/x86/geode/config-6.1
deleted file mode 100644
index cf02d2b9b0..0000000000
--- a/target/linux/x86/geode/config-6.1
+++ /dev/null
@@ -1,176 +0,0 @@
-# CONFIG_3C515 is not set
-CONFIG_8139CP=y
-CONFIG_8139TOO=y
-CONFIG_8139TOO_8129=y
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_ACER_WMI is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-# CONFIG_ACPI_BATTERY is not set
-# CONFIG_ACPI_CMPC is not set
-# CONFIG_ACPI_CONTAINER is not set
-CONFIG_ACPI_CPU_FREQ_PSS=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_DPTF is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_HOTPLUG_IOAPIC=y
-CONFIG_ACPI_I2C_OPREGION=y
-CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
-# CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_PROCESSOR=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_PROCESSOR_CSTATE=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
-# CONFIG_ACPI_SBS is not set
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TINY_POWER_BUTTON is not set
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ADV_SWBUTTON is not set
-CONFIG_ALIX=y
-# CONFIG_AMD_PMC is not set
-# CONFIG_AMD_PMF is not set
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
-# CONFIG_ASUS_TF103C_DOCK is not set
-# CONFIG_ATA_PIIX is not set
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CS5535_CLOCK_EVENT_SRC=y
-CONFIG_CS5535_MFGPT=y
-CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7
-# CONFIG_CS89x0_ISA is not set
-CONFIG_DMA_ACPI=y
-# CONFIG_EL3 is not set
-CONFIG_GEODE_WDT=y
-CONFIG_GEOS=y
-# CONFIG_GIGABYTE_WMI is not set
-CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_CS5535=y
-# CONFIG_HPET is not set
-# CONFIG_HP_ACCEL is not set
-CONFIG_HWMON=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_ALGOPCA=y
-CONFIG_I2C_ALGOPCF=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
-# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MENLOW is not set
-# CONFIG_INTEL_SAR_INT1092 is not set
-# CONFIG_INTEL_SCU_PLATFORM is not set
-# CONFIG_INTEL_SOC_DTS_THERMAL is not set
-# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
-# CONFIG_INTEL_WMI_THUNDERBOLT is not set
-CONFIG_IOSF_MBI=y
-# CONFIG_IOSF_MBI_DEBUG is not set
-CONFIG_ISA=y
-# CONFIG_ISAPNP is not set
-CONFIG_ISA_BUS_API=y
-# CONFIG_ISCSI_IBFT is not set
-# CONFIG_LANCE is not set
-CONFIG_LEDS_GPIO=y
-# CONFIG_M686 is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_MFD_CORE=y
-CONFIG_MFD_CS5535=y
-# CONFIG_MFD_INTEL_LPSS_ACPI is not set
-# CONFIG_MFD_INTEL_PMC_BXT is not set
-CONFIG_MGEODEGX1=y
-# CONFIG_MIXCOMWD is not set
-# CONFIG_MSI_WMI is not set
-# CONFIG_MXM_WMI is not set
-CONFIG_NATSEMI=y
-CONFIG_NET5501=y
-CONFIG_NSC_GPIO=y
-# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
-CONFIG_PATA_CS5520=y
-CONFIG_PATA_CS5530=y
-CONFIG_PATA_CS5535=y
-CONFIG_PATA_CS5536=y
-CONFIG_PATA_SC1200=y
-CONFIG_PC8736x_GPIO=y
-# CONFIG_PCENGINES_APU2 is not set
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
-CONFIG_PINCTRL=y
-# CONFIG_PINCTRL_ALDERLAKE is not set
-# CONFIG_PINCTRL_BAYTRAIL is not set
-# CONFIG_PINCTRL_BROXTON is not set
-# CONFIG_PINCTRL_CANNONLAKE is not set
-# CONFIG_PINCTRL_CHERRYVIEW is not set
-# CONFIG_PINCTRL_DENVERTON is not set
-# CONFIG_PINCTRL_ELKHARTLAKE is not set
-# CONFIG_PINCTRL_EMMITSBURG is not set
-# CONFIG_PINCTRL_GEMINILAKE is not set
-# CONFIG_PINCTRL_JASPERLAKE is not set
-# CONFIG_PINCTRL_LAKEFIELD is not set
-# CONFIG_PINCTRL_LEWISBURG is not set
-# CONFIG_PINCTRL_LYNXPOINT is not set
-# CONFIG_PINCTRL_METEORLAKE is not set
-# CONFIG_PINCTRL_SUNRISEPOINT is not set
-# CONFIG_PINCTRL_TIGERLAKE is not set
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-# CONFIG_PNPBIOS is not set
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_RTC_I2C_AND_SPI=y
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_SC1200_WDT=y
-# CONFIG_SCSI_FDOMAIN_ISA is not set
-CONFIG_SCx200_ACB=y
-CONFIG_SCx200_WDT=y
-# CONFIG_SENSORS_ASUS_EC is not set
-# CONFIG_SENSORS_ASUS_WMI is not set
-CONFIG_SENSORS_LM90=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
-# CONFIG_SND_HDA_CTL_DEV_ID is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
-# CONFIG_SND_SOC_AMD_ACP6x is not set
-# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
-# CONFIG_SND_SOC_AMD_PS is not set
-# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
-# CONFIG_SND_SOC_INTEL_AVS is not set
-# CONFIG_SURFACE_PLATFORMS is not set
-# CONFIG_SYSTEM76_ACPI is not set
-# CONFIG_THINKPAD_LMI is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_WMI is not set
-# CONFIG_USB_UHCI_HCD is not set
-CONFIG_VIA_RHINE=y
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WDT is not set
-# CONFIG_WIRELESS_HOTKEY is not set
-# CONFIG_WMI_BMOF is not set
-# CONFIG_X86_ACPI_CPUFREQ is not set
-CONFIG_X86_ALIGNMENT_16=y
-# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
-# CONFIG_X86_AMD_PSTATE is not set
-# CONFIG_X86_AMD_PSTATE_UT is not set
-CONFIG_X86_CPUID=y
-# CONFIG_X86_E_POWERSAVER is not set
-CONFIG_X86_INTEL_LPSS=y
-# CONFIG_X86_LONGHAUL is not set
-# CONFIG_X86_MCE is not set
-CONFIG_X86_MINIMUM_CPU_FAMILY=5
-# CONFIG_X86_PCC_CPUFREQ is not set
-CONFIG_X86_PM_TIMER=y
-CONFIG_X86_REBOOTFIXUPS=y
-# CONFIG_XIAOMI_WMI is not set
-# CONFIG_YOGABOOK_WMI is not set
diff --git a/target/linux/x86/legacy/config-6.1 b/target/linux/x86/legacy/config-6.1
deleted file mode 100644
index efa1eabe82..0000000000
--- a/target/linux/x86/legacy/config-6.1
+++ /dev/null
@@ -1,262 +0,0 @@
-# CONFIG_3C515 is not set
-# CONFIG_ACER_WMI is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_BATTERY=y
-CONFIG_ACPI_BUTTON=y
-# CONFIG_ACPI_CMPC is not set
-# CONFIG_ACPI_CONTAINER is not set
-CONFIG_ACPI_CPU_FREQ_PSS=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_DPTF is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-# CONFIG_ACPI_FAN is not set
-CONFIG_ACPI_HOTPLUG_IOAPIC=y
-# CONFIG_ACPI_I2C_OPREGION is not set
-CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
-# CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_PROCESSOR=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_PROCESSOR_CSTATE=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
-# CONFIG_ACPI_SBS is not set
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
-CONFIG_ACPI_THERMAL=y
-# CONFIG_ACPI_TOSHIBA is not set
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ADV_SWBUTTON is not set
-CONFIG_AGP=y
-# CONFIG_AGP_ALI is not set
-# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD64 is not set
-# CONFIG_AGP_ATI is not set
-# CONFIG_AGP_EFFICEON is not set
-CONFIG_AGP_INTEL=y
-# CONFIG_AGP_NVIDIA is not set
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_SWORKS is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_AMD_PMC is not set
-# CONFIG_AMD_PMF is not set
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
-# CONFIG_ASUS_TF103C_DOCK is not set
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BLK_DEV_SR=y
-CONFIG_CDROM=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-# CONFIG_CS89x0_ISA is not set
-CONFIG_DMA_ACPI=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DRM=y
-CONFIG_DRM_AMDGPU=y
-# CONFIG_DRM_AMD_DC is not set
-CONFIG_DRM_BOCHS=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_MIPI_DSI=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_RADEON=y
-CONFIG_DRM_SCHED=y
-CONFIG_DRM_TTM=y
-CONFIG_DRM_TTM_HELPER=y
-CONFIG_DRM_VRAM_HELPER=y
-# CONFIG_EL3 is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-# CONFIG_FB_I810 is not set
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-# CONFIG_FB_VESA is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_GIGABYTE_WMI is not set
-CONFIG_HDMI=y
-CONFIG_HID_BATTERY_STRENGTH=y
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HPET=y
-CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
-# CONFIG_HUAWEI_WMI is not set
-CONFIG_HWMON=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INTEL_GTT=y
-CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MEI_HDCP is not set
-# CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
-# CONFIG_INTEL_SAR_INT1092 is not set
-# CONFIG_INTEL_SCU_PLATFORM is not set
-# CONFIG_INTEL_SOC_DTS_THERMAL is not set
-# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
-# CONFIG_INTEL_WMI_THUNDERBOLT is not set
-CONFIG_INTERVAL_TREE=y
-CONFIG_IOSF_MBI=y
-# CONFIG_IOSF_MBI_DEBUG is not set
-CONFIG_ISA=y
-CONFIG_ISAPNP=y
-CONFIG_ISA_BUS_API=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-CONFIG_KCMP=y
-# CONFIG_LANCE is not set
-# CONFIG_LG_LAPTOP is not set
-CONFIG_M586MMX=y
-# CONFIG_M686 is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_MFD_CORE=y
-CONFIG_MFD_INTEL_LPSS=y
-CONFIG_MFD_INTEL_LPSS_ACPI=y
-# CONFIG_MFD_INTEL_PMC_BXT is not set
-# CONFIG_MIXCOMWD is not set
-CONFIG_MMU_NOTIFIER=y
-# CONFIG_MOUSE_BCM5974 is not set
-# CONFIG_MOUSE_CYAPA is not set
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-# CONFIG_MOUSE_PS2_BYD is not set
-# CONFIG_MOUSE_PS2_CYPRESS is not set
-# CONFIG_MOUSE_PS2_ELANTECH is not set
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SMBUS=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_MSI_WMI is not set
-# CONFIG_MXM_WMI is not set
-CONFIG_NOHIGHMEM=y
-CONFIG_NO_HZ=y
-# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
-CONFIG_PATA_AMD=y
-CONFIG_PATA_ATIIXP=y
-CONFIG_PATA_LEGACY=y
-CONFIG_PATA_MPIIX=y
-CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_SC1200=y
-CONFIG_PATA_SIS=y
-CONFIG_PATA_TIMINGS=y
-CONFIG_PATA_VIA=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-# CONFIG_PNPBIOS is not set
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_RAS=y
-CONFIG_RELAY=y
-CONFIG_RTC_I2C_AND_SPI=y
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_SATA_AHCI=y
-# CONFIG_SCSI_FDOMAIN_ISA is not set
-# CONFIG_SENSORS_ASUS_EC is not set
-# CONFIG_SENSORS_ASUS_WMI is not set
-CONFIG_SERIAL_8250_PNP=y
-# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
-# CONFIG_SND_HDA_CTL_DEV_ID is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
-# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
-# CONFIG_SND_SOC_AMD_ACP6x is not set
-# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
-# CONFIG_SND_SOC_AMD_PS is not set
-# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
-# CONFIG_SND_SOC_INTEL_AVS is not set
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_SYNC_FILE=y
-# CONFIG_SYSTEM76_ACPI is not set
-# CONFIG_THINKPAD_LMI is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_WMI is not set
-CONFIG_USB_STORAGE=y
-# CONFIG_VIDEO_IPU3_CIO2 is not set
-CONFIG_VMAP_PFN=y
-# CONFIG_WDT is not set
-# CONFIG_WIRELESS_HOTKEY is not set
-# CONFIG_WMI_BMOF is not set
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
-CONFIG_X86_ALIGNMENT_16=y
-# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
-# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
-# CONFIG_X86_AMD_PSTATE is not set
-# CONFIG_X86_AMD_PSTATE_UT is not set
-# CONFIG_X86_E_POWERSAVER is not set
-CONFIG_X86_F00F_BUG=y
-# CONFIG_X86_INTEL_LPSS is not set
-# CONFIG_X86_LONGHAUL is not set
-CONFIG_X86_MINIMUM_CPU_FAMILY=5
-# CONFIG_X86_PAE is not set
-# CONFIG_X86_PCC_CPUFREQ is not set
-CONFIG_X86_PM_TIMER=y
-# CONFIG_X86_POWERNOW_K8 is not set
-# CONFIG_XIAOMI_WMI is not set
-# CONFIG_YOGABOOK_WMI is not set
-CONFIG_ZLIB_DEFLATE=y
diff --git a/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch
deleted file mode 100644
index d4de2027ba..0000000000
--- a/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/drivers/clocksource/timer-cs5535.c
-+++ b/drivers/clocksource/timer-cs5535.c
-@@ -127,7 +127,9 @@ static irqreturn_t mfgpt_tick(int irq, v
- 		cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP,
- 				MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
- 
--	cs5535_clockevent.event_handler(&cs5535_clockevent);
-+	if (cs5535_clockevent.event_handler)
-+		cs5535_clockevent.event_handler(&cs5535_clockevent);
-+
- 	return IRQ_HANDLED;
- }
- 
diff --git a/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch
deleted file mode 100644
index 654bd88b7f..0000000000
--- a/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-From 970d9af9015a387bb81841faf05dcc1a171eb97a Mon Sep 17 00:00:00 2001
-From: Philip Prindeville <philipp at redfish-solutions.com>
-Date: Sun, 1 Jan 2023 15:25:04 -0700
-Subject: [PATCH v3 1/1] x86: Support APU5 in PCEngines platform driver
-To: platform-driver-x86 at vger.kernel.org, linux-x86_64 at vger.kernel.org
-Cc: Ed Wildgoose <lists at wildgooses.com>, Andres Salomon <dilinger at queued.net>, Andreas Eberlein <foodeas at aeberlein.de>, Paul Spooren <paul at spooren.de>
-
-PCEngines make a number of SBC. APU5 has 5 mpcie slots + MSATA.
-It also has support for 3x LTE modems with 6x SIM slots (pairs with a
-SIM switch device). Each mpcie slot for modems has a reset GPIO
-
-To ensure that the naming is sane between APU2-6 the GPIOS are
-renamed to be modem1-reset, modem2-reset, etc. This is significant
-because the slots that can be reset change between APU2 and APU3/4
-
-GPIO for simswap is moved to the end of the list as it could be dropped
-for APU2 boards (but causes no harm to leave it in, hardware could be
-added to a future rev of the board).
-
-Structure of the GPIOs for APU5 is extremely similar to APU2-4, but
-many lines are moved around and there are simply more
-modems/resets/sim-swap lines to breakout.
-
-Also added APU6, which is essentially APU4 with a different ethernet
-interface and SFP cage on eth0.
-
-Revision history:
-
-v1: originally titled, "apu6: add apu6 variation to apu2 driver family"
-this dealt only with detecting the APUv6, which is otherwise identical
-to the v4 excepting the SFP cage on eth0.
-
-v2: at Ed's request, merged with his previous pull-request titled
-"x86: Support APU5 in PCEngines platform driver", and some cleanup
-to that changeset (including dropping the table "apu5_driver_data"
-which did not have a defined type "struct apu_driver_data"), but got
-mistitled when the Subject of that commit got accidentally dropped.
-
-v3: retitled to match Ed's previous pull-request.
-
-Cc: platform-driver-x86 at vger.kernel.org
-Cc: linux-x86_64 at vger.kernel.org
-Reviewed-by: Andreas Eberlein <foodeas at aeberlein.de>
-Reviewed-by: Paul Spooren <paul at spooren.de>
-Signed-off-by: Ed Wildgoose <lists at wildgooses.com>
-Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
----
- drivers/leds/leds-apu.c                |   2 +-
- drivers/platform/x86/Kconfig           |   4 +-
- drivers/platform/x86/pcengines-apuv2.c | 118 ++++++++++++++++++++++---
- 3 files changed, 107 insertions(+), 17 deletions(-)
-
---- a/drivers/leds/leds-apu.c
-+++ b/drivers/leds/leds-apu.c
-@@ -183,7 +183,7 @@ static int __init apu_led_init(void)
- 
- 	if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
- 	      (dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) {
--		pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
-+		pr_err("No PC Engines APUv1 board detected. For APUv2,3,4,5,6 support, enable CONFIG_PCENGINES_APU2\n");
- 		return -ENODEV;
- 	}
- 
---- a/drivers/platform/x86/Kconfig
-+++ b/drivers/platform/x86/Kconfig
-@@ -698,7 +698,7 @@ config XO1_RFKILL
- 	  laptop.
- 
- config PCENGINES_APU2
--	tristate "PC Engines APUv2/3 front button and LEDs driver"
-+	tristate "PC Engines APUv2/3/4/5/6 front button and LEDs driver"
- 	depends on INPUT && INPUT_KEYBOARD && GPIOLIB
- 	depends on LEDS_CLASS
- 	select GPIO_AMD_FCH
-@@ -706,7 +706,7 @@ config PCENGINES_APU2
- 	select LEDS_GPIO
- 	help
- 	  This driver provides support for the front button and LEDs on
--	  PC Engines APUv2/APUv3 board.
-+	  PC Engines APUv2/APUv3/APUv4/APUv5/APUv6 board.
- 
- 	  To compile this driver as a module, choose M here: the module
- 	  will be called pcengines-apuv2.
---- a/drivers/platform/x86/pcengines-apuv2.c
-+++ b/drivers/platform/x86/pcengines-apuv2.c
-@@ -1,10 +1,12 @@
- // SPDX-License-Identifier: GPL-2.0+
- 
- /*
-- * PC-Engines APUv2/APUv3 board platform driver
-+ * PC-Engines APUv2-6 board platform driver
-  * for GPIO buttons and LEDs
-  *
-  * Copyright (C) 2018 metux IT consult
-+ * Copyright (C) 2022 Ed Wildgoose <lists at wildgooses.com>
-+ * Copyright (C) 2022 Philip Prindeville <philipp at redfish-solutions.com>
-  * Author: Enrico Weigelt <info at metux.net>
-  */
- 
-@@ -22,38 +24,70 @@
- #include <linux/platform_data/gpio/gpio-amd-fch.h>
- 
- /*
-- * NOTE: this driver only supports APUv2/3 - not APUv1, as this one
-+ * NOTE: this driver only supports APUv2-6 - not APUv1, as this one
-  * has completely different register layouts.
-  */
- 
-+/*
-+ * There are a number of APU variants, with differing features
-+ * APU2 has SIM slots 1/2 mapping to mPCIe sockets 1/2
-+ * APU3/4 moved SIM slot 1 to mPCIe socket 3, ie logically reversed
-+ * However, most APU3/4 have a SIM switch which we default on to reverse
-+ * the order and keep physical SIM order matching physical modem order
-+ * APU6 is approximately the same as APU4 with different ethernet layout
-+ *
-+ * APU5 has 3x SIM sockets, all with a SIM switch
-+ * several GPIOs are shuffled (see schematic), including MODESW
-+ */
-+
- /* Register mappings */
- #define APU2_GPIO_REG_LED1		AMD_FCH_GPIO_REG_GPIO57
- #define APU2_GPIO_REG_LED2		AMD_FCH_GPIO_REG_GPIO58
- #define APU2_GPIO_REG_LED3		AMD_FCH_GPIO_REG_GPIO59_DEVSLP1
- #define APU2_GPIO_REG_MODESW		AMD_FCH_GPIO_REG_GPIO32_GE1
- #define APU2_GPIO_REG_SIMSWAP		AMD_FCH_GPIO_REG_GPIO33_GE2
--#define APU2_GPIO_REG_MPCIE2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
--#define APU2_GPIO_REG_MPCIE3		AMD_FCH_GPIO_REG_GPIO51
-+#define APU2_GPIO_REG_RESETM1		AMD_FCH_GPIO_REG_GPIO51
-+#define APU2_GPIO_REG_RESETM2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
-+
-+#define APU5_GPIO_REG_MODESW		AMT_FCH_GPIO_REG_GEVT22
-+#define APU5_GPIO_REG_SIMSWAP1		AMD_FCH_GPIO_REG_GPIO68
-+#define APU5_GPIO_REG_SIMSWAP2		AMD_FCH_GPIO_REG_GPIO32_GE1
-+#define APU5_GPIO_REG_SIMSWAP3		AMD_FCH_GPIO_REG_GPIO33_GE2
-+#define APU5_GPIO_REG_RESETM1		AMD_FCH_GPIO_REG_GPIO51
-+#define APU5_GPIO_REG_RESETM2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
-+#define APU5_GPIO_REG_RESETM3		AMD_FCH_GPIO_REG_GPIO64
- 
- /* Order in which the GPIO lines are defined in the register list */
- #define APU2_GPIO_LINE_LED1		0
- #define APU2_GPIO_LINE_LED2		1
- #define APU2_GPIO_LINE_LED3		2
- #define APU2_GPIO_LINE_MODESW		3
--#define APU2_GPIO_LINE_SIMSWAP		4
--#define APU2_GPIO_LINE_MPCIE2		5
--#define APU2_GPIO_LINE_MPCIE3		6
-+#define APU2_GPIO_LINE_RESETM1		4
-+#define APU2_GPIO_LINE_RESETM2		5
-+#define APU2_GPIO_LINE_SIMSWAP		6
-+
-+#define APU5_GPIO_LINE_LED1		0
-+#define APU5_GPIO_LINE_LED2		1
-+#define APU5_GPIO_LINE_LED3		2
-+#define APU5_GPIO_LINE_MODESW		3
-+#define APU5_GPIO_LINE_RESETM1		4
-+#define APU5_GPIO_LINE_RESETM2		5
-+#define APU5_GPIO_LINE_RESETM3		6
-+#define APU5_GPIO_LINE_SIMSWAP1		7
-+#define APU5_GPIO_LINE_SIMSWAP2		8
-+#define APU5_GPIO_LINE_SIMSWAP3		9
-+
- 
--/* GPIO device */
-+/* GPIO device - APU2/3/4/6 */
- 
- static int apu2_gpio_regs[] = {
- 	[APU2_GPIO_LINE_LED1]		= APU2_GPIO_REG_LED1,
- 	[APU2_GPIO_LINE_LED2]		= APU2_GPIO_REG_LED2,
- 	[APU2_GPIO_LINE_LED3]		= APU2_GPIO_REG_LED3,
- 	[APU2_GPIO_LINE_MODESW]		= APU2_GPIO_REG_MODESW,
-+	[APU2_GPIO_LINE_RESETM1]	= APU2_GPIO_REG_RESETM1,
-+	[APU2_GPIO_LINE_RESETM2]	= APU2_GPIO_REG_RESETM2,
- 	[APU2_GPIO_LINE_SIMSWAP]	= APU2_GPIO_REG_SIMSWAP,
--	[APU2_GPIO_LINE_MPCIE2]		= APU2_GPIO_REG_MPCIE2,
--	[APU2_GPIO_LINE_MPCIE3]		= APU2_GPIO_REG_MPCIE3,
- };
- 
- static const char * const apu2_gpio_names[] = {
-@@ -61,9 +95,9 @@ static const char * const apu2_gpio_name
- 	[APU2_GPIO_LINE_LED2]		= "front-led2",
- 	[APU2_GPIO_LINE_LED3]		= "front-led3",
- 	[APU2_GPIO_LINE_MODESW]		= "front-button",
-+	[APU2_GPIO_LINE_RESETM1]	= "modem1-reset",
-+	[APU2_GPIO_LINE_RESETM2]	= "modem2-reset",
- 	[APU2_GPIO_LINE_SIMSWAP]	= "simswap",
--	[APU2_GPIO_LINE_MPCIE2]		= "mpcie2_reset",
--	[APU2_GPIO_LINE_MPCIE3]		= "mpcie3_reset",
- };
- 
- static const struct amd_fch_gpio_pdata board_apu2 = {
-@@ -72,6 +106,40 @@ static const struct amd_fch_gpio_pdata b
- 	.gpio_names	= apu2_gpio_names,
- };
- 
-+/* GPIO device - APU5 */
-+
-+static int apu5_gpio_regs[] = {
-+	[APU5_GPIO_LINE_LED1]		= APU2_GPIO_REG_LED1,
-+	[APU5_GPIO_LINE_LED2]		= APU2_GPIO_REG_LED2,
-+	[APU5_GPIO_LINE_LED3]		= APU2_GPIO_REG_LED3,
-+	[APU5_GPIO_LINE_MODESW]		= APU5_GPIO_REG_MODESW,
-+	[APU5_GPIO_LINE_RESETM1]	= APU5_GPIO_REG_RESETM1,
-+	[APU5_GPIO_LINE_RESETM2]	= APU5_GPIO_REG_RESETM2,
-+	[APU5_GPIO_LINE_RESETM3]	= APU5_GPIO_REG_RESETM3,
-+	[APU5_GPIO_LINE_SIMSWAP1]	= APU5_GPIO_REG_SIMSWAP1,
-+	[APU5_GPIO_LINE_SIMSWAP2]	= APU5_GPIO_REG_SIMSWAP2,
-+	[APU5_GPIO_LINE_SIMSWAP3]	= APU5_GPIO_REG_SIMSWAP3,
-+};
-+
-+static const char * const apu5_gpio_names[] = {
-+	[APU5_GPIO_LINE_LED1]		= "front-led1",
-+	[APU5_GPIO_LINE_LED2]		= "front-led2",
-+	[APU5_GPIO_LINE_LED3]		= "front-led3",
-+	[APU5_GPIO_LINE_MODESW]		= "front-button",
-+	[APU5_GPIO_LINE_RESETM1]	= "modem1-reset",
-+	[APU5_GPIO_LINE_RESETM2]	= "modem2-reset",
-+	[APU5_GPIO_LINE_RESETM3]	= "modem3-reset",
-+	[APU5_GPIO_LINE_SIMSWAP1]	= "simswap1",
-+	[APU5_GPIO_LINE_SIMSWAP2]	= "simswap2",
-+	[APU5_GPIO_LINE_SIMSWAP3]	= "simswap3",
-+};
-+
-+static const struct amd_fch_gpio_pdata board_apu5 = {
-+	.gpio_num	= ARRAY_SIZE(apu5_gpio_regs),
-+	.gpio_reg	= apu5_gpio_regs,
-+	.gpio_names	= apu5_gpio_names,
-+};
-+
- /* GPIO LEDs device */
- 
- static const struct gpio_led apu2_leds[] = {
-@@ -215,6 +283,24 @@ static const struct dmi_system_id apu_gp
- 		},
- 		.driver_data = (void *)&board_apu2,
- 	},
-+	/* APU5 w/ mainline BIOS */
-+	{
-+		.ident		= "apu5",
-+		.matches	= {
-+			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
-+			DMI_MATCH(DMI_BOARD_NAME, "apu5")
-+		},
-+		.driver_data	= (void *)&board_apu5,
-+	},
-+	/* APU6 w/ mainline BIOS */
-+	{
-+		.ident		= "apu6",
-+		.matches	= {
-+			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
-+			DMI_MATCH(DMI_BOARD_NAME, "apu6")
-+		},
-+		.driver_data	= (void *)&board_apu2,
-+	},
- 	{}
- };
- 
-@@ -249,7 +335,7 @@ static int __init apu_board_init(void)
- 
- 	id = dmi_first_match(apu_gpio_dmi_table);
- 	if (!id) {
--		pr_err("failed to detect APU board via DMI\n");
-+		pr_err("No APU board detected via DMI\n");
- 		return -ENODEV;
- 	}
- 
-@@ -288,8 +374,12 @@ module_init(apu_board_init);
- module_exit(apu_board_exit);
- 
- MODULE_AUTHOR("Enrico Weigelt, metux IT consult <info at metux.net>");
--MODULE_DESCRIPTION("PC Engines APUv2/APUv3 board GPIO/LEDs/keys driver");
-+MODULE_DESCRIPTION("PC Engines APUv2-6 board GPIO/LEDs/keys driver");
- MODULE_LICENSE("GPL");
- MODULE_DEVICE_TABLE(dmi, apu_gpio_dmi_table);
- MODULE_ALIAS("platform:pcengines-apuv2");
-+MODULE_ALIAS("platform:pcengines-apuv3");
-+MODULE_ALIAS("platform:pcengines-apuv4");
-+MODULE_ALIAS("platform:pcengines-apuv5");
-+MODULE_ALIAS("platform:pcengines-apuv6");
- MODULE_SOFTDEP("pre: platform:" AMD_FCH_GPIO_DRIVER_NAME " platform:leds-gpio platform:gpio_keys_polled");



From lede-commits at lists.infradead.org  Fri May 31 01:35:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 04:35:10 -0400
Subject: [openwrt/openwrt]  mbedtls: fix build on GCC 14
In-Reply-To: <171714451005.993383.4965211080111936347@git-01.infra.openwrt.org>
References: <171714451005.993383.4965211080111936347@git-01.infra.openwrt.org>
Message-ID: <mailman.40262.1717144516.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a41747ac8e824b5cb9ed6874a688a4d5a578e10c

commit a41747ac8e824b5cb9ed6874a688a4d5a578e10c
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 13 20:09:44 2024 +0300

    mbedtls: fix build on GCC 14
    
    Without this patch, GCC 14 incorrectly complains about the following error:
    
    In file included from /home/user/workspace/mbedtls/library/ctr_drbg.c:13:
    In function ?mbedtls_xor?,
        inlined from ?ctr_drbg_update_internal? at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
    /home/user/workspace/mbedtls/library/common.h:235:17: error: array subscript 48 is outside array bounds of ?unsigned char[48]? [-Werror=array-bounds=]
      235 |         r[i] = a[i] ^ b[i];
          |                ~^~~
    /home/user/workspace/mbedtls/library/ctr_drbg.c: In function ?ctr_drbg_update_internal?:
    /home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ?tmp? of size 48
      335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
          |                   ^~~
    In function ?mbedtls_xor?,
        inlined from ?ctr_drbg_update_internal? at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
    /home/user/workspace/mbedtls/library/common.h:235:24: error: array subscript 48 is outside array bounds of ?const unsigned char[48]? [-Werror=array-bounds=]
      235 |         r[i] = a[i] ^ b[i];
          |                       ~^~~
    /home/user/workspace/mbedtls/library/ctr_drbg.c: In function ?ctr_drbg_update_internal?:
    /home/user/workspace/mbedtls/library/ctr_drbg.c:333:57: note: at offset 48 into object ?data? of size [0, 48]
      333 |                                     const unsigned char data[MBEDTLS_CTR_DRBG_SEEDLEN])
          |                                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In function ?mbedtls_xor?,
        inlined from ?ctr_drbg_update_internal? at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
    /home/user/workspace/mbedtls/library/common.h:235:14: error: array subscript 48 is outside array bounds of ?unsigned char[48]? [-Werror=array-bounds=]
      235 |         r[i] = a[i] ^ b[i];
          |         ~~~~~^~~~~~~~~~~~~
    /home/user/workspace/mbedtls/library/ctr_drbg.c: In function ?ctr_drbg_update_internal?:
    /home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ?tmp? of size 48
      335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
          |                   ^~~
    
    This change adds a basic check to silence the warning until a solution is worked on upstream.
    As this check is already used by another compiler, it shouldn't cause any issues for us.
    
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
---
 package/libs/mbedtls/patches/100-fix-gcc14-build.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/package/libs/mbedtls/patches/100-fix-gcc14-build.patch b/package/libs/mbedtls/patches/100-fix-gcc14-build.patch
new file mode 100644
index 0000000000..656e605814
--- /dev/null
+++ b/package/libs/mbedtls/patches/100-fix-gcc14-build.patch
@@ -0,0 +1,11 @@
+--- a/library/common.h
++++ b/library/common.h
+@@ -199,7 +199,7 @@ static inline void mbedtls_xor(unsigned
+         uint8x16_t x = veorq_u8(v1, v2);
+         vst1q_u8(r + i, x);
+     }
+-#if defined(__IAR_SYSTEMS_ICC__)
++#if defined(__IAR_SYSTEMS_ICC__) || (defined(MBEDTLS_COMPILER_IS_GCC) && MBEDTLS_GCC_VERSION >= 140100)
+     /* This if statement helps some compilers (e.g., IAR) optimise out the byte-by-byte tail case
+      * where n is a constant multiple of 16.
+      * For other compilers (e.g. recent gcc and clang) it makes no difference if n is a compile-time



From lede-commits at lists.infradead.org  Fri May 31 02:22:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:22:27 -0400
Subject: [openwrt/openwrt]  iproute2: fix build on GCC 14
In-Reply-To: <171714734718.1095044.16718459238022549207@git-01.infra.openwrt.org>
References: <171714734718.1095044.16718459238022549207@git-01.infra.openwrt.org>
Message-ID: <mailman.40281.1717147352.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b2e0775bc6496572d0a79f06b9c5ca820447a57d

commit b2e0775bc6496572d0a79f06b9c5ca820447a57d
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 13 20:38:12 2024 +0300

    iproute2: fix build on GCC 14
    
    Upstream patches:
    
    401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch
    402-bpf-fix-warning-from-basename.patch
    403-bpf-include-libgen.h-for-basename.patch
    
    The patch (400-rdma-include-libgen.h-for-basename.patch) was not
    submitted upstream but just adds a missing include for basename.
    
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
---
 .../400-rdma-include-libgen.h-for-basename.patch   | 10 ++++
 ....c-bridge-vlan.c-fix-build-with-gcc-14-on.patch | 69 ++++++++++++++++++++++
 .../402-bpf-fix-warning-from-basename.patch        | 38 ++++++++++++
 .../403-bpf-include-libgen.h-for-basename.patch    | 23 ++++++++
 4 files changed, 140 insertions(+)

diff --git a/package/network/utils/iproute2/patches/400-rdma-include-libgen.h-for-basename.patch b/package/network/utils/iproute2/patches/400-rdma-include-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..530d2bcffc
--- /dev/null
+++ b/package/network/utils/iproute2/patches/400-rdma-include-libgen.h-for-basename.patch
@@ -0,0 +1,10 @@
+--- a/rdma/rdma.h
++++ b/rdma/rdma.h
+@@ -16,6 +16,7 @@
+ #include <rdma/rdma_user_cm.h>
+ #include <time.h>
+ #include <net/if_arp.h>
++#include <libgen.h>
+ 
+ #include "list.h"
+ #include "utils.h"
diff --git a/package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch b/package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch
new file mode 100644
index 0000000000..a90c9fc80a
--- /dev/null
+++ b/package/network/utils/iproute2/patches/401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch
@@ -0,0 +1,69 @@
+From 53a89bfd86fff1a00cc77cabb8457a03eaa3bc7d Mon Sep 17 00:00:00 2001
+From: Gabi Falk <gabifalk at gmx.com>
+Date: Fri, 10 May 2024 14:36:12 +0000
+Subject: [PATCH] bridge/vlan.c: bridge/vlan.c: fix build with gcc 14 on musl
+ systems
+
+On glibc based systems the definition of 'struct timeval' is pulled in
+with inclusion of <stdlib.h> header, but on musl based systems it
+doesn't work this way.  Missing definition triggers an
+incompatible-pointer-types error with gcc 14 (warning on previous
+versions of gcc):
+
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+   80 | _PRINT_FUNC(tv, const struct timeval *)
+      |                              ^~~~~~~
+../include/json_print.h:50:37: note: in definition of macro '_PRINT_FUNC'
+   50 |                                     type value);                        \
+      |                                     ^~~~
+../include/json_print.h:80:30: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+   80 | _PRINT_FUNC(tv, const struct timeval *)
+      |                              ^~~~~~~
+../include/json_print.h:55:45: note: in definition of macro '_PRINT_FUNC'
+   55 |                                             type value)                 \
+      |                                             ^~~~
+../include/json_print.h: In function 'print_tv':
+../include/json_print.h:58:48: error: passing argument 5 of 'print_color_tv' from incompatible pointer type [-Wincompatible-pointer-types]
+   58 |                                                value);                  \
+      |                                                ^~~~~
+      |                                                |
+      |                                                const struct timeval *
+
+Signed-off-by: Gabi Falk <gabifalk at gmx.com>
+Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
+---
+ bridge/vlan.c | 1 +
+ bridge/vni.c  | 1 +
+ vdpa/vdpa.c   | 1 +
+ 3 files changed, 3 insertions(+)
+
+--- a/bridge/vlan.c
++++ b/bridge/vlan.c
+@@ -4,6 +4,7 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+--- a/bridge/vni.c
++++ b/bridge/vni.c
+@@ -10,6 +10,7 @@
+ #include <string.h>
+ #include <fcntl.h>
+ #include <sys/socket.h>
++#include <sys/time.h>
+ #include <net/if.h>
+ #include <netinet/in.h>
+ #include <linux/if_link.h>
+--- a/vdpa/vdpa.c
++++ b/vdpa/vdpa.c
+@@ -3,6 +3,7 @@
+ #include <stdio.h>
+ #include <getopt.h>
+ #include <errno.h>
++#include <sys/time.h>
+ #include <linux/genetlink.h>
+ #include <linux/if_ether.h>
+ #include <linux/vdpa.h>
diff --git a/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch b/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch
new file mode 100644
index 0000000000..8b40ffecf6
--- /dev/null
+++ b/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch
@@ -0,0 +1,38 @@
+From 69e3b2fadcd32683db2942f31fe41f0fbb2185f8 Mon Sep 17 00:00:00 2001
+From: Stephen Hemminger <stephen at networkplumber.org>
+Date: Sat, 27 Jan 2024 13:58:14 -0800
+Subject: [PATCH] bpf: fix warning from basename()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The function basename() expects a mutable character string,
+which now causes a warning:
+
+bpf_legacy.c: In function ?bpf_load_common?:
+bpf_legacy.c:975:38: warning: passing argument 1 of ?__xpg_basename? discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
+  975 |                          basename(cfg->object), cfg->mode == EBPF_PINNED ?
+      |                                   ~~~^~~~~~~~
+In file included from bpf_legacy.c:21:
+/usr/include/libgen.h:34:36: note: expected ?char *? but argument is of type ?const char *?
+   34 | extern char *__xpg_basename (char *__path) __THROW;
+
+Fixes: f20ff2f19552 ("bpf: keep parsed program mode in struct bpf_cfg_in")
+Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
+---
+ lib/bpf_legacy.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/lib/bpf_legacy.c
++++ b/lib/bpf_legacy.c
+@@ -971,8 +971,8 @@ int bpf_load_common(struct bpf_cfg_in *c
+ 		ops->cbpf_cb(nl, cfg->opcodes, cfg->n_opcodes);
+ 	if (cfg->mode == EBPF_OBJECT || cfg->mode == EBPF_PINNED) {
+ 		snprintf(annotation, sizeof(annotation), "%s:[%s]",
+-			 basename(cfg->object), cfg->mode == EBPF_PINNED ?
+-			 "*fsobj" : cfg->section);
++			 basename(strdupa(cfg->object)),
++			 cfg->mode == EBPF_PINNED ? "*fsobj" : cfg->section);
+ 		ops->ebpf_cb(nl, cfg->prog_fd, annotation);
+ 	}
+ 
diff --git a/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch b/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..c65d94bd75
--- /dev/null
+++ b/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch
@@ -0,0 +1,23 @@
+From 64ed1886e719f40acb554ac895305acb43f27bea Mon Sep 17 00:00:00 2001
+From: Pedro Tammela <pctammela at mojatatu.com>
+Date: Mon, 22 Jan 2024 18:05:46 -0300
+Subject: [PATCH] bpf: include libgen.h for basename
+
+In musl basename() is only available via libgen.h
+
+Signed-off-by: Pedro Tammela <pctammela at mojatatu.com>
+Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
+---
+ lib/bpf_legacy.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/lib/bpf_legacy.c
++++ b/lib/bpf_legacy.c
+@@ -18,6 +18,7 @@
+ #include <stdarg.h>
+ #include <limits.h>
+ #include <assert.h>
++#include <libgen.h>
+ 
+ #ifdef HAVE_ELF
+ #include <libelf.h>



From lede-commits at lists.infradead.org  Fri May 31 02:22:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:22:28 -0400
Subject: [openwrt/openwrt]  iproute2: update to 6.9.0
In-Reply-To: <171714734718.1095044.16718459238022549207@git-01.infra.openwrt.org>
References: <171714734718.1095044.16718459238022549207@git-01.infra.openwrt.org>
Message-ID: <mailman.40282.1717147354.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2ae1330a22e62ddc9ac3e25daf974a2e01da11d3

commit 2ae1330a22e62ddc9ac3e25daf974a2e01da11d3
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Sat May 25 15:30:25 2024 +0000

    iproute2: update to 6.9.0
    
    Support for iptables action has been dropped. Remove tc-mod-iptables and related
    patch (175-reduce-dynamic-syms.patch).
    
    We also add the missing libbpf dependency for `ss` since iproute 8740ca9
    ("ss: add support for BPF socket-local storage") now means that `ss` requires
    libbpf as well.
    
    Fix 170-ip_tiny.patch, as the help text didn't match all the included functions.
    
    Drop upstreamed patches 402-bpf-fix-warning-from-basename.patch
    and 403-bpf-include-libgen.h-for-basename.patch.
    
    All other patches automatically rebased.
    
    Co-authored-by: Rany Hany <rany_hany at riseup.net>
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
---
 package/network/utils/iproute2/Makefile            | 23 ++---------
 .../iproute2/patches/115-add-config-xtlibdir.patch |  2 +-
 .../patches/130-no_netem_tipc_dcb_man_vdpa.patch   |  2 +-
 .../patches/140-keep_libmnl_optional.patch         |  2 +-
 .../patches/145-keep_libelf_optional.patch         |  2 +-
 .../patches/150-keep_libcap_optional.patch         |  2 +-
 .../iproute2/patches/155-keep_tirpc_optional.patch |  2 +-
 .../utils/iproute2/patches/170-ip_tiny.patch       | 10 ++---
 .../iproute2/patches/175-reduce-dynamic-syms.patch | 45 ----------------------
 .../iproute2/patches/190-fix-nls-rpath-link.patch  |  4 +-
 .../iproute2/patches/195-build_variant_ip_tc.patch |  4 +-
 .../patches/200-drop_libbsd_dependency.patch       |  2 +-
 .../patches/300-selinux-configurable.patch         |  2 +-
 .../402-bpf-fix-warning-from-basename.patch        | 38 ------------------
 .../403-bpf-include-libgen.h-for-basename.patch    | 23 -----------
 15 files changed, 21 insertions(+), 142 deletions(-)

diff --git a/package/network/utils/iproute2/Makefile b/package/network/utils/iproute2/Makefile
index 2f9d2f2bc9..85d9f437f6 100644
--- a/package/network/utils/iproute2/Makefile
+++ b/package/network/utils/iproute2/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
-PKG_VERSION:=6.7.0
+PKG_VERSION:=6.9.0
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
-PKG_HASH:=ff942dd9828d7d1f867f61fe72ce433078c31e5d8e4a78e20f02cb5892e8841d
+PKG_HASH:=2f643d09ea11a4a2a043c92e2b469b5f73228cbf241ae806760296ed0ec413d0
 PKG_BUILD_PARALLEL:=1
 PKG_BUILD_DEPENDS:=iptables
 PKG_LICENSE:=GPL-2.0
@@ -77,14 +77,7 @@ $(call Package/iproute2/Default)
   VARIANT:=tcfull
   PROVIDES:=tc
   ALTERNATIVES:=400:/sbin/tc:/usr/libexec/tc-full
-  DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables +tc-mod-iptables
-endef
-
-define Package/tc-mod-iptables
-$(call Package/iproute2/Default)
-  TITLE:=Traffic control module - iptables action
-  VARIANT:=tcfull
-  DEPENDS:=+libxtables +libbpf
+  DEPENDS:=+kmod-sched-core +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +libxtables
 endef
 
 define Package/genl
@@ -102,7 +95,7 @@ endef
 define Package/ss
 $(call Package/iproute2/Default)
   TITLE:=Socket statistics utility
-  DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +kmod-netlink-diag
+  DEPENDS:=+libnl-tiny +(PACKAGE_devlink||PACKAGE_rdma):libmnl +libbpf +kmod-netlink-diag
 endef
 
 define Package/nstat
@@ -232,11 +225,6 @@ define Package/tc-full/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/tc/tc $(1)/usr/libexec/tc-full
 endef
 
-define Package/tc-mod-iptables/install
-	$(INSTALL_DIR) $(1)/usr/lib/tc
-	$(CP) $(PKG_BUILD_DIR)/tc/m_xt.so $(1)/usr/lib/tc
-endef
-
 define Package/genl/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/genl/genl $(1)/usr/sbin/
@@ -269,9 +257,6 @@ endef
 
 $(eval $(call BuildPackage,ip-tiny))
 $(eval $(call BuildPackage,ip-full))
-# build tc-mod-iptables before its dependents, to avoid
-# spurious rebuilds when building multiple variants.
-$(eval $(call BuildPackage,tc-mod-iptables))
 $(eval $(call BuildPackage,tc-tiny))
 $(eval $(call BuildPackage,tc-bpf))
 $(eval $(call BuildPackage,tc-full))
diff --git a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
index c32863c364..38448e6cd6 100644
--- a/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
+++ b/package/network/utils/iproute2/patches/115-add-config-xtlibdir.patch
@@ -1,6 +1,6 @@
 --- a/tc/Makefile
 +++ b/tc/Makefile
-@@ -119,6 +119,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
+@@ -107,6 +107,9 @@ CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PR
  ifneq ($(IPT_LIB_DIR),)
  	CFLAGS += -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"
  endif
diff --git a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch
index 8c70c14489..7f946070f9 100644
--- a/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch
+++ b/package/network/utils/iproute2/patches/130-no_netem_tipc_dcb_man_vdpa.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -68,9 +68,9 @@ WFLAGS += -Wmissing-declarations -Wold-s
+@@ -69,9 +69,9 @@ WFLAGS += -Wmissing-declarations -Wold-s
  CFLAGS := $(WFLAGS) $(CCOPTS) -I../include -I../include/uapi $(DEFINES) $(CFLAGS)
  YACCFLAGS = -d -t -v
  
diff --git a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch
index 0d22875751..ee18f17d54 100644
--- a/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch
+++ b/package/network/utils/iproute2/patches/140-keep_libmnl_optional.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -391,7 +391,7 @@ check_tirpc()
+@@ -362,7 +362,7 @@ check_tirpc()
  
  check_mnl()
  {
diff --git a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch
index bffacddb21..99b9d326fe 100644
--- a/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch
+++ b/package/network/utils/iproute2/patches/145-keep_libelf_optional.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -246,7 +246,7 @@ EOF
+@@ -217,7 +217,7 @@ EOF
  
  check_elf()
  {
diff --git a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch
index 570e9c7038..767c968e74 100644
--- a/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch
+++ b/package/network/utils/iproute2/patches/150-keep_libcap_optional.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -449,7 +449,7 @@ EOF
+@@ -421,7 +421,7 @@ EOF
  
  check_cap()
  {
diff --git a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch
index 4d7fb76308..011dd48f8e 100644
--- a/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch
+++ b/package/network/utils/iproute2/patches/155-keep_tirpc_optional.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -378,7 +378,7 @@ check_selinux()
+@@ -349,7 +349,7 @@ check_selinux()
  
  check_tirpc()
  {
diff --git a/package/network/utils/iproute2/patches/170-ip_tiny.patch b/package/network/utils/iproute2/patches/170-ip_tiny.patch
index 71081c36bc..149bcd2afc 100644
--- a/package/network/utils/iproute2/patches/170-ip_tiny.patch
+++ b/package/network/utils/iproute2/patches/170-ip_tiny.patch
@@ -30,15 +30,15 @@
  		"Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n"
  		"       ip [ -force ] -batch filename\n"
 +#ifndef IPROUTE2_TINY
- 		"where  OBJECT := { address | addrlabel | amt | fou | help | ila | ioam | l2tp |\n"
- 		"                   link | macsec | maddress | monitor | mptcp | mroute | mrule |\n"
+ 		"where  OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n"
+ 		"                   macsec | maddress | monitor | mptcp | mroute | mrule |\n"
  		"                   neighbor | neighbour | netconf | netns | nexthop | ntable |\n"
- 		"                   ntbl | route | rule | sr | tap | tcpmetrics |\n"
+ 		"                   ntbl | route | rule | sr | stats | tap | tcpmetrics |\n"
  		"                   token | tunnel | tuntap | vrf | xfrm }\n"
 +#else
-+		"where  OBJECT := { address | link | maddress | monitor |\n"
++		"where  OBJECT := { address | help | link | maddress | monitor |\n"
 +		"                   neighbor | neighbour | netns | route |\n"
-+		"                   rule | token | tunnel }\n"
++		"                   rule | stats | token | tunnel }\n"
 +#endif
  		"       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
  		"                    -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
diff --git a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch b/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
deleted file mode 100644
index aef51395a9..0000000000
--- a/package/network/utils/iproute2/patches/175-reduce-dynamic-syms.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/tc/Makefile
-+++ b/tc/Makefile
-@@ -106,7 +106,7 @@ LDLIBS += -L. -lm
- 
- ifeq ($(SHARED_LIBS),y)
- LDLIBS += -ldl
--LDFLAGS += -Wl,-export-dynamic
-+LDFLAGS += -Wl,--dynamic-list=dynsyms.list
- endif
- 
- TCLIB := tc_core.o
-@@ -135,7 +135,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
- all: tc $(TCSO)
- 
- tc: $(TCOBJ) $(LIBNETLINK) libtc.a
--	$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
-+	$(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
- 
- libtc.a: $(TCLIB)
- 	$(QUIET_AR)$(AR) rcs $@ $^
-@@ -157,6 +157,7 @@ install: all
- clean:
- 	rm -f $(TCOBJ) $(TCLIB) libtc.a tc *.so emp_ematch.tab.h; \
- 	rm -f emp_ematch.tab.*
-+	rm -f dynsyms.list
- 
- m_xt.so: m_xt.c
- 	$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$($(PKG_CONFIG) xtables --cflags --libs)
-@@ -193,4 +194,16 @@ static-syms.h: $(wildcard *.c)
- 		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:extern char \1[] __attribute__((weak)); if (!strcmp(sym, "\1")) return \1;:;p}' $$files ; \
- 	done > $@
- 
-+else
-+
-+tc: dynsyms.list
-+m_xt.so: dynsyms.list
-+dynsyms.list: $(wildcard *.c)
-+	files="$(filter-out $(patsubst %.so,%.c,$(TCSO)), $^)" ; \
-+	echo "{" > $@ ; \
-+	for s in `grep -B 3 '\<dlsym' $$files | sed -n '/snprintf/{s:.*"\([^"]*\)".*:\1:;s:%s::;p}'` ; do \
-+		sed -n '/'$$s'[^ ]* =/{s:.* \([^ ]*'$$s'[^ ]*\) .*:\1;:;p}' $$files ; \
-+	done >> $@ ; \
-+	echo "show_stats; print_nl; print_tm; parse_rtattr; parse_rtattr_flags; get_u32; matches; addattr_l; addattr_nest; addattr_nest_end; };" >> $@
-+
- endif
diff --git a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch
index 765e4ad2e8..545075fd85 100644
--- a/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch
+++ b/package/network/utils/iproute2/patches/190-fix-nls-rpath-link.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -270,7 +270,7 @@ int main(int argc, char **argv) {
+@@ -241,7 +241,7 @@ int main(int argc, char **argv) {
  }
  EOF
  
@@ -9,7 +9,7 @@
      local ret=$?
  
      rm -f $TMPDIR/libbpf_test.c $TMPDIR/libbpf_test
-@@ -288,7 +288,7 @@ int main(int argc, char **argv) {
+@@ -259,7 +259,7 @@ int main(int argc, char **argv) {
  }
  EOF
  
diff --git a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch
index 8156adbf05..6ecf5568be 100644
--- a/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch
+++ b/package/network/utils/iproute2/patches/195-build_variant_ip_tc.patch
@@ -11,7 +11,7 @@
  
 --- a/tc/Makefile
 +++ b/tc/Makefile
-@@ -132,7 +132,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
+@@ -120,7 +120,7 @@ MODDESTDIR := $(DESTDIR)$(LIBDIR)/tc
  	$(QUIET_CC)$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -shared -fpic $< -o $@
  
  
@@ -19,4 +19,4 @@
 +all: $(findstring tc,$(BUILD_VARIANT)) $(TCSO)
  
  tc: $(TCOBJ) $(LIBNETLINK) libtc.a
- 	$(QUIET_LINK)$(CC) $(filter-out dynsyms.list, $^) $(LDFLAGS) $(LDLIBS) -o $@
+ 	$(QUIET_LINK)$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
diff --git a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch
index 92bf5cb66d..e41be20f10 100644
--- a/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch
+++ b/package/network/utils/iproute2/patches/200-drop_libbsd_dependency.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -435,14 +435,8 @@ EOF
+@@ -407,14 +407,8 @@ EOF
      if $CC -I$INCLUDE -o $TMPDIR/strtest $TMPDIR/strtest.c >/dev/null 2>&1; then
  	echo "no"
      else
diff --git a/package/network/utils/iproute2/patches/300-selinux-configurable.patch b/package/network/utils/iproute2/patches/300-selinux-configurable.patch
index a611ba75f0..36ecc735a7 100644
--- a/package/network/utils/iproute2/patches/300-selinux-configurable.patch
+++ b/package/network/utils/iproute2/patches/300-selinux-configurable.patch
@@ -1,6 +1,6 @@
 --- a/configure
 +++ b/configure
-@@ -365,7 +365,7 @@ check_libbpf()
+@@ -336,7 +336,7 @@ check_libbpf()
  check_selinux()
  # SELinux is a compile time option in the ss utility
  {
diff --git a/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch b/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch
deleted file mode 100644
index 8b40ffecf6..0000000000
--- a/package/network/utils/iproute2/patches/402-bpf-fix-warning-from-basename.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 69e3b2fadcd32683db2942f31fe41f0fbb2185f8 Mon Sep 17 00:00:00 2001
-From: Stephen Hemminger <stephen at networkplumber.org>
-Date: Sat, 27 Jan 2024 13:58:14 -0800
-Subject: [PATCH] bpf: fix warning from basename()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The function basename() expects a mutable character string,
-which now causes a warning:
-
-bpf_legacy.c: In function ?bpf_load_common?:
-bpf_legacy.c:975:38: warning: passing argument 1 of ?__xpg_basename? discards ?const? qualifier from pointer target type [-Wdiscarded-qualifiers]
-  975 |                          basename(cfg->object), cfg->mode == EBPF_PINNED ?
-      |                                   ~~~^~~~~~~~
-In file included from bpf_legacy.c:21:
-/usr/include/libgen.h:34:36: note: expected ?char *? but argument is of type ?const char *?
-   34 | extern char *__xpg_basename (char *__path) __THROW;
-
-Fixes: f20ff2f19552 ("bpf: keep parsed program mode in struct bpf_cfg_in")
-Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
----
- lib/bpf_legacy.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/lib/bpf_legacy.c
-+++ b/lib/bpf_legacy.c
-@@ -971,8 +971,8 @@ int bpf_load_common(struct bpf_cfg_in *c
- 		ops->cbpf_cb(nl, cfg->opcodes, cfg->n_opcodes);
- 	if (cfg->mode == EBPF_OBJECT || cfg->mode == EBPF_PINNED) {
- 		snprintf(annotation, sizeof(annotation), "%s:[%s]",
--			 basename(cfg->object), cfg->mode == EBPF_PINNED ?
--			 "*fsobj" : cfg->section);
-+			 basename(strdupa(cfg->object)),
-+			 cfg->mode == EBPF_PINNED ? "*fsobj" : cfg->section);
- 		ops->ebpf_cb(nl, cfg->prog_fd, annotation);
- 	}
- 
diff --git a/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch b/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch
deleted file mode 100644
index c65d94bd75..0000000000
--- a/package/network/utils/iproute2/patches/403-bpf-include-libgen.h-for-basename.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 64ed1886e719f40acb554ac895305acb43f27bea Mon Sep 17 00:00:00 2001
-From: Pedro Tammela <pctammela at mojatatu.com>
-Date: Mon, 22 Jan 2024 18:05:46 -0300
-Subject: [PATCH] bpf: include libgen.h for basename
-
-In musl basename() is only available via libgen.h
-
-Signed-off-by: Pedro Tammela <pctammela at mojatatu.com>
-Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
----
- lib/bpf_legacy.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/lib/bpf_legacy.c
-+++ b/lib/bpf_legacy.c
-@@ -18,6 +18,7 @@
- #include <stdarg.h>
- #include <limits.h>
- #include <assert.h>
-+#include <libgen.h>
- 
- #ifdef HAVE_ELF
- #include <libelf.h>



From lede-commits at lists.infradead.org  Fri May 31 02:29:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:29:27 -0400
Subject: [openwrt/openwrt]  x86: Activate CONFIG_FB_DEVICE
In-Reply-To: <171714776775.1109565.2796512718151728320@git-01.infra.openwrt.org>
References: <171714776775.1109565.2796512718151728320@git-01.infra.openwrt.org>
Message-ID: <mailman.40287.1717147772.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/77bfe5441e92e8c418138f7ce3844774b7da518f

commit 77bfe5441e92e8c418138f7ce3844774b7da518f
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat May 25 18:27:32 2024 +0200

    x86: Activate CONFIG_FB_DEVICE
    
    This adds the legacy /dev/fb* device file for kernel 6.6 again.
    Linux upstream commit 701d2054fa31 ("fbdev: Make support for
    userspace interfaces configurable") made this configurable and we
    deactivated this option by default for kernel 6.6. On x86 we are not
    space constrained and some users need this legacy interface.
    
    Fixes: #15222
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/x86/64/config-6.6      | 1 +
 target/linux/x86/generic/config-6.6 | 1 +
 target/linux/x86/legacy/config-6.6  | 1 +
 3 files changed, 3 insertions(+)

diff --git a/target/linux/x86/64/config-6.6 b/target/linux/x86/64/config-6.6
index ce4eb644db..8533d57532 100644
--- a/target/linux/x86/64/config-6.6
+++ b/target/linux/x86/64/config-6.6
@@ -214,6 +214,7 @@ CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_DEVICE=y
 CONFIG_FB_EFI=y
 CONFIG_FB_HYPERV=y
 CONFIG_FB_IOMEM_HELPERS=y
diff --git a/target/linux/x86/generic/config-6.6 b/target/linux/x86/generic/config-6.6
index 698f3bbe4d..c02ec35100 100644
--- a/target/linux/x86/generic/config-6.6
+++ b/target/linux/x86/generic/config-6.6
@@ -148,6 +148,7 @@ CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_DEVICE=y
 CONFIG_FB_EFI=y
 CONFIG_FB_HYPERV=y
 # CONFIG_FB_I810 is not set
diff --git a/target/linux/x86/legacy/config-6.6 b/target/linux/x86/legacy/config-6.6
index 402ad89472..f71747e433 100644
--- a/target/linux/x86/legacy/config-6.6
+++ b/target/linux/x86/legacy/config-6.6
@@ -109,6 +109,7 @@ CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_DEVICE=y
 # CONFIG_FB_I810 is not set
 CONFIG_FB_IOMEM_HELPERS=y
 CONFIG_FB_SYSMEM_HELPERS=y



From lede-commits at lists.infradead.org  Fri May 31 02:29:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:29:28 -0400
Subject: [openwrt/openwrt]  kernel: Add CONFIG_FB_DEVICE to kmod-fb
In-Reply-To: <171714776775.1109565.2796512718151728320@git-01.infra.openwrt.org>
References: <171714776775.1109565.2796512718151728320@git-01.infra.openwrt.org>
Message-ID: <mailman.40288.1717147772.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0cf4c8a986c6046d7a3ee1e9ac7f311071d27b07

commit 0cf4c8a986c6046d7a3ee1e9ac7f311071d27b07
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun May 26 23:53:10 2024 +0200

    kernel: Add CONFIG_FB_DEVICE to kmod-fb
    
    At least kmod-fb-tft depends on CONFIG_FB_DEVICE and can not be
    activated without it.
    
    This configuration option was added with kernel 6.6, before this featre
    was always activated.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/video.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index dc1953279e..018f5644b0 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -83,6 +83,7 @@ define KernelPackage/fb
   DEPENDS:=@DISPLAY_SUPPORT
   KCONFIG:= \
 	CONFIG_FB \
+	CONFIG_FB_DEVICE=y \
 	CONFIG_FB_MXS=n \
 	CONFIG_FB_SM750=n \
 	CONFIG_FRAMEBUFFER_CONSOLE=y \



From lede-commits at lists.infradead.org  Fri May 31 02:33:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:33:25 -0400
Subject: [openwrt/openwrt]  packages: refresh patches
In-Reply-To: <171714800598.1118885.11190894158821583167@git-01.infra.openwrt.org>
References: <171714800598.1118885.11190894158821583167@git-01.infra.openwrt.org>
Message-ID: <mailman.40289.1717148013.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2f4bb69664d2b4d3a2d21200240a4cf5cd25f183

commit 2f4bb69664d2b4d3a2d21200240a4cf5cd25f183
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 18 13:45:34 2024 -0700

    packages: refresh patches
    
    CI is supposed to catch all of these. Some of these predate CI.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 ...g-allow-to-complete-build-even-with-ad-ho.patch |  2 +-
 .../uboot-kirkwood/patches/180-netgear-stora.patch | 49 ++++++---------
 .../patches/200-openwrt-config.patch               |  2 +-
 .../0021-MIPS-vrx200-add-NAND-SPL-support.patch    |  2 +-
 .../uboot-lantiq/patches/0028-gcc-compat.patch     | 73 +++++++++-------------
 .../uboot-mxs/patches/001-add-i2se-duckbill.patch  | 26 --------
 ...e-spl-Initialized-the-PWM-setting-in-the-.patch | 10 ---
 ...e-Set-LED-s-color-to-purple-in-the-U-boot.patch | 11 +---
 .../0009-riscv-Fix-build-against-binutils.patch    |  2 -
 ...check-environment-for-dtc-binary-location.patch |  2 +-
 .../patches/130-fix-mkimage-host-build.patch       |  4 +-
 .../010-fix_dtc_compilation_on_host_gcc10.patch    |  2 -
 ...yptodev_verbosity-fix-build-for-linux-6.4.patch |  4 +-
 .../0001-zero-copy-fix-build-for-linux-6.4.patch   |  4 +-
 ...nt-linux-version-ifdefs-from-v6.4-to-v6.5.patch |  8 +--
 .../patches/0004-fix-build-for-linux-6.7-rc1.patch |  4 +-
 .../100-fix-compilation-warning-debugfs.patch      |  4 +-
 .../101-fix-more-compilation-warning-debugfs.patch |  4 +-
 ...ix-compilation-warning-switch-fallthrough.patch | 26 ++++----
 ...1-fix-compilation-warning-ret-not-handled.patch |  2 +-
 ...x-compilation-warning-missing-fallthrough.patch |  2 +-
 .../300-fix-compilation-warning-fallthrough.patch  |  2 +-
 .../301-fix-compilation-warning-simple-fix.patch   | 19 +++---
 .../300-fix-compilation-warning-stack-limit.patch  | 10 +--
 ...03-hsl_phy-add-support-for-AQR114C-B0-PHY.patch |  2 +-
 .../patches/001-stupid_breakage_fix.patch          | 18 +++---
 .../thc-ipv6/patches/101-remove-march-native.patch |  2 +-
 ...0001-openwrt-move-layer-db-to-temp-folder.patch |  4 +-
 ...-add-missing-limits.h-for-USE_CPUID_DEVIC.patch |  5 --
 package/system/refpolicy/patches/100-no-docs.patch |  6 +-
 30 files changed, 109 insertions(+), 202 deletions(-)

diff --git a/package/boot/uboot-bcm4908/patches/100-check-config-allow-to-complete-build-even-with-ad-ho.patch b/package/boot/uboot-bcm4908/patches/100-check-config-allow-to-complete-build-even-with-ad-ho.patch
index 44aa4c17e6..5ef293c4f6 100644
--- a/package/boot/uboot-bcm4908/patches/100-check-config-allow-to-complete-build-even-with-ad-ho.patch
+++ b/package/boot/uboot-bcm4908/patches/100-check-config-allow-to-complete-build-even-with-ad-ho.patch
@@ -22,7 +22,7 @@ Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
 
 --- a/scripts/check-config.sh
 +++ b/scripts/check-config.sh
-@@ -50,14 +50,13 @@ cat `find ${srctree} -name "Kconfig*"` |sed -n \
+@@ -50,14 +50,13 @@ cat `find ${srctree} -name "Kconfig*"` |
  	|sort |uniq > ${ok}
  comm -23 ${suspects} ${ok} >${new_adhoc}
  if [ -s ${new_adhoc} ]; then
diff --git a/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch b/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch
index 5eed89d5e6..c6aced4221 100644
--- a/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch
+++ b/package/boot/uboot-kirkwood/patches/180-netgear-stora.patch
@@ -1,7 +1,6 @@
-diff -ruN u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig u-boot-2020.04/arch/arm/mach-kirkwood/Kconfig
---- u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig	2020-07-09 00:46:15.000000000 +0200
-+++ u-boot-2020.04/arch/arm/mach-kirkwood/Kconfig	2020-07-09 01:07:00.309219477 +0200
-@@ -44,6 +44,9 @@
+--- a/arch/arm/mach-kirkwood/Kconfig
++++ b/arch/arm/mach-kirkwood/Kconfig
+@@ -44,6 +44,9 @@ config TARGET_NET2BIG_V2
  config TARGET_NETSPACE_V2
  	bool "LaCie netspace_v2 Board"
  
@@ -11,7 +10,7 @@ diff -ruN u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig u-boot-2020.04/arch/
  config TARGET_IB62X0
  	bool "ib62x0 Board"
  
-@@ -92,6 +95,7 @@
+@@ -95,6 +98,7 @@ source "board/iomega/iconnect/Kconfig"
  source "board/keymile/Kconfig"
  source "board/LaCie/net2big_v2/Kconfig"
  source "board/LaCie/netspace_v2/Kconfig"
@@ -19,9 +18,8 @@ diff -ruN u-boot-2020.04.old/arch/arm/mach-kirkwood/Kconfig u-boot-2020.04/arch/
  source "board/raidsonic/ib62x0/Kconfig"
  source "board/Seagate/dockstar/Kconfig"
  source "board/Seagate/goflexhome/Kconfig"
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Kconfig u-boot-2020.04/board/Marvell/netgear_ms2110/Kconfig
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/Kconfig	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/Kconfig	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/Kconfig
 @@ -0,0 +1,12 @@
 +if TARGET_NETGEAR_MS2110
 +
@@ -35,9 +33,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Kconfig u-boot-2020.04
 +	default "netgear_ms2110"
 +
 +endif
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/kwbimage.cfg u-boot-2020.04/board/Marvell/netgear_ms2110/kwbimage.cfg
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/kwbimage.cfg	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/kwbimage.cfg	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/kwbimage.cfg
 @@ -0,0 +1,167 @@
 +#
 +# (C) Copyright 2009
@@ -206,9 +203,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/kwbimage.cfg u-boot-20
 +
 +# End of Header extension
 +DATA 0x0 0x0
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/MAINTAINERS u-boot-2020.04/board/Marvell/netgear_ms2110/MAINTAINERS
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/MAINTAINERS	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/MAINTAINERS	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/MAINTAINERS
 @@ -0,0 +1,6 @@
 +NETGEAR_MS2110 BOARD
 +M:	bodhi <mibodhi at gmail.com>
@@ -216,9 +212,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/MAINTAINERS u-boot-202
 +F:	board/Marvell/netgear_ms2110
 +F:	include/configs/netgear_ms2110.h
 +F:	configs/netgear_ms2110_defconfig
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Makefile u-boot-2020.04/board/Marvell/netgear_ms2110/Makefile
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/Makefile	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/Makefile	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/Makefile
 @@ -0,0 +1,13 @@
 +#
 +# (C) Copyright 2014 bodhi <mibodhi at gmail.com>
@@ -233,9 +228,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/Makefile u-boot-2020.0
 +
 +obj-y	:= netgear_ms2110.o
 +
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.c u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.c
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.c	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.c	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/netgear_ms2110.c
 @@ -0,0 +1,151 @@
 +/*
 + * Copyright (C) 2014-2017 bodhi <mibodhi at gmail.com>
@@ -388,9 +382,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.c u-boo
 +}
 +#endif /* CONFIG_RESET_PHY_R */
 +
-diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.h u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.h
---- u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.h	1970-01-01 01:00:00.000000000 +0100
-+++ u-boot-2020.04/board/Marvell/netgear_ms2110/netgear_ms2110.h	2020-07-09 00:59:29.000000000 +0200
+--- /dev/null
++++ b/board/Marvell/netgear_ms2110/netgear_ms2110.h
 @@ -0,0 +1,41 @@
 +/*
 + * (C) Copyright 2009
@@ -433,9 +426,8 @@ diff -ruN u-boot-2020.04.old/board/Marvell/netgear_ms2110/netgear_ms2110.h u-boo
 +#define MV88E1116_RGMII_RXTM_CTRL	(1 << 5)
 +
 +#endif /* __NETGEAR_MS2110_H */
-diff -ruN a/configs/netgear_ms2110_defconfig b/configs/netgear_ms2110_defconfig
---- a/configs/netgear_ms2110_defconfig	1970-01-01 01:00:00.000000000 +0100
-+++ b/configs/netgear_ms2110_defconfig	2020-07-14 17:59:18.000000000 +0200
+--- /dev/null
++++ b/configs/netgear_ms2110_defconfig
 @@ -0,0 +1,50 @@
 +CONFIG_ARM=y
 +CONFIG_KIRKWOOD=y
@@ -487,9 +479,8 @@ diff -ruN a/configs/netgear_ms2110_defconfig b/configs/netgear_ms2110_defconfig
 +CONFIG_MVSATA_IDE=y
 +CONFIG_DM_RTC=y
 +CONFIG_RTC_MV=y
-diff -ruN a/include/configs/netgear_ms2110.h b/include/configs/netgear_ms2110.h
---- a/include/configs/netgear_ms2110.h	1970-01-01 01:00:00.000000000 +0100
-+++ b/include/configs/netgear_ms2110.h	2020-07-14 17:49:15.000000000 +0200
+--- /dev/null
++++ b/include/configs/netgear_ms2110.h
 @@ -0,0 +1,155 @@
 +/*
 + * (C) Copyright 2014-2017 bodhi <mibodhi at gmail.com>
diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
index bfd3d3278e..4cf874b368 100644
--- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
+++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/mach-kirkwood/Kconfig
 +++ b/arch/arm/mach-kirkwood/Kconfig
-@@ -107,4 +107,7 @@ source "board/alliedtelesis/SBx81LIFXCAT
+@@ -111,4 +111,7 @@ source "board/alliedtelesis/SBx81LIFXCAT
  source "board/Marvell/db-88f6281-bp/Kconfig"
  source "board/checkpoint/l-50/Kconfig"
  
diff --git a/package/boot/uboot-lantiq/patches/0021-MIPS-vrx200-add-NAND-SPL-support.patch b/package/boot/uboot-lantiq/patches/0021-MIPS-vrx200-add-NAND-SPL-support.patch
index 8296f2c75e..6d127394df 100644
--- a/package/boot/uboot-lantiq/patches/0021-MIPS-vrx200-add-NAND-SPL-support.patch
+++ b/package/boot/uboot-lantiq/patches/0021-MIPS-vrx200-add-NAND-SPL-support.patch
@@ -19,7 +19,7 @@ Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
  endif
 --- a/arch/mips/include/asm/arch-vrx200/config.h
 +++ b/arch/mips/include/asm/arch-vrx200/config.h
-@@ -167,7 +167,7 @@
+@@ -168,7 +168,7 @@
  #define CONFIG_SYS_TEXT_BASE		0xB0000000
  #endif
  
diff --git a/package/boot/uboot-lantiq/patches/0028-gcc-compat.patch b/package/boot/uboot-lantiq/patches/0028-gcc-compat.patch
index 7955429f60..37ffb2a382 100644
--- a/package/boot/uboot-lantiq/patches/0028-gcc-compat.patch
+++ b/package/boot/uboot-lantiq/patches/0028-gcc-compat.patch
@@ -22,8 +22,6 @@ Signed-off-by: Tom Rini <trini at konsulko.com>
  delete mode 100644 include/linux/compiler-gcc4.h
  create mode 100644 include/linux/compiler-intel.h
 
-diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
-index 9896e54..22ab246 100644
 --- a/include/linux/compiler-gcc.h
 +++ b/include/linux/compiler-gcc.h
 @@ -5,11 +5,28 @@
@@ -147,20 +145,6 @@ index 9896e54..22ab246 100644
   */
 -#ifndef __pure
 -# define __pure				__attribute__((pure))
--#endif
--#ifndef __aligned
--# define __aligned(x)			__attribute__((aligned(x)))
--#endif
--#define __printf(a,b)			__attribute__((format(printf,a,b)))
--#define  noinline			__attribute__((noinline))
--#define __attribute_const__		__attribute__((__const__))
--#define __maybe_unused			__attribute__((unused))
--#define __always_unused			__attribute__((unused))
--
--#define __gcc_header(x) #x
--#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
--#define gcc_header(x) _gcc_header(x)
--#include gcc_header(__GNUC__)
 +#define __pure			__attribute__((pure))
 +#define __aligned(x)		__attribute__((aligned(x)))
 +#define __printf(a, b)		__attribute__((format(printf, a, b)))
@@ -189,7 +173,9 @@ index 9896e54..22ab246 100644
 +
 +#if GCC_VERSION >= 30400
 +#define __must_check		__attribute__((warn_unused_result))
-+#endif
+ #endif
+-#ifndef __aligned
+-# define __aligned(x)			__attribute__((aligned(x)))
 +
 +#if GCC_VERSION >= 40000
 +
@@ -206,7 +192,17 @@ index 9896e54..22ab246 100644
 +
 +#if GCC_VERSION >= 40100 && GCC_VERSION < 40600
 +# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)
-+#endif
+ #endif
+-#define __printf(a,b)			__attribute__((format(printf,a,b)))
+-#define  noinline			__attribute__((noinline))
+-#define __attribute_const__		__attribute__((__const__))
+-#define __maybe_unused			__attribute__((unused))
+-#define __always_unused			__attribute__((unused))
+-
+-#define __gcc_header(x) #x
+-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
+-#define gcc_header(x) _gcc_header(x)
+-#include gcc_header(__GNUC__)
 +
 +#if GCC_VERSION >= 40300
 +/* Mark functions as cold. gcc will assume any path leading to a call
@@ -328,9 +324,6 @@ index 9896e54..22ab246 100644
 + * code
 + */
 +#define uninitialized_var(x) x = x
-diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
-deleted file mode 100644
-index 2befe65..0000000
 --- a/include/linux/compiler-gcc3.h
 +++ /dev/null
 @@ -1,21 +0,0 @@
@@ -355,9 +348,6 @@ index 2befe65..0000000
 -#define uninitialized_var(x) x = x
 -
 -#define __always_inline		inline __attribute__((always_inline))
-diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
-deleted file mode 100644
-index 27d11ca..0000000
 --- a/include/linux/compiler-gcc4.h
 +++ /dev/null
 @@ -1,63 +0,0 @@
@@ -424,9 +414,6 @@ index 27d11ca..0000000
 -#define __compiletime_warning(message) __attribute__((warning(message)))
 -#define __compiletime_error(message) __attribute__((error(message)))
 -#endif
-diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h
-new file mode 100644
-index 0000000..d4c7113
 --- /dev/null
 +++ b/include/linux/compiler-intel.h
 @@ -0,0 +1,45 @@
@@ -475,8 +462,6 @@ index 0000000..d4c7113
 +#define __builtin_bswap16 _bswap16
 +#endif
 +
-diff --git a/include/linux/compiler.h b/include/linux/compiler.h
-index 5be3dab..020ad16 100644
 --- a/include/linux/compiler.h
 +++ b/include/linux/compiler.h
 @@ -5,16 +5,24 @@
@@ -505,7 +490,7 @@ index 5be3dab..020ad16 100644
  extern void __chk_user_ptr(const volatile void __user *);
  extern void __chk_io_ptr(const volatile void __iomem *);
  #else
-@@ -27,20 +35,32 @@ extern void __chk_io_ptr(const volatile void __iomem *);
+@@ -27,20 +35,32 @@ extern void __chk_io_ptr(const volatile
  # define __chk_user_ptr(x) (void)0
  # define __chk_io_ptr(x) (void)0
  # define __builtin_warning(x, y...) (1)
@@ -538,7 +523,7 @@ index 5be3dab..020ad16 100644
  
  /* Intel compiler defines __GNUC__. So we will overwrite implementations
   * coming from above header files here
-@@ -49,6 +69,13 @@ extern void __chk_io_ptr(const volatile void __iomem *);
+@@ -49,6 +69,13 @@ extern void __chk_io_ptr(const volatile
  # include <linux/compiler-intel.h>
  #endif
  
@@ -552,7 +537,7 @@ index 5be3dab..020ad16 100644
  /*
   * Generic compiler-dependent macros required for kernel
   * build go below this comment. Actual compiler/compiler version
-@@ -117,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -117,7 +144,7 @@ void ftrace_likely_update(struct ftrace_
   */
  #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  #define __trace_if(cond) \
@@ -561,7 +546,7 @@ index 5be3dab..020ad16 100644
  	({								\
  		int ______r;						\
  		static struct ftrace_branch_data			\
-@@ -144,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -144,6 +171,10 @@ void ftrace_likely_update(struct ftrace_
  # define barrier() __memory_barrier()
  #endif
  
@@ -572,7 +557,7 @@ index 5be3dab..020ad16 100644
  /* Unreachable code */
  #ifndef unreachable
  # define unreachable() do { } while (1)
-@@ -156,6 +187,135 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -156,6 +187,135 @@ void ftrace_likely_update(struct ftrace_
      (typeof(ptr)) (__ptr + (off)); })
  #endif
  
@@ -708,7 +693,7 @@ index 5be3dab..020ad16 100644
  #endif /* __KERNEL__ */
  
  #endif /* __ASSEMBLY__ */
-@@ -228,7 +388,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -228,7 +388,7 @@ void ftrace_likely_update(struct ftrace_
  
  /*
   * Rather then using noinline to prevent stack consumption, use
@@ -717,7 +702,7 @@ index 5be3dab..020ad16 100644
   */
  #define noinline_for_stack noinline
  
-@@ -270,11 +430,28 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -270,11 +430,28 @@ void ftrace_likely_update(struct ftrace_
  # define __section(S) __attribute__ ((__section__(#S)))
  #endif
  
@@ -746,7 +731,7 @@ index 5be3dab..020ad16 100644
  /* Compile time object size, -1 for unknown */
  #ifndef __compiletime_object_size
  # define __compiletime_object_size(obj) -1
-@@ -284,7 +461,48 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+@@ -284,8 +461,49 @@ void ftrace_likely_update(struct ftrace_
  #endif
  #ifndef __compiletime_error
  # define __compiletime_error(message)
@@ -760,11 +745,11 @@ index 5be3dab..020ad16 100644
 +#  define __compiletime_error_fallback(condition) \
 +	do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
 +# endif
- #endif
++#endif
 +#ifndef __compiletime_error_fallback
 +# define __compiletime_error_fallback(condition) do { } while (0)
-+#endif
-+
+ #endif
+ 
 +#define __compiletime_assert(condition, msg, prefix, suffix)		\
 +	do {								\
 +		bool __cond = !(condition);				\
@@ -792,10 +777,11 @@ index 5be3dab..020ad16 100644
 +#define compiletime_assert_atomic_type(t)				\
 +	compiletime_assert(__native_word(t),				\
 +		"Need native word sized stores/loads for atomicity.")
- 
++
  /*
   * Prevent the compiler from merging or refetching accesses.  The compiler
-@@ -293,11 +511,45 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
+  * is also forbidden from reordering successive instances of ACCESS_ONCE(),
+@@ -293,11 +511,45 @@ void ftrace_likely_update(struct ftrace_
   * to make the compiler aware of ordering is to put the two invocations of
   * ACCESS_ONCE() in different C statements.
   *
@@ -847,6 +833,3 @@ index 5be3dab..020ad16 100644
 +# define nokprobe_inline	inline
 +#endif
  #endif /* __LINUX_COMPILER_H */
--- 
-2.7.4
-
diff --git a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch
index 50702cb3cb..13673e9682 100644
--- a/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch
+++ b/package/boot/uboot-mxs/patches/001-add-i2se-duckbill.patch
@@ -43,8 +43,6 @@ Signed-off-by: Stefan Wahren <stefan.wahren at i2se.com>
  create mode 100644 configs/duckbill_defconfig
  create mode 100644 include/configs/duckbill.h
 
-diff --git a/arch/arm/mach-imx/mxs/Kconfig b/arch/arm/mach-imx/mxs/Kconfig
-index b90d7b6e41..e7d8bc6792 100644
 --- a/arch/arm/mach-imx/mxs/Kconfig
 +++ b/arch/arm/mach-imx/mxs/Kconfig
 @@ -50,6 +50,10 @@ config TARGET_APX4DEVKIT
@@ -66,9 +64,6 @@ index b90d7b6e41..e7d8bc6792 100644
  source "board/liebherr/xea/Kconfig"
  source "board/ppcag/bg0900/Kconfig"
  source "board/schulercontrol/sc_sps_1/Kconfig"
-diff --git a/board/i2se/duckbill/Kconfig b/board/i2se/duckbill/Kconfig
-new file mode 100644
-index 0000000000..98c1e4689f
 --- /dev/null
 +++ b/board/i2se/duckbill/Kconfig
 @@ -0,0 +1,15 @@
@@ -87,9 +82,6 @@ index 0000000000..98c1e4689f
 +	default "duckbill"
 +
 +endif
-diff --git a/board/i2se/duckbill/MAINTAINERS b/board/i2se/duckbill/MAINTAINERS
-new file mode 100644
-index 0000000000..5496baa330
 --- /dev/null
 +++ b/board/i2se/duckbill/MAINTAINERS
 @@ -0,0 +1,6 @@
@@ -99,9 +91,6 @@ index 0000000000..5496baa330
 +F:	board/i2se/duckbill/
 +F:	include/configs/duckbill.h
 +F:	configs/duckbill_defconfig
-diff --git a/board/i2se/duckbill/Makefile b/board/i2se/duckbill/Makefile
-new file mode 100644
-index 0000000000..11bac98e4c
 --- /dev/null
 +++ b/board/i2se/duckbill/Makefile
 @@ -0,0 +1,10 @@
@@ -115,9 +104,6 @@ index 0000000000..11bac98e4c
 +else
 +obj-y	:= iomux.o
 +endif
-diff --git a/board/i2se/duckbill/duckbill.c b/board/i2se/duckbill/duckbill.c
-new file mode 100644
-index 0000000000..93defc6c28
 --- /dev/null
 +++ b/board/i2se/duckbill/duckbill.c
 @@ -0,0 +1,189 @@
@@ -310,9 +296,6 @@ index 0000000000..93defc6c28
 +
 +	return 0;
 +}
-diff --git a/board/i2se/duckbill/iomux.c b/board/i2se/duckbill/iomux.c
-new file mode 100644
-index 0000000000..c6cc211181
 --- /dev/null
 +++ b/board/i2se/duckbill/iomux.c
 @@ -0,0 +1,157 @@
@@ -473,9 +456,6 @@ index 0000000000..c6cc211181
 +	else
 +		mxs_iomux_setup_multiple_pads(iomux_setup_v1, ARRAY_SIZE(iomux_setup_v1));
 +}
-diff --git a/configs/duckbill_defconfig b/configs/duckbill_defconfig
-new file mode 100644
-index 0000000000..b2d7fbcf77
 --- /dev/null
 +++ b/configs/duckbill_defconfig
 @@ -0,0 +1,43 @@
@@ -522,9 +502,6 @@ index 0000000000..b2d7fbcf77
 +CONFIG_MII=y
 +CONFIG_CONS_INDEX=0
 +CONFIG_OF_LIBFDT=y
-diff --git a/include/configs/duckbill.h b/include/configs/duckbill.h
-new file mode 100644
-index 0000000000..565d8c58b7
 --- /dev/null
 +++ b/include/configs/duckbill.h
 @@ -0,0 +1,172 @@
@@ -700,6 +677,3 @@ index 0000000000..565d8c58b7
 +#include <configs/mxs.h>
 +
 +#endif /* __CONFIGS_DUCKBILL_H__ */
--- 
-2.17.1
-
diff --git a/package/boot/uboot-sifiveu/patches/0002-board-sifive-spl-Initialized-the-PWM-setting-in-the-.patch b/package/boot/uboot-sifiveu/patches/0002-board-sifive-spl-Initialized-the-PWM-setting-in-the-.patch
index 27cda75326..7e11d4c18b 100644
--- a/package/boot/uboot-sifiveu/patches/0002-board-sifive-spl-Initialized-the-PWM-setting-in-the-.patch
+++ b/package/boot/uboot-sifiveu/patches/0002-board-sifive-spl-Initialized-the-PWM-setting-in-the-.patch
@@ -14,8 +14,6 @@ LED's color will be set to yellow.
  3 files changed, 60 insertions(+)
  create mode 100644 board/sifive/unmatched/pwm.c
 
-diff --git a/board/sifive/unmatched/Makefile b/board/sifive/unmatched/Makefile
-index 1345330089..5df01982e9 100644
 --- a/board/sifive/unmatched/Makefile
 +++ b/board/sifive/unmatched/Makefile
 @@ -9,3 +9,4 @@ obj-y += spl.o
@@ -23,9 +21,6 @@ index 1345330089..5df01982e9 100644
  obj-y += unmatched.o
  endif
 +obj-y += pwm.o
-diff --git a/board/sifive/unmatched/pwm.c b/board/sifive/unmatched/pwm.c
-new file mode 100644
-index 0000000000..e1cc02310a
 --- /dev/null
 +++ b/board/sifive/unmatched/pwm.c
 @@ -0,0 +1,57 @@
@@ -86,8 +81,6 @@ index 0000000000..e1cc02310a
 +	writel(PWM_CMP_ENABLE_VAL, (void *)&pwm1->cmp3);
 +	writel(PWM_CFG_INIT, (void *)&pwm1->cfg);
 +}
-diff --git a/board/sifive/unmatched/spl.c b/board/sifive/unmatched/spl.c
-index 7c0beedc08..f3a661a81e 100644
 --- a/board/sifive/unmatched/spl.c
 +++ b/board/sifive/unmatched/spl.c
 @@ -90,6 +90,8 @@ int spl_board_init_f(void)
@@ -99,6 +92,3 @@ index 7c0beedc08..f3a661a81e 100644
  	ret = spl_gemgxl_init();
  	if (ret) {
  		debug("Gigabit ethernet PHY (VSC8541) init failed: %d\n", ret);
--- 
-2.27.0
-
diff --git a/package/boot/uboot-sifiveu/patches/0003-board-sifive-Set-LED-s-color-to-purple-in-the-U-boot.patch b/package/boot/uboot-sifiveu/patches/0003-board-sifive-Set-LED-s-color-to-purple-in-the-U-boot.patch
index 9820d2e2f9..a98271acbc 100644
--- a/package/boot/uboot-sifiveu/patches/0003-board-sifive-Set-LED-s-color-to-purple-in-the-U-boot.patch
+++ b/package/boot/uboot-sifiveu/patches/0003-board-sifive-Set-LED-s-color-to-purple-in-the-U-boot.patch
@@ -14,8 +14,6 @@ stage.
  configs/sifive_unmatched_defconfig | 1 +
  3 files changed, 14 insertions(+)
 
-diff --git a/board/sifive/unmatched/pwm.c b/board/sifive/unmatched/pwm.c
-index e1cc02310a..bd67672c22 100644
 --- a/board/sifive/unmatched/pwm.c
 +++ b/board/sifive/unmatched/pwm.c
 @@ -36,6 +36,7 @@ void pwm_device_init(void)
@@ -37,8 +35,6 @@ index e1cc02310a..bd67672c22 100644
 +	writel(PWM_CMP_ENABLE_VAL, (void *)&pwm0->cmp3);
 +#endif
  }
-diff --git a/board/sifive/unmatched/unmatched.c b/board/sifive/unmatched/unmatched.c
-index 6295deeae2..30c082d001 100644
 --- a/board/sifive/unmatched/unmatched.c
 +++ b/board/sifive/unmatched/unmatched.c
 @@ -22,6 +22,12 @@ void *board_fdt_blob_setup(int *err)
@@ -54,15 +50,10 @@ index 6295deeae2..30c082d001 100644
  int board_init(void)
  {
  	/* enable all cache ways */
-diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
-index d400ed0b23..0758f8e90f 100644
 --- a/configs/sifive_unmatched_defconfig
 +++ b/configs/sifive_unmatched_defconfig
-@@ -51,3 +51,4 @@ CONFIG_DM_SCSI=y
+@@ -62,3 +62,4 @@ CONFIG_DM_SCSI=y
  CONFIG_USB=y
  CONFIG_USB_XHCI_HCD=y
  CONFIG_USB_XHCI_PCI=y
 +CONFIG_BOARD_EARLY_INIT_F=y
--- 
-2.27.0
-
diff --git a/package/boot/uboot-sifiveu/patches/0009-riscv-Fix-build-against-binutils.patch b/package/boot/uboot-sifiveu/patches/0009-riscv-Fix-build-against-binutils.patch
index 87dbf984ec..f7c6a62291 100644
--- a/package/boot/uboot-sifiveu/patches/0009-riscv-Fix-build-against-binutils.patch
+++ b/package/boot/uboot-sifiveu/patches/0009-riscv-Fix-build-against-binutils.patch
@@ -26,8 +26,6 @@ Date:   Mon Oct 3 18:07:54 2022 +0200
     Tested-by: Christian Stewart <christian at paral.in>
     Reviewed-by: Rick Chen <rick at andestech.com>
 
-diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
-index 0b80eb8d86..53d1194ffb 100644
 --- a/arch/riscv/Makefile
 +++ b/arch/riscv/Makefile
 @@ -24,7 +24,16 @@ ifeq ($(CONFIG_CMODEL_MEDANY),y)
diff --git a/package/boot/uboot-sifiveu/patches/100-mkimage-check-environment-for-dtc-binary-location.patch b/package/boot/uboot-sifiveu/patches/100-mkimage-check-environment-for-dtc-binary-location.patch
index 482aa1a369..789172f21b 100644
--- a/package/boot/uboot-sifiveu/patches/100-mkimage-check-environment-for-dtc-binary-location.patch
+++ b/package/boot/uboot-sifiveu/patches/100-mkimage-check-environment-for-dtc-binary-location.patch
@@ -17,7 +17,7 @@ Cc: Simon Glass <sjg at chromium.org>
 
 --- a/tools/fit_image.c
 +++ b/tools/fit_image.c
-@@ -726,9 +726,14 @@ static int fit_handle_file(struct image_
+@@ -729,9 +729,14 @@ static int fit_handle_file(struct image_
  		}
  		*cmd = '\0';
  	} else if (params->datafile) {
diff --git a/package/boot/uboot-sifiveu/patches/130-fix-mkimage-host-build.patch b/package/boot/uboot-sifiveu/patches/130-fix-mkimage-host-build.patch
index cd65c1321f..8b110a880f 100644
--- a/package/boot/uboot-sifiveu/patches/130-fix-mkimage-host-build.patch
+++ b/package/boot/uboot-sifiveu/patches/130-fix-mkimage-host-build.patch
@@ -1,6 +1,6 @@
 --- a/tools/image-host.c
 +++ b/tools/image-host.c
-@@ -1125,6 +1125,7 @@ static int fit_config_add_verification_d
+@@ -1122,6 +1122,7 @@ static int fit_config_add_verification_d
   * 2) get public key (X509_get_pubkey)
   * 3) provide der format (d2i_RSAPublicKey)
   */
@@ -8,7 +8,7 @@
  static int read_pub_key(const char *keydir, const void *name,
  			unsigned char **pubkey, int *pubkey_len)
  {
-@@ -1178,6 +1179,13 @@ err_cert:
+@@ -1175,6 +1176,13 @@ err_cert:
  	fclose(f);
  	return ret;
  }
diff --git a/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch b/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch
index a4080e4ea9..6abb151608 100644
--- a/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch
+++ b/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch
@@ -34,8 +34,6 @@ Signed-off-by: Rob Herring <robh at kernel.org>
  scripts/dtc/dtc-lexer.l | 1 -
  1 file changed, 1 deletion(-)
 
-diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
-index 5c6c3fd557d7f..b3b7270300de5 100644
 --- a/scripts/dtc/dtc-lexer.l
 +++ b/scripts/dtc/dtc-lexer.l
 @@ -38,7 +38,6 @@ LINECOMMENT	"//".*\n
diff --git a/package/kernel/cryptodev-linux/patches/0001-cryptodev_verbosity-fix-build-for-linux-6.4.patch b/package/kernel/cryptodev-linux/patches/0001-cryptodev_verbosity-fix-build-for-linux-6.4.patch
index 390faec9c2..2d958f904c 100644
--- a/package/kernel/cryptodev-linux/patches/0001-cryptodev_verbosity-fix-build-for-linux-6.4.patch
+++ b/package/kernel/cryptodev-linux/patches/0001-cryptodev_verbosity-fix-build-for-linux-6.4.patch
@@ -13,11 +13,9 @@ Signed-off-by: Gaurav Jain <gaurav.jain at nxp.com>
  ioctl.c | 6 ++++++
  1 file changed, 6 insertions(+)
 
-diff --git a/ioctl.c b/ioctl.c
-index 8f241b86..4262bbd5 100644
 --- a/ioctl.c
 +++ b/ioctl.c
-@@ -1246,7 +1246,9 @@ static struct ctl_table verbosity_ctl_root[] = {
+@@ -1246,7 +1246,9 @@ static struct ctl_table verbosity_ctl_ro
  	{
  		.procname       = "ioctl",
  		.mode           = 0555,
diff --git a/package/kernel/cryptodev-linux/patches/0001-zero-copy-fix-build-for-linux-6.4.patch b/package/kernel/cryptodev-linux/patches/0001-zero-copy-fix-build-for-linux-6.4.patch
index 0b8147d56e..4d2dd13ae1 100644
--- a/package/kernel/cryptodev-linux/patches/0001-zero-copy-fix-build-for-linux-6.4.patch
+++ b/package/kernel/cryptodev-linux/patches/0001-zero-copy-fix-build-for-linux-6.4.patch
@@ -12,11 +12,9 @@ Signed-off-by: Gaurav Jain <gaurav.jain at nxp.com>
  zc.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
 
-diff --git a/zc.c b/zc.c
-index fdf7da17..6637945a 100644
 --- a/zc.c
 +++ b/zc.c
-@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
+@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr,
  	ret = get_user_pages_remote(task, mm,
  			(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
  			pg, NULL, NULL);
diff --git a/package/kernel/cryptodev-linux/patches/0003-move-recent-linux-version-ifdefs-from-v6.4-to-v6.5.patch b/package/kernel/cryptodev-linux/patches/0003-move-recent-linux-version-ifdefs-from-v6.4-to-v6.5.patch
index baf5b805cd..576269c100 100644
--- a/package/kernel/cryptodev-linux/patches/0003-move-recent-linux-version-ifdefs-from-v6.4-to-v6.5.patch
+++ b/package/kernel/cryptodev-linux/patches/0003-move-recent-linux-version-ifdefs-from-v6.4-to-v6.5.patch
@@ -23,11 +23,9 @@ Signed-off-by: Joan Bruguera Mic? <joanbrugueram at gmail.com>
  zc.c    | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/ioctl.c b/ioctl.c
-index 4262bbd..e3eefe1 100644
 --- a/ioctl.c
 +++ b/ioctl.c
-@@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_root[] = {
+@@ -1246,7 +1246,7 @@ static struct ctl_table verbosity_ctl_ro
  	{
  		.procname       = "ioctl",
  		.mode           = 0555,
@@ -45,11 +43,9 @@ index 4262bbd..e3eefe1 100644
  	verbosity_sysctl_header = register_sysctl_table(verbosity_ctl_root);
  #else
  	verbosity_sysctl_header = register_sysctl(verbosity_ctl_root->procname, verbosity_ctl_dir);
-diff --git a/zc.c b/zc.c
-index 6637945..00e00c1 100644
 --- a/zc.c
 +++ b/zc.c
-@@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
+@@ -80,7 +80,7 @@ int __get_userbuf(uint8_t __user *addr,
  	ret = get_user_pages_remote(task, mm,
  			(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
  			pg, NULL, NULL);
diff --git a/package/kernel/cryptodev-linux/patches/0004-fix-build-for-linux-6.7-rc1.patch b/package/kernel/cryptodev-linux/patches/0004-fix-build-for-linux-6.7-rc1.patch
index 3ef9e28ce7..4fded72faa 100644
--- a/package/kernel/cryptodev-linux/patches/0004-fix-build-for-linux-6.7-rc1.patch
+++ b/package/kernel/cryptodev-linux/patches/0004-fix-build-for-linux-6.7-rc1.patch
@@ -17,11 +17,9 @@ Signed-off-by: Joan Bruguera Mic? <joanbrugueram at gmail.com>
  cryptlib.c | 4 ++++
  1 file changed, 4 insertions(+)
 
-diff --git a/cryptlib.c b/cryptlib.c
-index 4d739e5..0e59d4c 100644
 --- a/cryptlib.c
 +++ b/cryptlib.c
-@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data *hdata, const char *alg_name,
+@@ -381,7 +381,11 @@ int cryptodev_hash_init(struct hash_data
  	}
  
  	hdata->digestsize = crypto_ahash_digestsize(hdata->async.s);
diff --git a/package/kernel/lantiq/ltq-ptm/patches/100-fix-compilation-warning-debugfs.patch b/package/kernel/lantiq/ltq-ptm/patches/100-fix-compilation-warning-debugfs.patch
index 283982fdef..7317d51163 100644
--- a/package/kernel/lantiq/ltq-ptm/patches/100-fix-compilation-warning-debugfs.patch
+++ b/package/kernel/lantiq/ltq-ptm/patches/100-fix-compilation-warning-debugfs.patch
@@ -12,7 +12,7 @@
  #if defined(ENABLE_FW_PROC) && ENABLE_FW_PROC
    static int proc_read_genconf(char *, char **, off_t, int, int *, void *);
  #endif
-@@ -889,6 +891,7 @@ static INLINE void proc_file_delete(void
+@@ -896,6 +898,7 @@ static INLINE void proc_file_delete(void
      remove_proc_entry("driver/ifx_ptm", NULL);
  }
  
@@ -20,7 +20,7 @@
  static int proc_read_version(char *buf, char **start, off_t offset, int count, int *eof, void *data)
  {
      int len = 0;
-@@ -963,8 +966,9 @@ static int proc_write_wanmib(struct file
+@@ -970,8 +973,9 @@ static int proc_write_wanmib(struct file
  
      return count;
  }
diff --git a/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch b/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
index 55551ad91d..538d569cbe 100644
--- a/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
+++ b/package/kernel/lantiq/ltq-ptm/patches/101-fix-more-compilation-warning-debugfs.patch
@@ -19,7 +19,7 @@
    static INLINE int strincmp(const char *, const char *, int);
  #endif
  static INLINE int ifx_ptm_version(char *);
-@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *f
+@@ -1166,8 +1166,6 @@ static int proc_write_dbg(struct file *f
      return count;
  }
  
@@ -28,7 +28,7 @@
  static INLINE int stricmp(const char *p1, const char *p2)
  {
      int c1, c2;
-@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1
+@@ -1185,7 +1183,6 @@ static INLINE int stricmp(const char *p1
      return *p1 - *p2;
  }
  
diff --git a/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch b/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch
index bb27ff355a..b3e4eb93b8 100644
--- a/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch
+++ b/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch
@@ -1,6 +1,6 @@
 --- a/src/drv_tapi_cid.c
 +++ b/src/drv_tapi_cid.c
-@@ -1424,6 +1424,8 @@ static IFX_int32_t cid_lookup_transparent(TAPI_CIDTX_DATA_t *pTxData,
+@@ -1424,6 +1424,8 @@ static IFX_int32_t cid_lookup_transparen
  
           cidfsk_set_tx_time (pTxData, &pConfData->TapiCidFskConf);
  
@@ -9,7 +9,7 @@
        case IFX_TAPI_CID_GEN_TYPE_DTMF:
           memcpy (pTxData->cidBuf[IFX_TAPI_CID_GEN_TYPE_DTMF].pBuf,
              pMessage[0].transparent.data, pMessage[0].transparent.len);
-@@ -1497,6 +1499,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+@@ -1497,6 +1499,7 @@ static IFX_int32_t cid_prepare_data(TAPI
           break;
        case IFX_TAPI_CID_STD_KPN_DTMF:
           /*lint -fallthrough*/
@@ -17,7 +17,7 @@
        case IFX_TAPI_CID_STD_KPN_DTMF_FSK:
           if (IFX_TAPI_CID_HM_ONHOOK == pTxData->txHookMode)
           {
-@@ -1506,6 +1509,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+@@ -1506,6 +1509,7 @@ static IFX_int32_t cid_prepare_data(TAPI
           }
           /* KPN CID Type 2 (off-hook) always using FSK */
           /*lint -fallthrough*/
@@ -25,7 +25,7 @@
        default:
           pTxData->cidGenType = IFX_TAPI_CID_GEN_TYPE_FSK;
           break;
-@@ -1532,6 +1536,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+@@ -1532,6 +1536,7 @@ static IFX_int32_t cid_prepare_data(TAPI
                 break;
  
              /*lint -fallthrough*/
@@ -33,7 +33,7 @@
           case IFX_TAPI_CID_GEN_TYPE_FSK:
  
              if (IFX_TAPI_CID_STD_NTT == pConfData->nStandard)
-@@ -2036,6 +2041,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+@@ -2036,6 +2041,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(T
           }
           pTxData->nCidSubState++;
           /*lint -fallthrough*/
@@ -41,7 +41,7 @@
        case 1:
           if (pConfData->OSIoffhook && pConfData->nSAStone)
           {
-@@ -2052,6 +2058,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+@@ -2052,6 +2058,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(T
           }
           pTxData->nCidSubState++;
           /*lint -fallthrough*/
@@ -49,7 +49,7 @@
        case 2:
           if (pConfData->nSAStone)
           {
-@@ -2069,6 +2076,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+@@ -2069,6 +2076,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(T
           }
           pTxData->nCidSubState++;
           /*lint -fallthrough*/
@@ -57,7 +57,7 @@
        default:
           /* Play CAS tone on data channel, use unprotected function, protection
              is done around cid_fsm_alert_exec */
-@@ -3458,6 +3466,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
+@@ -3458,6 +3466,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_
           }
           /* deliberately fall through */
           /*lint -fallthrough*/
@@ -65,7 +65,7 @@
        case TAPI_CID_STATE_ACK:
           /* deactivate the DTMF override - last two params are ignored */
           if (ptr_chk(pDrvCtx->SIG.DTMFD_Override, ""))
-@@ -3469,6 +3478,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
+@@ -3469,6 +3478,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_
           }
           /* deliberately fall through */
           /*lint -fallthrough*/
@@ -73,7 +73,7 @@
        case TAPI_CID_STATE_SENDING:
           TAPI_Stop_Timer (pTxData->CidTimerID);
           break;
-@@ -4066,6 +4076,7 @@ IFX_int32_t TAPI_Phone_Get_CidRxData (TAPI_CHANNEL *pChannel,
+@@ -4066,6 +4076,7 @@ IFX_int32_t TAPI_Phone_Get_CidRxData (TA
        /* If the fifo is not empty take the data from the fifo first. */
        /* deliberately fallthrough to default case */
        /*lint -fallthrough*/
@@ -83,7 +83,7 @@
           When there is no data in the fifo TAPI_statusErr is returned. */
 --- a/src/drv_tapi_dial.c
 +++ b/src/drv_tapi_dial.c
-@@ -319,6 +319,8 @@ static IFX_void_t ifx_tapi_dial_OnTimer(Timer_ID Timer, IFX_ulong_t nArg)
+@@ -319,6 +319,8 @@ static IFX_void_t ifx_tapi_dial_OnTimer(
           /* NOTE: the "break" statement has been intentionally omitted */
           /*lint -fallthrough */
  
@@ -94,7 +94,7 @@
              certain low pulse (not noise). The next state is the overlap with
 --- a/src/drv_tapi_event.c
 +++ b/src/drv_tapi_event.c
-@@ -1545,6 +1545,7 @@ IFX_int32_t IFX_TAPI_Event_Dispatch_ProcessCtx(IFX_TAPI_EXT_EVENT_PARAM_t*
+@@ -1545,6 +1545,7 @@ IFX_int32_t IFX_TAPI_Event_Dispatch_Proc
                    /**\todo put in device fifo */
                    pEvent->ch = IFX_TAPI_DEVICE_CH_NUMBER;
                    /*lint -fallthrough */
@@ -104,7 +104,7 @@
                    break;
 --- a/src/drv_tapi_ioctl.c
 +++ b/src/drv_tapi_ioctl.c
-@@ -1552,6 +1553,7 @@ static IFX_int32_t  TAPI_IoctlCh (IFX_TAPI_DRV_CTX_t* pDrvCtx,
+@@ -1552,6 +1552,7 @@ static IFX_int32_t  TAPI_IoctlCh (IFX_TA
        /* Dial Services */
           ret = TAPI_statusNotSupported;
           /*lint -fallthrough*/
diff --git a/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch b/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch
index b97ced30f8..3dd6eae25b 100644
--- a/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch
+++ b/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch
@@ -1,6 +1,6 @@
 --- a/src/drv_tapi_ioctl.c
 +++ b/src/drv_tapi_ioctl.c
-@@ -702,7 +702,8 @@ static IFX_int32_t TAPI_IoctlDev (IFX_TAPI_DRV_CTX_t* pDrvCtx,
+@@ -702,7 +702,8 @@ static IFX_int32_t TAPI_IoctlDev (IFX_TA
  
                 if (ret == TAPI_statusOk || ret == 1)
                 {
diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/patches/211-fix-compilation-warning-missing-fallthrough.patch b/package/kernel/lantiq/ltq-vdsl-vr11/patches/211-fix-compilation-warning-missing-fallthrough.patch
index 96e1ffef97..698141b8c7 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr11/patches/211-fix-compilation-warning-missing-fallthrough.patch
+++ b/package/kernel/lantiq/ltq-vdsl-vr11/patches/211-fix-compilation-warning-missing-fallthrough.patch
@@ -38,7 +38,7 @@
  #ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
 --- a/src/common/drv_dsl_cpe_api.c
 +++ b/src/common/drv_dsl_cpe_api.c
-@@ -2652,6 +2652,8 @@ DSL_Error_t DSL_DRV_AutobootControlSet(
+@@ -2653,6 +2653,8 @@ DSL_Error_t DSL_DRV_AutobootControlSet(
                 /* no break */
                 /* ... pass to restart*/
  
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/300-fix-compilation-warning-fallthrough.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/300-fix-compilation-warning-fallthrough.patch
index b0e106a5f5..5ce50a4184 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/300-fix-compilation-warning-fallthrough.patch
+++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/300-fix-compilation-warning-fallthrough.patch
@@ -33,4 +33,4 @@
 +      fallthrough;
     case DSL_PM_RESET_HISTORY_SHOWTIME:
  #ifdef INCLUDE_DSL_CPE_PM_SHOWTIME_COUNTERS
-       nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
\ No newline at end of file
+       nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch
index 99f1908f0f..3a5e4acd74 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch
+++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/301-fix-compilation-warning-simple-fix.patch
@@ -1,6 +1,6 @@
 --- a/src/common/drv_dsl_cpe_os_linux.c
 +++ b/src/common/drv_dsl_cpe_os_linux.c
-@@ -54,7 +54,7 @@ static int DSL_DRV_Release(DSL_DRV_inode_t * ino, DSL_DRV_file_t * fil);
+@@ -54,7 +54,7 @@ static int DSL_DRV_Release(DSL_DRV_inode
  
  static DSL_uint_t DSL_DRV_Poll(DSL_DRV_file_t *pFile, DSL_DRV_Poll_Table_t *wait);
  
@@ -9,7 +9,7 @@
  static void DSL_DRV_NlSendMsg(DSL_char_t* pMsg);
  #endif
  
-@@ -368,10 +368,10 @@ int DSL_DRV_debug_printf(DSL_Context_t const *pContext, DSL_char_t const *fmt, .
+@@ -368,10 +368,10 @@ int DSL_DRV_debug_printf(DSL_Context_t c
  {
     DSL_int_t nRet = 0;
  #ifndef _lint
@@ -22,7 +22,7 @@
     DSL_char_t debugString[DSL_DBG_MAX_DEBUG_PRINT_CHAR + 1] = {0};
     va_list ap;   /* points to each unnamed arg in turn */
  
-@@ -406,6 +406,8 @@ int DSL_DRV_debug_printf(DSL_Context_t const *pContext, DSL_char_t const *fmt, .
+@@ -406,6 +406,8 @@ int DSL_DRV_debug_printf(DSL_Context_t c
  #endif /* DSL_DEBUG_DISABLE */
     return nRet;
  #else
@@ -51,7 +51,7 @@
  
 --- a/src/device/drv_dsl_cpe_msg_vrx.c
 +++ b/src/device/drv_dsl_cpe_msg_vrx.c
-@@ -2456,32 +2456,32 @@ DSL_Error_t DSL_DRV_VRX_SendMsgSnrPerGroupesGet(
+@@ -2456,32 +2456,32 @@ DSL_Error_t DSL_DRV_VRX_SendMsgSnrPerGro
  #endif /* defined(INCLUDE_DSL_G997_PER_TONE) || defined(INCLUDE_DSL_DELT)*/
  
  #ifdef INCLUDE_DSL_DELT
@@ -78,9 +78,6 @@
 -         memcpy(pDst,pSrc,valueSize);
 -      }
 -   }
--
--   return DSL_SUCCESS;
--}
 +// static DSL_Error_t DSL_DRV_VRX_SpreadArray(
 +//    DSL_void_t* pArray,
 +//    DSL_uint16_t valueSize,
@@ -104,7 +101,9 @@
 +//          memcpy(pDst,pSrc,valueSize);
 +//       }
 +//    }
-+
+ 
+-   return DSL_SUCCESS;
+-}
 +//    return DSL_SUCCESS;
 +// }
  
@@ -112,7 +111,7 @@
     This function requests a set of up to 60 entries of the DELT data.
 --- a/src/device/drv_dsl_cpe_device_vrx.c
 +++ b/src/device/drv_dsl_cpe_device_vrx.c
-@@ -3356,7 +3356,9 @@ static DSL_Error_t DSL_DRV_VRX_TestParametersFeUpdate(
+@@ -3356,7 +3356,9 @@ static DSL_Error_t DSL_DRV_VRX_TestParam
     DSL_Error_t nErrCode = DSL_SUCCESS;
     DSL_uint16_t i = 0;
     DSL_uint16_t nDataLen = 0;
@@ -122,7 +121,7 @@
  
     DSL_DEBUG( DSL_DBG_MSG,
        (pContext, SYS_DBG_MSG"DSL[%02d]: IN - DSL_DRV_VRX_TestParametersFeUpdate"
-@@ -8312,6 +8314,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTraining(
+@@ -8312,6 +8314,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
              (pContext, SYS_DBG_MSG"DSL[%02d]: ORDERLY_SHUTDOWN state reached"
              DSL_DRV_CRLF, DSL_DEV_NUM(pContext)));
           /* do not use break here, continue handling */
diff --git a/package/kernel/lantiq/ltq-vectoring/patches/300-fix-compilation-warning-stack-limit.patch b/package/kernel/lantiq/ltq-vectoring/patches/300-fix-compilation-warning-stack-limit.patch
index 4d18f8e3b7..434d7d830d 100644
--- a/package/kernel/lantiq/ltq-vectoring/patches/300-fix-compilation-warning-stack-limit.patch
+++ b/package/kernel/lantiq/ltq-vectoring/patches/300-fix-compilation-warning-stack-limit.patch
@@ -1,6 +1,6 @@
 --- a/src/vectoring/ifxmips_vectoring.c
 +++ b/src/vectoring/ifxmips_vectoring.c
-@@ -298,7 +298,7 @@ static int proc_write_dbg(struct file *file, const char __user *buf, size_t coun
+@@ -298,7 +298,7 @@ static int proc_write_dbg(struct file *f
          DBG_ENABLE_MASK_ALL
      };
  
@@ -9,7 +9,7 @@
      char *p;
  
      int len, rlen;
-@@ -306,6 +306,10 @@ static int proc_write_dbg(struct file *file, const char __user *buf, size_t coun
+@@ -306,6 +306,10 @@ static int proc_write_dbg(struct file *f
      int f_enable = 0;
      int i;
  
@@ -20,7 +20,7 @@
      len = count < sizeof(str) ? count : sizeof(str) - 1;
      rlen = len - copy_from_user(str, buf, len);
      while ( rlen && str[rlen - 1] <= ' ' )
-@@ -365,6 +369,8 @@ static int proc_write_dbg(struct file *file, const char __user *buf, size_t coun
+@@ -365,6 +369,8 @@ static int proc_write_dbg(struct file *f
          }
      }
  
@@ -39,7 +39,7 @@
  
  #include "ifxmips_vectoring_stub.h"
  
-@@ -46,13 +47,17 @@ static int proc_write_vectoring(struct file *file, const char __user *buf, size_
+@@ -46,13 +47,17 @@ static int proc_write_vectoring(struct f
  {
      char *p;
      int len;
@@ -58,7 +58,7 @@
      len = sizeof(local_buf) < count ? sizeof(local_buf) - 1 : count;
      len = len - copy_from_user(local_buf, buf, len);
      local_buf[len] = 0;
-@@ -81,6 +86,8 @@ static int proc_write_vectoring(struct file *file, const char __user *buf, size_
+@@ -81,6 +86,8 @@ static int proc_write_vectoring(struct f
      else
          printk("echo send <size> > /proc/driver/vectoring_test\n");
  
diff --git a/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch b/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch
index d93cf0978c..4422b67cf7 100644
--- a/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch
+++ b/package/kernel/qca-ssdk/patches/103-hsl_phy-add-support-for-AQR114C-B0-PHY.patch
@@ -23,7 +23,7 @@ Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
  #define PHY_805XV2              0x004DD082
 --- a/src/hsl/phy/hsl_phy.c
 +++ b/src/hsl/phy/hsl_phy.c
-@@ -271,6 +271,7 @@ phy_type_t hsl_phytype_get_by_phyid(a_uint32_t dev_id, a_uint32_t phy_id)
+@@ -271,6 +271,7 @@ phy_type_t hsl_phytype_get_by_phyid(a_ui
  		case AQUANTIA_PHY_113C_B0:
  		case AQUANTIA_PHY_113C_B1:
  		case AQUANTIA_PHY_112C:
diff --git a/package/network/config/ltq-adsl-app/patches/001-stupid_breakage_fix.patch b/package/network/config/ltq-adsl-app/patches/001-stupid_breakage_fix.patch
index a868678d1e..ed04b94ba2 100644
--- a/package/network/config/ltq-adsl-app/patches/001-stupid_breakage_fix.patch
+++ b/package/network/config/ltq-adsl-app/patches/001-stupid_breakage_fix.patch
@@ -1,6 +1,6 @@
---- a/src/dsl_cpe_cli_access.c	2016-05-27 12:34:43.612485449 -0700
-+++ b/src/dsl_cpe_cli_access.c	2016-05-27 12:45:37.491727862 -0700
-@@ -1142,7 +1142,7 @@
+--- a/src/dsl_cpe_cli_access.c
++++ b/src/dsl_cpe_cli_access.c
+@@ -1142,7 +1142,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_Auto
  
        if ((ret < 0) && (autobootCtrl.accessCtl.nReturn < DSL_SUCCESS))
        {
@@ -9,7 +9,7 @@
        }
        else
        {
-@@ -1213,7 +1213,7 @@
+@@ -1213,7 +1213,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_Auto
  
     if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
     {
@@ -18,7 +18,7 @@
     }
     else
     {
-@@ -1290,7 +1290,7 @@
+@@ -1290,7 +1290,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_Line
  
     if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
     {
@@ -27,7 +27,7 @@
     }
     else
     {
-@@ -1355,7 +1355,7 @@
+@@ -1355,7 +1355,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_Reso
                    pCtx, &resourceUsageStatisticsData);
           if (ret < 0)
           {
@@ -36,7 +36,7 @@
           }
           else
           {
-@@ -3084,7 +3084,7 @@
+@@ -3084,7 +3084,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997
  
     if ((ret < 0) && (pData->accessCtl.nReturn < DSL_SUCCESS))
     {
@@ -45,7 +45,7 @@
     }
     else
     {
-@@ -4654,7 +4654,7 @@
+@@ -4654,7 +4654,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997
  
     if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
     {
@@ -54,7 +54,7 @@
     }
     else
     {
-@@ -5714,7 +5714,7 @@
+@@ -5714,7 +5714,7 @@ DSL_CLI_LOCAL DSL_int_t DSL_CPE_CLI_G997
  
     if ((ret < 0) && (pData.accessCtl.nReturn < DSL_SUCCESS))
     {
diff --git a/package/network/ipv6/thc-ipv6/patches/101-remove-march-native.patch b/package/network/ipv6/thc-ipv6/patches/101-remove-march-native.patch
index da6c7caa7c..b397f402b1 100644
--- a/package/network/ipv6/thc-ipv6/patches/101-remove-march-native.patch
+++ b/package/network/ipv6/thc-ipv6/patches/101-remove-march-native.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -7,7 +7,7 @@ HAVE_SSL=yes
+@@ -7,7 +7,7 @@
  
  #CC=gcc
  #CFLAGS=-g
diff --git a/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
index eac8a965e5..092ab1d726 100644
--- a/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
+++ b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
@@ -10,12 +10,12 @@ Signed-off-by: Paul Spooren <mail at aparcar.org>
 
 --- a/src/database.c
 +++ b/src/database.c
-@@ -1604,7 +1604,7 @@ const char *apk_db_layer_name(int layer)
+@@ -1643,7 +1643,7 @@ const char *apk_db_layer_name(int layer)
  {
  	switch (layer) {
  	case APK_DB_LAYER_ROOT: return "lib/apk/db";
 -	case APK_DB_LAYER_UVOL: return "lib/apk/db-uvol";
 +	case APK_DB_LAYER_UVOL: return "tmp/run/uvol/.meta/apk";
  	default:
- 		assert("invalid layer");
+ 		assert(!"invalid layer");
  		return 0;
diff --git a/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch b/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch
index ef9e5ab2f8..fe25f8aee7 100644
--- a/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch
+++ b/package/system/iucode-tool/patches/001-iucode_tool-add-missing-limits.h-for-USE_CPUID_DEVIC.patch
@@ -12,8 +12,6 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  iucode_tool.c | 1 +
  1 file changed, 1 insertion(+)
 
-diff --git a/iucode_tool.c b/iucode_tool.c
-index 4bba5db..0246035 100644
 --- a/iucode_tool.c
 +++ b/iucode_tool.c
 @@ -19,6 +19,7 @@
@@ -24,6 +22,3 @@ index 4bba5db..0246035 100644
  #include <fcntl.h>
  #include <stdio.h>
  #include <stdlib.h>
--- 
-2.37.2
-
diff --git a/package/system/refpolicy/patches/100-no-docs.patch b/package/system/refpolicy/patches/100-no-docs.patch
index 21767951a4..21342731b5 100644
--- a/package/system/refpolicy/patches/100-no-docs.patch
+++ b/package/system/refpolicy/patches/100-no-docs.patch
@@ -1,7 +1,5 @@
-Index: refpolicy-2.20200229/Makefile
-===================================================================
---- refpolicy-2.20200229.orig/Makefile
-+++ refpolicy-2.20200229/Makefile
+--- a/Makefile
++++ b/Makefile
 @@ -648,6 +648,6 @@ ifneq ($(generated_fc),)
  endif
  endif



From lede-commits at lists.infradead.org  Fri May 31 02:53:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 05:53:29 -0400
Subject: [openwrt/openwrt]  ply: add dynamic tracing package using BPF
In-Reply-To: <171714920923.1161684.72431100197773092@git-01.infra.openwrt.org>
References: <171714920923.1161684.72431100197773092@git-01.infra.openwrt.org>
Message-ID: <mailman.40296.1717149220.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/87d5d38e2ae61f0dffa66056053435cd29d4c399

commit 87d5d38e2ae61f0dffa66056053435cd29d4c399
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Mon May 6 17:06:55 2024 -0700

    ply: add dynamic tracing package using BPF
    
    ply is a light-weight dynamic tracer for Linux that leverages the kernel's
    BPF VM in concert with kprobes/tracepoints to attach probes to arbitrary
    points in the kernel.
    
    Most tracers that generate BPF bytecode are based on the LLVM-based BCC
    toolchain; ply on the other hand has no external dependencies outside libc,
    making it suitable for use on constrained embedded systems.
    
    Currently ply supports x86_64, aarch64, arm, riscv64, riscv32, powerpc,
    mips(el), and mips64(el) architectures.
    
    Further documentation, examples and implementation details may be found at:
    https://github.com/iovisor/ply.
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/devel/ply/Makefile                         | 54 +++++++++++++
 .../patches/100-revert-read-kernel-variants.patch  | 94 ++++++++++++++++++++++
 2 files changed, 148 insertions(+)

diff --git a/package/devel/ply/Makefile b/package/devel/ply/Makefile
new file mode 100644
index 0000000000..4a2443a5c5
--- /dev/null
+++ b/package/devel/ply/Makefile
@@ -0,0 +1,54 @@
+#
+# Copyright (C) 2022 Ye Jiaqiang, Tony Ambardar
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ply
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/iovisor/ply.git
+PKG_MIRROR_HASH:=d4f434c4d11b662b61da2de8b5a29ecdeac655aa5158f4c4127e2a91047c0c54
+PKG_SOURCE_DATE:=2023-05-16
+PKG_SOURCE_VERSION:=1b57943db56692924bccb61c271de24a8264d8df
+
+PKG_LICENSE:=GPLv2
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ply
+  SECTION:=devel
+  CATEGORY:=Development
+  TITLE:=Light-weight dynamic tracer for Linux
+  URL:=https://github.com/iovisor/ply.git
+  DEPENDS:= \
+	@KERNEL_BPF_EVENTS @KERNEL_DYNAMIC_FTRACE @KERNEL_DEBUG_FS \
+	@mips||mipsel||mips64||mips64el||x86_64||powerpc||arm_v7||aarch64||riscv||riscv64
+endef
+
+define Package/ply/description
+  A light-weight dynamic tracer for Linux that leverages the kernel's
+  BPF VM in concert with kprobes and tracepoints to attach probes to
+  arbitrary points in the kernel.
+endef
+
+CONFIGURE_ARGS += --enable-shared=yes --enable-static=no
+
+define Build/Prepare
+	$(call Build/Prepare/Default)
+	cd $(PKG_BUILD_DIR) && exec ./autogen.sh
+endef
+
+define Package/ply/install
+	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ply/.libs/ply $(1)/usr/bin/
+	$(CP) $(PKG_BUILD_DIR)/src/libply/.libs/libply.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,ply))
diff --git a/package/devel/ply/patches/100-revert-read-kernel-variants.patch b/package/devel/ply/patches/100-revert-read-kernel-variants.patch
new file mode 100644
index 0000000000..61615e93e1
--- /dev/null
+++ b/package/devel/ply/patches/100-revert-read-kernel-variants.patch
@@ -0,0 +1,94 @@
+From 755220eb974708615b14bcdc6412319698e0485d Mon Sep 17 00:00:00 2001
+From: Tony Ambardar <Tony.Ambardar at gmail.com>
+Date: Thu, 22 Dec 2022 22:53:10 -0800
+Subject: [PATCH] Revert "ply: Use new read_kernel variants"
+
+This reverts commit 17864b9818cceca09f31a346908afe1c718c10c5.
+
+Fixes: 17864b98 ("ply: Use new read_kernel variants")
+Signed-off-by: Tony Ambardar <Tony.Ambardar at gmail.com>
+---
+ src/libply/built-in/memory.c     | 10 +++++-----
+ src/libply/ir.c                  | 10 +++++-----
+ src/libply/provider/tracepoint.c |  2 +-
+ 3 files changed, 11 insertions(+), 11 deletions(-)
+
+--- a/src/libply/built-in/memory.c
++++ b/src/libply/built-in/memory.c
+@@ -140,7 +140,7 @@ static int str_ir_post(const struct func
+ 	ir_emit_ldbp(pb->ir, BPF_REG_1, n->sym->irs.stack);
+ 	ir_emit_insn(ir, MOV_IMM((int32_t)type_sizeof(n->sym->type)), BPF_REG_2, 0);
+ 	ir_emit_sym_to_reg(ir, BPF_REG_3, ptr->sym);
+-	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read_kernel_str), 0, 0);
++	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read_str), 0, 0);
+ 	return 0;
+ }
+ 
+@@ -305,7 +305,7 @@ static int struct_dot_ir_pre(const struc
+ 		sou->sym->irs.hint.dot = 1;
+ 
+ 		/* this also means we need to put ourselves on the
+-		 * stack since data will be loaded via probe_read_kernel */
++		 * stack since data will be loaded via probe_read */
+ 		n->sym->irs.hint.stack = 1;
+ 	}
+ 	return 0;
+@@ -334,7 +334,7 @@ static int struct_dot_ir_post(const stru
+ 
+ 		ir_emit_sym_to_reg(pb->ir, BPF_REG_3, ptr->sym);
+ 		ir_emit_insn(pb->ir, ALU64_IMM(BPF_ADD, offset), BPF_REG_3, 0);
+-		goto probe_read_kernel;
++		goto probe_read;
+ 	}
+ 
+ 	offset += sou->sym->irs.stack;
+@@ -346,10 +346,10 @@ static int struct_dot_ir_post(const stru
+ 	}
+ 
+ 	ir_emit_insn(pb->ir, ALU_IMM(BPF_ADD, offset), BPF_REG_3, 0);
+-probe_read_kernel:
++probe_read:
+ 	ir_emit_insn(pb->ir, MOV_IMM((int32_t)dst->size), BPF_REG_2, 0);
+ 	ir_emit_ldbp(pb->ir, BPF_REG_1, dst->stack);
+-	ir_emit_insn(pb->ir, CALL(BPF_FUNC_probe_read_kernel), 0, 0);
++	ir_emit_insn(pb->ir, CALL(BPF_FUNC_probe_read), 0, 0);
+ 	/* TODO if (r0) exit(r0); */
+ 	return 0;
+ }
+--- a/src/libply/ir.c
++++ b/src/libply/ir.c
+@@ -38,10 +38,10 @@ static const char *bpf_func_name(enum bp
+ 		return "map_update_elem";
+ 	case BPF_FUNC_perf_event_output:
+ 		return "perf_event_output";
+-	case BPF_FUNC_probe_read_kernel:
+-		return "probe_read_kernel";
+-	case BPF_FUNC_probe_read_kernel_str:
+-		return "probe_read_kernel_str";
++	case BPF_FUNC_probe_read:
++		return "probe_read";
++	case BPF_FUNC_probe_read_str:
++		return "probe_read_str";
+ 	case BPF_FUNC_trace_printk:
+ 		return "trace_printk";
+ 	default:
+@@ -416,7 +416,7 @@ void ir_emit_read_to_sym(struct ir *ir,
+ 	if (src != BPF_REG_3)
+ 		ir_emit_insn(ir, MOV, BPF_REG_3, src);
+ 
+-	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read_kernel), 0, 0);
++	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read), 0, 0);
+ 	/* TODO if (r0) exit(r0); */
+ }
+ 
+--- a/src/libply/provider/tracepoint.c
++++ b/src/libply/provider/tracepoint.c
+@@ -68,7 +68,7 @@ static int tracepoint_dyn_ir_post(const
+ 	ir_emit_insn(ir, ALU_IMM(BPF_AND, 0xffff), BPF_REG_4, 0);
+ 	ir_emit_insn(ir, ALU64(BPF_ADD), BPF_REG_3, BPF_REG_4);
+ 
+-	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read_kernel), 0, 0);
++	ir_emit_insn(ir, CALL(BPF_FUNC_probe_read), 0, 0);
+ 	return 0;
+ }
+ 



From lede-commits at lists.infradead.org  Fri May 31 05:28:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:28:38 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: avoid sub-shell invovation in
 netdev rename loop
In-Reply-To: <171715851846.1443331.2641351694936731787@git-01.infra.openwrt.org>
References: <171715851846.1443331.2641351694936731787@git-01.infra.openwrt.org>
Message-ID: <mailman.40352.1717158529.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/983222605ce6fabb036fbbd5797b6689ed082136

commit 983222605ce6fabb036fbbd5797b6689ed082136
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu May 30 14:38:56 2024 +0100

    mediatek: filogic: avoid sub-shell invovation in netdev rename loop
    
    Rename network devices to their label set in DT without invocation of
    a sub-shell.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label
index f8b6f155de..110e023b96 100644
--- a/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label
+++ b/target/linux/mediatek/filogic/base-files/lib/preinit/04_set_netdev_label
@@ -5,8 +5,8 @@ set_netdev_labels() {
 
 	for dir in /sys/class/net/*; do
 		[ -r "$dir/of_node/label" ] || continue
-		label="$(cat "$dir/of_node/label")"
-		netdev="$(basename $dir)"
+		read -r label < "$dir/of_node/label"
+		netdev="${dir##*/}"
 		[ "$netdev" = "$label" ] && continue
 		ip link set "$netdev" name "$label"
 	done



From lede-commits at lists.infradead.org  Fri May 31 05:28:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:28:39 -0400
Subject: [openwrt/openwrt]  ramips: get rid of downstream network device label
 patch
In-Reply-To: <171715851846.1443331.2641351694936731787@git-01.infra.openwrt.org>
References: <171715851846.1443331.2641351694936731787@git-01.infra.openwrt.org>
Message-ID: <mailman.40353.1717158533.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2a25c6ace8d833cf491a66846a0b9e7c5387b8f0

commit 2a25c6ace8d833cf491a66846a0b9e7c5387b8f0
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu May 30 14:23:08 2024 +0100

    ramips: get rid of downstream network device label patch
    
    Use a simple Shell script like on filogic target to get rid of downstream
    patch for the Ethernet driver which was rejected upstream long ago.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../base-files/lib/preinit/04_set_netdev_label     | 15 ++++++++++
 ...-net-ethernet-mediatek-support-net-labels.patch | 34 ----------------------
 2 files changed, 15 insertions(+), 34 deletions(-)

diff --git a/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label b/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label
new file mode 100644
index 0000000000..110e023b96
--- /dev/null
+++ b/target/linux/ramips/mt7621/base-files/lib/preinit/04_set_netdev_label
@@ -0,0 +1,15 @@
+set_netdev_labels() {
+	local dir
+	local label
+	local netdev
+
+	for dir in /sys/class/net/*; do
+		[ -r "$dir/of_node/label" ] || continue
+		read -r label < "$dir/of_node/label"
+		netdev="${dir##*/}"
+		[ "$netdev" = "$label" ] && continue
+		ip link set "$netdev" name "$label"
+	done
+}
+
+boot_hook_add preinit_main set_netdev_labels
diff --git a/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
deleted file mode 100644
index 0a7f7785db..0000000000
--- a/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From bd0f89de5476ca25e73fae829ba3e1dafae1d90d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ren=C3=A9=20van=20Dorst?= <opensource at vdorst.com>
-Date: Fri, 21 Jun 2019 10:04:05 +0200
-Subject: [PATCH] net: ethernet: mediatek: support net-labels
-
-With this patch, device name can be set within dts file in the same way as dsa
-port can.
-Add: label = "wan"; to GMAC node.
-
-Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
----
- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4662,6 +4662,7 @@ static const struct net_device_ops mtk_n
- 
- static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
- {
-+	const char *name = of_get_property(np, "label", NULL);
- 	const __be32 *_id = of_get_property(np, "reg", NULL);
- 	struct device_node *pcs_np;
- 	phy_interface_t phy_mode;
-@@ -4875,6 +4876,9 @@ static int mtk_add_mac(struct mtk_eth *e
- 						NETDEV_XDP_ACT_NDO_XMIT |
- 						NETDEV_XDP_ACT_NDO_XMIT_SG;
- 
-+	if (name)
-+		strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);
-+
- 	return 0;
- 
- free_netdev:



From lede-commits at lists.infradead.org  Fri May 31 05:38:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:45 -0400
Subject: [openwrt/openwrt]  kernel: video-dma: explicitly state packaged
 modules
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40357.1717159132.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d7cbe0a55902af30467eaf307b43e8cc53741d0

commit 4d7cbe0a55902af30467eaf307b43e8cc53741d0
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:04 2024 +0200

    kernel: video-dma: explicitly state packaged modules
    
    Because wildcard in variable stating packaged modules, the filtering for
    built-in kernel modules didn't work and would cause a packaging failure.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 package/kernel/linux/modules/video.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/video.mk b/package/kernel/linux/modules/video.mk
index 018f5644b0..ff04e3b5de 100644
--- a/package/kernel/linux/modules/video.mk
+++ b/package/kernel/linux/modules/video.mk
@@ -1181,7 +1181,9 @@ define KernelPackage/video-dma
   KCONFIG:= \
 	CONFIG_VIDEOBUF2_DMA_CONTIG \
 	CONFIG_VIDEOBUF2_DMA_SG
-  FILES:= $(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-dma-*.ko
+  FILES:= \
+	$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-dma-contig.ko \
+	$(LINUX_DIR)/drivers/media/common/videobuf2/videobuf2-dma-sg.ko
   AUTOLOAD:=$(call AutoLoad,66,videobuf2-dma-contig videobuf2-dma-sg)
   $(call AddDepends/video)
 endef



From lede-commits at lists.infradead.org  Fri May 31 05:38:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:50 -0400
Subject: [openwrt/openwrt]  tegra: add testing 6.6 kernel
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40358.1717159134.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/192ab0903fe77ada1c4d8cabd2d5105887df038b

commit 192ab0903fe77ada1c4d8cabd2d5105887df038b
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:09 2024 +0200

    tegra: add testing 6.6 kernel
    
    Preliminary support.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/Makefile       | 1 +
 target/linux/tegra/image/Makefile | 9 +++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile
index 43ca154e8a..3513e2751e 100644
--- a/target/linux/tegra/Makefile
+++ b/target/linux/tegra/Makefile
@@ -13,6 +13,7 @@ CPU_SUBTYPE := vfpv3-d16
 SUBTARGETS := generic
 
 KERNEL_PATCHVER := 5.15
+KERNEL_TESTING_PATCHVER := 6.6
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile
index da0b3813bb..7103b6d36e 100644
--- a/target/linux/tegra/image/Makefile
+++ b/target/linux/tegra/image/Makefile
@@ -10,8 +10,8 @@ define Build/tegra-sdcard
 	mkdir -p $@.boot
 	$(CP) $(KDIR)/$(KERNEL_NAME) $@.boot
 	$(if $(DEVICE_DTS),\
-		$(foreach dtb,$(DEVICE_DTS),$(CP) $(DTS_DIR)/$(dtb).dtb $@.boot), \
-		$(CP) $(DTS_DIR)/*.dtb $@.boot)
+		$(foreach dtb,$(DEVICE_DTS),$(CP) $(DEVICE_DTS_DIR)/$(dtb).dtb $@.boot), \
+		$(CP) $(DEVICE_DTS_DIR)/*.dtb $@.boot)
 	mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
 		-n '$(DEVICE_TITLE) OpenWrt bootscript' \
 		-d $(BOOT_SCRIPT) \
@@ -32,6 +32,11 @@ DEVICE_VARS += BOOT_SCRIPT UBOOT
 
 define Device/Default
   BOOT_SCRIPT := generic-bootscript
+ifeq ($(KERNEL),6.6)
+  DEVICE_DTS_DIR := $$(DTS_DIR)/nvidia
+else
+  DEVICE_DTS_DIR := $$(DTS_DIR)
+endif
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := append-rootfs | pad-extra 128k | tegra-sdcard | gzip | append-metadata
   KERNEL_NAME := zImage



From lede-commits at lists.infradead.org  Fri May 31 05:38:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:49 -0400
Subject: [openwrt/openwrt]  tegra: 6.6: refresh config and patches
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40359.1717159137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4ff770e76353be65dec3677e73872342f5abfb88

commit 4ff770e76353be65dec3677e73872342f5abfb88
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:08 2024 +0200

    tegra: 6.6: refresh config and patches
    
    Simple refresh to get rid of any fuzz and drop serial patch. With few
    bug fixes around tegra serial driver the spurious IRQ didn't appear any
    more during test. Let's see how long that'll last.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/config-6.6                      | 93 +++++++++++++++++-----
 ...ious-interrupts-due-to-tegra2-silicon-bug.patch | 77 ------------------
 ...egra-enable-front-panel-leds-in-TrimSlice.patch |  6 +-
 3 files changed, 76 insertions(+), 100 deletions(-)

diff --git a/target/linux/tegra/config-6.6 b/target/linux/tegra/config-6.6
index 1600dd7f21..4326326d3c 100644
--- a/target/linux/tegra/config-6.6
+++ b/target/linux/tegra/config-6.6
@@ -9,11 +9,11 @@ CONFIG_ARCH_MULTIPLATFORM=y
 CONFIG_ARCH_MULTI_V6_V7=y
 CONFIG_ARCH_MULTI_V7=y
 CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
-CONFIG_ARCH_NR_GPIO=1024
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARCH_TEGRA=y
 # CONFIG_ARCH_TEGRA_114_SOC is not set
@@ -23,12 +23,11 @@ CONFIG_ARCH_TEGRA_2x_SOC=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
 CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
 CONFIG_ARM_ERRATA_720789=y
 CONFIG_ARM_ERRATA_754327=y
 CONFIG_ARM_ERRATA_764369=y
 CONFIG_ARM_GIC=y
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
@@ -54,7 +53,11 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_PM=y
 CONFIG_BOUNCE=y
+CONFIG_BUFFER_HEAD=y
 CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CLZ_TAB=y
@@ -70,7 +73,10 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
 # CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
 # CONFIG_CMA_SYSFS is not set
 CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CONTIG_ALLOC=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_CPUFREQ_DT_PLATDEV=y
@@ -97,6 +103,8 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
@@ -117,10 +125,14 @@ CONFIG_CRYPTO_DRBG=y
 CONFIG_CRYPTO_DRBG_HMAC=y
 CONFIG_CRYPTO_DRBG_MENU=y
 CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_GENIV=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
+CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZ4=y
 CONFIG_CRYPTO_LZ4HC=y
 CONFIG_CRYPTO_LZO=y
@@ -133,12 +145,16 @@ CONFIG_CRYPTO_SHA1=y
 CONFIG_CRYPTO_SHA1_ARM=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA256_ARM=y
+CONFIG_CRYPTO_SHA3=y
 CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_SHA512_ARM=y
 CONFIG_CRYPTO_TWOFISH=y
 CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DDR=y
 CONFIG_DEBUG_ALIGN_RODATA=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 # CONFIG_DEVFREQ_GOV_PASSIVE is not set
 # CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
@@ -152,11 +168,13 @@ CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DNOTIFY=y
 CONFIG_DRM=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DISPLAY_DP_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
 CONFIG_DRM_DP_AUX_BUS=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
@@ -171,15 +189,16 @@ CONFIG_DRM_TEGRA=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_EXTCON=y
 CONFIG_F2FS_FS=y
 CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
+CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_DMAMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
 CONFIG_FB_SYS_FOPS=y
@@ -189,6 +208,9 @@ CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -206,7 +228,6 @@ CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_PHY=y
 CONFIG_GENERIC_PINCONF=y
@@ -222,19 +243,18 @@ CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_TEGRA=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HAVE_SMP=y
 CONFIG_HDMI=y
-CONFIG_HID=y
-CONFIG_HIDRAW=y
-CONFIG_HID_GENERIC=y
 CONFIG_HIGHMEM=y
 CONFIG_HIGHPTE=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HWMON=y
 CONFIG_HZ_FIXED=0
@@ -247,15 +267,20 @@ CONFIG_I2C_TEGRA=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_VIVALDIFMAP=y
 CONFIG_INTERCONNECT=y
+# CONFIG_IOMMUFD is not set
 CONFIG_IOMMU_API=y
 # CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
 CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
 CONFIG_IOMMU_IOVA=y
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
@@ -273,7 +298,6 @@ CONFIG_LZ4_COMPRESS=y
 CONFIG_LZ4_DECOMPRESS=y
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MEMORY=y
 CONFIG_MEMORY_ISOLATION=y
 # CONFIG_MFD_ACER_A500_EC is not set
@@ -288,14 +312,19 @@ CONFIG_MMC_SDHCI_IO_ACCESSORS=y
 # CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMC_SDHCI_TEGRA=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MPILIB=y
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
 # CONFIG_NEON is not set
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NR_CPUS=4
 CONFIG_NVMEM=y
@@ -314,6 +343,10 @@ CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PADATA=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEASPM=y
@@ -326,7 +359,6 @@ CONFIG_PCIE_PME=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DOMAINS_GENERIC=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCI_TEGRA=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
@@ -348,11 +380,13 @@ CONFIG_PM_OPP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_SUPPLY=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_PWM=y
 CONFIG_PWM_SYSFS=y
 CONFIG_PWM_TEGRA=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
@@ -387,6 +421,7 @@ CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SND=y
+CONFIG_SND_AUDIO_GRAPH_CARD=y
 # CONFIG_SND_COMPRESS_OFFLOAD is not set
 CONFIG_SND_DMAENGINE_PCM=y
 # CONFIG_SND_DRIVERS is not set
@@ -395,28 +430,41 @@ CONFIG_SND_JACK=y
 CONFIG_SND_JACK_INPUT_DEV=y
 # CONFIG_SND_PCI is not set
 CONFIG_SND_PCM=y
+CONFIG_SND_PCM_ELD=y
+CONFIG_SND_PCM_IEC958=y
 # CONFIG_SND_PROC_FS is not set
 CONFIG_SND_SIMPLE_CARD=y
 CONFIG_SND_SIMPLE_CARD_UTILS=y
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_AC97_BUS=y
 CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_HDMI_CODEC=y
 CONFIG_SND_SOC_I2C_AND_SPI=y
 CONFIG_SND_SOC_TEGRA=y
+# CONFIG_SND_SOC_TEGRA186_ASRC is not set
 # CONFIG_SND_SOC_TEGRA186_DSPK is not set
 CONFIG_SND_SOC_TEGRA20_AC97=y
 CONFIG_SND_SOC_TEGRA20_DAS=y
 CONFIG_SND_SOC_TEGRA20_I2S=y
 CONFIG_SND_SOC_TEGRA20_SPDIF=y
 # CONFIG_SND_SOC_TEGRA210_ADMAIF is not set
+# CONFIG_SND_SOC_TEGRA210_ADX is not set
 # CONFIG_SND_SOC_TEGRA210_AHUB is not set
+# CONFIG_SND_SOC_TEGRA210_AMX is not set
 # CONFIG_SND_SOC_TEGRA210_DMIC is not set
 # CONFIG_SND_SOC_TEGRA210_I2S is not set
+# CONFIG_SND_SOC_TEGRA210_MIXER is not set
+# CONFIG_SND_SOC_TEGRA210_MVC is not set
+# CONFIG_SND_SOC_TEGRA210_OPE is not set
+# CONFIG_SND_SOC_TEGRA210_SFC is not set
 # CONFIG_SND_SOC_TEGRA30_AHUB is not set
 # CONFIG_SND_SOC_TEGRA30_I2S is not set
 # CONFIG_SND_SOC_TEGRA_ALC5632 is not set
+# CONFIG_SND_SOC_TEGRA_AUDIO_GRAPH_CARD is not set
 CONFIG_SND_SOC_TEGRA_MACHINE_DRV=y
+# CONFIG_SND_SOC_TEGRA_MAX98088 is not set
 # CONFIG_SND_SOC_TEGRA_MAX98090 is not set
+# CONFIG_SND_SOC_TEGRA_RT5631 is not set
 # CONFIG_SND_SOC_TEGRA_RT5640 is not set
 # CONFIG_SND_SOC_TEGRA_RT5677 is not set
 # CONFIG_SND_SOC_TEGRA_SGTL5000 is not set
@@ -433,6 +481,7 @@ CONFIG_SOC_TEGRA20_VOLTAGE_COUPLER=y
 CONFIG_SOC_TEGRA_FLOWCTRL=y
 CONFIG_SOC_TEGRA_FUSE=y
 CONFIG_SOC_TEGRA_PMC=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SOUND=y
 CONFIG_SOUND_OSS_CORE=y
 CONFIG_SOUND_OSS_CORE_PRECLAIM=y
@@ -444,29 +493,33 @@ CONFIG_SPI_MEM=y
 CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 # CONFIG_SPI_TEGRA210_QUAD is not set
-CONFIG_SRCU=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_TEGRA186_TIMER is not set
 CONFIG_TEGRA20_APB_DMA=y
 CONFIG_TEGRA20_EMC=y
+# CONFIG_TEGRA210_ADMA is not set
+# CONFIG_TEGRA_ACONNECT is not set
 CONFIG_TEGRA_AHB=y
 CONFIG_TEGRA_GMI=y
 CONFIG_TEGRA_HOST1X=y
+CONFIG_TEGRA_HOST1X_CONTEXT_BUS=y
 CONFIG_TEGRA_HOST1X_FIREWALL=y
 CONFIG_TEGRA_IOMMU_GART=y
 # CONFIG_TEGRA_IOMMU_SMMU is not set
 # CONFIG_TEGRA_IVC is not set
 CONFIG_TEGRA_MC=y
-# CONFIG_TEGRA_SOCTHERM is not set
+CONFIG_TEGRA_SOCTHERM=y
 CONFIG_TEGRA_TIMER=y
 CONFIG_TEGRA_WATCHDOG=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
 CONFIG_TREE_RCU=y
 CONFIG_TREE_SRCU=y
-# CONFIG_UACCE is not set
 # CONFIG_UCLAMP_TASK is not set
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNWINDER_ARM=y
@@ -481,8 +534,6 @@ CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_HCD_PLATFORM is not set
 CONFIG_USB_EHCI_TEGRA=y
 CONFIG_USB_GADGET=y
-CONFIG_USB_HID=y
-CONFIG_USB_HIDDEV=y
 CONFIG_USB_PHY=y
 CONFIG_USB_ROLE_SWITCH=y
 CONFIG_USB_SUPPORT=y
@@ -495,6 +546,8 @@ CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USE_OF=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+CONFIG_VIDEO_CMDLINE=y
+CONFIG_VIDEO_NOMODESET=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
 CONFIG_XPS=y
diff --git a/target/linux/tegra/patches-6.6/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch b/target/linux/tegra/patches-6.6/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
deleted file mode 100644
index 8f01f73eb2..0000000000
--- a/target/linux/tegra/patches-6.6/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From patchwork Fri Jul 13 11:32:42 2018
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Subject: serial8250 on tegra hsuart: recover from spurious interrupts due to
- tegra2 silicon bug
-X-Patchwork-Submitter: "David R. Piegdon" <lkml at p23q.org>
-X-Patchwork-Id: 943440
-Message-Id: <4676ea34-69ce-5422-1ded-94218b89f7d9 at p23q.org>
-To: linux-tegra at vger.kernel.org
-Date: Fri, 13 Jul 2018 11:32:42 +0000
-From: "David R. Piegdon" <lkml at p23q.org>
-List-Id: <linux-tegra.vger.kernel.org>
-
-Hi,
-a while back I sent a few mails regarding spurious interrupts in the
-UARTA (hsuart) block of the Tegra2 SoC, when using the 8250 driver for
-it instead of the hsuart driver. After going down a pretty deep
-debugging/testing hole, I think I found a patch that fixes the issue. So
-far testing in a reboot-cycle suggests that the error frequency dropped
-from >3% of all reboots to at least <0.05% of all reboots. Tests
-continue to run over the weekend.
-
-The patch below already is a second iteration; the first did not reset
-the MCR or contain the lines below '// clear interrupts'. This resulted
-in no more spurious interrupts, but in a few % of spurious interrupts
-that were recovered the UART block did not receive any characters any
-more. So further resetting was required to fully reacquire operational
-state of the UART block.
-
-I'd love any comments/suggestions on this!
-
-Cheers,
-
-David
-
---- a/drivers/tty/serial/8250/8250_core.c
-+++ b/drivers/tty/serial/8250/8250_core.c
-@@ -134,6 +134,38 @@ static irqreturn_t serial8250_interrupt(
- 
- 		if (l == i->head && pass_counter++ > PASS_LIMIT)
- 			break;
-+
-+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-+		if (!handled && (port->type == PORT_TEGRA)) {
-+			/*
-+			 * Fix Tegra 2 CPU silicon bug where sometimes
-+			 * "TX holding register empty" interrupts result in a
-+			 * bad (metastable?) state in Tegras HSUART IP core.
-+			 * Only way to recover seems to be to reset all
-+			 * interrupts as well as the TX queue and the MCR.
-+			 * But we don't want to loose any outgoing characters,
-+			 * so only do it if the RX and TX queues are empty.
-+			 */
-+			unsigned char lsr = port->serial_in(port, UART_LSR);
-+			const unsigned char fifo_empty_mask =
-+						(UART_LSR_TEMT | UART_LSR_THRE);
-+			if (((lsr & (UART_LSR_DR | fifo_empty_mask)) ==
-+							fifo_empty_mask)) {
-+				port->serial_out(port, UART_IER, 0);
-+				port->serial_out(port, UART_MCR, 0);
-+				serial8250_clear_and_reinit_fifos(up);
-+				port->serial_out(port, UART_MCR, up->mcr);
-+				port->serial_out(port, UART_IER, up->ier);
-+				// clear interrupts
-+				serial_port_in(port, UART_LSR);
-+				serial_port_in(port, UART_RX);
-+				serial_port_in(port, UART_IIR);
-+				serial_port_in(port, UART_MSR);
-+				up->lsr_saved_flags = 0;
-+				up->msr_saved_flags = 0;
-+			}
-+		}
-+#endif
- 	} while (l != end);
- 
- 	spin_unlock(&i->lock);
diff --git a/target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch b/target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
index b1e210b212..9ec7f8b839 100644
--- a/target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
+++ b/target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/tegra20-trimslice.dts
-+++ b/arch/arm/boot/dts/tegra20-trimslice.dts
+--- a/arch/arm/boot/dts/nvidia/tegra20-trimslice.dts
++++ b/arch/arm/boot/dts/nvidia/tegra20-trimslice.dts
 @@ -201,16 +201,17 @@
  			conf_ata {
  				nvidia,pins = "ata", "atc", "atd", "ate",
@@ -23,7 +23,7 @@
  				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
  				nvidia,tristate = <TEGRA_PIN_DISABLE>;
  			};
-@@ -396,6 +397,20 @@
+@@ -408,6 +409,20 @@
  		};
  	};
  



From lede-commits at lists.infradead.org  Fri May 31 05:38:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:51 -0400
Subject: [openwrt/openwrt]  tegra: enable VDE driver
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40362.1717159137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b1bddb1d355553527c12985ae4c048ffddacbd0d

commit b1bddb1d355553527c12985ae4c048ffddacbd0d
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:10 2024 +0200

    tegra: enable VDE driver
    
    Upstream commit 83b7f0b8aeab ("ARM: tegra: Add OPP tables and power
    domains to Tegra20 device-trees") added power domains to all devices
    supporting power management and one of them is Video Decoder Engine.
    Because of lacking driver for VDE, its power gate couldn't be driven
    which inhibited reboot of the whole device.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/config-6.6 | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/target/linux/tegra/config-6.6 b/target/linux/tegra/config-6.6
index 4326326d3c..c3ffff01dc 100644
--- a/target/linux/tegra/config-6.6
+++ b/target/linux/tegra/config-6.6
@@ -298,6 +298,12 @@ CONFIG_LZ4_COMPRESS=y
 CONFIG_LZ4_DECOMPRESS=y
 CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_MEDIA_CONTROLLER_REQUEST_API=y
+CONFIG_MEDIA_PLATFORM_DRIVERS=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_SUPPORT_FILTER=y
 CONFIG_MEMORY=y
 CONFIG_MEMORY_ISOLATION=y
 # CONFIG_MFD_ACER_A500_EC is not set
@@ -494,6 +500,8 @@ CONFIG_SPI_TEGRA20_SFLASH=y
 CONFIG_SPI_TEGRA20_SLINK=y
 # CONFIG_SPI_TEGRA210_QUAD is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
 CONFIG_SWP_EMULATE=y
 CONFIG_SYNC_FILE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -544,10 +552,22 @@ CONFIG_USB_ULPI_BUS=y
 CONFIG_USB_ULPI_VIEWPORT=y
 # CONFIG_USB_XHCI_TEGRA is not set
 CONFIG_USE_OF=y
+CONFIG_V4L2_H264=y
+CONFIG_V4L2_MEM2MEM_DEV=y
+CONFIG_V4L_MEM2MEM_DRIVERS=y
+CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+CONFIG_VIDEOBUF2_CORE=y
+CONFIG_VIDEOBUF2_DMA_CONTIG=y
+CONFIG_VIDEOBUF2_DMA_SG=y
+CONFIG_VIDEOBUF2_MEMOPS=y
+CONFIG_VIDEOBUF2_V4L2=y
 CONFIG_VIDEO_CMDLINE=y
+CONFIG_VIDEO_DEV=y
 CONFIG_VIDEO_NOMODESET=y
+CONFIG_VIDEO_TEGRA_VDE=y
+CONFIG_VIDEO_V4L2_I2C=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
 CONFIG_XPS=y



From lede-commits at lists.infradead.org  Fri May 31 05:38:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:48 -0400
Subject: [openwrt/openwrt]  kernel/tegra: Restore kernel files for v5.15
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40363.1717159137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2f7b5d5472dd4c35148486007f989231898188ab

commit 2f7b5d5472dd4c35148486007f989231898188ab
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:07 2024 +0200

    kernel/tegra: Restore kernel files for v5.15
    
    This is an automatically generated commit which aids following Kernel patch
    history, as git will see the move and copy as a rename thus defeating the
    purpose.
    
    For the original discussion see:
    https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/config-5.15                     | 507 +++++++++++++++++++++
 ...ious-interrupts-due-to-tegra2-silicon-bug.patch |  77 ++++
 ...egra-enable-front-panel-leds-in-TrimSlice.patch |  46 ++
 3 files changed, 630 insertions(+)

diff --git a/target/linux/tegra/config-5.15 b/target/linux/tegra/config-5.15
new file mode 100644
index 0000000000..1600dd7f21
--- /dev/null
+++ b/target/linux/tegra/config-5.15
@@ -0,0 +1,507 @@
+CONFIG_AC97_BUS=y
+# CONFIG_AHCI_TEGRA is not set
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
+CONFIG_ARCH_NR_GPIO=1024
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_TEGRA=y
+# CONFIG_ARCH_TEGRA_114_SOC is not set
+# CONFIG_ARCH_TEGRA_124_SOC is not set
+CONFIG_ARCH_TEGRA_2x_SOC=y
+# CONFIG_ARCH_TEGRA_3x_SOC is not set
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_PL172_MPMC is not set
+# CONFIG_ARM_SMMU is not set
+# CONFIG_ARM_TEGRA124_CPUFREQ is not set
+CONFIG_ARM_TEGRA20_CPUFREQ=y
+CONFIG_ARM_TEGRA_CPUIDLE=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_ASN1=y
+CONFIG_ATA=y
+CONFIG_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSG_COMMON=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BOUNCE=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CLZ_TAB=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_STAT is not set
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_AES_ARM=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LZ4=y
+CONFIG_CRYPTO_LZ4HC=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_RSA=y
+CONFIG_CRYPTO_SEQIV=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA1_ARM=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA256_ARM=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_SHA512_ARM=y
+CONFIG_CRYPTO_TWOFISH=y
+CONFIG_CRYPTO_TWOFISH_COMMON=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_ALIGN_RODATA=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
+# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+# CONFIG_DEVFREQ_GOV_USERSPACE is not set
+CONFIG_DEVFREQ_THERMAL=y
+# CONFIG_DEVPORT is not set
+CONFIG_DMADEVICES=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DNOTIFY=y
+CONFIG_DRM=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DP_AUX_BUS=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_TEGRA=y
+# CONFIG_DRM_TEGRA_DEBUG is not set
+# CONFIG_DRM_TEGRA_STAGING is not set
+CONFIG_DTC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXT4_FS=y
+CONFIG_EXTCON=y
+CONFIG_F2FS_FS=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FUNCTION_ALIGNMENT=0
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_TEGRA=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HDMI=y
+CONFIG_HID=y
+CONFIG_HIDRAW=y
+CONFIG_HID_GENERIC=y
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HWMON=y
+CONFIG_HZ_FIXED=0
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_TEGRA=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INTERCONNECT=y
+CONFIG_IOMMU_API=y
+# CONFIG_IOMMU_DEBUGFS is not set
+CONFIG_IOMMU_DEFAULT_DMA_STRICT=y
+CONFIG_IOMMU_IOVA=y
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_KCMP=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZ4HC_COMPRESS=y
+CONFIG_LZ4_COMPRESS=y
+CONFIG_LZ4_DECOMPRESS=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+# CONFIG_MFD_ACER_A500_EC is not set
+# CONFIG_MFD_NVEC is not set
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SDHCI_TEGRA=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MPILIB=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+# CONFIG_NEON is not set
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NLS=y
+CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IOMMU=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_PME=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PCI_TEGRA=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHY_TEGRA_XUSB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_TEGRA=y
+CONFIG_PINCTRL_TEGRA20=y
+CONFIG_PINCTRL_TEGRA_XUSB=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_PL310_ERRATA_769419=y
+CONFIG_PL353_SMC=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_DEVFREQ=y
+# CONFIG_PM_DEVFREQ_EVENT is not set
+CONFIG_PM_GENERIC_DOMAINS=y
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+CONFIG_PM_OPP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_SYSFS=y
+CONFIG_PWM_TEGRA=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_TEGRA=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_NVMEM=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SCSI_PROC_FS is not set
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_TEGRA=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_TEGRA=y
+CONFIG_SERIO=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SND=y
+# CONFIG_SND_COMPRESS_OFFLOAD is not set
+CONFIG_SND_DMAENGINE_PCM=y
+# CONFIG_SND_DRIVERS is not set
+# CONFIG_SND_HDA_TEGRA is not set
+CONFIG_SND_JACK=y
+CONFIG_SND_JACK_INPUT_DEV=y
+# CONFIG_SND_PCI is not set
+CONFIG_SND_PCM=y
+# CONFIG_SND_PROC_FS is not set
+CONFIG_SND_SIMPLE_CARD=y
+CONFIG_SND_SIMPLE_CARD_UTILS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SOC_TEGRA=y
+# CONFIG_SND_SOC_TEGRA186_DSPK is not set
+CONFIG_SND_SOC_TEGRA20_AC97=y
+CONFIG_SND_SOC_TEGRA20_DAS=y
+CONFIG_SND_SOC_TEGRA20_I2S=y
+CONFIG_SND_SOC_TEGRA20_SPDIF=y
+# CONFIG_SND_SOC_TEGRA210_ADMAIF is not set
+# CONFIG_SND_SOC_TEGRA210_AHUB is not set
+# CONFIG_SND_SOC_TEGRA210_DMIC is not set
+# CONFIG_SND_SOC_TEGRA210_I2S is not set
+# CONFIG_SND_SOC_TEGRA30_AHUB is not set
+# CONFIG_SND_SOC_TEGRA30_I2S is not set
+# CONFIG_SND_SOC_TEGRA_ALC5632 is not set
+CONFIG_SND_SOC_TEGRA_MACHINE_DRV=y
+# CONFIG_SND_SOC_TEGRA_MAX98090 is not set
+# CONFIG_SND_SOC_TEGRA_RT5640 is not set
+# CONFIG_SND_SOC_TEGRA_RT5677 is not set
+# CONFIG_SND_SOC_TEGRA_SGTL5000 is not set
+CONFIG_SND_SOC_TEGRA_TRIMSLICE=y
+# CONFIG_SND_SOC_TEGRA_WM8753 is not set
+# CONFIG_SND_SOC_TEGRA_WM8903 is not set
+# CONFIG_SND_SOC_TEGRA_WM9712 is not set
+CONFIG_SND_SOC_TLV320AIC23=y
+CONFIG_SND_SOC_TLV320AIC23_I2C=y
+# CONFIG_SND_USB is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_TEGRA20_VOLTAGE_COUPLER=y
+CONFIG_SOC_TEGRA_FLOWCTRL=y
+CONFIG_SOC_TEGRA_FUSE=y
+CONFIG_SOC_TEGRA_PMC=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_TEGRA114 is not set
+CONFIG_SPI_TEGRA20_SFLASH=y
+CONFIG_SPI_TEGRA20_SLINK=y
+# CONFIG_SPI_TEGRA210_QUAD is not set
+CONFIG_SRCU=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYNC_FILE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TEGRA20_APB_DMA=y
+CONFIG_TEGRA20_EMC=y
+CONFIG_TEGRA_AHB=y
+CONFIG_TEGRA_GMI=y
+CONFIG_TEGRA_HOST1X=y
+CONFIG_TEGRA_HOST1X_FIREWALL=y
+CONFIG_TEGRA_IOMMU_GART=y
+# CONFIG_TEGRA_IOMMU_SMMU is not set
+# CONFIG_TEGRA_IVC is not set
+CONFIG_TEGRA_MC=y
+# CONFIG_TEGRA_SOCTHERM is not set
+CONFIG_TEGRA_TIMER=y
+CONFIG_TEGRA_WATCHDOG=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+# CONFIG_UACCE is not set
+# CONFIG_UCLAMP_TASK is not set
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_TEGRA=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_CONN_GPIO=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_EHCI_TEGRA=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
+CONFIG_USB_PHY=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_TEGRA_PHY=y
+# CONFIG_USB_TEGRA_XUDC is not set
+CONFIG_USB_ULPI=y
+CONFIG_USB_ULPI_BUS=y
+CONFIG_USB_ULPI_VIEWPORT=y
+# CONFIG_USB_XHCI_TEGRA is not set
+CONFIG_USE_OF=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
+CONFIG_XPS=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/tegra/patches-5.15/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch b/target/linux/tegra/patches-5.15/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
new file mode 100644
index 0000000000..8f01f73eb2
--- /dev/null
+++ b/target/linux/tegra/patches-5.15/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
@@ -0,0 +1,77 @@
+From patchwork Fri Jul 13 11:32:42 2018
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Subject: serial8250 on tegra hsuart: recover from spurious interrupts due to
+ tegra2 silicon bug
+X-Patchwork-Submitter: "David R. Piegdon" <lkml at p23q.org>
+X-Patchwork-Id: 943440
+Message-Id: <4676ea34-69ce-5422-1ded-94218b89f7d9 at p23q.org>
+To: linux-tegra at vger.kernel.org
+Date: Fri, 13 Jul 2018 11:32:42 +0000
+From: "David R. Piegdon" <lkml at p23q.org>
+List-Id: <linux-tegra.vger.kernel.org>
+
+Hi,
+a while back I sent a few mails regarding spurious interrupts in the
+UARTA (hsuart) block of the Tegra2 SoC, when using the 8250 driver for
+it instead of the hsuart driver. After going down a pretty deep
+debugging/testing hole, I think I found a patch that fixes the issue. So
+far testing in a reboot-cycle suggests that the error frequency dropped
+from >3% of all reboots to at least <0.05% of all reboots. Tests
+continue to run over the weekend.
+
+The patch below already is a second iteration; the first did not reset
+the MCR or contain the lines below '// clear interrupts'. This resulted
+in no more spurious interrupts, but in a few % of spurious interrupts
+that were recovered the UART block did not receive any characters any
+more. So further resetting was required to fully reacquire operational
+state of the UART block.
+
+I'd love any comments/suggestions on this!
+
+Cheers,
+
+David
+
+--- a/drivers/tty/serial/8250/8250_core.c
++++ b/drivers/tty/serial/8250/8250_core.c
+@@ -134,6 +134,38 @@ static irqreturn_t serial8250_interrupt(
+ 
+ 		if (l == i->head && pass_counter++ > PASS_LIMIT)
+ 			break;
++
++#ifdef CONFIG_ARCH_TEGRA_2x_SOC
++		if (!handled && (port->type == PORT_TEGRA)) {
++			/*
++			 * Fix Tegra 2 CPU silicon bug where sometimes
++			 * "TX holding register empty" interrupts result in a
++			 * bad (metastable?) state in Tegras HSUART IP core.
++			 * Only way to recover seems to be to reset all
++			 * interrupts as well as the TX queue and the MCR.
++			 * But we don't want to loose any outgoing characters,
++			 * so only do it if the RX and TX queues are empty.
++			 */
++			unsigned char lsr = port->serial_in(port, UART_LSR);
++			const unsigned char fifo_empty_mask =
++						(UART_LSR_TEMT | UART_LSR_THRE);
++			if (((lsr & (UART_LSR_DR | fifo_empty_mask)) ==
++							fifo_empty_mask)) {
++				port->serial_out(port, UART_IER, 0);
++				port->serial_out(port, UART_MCR, 0);
++				serial8250_clear_and_reinit_fifos(up);
++				port->serial_out(port, UART_MCR, up->mcr);
++				port->serial_out(port, UART_IER, up->ier);
++				// clear interrupts
++				serial_port_in(port, UART_LSR);
++				serial_port_in(port, UART_RX);
++				serial_port_in(port, UART_IIR);
++				serial_port_in(port, UART_MSR);
++				up->lsr_saved_flags = 0;
++				up->msr_saved_flags = 0;
++			}
++		}
++#endif
+ 	} while (l != end);
+ 
+ 	spin_unlock(&i->lock);
diff --git a/target/linux/tegra/patches-5.15/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch b/target/linux/tegra/patches-5.15/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
new file mode 100644
index 0000000000..b1e210b212
--- /dev/null
+++ b/target/linux/tegra/patches-5.15/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
@@ -0,0 +1,46 @@
+--- a/arch/arm/boot/dts/tegra20-trimslice.dts
++++ b/arch/arm/boot/dts/tegra20-trimslice.dts
+@@ -201,16 +201,17 @@
+ 			conf_ata {
+ 				nvidia,pins = "ata", "atc", "atd", "ate",
+ 					"crtp", "dap2", "dap3", "dap4", "dta",
+-					"dtb", "dtc", "dtd", "dte", "gmb",
+-					"gme", "i2cp", "pta", "slxc", "slxd",
+-					"spdi", "spdo", "uda";
++					"dtb", "dtc", "dtd", "gmb", "gme",
++					"i2cp", "pta", "slxc", "slxd", "spdi",
++					"spdo", "uda";
+ 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ 				nvidia,tristate = <TEGRA_PIN_ENABLE>;
+ 			};
+ 			conf_atb {
+ 				nvidia,pins = "atb", "cdev1", "cdev2", "dap1",
+-					"gma", "gmc", "gmd", "gpu", "gpu7",
+-					"gpv", "sdio1", "slxa", "slxk", "uac";
++					"dte", "gma", "gmc", "gmd", "gpu",
++					"gpu7", "gpv", "sdio1", "slxa", "slxk",
++					"uac";
+ 				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
+ 				nvidia,tristate = <TEGRA_PIN_DISABLE>;
+ 			};
+@@ -396,6 +397,20 @@
+ 		};
+ 	};
+ 
++	gpio-leds {
++		compatible = "gpio-leds";
++
++		ds2 {
++			label = "trimslice:green:right";
++			gpios = <&gpio TEGRA_GPIO(D, 2) GPIO_ACTIVE_LOW>;
++		};
++
++		ds3 {
++			label = "trimslice:green:left";
++			gpios = <&gpio TEGRA_GPIO(BB, 5) GPIO_ACTIVE_LOW>;
++		};
++	};
++
+ 	poweroff {
+ 		compatible = "gpio-poweroff";
+ 		gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>;



From lede-commits at lists.infradead.org  Fri May 31 05:38:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:46 -0400
Subject: [openwrt/openwrt]  tegra: refresh 5.15 config
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40364.1717159137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c1a09173abddda2da7edc81188665d8bcfd75253

commit c1a09173abddda2da7edc81188665d8bcfd75253
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:05 2024 +0200

    tegra: refresh 5.15 config
    
    Reduce diffstat in kernel config on new version introduction.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/config-5.15 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/tegra/config-5.15 b/target/linux/tegra/config-5.15
index 257ffda252..1600dd7f21 100644
--- a/target/linux/tegra/config-5.15
+++ b/target/linux/tegra/config-5.15
@@ -157,6 +157,7 @@ CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DNOTIFY=y
 CONFIG_DRM=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DP_AUX_BUS=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_KMS_HELPER=y
@@ -186,6 +187,7 @@ CONFIG_FB_SYS_IMAGEBLIT=y
 CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
@@ -297,6 +299,7 @@ CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NLS=y
 CONFIG_NR_CPUS=4
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y



From lede-commits at lists.infradead.org  Fri May 31 05:38:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 08:38:47 -0400
Subject: [openwrt/openwrt]  kernel/tegra: Create kernel files for v6.6 (from
 v5.15)
In-Reply-To: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
References: <171715912561.1463365.6900017078821672775@git-01.infra.openwrt.org>
Message-ID: <mailman.40367.1717159137.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b693eca4684da89dda735f24c75d4f46e2c4f000

commit b693eca4684da89dda735f24c75d4f46e2c4f000
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Wed May 29 16:24:06 2024 +0200

    kernel/tegra: Create kernel files for v6.6 (from v5.15)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 target/linux/tegra/{config-5.15 => config-6.6}                            | 0
 ...suart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch | 0
 .../101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch          | 0
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/tegra/config-5.15 b/target/linux/tegra/config-6.6
similarity index 100%
rename from target/linux/tegra/config-5.15
rename to target/linux/tegra/config-6.6
diff --git a/target/linux/tegra/patches-5.15/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch b/target/linux/tegra/patches-6.6/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
similarity index 100%
rename from target/linux/tegra/patches-5.15/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
rename to target/linux/tegra/patches-6.6/100-serial8250-on-tegra-hsuart-recover-from-spurious-interrupts-due-to-tegra2-silicon-bug.patch
diff --git a/target/linux/tegra/patches-5.15/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch b/target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
similarity index 100%
rename from target/linux/tegra/patches-5.15/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch
rename to target/linux/tegra/patches-6.6/101-ARM-dtc-tegra-enable-front-panel-leds-in-TrimSlice.patch



From lede-commits at lists.infradead.org  Fri May 31 06:55:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 09:55:13 -0400
Subject: [openwrt/openwrt]  imagebuilder: fix broken IB_STANDALONE option
In-Reply-To: <171716371353.1615027.2791678715542322166@git-01.infra.openwrt.org>
References: <171716371353.1615027.2791678715542322166@git-01.infra.openwrt.org>
Message-ID: <mailman.40387.1717163732.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a39d9693e66dea73d9753c7c0bae1378c2e97fed

commit a39d9693e66dea73d9753c7c0bae1378c2e97fed
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri May 31 13:08:02 2024 +0200

    imagebuilder: fix broken IB_STANDALONE option
    
    Fix broken IB_STANDALONE option for OPKG due to an error in ifdef logic
    where we weren't adding the required entry to reference the local files
    in repositories.conf
    
    Rework the ifdef to more explicit and restore original functionality of
    this option.
    
    While at it also provide different README for APK or OPKG.
    
    Fixes: d788ab376f85 ("build: add APK package build capabilities")
    Link: https://github.com/openwrt/openwrt/pull/15599
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/imagebuilder/Makefile                            | 11 ++++++++---
 target/imagebuilder/files/README.apk.md                 | 10 ++++++++++
 target/imagebuilder/files/{README.md => README.opkg.md} |  0
 3 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index ef32d2cf7c..7fd2aa0920 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -43,24 +43,29 @@ $(BIN_DIR)/$(IB_NAME).tar.zst: clean
 
 	$(INSTALL_DIR) $(PKG_BUILD_DIR)/packages
 
-ifeq ($(CONFIG_IB_STANDALONE),)
 ifneq ($(CONFIG_USE_APK),)
+  ifeq ($(CONFIG_IB_STANDALONE),)
 	$(call FeedSourcesAppendAPK,$(PKG_BUILD_DIR)/repositories)
 	$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories
+  endif
+
+	$(INSTALL_DATA) ./files/README.apk.md $(PKG_BUILD_DIR)/packages/README.md
 else
+  ifeq ($(CONFIG_IB_STANDALONE),)
 	echo '## Remote package repositories' >> $(PKG_BUILD_DIR)/repositories.conf
 	$(call FeedSourcesAppendOPKG,$(PKG_BUILD_DIR)/repositories.conf)
 	$(VERSION_SED_SCRIPT) $(PKG_BUILD_DIR)/repositories.conf
 
+  endif
+
 	# create an empty package index so `opkg` doesn't report an error
 	touch $(PKG_BUILD_DIR)/packages/Packages
-	$(INSTALL_DATA) ./files/README.md $(PKG_BUILD_DIR)/packages/
+	$(INSTALL_DATA) ./files/README.opkg.md $(PKG_BUILD_DIR)/packages/README.md
 
 	echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
 	echo '## This is the local package repository, do not remove!' >> $(PKG_BUILD_DIR)/repositories.conf
 	echo 'src imagebuilder file:packages'                          >> $(PKG_BUILD_DIR)/repositories.conf
 endif
-endif
 
 ifeq ($(CONFIG_BUILDBOT),)
   ifeq ($(CONFIG_IB_STANDALONE),)
diff --git a/target/imagebuilder/files/README.apk.md b/target/imagebuilder/files/README.apk.md
new file mode 100644
index 0000000000..e82a937e37
--- /dev/null
+++ b/target/imagebuilder/files/README.apk.md
@@ -0,0 +1,10 @@
+# ./packages folder
+
+Add `.apk` packages to this folder will allow the ImageBuilder to install them.
+
+For more complex setups consider adding a custom feed containing packages.
+
+    file:///path/to/Packages.adb
+
+Whenever the ImageBuilder builds a firmware image this folder will be reloaded
+and a new package index created.
diff --git a/target/imagebuilder/files/README.md b/target/imagebuilder/files/README.opkg.md
similarity index 100%
rename from target/imagebuilder/files/README.md
rename to target/imagebuilder/files/README.opkg.md



From lede-commits at lists.infradead.org  Fri May 31 07:01:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 10:01:49 -0400
Subject: [openwrt/openwrt]  tools/elfutils: do not directly link gnulib to
 libelf
In-Reply-To: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
References: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
Message-ID: <mailman.40388.1717164112.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5f47ccc0ea596248fdb458b933ef8a406f574f8a

commit 5f47ccc0ea596248fdb458b933ef8a406f574f8a
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Wed May 1 17:47:26 2024 -0400

    tools/elfutils: do not directly link gnulib to libelf
    
    The compiled library resulting from importing gnulib has been
    linked to libelf in order to easily cover other link dependencies.
    However, this is not appropriate for linking libelf to other programs
    as it bloats the resulting libelf library, and may result in
    multiple defintions of symbols based on whether or not
    certain modules from gnulib are included while elfutils
    already has it's own definition of a function.
    
    This is not a problem while building elfutils, because gnulib has
    it's own way of creating function aliases and special declarations
    that allow the linker to ignore the original function definitions,
    however, when libelf is used to link to something else,
    this results in an error at link time.
    
    The gnulib manual recommended linking the libraries directly,
    but those who have written it may not have considered how this
    can affect the ability to link that library in other builds,
    they likely assume the build targets would not be a dependency.
    
    Fix this by removing the linking between gnulib and libelf
    and instead overriding Make variables in order to add linking
    between gnulib and each of the binaries provided by elfutils,
    using Make functions to avoid applying it to other subdirectories.
    
    The function tdestroy() would still be missing on macOS,
    but the existence of the gnulib tsearch object having been built
    is an indicator of whether or not it is needed
    because it is only built conditionally by gnulib,
    so include linking that object only when it exists.
    
    Block the unnecessary replacement of some functions by gnulib
    so that future linking with libelf doesn't require
    the associated gnulib "rpl" prefixed functions.
    These replacements are very strict in order to correct
    minor bugs that don't have a real impact in almost all cases
    or new standards requirements that are not yet in effect or used.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # macOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/15368
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/elfutils/Makefile                      | 6 ++++++
 tools/elfutils/patches/100-portability.patch | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index b66d064e2b..39e7f80b4a 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -53,8 +53,14 @@ PKG_GNULIB_MODS = \
 
 include $(INCLUDE_DIR)/host-build.mk
 
+export $(PKG_GNULIB_BASE)=$(HOST_BUILD_DIR)/$(PKG_GNULIB_BASE)/$(PKG_GNULIB_BASE).la
+export $(PKG_GNULIB_BASE)_tsearch=$(HOST_BUILD_DIR)/$(PKG_GNULIB_BASE)/$(PKG_GNULIB_BASE)_la-tsearch.lo
+
 HOST_MAKE_FLAGS += \
 	AM_LDFLAGS='$$$$(STACK_USAGE_NO_ERROR)' \
+	LIBS+='$$$$(if $$$$(findstring $(lastword $(PKG_SUBDIRS)),$$$$(subdir)), $$$$($(PKG_GNULIB_BASE)))' \
+	LIBS+='$$$$(wildcard $$$$($(PKG_GNULIB_BASE)_tsearch))' \
+	REPLACE_FCNTL=0 REPLACE_FREE=0 REPLACE_FSTAT=0 REPLACE_OPEN=0 \
 	bin_PROGRAMS='$(PKG_PROGRAMS)' EXEEXT=
 
 ifeq ($(HOST_OS),Darwin)
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 980b117f21..09ee8daf1f 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -198,7 +198,7 @@
  pkginclude_HEADERS = elf-knowledge.h
  
 -libelf_a_SOURCES = elf_version.c elf_hash.c elf_error.c elf_fill.c \
-+libelf_la_LIBADD = ../libgnu/libgnu.la ../lib/libeu.la -lz $(zstd_LIBS) -lpthread
++libelf_la_LIBADD = ../lib/libeu.la -lz $(zstd_LIBS) -lpthread
 +libelf_la_SOURCES = elf_version.c elf_hash.c elf_error.c \
  		   elf_begin.c elf_next.c elf_rand.c elf_end.c elf_kind.c \
  		   gelf_getclass.c elf_getbase.c elf_getident.c \



From lede-commits at lists.infradead.org  Fri May 31 07:01:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 10:01:50 -0400
Subject: [openwrt/openwrt]  tools/elfutils: pass -O2 in HOST_CXXFLAGS
In-Reply-To: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
References: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
Message-ID: <mailman.40389.1717164113.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4454361e54b749bdc0b524092aea2366b5d5ed98

commit 4454361e54b749bdc0b524092aea2366b5d5ed98
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri May 31 15:47:15 2024 +0200

    tools/elfutils: pass -O2 in HOST_CXXFLAGS
    
    Trying to compile elfutils on Fedora 40 with GCC 14.1.1 will fail with:
    /home/robimarko/Building/AX3600/qualcommax/staging_dir/host/bin/g++ -std=c++11 -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/share/locale"'  -DDEBUGPRED=0 -DSRCDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -DOBJDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -I. -I..  -I../libgnu -I../libgnu -I. -I. -I../lib -I.. -I./../libelf -I./../libebl -I./../libdw [...]
    In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/os_defines.h:39,
                     from /usr/include/c++/14/x86_64-redhat-linux/bits/c++config.h:2521,
                     from /usr/include/c++/14/cstdlib:41,
                     from ../libgnu/gettext.h:56,
                     from ../libgnu/eu-config.h:62,
                     from ../config.h:2378,
                     from srcfiles.cxx:31:
    /usr/include/features.h:414:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
      414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
          |    ^~~~~~~
    cc1plus: all warnings being treated as errors
    
    So, lets do as the error says and pass -O2 in HOST_CXXFLAGS like we already
    do by default in HOST_CFLAGS.
    
    Link: https://github.com/openwrt/openwrt/pull/15368
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/elfutils/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index 39e7f80b4a..0fbf1aedad 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -68,6 +68,7 @@ ifeq ($(HOST_OS),Darwin)
 endif
 
 HOST_CFLAGS += -Wno-error -fPIC
+HOST_CXXFLAGS += -O2
 
 HOST_CONFIGURE_ARGS += \
 	--without-libintl-prefix \



From lede-commits at lists.infradead.org  Fri May 31 07:01:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 10:01:48 -0400
Subject: [openwrt/openwrt]  tools/elfutils: install a subset of the elfutils
 binaries
In-Reply-To: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
References: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
Message-ID: <mailman.40390.1717164115.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7822908bf313e1e0f1ae76d92588063160e94be2

commit 7822908bf313e1e0f1ae76d92588063160e94be2
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Wed May 1 15:21:38 2024 -0400

    tools/elfutils: install a subset of the elfutils binaries
    
    Install binaries that are not common with binutils
    instead of none at all. This adds a negligible time to the build.
    
    Building shared libraries is disabled, so the AM_LDFLAGS can be reset
    without the rpath-link option which is unrecognized by clang.
    
    Some of the binaries depend on functions that are defined
    using a "strong alias" instead of a normal definition,
    but this is disabled by our patches in order to work on macOS,
    so use the identical function directly instead.
    
    Add fnmatch from gnulib with GNU extensions
    which is needed for usage of the FNM_EXTMATCH flag.
    
    Handle a "Wunused-const-variable" error with the same
    preprocessor conditional used to include the function
    that the variable is used in.
    
    Ref: f64bd4b6c ("tools/elfutils: only build required components")
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # macOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/15368
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/elfutils/Makefile                      | 10 ++++++-
 tools/elfutils/patches/100-portability.patch | 43 ++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+), 1 deletion(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index 466fc31271..b66d064e2b 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -17,6 +17,8 @@ PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
+PKG_PROGRAMS:=elflint findtextrel elfcmp unstrip stack elfcompress elfclassify srcfiles
+
 PKG_SUBDIRS := \
 	libgnu \
 	config \
@@ -27,7 +29,8 @@ PKG_SUBDIRS := \
 	libebl \
 	libdwelf \
 	libdwfl \
-	libdw
+	libdw \
+	src
 
 PKG_GNULIB_BASE:=libgnu
 
@@ -41,6 +44,7 @@ PKG_GNULIB_ARGS = \
 
 PKG_GNULIB_MODS = \
 	argp \
+	fnmatch-gnu \
 	fts \
 	obstack \
 	progname \
@@ -49,6 +53,10 @@ PKG_GNULIB_MODS = \
 
 include $(INCLUDE_DIR)/host-build.mk
 
+HOST_MAKE_FLAGS += \
+	AM_LDFLAGS='$$$$(STACK_USAGE_NO_ERROR)' \
+	bin_PROGRAMS='$(PKG_PROGRAMS)' EXEEXT=
+
 ifeq ($(HOST_OS),Darwin)
   HOST_CFLAGS += -I/opt/homebrew/include
 endif
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 6f7564731b..980b117f21 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -898,3 +898,46 @@
  #include <stddef.h>
  
  
+--- a/libebl/eblopenbackend.c
++++ b/libebl/eblopenbackend.c
+@@ -198,8 +198,6 @@ static bool default_object_note (const c
+ 				 uint32_t descsz, const char *desc);
+ static bool default_debugscn_p (const char *name);
+ static bool default_copy_reloc_p (int reloc);
+-static bool default_none_reloc_p (int reloc);
+-static bool default_relative_reloc_p (int reloc);
+ static bool default_check_special_symbol (Elf *elf,
+ 					  const GElf_Sym *sym,
+ 					  const char *name,
+@@ -251,8 +249,8 @@ fill_defaults (Ebl *result)
+   result->object_note = default_object_note;
+   result->debugscn_p = default_debugscn_p;
+   result->copy_reloc_p = default_copy_reloc_p;
+-  result->none_reloc_p = default_none_reloc_p;
+-  result->relative_reloc_p = default_relative_reloc_p;
++  result->none_reloc_p = default_copy_reloc_p;
++  result->relative_reloc_p = default_copy_reloc_p;
+   result->check_special_symbol = default_check_special_symbol;
+   result->data_marker_symbol = default_data_marker_symbol;
+   result->check_st_other_bits = default_check_st_other_bits;
+@@ -634,8 +632,6 @@ default_copy_reloc_p (int reloc __attrib
+ {
+   return false;
+ }
+-strong_alias (default_copy_reloc_p, default_none_reloc_p)
+-strong_alias (default_copy_reloc_p, default_relative_reloc_p)
+ 
+ static bool
+ default_check_special_symbol (Elf *elf __attribute__ ((unused)),
+--- a/src/srcfiles.cxx
++++ b/src/srcfiles.cxx
+@@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_ve
+ /* Bug report address.  */
+ ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT;
+ 
++#ifdef HAVE_LIBARCHIVE
+ constexpr size_t BUFFER_SIZE = 8192;
++#endif
+ 
+ /* Definitions of arguments for argp functions.  */
+ static const struct argp_option options[] =



From lede-commits at lists.infradead.org  Fri May 31 07:01:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 10:01:47 -0400
Subject: [openwrt/openwrt]  tools/gnulib: unmangle fts header on macOS
In-Reply-To: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
References: <171716410787.1629322.12873582468541545544@git-01.infra.openwrt.org>
Message-ID: <mailman.40391.1717164119.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/37f20d8c34f04253037c03513e3a4d67b5f242da

commit 37f20d8c34f04253037c03513e3a4d67b5f242da
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sun May 5 03:42:44 2024 -0400

    tools/gnulib: unmangle fts header on macOS
    
    The gnulib fts header is meant to not be overwritten
    in any way by the host system's copy of fts.h
    and was therefore given a unique name instead.
    
    This is fine if the built libgnu library is directly linked
    with the target library, but if we want to keep them isolated
    we end up having the definitions being mangled anyway
    when the next object to link against included the fts.h header.
    
    On some macOS platforms, the use of __DARWIN_INODE64
    is messing with the link name for fts functions, resulting in:
    
    Undefined symbols for architecture x86_64:
      "_rpl_fts_close$INODE64", referenced from:
    ...
    
    Create a local fts header for gnulib
    that completely blocks the macOS host fts header.
    
    An alternative and more upstream friendly fix would be
    to rename fts_.h to fts.h and add the macOS-only
    include guard to that file within it's own include guard,
    but that would be a massive patch, so do this for now.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # macOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/15368
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/gnulib/patches/120-unmangle-darwin-fts-h.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tools/gnulib/patches/120-unmangle-darwin-fts-h.patch b/tools/gnulib/patches/120-unmangle-darwin-fts-h.patch
new file mode 100644
index 0000000000..19e46b9103
--- /dev/null
+++ b/tools/gnulib/patches/120-unmangle-darwin-fts-h.patch
@@ -0,0 +1,19 @@
+--- /dev/null
++++ b/lib/fts.h
+@@ -0,0 +1,6 @@
++#ifdef __APPLE__
++# define _FTS_H_ 1
++# include <fts_.h>
++#else
++# include_next <fts.h>
++#endif
+--- a/modules/fts
++++ b/modules/fts
+@@ -2,6 +2,7 @@ Description:
+ Traverse a file hierarchy.
+ 
+ Files:
++lib/fts.h
+ lib/fts_.h
+ lib/fts.c
+ lib/fts-cycle.c



From lede-commits at lists.infradead.org  Fri May 31 14:50:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 17:50:47 -0400
Subject: [openwrt/openwrt]  build: add option KERNEL_DEBUG_INFO_BTF_MODULES
In-Reply-To: <171719224740.2670210.3350165995696319423@git-01.infra.openwrt.org>
References: <171719224740.2670210.3350165995696319423@git-01.infra.openwrt.org>
Message-ID: <mailman.40500.1717192263.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ab9bb79d8e30a574c7628c73c4522429805d9307

commit ab9bb79d8e30a574c7628c73c4522429805d9307
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Thu May 30 23:07:22 2024 -0700

    build: add option KERNEL_DEBUG_INFO_BTF_MODULES
    
    The recent kernel v6.6.31 update broke BTF-enabled builds since upstream
    Linux added a prompt for config option DEBUG_INFO_BTF_MODULES in commit
    2166cb2e21 ("bpf, kconfig: Fix DEBUG_INFO_BTF_MODULES Kconfig definition").
    
    Fix by updating Config-kernel.in to add the option, cleaning up a related
    dependency and whitespace also.
    
    Fixes: 10d77b9bc3 ("kernel: bump 6.6 to 6.6.31")
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 config/Config-kernel.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index 0acd320504..2d90abcfe8 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -435,7 +435,6 @@ config KERNEL_DEBUG_INFO
 	  This will compile your kernel and modules with debug information.
 
 config KERNEL_DEBUG_INFO_BTF
-
 	bool "Enable additional BTF type information"
 	depends on !HOST_OS_MACOS
 	depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
@@ -447,9 +446,13 @@ config KERNEL_DEBUG_INFO_BTF
 
 	  Required to run BPF CO-RE applications.
 
+config KERNEL_DEBUG_INFO_BTF_MODULES
+	def_bool y
+	depends on KERNEL_DEBUG_INFO_BTF
+
 config KERNEL_MODULE_ALLOW_BTF_MISMATCH
 	bool "Allow loading modules with non-matching BTF type info"
-	depends on KERNEL_DEBUG_INFO_BTF
+	depends on KERNEL_DEBUG_INFO_BTF_MODULES
 	help
 	  For modules whose split BTF does not match vmlinux, load without
 	  BTF rather than refusing to load. The default behavior with



From lede-commits at lists.infradead.org  Fri May 31 16:30:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 31 May 2024 19:30:31 -0400
Subject: [openwrt/openwrt]  kirkwood: add D-Link DNS-320L support
In-Reply-To: <171719823168.2918474.729610054860687557@git-01.infra.openwrt.org>
References: <171719823168.2918474.729610054860687557@git-01.infra.openwrt.org>
Message-ID: <mailman.40511.1717198238.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8619d7af67c28ff974373c9a2937da1025cd81e5

commit 8619d7af67c28ff974373c9a2937da1025cd81e5
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Jan 5 18:42:53 2024 +0100

    kirkwood: add D-Link DNS-320L support
    
    Dual-slot NAS based on Marvell Kirkwood.
    
    Specifications:
     - Marvell 88F6702 @1GHz
     - 256Mb RAM
     - 128Mb NAND
     - 1x GbE LAN (Marvell 88E1318R)
     - 1x USB 2.0
     - 2x SATA
     - Weltrend WT69P3 ("supervisor" MCU chip)
     - Serial on J2 (115200,8n1)
     - Newer bootROM so kwboot-ing via serial is possible
    
    Notes:
     - The Weltrend MCU is controlled by the package added in utils/dns320l-mcu.
     - The original MAC address is stored in the "mini firmware" image's first
       17 bytes.
     - Compared to the original MTD layout, the uImage+rootfs are now stored in
       a common ubi partition.
    
    Installation:
    1. Serial console
     - Connect your levelshifter to the serial console
       on J2 (refer to the wiki page for pinout)
    2. Update u-boot
     - Download the u-boot.kwb image for the device
     - Powercycle the NAS
     - Run "kwboot -b u-boot-dns320l/u-boot.kwb /dev/ttyUSB0 -p"
     - Connect to the serial console with minicom
     - tftp 0x0800000 u-boot-dns320l/u-boot.kwb
       (Please note that "PHY reset timed out" seems to be customary
        on kirkwood devices, the egiga0 interface works regardless.)
     - nand erase 0x0 100000
     - nand write 0x0800000 0x0 0x100000
     - reset
    3. Install OpenWrt
     - Boot up the initramfs image
     - tftpboot 0x800000 openwrt-kirkwood-generic-dlink_dns320l-initramfs-uImage; bootm 0x800000
     - Download the sysupgrade image and perform sysupgrade
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
    Reviewed-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 package/boot/uboot-envtools/Makefile               |   2 +-
 package/boot/uboot-envtools/files/kirkwood         |   1 +
 package/boot/uboot-kirkwood/Makefile               |   8 +-
 .../boot/uboot-kirkwood/patches/190-dns-320l.patch | 387 +++++++++++++++++++++
 package/utils/dns320l-mcu/Makefile                 |  36 ++
 package/utils/dns320l-mcu/files/dns320l-mcu.init   |  14 +
 .../kirkwood/base-files/etc/board.d/02_network     |   4 +
 .../arch/arm/boot/dts/kirkwood-dns320l.dts         | 202 +++++++++++
 .../arch/arm/boot/dts/marvell/kirkwood-dns320l.dts | 202 +++++++++++
 target/linux/kirkwood/image/Makefile               |   8 +
 .../linux/kirkwood/patches-6.1/118-dns-320l.patch  |  35 ++
 .../linux/kirkwood/patches-6.6/118-dns-320l.patch  |  35 ++
 12 files changed, 932 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
index 00aa424162..d4446167b7 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=uboot-envtools
 PKG_DISTNAME:=u-boot
 PKG_VERSION:=2024.01
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
diff --git a/package/boot/uboot-envtools/files/kirkwood b/package/boot/uboot-envtools/files/kirkwood
index 1b07640cd3..b6b483ac4f 100644
--- a/package/boot/uboot-envtools/files/kirkwood
+++ b/package/boot/uboot-envtools/files/kirkwood
@@ -15,6 +15,7 @@ case "$board" in
 checkpoint,l-50|\
 cloudengines,pogoe02|\
 cloudengines,pogoplugv4|\
+dlink,dns320l|\
 globalscale,sheevaplug|\
 iom,ix2-200|\
 iom,ix4-200d|\
diff --git a/package/boot/uboot-kirkwood/Makefile b/package/boot/uboot-kirkwood/Makefile
index 92a814ac4f..7338e5d868 100644
--- a/package/boot/uboot-kirkwood/Makefile
+++ b/package/boot/uboot-kirkwood/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_VERSION:=2020.04
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_HASH:=fe732aaf037d9cc3c0909bad8362af366ae964bbdac6913a34081ff4ad565372
 
@@ -20,6 +20,11 @@ define U-Boot/Default
   BUILD_SUBTARGET:=generic
 endef
 
+define U-Boot/dns320l
+  NAME:=D-Link DNS-320L
+  BUILD_DEVICES:=dlink_dns320l
+endef
+
 define U-Boot/dockstar
   NAME:=Seagate DockStar
   BUILD_DEVICES:=seagate_dockstar
@@ -106,6 +111,7 @@ define U-Boot/sheevaplug
 endef
 
 UBOOT_TARGETS := \
+	dns320l \
 	dockstar dockstar_second_stage \
 	goflexhome \
 	ib62x0 ib62x0_second_stage \
diff --git a/package/boot/uboot-kirkwood/patches/190-dns-320l.patch b/package/boot/uboot-kirkwood/patches/190-dns-320l.patch
new file mode 100644
index 0000000000..3cf642e174
--- /dev/null
+++ b/package/boot/uboot-kirkwood/patches/190-dns-320l.patch
@@ -0,0 +1,387 @@
+--- a/arch/arm/mach-kirkwood/Kconfig
++++ b/arch/arm/mach-kirkwood/Kconfig
+@@ -28,6 +28,9 @@ config TARGET_POGO_E02
+ config TARGET_POGOPLUGV4
+     bool "Pogoplug V4 Board"
+ 
++config TARGET_DNS320L
++	bool "dns320l Board"
++
+ config TARGET_DNS325
+ 	bool "dns325 Board"
+ 
+@@ -93,6 +96,7 @@ source "board/Marvell/sheevaplug/Kconfig
+ source "board/buffalo/lsxl/Kconfig"
+ source "board/cloudengines/pogo_e02/Kconfig"
+ source "board/cloudengines/pogoplugv4/Kconfig"
++source "board/d-link/dns320l/Kconfig"
+ source "board/d-link/dns325/Kconfig"
+ source "board/iomega/iconnect/Kconfig"
+ source "board/keymile/Kconfig"
+--- /dev/null
++++ b/board/d-link/dns320l/dns320l.c
+@@ -0,0 +1,113 @@
++// SPDX-License-Identifier: GPL-2.0+
++/*
++ * Copyright (C) 2015
++ * Gerald Kerma <dreagle at doukki.net>
++ * Tony Dinh <mibodhi at gmail.com>
++ */
++
++#include <common.h>
++#include <miiphy.h>
++#include <net.h>
++#include <asm/arch/cpu.h>
++#include <asm/arch/soc.h>
++#include <asm/arch/mpp.h>
++#include <asm/arch/gpio.h>
++#include <asm/io.h>
++#include "dns320l.h"
++
++DECLARE_GLOBAL_DATA_PTR;
++
++int board_early_init_f(void)
++{
++	/*
++	 * default gpio configuration
++	 * There are maximum 64 gpios controlled through 2 sets of registers
++	 * the below configuration configures mainly initial LED status
++	 */
++	mvebu_config_gpio(DNS320L_OE_VAL_LOW, DNS320L_OE_VAL_HIGH,
++			  DNS320L_OE_LOW, DNS320L_OE_HIGH);
++
++	/* (all LEDs & power off active high) */
++	/* Multi-Purpose Pins Functionality configuration */
++	static const u32 kwmpp_config[] = {
++		MPP0_NF_IO2,
++		MPP1_NF_IO3,
++		MPP2_NF_IO4,
++		MPP3_NF_IO5,
++		MPP4_NF_IO6,
++		MPP5_NF_IO7,
++		MPP6_SYSRST_OUTn,
++		MPP7_GPO,
++		MPP8_TW_SDA,
++		MPP9_TW_SCK,
++		MPP10_UART0_TXD,
++		MPP11_UART0_RXD,
++		MPP12_GPO,
++		MPP13_GPIO,
++		MPP14_GPIO,
++		MPP15_GPIO,
++		MPP16_GPIO,
++		MPP17_GPIO,
++		MPP18_NF_IO0,
++		MPP19_NF_IO1,
++		MPP20_SATA1_ACTn,	/* sata1(left) status led */
++		MPP21_SATA0_ACTn,	/* sata0(right) status led */
++		MPP22_GPIO,
++		MPP23_GPIO,
++		MPP24_GPIO,
++		MPP25_GPIO,
++		MPP26_GPIO,
++		MPP27_GPIO,
++		MPP28_GPIO,
++		MPP29_GPIO,
++		MPP30_GPIO,
++		MPP31_GPIO,
++		MPP32_GPIO,
++		0
++	};
++	kirkwood_mpp_conf(kwmpp_config, NULL);
++
++	kw_gpio_set_value(DNS320L_GPIO_SATA_EN , 1);
++
++	return 0;
++}
++
++int board_init(void)
++{
++	/* address of boot parameters */
++	gd->bd->bi_boot_params = mvebu_sdram_bar(0) + 0x100;
++
++	return 0;
++}
++
++#ifdef CONFIG_RESET_PHY_R
++/* Configure and initialize PHY */
++void reset_phy(void)
++{
++	u16 reg;
++	u16 phyaddr;
++	char *name = "egiga0";
++
++	if (miiphy_set_current_dev(name))
++		return;
++
++	/* read PHY dev address */
++	if (miiphy_read(name, 0xee, 0xee, (u16 *) &phyaddr)) {
++		printf("could not read PHY dev address\n");
++		return;
++	}
++
++	/* set RGMII delay */
++	miiphy_write(name, phyaddr, MV88E1318_PGADR_REG, MV88E1318_MAC_CTRL_PG);
++	miiphy_read(name, phyaddr, MV88E1318_MAC_CTRL_REG, &reg);
++	reg |= (MV88E1318_RGMII_RX_CTRL | MV88E1318_RGMII_TX_CTRL);
++	miiphy_write(name, phyaddr, MV88E1318_MAC_CTRL_REG, reg);
++	miiphy_write(name, phyaddr, MV88E1318_PGADR_REG, 0);
++
++	/* reset PHY */
++	if (miiphy_reset(name, phyaddr))
++		return;
++
++	printf("MV88E1318 PHY initialized on %s\n", name);
++}
++#endif /* CONFIG_RESET_PHY_R */
+--- /dev/null
++++ b/board/d-link/dns320l/dns320l.h
+@@ -0,0 +1,39 @@
++/* SPDX-License-Identifier: GPL-2.0+ */
++/*
++ * Copyright (C) 2011
++ * Stefan Herbrechtsmeier <stefan at herbrechtsmeier.net>
++ *
++ * Based on Kirkwood support:
++ * (C) Copyright 2009
++ * Marvell Semiconductor <www.marvell.com>
++ * Written-by: Prafulla Wadaskar <prafulla at marvell.com>
++ */
++
++#ifndef __DNS320L_H
++#define __DNS320L_H
++
++/* GPIO configuration */
++#define DNS320L_GPIO_SATA_EN	24
++#define HDD_L_GREEN_LED		(1 << 22)
++#define HDD_R_GREEN_LED		(1 << 23)
++#define USB_BLUE_LED		(1 << 25)
++#define USB_ORANGE_LED		(1 << 26)
++
++#define DNS320L_OE_LOW		(~(HDD_L_GREEN_LED | HDD_R_GREEN_LED | \
++                                   USB_BLUE_LED | USB_ORANGE_LED))
++#define DNS320L_OE_VAL_LOW	(0)
++
++/* high GPIO's */
++#define WATCHDOG_SIGNAL		(1 << 14)
++
++#define DNS320L_OE_HIGH		(~(WATCHDOG_SIGNAL))
++#define DNS320L_OE_VAL_HIGH	((WATCHDOG_SIGNAL))
++
++/* PHY related */
++#define MV88E1318_PGADR_REG	22
++#define MV88E1318_MAC_CTRL_PG	2
++#define MV88E1318_MAC_CTRL_REG	21
++#define MV88E1318_RGMII_TX_CTRL	(1 << 4)
++#define MV88E1318_RGMII_RX_CTRL	(1 << 5)
++
++#endif /* __DNS320L_H */
+--- /dev/null
++++ b/board/d-link/dns320l/Kconfig
+@@ -0,0 +1,18 @@
++# SPDX-License-Identifier: GPL-2.0+
++#
++# Copyright (C) 2015
++# Gerald Kerma <dreagle at doukki.net>
++# Tony Dinh <mibodhi at gmail.com>
++
++if TARGET_DNS320L
++
++config SYS_BOARD
++	default "dns320l"
++
++config SYS_VENDOR
++	default "d-link"
++	
++config SYS_CONFIG_NAME
++	default "dns320l"
++
++endif
+--- /dev/null
++++ b/board/d-link/dns320l/kwbimage.cfg
+@@ -0,0 +1,41 @@
++# SPDX-License-Identifier: GPL-2.0+
++#
++# Copyright (C) 2015
++# Gerald Kerma <dreagle at doukki.net>
++# Tony Dinh <mibodhi at gmail.com>
++# Refer to doc/README.kwbimage for more details about how-to
++# configure and create kirkwood boot images.
++#
++
++# Boot Media configurations
++BOOT_FROM       nand
++NAND_ECC_MODE   default
++NAND_PAGE_SIZE  0x0800
++
++# Configure RGMII-0 interface pad voltage to 1.8V
++DATA 0xFFD100e0 0x1b1b1b9b
++
++DATA 0xFFD01400 0x43010c30
++DATA 0xFFD01404 0x39543000
++DATA 0xFFD01408 0x22125451
++DATA 0xFFD0140C 0x00000833
++DATA 0xFFD01410 0x0000000C
++DATA 0xFFD01414 0x00000000
++DATA 0xFFD01418 0x00000000
++DATA 0xFFD0141C 0x00000652
++DATA 0xFFD01420 0x00000004
++DATA 0xFFD01424 0x0000F17F
++DATA 0xFFD01428 0x00085520
++DATA 0xFFD0147c 0x00008552
++DATA 0xFFD01504 0x0FFFFFF1
++DATA 0xFFD01508 0x10000000
++DATA 0xFFD0150C 0x00000000
++DATA 0xFFD01514 0x00000000
++DATA 0xFFD0151C 0x00000000
++DATA 0xFFD01494 0x00010000
++DATA 0xFFD01498 0x00000000
++DATA 0xFFD0149C 0x0000E403
++DATA 0xFFD01480 0x00000001
++DATA 0xFFD20134 0x66666666
++DATA 0xFFD20138 0x66666666
++DATA 0x0 0x0
+--- /dev/null
++++ b/board/d-link/dns320l/MAINTAINERS
+@@ -0,0 +1,8 @@
++NSA310S BOARD
++M:	Gerald Kerma <dreagle at doukki.net>
++M:	Tony Dinh <mibodhi at gmail.com>
++M:	Luka Perkov <luka.perkov at sartura.hr>
++S:	Maintained
++F:	board/d-link/dns320l/
++F:	include/configs/dns320l.h
++F:	configs/dns320l_defconfig
+--- /dev/null
++++ b/board/d-link/dns320l/Makefile
+@@ -0,0 +1,7 @@
++# SPDX-License-Identifier: GPL-2.0+
++#
++# Copyright (C) 2015
++# Gerald Kerma <dreagle at doukki.net>
++# Tony Dinh <mibodhi at gmail.com>
++
++obj-y	:= dns320l.o
+--- /dev/null
++++ b/configs/dns320l_defconfig
+@@ -0,0 +1,48 @@
++CONFIG_ARM=y
++CONFIG_SYS_DCACHE_OFF=y
++CONFIG_ARCH_CPU_INIT=y
++CONFIG_KIRKWOOD=y
++CONFIG_SYS_TEXT_BASE=0x600000
++CONFIG_TARGET_DNS320L=y
++CONFIG_ENV_SIZE=0x20000
++CONFIG_ENV_OFFSET=0x100000
++CONFIG_NR_DRAM_BANKS=2
++CONFIG_BOOTDELAY=3
++CONFIG_USE_PREBOOT=y
++# CONFIG_DISPLAY_BOARDINFO is not set
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_PROMPT="dns320l => "
++CONFIG_CMD_BOOTZ=y
++# CONFIG_CMD_FLASH is not set
++CONFIG_CMD_IDE=y
++CONFIG_CMD_NAND=y
++CONFIG_CMD_USB=y
++# CONFIG_CMD_SETEXPR is not set
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_MII=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_EXT2=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_JFFS2=y
++CONFIG_CMD_MTDPARTS=y
++CONFIG_MTDPARTS_DEFAULT="mtdparts=orion_nand:0x100000 at 0x0(uboot),0x20000 at 0x100000(ubootenv),0x6de0000 at 0x120000(ubi),0xa00000 at 0x6f00000(mini),0x500000 at 0x7900000(config),0x200000 at 0x7e00000(my-dlink)"
++CONFIG_CMD_UBI=y
++CONFIG_ISO_PARTITION=y
++CONFIG_ENV_IS_IN_NAND=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
++CONFIG_MVSATA_IDE=y
++# CONFIG_MMC is not set
++CONFIG_MTD=y
++CONFIG_MTD_RAW_NAND=y
++CONFIG_MVGBE=y
++CONFIG_MII=y
++CONFIG_SYS_NS16550=y
++CONFIG_USB=y
++CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_STORAGE=y
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++CONFIG_LZMA=y
++CONFIG_LZO=y
++CONFIG_OF_LIBFDT=y
++CONFIG_NET_RANDOM_ETHADDR=y
+--- /dev/null
++++ b/include/configs/dns320l.h
+@@ -0,0 +1,69 @@
++/* SPDX-License-Identifier: GPL-2.0+ */
++/*
++ * Copyright (C) 2015
++ * Gerald Kerma <dreagle at doukki.net>
++ * Tony Dinh <mibodhi at gmail.com>
++ * Luka Perkov <luka.perkov at sartura.hr>
++ */
++
++#ifndef _CONFIG_DNS320L_H
++#define _CONFIG_DNS320L_H
++
++/* high level configuration options */
++#define CONFIG_FEROCEON_88FR131	1	/* CPU Core subversion */
++#define CONFIG_KW88F6192		1	/* SOC Name */
++#define CONFIG_KW88F6702		1	/* SOC Name */
++#define CONFIG_SKIP_LOWLEVEL_INIT	/* disable board lowlevel_init */
++
++/* compression configuration */
++#define CONFIG_BZIP2
++
++/* commands configuration */
++
++/*
++ * mv-common.h should be defined after CMD configs since it used them
++ * to enable certain macros
++ */
++#include "mv-common.h"
++
++/* environment variables configuration */
++
++/* default environment variables */
++#define CONFIG_BOOTCOMMAND \
++	"ubi part ubi; " \
++	"ubi read 0x800000 kernel; " \
++	"bootm 0x800000"
++
++#define CONFIG_EXTRA_ENV_SETTINGS \
++	"console=console=ttyS0,115200\0" \
++	"mtdids=nand0=orion_nand\0" \
++	"mtdparts="CONFIG_MTDPARTS_DEFAULT "\0" \
++	"bootargs_root=ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs rw\0"
++
++/* Ethernet driver configuration */
++#ifdef CONFIG_CMD_NET
++#define CONFIG_NETCONSOLE
++#define CONFIG_MVGBE_PORTS	{1, 0}	/* enable port 0 only */
++#define CONFIG_PHY_BASE_ADR	1
++#define CONFIG_RESET_PHY_R
++#endif /* CONFIG_CMD_NET */
++
++/* SATA driver configuration */
++#ifdef CONFIG_IDE
++#define __io
++#define CONFIG_IDE_PREINIT
++#define CONFIG_MVSATA_IDE_USE_PORT0
++#define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
++#endif /* CONFIG_IDE */
++
++/*
++ * Enable GPI0 support
++*/
++#define CONFIG_KIRKWOOD_GPIO
++
++/* RTC driver configuration */
++#ifdef CONFIG_CMD_DATE
++#define CONFIG_RTC_MV
++#endif /* CONFIG_CMD_DATE */
++
++#endif /* _CONFIG_DNS320L_H */
diff --git a/package/utils/dns320l-mcu/Makefile b/package/utils/dns320l-mcu/Makefile
new file mode 100644
index 0000000000..724a664a8b
--- /dev/null
+++ b/package/utils/dns320l-mcu/Makefile
@@ -0,0 +1,36 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=dns320l-mcu
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/wigyori/dns320l-daemon.git
+PKG_SOURCE_DATE:=2024-05-11
+PKG_SOURCE_VERSION:=c74941880e0a8d2bc0344b3256b984397512e8c3
+PKG_MIRROR_HASH:=e0f186a0c139ccfac3d311f49e2fecdbd02fa3f9fe6ced4b1ce0baa603d49fc3
+PKG_MAINTAINER:=Zoltan HERPAI <wigyori at uid0.hu>
+PKG_LICENSE:=GPL-3.0+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/dns320l-mcu
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=Utility to control the MCU on DNS-320L
+  DEPENDS:=@TARGET_kirkwood
+  URL:=https://github.com/wigyori/dns320l-mcu
+endef
+
+define Build/Compile
+	$(MAKE) -C $(PKG_BUILD_DIR) \
+		CC="$(TARGET_CC)" \
+		CFLAGS="$(TARGET_CFLAGS) -Wall"
+endef
+
+define Package/dns320l-mcu/install
+	$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
+	$(INSTALL_BIN) ./files/dns320l-mcu.init $(1)/etc/init.d/dns320l-mcu
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/dns320l-daemon $(1)/usr/bin/dns320l-mcu
+endef
+
+$(eval $(call BuildPackage,dns320l-mcu))
diff --git a/package/utils/dns320l-mcu/files/dns320l-mcu.init b/package/utils/dns320l-mcu/files/dns320l-mcu.init
new file mode 100644
index 0000000000..eb1c579907
--- /dev/null
+++ b/package/utils/dns320l-mcu/files/dns320l-mcu.init
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2024 OpenWrt.org
+
+START=99
+
+USE_PROCD=1
+PROG=/usr/bin/dns320l-mcu
+
+start_service() {
+	procd_open_instance
+	procd_set_param command "$PROG"
+	procd_set_param respawn
+	procd_close_instance
+}
diff --git a/target/linux/kirkwood/base-files/etc/board.d/02_network b/target/linux/kirkwood/base-files/etc/board.d/02_network
index 3ed2fa94b0..ff7897fe13 100644
--- a/target/linux/kirkwood/base-files/etc/board.d/02_network
+++ b/target/linux/kirkwood/base-files/etc/board.d/02_network
@@ -19,6 +19,7 @@ kirkwood_setup_interfaces()
 	cloudengines,pogoe02|\
 	cloudengines,pogoplugv4|\
 	ctera,c200-v1|\
+	dlink,dns320l|\
 	globalscale,sheevaplug|\
 	iom,iconnect-1.1|\
 	iom,ix2-200|\
@@ -60,6 +61,9 @@ kirkwood_setup_macs()
 	local label_mac=""
 
 	case "$board" in
+	dlink,dns320l)
+		lan_mac=$(mtd_get_mac_text "mini firmware")
+		;;
 	iptime,nas1)
 		lan_mac=$(mtd_get_mac_binary u-boot 0x3ffa8)
 		label_mac=$lan_mac
diff --git a/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-dns320l.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-dns320l.dts
new file mode 100644
index 0000000000..bd86c04ea7
--- /dev/null
+++ b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-dns320l.dts
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Device Tree file for DLINK DNS-320L
+ *
+ * Copyright (C) 2024, Zoltan HERPAI <wigyori at uid0.hu>
+ * Copyright (C) 2015, Sunke Schl?ters <sunke-dev at schlueters.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * This file is based on the works of:
+ * - Sunke Schl?ters <sunke-dev at schlueters.de>
+ *   - https://github.com/scus1/dns320l/blob/master/kernel/dts/kirkwood-dns320l.dts
+ * - Andreas B?hler <dev at aboehler.at>:
+ *   - http://www.aboehler.at/doku/doku.php/projects:dns320l
+ *   - http://www.aboehler.at/hg/linux-dns320l/file/ba7a60ad7687/linux-3.12/kirkwood-dns320l.dts
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+	model = "D-Link DNS-320L";
+	compatible = "dlink,dns320l", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&pmx_buttons>;
+		pinctrl-names = "default";
+
+		button at 1 {
+			label = "Reset push button";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio0 28 1>;
+		};
+
+		button at 2 {
+			label = "USB unmount button";
+			linux,code = <KEY_EJECTCD>;
+			gpios = <&gpio0 27 1>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&pmx_leds>;
+		pinctrl-names = "default";
+
+		blue-usb {
+			label = "dns320l:usb:blue";
+			gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "usbport";
+		};
+
+		orange-usb {
+			label = "dns320l:usb:orange";
+			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+		};
+
+		orange-l-hdd {
+			label = "dns320l:orange:l_hdd";
+			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+		};
+
+		orange-r-hdd {
+			label = "dns320l:orange:r_hdd";
+			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	ocp at f1000000 {
+		sata at 80000 {
+			status = "okay";
+			nr-ports = <2>;
+		};
+
+		serial at 12000 {
+			status = "okay";
+		};
+
+		serial at 12100 {
+			pinctrl-0 = <&pmx_uart1>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&pmx_power_sata>;
+		pinctrl-names = "default";
+
+		sata_power: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;
+			regulator-name = "SATA Power";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			regulator-always-on;
+			regulator-boot-on;
+			gpio = <&gpio0 24 0>;
+		};
+	};
+};
+
+&nand {
+	pinctrl-0 = <&pmx_nand>;
+	pinctrl-names = "default";
+	chip-delay = <40>;
+	status = "okay";
+
+	partition at 0 {
+		label = "u-boot";
+		reg = <0x0000000 0x100000>;
+	};
+
+	partition at 100000 {
+		label = "ubootenv";
+		reg = <0x100000 0x20000>;
+	};
+
+	partition at 120000 {
+		label = "ubi";
+		reg = <0x120000 0x6de0000>;
+	};
+
+	partition at 6f00000 {
+		label = "mini firmware";
+		reg = <0x6f00000 0xa00000>;
+	};
+
+	partition at 7900000 {
+		label = "config";
+		reg = <0x7900000 0x500000>;
+	};
+
+	partition at 7e00000 {
+		label = "my-dlink";
+		reg = <0x7e00000 0x200000>;
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	ethphy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
+&pinctrl {
+	pmx_sata1: pmx-sata1 {
+		marvell,pins = "mpp20";
+		marvell,function = "sata1";
+	};
+
+	pmx_sata0: pmx-sata0 {
+		marvell,pins = "mpp21";
+		marvell,function = "sata0";
+	};
+
+	pmx_power_sata: pmx-power-sata {
+		marvell,pins = "mpp24";
+		marvell,function = "gpio";
+	};
+
+	pmx_leds: pmx-leds {
+		marvell,pins = "mpp22", "mpp23", "mpp25", "mpp26";
+		marvell,function = "gpio";
+	};
+
+	pmx_buttons: pmx-buttons {
+		marvell,pins = "mpp27", "mpp28", "mpp29";
+		marvell,function = "gpio";
+	};
+};
+
+&eth0 {
+	status = "okay";
+	ethernet0-port at 0 {
+		phy-handle = <&ethphy0>;
+	};
+};
diff --git a/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts
new file mode 100644
index 0000000000..bd86c04ea7
--- /dev/null
+++ b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts
@@ -0,0 +1,202 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Device Tree file for DLINK DNS-320L
+ *
+ * Copyright (C) 2024, Zoltan HERPAI <wigyori at uid0.hu>
+ * Copyright (C) 2015, Sunke Schl?ters <sunke-dev at schlueters.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * This file is based on the works of:
+ * - Sunke Schl?ters <sunke-dev at schlueters.de>
+ *   - https://github.com/scus1/dns320l/blob/master/kernel/dts/kirkwood-dns320l.dts
+ * - Andreas B?hler <dev at aboehler.at>:
+ *   - http://www.aboehler.at/doku/doku.php/projects:dns320l
+ *   - http://www.aboehler.at/hg/linux-dns320l/file/ba7a60ad7687/linux-3.12/kirkwood-dns320l.dts
+ */
+
+/dts-v1/;
+
+#include "kirkwood.dtsi"
+#include "kirkwood-6281.dtsi"
+
+/ {
+	model = "D-Link DNS-320L";
+	compatible = "dlink,dns320l", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+
+	memory {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200n8 earlyprintk";
+		stdout-path = &uart0;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&pmx_buttons>;
+		pinctrl-names = "default";
+
+		button at 1 {
+			label = "Reset push button";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio0 28 1>;
+		};
+
+		button at 2 {
+			label = "USB unmount button";
+			linux,code = <KEY_EJECTCD>;
+			gpios = <&gpio0 27 1>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+		pinctrl-0 = <&pmx_leds>;
+		pinctrl-names = "default";
+
+		blue-usb {
+			label = "dns320l:usb:blue";
+			gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "usbport";
+		};
+
+		orange-usb {
+			label = "dns320l:usb:orange";
+			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+		};
+
+		orange-l-hdd {
+			label = "dns320l:orange:l_hdd";
+			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+		};
+
+		orange-r-hdd {
+			label = "dns320l:orange:r_hdd";
+			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	ocp at f1000000 {
+		sata at 80000 {
+			status = "okay";
+			nr-ports = <2>;
+		};
+
+		serial at 12000 {
+			status = "okay";
+		};
+
+		serial at 12100 {
+			pinctrl-0 = <&pmx_uart1>;
+			pinctrl-names = "default";
+			status = "okay";
+		};
+	};
+
+	regulators {
+		compatible = "simple-bus";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		pinctrl-0 = <&pmx_power_sata>;
+		pinctrl-names = "default";
+
+		sata_power: regulator at 1 {
+			compatible = "regulator-fixed";
+			reg = <1>;
+			regulator-name = "SATA Power";
+			regulator-min-microvolt = <5000000>;
+			regulator-max-microvolt = <5000000>;
+			enable-active-high;
+			regulator-always-on;
+			regulator-boot-on;
+			gpio = <&gpio0 24 0>;
+		};
+	};
+};
+
+&nand {
+	pinctrl-0 = <&pmx_nand>;
+	pinctrl-names = "default";
+	chip-delay = <40>;
+	status = "okay";
+
+	partition at 0 {
+		label = "u-boot";
+		reg = <0x0000000 0x100000>;
+	};
+
+	partition at 100000 {
+		label = "ubootenv";
+		reg = <0x100000 0x20000>;
+	};
+
+	partition at 120000 {
+		label = "ubi";
+		reg = <0x120000 0x6de0000>;
+	};
+
+	partition at 6f00000 {
+		label = "mini firmware";
+		reg = <0x6f00000 0xa00000>;
+	};
+
+	partition at 7900000 {
+		label = "config";
+		reg = <0x7900000 0x500000>;
+	};
+
+	partition at 7e00000 {
+		label = "my-dlink";
+		reg = <0x7e00000 0x200000>;
+	};
+};
+
+&mdio {
+	status = "okay";
+
+	ethphy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
+&pinctrl {
+	pmx_sata1: pmx-sata1 {
+		marvell,pins = "mpp20";
+		marvell,function = "sata1";
+	};
+
+	pmx_sata0: pmx-sata0 {
+		marvell,pins = "mpp21";
+		marvell,function = "sata0";
+	};
+
+	pmx_power_sata: pmx-power-sata {
+		marvell,pins = "mpp24";
+		marvell,function = "gpio";
+	};
+
+	pmx_leds: pmx-leds {
+		marvell,pins = "mpp22", "mpp23", "mpp25", "mpp26";
+		marvell,function = "gpio";
+	};
+
+	pmx_buttons: pmx-buttons {
+		marvell,pins = "mpp27", "mpp28", "mpp29";
+		marvell,function = "gpio";
+	};
+};
+
+&eth0 {
+	status = "okay";
+	ethernet0-port at 0 {
+		phy-handle = <&ethphy0>;
+	};
+};
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index cc13648890..48de5bee2b 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -182,6 +182,14 @@ define Device/ctera_c200-v1
 endef
 TARGET_DEVICES += ctera_c200-v1
 
+define Device/dlink_dns320l
+  DEVICE_VENDOR := D-Link
+  DEVICE_MODEL := DNS-320L
+  DEVICE_PACKAGES := kmod-ata-marvell-sata kmod-fs-ext4 kmod-gpio-button-hotplug \
+	kmod-usb-storage kmod-usb-ledtrig-usbport dns320l-mcu
+endef
+TARGET_DEVICES += dlink_dns320l
+
 define Device/endian_4i-edge-200
   DEVICE_VENDOR := Endian
   DEVICE_MODEL := 4i Edge 200
diff --git a/target/linux/kirkwood/patches-6.1/118-dns-320l.patch b/target/linux/kirkwood/patches-6.1/118-dns-320l.patch
new file mode 100644
index 0000000000..d6c84e2c59
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/118-dns-320l.patch
@@ -0,0 +1,35 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -310,6 +310,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
+ 	kirkwood-db-88f6282.dtb \
+ 	kirkwood-dir665.dtb \
+ 	kirkwood-dns320.dtb \
++	kirkwood-dns320l.dtb \
+ 	kirkwood-dns325.dtb \
+ 	kirkwood-dockstar.dtb \
+ 	kirkwood-dreamplug.dtb \
+--- a/arch/arm/boot/dts/kirkwood-dns320l.dts
++++ b/arch/arm/boot/dts/kirkwood-dns320l.dts
+@@ -32,6 +32,13 @@
+ 		reg = <0x00000000 0x10000000>;
+ 	};
+ 
++	aliases {
++		led-boot = &led_orange_usb;
++		led-failsafe = &led_orange_usb;
++		led-running = &led_orange_usb;
++		led-upgrade = &led_orange_usb;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8 earlyprintk";
+ 		stdout-path = &uart0;
+@@ -68,7 +75,7 @@
+ 			linux,default-trigger = "usbport";
+ 		};
+ 
+-		orange-usb {
++		led_orange_usb: orange-usb {
+ 			label = "dns320l:usb:orange";
+ 			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ 		};
diff --git a/target/linux/kirkwood/patches-6.6/118-dns-320l.patch b/target/linux/kirkwood/patches-6.6/118-dns-320l.patch
new file mode 100644
index 0000000000..8f19441bbe
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.6/118-dns-320l.patch
@@ -0,0 +1,35 @@
+--- a/arch/arm/boot/dts/marvell/Makefile
++++ b/arch/arm/boot/dts/marvell/Makefile
+@@ -92,6 +92,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
+ 	kirkwood-db-88f6282.dtb \
+ 	kirkwood-dir665.dtb \
+ 	kirkwood-dns320.dtb \
++	kirkwood-dns320l.dtb \
+ 	kirkwood-dns325.dtb \
+ 	kirkwood-dockstar.dtb \
+ 	kirkwood-dreamplug.dtb \
+--- a/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-dns320l.dts
+@@ -32,6 +32,13 @@
+ 		reg = <0x00000000 0x10000000>;
+ 	};
+ 
++	aliases {
++		led-boot = &led_orange_usb;
++		led-failsafe = &led_orange_usb;
++		led-running = &led_orange_usb;
++		led-upgrade = &led_orange_usb;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8 earlyprintk";
+ 		stdout-path = &uart0;
+@@ -68,7 +75,7 @@
+ 			linux,default-trigger = "usbport";
+ 		};
+ 
+-		orange-usb {
++		led_orange_usb: orange-usb {
+ 			label = "dns320l:usb:orange";
+ 			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
+ 		};



From lede-commits at lists.infradead.org  Fri May 31 22:59:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 01 Jun 2024 01:59:30 -0400
Subject: [buildbot]  Revert "Bump buildbot to v3.11.3 release"
In-Reply-To: <171722156932.3789036.16022288703170089327@git-01.infra.openwrt.org>
References: <171722156932.3789036.16022288703170089327@git-01.infra.openwrt.org>
Message-ID: <mailman.40519.1717221574.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/b5724de423e75adc29aa4df077a364dd00cdca83

commit b5724de423e75adc29aa4df077a364dd00cdca83
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sat Jun 1 05:54:06 2024 +0000

    Revert "Bump buildbot to v3.11.3 release"
    
    This reverts commit 44ed9a39fddc4e79ec1276c3e5923766cbe19878 as it
    breaks GitPoller.
    
    References: https://github.com/buildbot/buildbot/issues/7663
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .github/workflows/build-push.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index 4a2aef0..77f8b16 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -8,7 +8,7 @@ on:
   pull_request:
 
 env:
-  BUILDBOT_VERSION: 3.11.3
+  BUILDBOT_VERSION: 3.11.1
   GITHUB_SHA_LEN: 8
 
 concurrency:



From lede-commits at lists.infradead.org  Fri May 31 22:59:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 01 Jun 2024 01:59:29 -0400
Subject: [buildbot]  Bump buildbot to v3.11.3 release
In-Reply-To: <171722156932.3789036.16022288703170089327@git-01.infra.openwrt.org>
References: <171722156932.3789036.16022288703170089327@git-01.infra.openwrt.org>
Message-ID: <mailman.40520.1717221574.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/44ed9a39fddc4e79ec1276c3e5923766cbe19878

commit 44ed9a39fddc4e79ec1276c3e5923766cbe19878
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Wed May 22 10:05:50 2024 +0000

    Bump buildbot to v3.11.3 release
    
    https://github.com/buildbot/buildbot/releases/tag/v3.11.3
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .github/workflows/build-push.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index 77f8b16..4a2aef0 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -8,7 +8,7 @@ on:
   pull_request:
 
 env:
-  BUILDBOT_VERSION: 3.11.1
+  BUILDBOT_VERSION: 3.11.3
   GITHUB_SHA_LEN: 8
 
 concurrency:



