diff --git a/target/linux/realtek/files-6.6/arch/mips/rtl838x/Platform b/target/linux/realtek/files-6.6/arch/mips/rtl838x/Platform index 98f18cac1b..e824dee7b7 100644 --- a/target/linux/realtek/files-6.6/arch/mips/rtl838x/Platform +++ b/target/linux/realtek/files-6.6/arch/mips/rtl838x/Platform @@ -1,5 +1,5 @@ # # Realtek RTL838x SoCs # -cflags-$(CONFIG_RTL83XX) += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/ -load-$(CONFIG_RTL83XX) += 0xffffffff80100000 +cflags-$(CONFIG_MACH_REALTEK_RTL) += -I$(srctree)/arch/mips/include/asm/mach-rtl838x/ +load-$(CONFIG_MACH_REALTEK_RTL) += 0xffffffff80100000 diff --git a/target/linux/realtek/files-6.6/drivers/clk/realtek/Kconfig b/target/linux/realtek/files-6.6/drivers/clk/realtek/Kconfig index 4cf3cd9633..62b704077a 100644 --- a/target/linux/realtek/files-6.6/drivers/clk/realtek/Kconfig +++ b/target/linux/realtek/files-6.6/drivers/clk/realtek/Kconfig @@ -2,13 +2,13 @@ menuconfig COMMON_CLK_REALTEK bool "Support for Realtek's clock controllers" - depends on RTL83XX + depends on MACH_REALTEK_RTL if COMMON_CLK_REALTEK config COMMON_CLK_RTL83XX bool "Clock driver for Realtek RTL83XX" - depends on RTL83XX + depends on MACH_REALTEK_RTL select SRAM help This driver adds support for the Realtek RTL83xx series basic clocks. diff --git a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/Kconfig b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/Kconfig index 3124ee8d20..0af4abcfb9 100644 --- a/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/Kconfig +++ b/target/linux/realtek/files-6.6/drivers/net/dsa/rtl83xx/Kconfig @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config NET_DSA_RTL83XX tristate "Realtek RTL838x/RTL839x switch support" - depends on RTL83XX + depends on MACH_REALTEK_RTL select NET_DSA_TAG_TRAILER help This driver adds support for Realtek RTL83xx series switching. diff --git a/target/linux/realtek/patches-6.6/300-mips-add-rtl838x-platform.patch b/target/linux/realtek/patches-6.6/300-mips-add-rtl838x-platform.patch index 7adbbbc517..bb89a7864f 100644 --- a/target/linux/realtek/patches-6.6/300-mips-add-rtl838x-platform.patch +++ b/target/linux/realtek/patches-6.6/300-mips-add-rtl838x-platform.patch @@ -9,64 +9,67 @@ configurations for the SoCs, which are introduced in addition. Submitted-by: Birger Koblitz --- - arch/mips/Kbuild.platforms | 1 + - arch/mips/Kconfig | 57 ++++++++++++++ - 2 files changed, 58 insertions(+) - --- a/arch/mips/Kbuild.platforms +++ b/arch/mips/Kbuild.platforms @@ -22,6 +22,7 @@ platform-$(CONFIG_MACH_NINTENDO64) += n6 platform-$(CONFIG_PIC32MZDA) += pic32/ platform-$(CONFIG_RALINK) += ralink/ platform-$(CONFIG_MIKROTIK_RB532) += rb532/ -+platform-$(CONFIG_RTL83XX) += rtl838x/ ++platform-$(CONFIG_MACH_REALTEK_RTL) += rtl838x/ platform-$(CONFIG_SGI_IP22) += sgi-ip22/ platform-$(CONFIG_SGI_IP27) += sgi-ip27/ platform-$(CONFIG_SGI_IP28) += sgi-ip22/ --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig -@@ -968,8 +968,58 @@ config CAVIUM_OCTEON_SOC - Hikari - Say Y here for most Octeon reference boards. +@@ -620,21 +620,23 @@ config RALINK -+config RTL83XX -+ bool "Realtek based platforms" -+ select DMA_NONCOHERENT -+ select IRQ_MIPS_CPU + config MACH_REALTEK_RTL + bool "Realtek RTL838x/RTL839x based machines" +- select MIPS_GENERIC + select DMA_NONCOHERENT + select IRQ_MIPS_CPU +- select CSRC_R4K +- select CEVT_R4K + select SYS_HAS_CPU_MIPS32_R1 + select SYS_HAS_CPU_MIPS32_R2 + select SYS_SUPPORTS_BIG_ENDIAN + select SYS_SUPPORTS_32BIT_KERNEL + select SYS_SUPPORTS_MIPS16 +- select SYS_SUPPORTS_MULTITHREADING +- select SYS_SUPPORTS_VPE_LOADER + select BOOT_RAW + select PINCTRL + select USE_OF + select NO_EXCEPT_FILL -+ select SYS_HAS_CPU_MIPS32_R1 -+ select SYS_HAS_CPU_MIPS32_R2 -+ select SYS_SUPPORTS_BIG_ENDIAN + select SYS_SUPPORTS_HIGHMEM -+ select SYS_SUPPORTS_32BIT_KERNEL -+ select SYS_SUPPORTS_MIPS16 + select SYS_HAS_EARLY_PRINTK + select SYS_HAS_EARLY_PRINTK_8250 + select USE_GENERIC_EARLY_PRINTK_8250 -+ select BOOT_RAW -+ select PINCTRL + select ARCH_HAS_RESET_CONTROLLER + select RESET_CONTROLLER -+ select USE_OF -+ + + config SGI_IP22 + bool "SGI IP22 (Indy/Indigo2)" +@@ -970,6 +972,36 @@ config CAVIUM_OCTEON_SOC + endchoice +config RTL838X + bool "Realtek RTL838X based platforms" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + select CPU_SUPPORTS_CPUFREQ + select MIPS_EXTERNAL_TIMER + +config RTL839X + bool "Realtek RTL839X based platforms" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + select CPU_SUPPORTS_CPUFREQ + select MIPS_EXTERNAL_TIMER + select SYS_SUPPORTS_MULTITHREADING + +config RTL930X + bool "Realtek RTL930X based platforms" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + select MIPS_CPU_SCACHE + select MIPS_EXTERNAL_TIMER + select SYS_SUPPORTS_MULTITHREADING diff --git a/target/linux/realtek/patches-6.6/301-gpio-add-rtl8231-driver.patch b/target/linux/realtek/patches-6.6/301-gpio-add-rtl8231-driver.patch index a177876420..f64e2cf94e 100644 --- a/target/linux/realtek/patches-6.6/301-gpio-add-rtl8231-driver.patch +++ b/target/linux/realtek/patches-6.6/301-gpio-add-rtl8231-driver.patch @@ -31,7 +31,7 @@ Submitted-by: John Crispin +config GPIO_RTL8231 + tristate "RTL8231 GPIO" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + help + Say yes here to support Realtek RTL8231 GPIO expansion chips. + diff --git a/target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch b/target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch deleted file mode 100644 index 2b466340e6..0000000000 --- a/target/linux/realtek/patches-6.6/303-gpio-update-dependencies-for-gpio-realtek-otto.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 9bac1c20b8f39f2e0e342b087add5093b94feaed Mon Sep 17 00:00:00 2001 -From: INAGAKI Hiroshi -Date: Wed, 5 May 2021 22:05:39 +0900 -Subject: realtek: backport gpio-realtek-otto driver from 5.13 to 5.10 - -This patch backports "gpio-realtek-otto" driver to Kernel 5.10. -"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X" -is used in OpenWrt, so update the dependency by the additional patch. - -Submitted-by: INAGAKI Hiroshi ---- - drivers/gpio/Kconfig | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) ---- a/drivers/gpio/Kconfig -+++ b/drivers/gpio/Kconfig -@@ -527,8 +527,8 @@ config GPIO_RDA - - config GPIO_REALTEK_OTTO - tristate "Realtek Otto GPIO support" -- depends on MACH_REALTEK_RTL -- default MACH_REALTEK_RTL -+ depends on RTL83XX -+ default RTL838X - select GPIO_GENERIC - select GPIOLIB_IRQCHIP - help diff --git a/target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch b/target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch deleted file mode 100644 index 01530257b8..0000000000 --- a/target/linux/realtek/patches-6.6/304-spi-update-dependency-for-spi-realtek-rtl.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 0b000cbfe0aa0323bffa855ef8449c0687a4c071 Mon Sep 17 00:00:00 2001 -From: INAGAKI Hiroshi -Date: Thu, 6 May 2021 19:30:58 +0900 -Subject: realtek: backport spi-realtek-rtl driver from 5.12 to 5.10 - -This patch backports "spi-realtek-rtl" driver to Kernel 5.10 from 5.12. -"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X" -is used in OpenWrt, so update the dependency by the additional patch. - -Submitted-by: INAGAKI Hiroshi ---- - drivers/spi/Makefile | 2 +- - 1 files changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/spi/Makefile -+++ b/drivers/spi/Makefile -@@ -114,7 +114,7 @@ obj-$(CONFIG_SPI_QUP) += spi-qup.o - obj-$(CONFIG_SPI_ROCKCHIP) += spi-rockchip.o - obj-$(CONFIG_SPI_ROCKCHIP_SFC) += spi-rockchip-sfc.o - obj-$(CONFIG_SPI_RB4XX) += spi-rb4xx.o --obj-$(CONFIG_MACH_REALTEK_RTL) += spi-realtek-rtl.o -+obj-$(CONFIG_RTL83XX) += spi-realtek-rtl.o - obj-$(CONFIG_SPI_RPCIF) += spi-rpc-if.o - obj-$(CONFIG_SPI_RSPI) += spi-rspi.o - obj-$(CONFIG_SPI_RZV2M_CSI) += spi-rzv2m-csi.o diff --git a/target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch b/target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch deleted file mode 100644 index 0ecc33376e..0000000000 --- a/target/linux/realtek/patches-6.6/305-irqchip-update-dependency-for-irq-realtek-rtl.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2cd00b51470a30198b048a5fca48a04db77e29cc Mon Sep 17 00:00:00 2001 -From: INAGAKI Hiroshi -Date: Fri, 21 May 2021 23:16:37 +0900 -Subject: [PATCH] realtek: backport irq-realtek-rtl driver from 5.12 to 5.10 - -This patch backports "irq-realtek-rtl" driver to Kernel 5.10 from 5.12. -"MACH_REALTEK_RTL" is used as a platform name in upstream, but "RTL838X" -is used in OpenWrt, so update the dependency by the additional patch. - -Submitted-by: INAGAKI Hiroshi ---- - drivers/irqchip/Makefile | 2 +- - 1 files changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/irqchip/Makefile -+++ b/drivers/irqchip/Makefile -@@ -114,7 +114,7 @@ obj-$(CONFIG_LOONGSON_PCH_MSI) += irq-l - obj-$(CONFIG_LOONGSON_PCH_LPC) += irq-loongson-pch-lpc.o - obj-$(CONFIG_MST_IRQ) += irq-mst-intc.o - obj-$(CONFIG_SL28CPLD_INTC) += irq-sl28cpld.o --obj-$(CONFIG_MACH_REALTEK_RTL) += irq-realtek-rtl.o -+obj-$(CONFIG_RTL83XX) += irq-realtek-rtl.o - obj-$(CONFIG_WPCM450_AIC) += irq-wpcm450-aic.o - obj-$(CONFIG_IRQ_IDT3243X) += irq-idt3243x.o - obj-$(CONFIG_APPLE_AIC) += irq-apple-aic.o diff --git a/target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch b/target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch deleted file mode 100644 index c9dab65b72..0000000000 --- a/target/linux/realtek/patches-6.6/307-wdt-update-dependency-for-realtek-otto-wdt.patch +++ /dev/null @@ -1,32 +0,0 @@ -From b8fc5eecdc5d33cf261986436597b5482ab856da Mon Sep 17 00:00:00 2001 -From: Sander Vanheule -Date: Sun, 14 Nov 2021 19:45:32 +0100 -Subject: [PATCH] realtek: Backport Realtek Otto WDT driver - -Add patch submitted upstream to linux-watchdog and replace the MIPS -architecture symbols. Requires one extra patch for the DIV_ROUND_* -macros, which have moved to a different header since 5.10. - -Submitted-by: Sander Vanheule -Tested-by: Stijn Segers -Tested-by: Paul Fertser -Tested-by: Stijn Tintel ---- - drivers/watchdog/Kconfig | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/drivers/watchdog/Kconfig -+++ b/drivers/watchdog/Kconfig -@@ -977,10 +977,10 @@ config RTD119X_WATCHDOG - - config REALTEK_OTTO_WDT - tristate "Realtek Otto MIPS watchdog support" -- depends on MACH_REALTEK_RTL || COMPILE_TEST -+ depends on RTL83XX - depends on COMMON_CLK - select WATCHDOG_CORE -- default MACH_REALTEK_RTL -+ default RTL83XX - help - Say Y here to include support for the watchdog timer on Realtek - RTL838x, RTL839x, RTL930x SoCs. This watchdog has pretimeout diff --git a/target/linux/realtek/patches-6.6/716-net-ethernet-add-support-for-rtl838x-ethernet.patch b/target/linux/realtek/patches-6.6/716-net-ethernet-add-support-for-rtl838x-ethernet.patch index 9d79ea565d..e0c10bca63 100644 --- a/target/linux/realtek/patches-6.6/716-net-ethernet-add-support-for-rtl838x-ethernet.patch +++ b/target/linux/realtek/patches-6.6/716-net-ethernet-add-support-for-rtl838x-ethernet.patch @@ -29,7 +29,7 @@ Submitted-by: John Crispin + +config NET_RTL838X + tristate "Realtek rtl838x Ethernet MAC support" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + help + Say Y here if you want to use the Realtek rtl838x Gbps Ethernet MAC. + diff --git a/target/linux/realtek/patches-6.6/720-add-rtl-phy.patch b/target/linux/realtek/patches-6.6/720-add-rtl-phy.patch index 78a57f0a3e..43d4a7d4fc 100644 --- a/target/linux/realtek/patches-6.6/720-add-rtl-phy.patch +++ b/target/linux/realtek/patches-6.6/720-add-rtl-phy.patch @@ -20,7 +20,7 @@ Submitted-by: Birger Koblitz +config REALTEK_SOC_PHY + tristate "Realtek SoC PHYs" -+ depends on RTL83XX ++ depends on MACH_REALTEK_RTL + help + Supports the PHYs found in combination with Realtek Switch SoCs + diff --git a/target/linux/realtek/rtl838x/config-6.6 b/target/linux/realtek/rtl838x/config-6.6 index ad2c1b43cc..44c1d7e064 100644 --- a/target/linux/realtek/rtl838x/config-6.6 +++ b/target/linux/realtek/rtl838x/config-6.6 @@ -116,6 +116,7 @@ CONFIG_JFFS2_ZLIB=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MACH_REALTEK_RTL=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y @@ -192,7 +193,6 @@ CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y CONFIG_RTL838X=y # CONFIG_RTL839X is not set -CONFIG_RTL83XX=y # CONFIG_RTL930X is not set CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_OF_PLATFORM=y diff --git a/target/linux/realtek/rtl839x/config-6.6 b/target/linux/realtek/rtl839x/config-6.6 index a357eb3966..630027bf81 100644 --- a/target/linux/realtek/rtl839x/config-6.6 +++ b/target/linux/realtek/rtl839x/config-6.6 @@ -115,6 +115,7 @@ CONFIG_JFFS2_ZLIB=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MACH_REALTEK_RTL=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y @@ -204,7 +205,6 @@ CONFIG_RFS_ACCEL=y CONFIG_RPS=y # CONFIG_RTL838X is not set CONFIG_RTL839X=y -CONFIG_RTL83XX=y # CONFIG_RTL930X is not set CONFIG_SERIAL_MCTRL_GPIO=y CONFIG_SERIAL_OF_PLATFORM=y diff --git a/target/linux/realtek/rtl930x/config-6.6 b/target/linux/realtek/rtl930x/config-6.6 index af5f2ca7a3..5a29bdc3c1 100644 --- a/target/linux/realtek/rtl930x/config-6.6 +++ b/target/linux/realtek/rtl930x/config-6.6 @@ -97,6 +97,7 @@ CONFIG_JFFS2_ZLIB=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MACH_REALTEK_RTL=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y @@ -172,7 +173,6 @@ CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y # CONFIG_RTL838X is not set # CONFIG_RTL839X is not set -CONFIG_RTL83XX=y CONFIG_RTL930X=y # CONFIG_RTL931X is not set CONFIG_SERIAL_MCTRL_GPIO=y diff --git a/target/linux/realtek/rtl931x/config-6.6 b/target/linux/realtek/rtl931x/config-6.6 index 736f472029..df235defe8 100644 --- a/target/linux/realtek/rtl931x/config-6.6 +++ b/target/linux/realtek/rtl931x/config-6.6 @@ -106,6 +106,7 @@ CONFIG_KMAP_LOCAL=y CONFIG_LEDS_GPIO=y CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y +CONFIG_MACH_REALTEK_RTL=y CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y @@ -195,7 +196,6 @@ CONFIG_RFS_ACCEL=y CONFIG_RPS=y # CONFIG_RTL838X is not set # CONFIG_RTL839X is not set -CONFIG_RTL83XX=y CONFIG_RTL930X=y CONFIG_RTL931X=y CONFIG_SENSORS_GPIO_FAN=y