From 44b6df31841200200e374086a44e37c56621741f Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Thu, 8 Aug 2024 17:31:18 +0200 Subject: [PATCH 01/31] sdk: fix APK key creation The keys are created differently compared to the old OPKG keys. Instead of being part of base-files/configure, they are created as a Makefile requirement of `package/compile`, which is a cleaner solution. This requirement would only be added to non SDK environments, however APK always requires keys to be available. Add an `else` case for the SDK and create keys. Signed-off-by: Paul Spooren --- package/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/Makefile b/package/Makefile index 9e3bb52b65..9de36b13c9 100644 --- a/package/Makefile +++ b/package/Makefile @@ -85,6 +85,10 @@ ifneq ($(CONFIG_USE_APK),) else $(curdir)/compile: $(curdir)/system/opkg/host/compile endif +else +ifneq ($(CONFIG_USE_APK),) + $(curdir)/compile: $(BUILD_KEY_APK_SEC) $(BUILD_KEY_APK_PUB) +endif endif $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index From 2b443497c2962d3cd973345e783de29315f49f37 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Fri, 9 Aug 2024 13:30:42 +0200 Subject: [PATCH 02/31] mediatek: EAP111: add label-mac-device Add the label-mac-device alias so that label MAC is set and can later be used in userspace. Signed-off-by: Robert Marko --- target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts index c306a5eb7b..0e7c4fe8b5 100644 --- a/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts +++ b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts @@ -15,6 +15,7 @@ led-failsafe = &led_green; led-running = &led_green; led-upgrade = &led_green; + label-mac-device = &gmac1; }; chosen { From 824f7ea52d541eee8ecb669dc272a7d37f9f76b8 Mon Sep 17 00:00:00 2001 From: Joel Low Date: Sat, 10 Aug 2024 12:08:56 +0800 Subject: [PATCH 03/31] uboot-envtools: add env settings for ubnt,unifi-6-lr-v3 Using the same configuration as my earlier Unifi 6-LRv2s: ```bash $ cat /etc/fw_env.config /dev/mtd3 0x0 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= ipaddr= is_ble_stp=true is_default=true loadaddr=0x5007FF28 macaddr= serverip= soc=mt7622 stderr=serial stdin=serial stdout=serial vendor=mediatek ``` Signed-off-by: Joel Low Link: https://github.com/openwrt/openwrt/pull/16127 Signed-off-by: Robert Marko --- package/boot/uboot-envtools/files/mediatek_mt7622 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package/boot/uboot-envtools/files/mediatek_mt7622 b/package/boot/uboot-envtools/files/mediatek_mt7622 index ae173fad61..020c800e58 100644 --- a/package/boot/uboot-envtools/files/mediatek_mt7622 +++ b/package/boot/uboot-envtools/files/mediatek_mt7622 @@ -56,7 +56,8 @@ 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) +ubnt,unifi-6-lr-v2|\ +ubnt,unifi-6-lr-v3) ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x1000" "0x1000" "1" ;; xiaomi,redmi-router-ax6s) From 54623c6a1daeb029858aab96a58e0ee8607f738b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 22 Jun 2024 16:04:24 +0200 Subject: [PATCH 04/31] package: add kmod-r8126 ethernet driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r8126 is an out of tree driver provided by Realtek for RTL8126 devices. Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8126/Makefile | 33 +++++++++++++++++++ .../patches/0001-r8126.h-use-BIT_ULL.patch | 21 ++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 package/kernel/r8126/Makefile create mode 100644 package/kernel/r8126/patches/0001-r8126.h-use-BIT_ULL.patch diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile new file mode 100644 index 0000000000..bbef4f8741 --- /dev/null +++ b/package/kernel/r8126/Makefile @@ -0,0 +1,33 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=r8126 +PKG_VERSION:=10.013.00 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/Noltari/rtl8126/releases/download/$(PKG_VERSION) +PKG_HASH:=b41bda6ff3bbb7d9bc5b81c5c21355f031587d3a3a5862abcd4d766e942272e7 + +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPLv2 +PKG_MAINTAINER:=Alvaro Fernandez Rojas + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8126 + SUBMENU:=Network Devices + TITLE:=Realtek RTL8126 PCI 5 Gigabit Ethernet driver + DEPENDS:=@PCI_SUPPORT + FILES:=$(PKG_BUILD_DIR)/src/r8126.ko + AUTOLOAD:=$(call AutoProbe,r8126) + PROVIDES:=kmod-r8169 +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M="$(PKG_BUILD_DIR)/src" \ + modules +endef + +$(eval $(call KernelPackage,r8126)) diff --git a/package/kernel/r8126/patches/0001-r8126.h-use-BIT_ULL.patch b/package/kernel/r8126/patches/0001-r8126.h-use-BIT_ULL.patch new file mode 100644 index 0000000000..cf83163966 --- /dev/null +++ b/package/kernel/r8126/patches/0001-r8126.h-use-BIT_ULL.patch @@ -0,0 +1,21 @@ +From 9649df50a239d1379cc8d9febd4854a0c7ca0731 Mon Sep 17 00:00:00 2001 +From: Mieczyslaw Nalewaj +Date: Sat, 10 Aug 2024 17:42:44 +0200 +Subject: [PATCH] r8126.h: use BIT_ULL + +Fixes compilation on 32 bit systems. +--- + r8126.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/src/r8126.h ++++ b/src/r8126.h +@@ -678,7 +678,7 @@ This is free software, and you are welco + #ifndef ADVERTISED_2500baseX_Full + #define ADVERTISED_2500baseX_Full 0x8000 + #endif +-#define RTK_ADVERTISED_5000baseX_Full BIT(48) ++#define RTK_ADVERTISED_5000baseX_Full BIT_ULL(48) + + #define RTK_ADVERTISE_2500FULL 0x80 + #define RTK_ADVERTISE_5000FULL 0x100 From ddb4070c96728394c22b4beb1070a26efd1c2d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 22 Jun 2024 16:04:24 +0200 Subject: [PATCH 05/31] package: add kmod-r8125 ethernet driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r8125 is an out of tree driver provided by Realtek for RTL8125 devices. Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8125/Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/kernel/r8125/Makefile diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile new file mode 100644 index 0000000000..c0de614dde --- /dev/null +++ b/package/kernel/r8125/Makefile @@ -0,0 +1,33 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=r8125 +PKG_VERSION:=9.013.02 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/Noltari/rtl8125/releases/download/$(PKG_VERSION) +PKG_HASH:=d36410ee99c956f250d9cd08340d8c36567d190f420a8ee128ff6e51225aac0c + +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPLv2 +PKG_MAINTAINER:=Alvaro Fernandez Rojas + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8125 + SUBMENU:=Network Devices + TITLE:=Realtek RTL8125 PCI 2.5 Gigabit Ethernet driver + DEPENDS:=@PCI_SUPPORT + FILES:=$(PKG_BUILD_DIR)/src/r8125.ko + AUTOLOAD:=$(call AutoProbe,r8125) + PROVIDES:=kmod-r8169 +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M="$(PKG_BUILD_DIR)/src" \ + modules +endef + +$(eval $(call KernelPackage,r8125)) From 1565eeda4e670cd02e9ba90179d53ac50aa8c6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sat, 22 Jun 2024 16:04:24 +0200 Subject: [PATCH 06/31] package: add kmod-r8168 ethernet driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r8168 is an out of tree driver provided by Realtek for RTL8168 devices. Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8168/Makefile | 33 +++++++++++++++++++ ...n-fix-proc_dump_rx_desc_2-on-32-bits.patch | 28 ++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 package/kernel/r8168/Makefile create mode 100644 package/kernel/r8168/patches/0001-r8168_n-fix-proc_dump_rx_desc_2-on-32-bits.patch diff --git a/package/kernel/r8168/Makefile b/package/kernel/r8168/Makefile new file mode 100644 index 0000000000..850e5c544e --- /dev/null +++ b/package/kernel/r8168/Makefile @@ -0,0 +1,33 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=r8168 +PKG_VERSION:=8.053.00 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_URL:=https://github.com/Noltari/rtl8168/releases/download/$(PKG_VERSION) +PKG_HASH:=52f1e6200672b598a04d4ac21ac92a8a9e128b38208c7b03a464bfa93bbfcc8f + +PKG_BUILD_PARALLEL:=1 +PKG_LICENSE:=GPLv2 +PKG_MAINTAINER:=Alvaro Fernandez Rojas + +include $(INCLUDE_DIR)/kernel.mk +include $(INCLUDE_DIR)/package.mk + +define KernelPackage/r8168 + SUBMENU:=Network Devices + TITLE:=Realtek RTL8168 PCI Gigabit Ethernet driver + DEPENDS:=@PCI_SUPPORT + FILES:=$(PKG_BUILD_DIR)/src/r8168.ko + AUTOLOAD:=$(call AutoProbe,r8168) + PROVIDES:=kmod-r8169 +endef + +define Build/Compile + +$(KERNEL_MAKE) $(PKG_JOBS) \ + M="$(PKG_BUILD_DIR)/src" \ + modules +endef + +$(eval $(call KernelPackage,r8168)) diff --git a/package/kernel/r8168/patches/0001-r8168_n-fix-proc_dump_rx_desc_2-on-32-bits.patch b/package/kernel/r8168/patches/0001-r8168_n-fix-proc_dump_rx_desc_2-on-32-bits.patch new file mode 100644 index 0000000000..b53819a0cb --- /dev/null +++ b/package/kernel/r8168/patches/0001-r8168_n-fix-proc_dump_rx_desc_2-on-32-bits.patch @@ -0,0 +1,28 @@ +From c0e1ae03f564f0e3db492ef2f25357b5da7977d7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= +Date: Sat, 10 Aug 2024 20:12:40 +0200 +Subject: [PATCH] r8168_n: fix proc_dump_rx_desc_2 on 32 bits +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Álvaro Fernández Rojas +--- + src/r8168_n.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/src/r8168_n.c ++++ b/src/r8168_n.c +@@ -1655,9 +1655,9 @@ static int proc_dump_rx_desc_2(struct se + j, k); + for (i=0; i<(tp->RxDescLength/4); i++) { + if (!(i % 4)) +- seq_printf(m, "\n%04llx ", +- ((u64)pdword + (i * 4) - +- (u64)tp->RxDescArray)); ++ seq_printf(m, "\n%04x ", ++ (u32) ((uintptr_t)pdword + (i * 4) - ++ (uintptr_t)tp->RxDescArray)); + seq_printf(m, "%08x ", pdword[i]); + } + } From f063f4620c32b1cb6f43dd249c9cdfb4ee2bd12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 11 Aug 2024 15:29:32 +0200 Subject: [PATCH 07/31] kernel: r8125: add RSS variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of enabling RSS support, let's introduce a variant and let users choose between both variants since it can cause network issues. Signed-off-by: Milinda Brantini Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8125/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/package/kernel/r8125/Makefile b/package/kernel/r8125/Makefile index c0de614dde..f0bdabae7c 100644 --- a/package/kernel/r8125/Makefile +++ b/package/kernel/r8125/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8125 PKG_VERSION:=9.013.02 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/Noltari/rtl8125/releases/download/$(PKG_VERSION) @@ -22,12 +22,25 @@ define KernelPackage/r8125 FILES:=$(PKG_BUILD_DIR)/src/r8125.ko AUTOLOAD:=$(call AutoProbe,r8125) PROVIDES:=kmod-r8169 + VARIANT:=regular endef +define KernelPackage/r8125-rss +$(call KernelPackage/r8125) + TITLE+= (RSS) + VARIANT:=rss +endef + +ifeq ($(BUILD_VARIANT),rss) + PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y +endif + define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ + $(PKG_MAKE_FLAGS) \ M="$(PKG_BUILD_DIR)/src" \ modules endef $(eval $(call KernelPackage,r8125)) +$(eval $(call KernelPackage,r8125-rss)) From bfeef9b3d786b76510837014648db8d6c8106989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Sun, 11 Aug 2024 15:30:07 +0200 Subject: [PATCH 08/31] kernel: r8126: add RSS variant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of enabling RSS support, let's introduce a variant and let users choose between both variants since it can cause network issues. Signed-off-by: Milinda Brantini Signed-off-by: Álvaro Fernández Rojas --- package/kernel/r8126/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile index bbef4f8741..2a7672ed88 100644 --- a/package/kernel/r8126/Makefile +++ b/package/kernel/r8126/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=r8126 PKG_VERSION:=10.013.00 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/Noltari/rtl8126/releases/download/$(PKG_VERSION) @@ -22,12 +22,25 @@ define KernelPackage/r8126 FILES:=$(PKG_BUILD_DIR)/src/r8126.ko AUTOLOAD:=$(call AutoProbe,r8126) PROVIDES:=kmod-r8169 + VARIANT:=regular endef +define KernelPackage/r8126-rss +$(call KernelPackage/r8126) + TITLE+= (RSS) + VARIANT:=rss +endef + +ifeq ($(BUILD_VARIANT),rss) + PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y +endif + define Build/Compile +$(KERNEL_MAKE) $(PKG_JOBS) \ + $(PKG_MAKE_FLAGS) \ M="$(PKG_BUILD_DIR)/src" \ modules endef $(eval $(call KernelPackage,r8126)) +$(eval $(call KernelPackage,r8126-rss)) From 76071a8bb0e772873ca653a37b7c352ca07d754c Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Thu, 13 Jul 2023 21:41:27 +0100 Subject: [PATCH 09/31] rkbin: add rk3588 support Adding support for the rk3588 platform Signed-off-by: Ben Whitten Link: https://github.com/openwrt/openwrt/pull/15607 Signed-off-by: Hauke Mehrtens --- package/boot/rkbin/Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile index 58098b8ea7..d895c06547 100644 --- a/package/boot/rkbin/Makefile +++ b/package/boot/rkbin/Makefile @@ -57,12 +57,19 @@ define Trusted-Firmware-A/rk3568-e25 TPL:=rk35/rk3568_ddr_1560MHz_uart2_m0_115200_v1.21.bin endef +define Trusted-Firmware-A/rk3588 + BUILD_SUBTARGET:=armv8 + ATF:=rk35/rk3588_bl31_v1.45.elf + TPL:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin +endef + TFA_TARGETS:= \ rk3308 \ rk3308-rock-pi-s \ rk3566 \ rk3568 \ - rk3568-e25 + rk3568-e25 \ + rk3588 ifeq ($(BUILD_VARIANT),rk3308-rock-pi-s) TPL_FILE:=rk3308_ddr_589MHz_uart0_m0_v2.07.bin From e6ffbcb2d21c597da88b9ea9d218645c2ce55648 Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Tue, 6 Aug 2024 21:57:48 +0100 Subject: [PATCH 10/31] uboot-rockchip: backport upstream dts sync Upstream uboot have merged in kernel dts files, we need the update for the rk3588 boards. Signed-off-by: Ben Whitten Link: https://github.com/openwrt/openwrt/pull/15607 Signed-off-by: Hauke Mehrtens --- .../001-backport-upstream-dts-sync.patch | 767 ++++++++++++++++++ 1 file changed, 767 insertions(+) create mode 100644 package/boot/uboot-rockchip/patches/001-backport-upstream-dts-sync.patch diff --git a/package/boot/uboot-rockchip/patches/001-backport-upstream-dts-sync.patch b/package/boot/uboot-rockchip/patches/001-backport-upstream-dts-sync.patch new file mode 100644 index 0000000000..b6984ec3e5 --- /dev/null +++ b/package/boot/uboot-rockchip/patches/001-backport-upstream-dts-sync.patch @@ -0,0 +1,767 @@ +--- /dev/null ++++ b/dts/upstream/src/arm64/rockchip/rk3588s-nanopi-r6s.dts +@@ -0,0 +1,764 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++/dts-v1/; ++ ++#include ++#include ++#include ++#include "rk3588s.dtsi" ++ ++/ { ++ model = "FriendlyElec NanoPi R6S"; ++ compatible = "friendlyarm,nanopi-r6s", "rockchip,rk3588s"; ++ ++ aliases { ++ ethernet0 = &gmac1; ++ mmc0 = &sdmmc; ++ mmc1 = &sdhci; ++ }; ++ ++ chosen { ++ stdout-path = "serial2:1500000n8"; ++ }; ++ ++ adc-keys { ++ compatible = "adc-keys"; ++ io-channels = <&saradc 0>; ++ io-channel-names = "buttons"; ++ keyup-threshold-microvolt = <1800000>; ++ poll-interval = <100>; ++ ++ button-maskrom { ++ label = "Maskrom"; ++ linux,code = ; ++ press-threshold-microvolt = <1800>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&key1_pin>; ++ ++ button-user { ++ label = "User"; ++ linux,code = ; ++ gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>; ++ debounce-interval = <50>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ sys_led: led-0 { ++ label = "sys_led"; ++ gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sys_led_pin>; ++ }; ++ ++ wan_led: led-1 { ++ label = "wan_led"; ++ gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wan_led_pin>; ++ }; ++ ++ lan1_led: led-2 { ++ label = "lan1_led"; ++ gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lan1_led_pin>; ++ }; ++ ++ lan2_led: led-3 { ++ label = "lan2_led"; ++ gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lan2_led_pin>; ++ }; ++ }; ++ ++ 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>; ++ }; ++ ++ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_1v1_nldo_s3"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vcc_3v3_s0: vcc-3v3-s0-regulator { ++ compatible = "regulator-fixed"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc_3v3_s0"; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sd_s0_pwr>; ++ regulator-name = "vcc_3v3_sd_s0"; ++ regulator-boot-on; ++ regulator-max-microvolt = <3000000>; ++ regulator-min-microvolt = <3000000>; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ vcc_3v3_pcie20: vcc3v3-pcie20-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_3v3_pcie20"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ 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 = <&vcc5v0_sys>; ++ }; ++ ++ vcc5v0_usb_otg0: vcc5v0-usb-otg0-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&typec5v_pwren>; ++ regulator-name = "vcc5v0_usb_otg0"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc5v0_usb>; ++ }; ++ ++ vcc5v0_host_20: vcc5v0-host-20-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vcc5v0_host20_en>; ++ regulator-name = "vcc5v0_host_20"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc5v0_usb>; ++ }; ++}; ++ ++&combphy0_ps { ++ status = "okay"; ++}; ++ ++&combphy2_psu { ++ status = "okay"; ++}; ++ ++&cpu_b0 { ++ cpu-supply = <&vdd_cpu_big0_s0>; ++}; ++ ++&cpu_b1 { ++ cpu-supply = <&vdd_cpu_big0_s0>; ++}; ++ ++&cpu_b2 { ++ cpu-supply = <&vdd_cpu_big1_s0>; ++}; ++ ++&cpu_b3 { ++ cpu-supply = <&vdd_cpu_big1_s0>; ++}; ++ ++&cpu_l0 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l1 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l2 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l3 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&gmac1 { ++ clock_in_out = "output"; ++ phy-handle = <&rgmii_phy1>; ++ phy-mode = "rgmii-rxid"; ++ pinctrl-0 = <&gmac1_miim ++ &gmac1_tx_bus2 ++ &gmac1_rx_bus2 ++ &gmac1_rgmii_clk ++ &gmac1_rgmii_bus>; ++ pinctrl-names = "default"; ++ tx_delay = <0x42>; ++ status = "okay"; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0m2_xfer>; ++ status = "okay"; ++ ++ vdd_cpu_big0_s0: regulator@42 { ++ compatible = "rockchip,rk8602"; ++ reg = <0x42>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_cpu_big0_s0"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <1050000>; ++ regulator-ramp-delay = <2300>; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_cpu_big1_s0: regulator@43 { ++ compatible = "rockchip,rk8603", "rockchip,rk8602"; ++ reg = <0x43>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_cpu_big1_s0"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <1050000>; ++ regulator-ramp-delay = <2300>; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++ ++ vdd_npu_s0: regulator@42 { ++ compatible = "rockchip,rk8602"; ++ reg = <0x42>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_npu_s0"; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <2300>; ++ regulator-boot-on; ++ regulator-always-on; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++}; ++ ++&i2c6 { ++ clock-frequency = <200000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c6m0_xfer>; ++ status = "okay"; ++ ++ hym8563: rtc@51 { ++ compatible = "haoyu,hym8563"; ++ reg = <0x51>; ++ #clock-cells = <0>; ++ clock-output-names = "hym8563"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtc_int>; ++ interrupt-parent = <&gpio0>; ++ interrupts = ; ++ wakeup-source; ++ }; ++}; ++ ++&mdio1 { ++ rgmii_phy1: ethernet-phy@1 { ++ compatible = "ethernet-phy-id001c.c916"; ++ reg = <0x1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtl8211f_rst>; ++ reset-assert-us = <20000>; ++ reset-deassert-us = <100000>; ++ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++&pcie2x1l1 { ++ reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; ++ vpcie3v3-supply = <&vcc_3v3_pcie20>; ++ status = "okay"; ++}; ++ ++&pcie2x1l2 { ++ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; ++ vpcie3v3-supply = <&vcc_3v3_pcie20>; ++ status = "okay"; ++}; ++ ++&pinctrl { ++ gpio-key { ++ key1_pin: key1-pin { ++ rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ gpio-leds { ++ sys_led_pin: sys-led-pin { ++ rockchip,pins = ++ <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ wan_led_pin: wan-led-pin { ++ rockchip,pins = ++ <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ lan1_led_pin: lan1-led-pin { ++ rockchip,pins = ++ <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ lan2_led_pin: lan2-led-pin { ++ rockchip,pins = ++ <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ hym8563 { ++ rtc_int: rtc-int { ++ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ sdmmc { ++ sd_s0_pwr: sd-s0-pwr { ++ rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ usb { ++ typec5v_pwren: typec5v-pwren { ++ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ vcc5v0_host20_en: vcc5v0-host20-en { ++ rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ rtl8211f { ++ rtl8211f_rst: rtl8211f-rst { ++ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++}; ++ ++&saradc { ++ vref-supply = <&avcc_1v8_s0>; ++ status = "okay"; ++}; ++ ++&sdhci { ++ bus-width = <8>; ++ no-sdio; ++ no-sd; ++ non-removable; ++ mmc-hs200-1_8v; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ bus-width = <4>; ++ cap-sd-highspeed; ++ disable-wp; ++ max-frequency = <150000000>; ++ no-mmc; ++ no-sdio; ++ sd-uhs-sdr104; ++ vmmc-supply = <&vcc_3v3_sd_s0>; ++ vqmmc-supply = <&vccio_sd_s0>; ++ status = "okay"; ++}; ++ ++&spi2 { ++ status = "okay"; ++ assigned-clocks = <&cru CLK_SPI2>; ++ assigned-clock-rates = <200000000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; ++ num-cs = <1>; ++ ++ pmic@0 { ++ compatible = "rockchip,rk806"; ++ spi-max-frequency = <1000000>; ++ reg = <0x0>; ++ ++ interrupt-parent = <&gpio0>; ++ interrupts = <7 IRQ_TYPE_LEVEL_LOW>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, ++ <&rk806_dvs2_null>, <&rk806_dvs3_null>; ++ ++ system-power-controller; ++ ++ vcc1-supply = <&vcc5v0_sys>; ++ vcc2-supply = <&vcc5v0_sys>; ++ vcc3-supply = <&vcc5v0_sys>; ++ vcc4-supply = <&vcc5v0_sys>; ++ vcc5-supply = <&vcc5v0_sys>; ++ vcc6-supply = <&vcc5v0_sys>; ++ vcc7-supply = <&vcc5v0_sys>; ++ vcc8-supply = <&vcc5v0_sys>; ++ vcc9-supply = <&vcc5v0_sys>; ++ vcc10-supply = <&vcc5v0_sys>; ++ vcc11-supply = <&vcc_2v0_pldo_s3>; ++ vcc12-supply = <&vcc5v0_sys>; ++ vcc13-supply = <&vcc_1v1_nldo_s3>; ++ vcc14-supply = <&vcc_1v1_nldo_s3>; ++ vcca-supply = <&vcc5v0_sys>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ rk806_dvs1_null: dvs1-null-pins { ++ pins = "gpio_pwrctrl1"; ++ function = "pin_fun0"; ++ }; ++ ++ rk806_dvs2_null: dvs2-null-pins { ++ pins = "gpio_pwrctrl2"; ++ function = "pin_fun0"; ++ }; ++ ++ rk806_dvs3_null: dvs3-null-pins { ++ pins = "gpio_pwrctrl3"; ++ function = "pin_fun0"; ++ }; ++ ++ regulators { ++ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 { ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_gpu_s0"; ++ regulator-enable-ramp-delay = <400>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_cpu_lit_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_log_s0: dcdc-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <675000>; ++ regulator-max-microvolt = <750000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_log_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <750000>; ++ }; ++ }; ++ ++ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_vdenc_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_ddr_s0: dcdc-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <675000>; ++ regulator-max-microvolt = <900000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_ddr_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <850000>; ++ }; ++ }; ++ ++ vdd2_ddr_s3: dcdc-reg6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-name = "vdd2_ddr_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ }; ++ }; ++ ++ vcc_2v0_pldo_s3: dcdc-reg7 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <2000000>; ++ regulator-max-microvolt = <2000000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_2v0_pldo_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <2000000>; ++ }; ++ }; ++ ++ vcc_3v3_s3: dcdc-reg8 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc_3v3_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <3300000>; ++ }; ++ }; ++ ++ vddq_ddr_s0: dcdc-reg9 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-name = "vddq_ddr_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vcc_1v8_s3: dcdc-reg10 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcc_1v8_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ avcc_1v8_s0: pldo-reg1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "avcc_1v8_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vcc_1v8_s0: pldo-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcc_1v8_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ avdd_1v2_s0: pldo-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "avdd_1v2_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ avcc_3v3_s0: pldo-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "avcc_3v3_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vccio_sd_s0: pldo-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vccio_sd_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ pldo6_s3: pldo-reg6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "pldo6_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vdd_0v75_s3: nldo-reg1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "vdd_0v75_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <750000>; ++ }; ++ }; ++ ++ avdd_ddr_pll_s0: nldo-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <850000>; ++ regulator-name = "avdd_ddr_pll_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <850000>; ++ }; ++ }; ++ ++ avdd_0v75_s0: nldo-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "avdd_0v75_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ avdd_0v85_s0: nldo-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <850000>; ++ regulator-name = "avdd_0v85_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_0v75_s0: nldo-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "vdd_0v75_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&tsadc { ++ status = "okay"; ++}; ++ ++&u2phy2 { ++ status = "okay"; ++}; ++ ++&u2phy2_host { ++ phy-supply = <&vcc5v0_host_20>; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-0 = <&uart2m0_xfer>; ++ status = "okay"; ++}; ++ ++&usb_host0_ehci { ++ status = "okay"; ++}; ++ ++&usb_host0_ohci { ++ status = "okay"; ++}; From 7ac6739a4ca989b0027ee3a893c4172052689a7d Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Thu, 13 Jul 2023 21:52:58 +0100 Subject: [PATCH 11/31] uboot-rockchip: add nanopi r6s rk3588s board support Backporting support for the NanoPi R6S from upstream uboot. Signed-off-by: Ben Whitten Link: https://github.com/openwrt/openwrt/pull/15607 Signed-off-by: Hauke Mehrtens --- package/boot/uboot-rockchip/Makefile | 19 +- ...rockchip-Add-FriendlyElec-NanoPi-R6S.patch | 193 ++++++++++++++++++ 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile index 307fcff5f7..d127d7108d 100644 --- a/package/boot/uboot-rockchip/Makefile +++ b/package/boot/uboot-rockchip/Makefile @@ -213,6 +213,22 @@ define U-Boot/rock-3a-rk3568 radxa_rock-3a endef +# RK3588 boards + +define U-Boot/Default/rk3588 + BUILD_SUBTARGET:=armv8 + DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588 + ATF:=rk3588_bl31_v1.45.elf + TPL:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin +endef + +define U-Boot/nanopi-r6s-rk3588s + $(U-Boot/Default/rk3588) + NAME:=NanoPi R6S + BUILD_DEVICES:= \ + friendlyarm_nanopi-r6s +endef + UBOOT_TARGETS := \ nanopc-t4-rk3399 \ nanopi-r4s-rk3399 \ @@ -233,7 +249,8 @@ UBOOT_TARGETS := \ nanopi-r5c-rk3568 \ nanopi-r5s-rk3568 \ radxa-e25-rk3568 \ - rock-3a-rk3568 + rock-3a-rk3568 \ + nanopi-r6s-rk3588s UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes diff --git a/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch b/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch new file mode 100644 index 0000000000..68958d87c9 --- /dev/null +++ b/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch @@ -0,0 +1,193 @@ +From 7db9ff164813afb343024d37731ab797ed7f507e Mon Sep 17 00:00:00 2001 +From: Sebastian Kropatsch +Date: Thu, 11 Jul 2024 12:15:18 +0200 +Subject: [PATCH] board: rockchip: Add FriendlyElec NanoPi R6S + +The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip RK3588s. +It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC storage, +one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports, one USB 2.0 +Type-A and one USB 3.0 Type-A port, a HDMI port, a 12-pin GPIO FPC +connector, a fan connector, IR receiver as well as some buttons and LEDs. + +Add initial support for this board using the upstream devicetree sources. + +Kernel commit: +f1b11f43b3e9 ("arm64: dts: rockchip: Add support for NanoPi R6S") + +Reviewed-by: Kever Yang +Signed-off-by: Sebastian Kropatsch +--- + arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi | 3 + + arch/arm/mach-rockchip/rk3588/Kconfig | 13 +++ + board/friendlyelec/nanopi-r6s-rk3588s/Kconfig | 12 +++ + .../nanopi-r6s-rk3588s/MAINTAINERS | 7 ++ + configs/nanopi-r6s-rk3588s_defconfig | 82 +++++++++++++++++++ + doc/board/rockchip/rockchip.rst | 1 + + include/configs/nanopi-r6s-rk3588s.h | 12 +++ + 7 files changed, 130 insertions(+) + create mode 100644 arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi + create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/Kconfig + create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS + create mode 100644 configs/nanopi-r6s-rk3588s_defconfig + create mode 100644 include/configs/nanopi-r6s-rk3588s.h + +--- /dev/null ++++ b/arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi +@@ -0,0 +1,3 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++#include "rk3588s-u-boot.dtsi" +--- a/arch/arm/mach-rockchip/rk3588/Kconfig ++++ b/arch/arm/mach-rockchip/rk3588/Kconfig +@@ -78,6 +78,18 @@ config TARGET_NANOPCT6_RK3588 + Power: 5.5*2.1mm DC Jack, 12VDC input + Dimensions: 110x80x1.6mm (without case) / 86x114.5x30mm (with case) + ++config TARGET_NANOPI_R6S_RK3588S ++ bool "FriendlyElec NanoPi R6S" ++ select BOARD_LATE_INIT ++ help ++ The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip ++ RK3588s. ++ It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC ++ storage, one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports, ++ one USB 2.0 Type-A and one USB 3.0 Type-A port, a HDMI port, a ++ 12-pin GPIO FPC connector, a fan connector, IR receiver as well ++ as some buttons and LEDs. ++ + config TARGET_NOVA_RK3588 + bool "Indiedroid Nova RK3588" + select BOARD_LATE_INIT +@@ -232,6 +244,7 @@ config TEXT_BASE + + source "board/edgeble/neural-compute-module-6/Kconfig" + source "board/friendlyelec/nanopc-t6-rk3588/Kconfig" ++source "board/friendlyelec/nanopi-r6s-rk3588s/Kconfig" + source "board/indiedroid/nova/Kconfig" + source "board/pine64/quartzpro64-rk3588/Kconfig" + source "board/turing/turing-rk1-rk3588/Kconfig" +--- /dev/null ++++ b/board/friendlyelec/nanopi-r6s-rk3588s/Kconfig +@@ -0,0 +1,12 @@ ++if TARGET_NANOPI_R6S_RK3588S ++ ++config SYS_BOARD ++ default "nanopi-r6s-rk3588s" ++ ++config SYS_VENDOR ++ default "friendlyelec" ++ ++config SYS_CONFIG_NAME ++ default "nanopi-r6s-rk3588s" ++ ++endif +--- /dev/null ++++ b/board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS +@@ -0,0 +1,7 @@ ++NANOPI-R6S ++M: Sebastian Kropatsch ++S: Maintained ++F: arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi ++F: board/friendlyelec/nanopi-r6s-rk3588s ++F: configs/nanopi-r6s-rk3588s_defconfig ++F: include/configs/nanopi-r6s-rk3588s.h +--- /dev/null ++++ b/configs/nanopi-r6s-rk3588s_defconfig +@@ -0,0 +1,82 @@ ++CONFIG_ARM=y ++CONFIG_SKIP_LOWLEVEL_INIT=y ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_COUNTER_FREQUENCY=24000000 ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588s-nanopi-r6s" ++CONFIG_ROCKCHIP_RK3588=y ++CONFIG_SPL_SERIAL=y ++CONFIG_TARGET_NANOPI_R6S_RK3588S=y ++CONFIG_DEBUG_UART_BASE=0xFEB50000 ++CONFIG_DEBUG_UART_CLOCK=24000000 ++CONFIG_SYS_LOAD_ADDR=0xc00800 ++CONFIG_PCI=y ++CONFIG_DEBUG_UART=y ++CONFIG_FIT=y ++CONFIG_FIT_VERBOSE=y ++CONFIG_SPL_FIT_SIGNATURE=y ++CONFIG_SPL_LOAD_FIT=y ++CONFIG_LEGACY_IMAGE_FORMAT=y ++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6s.dtb" ++# CONFIG_DISPLAY_CPUINFO is not set ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++CONFIG_SPL_MAX_SIZE=0x40000 ++CONFIG_SPL_PAD_TO=0x7f8000 ++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set ++CONFIG_SPL_ATF=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_ROCKUSB=y ++# CONFIG_CMD_SETEXPR is not set ++CONFIG_CMD_REGULATOR=y ++# CONFIG_SPL_DOS_PARTITION is not set ++CONFIG_SPL_OF_CONTROL=y ++CONFIG_OF_LIVE=y ++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" ++CONFIG_SPL_DM_SEQ_ALIAS=y ++CONFIG_SPL_REGMAP=y ++CONFIG_SPL_SYSCON=y ++CONFIG_SPL_CLK=y ++# CONFIG_USB_FUNCTION_FASTBOOT is not set ++CONFIG_ROCKCHIP_GPIO=y ++CONFIG_SYS_I2C_ROCKCHIP=y ++CONFIG_MISC=y ++CONFIG_SUPPORT_EMMC_RPMB=y ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_ROCKCHIP=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_SDMA=y ++CONFIG_MMC_SDHCI_ROCKCHIP=y ++# CONFIG_SPI_FLASH is not set ++CONFIG_PHY_REALTEK=y ++CONFIG_DWC_ETH_QOS=y ++CONFIG_DWC_ETH_QOS_ROCKCHIP=y ++CONFIG_RTL8169=y ++CONFIG_PCIE_DW_ROCKCHIP=y ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y ++CONFIG_PHY_ROCKCHIP_USBDP=y ++CONFIG_SPL_PINCTRL=y ++CONFIG_PWM_ROCKCHIP=y ++CONFIG_SPL_RAM=y ++CONFIG_BAUDRATE=1500000 ++CONFIG_DEBUG_UART_SHIFT=2 ++CONFIG_SYS_NS16550_MEM32=y ++CONFIG_SYSRESET=y ++CONFIG_USB=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_GENERIC=y ++CONFIG_USB_OHCI_HCD=y ++CONFIG_USB_OHCI_GENERIC=y ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_DOWNLOAD=y ++CONFIG_USB_FUNCTION_ROCKUSB=y ++CONFIG_ERRNO_STR=y +--- /dev/null ++++ b/include/configs/nanopi-r6s-rk3588s.h +@@ -0,0 +1,12 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++ ++#ifndef __NANOPI_R6S_RK3588S_H ++#define __NANOPI_R6S_RK3588S_H ++ ++#define ROCKCHIP_DEVICE_SETTINGS \ ++ "stdout=serial,vidconsole\0" \ ++ "stderr=serial,vidconsole\0" ++ ++#include ++ ++#endif /* __NANOPI_R6S_RK3588S_H */ From cc9df2da0dcbc6bd0b7d91b7bdc6a02456e75119 Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Tue, 4 Jun 2024 19:22:45 +0100 Subject: [PATCH 12/31] rockchip: add NanoPi R6S support Add patches for the nanopi r6s board, backporting from 6.9 where basic support is landing. Signed-off-by: Ben Whitten Link: https://github.com/openwrt/openwrt/pull/15607 Signed-off-by: Hauke Mehrtens --- target/linux/rockchip/armv8/config-6.6 | 14 + target/linux/rockchip/image/armv8.mk | 8 + .../linux/rockchip/image/default.bootscript | 2 + ...-rockchip-Add-support-for-NanoPi-R6S.patch | 792 ++++++++++++++++++ ...ve-rk3588-serial-aliases-to-soc-dtsi.patch | 129 +++ ...p-add-rk3588-i2c-aliases-to-soc-dtsi.patch | 38 + ...-add-rk3588-gpio-aliases-to-soc-dtsi.patch | 34 + ...p-add-rk3588-spi-aliases-to-soc-dtsi.patch | 34 + ...probe-to-defer-if-clock-is-not-ready.patch | 25 + 9 files changed, 1076 insertions(+) create mode 100644 target/linux/rockchip/patches-6.6/031-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6S.patch create mode 100644 target/linux/rockchip/patches-6.6/032-v6.8-arm64-dts-rockchip-move-rk3588-serial-aliases-to-soc-dtsi.patch create mode 100644 target/linux/rockchip/patches-6.6/033-v6.8-arm64-dts-rockchip-add-rk3588-i2c-aliases-to-soc-dtsi.patch create mode 100644 target/linux/rockchip/patches-6.6/034-v6.8-arm64-dts-rockchip-add-rk3588-gpio-aliases-to-soc-dtsi.patch create mode 100644 target/linux/rockchip/patches-6.6/035-v6.8-arm64-dts-rockchip-add-rk3588-spi-aliases-to-soc-dtsi.patch create mode 100644 target/linux/rockchip/patches-6.6/302-mmc-allow-probe-to-defer-if-clock-is-not-ready.patch diff --git a/target/linux/rockchip/armv8/config-6.6 b/target/linux/rockchip/armv8/config-6.6 index fb57fc6260..be87f7e52c 100644 --- a/target/linux/rockchip/armv8/config-6.6 +++ b/target/linux/rockchip/armv8/config-6.6 @@ -24,11 +24,20 @@ CONFIG_ARM64=y CONFIG_ARM64_4K_PAGES=y CONFIG_ARM64_CNP=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_1463225=y +CONFIG_ARM64_ERRATUM_1530923=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_2658417=y +CONFIG_ARM64_ERRATUM_3117295=y CONFIG_ARM64_ERRATUM_819472=y CONFIG_ARM64_ERRATUM_824069=y CONFIG_ARM64_ERRATUM_826319=y @@ -52,6 +61,9 @@ 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_REPEAT_TLBI=y +CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y +CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y @@ -163,6 +175,7 @@ CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y CONFIG_CPU_ISOLATION=y CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y CONFIG_CPU_THERMAL=y @@ -567,6 +580,7 @@ CONFIG_RELOCATABLE=y CONFIG_RESET_CONTROLLER=y CONFIG_RESET_SCMI=y CONFIG_RFS_ACCEL=y +CONFIG_ROCKCHIP_ERRATUM_3588001=y CONFIG_ROCKCHIP_GRF=y CONFIG_ROCKCHIP_IODOMAIN=y CONFIG_ROCKCHIP_IOMMU=y diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index c92a8ba4f7..efae3285b3 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -81,6 +81,14 @@ define Device/friendlyarm_nanopi-r5s endef TARGET_DEVICES += friendlyarm_nanopi-r5s +define Device/friendlyarm_nanopi-r6s + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R6S + SOC := rk3588s + DEVICE_PACKAGES := kmod-r8169 +endef +TARGET_DEVICES += friendlyarm_nanopi-r6s + define Device/pine64_rock64 DEVICE_VENDOR := Pine64 DEVICE_MODEL := Rock64 diff --git a/target/linux/rockchip/image/default.bootscript b/target/linux/rockchip/image/default.bootscript index cca0b8d4ac..10ca93ceda 100644 --- a/target/linux/rockchip/image/default.bootscript +++ b/target/linux/rockchip/image/default.bootscript @@ -2,6 +2,8 @@ part uuid ${devtype} ${devnum}:2 uuid if test $stdout = 'serial@fe660000' ; then serial_addr=',0xfe660000'; +elif test $stdout = 'serial@feb50000' ; +then serial_addr=',0xfeb50000'; elif test $stdout = 'serial@ff130000' ; then serial_addr=',0xff130000'; elif test $stdout = 'serial@ff1a0000' ; diff --git a/target/linux/rockchip/patches-6.6/031-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6S.patch b/target/linux/rockchip/patches-6.6/031-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6S.patch new file mode 100644 index 0000000000..e5afbb4f40 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/031-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6S.patch @@ -0,0 +1,792 @@ +From f1b11f43b3e983b26d8010fc43ba6c2b979826f2 Mon Sep 17 00:00:00 2001 +From: Muhammed Efe Cetin +Date: Sat, 30 Dec 2023 14:18:00 +0300 +Subject: [PATCH] arm64: dts: rockchip: Add support for NanoPi R6S + +Add basic NanoPi R6S support that comes with USB2, PCIe, SD card, eMMC +support. + +Signed-off-by: Muhammed Efe Cetin +Link: https://lore.kernel.org/r/6db3b653efc6f0a2dca8e96fdd0503906db72fb6.1703934548.git.efectn@protonmail.com +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/Makefile | 1 + + .../boot/dts/rockchip/rk3588s-nanopi-r6s.dts | 764 ++++++++++++++++++ + 2 files changed, 765 insertions(+) + create mode 100644 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts + +--- a/arch/arm64/boot/dts/rockchip/Makefile ++++ b/arch/arm64/boot/dts/rockchip/Makefile +@@ -104,4 +104,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-na + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6s.dts +@@ -0,0 +1,764 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++/dts-v1/; ++ ++#include ++#include ++#include ++#include "rk3588s.dtsi" ++ ++/ { ++ model = "FriendlyElec NanoPi R6S"; ++ compatible = "friendlyarm,nanopi-r6s", "rockchip,rk3588s"; ++ ++ aliases { ++ ethernet0 = &gmac1; ++ mmc0 = &sdmmc; ++ mmc1 = &sdhci; ++ }; ++ ++ chosen { ++ stdout-path = "serial2:1500000n8"; ++ }; ++ ++ adc-keys { ++ compatible = "adc-keys"; ++ io-channels = <&saradc 0>; ++ io-channel-names = "buttons"; ++ keyup-threshold-microvolt = <1800000>; ++ poll-interval = <100>; ++ ++ button-maskrom { ++ label = "Maskrom"; ++ linux,code = ; ++ press-threshold-microvolt = <1800>; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&key1_pin>; ++ ++ button-user { ++ label = "User"; ++ linux,code = ; ++ gpios = <&gpio1 RK_PC0 GPIO_ACTIVE_LOW>; ++ debounce-interval = <50>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ sys_led: led-0 { ++ label = "sys_led"; ++ gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>; ++ linux,default-trigger = "heartbeat"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sys_led_pin>; ++ }; ++ ++ wan_led: led-1 { ++ label = "wan_led"; ++ gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&wan_led_pin>; ++ }; ++ ++ lan1_led: led-2 { ++ label = "lan1_led"; ++ gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lan1_led_pin>; ++ }; ++ ++ lan2_led: led-3 { ++ label = "lan2_led"; ++ gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&lan2_led_pin>; ++ }; ++ }; ++ ++ 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>; ++ }; ++ ++ vcc_1v1_nldo_s3: vcc-1v1-nldo-s3-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_1v1_nldo_s3"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1100000>; ++ regulator-max-microvolt = <1100000>; ++ vin-supply = <&vcc5v0_sys>; ++ }; ++ ++ vcc_3v3_s0: vcc-3v3-s0-regulator { ++ compatible = "regulator-fixed"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc_3v3_s0"; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ vcc_3v3_sd_s0: vcc-3v3-sd-s0-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sd_s0_pwr>; ++ regulator-name = "vcc_3v3_sd_s0"; ++ regulator-boot-on; ++ regulator-max-microvolt = <3000000>; ++ regulator-min-microvolt = <3000000>; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ vcc_3v3_pcie20: vcc3v3-pcie20-regulator { ++ compatible = "regulator-fixed"; ++ regulator-name = "vcc_3v3_pcie20"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ vin-supply = <&vcc_3v3_s3>; ++ }; ++ ++ 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 = <&vcc5v0_sys>; ++ }; ++ ++ vcc5v0_usb_otg0: vcc5v0-usb-otg0-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&typec5v_pwren>; ++ regulator-name = "vcc5v0_usb_otg0"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc5v0_usb>; ++ }; ++ ++ vcc5v0_host_20: vcc5v0-host-20-regulator { ++ compatible = "regulator-fixed"; ++ enable-active-high; ++ gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&vcc5v0_host20_en>; ++ regulator-name = "vcc5v0_host_20"; ++ regulator-min-microvolt = <5000000>; ++ regulator-max-microvolt = <5000000>; ++ vin-supply = <&vcc5v0_usb>; ++ }; ++}; ++ ++&combphy0_ps { ++ status = "okay"; ++}; ++ ++&combphy2_psu { ++ status = "okay"; ++}; ++ ++&cpu_b0 { ++ cpu-supply = <&vdd_cpu_big0_s0>; ++}; ++ ++&cpu_b1 { ++ cpu-supply = <&vdd_cpu_big0_s0>; ++}; ++ ++&cpu_b2 { ++ cpu-supply = <&vdd_cpu_big1_s0>; ++}; ++ ++&cpu_b3 { ++ cpu-supply = <&vdd_cpu_big1_s0>; ++}; ++ ++&cpu_l0 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l1 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l2 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&cpu_l3 { ++ cpu-supply = <&vdd_cpu_lit_s0>; ++}; ++ ++&gmac1 { ++ clock_in_out = "output"; ++ phy-handle = <&rgmii_phy1>; ++ phy-mode = "rgmii-rxid"; ++ pinctrl-0 = <&gmac1_miim ++ &gmac1_tx_bus2 ++ &gmac1_rx_bus2 ++ &gmac1_rgmii_clk ++ &gmac1_rgmii_bus>; ++ pinctrl-names = "default"; ++ tx_delay = <0x42>; ++ status = "okay"; ++}; ++ ++&i2c0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c0m2_xfer>; ++ status = "okay"; ++ ++ vdd_cpu_big0_s0: regulator@42 { ++ compatible = "rockchip,rk8602"; ++ reg = <0x42>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_cpu_big0_s0"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <1050000>; ++ regulator-ramp-delay = <2300>; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_cpu_big1_s0: regulator@43 { ++ compatible = "rockchip,rk8603", "rockchip,rk8602"; ++ reg = <0x43>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_cpu_big1_s0"; ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <1050000>; ++ regulator-ramp-delay = <2300>; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++}; ++ ++&i2c2 { ++ status = "okay"; ++ ++ vdd_npu_s0: regulator@42 { ++ compatible = "rockchip,rk8602"; ++ reg = <0x42>; ++ fcs,suspend-voltage-selector = <1>; ++ regulator-name = "vdd_npu_s0"; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <2300>; ++ regulator-boot-on; ++ regulator-always-on; ++ vin-supply = <&vcc5v0_sys>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++}; ++ ++&i2c6 { ++ clock-frequency = <200000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c6m0_xfer>; ++ status = "okay"; ++ ++ hym8563: rtc@51 { ++ compatible = "haoyu,hym8563"; ++ reg = <0x51>; ++ #clock-cells = <0>; ++ clock-output-names = "hym8563"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtc_int>; ++ interrupt-parent = <&gpio0>; ++ interrupts = ; ++ wakeup-source; ++ }; ++}; ++ ++&mdio1 { ++ rgmii_phy1: ethernet-phy@1 { ++ compatible = "ethernet-phy-id001c.c916"; ++ reg = <0x1>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&rtl8211f_rst>; ++ reset-assert-us = <20000>; ++ reset-deassert-us = <100000>; ++ reset-gpios = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>; ++ }; ++}; ++ ++&pcie2x1l1 { ++ reset-gpios = <&gpio1 RK_PA7 GPIO_ACTIVE_HIGH>; ++ vpcie3v3-supply = <&vcc_3v3_pcie20>; ++ status = "okay"; ++}; ++ ++&pcie2x1l2 { ++ reset-gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_HIGH>; ++ vpcie3v3-supply = <&vcc_3v3_pcie20>; ++ status = "okay"; ++}; ++ ++&pinctrl { ++ gpio-key { ++ key1_pin: key1-pin { ++ rockchip,pins = <1 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ gpio-leds { ++ sys_led_pin: sys-led-pin { ++ rockchip,pins = ++ <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ wan_led_pin: wan-led-pin { ++ rockchip,pins = ++ <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ lan1_led_pin: lan1-led-pin { ++ rockchip,pins = ++ <1 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ lan2_led_pin: lan2-led-pin { ++ rockchip,pins = ++ <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ hym8563 { ++ rtc_int: rtc-int { ++ rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ sdmmc { ++ sd_s0_pwr: sd-s0-pwr { ++ rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>; ++ }; ++ }; ++ ++ usb { ++ typec5v_pwren: typec5v-pwren { ++ rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ ++ vcc5v0_host20_en: vcc5v0-host20-en { ++ rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ ++ rtl8211f { ++ rtl8211f_rst: rtl8211f-rst { ++ rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++}; ++ ++&saradc { ++ vref-supply = <&avcc_1v8_s0>; ++ status = "okay"; ++}; ++ ++&sdhci { ++ bus-width = <8>; ++ no-sdio; ++ no-sd; ++ non-removable; ++ mmc-hs200-1_8v; ++ status = "okay"; ++}; ++ ++&sdmmc { ++ bus-width = <4>; ++ cap-sd-highspeed; ++ disable-wp; ++ max-frequency = <150000000>; ++ no-mmc; ++ no-sdio; ++ sd-uhs-sdr104; ++ vmmc-supply = <&vcc_3v3_sd_s0>; ++ vqmmc-supply = <&vccio_sd_s0>; ++ status = "okay"; ++}; ++ ++&spi2 { ++ status = "okay"; ++ assigned-clocks = <&cru CLK_SPI2>; ++ assigned-clock-rates = <200000000>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>; ++ num-cs = <1>; ++ ++ pmic@0 { ++ compatible = "rockchip,rk806"; ++ spi-max-frequency = <1000000>; ++ reg = <0x0>; ++ ++ interrupt-parent = <&gpio0>; ++ interrupts = <7 IRQ_TYPE_LEVEL_LOW>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>, ++ <&rk806_dvs2_null>, <&rk806_dvs3_null>; ++ ++ system-power-controller; ++ ++ vcc1-supply = <&vcc5v0_sys>; ++ vcc2-supply = <&vcc5v0_sys>; ++ vcc3-supply = <&vcc5v0_sys>; ++ vcc4-supply = <&vcc5v0_sys>; ++ vcc5-supply = <&vcc5v0_sys>; ++ vcc6-supply = <&vcc5v0_sys>; ++ vcc7-supply = <&vcc5v0_sys>; ++ vcc8-supply = <&vcc5v0_sys>; ++ vcc9-supply = <&vcc5v0_sys>; ++ vcc10-supply = <&vcc5v0_sys>; ++ vcc11-supply = <&vcc_2v0_pldo_s3>; ++ vcc12-supply = <&vcc5v0_sys>; ++ vcc13-supply = <&vcc_1v1_nldo_s3>; ++ vcc14-supply = <&vcc_1v1_nldo_s3>; ++ vcca-supply = <&vcc5v0_sys>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ rk806_dvs1_null: dvs1-null-pins { ++ pins = "gpio_pwrctrl1"; ++ function = "pin_fun0"; ++ }; ++ ++ rk806_dvs2_null: dvs2-null-pins { ++ pins = "gpio_pwrctrl2"; ++ function = "pin_fun0"; ++ }; ++ ++ rk806_dvs3_null: dvs3-null-pins { ++ pins = "gpio_pwrctrl3"; ++ function = "pin_fun0"; ++ }; ++ ++ regulators { ++ vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 { ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_gpu_s0"; ++ regulator-enable-ramp-delay = <400>; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_cpu_lit_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_log_s0: dcdc-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <675000>; ++ regulator-max-microvolt = <750000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_log_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <750000>; ++ }; ++ }; ++ ++ vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <550000>; ++ regulator-max-microvolt = <950000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_vdenc_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_ddr_s0: dcdc-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <675000>; ++ regulator-max-microvolt = <900000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_ddr_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <850000>; ++ }; ++ }; ++ ++ vdd2_ddr_s3: dcdc-reg6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-name = "vdd2_ddr_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ }; ++ }; ++ ++ vcc_2v0_pldo_s3: dcdc-reg7 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <2000000>; ++ regulator-max-microvolt = <2000000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vdd_2v0_pldo_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <2000000>; ++ }; ++ }; ++ ++ vcc_3v3_s3: dcdc-reg8 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-name = "vcc_3v3_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <3300000>; ++ }; ++ }; ++ ++ vddq_ddr_s0: dcdc-reg9 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-name = "vddq_ddr_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vcc_1v8_s3: dcdc-reg10 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcc_1v8_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ avcc_1v8_s0: pldo-reg1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "avcc_1v8_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vcc_1v8_s0: pldo-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "vcc_1v8_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ avdd_1v2_s0: pldo-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1200000>; ++ regulator-max-microvolt = <1200000>; ++ regulator-name = "avdd_1v2_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ avcc_3v3_s0: pldo-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <3300000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "avcc_3v3_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vccio_sd_s0: pldo-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-ramp-delay = <12500>; ++ regulator-name = "vccio_sd_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ pldo6_s3: pldo-reg6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <1800000>; ++ regulator-name = "pldo6_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <1800000>; ++ }; ++ }; ++ ++ vdd_0v75_s3: nldo-reg1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "vdd_0v75_s3"; ++ ++ regulator-state-mem { ++ regulator-on-in-suspend; ++ regulator-suspend-microvolt = <750000>; ++ }; ++ }; ++ ++ avdd_ddr_pll_s0: nldo-reg2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <850000>; ++ regulator-name = "avdd_ddr_pll_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ regulator-suspend-microvolt = <850000>; ++ }; ++ }; ++ ++ avdd_0v75_s0: nldo-reg3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "avdd_0v75_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ avdd_0v85_s0: nldo-reg4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <850000>; ++ regulator-max-microvolt = <850000>; ++ regulator-name = "avdd_0v85_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ ++ vdd_0v75_s0: nldo-reg5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-min-microvolt = <750000>; ++ regulator-max-microvolt = <750000>; ++ regulator-name = "vdd_0v75_s0"; ++ ++ regulator-state-mem { ++ regulator-off-in-suspend; ++ }; ++ }; ++ }; ++ }; ++}; ++ ++&tsadc { ++ status = "okay"; ++}; ++ ++&u2phy2 { ++ status = "okay"; ++}; ++ ++&u2phy2_host { ++ phy-supply = <&vcc5v0_host_20>; ++ status = "okay"; ++}; ++ ++&uart2 { ++ pinctrl-0 = <&uart2m0_xfer>; ++ status = "okay"; ++}; ++ ++&usb_host0_ehci { ++ status = "okay"; ++}; ++ ++&usb_host0_ohci { ++ status = "okay"; ++}; diff --git a/target/linux/rockchip/patches-6.6/032-v6.8-arm64-dts-rockchip-move-rk3588-serial-aliases-to-soc-dtsi.patch b/target/linux/rockchip/patches-6.6/032-v6.8-arm64-dts-rockchip-move-rk3588-serial-aliases-to-soc-dtsi.patch new file mode 100644 index 0000000000..88919893a3 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/032-v6.8-arm64-dts-rockchip-move-rk3588-serial-aliases-to-soc-dtsi.patch @@ -0,0 +1,129 @@ +From 9918d10d16665527e59fdb87c5acac70cc1cfe8f Mon Sep 17 00:00:00 2001 +From: Heiko Stuebner +Date: Tue, 5 Dec 2023 17:48:39 +0100 +Subject: [PATCH] arm64: dts: rockchip: move rk3588 serial aliases to soc dtsi + +The serial ports on rk3588 are named uart0 - uart9. Board schematics +also use these exact numbers and we want those names to also reflect +in the OS devices because everything else would just cause confusion. + +To prevent each board repeating their list of serial aliases, move them +to the soc dtsi, as all previous Rockchip soc do already. + +Signed-off-by: Heiko Stuebner +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20231205164842.556684-2-heiko@sntech.de +--- + .../boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts | 4 ---- + .../boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts | 4 ---- + arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts | 1 - + .../boot/dts/rockchip/rk3588-orangepi-5-plus.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588-turing-rk1.dtsi | 2 -- + .../boot/dts/rockchip/rk3588s-indiedroid-nova.dts | 1 - + .../boot/dts/rockchip/rk3588s-khadas-edge2.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588s-orangepi-5.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts | 1 - + arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 13 +++++++++++++ + 13 files changed, 13 insertions(+), 19 deletions(-) + +--- a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dts +@@ -12,10 +12,6 @@ + compatible = "edgeble,neural-compute-module-6a-io", + "edgeble,neural-compute-module-6a", "rockchip,rk3588"; + +- aliases { +- serial2 = &uart2; +- }; +- + chosen { + stdout-path = "serial2:1500000n8"; + }; +--- a/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dts +@@ -12,10 +12,6 @@ + compatible = "edgeble,neural-compute-module-6b-io", + "edgeble,neural-compute-module-6b", "rockchip,rk3588"; + +- aliases { +- serial2 = &uart2; +- }; +- + chosen { + stdout-path = "serial2:1500000n8"; + }; +--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts +@@ -16,7 +16,6 @@ + + aliases { + mmc0 = &sdhci; +- serial2 = &uart2; + }; + + chosen { +--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts +@@ -19,7 +19,6 @@ + aliases { + mmc0 = &sdhci; + mmc1 = &sdmmc; +- serial2 = &uart2; + }; + + chosen { +--- a/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts +@@ -15,7 +15,6 @@ + mmc0 = &sdhci; + mmc1 = &sdmmc; + mmc2 = &sdio; +- serial2 = &uart2; + }; + + chosen { +--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts +@@ -12,7 +12,6 @@ + + aliases { + mmc0 = &sdhci; +- serial2 = &uart2; + }; + + chosen { +--- a/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-rock-5a.dts +@@ -14,7 +14,6 @@ + aliases { + mmc0 = &sdhci; + mmc1 = &sdmmc; +- serial2 = &uart2; + }; + + analog-sound { +--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +@@ -18,6 +18,19 @@ + #address-cells = <2>; + #size-cells = <2>; + ++ aliases { ++ serial0 = &uart0; ++ serial1 = &uart1; ++ serial2 = &uart2; ++ serial3 = &uart3; ++ serial4 = &uart4; ++ serial5 = &uart5; ++ serial6 = &uart6; ++ serial7 = &uart7; ++ serial8 = &uart8; ++ serial9 = &uart9; ++ }; ++ + cpus { + #address-cells = <1>; + #size-cells = <0>; diff --git a/target/linux/rockchip/patches-6.6/033-v6.8-arm64-dts-rockchip-add-rk3588-i2c-aliases-to-soc-dtsi.patch b/target/linux/rockchip/patches-6.6/033-v6.8-arm64-dts-rockchip-add-rk3588-i2c-aliases-to-soc-dtsi.patch new file mode 100644 index 0000000000..2daaec3953 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/033-v6.8-arm64-dts-rockchip-add-rk3588-i2c-aliases-to-soc-dtsi.patch @@ -0,0 +1,38 @@ +From 328e901b7b03d292c1520ffb38e9164feef4f1ea Mon Sep 17 00:00:00 2001 +From: Heiko Stuebner +Date: Tue, 5 Dec 2023 17:48:40 +0100 +Subject: [PATCH] arm64: dts: rockchip: add rk3588 i2c aliases to soc dtsi + +The i2c controllers on rk3588 are named i2c0 - i2c8. Board schematics +also use these exact numbers and we want those names to also reflect +in the OS devices because everything else would just cause confusion. +Userspace i2c access is a thing afterall. + +To prevent each board repeating their list of i2c aliases, define them +in the soc dtsi, as all previous Rockchip soc do already. + +Signed-off-by: Heiko Stuebner +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20231205164842.556684-3-heiko@sntech.de +--- + arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +@@ -19,6 +19,15 @@ + #size-cells = <2>; + + aliases { ++ i2c0 = &i2c0; ++ i2c1 = &i2c1; ++ i2c2 = &i2c2; ++ i2c3 = &i2c3; ++ i2c4 = &i2c4; ++ i2c5 = &i2c5; ++ i2c6 = &i2c6; ++ i2c7 = &i2c7; ++ i2c8 = &i2c8; + serial0 = &uart0; + serial1 = &uart1; + serial2 = &uart2; diff --git a/target/linux/rockchip/patches-6.6/034-v6.8-arm64-dts-rockchip-add-rk3588-gpio-aliases-to-soc-dtsi.patch b/target/linux/rockchip/patches-6.6/034-v6.8-arm64-dts-rockchip-add-rk3588-gpio-aliases-to-soc-dtsi.patch new file mode 100644 index 0000000000..19e6c6a4f5 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/034-v6.8-arm64-dts-rockchip-add-rk3588-gpio-aliases-to-soc-dtsi.patch @@ -0,0 +1,34 @@ +From a024abedbca99a20aeb96f5beec9ded13c85dcb3 Mon Sep 17 00:00:00 2001 +From: Heiko Stuebner +Date: Tue, 5 Dec 2023 17:48:41 +0100 +Subject: [PATCH] arm64: dts: rockchip: add rk3588 gpio aliases to soc dtsi + +The gpio controllers on rk3588 are named gpio0 - gpio4. Board schematics +also use these exact numbers and we want those names to also reflect +in the OS devices because everything else would just cause confusion. +Userspace gpio access is a thing afterall. + +To prevent each board repeating their list of gpio aliases, define them +in the soc dtsi, as previous Rockchip soc like the rk356x do already. + +Signed-off-by: Heiko Stuebner +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20231205164842.556684-4-heiko@sntech.de +--- + arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +@@ -19,6 +19,11 @@ + #size-cells = <2>; + + aliases { ++ gpio0 = &gpio0; ++ gpio1 = &gpio1; ++ gpio2 = &gpio2; ++ gpio3 = &gpio3; ++ gpio4 = &gpio4; + i2c0 = &i2c0; + i2c1 = &i2c1; + i2c2 = &i2c2; diff --git a/target/linux/rockchip/patches-6.6/035-v6.8-arm64-dts-rockchip-add-rk3588-spi-aliases-to-soc-dtsi.patch b/target/linux/rockchip/patches-6.6/035-v6.8-arm64-dts-rockchip-add-rk3588-spi-aliases-to-soc-dtsi.patch new file mode 100644 index 0000000000..6a66d99668 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/035-v6.8-arm64-dts-rockchip-add-rk3588-spi-aliases-to-soc-dtsi.patch @@ -0,0 +1,34 @@ +From a86e88043de929da76f7f6cf0990ba92aed8391a Mon Sep 17 00:00:00 2001 +From: Heiko Stuebner +Date: Tue, 5 Dec 2023 17:48:42 +0100 +Subject: [PATCH] arm64: dts: rockchip: add rk3588 spi aliases to soc dtsi + +The spi controllers on rk3588 are named spi0 - spi4. Board schematics +also use these exact numbers and we want those names to also reflect +in the OS devices because everything else would just cause confusion. +Userspace spi access is a thing afterall. + +To prevent each board repeating their list of spi aliases, define them +in the soc dtsi, as previous Rockchip soc like the rk356x do already. + +Signed-off-by: Heiko Stuebner +Reviewed-by: Dragan Simic +Link: https://lore.kernel.org/r/20231205164842.556684-5-heiko@sntech.de +--- + arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi ++++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi +@@ -43,6 +43,11 @@ + serial7 = &uart7; + serial8 = &uart8; + serial9 = &uart9; ++ spi0 = &spi0; ++ spi1 = &spi1; ++ spi2 = &spi2; ++ spi3 = &spi3; ++ spi4 = &spi4; + }; + + cpus { diff --git a/target/linux/rockchip/patches-6.6/302-mmc-allow-probe-to-defer-if-clock-is-not-ready.patch b/target/linux/rockchip/patches-6.6/302-mmc-allow-probe-to-defer-if-clock-is-not-ready.patch new file mode 100644 index 0000000000..468cc3a307 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/302-mmc-allow-probe-to-defer-if-clock-is-not-ready.patch @@ -0,0 +1,25 @@ +--- a/drivers/mmc/host/dw_mmc.c ++++ b/drivers/mmc/host/dw_mmc.c +@@ -3294,6 +3294,10 @@ int dw_mci_probe(struct dw_mci *host) + host->biu_clk = devm_clk_get(host->dev, "biu"); + if (IS_ERR(host->biu_clk)) { + dev_dbg(host->dev, "biu clock not available\n"); ++ ret = PTR_ERR(host->biu_clk); ++ if (ret == -EPROBE_DEFER) { ++ return ret; ++ } + } else { + ret = clk_prepare_enable(host->biu_clk); + if (ret) { +@@ -3305,6 +3309,11 @@ int dw_mci_probe(struct dw_mci *host) + host->ciu_clk = devm_clk_get(host->dev, "ciu"); + if (IS_ERR(host->ciu_clk)) { + dev_dbg(host->dev, "ciu clock not available\n"); ++ ret = PTR_ERR(host->ciu_clk); ++ if (ret == -EPROBE_DEFER) { ++ goto err_clk_biu; ++ } ++ + host->bus_hz = host->pdata->bus_hz; + } else { + ret = clk_prepare_enable(host->ciu_clk); From c609c3bd6ef4b7ba7ddcd346c87e2cff3602067f Mon Sep 17 00:00:00 2001 From: Ben Whitten Date: Tue, 4 Jun 2024 19:21:36 +0100 Subject: [PATCH 13/31] rockchip: add led and network config to nanopi r6s We need to configure the led and network config for this board on start as per the others Signed-off-by: Ben Whitten Link: https://github.com/openwrt/openwrt/pull/15607 Signed-off-by: Hauke Mehrtens --- target/linux/rockchip/armv8/base-files/etc/board.d/01_leds | 5 +++++ .../linux/rockchip/armv8/base-files/etc/board.d/02_network | 6 +++++- .../armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index ef89461056..6f6dfbf73e 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -28,6 +28,11 @@ friendlyarm,nanopi-r5s) ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth1" ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth2" ;; +friendlyarm,nanopi-r6s) + ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" + ucidef_set_led_netdev "lan1" "LAN1" "lan1_led" "eth2" + ucidef_set_led_netdev "lan2" "LAN2" "lan2_led" "eth0" + ;; esac board_config_flush 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 f1192c9371..506ef67245 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 @@ -24,6 +24,9 @@ rockchip_setup_interfaces() friendlyarm,nanopi-r5s) ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0' ;; + friendlyarm,nanopi-r6s) + ucidef_set_interfaces_lan_wan 'eth0 eth2' 'eth1' + ;; sinovoip,rk3568-bpi-r2pro) ucidef_set_interfaces_lan_wan 'lan0 lan1 lan2 lan3' 'eth0' ;; @@ -57,7 +60,8 @@ rockchip_setup_macs() wan_mac=$(get_mac_binary "/sys/bus/i2c/devices/2-0051/eeprom" 0xfa) lan_mac=$(macaddr_setbit_la "$wan_mac") ;; - friendlyarm,nanopi-r5c) + friendlyarm,nanopi-r5c|\ + friendlyarm,nanopi-r6s) wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*) 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 8bbce1c328..5716aaf496 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 @@ -49,7 +49,8 @@ sinovoip,rk3568-bpi-r2pro) set_interface_core 2 "eth0" set_interface_core 4 "eth1" ;; -friendlyarm,nanopi-r5s) +friendlyarm,nanopi-r5s|\ +friendlyarm,nanopi-r6s) set_interface_core 2 "eth0" set_interface_core 4 "eth1" set_interface_core 8 "eth2" From 81481c805aa56f6452d7e7577d42eb6b89a6869d Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Mon, 29 Jul 2024 14:40:46 +0200 Subject: [PATCH 14/31] generic: 6.6: add Winbond W25N01KV support It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV SPI-NAND which is not supported in OpenWrt nor upstream kernel. So, add a pending patch to support it as upstream supports rest of the KV revision models. Fixes: #16002 Link: https://github.com/openwrt/openwrt/pull/16088 Signed-off-by: Robert Marko --- ...and-winbond-add-support-for-W25N01KV.patch | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 target/linux/generic/pending-6.6/489-mtd-spinand-winbond-add-support-for-W25N01KV.patch diff --git a/target/linux/generic/pending-6.6/489-mtd-spinand-winbond-add-support-for-W25N01KV.patch b/target/linux/generic/pending-6.6/489-mtd-spinand-winbond-add-support-for-W25N01KV.patch new file mode 100644 index 0000000000..78498af1ce --- /dev/null +++ b/target/linux/generic/pending-6.6/489-mtd-spinand-winbond-add-support-for-W25N01KV.patch @@ -0,0 +1,63 @@ +From 446daf20b0a6790751459cdde0ff9fc8813e54d1 Mon Sep 17 00:00:00 2001 +From: Robert Marko +Date: Mon, 29 Jul 2024 14:09:16 +0200 +Subject: [PATCH] mtd: spinand: winbond: add support for W25N01KV + +Add support for Winbond W25N01KV 1Gbit SPI-NAND. + +It has 4-bit on-die ECC. + +Signed-off-by: Robert Marko +--- + drivers/mtd/nand/spi/winbond.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +--- a/drivers/mtd/nand/spi/winbond.c ++++ b/drivers/mtd/nand/spi/winbond.c +@@ -74,6 +74,18 @@ static int w25m02gv_select_target(struct + return spi_mem_exec_op(spinand->spimem, &op); + } + ++static int w25n01kv_ooblayout_ecc(struct mtd_info *mtd, int section, ++ struct mtd_oob_region *region) ++{ ++ if (section > 3) ++ return -ERANGE; ++ ++ region->offset = 64 + (8 * section); ++ region->length = 7; ++ ++ return 0; ++} ++ + static int w25n02kv_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *region) + { +@@ -98,6 +110,11 @@ static int w25n02kv_ooblayout_free(struc + return 0; + } + ++static const struct mtd_ooblayout_ops w25n01kv_ooblayout = { ++ .ecc = w25n01kv_ooblayout_ecc, ++ .free = w25n02kv_ooblayout_free, ++}; ++ + static const struct mtd_ooblayout_ops w25n02kv_ooblayout = { + .ecc = w25n02kv_ooblayout_ecc, + .free = w25n02kv_ooblayout_free, +@@ -160,6 +177,15 @@ static const struct spinand_info winbond + &update_cache_variants), + 0, + SPINAND_ECCINFO(&w25m02gv_ooblayout, NULL)), ++ SPINAND_INFO("W25N01KV", ++ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xae, 0x21), ++ NAND_MEMORG(1, 2048, 96, 64, 1024, 20, 1, 1, 1), ++ NAND_ECCREQ(4, 512), ++ SPINAND_INFO_OP_VARIANTS(&read_cache_variants, ++ &write_cache_variants, ++ &update_cache_variants), ++ 0, ++ SPINAND_ECCINFO(&w25n01kv_ooblayout, w25n02kv_ecc_get_status)), + SPINAND_INFO("W25N02KV", + SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xaa, 0x22), + NAND_MEMORG(1, 2048, 128, 64, 2048, 40, 1, 1, 1), From c22ba7544eaa556bee92725d6ec13061247d25ad Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 11 Aug 2024 23:18:53 +0100 Subject: [PATCH 15/31] arm-trusted-firmware-mediatek: fix NAND read failure on SNFI A bug has plagued bl2 which caused failure to boot and bricked Linksys E8450 and Belkin RT3200 devices in case of correctable bitflips being detected during a read operation. A simple logic error resulted in read to be considered errornous instead of just continueing in case of correctable bitflips. Address this by importing a patch fixing that logic error. The issue, which has been dubbed as the "OpenWrt Kiss of Death", and is now a thing of the past. Users should preemptively update bl2 to prevent their devices being at risk. Link: https://github.com/mtk-openwrt/arm-trusted-firmware/pull/11 Signed-off-by: Daniel Golle --- .../arm-trusted-firmware-mediatek/Makefile | 2 +- ...ek-snfi-fix-return-code-when-reading.patch | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 package/boot/arm-trusted-firmware-mediatek/patches/0004-mediatek-snfi-fix-return-code-when-reading.patch diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index d8eef07f5e..91be884757 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=arm-trusted-firmware-mediatek -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git diff --git a/package/boot/arm-trusted-firmware-mediatek/patches/0004-mediatek-snfi-fix-return-code-when-reading.patch b/package/boot/arm-trusted-firmware-mediatek/patches/0004-mediatek-snfi-fix-return-code-when-reading.patch new file mode 100644 index 0000000000..857ecd0595 --- /dev/null +++ b/package/boot/arm-trusted-firmware-mediatek/patches/0004-mediatek-snfi-fix-return-code-when-reading.patch @@ -0,0 +1,27 @@ +From 94802b344195d3574701ca6ab5122f6b7615a6eb Mon Sep 17 00:00:00 2001 +From: Daniel Golle +Date: Sun, 11 Aug 2024 23:12:33 +0100 +Subject: [PATCH] mediatek: snfi: fix return code when reading + +Return 0 on succesful read, which may contain correctable bitflips. + +Fixes: #10 +Signed-off-by: Daniel Golle +--- + plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c ++++ b/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c +@@ -29,8 +29,10 @@ static int snfi_mtd_read_page(struct nan + int ret; + + ret = mtk_snand_read_page(snf, addr, (void *)buffer, NULL, false); +- if (ret == -EBADMSG) ++ if (ret > 0) { ++ NOTICE("corrected %d bitflips while reading page %u\n", ret, page); + ret = 0; ++ } + + return ret; + } From 1554af4c4380504eb1b37a100e56ecae749a67d5 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Mon, 12 Aug 2024 03:06:14 +0100 Subject: [PATCH 16/31] generic: import patch lowering bitflip_threshold on SPI-NAND Reporting an unclean read from SPI-NAND only when the maximum number of correctable bitflip errors has been hit seems a bit late. UBI LEB scrubbing, which depends on the lower MTD device reporting correctable bitflips, then only kicks in when it's almost too late. Set bitflip_threshold to 75% of the ECC strength, which is also the default for raw NAND. Signed-off-by: Daniel Golle --- ...flip_threshold-to-75-of-ECC-strength.patch | 63 +++++++++++++++++++ .../330-snand-mtk-bmt-support.patch | 6 +- 2 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 target/linux/generic/pending-6.6/410-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-strength.patch diff --git a/target/linux/generic/pending-6.6/410-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-strength.patch b/target/linux/generic/pending-6.6/410-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-strength.patch new file mode 100644 index 0000000000..aeac79c023 --- /dev/null +++ b/target/linux/generic/pending-6.6/410-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-strength.patch @@ -0,0 +1,63 @@ +From patchwork Mon Aug 12 01:56:41 2024 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +X-Patchwork-Submitter: Daniel Golle +X-Patchwork-Id: 1971406 +Return-Path: + +X-Original-To: incoming@patchwork.ozlabs.org +Delivered-To: patchwork-incoming@legolas.ozlabs.org +Date: Mon, 12 Aug 2024 02:56:41 +0100 +From: Daniel Golle +To: Miquel Raynal , + Richard Weinberger , + Vignesh Raghavendra , + Tudor Ambarus , + Daniel Golle , + Mika Westerberg , + Chia-Lin Kao , + Martin Kurbanov , + linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org +Subject: [PATCH] mtd: spinand: set bitflip_threshold to 75% of ECC strength +Message-ID: + <2117e387260b0a96f95b8e1652ff79e0e2d71d53.1723427450.git.daniel@makrotopia.org> +MIME-Version: 1.0 +Content-Disposition: inline +X-BeenThere: linux-mtd@lists.infradead.org +X-Mailman-Version: 2.1.34 +Precedence: list +List-Id: Linux MTD discussion mailing list +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +Sender: "linux-mtd" +Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org + +Reporting an unclean read from SPI-NAND only when the maximum number +of correctable bitflip errors has been hit seems a bit late. +UBI LEB scrubbing, which depends on the lower MTD device reporting +correctable bitflips, then only kicks in when it's almost too late. + +Set bitflip_threshold to 75% of the ECC strength, which is also the +default for raw NAND. + +Signed-off-by: Daniel Golle +--- + drivers/mtd/nand/spi/core.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/mtd/nand/spi/core.c ++++ b/drivers/mtd/nand/spi/core.c +@@ -1286,6 +1286,7 @@ static int spinand_init(struct spinand_d + /* Propagate ECC information to mtd_info */ + mtd->ecc_strength = nanddev_get_ecc_conf(nand)->strength; + mtd->ecc_step_size = nanddev_get_ecc_conf(nand)->step_size; ++ mtd->bitflip_threshold = DIV_ROUND_UP(mtd->ecc_strength * 3, 4); + + ret = spinand_create_dirmaps(spinand); + if (ret) { diff --git a/target/linux/mediatek/patches-6.6/330-snand-mtk-bmt-support.patch b/target/linux/mediatek/patches-6.6/330-snand-mtk-bmt-support.patch index 8a4ec2bcbd..de8e880643 100644 --- a/target/linux/mediatek/patches-6.6/330-snand-mtk-bmt-support.patch +++ b/target/linux/mediatek/patches-6.6/330-snand-mtk-bmt-support.patch @@ -8,7 +8,7 @@ static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) { -@@ -1345,6 +1346,7 @@ static int spinand_probe(struct spi_mem +@@ -1346,6 +1347,7 @@ static int spinand_probe(struct spi_mem if (ret) return ret; @@ -16,7 +16,7 @@ ret = mtd_device_register(mtd, NULL, 0); if (ret) goto err_spinand_cleanup; -@@ -1352,6 +1354,7 @@ static int spinand_probe(struct spi_mem +@@ -1353,6 +1355,7 @@ static int spinand_probe(struct spi_mem return 0; err_spinand_cleanup: @@ -24,7 +24,7 @@ spinand_cleanup(spinand); return ret; -@@ -1370,6 +1373,7 @@ static int spinand_remove(struct spi_mem +@@ -1371,6 +1374,7 @@ static int spinand_remove(struct spi_mem if (ret) return ret; From 8cf9a932fa7cebbfad1e9fab0ea633482adb8436 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 11 Aug 2024 23:45:46 +0100 Subject: [PATCH 17/31] mediatek: add script to trigger scrubbing of FIP-in-UBI Read the 'fip' static volume in order to trigger scrubbing in case of detecting flipped bits while reading. We have to do this in Linux because we never read or touch the 'fip' volume and the UBISPL implementation in ARM TrustedFirmware-A does NOT handle scrubbing itself. Signed-off-by: Daniel Golle --- .../lib/preinit/07_trigger_fip_scrubbing | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 target/linux/mediatek/base-files/lib/preinit/07_trigger_fip_scrubbing diff --git a/target/linux/mediatek/base-files/lib/preinit/07_trigger_fip_scrubbing b/target/linux/mediatek/base-files/lib/preinit/07_trigger_fip_scrubbing new file mode 100644 index 0000000000..74458e075b --- /dev/null +++ b/target/linux/mediatek/base-files/lib/preinit/07_trigger_fip_scrubbing @@ -0,0 +1,16 @@ +#!/bin/sh + +trigger_fip_scrubbing() { + local vol voltype volname + for vol in /sys/class/ubi/ubi*_*; do + [ -e "$vol" ] || continue + voltype="$(cat "$vol"/type)" + volname="$(cat "$vol"/name)" + if [ "$voltype" = "static" ] && [ "$volname" = "fip" ]; then + cat "/dev/${vol##*/}" > /dev/null + break + fi + done +} + +boot_hook_add preinit_main trigger_fip_scrubbing From 9f8599aebe588ba247844ac6b937c97b6fc00994 Mon Sep 17 00:00:00 2001 From: Zheng Zhang Date: Sat, 10 Aug 2024 19:52:15 +0800 Subject: [PATCH 18/31] mediatek: fix a use-after-free kernel panic in wed code Fix a use-after-free bug in mtk_wed_setup_tc_block_cb() which leads to kernel panic when setup multiple ap interfaces on one band of mt798x. Signed-off-by: Zheng Zhang Link: https://github.com/openwrt/openwrt/pull/16118 Signed-off-by: Robert Marko --- ..._wed-fix-use-after-free-panic-in-mtk.patch | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 target/linux/mediatek/patches-6.6/951-net-ethernet-mtk_wed-fix-use-after-free-panic-in-mtk.patch diff --git a/target/linux/mediatek/patches-6.6/951-net-ethernet-mtk_wed-fix-use-after-free-panic-in-mtk.patch b/target/linux/mediatek/patches-6.6/951-net-ethernet-mtk_wed-fix-use-after-free-panic-in-mtk.patch new file mode 100644 index 0000000000..1647b056e0 --- /dev/null +++ b/target/linux/mediatek/patches-6.6/951-net-ethernet-mtk_wed-fix-use-after-free-panic-in-mtk.patch @@ -0,0 +1,59 @@ +From 3da41fe88ff52c578f3155550bcbe0ecf388f079 Mon Sep 17 00:00:00 2001 +From: Zheng Zhang +Date: Sat, 10 Aug 2024 12:01:56 +0800 +Subject: [PATCH] net: ethernet: mtk_wed: fix use-after-free panic in + mtk_wed_setup_tc_block_cb() + +When there are multiple ap interfaces on one band and with WED on, +turning the interface down will cause a kernel panic on MT798X. + +Previously, cb_priv was freed in mtk_wed_setup_tc_block() without +marking NULL,and mtk_wed_setup_tc_block_cb() didn't check the value, too. + +Assign NULL after free cb_priv in mtk_wed_setup_tc_block() and check NULL +in mtk_wed_setup_tc_block_cb(). + +---------- +Unable to handle kernel paging request at virtual address 0072460bca32b4f5 +Call trace: + mtk_wed_setup_tc_block_cb+0x4/0x38 + 0xffffffc0794084bc + tcf_block_playback_offloads+0x70/0x1e8 + tcf_block_unbind+0x6c/0xc8 +... +--------- + +Fixes: 799684448e3e ("net: ethernet: mtk_wed: introduce wed wo support") +Signed-off-by: Zheng Zhang +--- + drivers/net/ethernet/mediatek/mtk_wed.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/net/ethernet/mediatek/mtk_wed.c ++++ b/drivers/net/ethernet/mediatek/mtk_wed.c +@@ -2685,14 +2685,15 @@ mtk_wed_setup_tc_block_cb(enum tc_setup_ + { + struct mtk_wed_flow_block_priv *priv = cb_priv; + struct flow_cls_offload *cls = type_data; +- struct mtk_wed_hw *hw = priv->hw; ++ struct mtk_wed_hw *hw = NULL; + +- if (!tc_can_offload(priv->dev)) ++ if (!priv || !tc_can_offload(priv->dev)) + return -EOPNOTSUPP; + + if (type != TC_SETUP_CLSFLOWER) + return -EOPNOTSUPP; + ++ hw = priv->hw; + return mtk_flow_offload_cmd(hw->eth, cls, hw->index); + } + +@@ -2748,6 +2749,7 @@ mtk_wed_setup_tc_block(struct mtk_wed_hw + flow_block_cb_remove(block_cb, f); + list_del(&block_cb->driver_list); + kfree(block_cb->cb_priv); ++ block_cb->cb_priv = NULL; + } + return 0; + default: From 11403697c9d36cc014cc408b6d0f14e5a74a17f9 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 10 Aug 2024 18:05:28 -0700 Subject: [PATCH 19/31] ramips: mt7621_nand: use clk_get_optional_enabled Simplifies the code by removing clk_disable_unprepare. Also removed gotos and used dev_err_probe. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16133 Signed-off-by: Robert Marko --- .../files/drivers/mtd/nand/raw/mt7621_nand.c | 39 ++++++------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/target/linux/ramips/files/drivers/mtd/nand/raw/mt7621_nand.c b/target/linux/ramips/files/drivers/mtd/nand/raw/mt7621_nand.c index 89cc7e2624..880c8578bd 100644 --- a/target/linux/ramips/files/drivers/mtd/nand/raw/mt7621_nand.c +++ b/target/linux/ramips/files/drivers/mtd/nand/raw/mt7621_nand.c @@ -1290,44 +1290,28 @@ static int mt7621_nfc_probe(struct platform_device *pdev) res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nfi"); nfc->nfi_base = res->start; nfc->nfi_regs = devm_ioremap_resource(dev, res); - if (IS_ERR(nfc->nfi_regs)) { - ret = PTR_ERR(nfc->nfi_regs); - return ret; - } + if (IS_ERR(nfc->nfi_regs)) + return PTR_ERR(nfc->nfi_regs); res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ecc"); nfc->ecc_regs = devm_ioremap_resource(dev, res); - if (IS_ERR(nfc->ecc_regs)) { - ret = PTR_ERR(nfc->ecc_regs); - return ret; - } + if (IS_ERR(nfc->ecc_regs)) + return PTR_ERR(nfc->ecc_regs); - nfc->nfi_clk = devm_clk_get(dev, "nfi_clk"); - if (IS_ERR(nfc->nfi_clk)) { + nfc->nfi_clk = devm_clk_get_optional_enabled(dev, "nfi_clk"); + if (IS_ERR(nfc->nfi_clk)) + return PTR_ERR(nfc->nfi_clk); + + if (!nfc->nfi_clk) dev_warn(dev, "nfi clk not provided\n"); - nfc->nfi_clk = NULL; - } else { - ret = clk_prepare_enable(nfc->nfi_clk); - if (ret) { - dev_err(dev, "Failed to enable nfi core clock\n"); - return ret; - } - } platform_set_drvdata(pdev, nfc); ret = mt7621_nfc_init_chip(nfc); - if (ret) { - dev_err(dev, "Failed to initialize nand chip\n"); - goto clk_disable; - } + if (ret) + return dev_err_probe(dev, ret, "Failed to initialize nand chip\n"); return 0; - -clk_disable: - clk_disable_unprepare(nfc->nfi_clk); - - return ret; } static int mt7621_nfc_remove(struct platform_device *pdev) @@ -1339,7 +1323,6 @@ static int mt7621_nfc_remove(struct platform_device *pdev) mtk_bmt_detach(mtd); mtd_device_unregister(mtd); nand_cleanup(nand); - clk_disable_unprepare(nfc->nfi_clk); return 0; } From 74bf11570f80dd3a1f95c126d7bd526ee6d5b964 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 11 Aug 2024 18:14:12 +0100 Subject: [PATCH 20/31] base-files: get rid of forgotten traces of fitblk_get_bootdev The function fitblk_get_bootdev doesn't exist any more, using it in export_bootdevice anyway never made much sense and only worked for classic block devices. Just drop /dev/fit* handling there, it isn't needed anywhere. Signed-off-by: Daniel Golle --- package/base-files/files/lib/upgrade/common.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh index 718907a711..af1182cb16 100644 --- a/package/base-files/files/lib/upgrade/common.sh +++ b/package/base-files/files/lib/upgrade/common.sh @@ -196,7 +196,6 @@ export_bootdevice() { done ;; /dev/*) - [ "$rootpart" = "/dev/fit0" ] && rootpart="$(fitblk_get_bootdev)" uevent="/sys/class/block/${rootpart##*/}/../uevent" ;; 0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \ From 0308b254d1fad4048dd15ec5b2136392b7b08c20 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sun, 11 Aug 2024 18:14:40 +0100 Subject: [PATCH 21/31] mediatek: mt7623: get rid of fitblk_get_bootdev Also migrate mt7623 to new fitblk support scripts which simplify sysupgrade when using uImage.FIT. This had been forgotten previously. Fixes: 4448d6325f ("mediatek: make use of common uImage.FIT upgrade functions") Signed-off-by: Daniel Golle --- .../mediatek/mt7623/base-files/lib/upgrade/platform.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh index 9cfb15cf3d..bce6709a58 100755 --- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh @@ -1,4 +1,5 @@ REQUIRE_IMAGE_METADATA=1 +RAMFS_COPY_BIN='fitblk' # Legacy full system upgrade including preloader for MediaTek SoCs on eMMC or SD legacy_mtk_mmc_full_upgrade() { @@ -83,11 +84,7 @@ platform_do_upgrade() { case "$board" in bananapi,bpi-r2|\ unielec,u7623-02) - [ -e /dev/fit0 ] && fitblk /dev/fit0 - [ -e /dev/fitrw ] && fitblk /dev/fitrw - bootdev="$(fitblk_get_bootdev)" - EMMC_KERN_DEV="/dev/$bootdev" - emmc_do_upgrade "$1" + fit_do_upgrade "$1" ;; unielec,u7623-02-emmc-512m) local magic="$(get_magic_long "$1")" From 879ee70ea4e1093c39d7001d949ec086f5a2f47a Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Tue, 30 Jul 2024 19:17:31 +0300 Subject: [PATCH 22/31] ath10k-ct: bump to version 6.9 Use ath10k-ct 6.9 to better match mac80211 backports 6.9.x Drop patch 010 that is merged upstream. Add patch 001 to fix version to 6.9 (overlooked by upstream). Refresh patches. Signed-off-by: Hannu Nyman Link: https://github.com/openwrt/openwrt/pull/16036 Signed-off-by: Robert Marko --- package/kernel/ath10k-ct/Makefile | 10 +- .../ath10k-ct/patches/001-patch-version.patch | 11 ++ .../patches/010-mac80211_backport.patch | 35 ----- ...k-read-qcom-coexist-support-as-a-u32.patch | 6 +- ...LED-and-GPIO-controlling-support-for.patch | 138 +++++++++--------- ...02-ath10k-use-tpt-trigger-by-default.patch | 16 +- .../300-fix-fortify-checking-error.patch | 6 +- ...0-0010-ath10k-limit-htt-rx-ring-size.patch | 6 +- ...60-0011-ath10k-limit-pci-buffer-size.patch | 12 +- ...k-always-use-mac80211-loss-detection.patch | 8 +- 10 files changed, 112 insertions(+), 136 deletions(-) create mode 100644 package/kernel/ath10k-ct/patches/001-patch-version.patch delete mode 100644 package/kernel/ath10k-ct/patches/010-mac80211_backport.patch diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile index 53d9eec1ea..bd18930801 100644 --- a/package/kernel/ath10k-ct/Makefile +++ b/package/kernel/ath10k-ct/Makefile @@ -8,14 +8,14 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2024-03-03 -PKG_SOURCE_VERSION:=eb3f488a200fafc46140fd51b5e21f737ee50f24 -PKG_MIRROR_HASH:=368ed648dc7239dbcac3c6ba09be92c4b706118052d35e058cf5d1dae2917039 +PKG_SOURCE_DATE:=2024-07-30 +PKG_SOURCE_VERSION:=ac71b14dc93aef0af6f0f24808b0afb673eaa5f5 +PKG_MIRROR_HASH:=f7774fc7002bbea450f543927acd528fb1bb6742f0e9ef28a402df3796893d93 -# Build the 6.7 ath10k-ct driver version. +# Build the 6.9 ath10k-ct driver version. # Probably this should match as closely as # possible to whatever mac80211 backports version is being used. -CT_KVER="-6.7" +CT_KVER="-6.9" PKG_MAINTAINER:=Ben Greear PKG_BUILD_PARALLEL:=1 diff --git a/package/kernel/ath10k-ct/patches/001-patch-version.patch b/package/kernel/ath10k-ct/patches/001-patch-version.patch new file mode 100644 index 0000000000..e5ae723cf1 --- /dev/null +++ b/package/kernel/ath10k-ct/patches/001-patch-version.patch @@ -0,0 +1,11 @@ +--- a/ath10k-6.9/pci.c ++++ b/ath10k-6.9/pci.c +@@ -3871,7 +3871,7 @@ static int __ath10k_pci_probe(struct pci + int (*pci_hard_reset)(struct ath10k *ar); + u32 (*targ_cpu_to_ce_addr)(struct ath10k *ar, u32 addr); + +- printk(KERN_INFO "ath10k 6.7 driver, optimized for CT firmware, probing pci device: 0x%x.\n", ++ printk(KERN_INFO "ath10k 6.9 driver, optimized for CT firmware, probing pci device: 0x%x.\n", + pci_dev->device); + + switch (pci_dev->device) { diff --git a/package/kernel/ath10k-ct/patches/010-mac80211_backport.patch b/package/kernel/ath10k-ct/patches/010-mac80211_backport.patch deleted file mode 100644 index 6c9cfdf730..0000000000 --- a/package/kernel/ath10k-ct/patches/010-mac80211_backport.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/ath10k-6.7/mac.c -+++ b/ath10k-6.7/mac.c -@@ -2304,8 +2304,8 @@ static void ath10k_mac_vif_ap_csa_count_ - if (!arvif->is_up) - return; - -- if (!ieee80211_beacon_cntdwn_is_complete(vif)) { -- ieee80211_beacon_update_cntdwn(vif); -+ if (!ieee80211_beacon_cntdwn_is_complete(vif, 0)) { -+ ieee80211_beacon_update_cntdwn(vif, 0); - - ret = ath10k_mac_setup_bcn_tmpl(arvif); - if (ret) -@@ -2317,7 +2317,7 @@ static void ath10k_mac_vif_ap_csa_count_ - ath10k_warn(ar, "failed to update prb tmpl during csa: %d\n", - ret); - } else { -- ieee80211_csa_finish(vif); -+ ieee80211_csa_finish(vif, 0); - } - } - ---- a/ath10k-6.7/wmi.c -+++ b/ath10k-6.7/wmi.c -@@ -4292,8 +4292,8 @@ void ath10k_wmi_event_host_swba(struct a - * actual channel switch is done - */ - if (arvif->vif->bss_conf.csa_active && -- ieee80211_beacon_cntdwn_is_complete(arvif->vif)) { -- ieee80211_csa_finish(arvif->vif); -+ ieee80211_beacon_cntdwn_is_complete(arvif->vif, 0)) { -+ ieee80211_csa_finish(arvif->vif, 0); - continue; - } - diff --git a/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch b/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch index f5fc3b2ec8..b15bfdde6a 100644 --- a/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch +++ b/package/kernel/ath10k-ct/patches/130-ath10k-read-qcom-coexist-support-as-a-u32.patch @@ -39,9 +39,9 @@ that the feature is properly initialized: Signed-off-by: Vincent Tremblay ---- a/ath10k-6.7/core.c -+++ b/ath10k-6.7/core.c -@@ -2869,14 +2869,14 @@ done: +--- a/ath10k-6.9/core.c ++++ b/ath10k-6.9/core.c +@@ -2889,14 +2889,14 @@ done: static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar) { struct device_node *node; diff --git a/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch b/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch index 701fbb9e6f..ba9372f9f0 100644 --- a/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch +++ b/package/kernel/ath10k-ct/patches/201-wifi-ath10k-add-LED-and-GPIO-controlling-support-for.patch @@ -20,25 +20,25 @@ Tested-by: Stefan Lippers-Hollmann Signed-off-by: Kalle Valo Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com --- - ath10k-6.7/Kconfig | 6 ++ - ath10k-6.7/Makefile | 1 + - ath10k-6.7/core.c | 32 ++++++++ - ath10k-6.7/core.h | 8 ++ - ath10k-6.7/hw.h | 1 + - ath10k-6.7/leds.c | 90 +++++++++++++++++++++++ - ath10k-6.7/leds.h | 34 +++++++++ - ath10k-6.7/mac.c | 1 + - ath10k-6.7/wmi-ops.h | 32 ++++++++ - ath10k-6.7/wmi-tlv.c | 2 + - ath10k-6.7/wmi.c | 54 ++++++++++++++ - ath10k-6.7/wmi.h | 35 +++++++++ + ath10k-6.9/Kconfig | 6 ++ + ath10k-6.9/Makefile | 1 + + ath10k-6.9/core.c | 32 ++++++++ + ath10k-6.9/core.h | 8 ++ + ath10k-6.9/hw.h | 1 + + ath10k-6.9/leds.c | 90 +++++++++++++++++++++++ + ath10k-6.9/leds.h | 34 +++++++++ + ath10k-6.9/mac.c | 1 + + ath10k-6.9/wmi-ops.h | 32 ++++++++ + ath10k-6.9/wmi-tlv.c | 2 + + ath10k-6.9/wmi.c | 54 ++++++++++++++ + ath10k-6.9/wmi.h | 35 +++++++++ 12 files changed, 296 insertions(+) - create mode 100644 ath10k-6.7/leds.c - create mode 100644 ath10k-6.7/leds.h + create mode 100644 ath10k-6.9/leds.c + create mode 100644 ath10k-6.9/leds.h ---- a/ath10k-6.7/Kconfig -+++ b/ath10k-6.7/Kconfig -@@ -67,6 +67,12 @@ config ATH10K_DEBUGFS +--- a/ath10k-6.9/Kconfig ++++ b/ath10k-6.9/Kconfig +@@ -68,6 +68,12 @@ config ATH10K_DEBUGFS If unsure, say Y to make it easier to debug problems. @@ -51,8 +51,8 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com config ATH10K_SPECTRAL bool "Atheros ath10k spectral scan support" depends on ATH10K_DEBUGFS ---- a/ath10k-6.7/Makefile -+++ b/ath10k-6.7/Makefile +--- a/ath10k-6.9/Makefile ++++ b/ath10k-6.9/Makefile @@ -20,6 +20,7 @@ ath10k_core-$(CONFIG_ATH10K_SPECTRAL) += ath10k_core-$(CONFIG_NL80211_TESTMODE) += testmode.o ath10k_core-$(CONFIG_ATH10K_TRACING) += trace.o @@ -61,9 +61,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com ath10k_core-$(CONFIG_MAC80211_DEBUGFS) += debugfs_sta.o ath10k_core-$(CONFIG_PM) += wow.o ath10k_core-$(CONFIG_ATH10K_CE) += ce.o ---- a/ath10k-6.7/core.c -+++ b/ath10k-6.7/core.c -@@ -28,6 +28,7 @@ +--- a/ath10k-6.9/core.c ++++ b/ath10k-6.9/core.c +@@ -29,6 +29,7 @@ #include "testmode.h" #include "wmi-ops.h" #include "coredump.h" @@ -71,7 +71,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* Disable ath10k-ct DBGLOG output by default */ unsigned int ath10k_debug_mask = ATH10K_DBG_NO_DBGLOG; -@@ -80,6 +81,7 @@ static const struct ath10k_hw_params ath +@@ -81,6 +82,7 @@ static const struct ath10k_hw_params ath .name = "qca988x hw2.0", .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -79,7 +79,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, .otp_exe_param = 0, .channel_counters_freq_hz = 88000, -@@ -120,6 +122,7 @@ static const struct ath10k_hw_params ath +@@ -122,6 +124,7 @@ static const struct ath10k_hw_params ath .name = "qca988x hw2.0 ubiquiti", .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -87,7 +87,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, .otp_exe_param = 0, .channel_counters_freq_hz = 88000, -@@ -161,6 +164,7 @@ static const struct ath10k_hw_params ath +@@ -164,6 +167,7 @@ static const struct ath10k_hw_params ath .name = "qca9887 hw1.0", .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -95,7 +95,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, .otp_exe_param = 0, .channel_counters_freq_hz = 88000, -@@ -202,6 +206,7 @@ static const struct ath10k_hw_params ath +@@ -206,6 +210,7 @@ static const struct ath10k_hw_params ath .name = "qca6174 hw3.2 sdio", .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, .uart_pin = 19, @@ -103,7 +103,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -238,6 +243,7 @@ static const struct ath10k_hw_params ath +@@ -243,6 +248,7 @@ static const struct ath10k_hw_params ath .name = "qca6164 hw2.1", .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -111,7 +111,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -278,6 +284,7 @@ static const struct ath10k_hw_params ath +@@ -284,6 +290,7 @@ static const struct ath10k_hw_params ath .name = "qca6174 hw2.1", .patch_load_addr = QCA6174_HW_2_1_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -119,7 +119,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -318,6 +325,7 @@ static const struct ath10k_hw_params ath +@@ -325,6 +332,7 @@ static const struct ath10k_hw_params ath .name = "qca6174 hw3.0", .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -127,7 +127,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -358,6 +366,7 @@ static const struct ath10k_hw_params ath +@@ -366,6 +374,7 @@ static const struct ath10k_hw_params ath .name = "qca6174 hw3.2", .patch_load_addr = QCA6174_HW_3_0_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -135,7 +135,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -402,6 +411,7 @@ static const struct ath10k_hw_params ath +@@ -411,6 +420,7 @@ static const struct ath10k_hw_params ath .name = "qca99x0 hw2.0", .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -143,7 +143,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0x00000700, .continuous_frag_desc = true, .cck_rate_map_rev2 = true, -@@ -448,6 +458,7 @@ static const struct ath10k_hw_params ath +@@ -458,6 +468,7 @@ static const struct ath10k_hw_params ath .name = "qca9984/qca9994 hw1.0", .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -151,7 +151,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, .otp_exe_param = 0x00000700, .continuous_frag_desc = true, -@@ -501,6 +512,7 @@ static const struct ath10k_hw_params ath +@@ -512,6 +523,7 @@ static const struct ath10k_hw_params ath .name = "qca9888 hw2.0", .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -159,7 +159,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, .otp_exe_param = 0x00000700, .continuous_frag_desc = true, -@@ -551,6 +563,7 @@ static const struct ath10k_hw_params ath +@@ -563,6 +575,7 @@ static const struct ath10k_hw_params ath .name = "qca9377 hw1.0", .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -167,7 +167,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -591,6 +604,7 @@ static const struct ath10k_hw_params ath +@@ -604,6 +617,7 @@ static const struct ath10k_hw_params ath .name = "qca9377 hw1.1", .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 6, @@ -175,7 +175,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -633,6 +647,7 @@ static const struct ath10k_hw_params ath +@@ -647,6 +661,7 @@ static const struct ath10k_hw_params ath .name = "qca9377 hw1.1 sdio", .patch_load_addr = QCA9377_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 19, @@ -183,7 +183,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .otp_exe_param = 0, .channel_counters_freq_hz = 88000, .max_probe_resp_desc_thres = 0, -@@ -666,6 +681,7 @@ static const struct ath10k_hw_params ath +@@ -681,6 +696,7 @@ static const struct ath10k_hw_params ath .name = "qca4019 hw1.0", .patch_load_addr = QCA4019_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, @@ -191,7 +191,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, .otp_exe_param = 0x0010000, .continuous_frag_desc = true, -@@ -711,6 +727,7 @@ static const struct ath10k_hw_params ath +@@ -727,6 +743,7 @@ static const struct ath10k_hw_params ath .dev_id = 0, .bus = ATH10K_BUS_SNOC, .name = "wcn3990 hw1.0", @@ -199,7 +199,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com .continuous_frag_desc = true, .tx_chain_mask = 0x7, .rx_chain_mask = 0x7, -@@ -4071,6 +4088,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -4091,6 +4108,10 @@ int ath10k_core_start(struct ath10k *ar, ath10k_wmi_check_apply_board_power_ctl_table(ar); } @@ -210,7 +210,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com return 0; err_hif_stop: -@@ -4332,9 +4353,18 @@ static void ath10k_core_register_work(st +@@ -4352,9 +4373,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -229,7 +229,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -4394,6 +4424,8 @@ void ath10k_core_unregister(struct ath10 +@@ -4414,6 +4444,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -238,9 +238,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com ath10k_thermal_unregister(ar); /* Stop spectral before unregistering from mac80211 to remove the * relayfs debugfs file cleanly. Otherwise the parent debugfs tree ---- a/ath10k-6.7/core.h -+++ b/ath10k-6.7/core.h -@@ -14,6 +14,7 @@ +--- a/ath10k-6.9/core.h ++++ b/ath10k-6.9/core.h +@@ -15,6 +15,7 @@ #include #include #include @@ -248,7 +248,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com #include "htt.h" #include "htc.h" -@@ -1589,6 +1590,13 @@ struct ath10k { +@@ -1590,6 +1591,13 @@ struct ath10k { } testmode; struct { @@ -262,9 +262,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* protected by data_lock */ u32 rx_crc_err_drop; u32 fw_crash_counter; ---- a/ath10k-6.7/hw.h -+++ b/ath10k-6.7/hw.h -@@ -523,6 +523,7 @@ struct ath10k_hw_params { +--- a/ath10k-6.9/hw.h ++++ b/ath10k-6.9/hw.h +@@ -525,6 +525,7 @@ struct ath10k_hw_params { const char *name; u32 patch_load_addr; int uart_pin; @@ -273,7 +273,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* Type of hw cycle counter wraparound logic, for more info --- /dev/null -+++ b/ath10k-6.7/leds.c ++++ b/ath10k-6.9/leds.c @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: ISC +/* @@ -366,7 +366,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com +} + --- /dev/null -+++ b/ath10k-6.7/leds.h ++++ b/ath10k-6.9/leds.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: ISC */ +/* @@ -402,9 +402,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com + +#endif +#endif /* _LEDS_H_ */ ---- a/ath10k-6.7/mac.c -+++ b/ath10k-6.7/mac.c -@@ -25,6 +25,7 @@ +--- a/ath10k-6.9/mac.c ++++ b/ath10k-6.9/mac.c +@@ -26,6 +26,7 @@ #include "wmi-tlv.h" #include "wmi-ops.h" #include "wow.h" @@ -412,8 +412,8 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /*********/ /* Rates */ ---- a/ath10k-6.7/wmi-ops.h -+++ b/ath10k-6.7/wmi-ops.h +--- a/ath10k-6.9/wmi-ops.h ++++ b/ath10k-6.9/wmi-ops.h @@ -228,7 +228,10 @@ struct wmi_ops { const struct wmi_bb_timing_cfg_arg *arg); struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar, @@ -461,9 +461,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com static inline int ath10k_wmi_dbglog_cfg(struct ath10k *ar, u64 module_enable, u32 log_level) { ---- a/ath10k-6.7/wmi-tlv.c -+++ b/ath10k-6.7/wmi-tlv.c -@@ -4601,6 +4601,8 @@ static const struct wmi_ops wmi_tlv_ops +--- a/ath10k-6.9/wmi-tlv.c ++++ b/ath10k-6.9/wmi-tlv.c +@@ -4606,6 +4606,8 @@ static const struct wmi_ops wmi_tlv_ops .gen_echo = ath10k_wmi_tlv_op_gen_echo, .gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf, .gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable, @@ -472,9 +472,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com }; static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { ---- a/ath10k-6.7/wmi.c -+++ b/ath10k-6.7/wmi.c -@@ -8446,6 +8446,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +--- a/ath10k-6.9/wmi.c ++++ b/ath10k-6.9/wmi.c +@@ -8467,6 +8467,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -524,7 +524,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -10255,6 +10298,9 @@ static const struct wmi_ops wmi_ops = { +@@ -10274,6 +10317,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -534,7 +534,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10325,6 +10371,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -10344,6 +10390,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -543,7 +543,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10404,6 +10452,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -10423,6 +10471,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -552,7 +552,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -10475,6 +10525,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -10494,6 +10544,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -561,7 +561,7 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -10557,6 +10609,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -10576,6 +10628,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, @@ -570,9 +570,9 @@ Link: https://msgid.link/20230611080505.17393-1-ansuelsmth@gmail.com }; int ath10k_wmi_attach(struct ath10k *ar) ---- a/ath10k-6.7/wmi.h -+++ b/ath10k-6.7/wmi.h -@@ -3133,6 +3133,41 @@ enum wmi_10_4_feature_mask { +--- a/ath10k-6.9/wmi.h ++++ b/ath10k-6.9/wmi.h +@@ -3137,6 +3137,41 @@ enum wmi_10_4_feature_mask { }; diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch index 39b7f645d7..9bd07a24a6 100644 --- a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch @@ -14,9 +14,9 @@ Signed-off-by: Mathias Kresin ath10k-6.7/mac.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) ---- a/ath10k-6.7/core.h -+++ b/ath10k-6.7/core.h -@@ -1704,6 +1704,10 @@ struct ath10k { +--- a/ath10k-6.9/core.h ++++ b/ath10k-6.9/core.h +@@ -1705,6 +1705,10 @@ struct ath10k { u8 csi_data[4096]; u16 csi_data_len; @@ -27,8 +27,8 @@ Signed-off-by: Mathias Kresin /* must be last */ u8 drv_priv[] __aligned(sizeof(void *)); }; ---- a/ath10k-6.7/leds.c -+++ b/ath10k-6.7/leds.c +--- a/ath10k-6.9/leds.c ++++ b/ath10k-6.9/leds.c @@ -70,7 +70,7 @@ int ath10k_leds_register(struct ath10k * ar->leds.cdev.name = ar->leds.label; @@ -38,9 +38,9 @@ Signed-off-by: Mathias Kresin ret = led_classdev_register(wiphy_dev(ar->hw->wiphy), &ar->leds.cdev); if (ret) ---- a/ath10k-6.7/mac.c -+++ b/ath10k-6.7/mac.c -@@ -11622,7 +11622,7 @@ int ath10k_mac_register(struct ath10k *a +--- a/ath10k-6.9/mac.c ++++ b/ath10k-6.9/mac.c +@@ -11631,7 +11631,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/ath10k-ct/patches/300-fix-fortify-checking-error.patch b/package/kernel/ath10k-ct/patches/300-fix-fortify-checking-error.patch index 1797b16dcf..122716c24d 100644 --- a/package/kernel/ath10k-ct/patches/300-fix-fortify-checking-error.patch +++ b/package/kernel/ath10k-ct/patches/300-fix-fortify-checking-error.patch @@ -1,6 +1,6 @@ ---- a/ath10k-6.7/wmi.h -+++ b/ath10k-6.7/wmi.h -@@ -6341,7 +6341,7 @@ struct qca9880_set_ctl_table_cmd { +--- a/ath10k-6.9/wmi.h ++++ b/ath10k-6.9/wmi.h +@@ -6310,7 +6310,7 @@ struct qca9880_set_ctl_table_cmd { __le32 ctl_len; /* in bytes. This may be ignored in firmware, * make sure ctl_info data is sizeof(qca9880_power_ctl) */ /** ctl array (len adjusted to number of words) */ diff --git a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch index 5fb70ab5c7..c1de78de98 100644 --- a/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch +++ b/package/kernel/ath10k-ct/patches/960-0010-ath10k-limit-htt-rx-ring-size.patch @@ -1,6 +1,6 @@ ---- a/ath10k-6.7/htt.h -+++ b/ath10k-6.7/htt.h -@@ -237,7 +237,11 @@ enum htt_rx_ring_flags { +--- a/ath10k-6.9/htt.h ++++ b/ath10k-6.9/htt.h +@@ -238,7 +238,11 @@ enum htt_rx_ring_flags { }; #define HTT_RX_RING_SIZE_MIN 128 diff --git a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch index eceb66c3bb..3dcbda3715 100644 --- a/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch +++ b/package/kernel/ath10k-ct/patches/960-0011-ath10k-limit-pci-buffer-size.patch @@ -1,6 +1,6 @@ ---- a/ath10k-6.7/pci.c -+++ b/ath10k-6.7/pci.c -@@ -131,7 +131,11 @@ static const struct ce_attr pci_host_ce_ +--- a/ath10k-6.9/pci.c ++++ b/ath10k-6.9/pci.c +@@ -132,7 +132,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -12,7 +12,7 @@ .recv_cb = ath10k_pci_htt_htc_rx_cb, }, -@@ -140,7 +144,11 @@ static const struct ce_attr pci_host_ce_ +@@ -141,7 +145,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, @@ -24,7 +24,7 @@ .recv_cb = ath10k_pci_htc_rx_cb, }, -@@ -167,7 +175,11 @@ static const struct ce_attr pci_host_ce_ +@@ -168,7 +176,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 512, @@ -36,7 +36,7 @@ .recv_cb = ath10k_pci_htt_rx_cb, }, -@@ -192,7 +204,11 @@ static const struct ce_attr pci_host_ce_ +@@ -193,7 +205,11 @@ static const struct ce_attr pci_host_ce_ .flags = CE_ATTR_FLAGS, .src_nentries = 0, .src_sz_max = 2048, diff --git a/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch index 165f180388..974072fb9a 100644 --- a/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch +++ b/package/kernel/ath10k-ct/patches/988-ath10k-always-use-mac80211-loss-detection.patch @@ -13,12 +13,12 @@ own loss detection mechanism. Signed-off-by: David Bauer --- - ath10k-6.7/mac.c | 1 - + ath10k-6.9/mac.c | 1 - 1 file changed, 1 deletion(-) ---- a/ath10k-6.7/mac.c -+++ b/ath10k-6.7/mac.c -@@ -11311,7 +11311,6 @@ int ath10k_mac_register(struct ath10k *a +--- a/ath10k-6.9/mac.c ++++ b/ath10k-6.9/mac.c +@@ -11316,7 +11316,6 @@ int ath10k_mac_register(struct ath10k *a ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA); ieee80211_hw_set(ar->hw, QUEUE_CONTROL); ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); From a99484ef5824441a9a790fc73ecd1bf0bbde8e4c Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Wed, 7 Aug 2024 20:58:52 +0200 Subject: [PATCH 23/31] imx: use kernel 6.6 by default Switch to Linux kernel version 6.6. Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16107 Signed-off-by: Robert Marko --- target/linux/imx/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/imx/Makefile b/target/linux/imx/Makefile index 2d3f35e4b4..2eb12943c3 100644 --- a/target/linux/imx/Makefile +++ b/target/linux/imx/Makefile @@ -9,8 +9,7 @@ BOARDNAME:=NXP i.MX FEATURES:=audio display fpu gpio pcie rtc usb usbgadget squashfs targz nand ubifs boot-part rootfs-part SUBTARGETS:=cortexa7 cortexa9 cortexa53 -KERNEL_PATCHVER:=6.1 -KERNEL_TESTING_PATCHVER:=6.6 +KERNEL_PATCHVER:=6.6 include $(INCLUDE_DIR)/target.mk From 4d614f8d47c5998e5ce294c781d0c325f44efaa4 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Wed, 7 Aug 2024 21:01:22 +0200 Subject: [PATCH 24/31] imx: drop 6.1 support Drop config and files for Linux 6.1. Signed-off-by: Mieczyslaw Nalewaj Link: https://github.com/openwrt/openwrt/pull/16107 Signed-off-by: Robert Marko --- target/linux/imx/config-6.1 | 486 ------------------ target/linux/imx/image/cortexa7.mk | 2 - target/linux/imx/image/cortexa9.mk | 2 - ...x8m-pcie-Refine-register-definitions.patch | 49 -- ...x8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch | 99 ---- .../linux/imx/patches-6.1/100-bootargs.patch | 11 - ...apalis-ixora-add-status-LEDs-aliases.patch | 96 ---- ...alis-ixora-make-switch3-reset-button.patch | 78 --- ...10-ARM-dts-imx7d-pico-pi-set-aliases.patch | 24 - ...-pico-pi.dts-add-default-stdout-path.patch | 23 - 10 files changed, 870 deletions(-) delete mode 100644 target/linux/imx/config-6.1 delete mode 100644 target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch delete mode 100644 target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch delete mode 100644 target/linux/imx/patches-6.1/100-bootargs.patch delete mode 100644 target/linux/imx/patches-6.1/300-ARM-dts-imx6q-apalis-ixora-add-status-LEDs-aliases.patch delete mode 100644 target/linux/imx/patches-6.1/301-ARM-dts-imx6q-apalis-ixora-make-switch3-reset-button.patch delete mode 100644 target/linux/imx/patches-6.1/310-ARM-dts-imx7d-pico-pi-set-aliases.patch delete mode 100644 target/linux/imx/patches-6.1/311-ARM-imx7d-pico-pi.dts-add-default-stdout-path.patch diff --git a/target/linux/imx/config-6.1 b/target/linux/imx/config-6.1 deleted file mode 100644 index 837bab909a..0000000000 --- a/target/linux/imx/config-6.1 +++ /dev/null @@ -1,486 +0,0 @@ -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_MMAP_RND_BITS_MAX=15 -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_SUSPEND_POSSIBLE=y -CONFIG_ARM=y -CONFIG_ARM_ARCH_TIMER=y -CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y -CONFIG_ARM_ERRATA_754322=y -CONFIG_ARM_ERRATA_764369=y -CONFIG_ARM_ERRATA_775420=y -CONFIG_ARM_ERRATA_814220=y -CONFIG_ARM_HAS_GROUP_RELOCS=y -CONFIG_ARM_HEAVY_MB=y -# CONFIG_ARM_IMX6Q_CPUFREQ is not set -# CONFIG_ARM_IMX_CPUFREQ_DT 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_THUMB=y -CONFIG_ARM_UNWIND=y -CONFIG_ARM_VIRT_EXT=y -CONFIG_ASN1=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_ATA=y -CONFIG_ATAGS=y -# CONFIG_ATA_SFF is not set -CONFIG_AUTO_ZRELADDR=y -CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y -CONFIG_BLK_DEV_LOOP=y -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_PM=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_IMX_GPT=y -CONFIG_CLKSRC_MMIO=y -# CONFIG_CLK_IMX8MM is not set -# CONFIG_CLK_IMX8MN is not set -# CONFIG_CLK_IMX8MP is not set -# CONFIG_CLK_IMX8MQ is not set -# CONFIG_CLK_IMX8ULP is not set -# CONFIG_CLK_IMX93 is not set -CONFIG_CLONE_BACKWARDS=y -CONFIG_CLZ_TAB=y -CONFIG_COMMON_CLK=y -CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 -CONFIG_COMPAT_32BIT_TIME=y -CONFIG_CONTEXT_TRACKING=y -CONFIG_CONTEXT_TRACKING_IDLE=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_SCHEDUTIL=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_STAT=y -CONFIG_CPU_FREQ_THERMAL=y -CONFIG_CPU_HAS_ASID=y -CONFIG_CPU_LITTLE_ENDIAN=y -CONFIG_CPU_PABRT_V7=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_CRYPTO_AES_ARM=y -CONFIG_CRYPTO_AES_ARM_BS=y -CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y -CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y -CONFIG_CRYPTO_AUTHENC=y -CONFIG_CRYPTO_BLAKE2S_ARM=y -CONFIG_CRYPTO_CBC=y -CONFIG_CRYPTO_CHACHA20=y -CONFIG_CRYPTO_CHACHA20_NEON=y -CONFIG_CRYPTO_CRC32=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_CRC32_ARM_CE=y -CONFIG_CRYPTO_CRYPTD=y -CONFIG_CRYPTO_CTS=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_DEV_FSL_CAAM=y -CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y -CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC=y -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_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 -CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 -CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_DRBG_HMAC=y -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_ENGINE=y -CONFIG_CRYPTO_HASH_INFO=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_HW=y -CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y -CONFIG_CRYPTO_LIB_DES=y -CONFIG_CRYPTO_LIB_SHA1=y -CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_LIB_UTILS=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_SHA1_ARM_NEON=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA256_ARM=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_SHA512_ARM=y -CONFIG_CRYPTO_SIMD=y -CONFIG_CRYPTO_XTS=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_DECOMPRESS_BZIP2=y -CONFIG_DECOMPRESS_GZIP=y -CONFIG_DECOMPRESS_LZO=y -CONFIG_DECOMPRESS_XZ=y -CONFIG_DMADEVICES=y -CONFIG_DMA_ENGINE=y -CONFIG_DMA_OF=y -CONFIG_DMA_OPS=y -CONFIG_DMA_VIRTUAL_CHANNELS=y -# CONFIG_DRM_FSL_LDB is not set -# 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_TO_DPI is not set -# CONFIG_DRM_DW_HDMI_GP_AUDIO is not set -# CONFIG_VIDEO_IMX_MIPI_CSIS is not set -# CONFIG_VIDEO_DW100 is not set -# CONFIG_VIDEO_ROCKCHIP_ISP1 is not set -# CONFIG_VIDEO_HANTRO is not set -CONFIG_DTC=y -CONFIG_EDAC_ATOMIC_SCRUB=y -CONFIG_EDAC_SUPPORT=y -CONFIG_ENCRYPTED_KEYS=y -CONFIG_EXCLUSIVE_SYSTEM_RAM=y -CONFIG_EXT4_FS=y -CONFIG_EXT4_FS_POSIX_ACL=y -CONFIG_EXT4_FS_SECURITY=y -CONFIG_EXTCON=y -CONFIG_F2FS_FS=y -CONFIG_FEC=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -# CONFIG_FSL_DPAA2_SWITCH is not set -CONFIG_FSL_GUTS=y -CONFIG_FS_ENCRYPTION=y -CONFIG_FS_ENCRYPTION_ALGS=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_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_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_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_GIANFAR is not set -CONFIG_GLOB=y -CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_CDEV=y -CONFIG_GPIO_GENERIC=y -CONFIG_GPIO_MXC=y -CONFIG_GPIO_VF610=y -CONFIG_GRO_CELLS=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_HWMON=y -CONFIG_HW_RANDOM=y -CONFIG_HZ_FIXED=0 -CONFIG_HZ_PERIODIC=y -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_IMX=y -# CONFIG_I2C_IMX_LPI2C is not set -CONFIG_I2C_SLAVE=y -# CONFIG_I2C_SLAVE_TESTUNIT is not set -CONFIG_IMX2_WDT=y -# CONFIG_IMX7ULP_WDT is not set -# CONFIG_IMX8MM_THERMAL is not set -CONFIG_IMX_DMA=y -# CONFIG_IMX_GPCV2_PM_DOMAINS is not set -CONFIG_IMX_INTMUX=y -CONFIG_IMX_IRQSTEER=y -CONFIG_IMX_MU_MSI=m -CONFIG_IMX_SDMA=y -CONFIG_IMX_THERMAL=y -# CONFIG_IMX_WEIM is not set -CONFIG_INITRAMFS_SOURCE="" -CONFIG_IRQCHIP=y -CONFIG_IRQSTACKS=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -# CONFIG_JFFS2_FS is not set -CONFIG_KEYS=y -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_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_CQHCI=y -# CONFIG_MMC_MXC is not set -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_ESDHC_IMX=y -CONFIG_MMC_SDHCI_IO_ACCESSORS=y -CONFIG_MMC_SDHCI_OF_ESDHC=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MODULES_USE_ELF_REL=y -CONFIG_MPILIB=y -CONFIG_MTD_NAND_CORE=y -CONFIG_MTD_NAND_ECC=y -CONFIG_MTD_NAND_ECC_SW_HAMMING=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_RAW_NAND=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_MX3_IPU is not set -CONFIG_MXC_CLK=y -CONFIG_MXS_DMA=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEON=y -CONFIG_NET_DEVLINK=y -CONFIG_NET_DSA=y -CONFIG_NET_DSA_TAG_DSA=y -CONFIG_NET_DSA_TAG_DSA_COMMON=y -CONFIG_NET_DSA_TAG_EDSA=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_SELFTESTS=y -CONFIG_NET_SWITCHDEV=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NR_CPUS=4 -CONFIG_NVMEM=y -# CONFIG_NVMEM_IMX_IIM is not set -CONFIG_NVMEM_IMX_OCOTP=y -# CONFIG_NVMEM_IMX_OCOTP_ELE is not set -CONFIG_NVMEM_LAYOUTS=y -# CONFIG_NVMEM_SNVS_LPGPR is not set -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=0x80000000 -CONFIG_PAGE_POOL=y -CONFIG_PAGE_SIZE_LESS_THAN_256KB=y -CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 -CONFIG_PHYLIB=y -CONFIG_PHYLINK=y -CONFIG_PINCTRL=y -# CONFIG_PINCTRL_IMX8ULP is not set -# CONFIG_PINCTRL_IMX93 is not set -# CONFIG_PINCTRL_IMXRT1050 is not set -# CONFIG_PINCTRL_IMXRT1170 is not set -CONFIG_PL310_ERRATA_769419=y -CONFIG_PM=y -CONFIG_PM_CLK=y -CONFIG_PM_OPP=y -CONFIG_PPS=y -CONFIG_PREEMPT_NONE_BUILD=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_OPTIONAL=y -CONFIG_PWM=y -# CONFIG_PWM_IMX1 is not set -CONFIG_PWM_IMX27=y -# CONFIG_PWM_IMX_TPM is not set -CONFIG_PWM_SYSFS=y -CONFIG_RANDSTRUCT_NONE=y -CONFIG_RAS=y -CONFIG_RATIONAL=y -CONFIG_RD_BZIP2=y -CONFIG_RD_GZIP=y -CONFIG_RD_LZO=y -CONFIG_RD_XZ=y -CONFIG_REGMAP=y -CONFIG_REGMAP_I2C=y -CONFIG_REGMAP_MMIO=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_ANATOP=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_REGULATOR_PFUZE100=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_IMXDI is not set -# CONFIG_RTC_DRV_MXC is not set -# CONFIG_RTC_DRV_MXC_V2 is not set -CONFIG_RTC_I2C_AND_SPI=y -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_SCHED_THERMAL_PRESSURE=y -CONFIG_SCSI=y -CONFIG_SCSI_COMMON=y -CONFIG_SERIAL_8250_FSL=y -CONFIG_SERIAL_IMX=y -CONFIG_SERIAL_IMX_CONSOLE=y -CONFIG_SERIAL_IMX_EARLYCON=y -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SGL_ALLOC=y -CONFIG_SG_POOL=y -CONFIG_SMP=y -CONFIG_SMP_ON_UP=y -CONFIG_SOCK_RX_QUEUE_MAPPING=y -CONFIG_SOC_BUS=y -# CONFIG_SOC_IMX50 is not set -# CONFIG_SOC_IMX51 is not set -# CONFIG_SOC_IMX53 is not set -# CONFIG_SOC_IMX6Q is not set -# CONFIG_SOC_IMX6SL is not set -# CONFIG_SOC_IMX6SLL is not set -# CONFIG_SOC_IMX6SX is not set -# CONFIG_SOC_IMX6UL is not set -# CONFIG_SOC_IMX7D is not set -# CONFIG_SOC_IMX7ULP is not set -# CONFIG_SOC_IMX8M is not set -# CONFIG_SOC_IMX9 is not set -# CONFIG_SOC_LS1021A is not set -# CONFIG_SOC_VF610 is not set -CONFIG_SOFTIRQ_ON_OWN_STACK=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_BITBANG=y -# CONFIG_SPI_FSL_LPSPI is not set -# CONFIG_SPI_FSL_QUADSPI is not set -CONFIG_SPI_IMX=y -CONFIG_SPI_MASTER=y -CONFIG_SRAM=y -CONFIG_SRAM_EXEC=y -CONFIG_SRCU=y -CONFIG_STMP_DEVICE=y -CONFIG_SWPHY=y -CONFIG_SWP_EMULATE=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_OF=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_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_IMX=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_GADGET=y -CONFIG_USB_MXS_PHY=y -CONFIG_USB_OTG=y -CONFIG_USB_PHY=y -CONFIG_USB_ROLE_SWITCH=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SUPPORT=y -CONFIG_USB_ULPI_BUS=y -CONFIG_USE_OF=y -CONFIG_VFP=y -CONFIG_VFPv3=y -CONFIG_VMSPLIT_2G=y -# CONFIG_VMSPLIT_3G is not set -CONFIG_WATCHDOG_CORE=y -CONFIG_XPS=y -CONFIG_XXHASH=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 -CONFIG_ZSTD_COMMON=y -CONFIG_ZSTD_COMPRESS=y -CONFIG_ZSTD_DECOMPRESS=y diff --git a/target/linux/imx/image/cortexa7.mk b/target/linux/imx/image/cortexa7.mk index 3f89a99a83..6d2d0ab778 100644 --- a/target/linux/imx/image/cortexa7.mk +++ b/target/linux/imx/image/cortexa7.mk @@ -10,9 +10,7 @@ define Device/Default KERNEL_NAME := zImage KERNEL := kernel-bin | uImage none KERNEL_LOADADDR := 0x80008000 -ifdef CONFIG_LINUX_6_6 DTS_DIR := $(DTS_DIR)/nxp/imx -endif IMAGES := endef diff --git a/target/linux/imx/image/cortexa9.mk b/target/linux/imx/image/cortexa9.mk index 1ff5bcb8a7..5f087c83ed 100644 --- a/target/linux/imx/image/cortexa9.mk +++ b/target/linux/imx/image/cortexa9.mk @@ -84,9 +84,7 @@ define Device/Default KERNEL_NAME := zImage KERNEL := kernel-bin | uImage none KERNEL_LOADADDR := 0x10008000 -ifdef CONFIG_LINUX_6_6 DTS_DIR := $(DTS_DIR)/nxp/imx -endif IMAGES := endef diff --git a/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch b/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch deleted file mode 100644 index 01731755df..0000000000 --- a/target/linux/imx/patches-6.1/001-6.2-phy-freescale-imx8m-pcie-Refine-register-definitions.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ffcbb4ccd357eeb649036e379a34bf5fb8d4f47c Mon Sep 17 00:00:00 2001 -From: Richard Zhu -Date: Thu, 13 Oct 2022 09:47:00 +0800 -Subject: [PATCH 1/3] phy: freescale: imx8m-pcie: Refine register definitions - -No function changes, refine PHY register definitions. -- Keep align with other CMN PHY registers, refine the definitions of - PHY_CMN_REG75. -- Remove two BIT definitions that are not used at all. - -Signed-off-by: Richard Zhu -Signed-off-by: Lucas Stach -Tested-by: Marek Vasut -Tested-by: Richard Leitner -Tested-by: Alexander Stein -Reviewed-by: Lucas Stach ---- - drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 11 ++++------- - 1 file changed, 4 insertions(+), 7 deletions(-) - ---- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -+++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -@@ -32,12 +32,10 @@ - #define IMX8MM_PCIE_PHY_CMN_REG065 0x194 - #define ANA_AUX_RX_TERM (BIT(7) | BIT(4)) - #define ANA_AUX_TX_LVL GENMASK(3, 0) --#define IMX8MM_PCIE_PHY_CMN_REG75 0x1D4 --#define PCIE_PHY_CMN_REG75_PLL_DONE 0x3 -+#define IMX8MM_PCIE_PHY_CMN_REG075 0x1D4 -+#define ANA_PLL_DONE 0x3 - #define PCIE_PHY_TRSV_REG5 0x414 --#define PCIE_PHY_TRSV_REG5_GEN1_DEEMP 0x2D - #define PCIE_PHY_TRSV_REG6 0x418 --#define PCIE_PHY_TRSV_REG6_GEN2_DEEMP 0xF - - #define IMX8MM_GPR_PCIE_REF_CLK_SEL GENMASK(25, 24) - #define IMX8MM_GPR_PCIE_REF_CLK_PLL FIELD_PREP(IMX8MM_GPR_PCIE_REF_CLK_SEL, 0x3) -@@ -152,9 +150,8 @@ static int imx8_pcie_phy_power_on(struct - } - - /* Polling to check the phy is ready or not. */ -- ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG75, -- val, val == PCIE_PHY_CMN_REG75_PLL_DONE, -- 10, 20000); -+ ret = readl_poll_timeout(imx8_phy->base + IMX8MM_PCIE_PHY_CMN_REG075, -+ val, val == ANA_PLL_DONE, 10, 20000); - return ret; - } - diff --git a/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch b/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch deleted file mode 100644 index dbcfd40e57..0000000000 --- a/target/linux/imx/patches-6.1/003-6.3-phy-freescale-imx8m-pcie-Add-i.MX8MP-PCIe-PHY-suppor.patch +++ /dev/null @@ -1,99 +0,0 @@ -From bf03b9281b119bcdc167b2dd6ac98294587eb5ff Mon Sep 17 00:00:00 2001 -From: Richard Zhu -Date: Thu, 13 Oct 2022 09:47:02 +0800 -Subject: [PATCH 3/3] phy: freescale: imx8m-pcie: Add i.MX8MP PCIe PHY support - -Add i.MX8MP PCIe PHY support. - -Signed-off-by: Richard Zhu -Signed-off-by: Lucas Stach -Tested-by: Marek Vasut -Tested-by: Richard Leitner -Tested-by: Alexander Stein -Reviewed-by: Lucas Stach -Reviewed-by: Ahmad Fatoum ---- - drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 25 ++++++++++++++++++++-- - 1 file changed, 23 insertions(+), 2 deletions(-) - ---- a/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -+++ b/drivers/phy/freescale/phy-fsl-imx8m-pcie.c -@@ -48,6 +48,7 @@ - - enum imx8_pcie_phy_type { - IMX8MM, -+ IMX8MP, - }; - - struct imx8_pcie_phy_drvdata { -@@ -60,6 +61,7 @@ struct imx8_pcie_phy { - struct clk *clk; - struct phy *phy; - struct regmap *iomuxc_gpr; -+ struct reset_control *perst; - struct reset_control *reset; - u32 refclk_pad_mode; - u32 tx_deemph_gen1; -@@ -74,11 +76,11 @@ static int imx8_pcie_phy_power_on(struct - u32 val, pad_mode; - struct imx8_pcie_phy *imx8_phy = phy_get_drvdata(phy); - -- reset_control_assert(imx8_phy->reset); -- - pad_mode = imx8_phy->refclk_pad_mode; - switch (imx8_phy->drvdata->variant) { - case IMX8MM: -+ reset_control_assert(imx8_phy->reset); -+ - /* Tune PHY de-emphasis setting to pass PCIe compliance. */ - if (imx8_phy->tx_deemph_gen1) - writel(imx8_phy->tx_deemph_gen1, -@@ -87,6 +89,8 @@ static int imx8_pcie_phy_power_on(struct - writel(imx8_phy->tx_deemph_gen2, - imx8_phy->base + PCIE_PHY_TRSV_REG6); - break; -+ case IMX8MP: /* Do nothing. */ -+ break; - } - - if (pad_mode == IMX8_PCIE_REFCLK_PAD_INPUT || -@@ -143,6 +147,9 @@ static int imx8_pcie_phy_power_on(struct - IMX8MM_GPR_PCIE_CMN_RST); - - switch (imx8_phy->drvdata->variant) { -+ case IMX8MP: -+ reset_control_deassert(imx8_phy->perst); -+ fallthrough; - case IMX8MM: - reset_control_deassert(imx8_phy->reset); - usleep_range(200, 500); -@@ -183,8 +190,14 @@ static const struct imx8_pcie_phy_drvdat - .variant = IMX8MM, - }; - -+static const struct imx8_pcie_phy_drvdata imx8mp_drvdata = { -+ .gpr = "fsl,imx8mp-iomuxc-gpr", -+ .variant = IMX8MP, -+}; -+ - static const struct of_device_id imx8_pcie_phy_of_match[] = { - {.compatible = "fsl,imx8mm-pcie-phy", .data = &imx8mm_drvdata, }, -+ {.compatible = "fsl,imx8mp-pcie-phy", .data = &imx8mp_drvdata, }, - { }, - }; - MODULE_DEVICE_TABLE(of, imx8_pcie_phy_of_match); -@@ -240,6 +253,14 @@ static int imx8_pcie_phy_probe(struct pl - return PTR_ERR(imx8_phy->reset); - } - -+ if (imx8_phy->drvdata->variant == IMX8MP) { -+ imx8_phy->perst = -+ devm_reset_control_get_exclusive(dev, "perst"); -+ if (IS_ERR(imx8_phy->perst)) -+ dev_err_probe(dev, PTR_ERR(imx8_phy->perst), -+ "Failed to get PCIE PHY PERST control\n"); -+ } -+ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - imx8_phy->base = devm_ioremap_resource(dev, res); - if (IS_ERR(imx8_phy->base)) diff --git a/target/linux/imx/patches-6.1/100-bootargs.patch b/target/linux/imx/patches-6.1/100-bootargs.patch deleted file mode 100644 index cf63a3bdb1..0000000000 --- a/target/linux/imx/patches-6.1/100-bootargs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/arch/arm/boot/dts/imx6dl-wandboard.dts -+++ b/arch/arm/boot/dts/imx6dl-wandboard.dts -@@ -16,4 +16,8 @@ - device_type = "memory"; - reg = <0x10000000 0x40000000>; - }; -+ -+ chosen { -+ bootargs = "console=ttymxc0,115200"; -+ }; - }; diff --git a/target/linux/imx/patches-6.1/300-ARM-dts-imx6q-apalis-ixora-add-status-LEDs-aliases.patch b/target/linux/imx/patches-6.1/300-ARM-dts-imx6q-apalis-ixora-add-status-LEDs-aliases.patch deleted file mode 100644 index 9db7098aaf..0000000000 --- a/target/linux/imx/patches-6.1/300-ARM-dts-imx6q-apalis-ixora-add-status-LEDs-aliases.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 68604e89335ccb3e893b5a05b2c0d5cd2eaaf6ec Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20=C5=A0tetiar?= -Date: Tue, 3 Mar 2020 15:14:40 +0100 -Subject: [PATCH] ARM: dts: imx6q-apalis: ixora: add status LEDs aliases -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar ---- - arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 16 ++++++++++------ - arch/arm/boot/dts/imx6q-apalis-ixora.dts | 12 ++++++++---- - 2 files changed, 18 insertions(+), 10 deletions(-) - ---- a/arch/arm/boot/dts/imx6q-apalis-ixora.dts -+++ b/arch/arm/boot/dts/imx6q-apalis-ixora.dts -@@ -24,6 +24,10 @@ - i2c2 = &i2c2; - rtc0 = &rtc_i2c; - rtc1 = &snvs_rtc; -+ led-boot = &led_boot; -+ led-failsafe = &led_failsafe; -+ led-running = &led_running; -+ led-upgrade = &led_upgrade; - }; - - chosen { -@@ -35,22 +39,22 @@ - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_leds_ixora>; - -- led4-green { -+ led_running: led4-green { - gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; - label = "LED_4_GREEN"; - }; - -- led4-red { -+ led_upgrade: led4-red { - gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; - label = "LED_4_RED"; - }; - -- led5-green { -+ led_boot: led5-green { - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - label = "LED_5_GREEN"; - }; - -- led5-red { -+ led_failsafe: led5-red { - gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; - label = "LED_5_RED"; - }; ---- a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts -+++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts -@@ -24,6 +24,10 @@ - i2c2 = &i2c2; - rtc0 = &rtc_i2c; - rtc1 = &snvs_rtc; -+ led-boot = &led_boot; -+ led-failsafe = &led_failsafe; -+ led-running = &led_running; -+ led-upgrade = &led_upgrade; - }; - - chosen { -@@ -36,22 +40,22 @@ - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_leds_ixora>; - -- led4-green { -- gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; -+ led_running: led4-green { -+ gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>; - label = "LED_4_GREEN"; - }; - -- led4-red { -- gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; -+ led_upgrade: led4-red { -+ gpios = <&gpio1 21 GPIO_ACTIVE_HIGH>; - label = "LED_4_RED"; - }; - -- led5-green { -+ led_boot: led5-green { - gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; - label = "LED_5_GREEN"; - }; - -- led5-red { -+ led_failsafe: led5-red { - gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>; - label = "LED_5_RED"; - }; diff --git a/target/linux/imx/patches-6.1/301-ARM-dts-imx6q-apalis-ixora-make-switch3-reset-button.patch b/target/linux/imx/patches-6.1/301-ARM-dts-imx6q-apalis-ixora-make-switch3-reset-button.patch deleted file mode 100644 index 95f572f35e..0000000000 --- a/target/linux/imx/patches-6.1/301-ARM-dts-imx6q-apalis-ixora-make-switch3-reset-button.patch +++ /dev/null @@ -1,78 +0,0 @@ -From b6764bb27c819cdcf854371db485a43d71f579f3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Petr=20=C5=A0tetiar?= -Date: Tue, 3 Mar 2020 15:15:57 +0100 -Subject: [PATCH] ARM: dts: imx6q-apalis: ixora: make switch3 reset button -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Petr Štetiar ---- - arch/arm/boot/dts/imx6q-apalis-ixora-v1.1.dts | 15 ++++++++++++++- - arch/arm/boot/dts/imx6q-apalis-ixora.dts | 15 ++++++++++++++- - 2 files changed, 28 insertions(+), 2 deletions(-) - ---- a/arch/arm/boot/dts/imx6q-apalis-ixora.dts -+++ b/arch/arm/boot/dts/imx6q-apalis-ixora.dts -@@ -59,6 +59,17 @@ - label = "LED_5_RED"; - }; - }; -+ -+ gpio-keys { -+ pinctrl-0 = <&pinctrl_gpio_keys &pinctrl_switch3_ixora>; -+ -+ reset { -+ label = "reset"; -+ gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; -+ linux,code = ; -+ debounce-interval = <10>; -+ }; -+ }; - }; - - &can1 { -@@ -181,4 +192,10 @@ - MX6QDL_PAD_NANDF_D2__GPIO2_IO02 0x1b0b0 - >; - }; -+ -+ pinctrl_switch3_ixora: switch3ixora { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0 -+ >; -+ }; - }; ---- a/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts -+++ b/arch/arm/boot/dts/imx6q-apalis-ixora-v1.2.dts -@@ -61,6 +61,17 @@ - }; - }; - -+ gpio-keys { -+ pinctrl-0 = <&pinctrl_gpio_keys &pinctrl_switch3_ixora>; -+ -+ reset { -+ label = "reset"; -+ gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; -+ linux,code = ; -+ debounce-interval = <10>; -+ }; -+ }; -+ - reg_3v3_vmmc: regulator-3v3-vmmc { - compatible = "regulator-fixed"; - enable-active-high; -@@ -262,6 +273,12 @@ - >; - }; - -+ pinctrl_switch3_ixora: switch3ixora { -+ fsl,pins = < -+ MX6QDL_PAD_SD1_DAT0__GPIO1_IO16 0x1b0b0 -+ >; -+ }; -+ - pinctrl_mmc_cd_sleep: mmccdslpgrp { - fsl,pins = < - /* MMC1 CD */ diff --git a/target/linux/imx/patches-6.1/310-ARM-dts-imx7d-pico-pi-set-aliases.patch b/target/linux/imx/patches-6.1/310-ARM-dts-imx7d-pico-pi-set-aliases.patch deleted file mode 100644 index f50199cdfc..0000000000 --- a/target/linux/imx/patches-6.1/310-ARM-dts-imx7d-pico-pi-set-aliases.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- a/arch/arm/boot/dts/imx7d-pico-pi.dts -+++ b/arch/arm/boot/dts/imx7d-pico-pi.dts -@@ -8,12 +8,20 @@ - model = "TechNexion PICO-IMX7D Board and PI baseboard"; - compatible = "technexion,imx7d-pico-pi", "fsl,imx7d"; - -+ aliases { -+ led-boot = &led_system; -+ led-failsafe = &led_system; -+ led-running = &led_system; -+ led-upgrade = &led_system; -+ label-mac-device = &fec1; -+ }; -+ - leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_gpio_leds>; - -- led { -+ led_system: led { - label = "gpio-led"; - gpios = <&gpio2 6 GPIO_ACTIVE_HIGH>; - }; diff --git a/target/linux/imx/patches-6.1/311-ARM-imx7d-pico-pi.dts-add-default-stdout-path.patch b/target/linux/imx/patches-6.1/311-ARM-imx7d-pico-pi.dts-add-default-stdout-path.patch deleted file mode 100644 index 5248e8c74c..0000000000 --- a/target/linux/imx/patches-6.1/311-ARM-imx7d-pico-pi.dts-add-default-stdout-path.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 6e8e5ccfbee7a531b035ffce3f95f3901946fa9d Mon Sep 17 00:00:00 2001 -From: Robert Nelson -Date: Wed, 9 Jan 2019 14:33:24 -0600 -Subject: [PATCH] ARM: imx7d-pico-pi.dts: add default stdout-path - -Signed-off-by: Robert Nelson ---- - arch/arm/boot/dts/imx7d-pico-pi.dts | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/arch/arm/boot/dts/imx7d-pico-pi.dts -+++ b/arch/arm/boot/dts/imx7d-pico-pi.dts -@@ -16,6 +16,10 @@ - label-mac-device = &fec1; - }; - -+ chosen { -+ stdout-path = "serial4:115200n8"; -+ }; -+ - leds { - compatible = "gpio-leds"; - pinctrl-names = "default"; From 7305bf616e9936eae7316bc13ff9d52b19544d9b Mon Sep 17 00:00:00 2001 From: Vyacheslav Ivanov Date: Tue, 6 Aug 2024 12:44:49 +0300 Subject: [PATCH 25/31] uboot-envtools: Add support for Orange Pi R1 Plus & LTS Add support this boards to envtools config This commit integrates the latest changes from new U-Boot, which includes important updates to the DTSI files for the Orange Pi R1 Plus and Orange Pi R1 Plus LTS boards. Signed-off-by: Vyacheslav Ivanov Link: https://github.com/openwrt/openwrt/pull/16090 Signed-off-by: Robert Marko --- .../boot/uboot-envtools/files/rockchip_armv8 | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 package/boot/uboot-envtools/files/rockchip_armv8 diff --git a/package/boot/uboot-envtools/files/rockchip_armv8 b/package/boot/uboot-envtools/files/rockchip_armv8 new file mode 100644 index 0000000000..075776a1ff --- /dev/null +++ b/package/boot/uboot-envtools/files/rockchip_armv8 @@ -0,0 +1,23 @@ +# +# Copyright (C) 2024 OpenWrt.org +# +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(board_name) + +case "$board" in +xunlong,orangepi-r1-plus|\ +xunlong,orangepi-r1-plus-lts) + ubootenv_add_uci_config "/dev/mmcblk0" "0x3f8000" "0x8000" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config + +exit 0 From 9dbd45c18702cdd55fcfb0f71dc505afa1ff64d6 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 5 Aug 2024 18:18:49 -0700 Subject: [PATCH 26/31] lantiq: arv7525pw: use nvmem for eeprom NVMEM is the upstream replacement for this. ralink,mtd-eeprom is deprecated. The others need to stay as there's byte swapping going on. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/16084 Signed-off-by: Robert Marko --- .../mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts index 890eac972d..5315f3723e 100644 --- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts +++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts @@ -135,6 +135,10 @@ macaddr_boardconfig_16: macaddr@16 { reg = <0x16 0x6>; }; + + eeprom_boardconfig_410: eeprom@410 { + reg = <0x410 0x200>; + }; }; }; }; @@ -152,7 +156,8 @@ wifi@0,0 { compatible = "pci0,0"; reg = <0x7000 0 0 0 0>; - ralink,mtd-eeprom = <&boardconfig 0x410>; + nvmem-cells = <&eeprom_boardconfig_410>; + nvmem-cell-names = "eeprom"; }; }; From e80520197c9ca7bced50d3605d6baba6dead6e35 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Wed, 20 Mar 2024 11:06:54 +0100 Subject: [PATCH 27/31] hostapd: Add support for APuP Add support for hostapd Access Point Micro Peering Signed-off-by: Gioacchino Mazzurco Link: https://gitlab.com/g10h4ck/hostap/-/commits/APuP Link: https://github.com/openwrt/openwrt/pull/15442 Signed-off-by: Hauke Mehrtens --- .../wifi-scripts/files/lib/netifd/hostapd.sh | 16 +- package/network/services/hostapd/Makefile | 2 +- ...ment-APuP-Access-Point-Micro-Peering.patch | 460 ++++++++++++++++++ ...us-notification-when-a-peer-comes-up.patch | 81 +++ ...-ucode-hook-for-when-a-peer-comes-up.patch | 79 +++ 5 files changed, 636 insertions(+), 2 deletions(-) create mode 100644 package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch create mode 100644 package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch create mode 100644 package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh index 763702e76b..40266db065 100644 --- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh +++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh @@ -383,6 +383,9 @@ hostapd_common_add_bss_config() { config_add_string fils_dhcp config_add_int ocv + + config_add_boolean apup + config_add_string apup_peer_ifname_prefix } hostapd_set_vlan_file() { @@ -569,7 +572,7 @@ hostapd_set_bss_options() { ppsk airtime_bss_weight airtime_bss_limit airtime_sta_weight \ multicast_to_unicast_all proxy_arp per_sta_vif \ eap_server eap_user_file ca_cert server_cert private_key private_key_passwd server_id \ - vendor_elements fils ocv + vendor_elements fils ocv apup set_default fils 0 set_default isolate 0 @@ -593,6 +596,7 @@ hostapd_set_bss_options() { set_default airtime_bss_weight 0 set_default airtime_bss_limit 0 set_default eap_server 0 + set_default apup 0 /usr/sbin/hostapd -vfils || fils=0 @@ -1163,6 +1167,16 @@ hostapd_set_bss_options() { append bss_conf "per_sta_vif=$per_sta_vif" "$N" fi + if [ "$apup" -gt 0 ]; then + append bss_conf "apup=$apup" "$N" + + local apup_peer_ifname_prefix + json_get_vars apup_peer_ifname_prefix + if [ -n "$apup_peer_ifname_prefix" ] ; then + append bss_conf "apup_peer_ifname_prefix=$apup_peer_ifname_prefix" "$N" + fi + fi + json_get_values opts hostapd_bss_options for val in $opts; do append bss_conf "$val" "$N" diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 5fbbedc2b1..b62592b724 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -87,7 +87,7 @@ DRIVER_MAKEOPTS= \ CONFIG_IEEE80211AC=$(HOSTAPD_IEEE80211AC) \ CONFIG_IEEE80211AX=$(HOSTAPD_IEEE80211AX) \ CONFIG_MBO=$(CONFIG_WPA_MBO_SUPPORT) \ - CONFIG_UCODE=y + CONFIG_UCODE=y CONFIG_APUP=y ifeq ($(SSL_VARIANT),openssl) DRIVER_MAKEOPTS += CONFIG_TLS=openssl CONFIG_SAE=y diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch new file mode 100644 index 0000000000..b6e4ef9571 --- /dev/null +++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch @@ -0,0 +1,460 @@ +From 40041ecea334c0106c0e840a32aef92b0cbb004b Mon Sep 17 00:00:00 2001 +From: Gioacchino Mazzurco +Date: Mon, 6 May 2024 13:53:48 +0200 +Subject: [PATCH 1/3] Implement APuP Access Point Micro Peering + +Access Point Micro Peering is a simpler and hopefully more useful successor to +Ad Hoc, Wireless Distribution System, 802.11s mesh mode, Multi-AP and EasyMesh. +When enabled almost plain APs communicate between them via 4-address mode, +like in WDS but all of them are AP, so they can eventually communicate also with +plain stations and more AP nodes in sight, without more trickery. +APuP has low hardware requirements, just AP mode support + 4-address mode, and +no more unnecessary complications, like hardcoded bridging or routing algorithm +in WiFi stack. +For each AP in sight an interface is created, and then it can be used as +convenient in each case, bridging, routing etc. +Those interfaces could be simply bridged in a trivial topology (which happens +automatically if wds_bridge is not an empty string), or feeded to a +routing daemon. + +Signed-off-by: Gioacchino Mazzurco +--- + hostapd/Makefile | 5 ++ + hostapd/config_file.c | 9 +++ + src/ap/ap_config.h | 29 +++++++ + src/ap/ap_drv_ops.c | 26 ++++++ + src/ap/ap_drv_ops.h | 3 + + src/ap/apup.c | 152 +++++++++++++++++++++++++++++++++++ + src/ap/apup.h | 24 ++++++ + src/ap/ieee802_11.c | 14 +++- + src/ap/ieee802_11.h | 2 + + src/drivers/driver.h | 2 +- + src/drivers/driver_nl80211.c | 14 +--- + 11 files changed, 264 insertions(+), 16 deletions(-) + create mode 100644 src/ap/apup.c + create mode 100644 src/ap/apup.h + +diff --git a/hostapd/Makefile b/hostapd/Makefile +index 73048c1297..c890a7f29c 100644 +--- a/hostapd/Makefile ++++ b/hostapd/Makefile +@@ -1415,6 +1415,11 @@ ifdef CONFIG_NO_TKIP + CFLAGS += -DCONFIG_NO_TKIP + endif + ++ifdef CONFIG_APUP ++CFLAGS += -DCONFIG_APUP ++OBJS += ../src/ap/apup.o ++endif ++ + $(DESTDIR)$(BINDIR)/%: % + install -D $(<) $(@) + +diff --git a/hostapd/config_file.c b/hostapd/config_file.c +index bba5b19164..ef906199ec 100644 +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -5058,6 +5058,15 @@ static int hostapd_config_fill(struct hostapd_config *conf, + bss->mld_indicate_disabled = atoi(pos); + #endif /* CONFIG_TESTING_OPTIONS */ + #endif /* CONFIG_IEEE80211BE */ ++#ifdef CONFIG_APUP ++ } else if (os_strcmp(buf, "apup") == 0) { ++ bss->apup = !!atoi(pos); ++ if (bss->apup) ++ bss->wds_sta = 1; ++ } else if (os_strcmp(buf, "apup_peer_ifname_prefix") == 0) { ++ os_strlcpy(bss->apup_peer_ifname_prefix, ++ pos, sizeof(bss->apup_peer_ifname_prefix)); ++#endif // def CONFIG_APUP + } else { + wpa_printf(MSG_ERROR, + "Line %d: unknown configuration item '%s'", +diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h +index 0e52a9990d..9102db5ed0 100644 +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -970,6 +970,35 @@ struct hostapd_bss_config { + bool mld_indicate_disabled; + #endif /* CONFIG_TESTING_OPTIONS */ + #endif /* CONFIG_IEEE80211BE */ ++ ++#ifdef CONFIG_APUP ++ /** ++ * Access Point Micro Peering ++ * A simpler and more useful successor to Ad Hoc, ++ * Wireless Distribution System, 802.11s mesh mode, Multi-AP and EasyMesh. ++ * ++ * Almost plain APs communicate between them via 4-address mode, like in WDS ++ * but all of them are AP, so they can eventually communicate also with ++ * plain stations and more AP nodes in sight. ++ * Low hardware requirements, just AP mode support + 4-address mode, and no ++ * more unnecessary complications, like hardcoded bridging or routing ++ * algorithm in WiFi stack. ++ * For each AP in sight an interface is created, and then it can be used as ++ * convenient in each case, bridging, routing etc. ++ */ ++ bool apup; ++ ++ /** ++ * In 4-address mode each peer AP in sight is associated to its own ++ * interface so we have more flexibility in "user-space". ++ * Those interfaces could be simply bridged in a trivial topology (which ++ * happens automatically if wds_bridge is not an empty string), or feeded to ++ * a routing daemon. ++ * ++ * If not defined interface names are generated following the WDS convention. ++ */ ++ char apup_peer_ifname_prefix[IFNAMSIZ + 1]; ++#endif /* CONFIG_APUP */ + }; + + /** +diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c +index e7396d9aea..05460e3d73 100644 +--- a/src/ap/ap_drv_ops.c ++++ b/src/ap/ap_drv_ops.c +@@ -382,9 +382,35 @@ int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, + const u8 *addr, int aid, int val) + { + const char *bridge = NULL; ++ char ifName[IFNAMSIZ + 1]; ++ ++ int mRet = 0; + + if (hapd->driver == NULL || hapd->driver->set_wds_sta == NULL) + return -1; ++ ++#ifdef CONFIG_APUP ++ if (hapd->conf->apup && hapd->conf->apup_peer_ifname_prefix[0]) { ++ mRet = os_snprintf( ++ ifName, sizeof(ifName), "%s%d", ++ hapd->conf->apup_peer_ifname_prefix, aid); ++ } ++ else ++#endif // def CONFIG_APUP ++ mRet = os_snprintf( ++ ifName, sizeof(ifName), "%s.sta%d", ++ hapd->conf->iface, aid); ++ ++ if (mRet >= (int) sizeof(ifName)) ++ wpa_printf(MSG_WARNING, ++ "nl80211: WDS interface name was truncated"); ++ else if (mRet < 0) ++ return mRet; ++ ++ // Pass back to the caller the resulting interface name ++ if (ifname_wds) ++ os_strlcpy(ifname_wds, ifName, IFNAMSIZ + 1); ++ + if (hapd->conf->wds_bridge[0]) + bridge = hapd->conf->wds_bridge; + return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val, +diff --git a/src/ap/ap_drv_ops.h b/src/ap/ap_drv_ops.h +index fa89d2398e..ab4dc8eb16 100644 +--- a/src/ap/ap_drv_ops.h ++++ b/src/ap/ap_drv_ops.h +@@ -33,6 +33,9 @@ int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, + int enabled); + int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname); + int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname); ++ ++/** @param val as per nl80211 driver implementation, 1 means add 0 means remove ++ */ + int hostapd_set_wds_sta(struct hostapd_data *hapd, char *ifname_wds, + const u8 *addr, int aid, int val); + +diff --git a/src/ap/apup.c b/src/ap/apup.c +new file mode 100644 +index 0000000000..3575f1b6c6 +--- /dev/null ++++ b/src/ap/apup.c +@@ -0,0 +1,152 @@ ++/* ++ * hostapd / APuP Access Point Micro Peering ++ * ++ * Copyright (C) 2023-2024 Gioacchino Mazzurco ++ * ++ * This software may be distributed under the terms of the BSD license. ++ * See README for more details. ++ */ ++ ++/* Be extremely careful altering include order, move just one in the wrong place ++ * and you will start getting a bunch of error of undefined bool, size_t etc. */ ++ ++#include "utils/includes.h" ++#include "utils/common.h" ++#include "utils/os.h" ++ ++#include "apup.h" ++ ++#include "drivers/driver.h" ++#include "wpa_auth.h" ++#include "ap_mlme.h" ++#include "ieee802_11.h" ++#include "ap_drv_ops.h" ++#include "sta_info.h" ++ ++void apup_process_beacon(struct hostapd_data *hapd, ++ const struct ieee80211_mgmt *mgmt, size_t len, ++ const struct ieee802_11_elems *elems ) ++{ ++ if (!os_memcmp(hapd->own_addr, mgmt->bssid, ETH_ALEN)) ++ { ++ wpa_printf(MSG_WARNING, ++ "apup_process_beacon(...) own beacon elems.ssid %.*s", ++ (int) elems->ssid_len, elems->ssid); ++ return; ++ } ++ ++ if (elems->ssid_len != hapd->conf->ssid.ssid_len || ++ os_memcmp(elems->ssid, hapd->conf->ssid.ssid, elems->ssid_len)) ++ return; ++ ++ struct sta_info* sta_ret = ap_get_sta(hapd, mgmt->bssid); ++ if (sta_ret) ++ return; ++ ++ sta_ret = ap_sta_add(hapd, mgmt->bssid); ++ ++ /* TODO: this has been added just to making compiler happy after breaking ++ * changes introduced in 11a607d121df512e010148bedcb4263a03329dc7 to support ++ * IEEE80211BE Multi Link Operation. Look at that commit with more time and ++ * understand what could be a proper implementation in this context too ++ */ ++ const u8 *mld_link_addr = NULL; ++ bool mld_link_sta = false; ++ ++ /* First add the station without more information */ ++ int aRet = hostapd_sta_add( ++ hapd, mgmt->bssid, sta_ret->aid, 0, ++ NULL, 0, 0, NULL, NULL, NULL, 0, NULL, 0, NULL, ++ sta_ret->flags, 0, 0, 0, ++ 0, // 0 add, 1 set ++ mld_link_addr, mld_link_sta); ++ ++ sta_ret->flags |= WLAN_STA_AUTH; ++ wpa_auth_sm_event(sta_ret->wpa_sm, WPA_AUTH); ++ ++ /* TODO: Investigate if supporting WPA or other encryption method is ++ * possible */ ++ sta_ret->auth_alg = WLAN_AUTH_OPEN; ++ mlme_authenticate_indication(hapd, sta_ret); ++ ++ sta_ret->capability = le_to_host16(mgmt->u.beacon.capab_info); ++ ++ if (sta_ret->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) ++ sta_ret->flags |= WLAN_STA_SHORT_PREAMBLE; ++ else ++ sta_ret->flags &= ~WLAN_STA_SHORT_PREAMBLE; ++ ++ hostapd_copy_supp_rates(hapd, sta_ret, elems); ++ ++ /* Whithout this flag copy_sta_[v]ht_capab will disable [V]HT ++ * capabilities even if available */ ++ if (elems->ht_capabilities || elems->vht_capabilities) ++ sta_ret->flags |= WLAN_STA_WMM; ++ ++ copy_sta_ht_capab(hapd, sta_ret, elems->ht_capabilities); ++#ifdef CONFIG_IEEE80211AC ++ copy_sta_vht_capab(hapd, sta_ret, elems->vht_capabilities); ++ copy_sta_vht_oper(hapd, sta_ret, elems->vht_operation); ++ copy_sta_vendor_vht(hapd, sta_ret, elems->vendor_vht, elems->vendor_vht_len); ++#endif // def CONFIG_IEEE80211AC ++#ifdef CONFIG_IEEE80211AX ++ copy_sta_he_capab(hapd, sta_ret, IEEE80211_MODE_AP, ++ elems->he_capabilities, elems->he_capabilities_len); ++ copy_sta_he_6ghz_capab(hapd, sta_ret, elems->he_6ghz_band_cap); ++#endif // def CONFIG_IEEE80211AX ++#ifdef CONFIG_IEEE80211BE ++ copy_sta_eht_capab(hapd, sta_ret, ++ IEEE80211_MODE_AP, // TODO: Make sure is the right value ++ elems->he_capabilities, elems->he_capabilities_len, ++ elems->eht_capabilities, elems->eht_capabilities_len); ++#endif //def CONFIG_IEEE80211BE ++ ++ update_ht_state(hapd, sta_ret); ++ ++ if (hostapd_get_aid(hapd, sta_ret) < 0) ++ { ++ wpa_printf(MSG_INFO, "apup_process_beacon(...) No room for more AIDs"); ++ return; ++ } ++ ++ sta_ret->flags |= WLAN_STA_ASSOC_REQ_OK; ++ ++ /* Make sure that the previously registered inactivity timer will not ++ * remove the STA immediately. */ ++ sta_ret->timeout_next = STA_NULLFUNC; ++ ++ sta_ret->flags |= WLAN_STA_AUTH | WLAN_STA_ASSOC; ++ ++ /* Then set the paramethers */ ++ int sRet = hostapd_sta_add( ++ hapd, mgmt->bssid, sta_ret->aid, ++ sta_ret->capability, ++ sta_ret->supported_rates, sta_ret->supported_rates_len, ++ 0, // u16 listen_interval TODO ? ++ sta_ret->ht_capabilities, ++ sta_ret->vht_capabilities, ++ sta_ret->he_capab, sta_ret->he_capab_len, ++ sta_ret->eht_capab, sta_ret->eht_capab_len, ++ sta_ret->he_6ghz_capab, ++ sta_ret->flags, ++ 0, // u8 qosinfo ++ sta_ret->vht_opmode, ++ 0, // int supp_p2p_ps ++ 1, // 0 add, 1 set ++ mld_link_addr, mld_link_sta); ++ ++ ap_sta_set_authorized(hapd, sta_ret, 1); ++ hostapd_set_sta_flags(hapd, sta_ret); ++ ++ char mIfname[IFNAMSIZ + 1]; ++ os_memset(mIfname, 0, IFNAMSIZ + 1); ++ ++ // last param 1 means add 0 means remove ++ int mRet = hostapd_set_wds_sta( ++ hapd, mIfname, mgmt->bssid, sta_ret->aid, 1); ++ ++ wpa_printf(MSG_INFO, ++ "apup_process_beacon(...) Added APuP peer at %s with flags: %d," ++ " capabilities %d", ++ mIfname, sta_ret->flags, sta_ret->capability); ++} +diff --git a/src/ap/apup.h b/src/ap/apup.h +new file mode 100644 +index 0000000000..a14a283bb4 +--- /dev/null ++++ b/src/ap/apup.h +@@ -0,0 +1,24 @@ ++/* ++ * hostapd / APuP Access Point Micro Peering ++ * ++ * Copyright (C) 2023-2024 Gioacchino Mazzurco ++ * ++ * This software may be distributed under the terms of the BSD license. ++ * See README for more details. ++ */ ++ ++/* Be extremely careful altering include order, move just one in the wrong place ++ * and you will start getting a bunch of error of undefined bool, size_t etc. */ ++ ++#include "utils/includes.h" ++#include "utils/common.h" ++ ++#include "hostapd.h" ++#include "common/ieee802_11_defs.h" ++ ++/** When beacons from other Access Point are received, if the SSID is matching ++ * add them as APuP peers (aka WDS STA to our own AP) the same happens on the ++ * peer when receiving our beacons */ ++void apup_process_beacon(struct hostapd_data *hapd, ++ const struct ieee80211_mgmt *mgmt, size_t len, ++ const struct ieee802_11_elems *elems ); +diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c +index 1c4dd22da1..09254f18f2 100644 +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -59,6 +59,9 @@ + #include "nan_usd_ap.h" + #include "pasn/pasn_common.h" + ++#ifdef CONFIG_APUP ++# include "apup.h" ++#endif // def CONFIG_APUP + + #ifdef CONFIG_FILS + static struct wpabuf * +@@ -3469,8 +3472,8 @@ static u16 check_multi_ap(struct hostapd_data *hapd, struct sta_info *sta, + } + + +-static u16 copy_supp_rates(struct hostapd_data *hapd, struct sta_info *sta, +- struct ieee802_11_elems *elems) ++u16 hostapd_copy_supp_rates(struct hostapd_data *hapd, struct sta_info *sta, ++ const struct ieee802_11_elems *elems) + { + /* Supported rates not used in IEEE 802.11ad/DMG */ + if (hapd->iface->current_mode && +@@ -3855,7 +3858,7 @@ static int __check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, + elems->ext_capab_len); + if (resp != WLAN_STATUS_SUCCESS) + return resp; +- resp = copy_supp_rates(hapd, sta, elems); ++ resp = hostapd_copy_supp_rates(hapd, sta, elems); + if (resp != WLAN_STATUS_SUCCESS) + return resp; + +@@ -5927,6 +5930,11 @@ static void handle_beacon(struct hostapd_data *hapd, + 0); + + ap_list_process_beacon(hapd->iface, mgmt, &elems, fi); ++ ++#ifdef CONFIG_APUP ++ if (hapd->conf->apup) ++ apup_process_beacon(hapd, mgmt, len, &elems); ++#endif // def CONFIG_APUP + } + + +diff --git a/src/ap/ieee802_11.h b/src/ap/ieee802_11.h +index a35486d464..0861bef82e 100644 +--- a/src/ap/ieee802_11.h ++++ b/src/ap/ieee802_11.h +@@ -108,6 +108,8 @@ int hostapd_process_ml_assoc_req_addr(struct hostapd_data *hapd, + const u8 *basic_mle, size_t basic_mle_len, + u8 *mld_addr); + int hostapd_get_aid(struct hostapd_data *hapd, struct sta_info *sta); ++u16 hostapd_copy_supp_rates(struct hostapd_data *hapd, struct sta_info *sta, ++ const struct ieee802_11_elems *elems); + u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta, + const u8 *ht_capab); + u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta, +diff --git a/src/drivers/driver.h b/src/drivers/driver.h +index 1bbb9672cd..8d26561e97 100644 +--- a/src/drivers/driver.h ++++ b/src/drivers/driver.h +@@ -3976,7 +3976,7 @@ struct wpa_driver_ops { + * Returns: 0 on success, -1 on failure + */ + int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val, +- const char *bridge_ifname, char *ifname_wds); ++ const char *bridge_ifname, const char *ifname_wds); + + /** + * send_action - Transmit an Action frame +diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c +index aeb1e6beef..b6e4ddd86d 100644 +--- a/src/drivers/driver_nl80211.c ++++ b/src/drivers/driver_nl80211.c +@@ -8415,24 +8415,14 @@ static int have_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx, + + + static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val, +- const char *bridge_ifname, char *ifname_wds) ++ const char *bridge_ifname, const char *ifname_wds) + { + struct i802_bss *bss = priv; + struct wpa_driver_nl80211_data *drv = bss->drv; +- char name[IFNAMSIZ + 1]; ++ const char *name = ifname_wds; // Kept to reduce changes to the minimum + union wpa_event_data event; + int ret; + +- ret = os_snprintf(name, sizeof(name), "%s.sta%d", bss->ifname, aid); +- if (ret >= (int) sizeof(name)) +- wpa_printf(MSG_WARNING, +- "nl80211: WDS interface name was truncated"); +- else if (ret < 0) +- return ret; +- +- if (ifname_wds) +- os_strlcpy(ifname_wds, name, IFNAMSIZ + 1); +- + wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR + " aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name); + if (val) { +-- +2.44.2 + diff --git a/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch new file mode 100644 index 0000000000..3746dde00a --- /dev/null +++ b/package/network/services/hostapd/patches/790-APuP-add-ubus-notification-when-a-peer-comes-up.patch @@ -0,0 +1,81 @@ +From 9a265f70b5e4e048c568564aed5f9ac4a4fd76b0 Mon Sep 17 00:00:00 2001 +From: Gioacchino Mazzurco +Date: Tue, 7 May 2024 10:37:54 +0200 +Subject: [PATCH 2/3] APuP add ubus notification when a peer comes up + +The notification ones get looks like +{ "apup-newpeer": {"address":"02:0a:ab:45:5a:ab","ifname":"wlan0.peer1"} } + +Signed-off-by: Gioacchino Mazzurco +--- + src/ap/apup.c | 8 ++++++++ + src/ap/ubus.c | 15 +++++++++++++++ + src/ap/ubus.h | 5 +++++ + 3 files changed, 28 insertions(+) + +diff --git a/src/ap/apup.c b/src/ap/apup.c +index 3575f1b6c6..3a3991f4d6 100644 +--- a/src/ap/apup.c ++++ b/src/ap/apup.c +@@ -23,6 +23,10 @@ + #include "ap_drv_ops.h" + #include "sta_info.h" + ++#ifdef UBUS_SUPPORT ++# include "ubus.h" ++#endif ++ + void apup_process_beacon(struct hostapd_data *hapd, + const struct ieee80211_mgmt *mgmt, size_t len, + const struct ieee802_11_elems *elems ) +@@ -149,4 +153,8 @@ void apup_process_beacon(struct hostapd_data *hapd, + "apup_process_beacon(...) Added APuP peer at %s with flags: %d," + " capabilities %d", + mIfname, sta_ret->flags, sta_ret->capability); ++ ++#ifdef UBUS_SUPPORT ++ hostapd_ubus_notify_apup_newpeer(hapd, mgmt->bssid, mIfname); ++#endif + } +diff --git a/src/ap/ubus.c b/src/ap/ubus.c +index 8689494bcf..f21516fc3c 100644 +--- a/src/ap/ubus.c ++++ b/src/ap/ubus.c +@@ -2004,3 +2004,18 @@ int hostapd_ubus_notify_bss_transition_query( + return ureq.resp; + #endif + } ++ ++#ifdef CONFIG_APUP ++void hostapd_ubus_notify_apup_newpeer( ++ struct hostapd_data *hapd, const u8 *addr, const char *ifname) ++{ ++ if (!hapd->ubus.obj.has_subscribers) ++ return; ++ ++ blob_buf_init(&b, 0); ++ blobmsg_add_macaddr(&b, "address", addr); ++ blobmsg_add_string(&b, "ifname", ifname); ++ ++ ubus_notify(ctx, &hapd->ubus.obj, "apup-newpeer", b.head, -1); ++} ++#endif // def CONFIG_APUP +diff --git a/src/ap/ubus.h b/src/ap/ubus.h +index 22767d67ee..1c65e4dcb9 100644 +--- a/src/ap/ubus.h ++++ b/src/ap/ubus.h +@@ -71,6 +71,11 @@ int hostapd_ubus_notify_bss_transition_query( + void hostapd_ubus_notify_authorized(struct hostapd_data *hapd, struct sta_info *sta, + const char *auth_alg); + ++#ifdef CONFIG_APUP ++void hostapd_ubus_notify_apup_newpeer( ++ struct hostapd_data *hapd, const u8 *addr, const char *ifname); ++#endif // def CONFIG_APUP ++ + #else + + struct hostapd_ubus_bss {}; +-- +2.44.2 + diff --git a/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch new file mode 100644 index 0000000000..c3e3633060 --- /dev/null +++ b/package/network/services/hostapd/patches/800-APuP-add-ucode-hook-for-when-a-peer-comes-up.patch @@ -0,0 +1,79 @@ +From aaeb60b39a72774c651187208ec47efd0daeb75b Mon Sep 17 00:00:00 2001 +From: Gioacchino Mazzurco +Date: Tue, 7 May 2024 11:54:23 +0200 +Subject: [PATCH 3/3] APuP add ucode hook for when a peer comes up + +Signed-off-by: Gioacchino Mazzurco +--- + src/ap/apup.c | 8 ++++++++ + src/ap/ucode.c | 17 +++++++++++++++++ + src/ap/ucode.h | 4 ++++ + 3 files changed, 29 insertions(+) + +diff --git a/src/ap/apup.c b/src/ap/apup.c +index 3a3991f4d6..f736ddc8e3 100644 +--- a/src/ap/apup.c ++++ b/src/ap/apup.c +@@ -27,6 +27,10 @@ + # include "ubus.h" + #endif + ++#ifdef UCODE_SUPPORT ++# include "ucode.h" ++#endif ++ + void apup_process_beacon(struct hostapd_data *hapd, + const struct ieee80211_mgmt *mgmt, size_t len, + const struct ieee802_11_elems *elems ) +@@ -157,4 +161,8 @@ void apup_process_beacon(struct hostapd_data *hapd, + #ifdef UBUS_SUPPORT + hostapd_ubus_notify_apup_newpeer(hapd, mgmt->bssid, mIfname); + #endif ++ ++#ifdef UCODE_SUPPORT ++ hostapd_ucode_apup_newpeer(hapd, mIfname); ++#endif + } +diff --git a/src/ap/ucode.c b/src/ap/ucode.c +index d344190208..391002feae 100644 +--- a/src/ap/ucode.c ++++ b/src/ap/ucode.c +@@ -811,3 +811,20 @@ void hostapd_ucode_free_bss(struct hostapd_data *hapd) + ucv_put(wpa_ucode_call(2)); + ucv_gc(vm); + } ++ ++#ifdef CONFIG_APUP ++void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname) ++{ ++ uc_value_t *val; ++ ++ if (wpa_ucode_call_prepare("apup_newpeer")) ++ return; ++ ++ val = hostapd_ucode_bss_get_uval(hapd); ++ uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); // BSS ifname ++ uc_value_push(ucv_get(val)); ++ uc_value_push(ucv_get(ucv_string_new(ifname))); // APuP peer ifname ++ ucv_put(wpa_ucode_call(2)); ++ ucv_gc(vm); ++} ++#endif // def CONFIG_APUP +diff --git a/src/ap/ucode.h b/src/ap/ucode.h +index d00b787169..c9bdde6516 100644 +--- a/src/ap/ucode.h ++++ b/src/ap/ucode.h +@@ -27,6 +27,10 @@ void hostapd_ucode_add_bss(struct hostapd_data *hapd); + void hostapd_ucode_free_bss(struct hostapd_data *hapd); + void hostapd_ucode_reload_bss(struct hostapd_data *hapd); + ++#ifdef CONFIG_APUP ++void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname); ++#endif // def CONFIG_APUP ++ + #else + + static inline int hostapd_ucode_init(struct hapd_interfaces *ifaces) +-- +2.44.2 + From 30092019fe6249d9cded6a27e6ceb24e82fbbb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Thu, 1 Aug 2024 17:59:42 +0200 Subject: [PATCH 28/31] toolchain: gcc: update GCC 14 to 14.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All patches automatically rebased. Signed-off-by: Thomas Weißschuh Link: https://github.com/openwrt/openwrt/pull/16047 Signed-off-by: Hauke Mehrtens --- toolchain/gcc/Config.version | 2 +- toolchain/gcc/common.mk | 4 ++-- .../gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version index dc2ff9bff0..49bb36865e 100644 --- a/toolchain/gcc/Config.version +++ b/toolchain/gcc/Config.version @@ -15,7 +15,7 @@ config GCC_VERSION default EXTERNAL_GCC_VERSION if EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN 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 "14.2.0" if GCC_VERSION_14 default "13.3.0" config GCC_USE_DEFAULT_VERSION diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk index 2161ce72e4..0ccf55bd31 100644 --- a/toolchain/gcc/common.mk +++ b/toolchain/gcc/common.mk @@ -42,8 +42,8 @@ ifeq ($(PKG_VERSION),13.3.0) PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083 endif -ifeq ($(PKG_VERSION),14.1.0) - PKG_HASH:=e283c654987afe3de9d8080bc0bd79534b5ca0d681a73a11ff2b5d3767426840 +ifeq ($(PKG_VERSION),14.2.0) + PKG_HASH:=a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9 endif PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x diff --git a/toolchain/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch index 2d65ba1b1f..2cbffe4517 100644 --- a/toolchain/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch +++ b/toolchain/gcc/patches-14.x/300-mips_Os_cpu_rtx_cost_model.patch @@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau --- a/gcc/config/mips/mips.cc +++ b/gcc/config/mips/mips.cc -@@ -20444,7 +20444,7 @@ mips_option_override (void) +@@ -20453,7 +20453,7 @@ mips_option_override (void) flag_pcc_struct_return = 0; /* Decide which rtx_costs structure to use. */ From 626fa7552654cc5e266a07eef43dc45d1899c445 Mon Sep 17 00:00:00 2001 From: John Audia Date: Sun, 11 Aug 2024 10:57:59 -0400 Subject: [PATCH 29/31] kernel: bump 6.6 to 6.6.45 and update config-6.6 Build on at leasst x86/64 failed without adding the new ksym: CONFIG_PCP_BATCH_SCALE_MAX=5 According to www.kernelconfig.io[1], this option seems to apply to all arches so I placed it in target/linux/generic/config-6.6 Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.45 Removed upstreamed: generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch[2] All other patches automatically rebased. 1. https://www.kernelconfig.io/config_pcp_batch_scale_max?q=&kernelversion=6.10.3&arch=x86 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.45&id=b45cbfa204b2a0985eb85dcb33d51714ee089bb9 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 Link: https://github.com/openwrt/openwrt/pull/16144 Signed-off-by: Hauke Mehrtens --- include/kernel-6.6 | 4 +- .../900-unaligned_access_hacks.patch | 8 ++-- ...ci_sync-Add-fallback-bd-address-prop.patch | 4 +- ...add-support-for-RTL8366S-Gigabit-PHY.patch | 48 ------------------- ...support-for-LED-s-on-RTL8168-RTL8101.patch | 4 +- ...ix-building-with-CONFIG_LEDS_CLASS-m.patch | 2 +- ...-v6.9-r8169-add-support-for-RTL8126A.patch | 2 +- ...-add-LED-support-for-RTL8125-RTL8126.patch | 2 +- ...D-related-deadlock-on-module-removal.patch | 4 +- ...g-conditional-compiling-for-call-to-.patch | 2 +- ...igger-netdev-Extend-speeds-up-to-10G.patch | 2 +- target/linux/generic/config-6.6 | 1 + .../generic/hack-6.6/253-ksmbd-config.patch | 2 +- .../0001-MIPS-lantiq-add-pcie-driver.patch | 2 +- ...q-qcom-nvmem-add-support-for-IPQ6018.patch | 6 +-- ...q-qcom-nvmem-add-support-for-IPQ8074.patch | 6 +-- ...pq8074-include-the-GPLL0-as-clock-pr.patch | 2 +- ...com-Fix-hs_phy_irq-for-QUSB2-targets.patch | 2 +- ...qcom-ipq8074-use-msi-parent-for-PCIe.patch | 6 +-- ...com-Enable-Q6v5-WCSS-for-ipq8074-SoC.patch | 2 +- ...0121-arm64-dts-ipq8074-Add-WLAN-node.patch | 2 +- 21 files changed, 33 insertions(+), 80 deletions(-) delete mode 100644 target/linux/generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 477ed1109b..3b0f9cbf1c 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .44 -LINUX_KERNEL_HASH-6.6.44 = 93218296934915636fe6ba08e125948424cc270fd8948502c0ab91087a9fccd8 +LINUX_VERSION-6.6 = .45 +LINUX_KERNEL_HASH-6.6.45 = 121bed240767e4a0959c1609e78eeaaf3e0620d9d1a5ed1f6e36bdf609c4f179 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 8e91a243c4..c09a095236 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 @@ -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 -@@ -620,48 +620,53 @@ static void tcp_options_write(struct tcp +@@ -622,48 +622,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)) { -@@ -669,16 +674,17 @@ static void tcp_options_write(struct tcp +@@ -671,16 +676,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; -@@ -691,13 +697,14 @@ static void tcp_options_write(struct tcp +@@ -693,13 +699,14 @@ static void tcp_options_write(struct tcp if (foc->exp) { len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len; @@ -751,7 +751,7 @@ SVN-Revision: 35130 EXPORT_SYMBOL(xfrm_parse_spi); --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c -@@ -4214,14 +4214,16 @@ static bool tcp_parse_aligned_timestamp( +@@ -4225,14 +4225,16 @@ static bool tcp_parse_aligned_timestamp( { const __be32 *ptr = (const __be32 *)(th + 1); diff --git a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch index 218ad5dbe5..bcf94f9a6e 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4672,6 +4672,7 @@ static const struct { +@@ -4693,6 +4693,7 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { @@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell int ret = 0; bool invalid_bdaddr; size_t i; -@@ -4700,7 +4701,8 @@ static int hci_dev_setup_sync(struct hci +@@ -4721,7 +4722,8 @@ static int hci_dev_setup_sync(struct hci test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); if (!ret) { if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) && diff --git a/target/linux/generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch b/target/linux/generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch deleted file mode 100644 index f6bc97a60b..0000000000 --- a/target/linux/generic/backport-6.6/719-v6.11-net-phy-realtek-add-support-for-RTL8366S-Gigabit-PHY.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 225990c487c1023e7b3aa89beb6a68011fbc0461 Mon Sep 17 00:00:00 2001 -From: Mark Mentovai -Date: Thu, 25 Jul 2024 16:41:44 -0400 -Subject: [PATCH] net: phy: realtek: add support for RTL8366S Gigabit PHY - -The PHY built in to the Realtek RTL8366S switch controller was -previously supported by genphy_driver. This PHY does not implement MMD -operations. Since commit 9b01c885be36 ("net: phy: c22: migrate to -genphy_c45_write_eee_adv()"), MMD register reads have been made during -phy_probe to determine EEE support. For genphy_driver, these reads are -transformed into 802.3 annex 22D clause 45-over-clause 22 -mmd_phy_indirect operations that perform MII register writes to -MII_MMD_CTRL and MII_MMD_DATA. This overwrites those two MII registers, -which on this PHY are reserved and have another function, rendering the -PHY unusable while so configured. - -Proper support for this PHY is restored by providing a phy_driver that -declares MMD operations as unsupported by using the helper functions -provided for that purpose, while remaining otherwise identical to -genphy_driver. - -Fixes: 9b01c885be36 ("net: phy: c22: migrate to genphy_c45_write_eee_adv()") -Reported-by: Russell Senior -Closes: https://github.com/openwrt/openwrt/issues/15981 -Link: https://github.com/openwrt/openwrt/issues/15739 -Signed-off-by: Mark Mentovai -Reviewed-by: Maxime Chevallier -Signed-off-by: David S. Miller ---- - drivers/net/phy/realtek.c | 7 +++++++ - 1 file changed, 7 insertions(+) - ---- a/drivers/net/phy/realtek.c -+++ b/drivers/net/phy/realtek.c -@@ -1083,6 +1083,13 @@ static struct phy_driver realtek_drvs[] - .handle_interrupt = genphy_handle_interrupt_no_ack, - .suspend = genphy_suspend, - .resume = genphy_resume, -+ }, { -+ PHY_ID_MATCH_EXACT(0x001cc960), -+ .name = "RTL8366S Gigabit Ethernet", -+ .suspend = genphy_suspend, -+ .resume = genphy_resume, -+ .read_mmd = genphy_read_mmd_unsupported, -+ .write_mmd = genphy_write_mmd_unsupported, - }, - }; - diff --git a/target/linux/generic/backport-6.6/780-01-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch b/target/linux/generic/backport-6.6/780-01-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch index 3345ebf6c6..fe75a4e3f8 100644 --- a/target/linux/generic/backport-6.6/780-01-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch +++ b/target/linux/generic/backport-6.6/780-01-v6.8-r8169-add-support-for-LED-s-on-RTL8168-RTL8101.patch @@ -296,7 +296,7 @@ Signed-off-by: David S. Miller static void r8168fp_adjust_ocp_cmd(struct rtl8169_private *tp, u32 *cmd, int type) { /* based on RTL8168FP_OOBMAC_BASE in vendor driver */ -@@ -5258,6 +5316,7 @@ static int rtl_init_one(struct pci_dev * +@@ -5254,6 +5312,7 @@ static int rtl_init_one(struct pci_dev * raw_spin_lock_init(&tp->cfg9346_usage_lock); raw_spin_lock_init(&tp->config25_lock); raw_spin_lock_init(&tp->mac_ocp_lock); @@ -304,7 +304,7 @@ Signed-off-by: David S. Miller dev->tstats = devm_netdev_alloc_pcpu_stats(&pdev->dev, struct pcpu_sw_netstats); -@@ -5414,6 +5473,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5410,6 +5469,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-02-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch b/target/linux/generic/backport-6.6/780-02-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch index cea88c042a..1b83cf4cda 100644 --- a/target/linux/generic/backport-6.6/780-02-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch +++ b/target/linux/generic/backport-6.6/780-02-v6.8-r8169-fix-building-with-CONFIG_LEDS_CLASS-m.patch @@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski obj-$(CONFIG_R8169) += r8169.o --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5473,11 +5473,10 @@ static int rtl_init_one(struct pci_dev * +@@ -5469,11 +5469,10 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-03-v6.9-r8169-add-support-for-RTL8126A.patch b/target/linux/generic/backport-6.6/780-03-v6.9-r8169-add-support-for-RTL8126A.patch index 5ab160855a..ab38b0cfb9 100644 --- a/target/linux/generic/backport-6.6/780-03-v6.9-r8169-add-support-for-RTL8126A.patch +++ b/target/linux/generic/backport-6.6/780-03-v6.9-r8169-add-support-for-RTL8126A.patch @@ -321,7 +321,7 @@ Signed-off-by: David S. Miller padto = max_t(unsigned int, padto, ETH_ZLEN); break; default: -@@ -5225,7 +5282,7 @@ static void rtl_hw_initialize(struct rtl +@@ -5221,7 +5278,7 @@ static void rtl_hw_initialize(struct rtl case RTL_GIGA_MAC_VER_40 ... RTL_GIGA_MAC_VER_48: rtl_hw_init_8168g(tp); break; diff --git a/target/linux/generic/backport-6.6/780-05-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch b/target/linux/generic/backport-6.6/780-05-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch index 742ee578b2..b897e04de9 100644 --- a/target/linux/generic/backport-6.6/780-05-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch +++ b/target/linux/generic/backport-6.6/780-05-v6.9-r8169-add-LED-support-for-RTL8125-RTL8126.patch @@ -225,7 +225,7 @@ Signed-off-by: Jakub Kicinski void r8169_get_led_name(struct rtl8169_private *tp, int idx, char *buf, int buf_len) { -@@ -5530,10 +5581,12 @@ static int rtl_init_one(struct pci_dev * +@@ -5526,10 +5577,12 @@ static int rtl_init_one(struct pci_dev * if (rc) return rc; diff --git a/target/linux/generic/backport-6.6/780-08-v6.10-r8169-fix-LED-related-deadlock-on-module-removal.patch b/target/linux/generic/backport-6.6/780-08-v6.10-r8169-fix-LED-related-deadlock-on-module-removal.patch index 52019869a8..c179a37252 100644 --- a/target/linux/generic/backport-6.6/780-08-v6.10-r8169-fix-LED-related-deadlock-on-module-removal.patch +++ b/target/linux/generic/backport-6.6/780-08-v6.10-r8169-fix-LED-related-deadlock-on-module-removal.patch @@ -124,7 +124,7 @@ Signed-off-by: David S. Miller u32 ocp_base; }; -@@ -5126,6 +5128,8 @@ static void rtl_remove_one(struct pci_de +@@ -5122,6 +5124,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); @@ -133,7 +133,7 @@ Signed-off-by: David S. Miller unregister_netdev(tp->dev); if (tp->dash_type != RTL_DASH_NONE) -@@ -5586,9 +5590,9 @@ static int rtl_init_one(struct pci_dev * +@@ -5582,9 +5586,9 @@ static int rtl_init_one(struct pci_dev * if (IS_ENABLED(CONFIG_R8169_LEDS)) { if (rtl_is_8125(tp)) diff --git a/target/linux/generic/backport-6.6/780-09-v6.10-r8169-add-missing-conditional-compiling-for-call-to-.patch b/target/linux/generic/backport-6.6/780-09-v6.10-r8169-add-missing-conditional-compiling-for-call-to-.patch index cfe552046e..abd7d1c36c 100644 --- a/target/linux/generic/backport-6.6/780-09-v6.10-r8169-add-missing-conditional-compiling-for-call-to-.patch +++ b/target/linux/generic/backport-6.6/780-09-v6.10-r8169-add-missing-conditional-compiling-for-call-to-.patch @@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c -@@ -5128,7 +5128,8 @@ static void rtl_remove_one(struct pci_de +@@ -5124,7 +5124,8 @@ static void rtl_remove_one(struct pci_de cancel_work_sync(&tp->wk.work); diff --git a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch index 2ae209f9e1..4571d7d2bf 100644 --- a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch +++ b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch @@ -99,7 +99,7 @@ Signed-off-by: Lee Jones interval = jiffies_to_msecs( --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -588,6 +588,9 @@ enum led_trigger_netdev_modes { +@@ -586,6 +586,9 @@ enum led_trigger_netdev_modes { TRIGGER_NETDEV_LINK_10, TRIGGER_NETDEV_LINK_100, TRIGGER_NETDEV_LINK_1000, diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6 index 6437cd2412..e5c5360608 100644 --- a/target/linux/generic/config-6.6 +++ b/target/linux/generic/config-6.6 @@ -4546,6 +4546,7 @@ CONFIG_PCI_SYSCALL=y # CONFIG_PCMCIA_XIRCOM is not set # CONFIG_PCNET32 is not set # CONFIG_PCPU_DEV_REFCNT is not set +CONFIG_PCP_BATCH_SCALE_MAX=5 # CONFIG_PCSPKR_PLATFORM is not set # CONFIG_PCS_MTK_USXGMII is not set # CONFIG_PCS_XPCS is not set diff --git a/target/linux/generic/hack-6.6/253-ksmbd-config.patch b/target/linux/generic/hack-6.6/253-ksmbd-config.patch index b200d2ce60..7642b38938 100644 --- a/target/linux/generic/hack-6.6/253-ksmbd-config.patch +++ b/target/linux/generic/hack-6.6/253-ksmbd-config.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string --- a/init/Kconfig +++ b/init/Kconfig -@@ -1989,7 +1989,7 @@ config PADATA +@@ -1990,7 +1990,7 @@ config PADATA bool config ASN1 diff --git a/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch index fea925247b..b796de9c11 100644 --- a/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch +++ b/target/linux/lantiq/patches-6.6/0001-MIPS-lantiq-add-pcie-driver.patch @@ -5524,7 +5524,7 @@ Signed-off-by: John Crispin (transaction layer end-to-end CRC checking). --- a/include/linux/pci.h +++ b/include/linux/pci.h -@@ -1600,6 +1600,8 @@ void pci_walk_bus_locked(struct pci_bus +@@ -1602,6 +1602,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); diff --git a/target/linux/qualcommax/patches-6.6/0025-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ6018.patch b/target/linux/qualcommax/patches-6.6/0025-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ6018.patch index 6b305cc282..95c6c9505d 100644 --- a/target/linux/qualcommax/patches-6.6/0025-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ6018.patch +++ b/target/linux/qualcommax/patches-6.6/0025-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ6018.patch @@ -44,7 +44,7 @@ Signed-off-by: Viresh Kumar struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -203,6 +205,57 @@ len_error: +@@ -207,6 +209,57 @@ len_error: return ret; } @@ -102,7 +102,7 @@ Signed-off-by: Viresh Kumar static const struct qcom_cpufreq_match_data match_data_kryo = { .get_version = qcom_cpufreq_kryo_name_version, }; -@@ -217,6 +270,10 @@ static const struct qcom_cpufreq_match_d +@@ -221,6 +274,10 @@ static const struct qcom_cpufreq_match_d .genpd_names = qcs404_genpd_names, }; @@ -113,7 +113,7 @@ Signed-off-by: Viresh Kumar static int qcom_cpufreq_probe(struct platform_device *pdev) { struct qcom_cpufreq_drv *drv; -@@ -359,6 +416,7 @@ static const struct of_device_id qcom_cp +@@ -353,6 +410,7 @@ static const struct of_device_id qcom_cp { .compatible = "qcom,apq8096", .data = &match_data_kryo }, { .compatible = "qcom,msm8996", .data = &match_data_kryo }, { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, diff --git a/target/linux/qualcommax/patches-6.6/0026-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch b/target/linux/qualcommax/patches-6.6/0026-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch index 8ff3b5f9b1..5640038404 100644 --- a/target/linux/qualcommax/patches-6.6/0026-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch +++ b/target/linux/qualcommax/patches-6.6/0026-v6.7-cpufreq-qcom-nvmem-add-support-for-IPQ8074.patch @@ -47,7 +47,7 @@ Signed-off-by: Viresh Kumar struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -256,6 +261,44 @@ static int qcom_cpufreq_ipq6018_name_ver +@@ -260,6 +265,44 @@ static int qcom_cpufreq_ipq6018_name_ver return 0; } @@ -92,7 +92,7 @@ Signed-off-by: Viresh Kumar static const struct qcom_cpufreq_match_data match_data_kryo = { .get_version = qcom_cpufreq_kryo_name_version, }; -@@ -274,6 +317,10 @@ static const struct qcom_cpufreq_match_d +@@ -278,6 +321,10 @@ static const struct qcom_cpufreq_match_d .get_version = qcom_cpufreq_ipq6018_name_version, }; @@ -103,7 +103,7 @@ Signed-off-by: Viresh Kumar static int qcom_cpufreq_probe(struct platform_device *pdev) { struct qcom_cpufreq_drv *drv; -@@ -418,6 +465,7 @@ static const struct of_device_id qcom_cp +@@ -412,6 +459,7 @@ static const struct of_device_id qcom_cp { .compatible = "qcom,qcs404", .data = &match_data_qcs404 }, { .compatible = "qcom,ipq6018", .data = &match_data_ipq6018 }, { .compatible = "qcom,ipq8064", .data = &match_data_krait }, diff --git a/target/linux/qualcommax/patches-6.6/0028-v6.7-arm64-dts-qcom-ipq8074-include-the-GPLL0-as-clock-pr.patch b/target/linux/qualcommax/patches-6.6/0028-v6.7-arm64-dts-qcom-ipq8074-include-the-GPLL0-as-clock-pr.patch index 7607bdad8b..6b7dd2f261 100644 --- a/target/linux/qualcommax/patches-6.6/0028-v6.7-arm64-dts-qcom-ipq8074-include-the-GPLL0-as-clock-pr.patch +++ b/target/linux/qualcommax/patches-6.6/0028-v6.7-arm64-dts-qcom-ipq8074-include-the-GPLL0-as-clock-pr.patch @@ -19,7 +19,7 @@ Reviewed-by: Konrad Dybcio --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi -@@ -721,8 +721,8 @@ +@@ -723,8 +723,8 @@ compatible = "qcom,ipq8074-apcs-apps-global", "qcom,ipq6018-apcs-apps-global"; reg = <0x0b111000 0x1000>; diff --git a/target/linux/qualcommax/patches-6.6/0056-v6.9-arm64-dts-qcom-Fix-hs_phy_irq-for-QUSB2-targets.patch b/target/linux/qualcommax/patches-6.6/0056-v6.9-arm64-dts-qcom-Fix-hs_phy_irq-for-QUSB2-targets.patch index 8eb3915057..6559f3bbe9 100644 --- a/target/linux/qualcommax/patches-6.6/0056-v6.9-arm64-dts-qcom-Fix-hs_phy_irq-for-QUSB2-targets.patch +++ b/target/linux/qualcommax/patches-6.6/0056-v6.9-arm64-dts-qcom-Fix-hs_phy_irq-for-QUSB2-targets.patch @@ -79,7 +79,7 @@ Signed-off-by: Bjorn Andersson power-domains = <&gcc USB0_GDSC>; resets = <&gcc GCC_USB0_BCR>; -@@ -674,6 +681,13 @@ +@@ -675,6 +682,13 @@ <133330000>, <19200000>; diff --git a/target/linux/qualcommax/patches-6.6/0111-arm64-dts-qcom-ipq8074-use-msi-parent-for-PCIe.patch b/target/linux/qualcommax/patches-6.6/0111-arm64-dts-qcom-ipq8074-use-msi-parent-for-PCIe.patch index dc009cd414..fdf7f84b92 100644 --- a/target/linux/qualcommax/patches-6.6/0111-arm64-dts-qcom-ipq8074-use-msi-parent-for-PCIe.patch +++ b/target/linux/qualcommax/patches-6.6/0111-arm64-dts-qcom-ipq8074-use-msi-parent-for-PCIe.patch @@ -12,7 +12,7 @@ Signed-off-by: Robert Marko --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi -@@ -755,7 +755,7 @@ +@@ -757,7 +757,7 @@ reg = <0x0b000000 0x1000>, <0x0b002000 0x1000>; ranges = <0 0xb00a000 0xffd>; @@ -21,7 +21,7 @@ Signed-off-by: Robert Marko compatible = "arm,gic-v2m-frame"; msi-controller; reg = <0x0 0xffd>; -@@ -868,8 +868,7 @@ +@@ -870,8 +870,7 @@ ranges = <0x81000000 0x0 0x00000000 0x10200000 0x0 0x10000>, /* I/O */ <0x82000000 0x0 0x10220000 0x10220000 0x0 0xfde0000>; /* MEM */ @@ -31,7 +31,7 @@ Signed-off-by: Robert Marko #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 0x7>; interrupt-map = <0 0 0 1 &intc 0 0 142 -@@ -930,8 +929,7 @@ +@@ -932,8 +931,7 @@ ranges = <0x81000000 0x0 0x00000000 0x20200000 0x0 0x10000>, /* I/O */ <0x82000000 0x0 0x20220000 0x20220000 0x0 0xfde0000>; /* MEM */ diff --git a/target/linux/qualcommax/patches-6.6/0120-arm64-dts-qcom-Enable-Q6v5-WCSS-for-ipq8074-SoC.patch b/target/linux/qualcommax/patches-6.6/0120-arm64-dts-qcom-Enable-Q6v5-WCSS-for-ipq8074-SoC.patch index 2ea9bcb9fc..07f5144108 100644 --- a/target/linux/qualcommax/patches-6.6/0120-arm64-dts-qcom-Enable-Q6v5-WCSS-for-ipq8074-SoC.patch +++ b/target/linux/qualcommax/patches-6.6/0120-arm64-dts-qcom-Enable-Q6v5-WCSS-for-ipq8074-SoC.patch @@ -61,7 +61,7 @@ Signed-off-by: Robert Marko spmi_bus: spmi@200f000 { compatible = "qcom,spmi-pmic-arb"; reg = <0x0200f000 0x001000>, -@@ -970,6 +1001,56 @@ +@@ -972,6 +1003,56 @@ "axi_s_sticky"; status = "disabled"; }; diff --git a/target/linux/qualcommax/patches-6.6/0121-arm64-dts-ipq8074-Add-WLAN-node.patch b/target/linux/qualcommax/patches-6.6/0121-arm64-dts-ipq8074-Add-WLAN-node.patch index 627b0711b7..ef34c50eca 100644 --- a/target/linux/qualcommax/patches-6.6/0121-arm64-dts-ipq8074-Add-WLAN-node.patch +++ b/target/linux/qualcommax/patches-6.6/0121-arm64-dts-ipq8074-Add-WLAN-node.patch @@ -15,7 +15,7 @@ Signed-off-by: Robert Marko --- a/arch/arm64/boot/dts/qcom/ipq8074.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq8074.dtsi -@@ -1051,6 +1051,117 @@ +@@ -1053,6 +1053,117 @@ }; }; }; From 46317659e1b3f4380630b402c6e949010bf71069 Mon Sep 17 00:00:00 2001 From: Zxl hhyccc Date: Sun, 11 Aug 2024 20:40:56 +0800 Subject: [PATCH 30/31] kernel: bump 6.1 to 6.1.104 https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.104 All patches automatically rebased. 1 mm: restrict the pcp batch scale factor to avoid too long latency a new kconfig option (PCP_BATCH_SCALE_MAX) is added to set the max batch scale factor.Whose default value is 5, and users can reduce it when necessary. https://lore.kernel.org/all/20231016053002.756205-5-ying.huang@intel.com/T/#u Build system: bcm4908 bcm53xx Signed-off-by: Zxl hhyccc Link: https://github.com/openwrt/openwrt/pull/16141 Signed-off-by: Hauke Mehrtens --- include/kernel-6.1 | 4 ++-- ...BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch | 2 +- ...leds-trigger-netdev-expose-netdev-trigger-modes-in-l.patch | 2 +- ...leds-trigger-netdev-add-additional-specific-link-spe.patch | 2 +- ...leds-trigger-netdev-add-additional-specific-link-dup.patch | 2 +- ...4-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch | 2 +- ...6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch | 2 +- ...834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch | 2 +- target/linux/generic/config-6.1 | 1 + target/linux/generic/hack-6.1/253-ksmbd-config.patch | 2 +- ...20-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch | 2 +- 11 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/kernel-6.1 b/include/kernel-6.1 index 8441fb5cc0..d2746a37e3 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .103 -LINUX_KERNEL_HASH-6.1.103 = 5eb4706f898f50881552ff5146d892132d3ffc5298033bffe27087d3a44c4573 +LINUX_VERSION-6.1 = .104 +LINUX_KERNEL_HASH-6.1.104 = 5cfa326492241397e15c3601ccd3c9dfb72436674f364b470e9d1d5642759976 diff --git a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch index 2a26602d92..d089d12dd6 100644 --- a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch +++ b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch @@ -361,7 +361,7 @@ Signed-off-by: T.J. Mercier static void mem_cgroup_css_free(struct cgroup_subsys_state *css) --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7949,6 +7949,7 @@ static void __init free_area_init_node(i +@@ -7956,6 +7956,7 @@ static void __init free_area_init_node(i pgdat_set_deferred_range(pgdat); free_area_init_core(pgdat); diff --git a/target/linux/generic/backport-6.1/804-v6.5-11-leds-trigger-netdev-expose-netdev-trigger-modes-in-l.patch b/target/linux/generic/backport-6.1/804-v6.5-11-leds-trigger-netdev-expose-netdev-trigger-modes-in-l.patch index 70aed850d1..f23504b1d0 100644 --- a/target/linux/generic/backport-6.1/804-v6.5-11-leds-trigger-netdev-expose-netdev-trigger-modes-in-l.patch +++ b/target/linux/generic/backport-6.1/804-v6.5-11-leds-trigger-netdev-expose-netdev-trigger-modes-in-l.patch @@ -35,7 +35,7 @@ Signed-off-by: David S. Miller int current_brightness; --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -527,6 +527,16 @@ static inline void *led_get_trigger_data +@@ -525,6 +525,16 @@ led_trigger_get_brightness(const struct #endif /* CONFIG_LEDS_TRIGGERS */ diff --git a/target/linux/generic/backport-6.1/805-v6.5-01-leds-trigger-netdev-add-additional-specific-link-spe.patch b/target/linux/generic/backport-6.1/805-v6.5-01-leds-trigger-netdev-add-additional-specific-link-spe.patch index 1c564b3897..38989a2a63 100644 --- a/target/linux/generic/backport-6.1/805-v6.5-01-leds-trigger-netdev-add-additional-specific-link-spe.patch +++ b/target/linux/generic/backport-6.1/805-v6.5-01-leds-trigger-netdev-add-additional-specific-link-spe.patch @@ -230,7 +230,7 @@ Signed-off-by: Jakub Kicinski /* base state is ON (link present) */ --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -530,6 +530,9 @@ static inline void *led_get_trigger_data +@@ -528,6 +528,9 @@ led_trigger_get_brightness(const struct /* Trigger specific enum */ enum led_trigger_netdev_modes { TRIGGER_NETDEV_LINK = 0, diff --git a/target/linux/generic/backport-6.1/805-v6.5-02-leds-trigger-netdev-add-additional-specific-link-dup.patch b/target/linux/generic/backport-6.1/805-v6.5-02-leds-trigger-netdev-add-additional-specific-link-dup.patch index a5ab461828..9021326991 100644 --- a/target/linux/generic/backport-6.1/805-v6.5-02-leds-trigger-netdev-add-additional-specific-link-dup.patch +++ b/target/linux/generic/backport-6.1/805-v6.5-02-leds-trigger-netdev-add-additional-specific-link-dup.patch @@ -127,7 +127,7 @@ Signed-off-by: Jakub Kicinski /* base state is ON (link present) */ --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -533,6 +533,8 @@ enum led_trigger_netdev_modes { +@@ -531,6 +531,8 @@ enum led_trigger_netdev_modes { TRIGGER_NETDEV_LINK_10, TRIGGER_NETDEV_LINK_100, TRIGGER_NETDEV_LINK_1000, diff --git a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch index e0f10f7642..25a718bd7e 100644 --- a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch +++ b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch @@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com enum _msm8996_version { MSM8996_V3, -@@ -153,12 +148,12 @@ static enum _msm8996_version qcom_cpufre +@@ -157,12 +152,12 @@ static enum _msm8996_version qcom_cpufre msm_id++; switch ((enum _msm_id)*msm_id) { diff --git a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch index 93e776f62c..49d222662c 100644 --- a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch +++ b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch @@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com struct qcom_cpufreq_drv; struct qcom_cpufreq_match_data { -@@ -134,60 +126,32 @@ static void get_krait_bin_format_b(struc +@@ -138,60 +130,32 @@ static void get_krait_bin_format_b(struc dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver); } diff --git a/target/linux/generic/backport-6.1/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch b/target/linux/generic/backport-6.1/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch index 1c8e014a1a..9d5a928f5f 100644 --- a/target/linux/generic/backport-6.1/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch +++ b/target/linux/generic/backport-6.1/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch @@ -99,7 +99,7 @@ Signed-off-by: Lee Jones interval = jiffies_to_msecs( --- a/include/linux/leds.h +++ b/include/linux/leds.h -@@ -533,6 +533,9 @@ enum led_trigger_netdev_modes { +@@ -531,6 +531,9 @@ enum led_trigger_netdev_modes { TRIGGER_NETDEV_LINK_10, TRIGGER_NETDEV_LINK_100, TRIGGER_NETDEV_LINK_1000, diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index aa47384137..1b657ea214 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -4838,6 +4838,7 @@ CONFIG_PCI_SYSCALL=y # CONFIG_PCMCIA_XIRC2PS is not set # CONFIG_PCMCIA_XIRCOM is not set # CONFIG_PCNET32 is not set +CONFIG_PCP_BATCH_SCALE_MAX=5 # CONFIG_PCPU_DEV_REFCNT is not set # CONFIG_PCSPKR_PLATFORM is not set # CONFIG_PCS_MTK_USXGMII is not set diff --git a/target/linux/generic/hack-6.1/253-ksmbd-config.patch b/target/linux/generic/hack-6.1/253-ksmbd-config.patch index a57c914180..79bd687981 100644 --- a/target/linux/generic/hack-6.1/253-ksmbd-config.patch +++ b/target/linux/generic/hack-6.1/253-ksmbd-config.patch @@ -10,7 +10,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string --- a/init/Kconfig +++ b/init/Kconfig -@@ -2013,7 +2013,7 @@ config PADATA +@@ -2014,7 +2014,7 @@ config PADATA bool config ASN1 diff --git a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch index edee0e46a5..8fea984a33 100644 --- a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch +++ b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch @@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7903,7 +7903,7 @@ static void __init alloc_node_mem_map(st +@@ -7910,7 +7910,7 @@ static void __init alloc_node_mem_map(st if (pgdat == NODE_DATA(0)) { mem_map = NODE_DATA(0)->node_mem_map; if (page_to_pfn(mem_map) != pgdat->node_start_pfn) From f51cb7447390949feff598b833b764ac1f3ff508 Mon Sep 17 00:00:00 2001 From: Anton Stratonnikov Date: Tue, 26 Dec 2023 01:35:24 +0300 Subject: [PATCH 31/31] ramips: add support for Xiaomi R4AC v2 (intl) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The second edition of international version of Mi Router 4A 100M is very similar to the non-international one, but has another wireless chip. Installation -------------- 1. Initialize build-in firmware (use webgui for 192.168.31.1) You should install root password 2. Run OpenWRTInvasion for the first time (probably it will fail) Version 0.0.10 is working as well as 0.0.1. 3. Run OpenWRTInvasion for the second time It will create an access to your router 4. Upload sysupgrade image to router (/tmp/fw.bin) pc# nc -l 8080 < …/ramips/mt76x8/…-100m-intl-v2-squashfs-sysupgrade.bin router# nc 192.168.31.175 8080 > /tmp/fw.bin 5. Flash new firmware router# run mtd -r write /tmp/fw.bin OS1 6. Check result Wait about 5-10 minutes after flash. Router should reboot itself and turn left led from orange to blue. In case of failure one can use Xiaomi 4a 100m debrick tool (it uploads special image via tftpd in recovery mode) After that you can start again from step 1. Another actions are very similar to original Mi Router 4A 100M Original mtd paritions: ------------------------- ``` Creating 9 MTD partitions on "raspi": 0x000000000000-0x000001000000 : "ALL" 0x000000000000-0x000000020000 : "Bootloader" 0x000000020000-0x000000030000 : "Config" 0x000000030000-0x000000040000 : "Factory" 0x000000040000-0x000000050000 : "crash" 0x000000050000-0x000000060000 : "cfg_bak" 0x000000060000-0x000000160000 : "overlay" 0x000000160000-0x000000dc0000 : "OS1" 0x000000dc0000-0x000001000000 : "disk" with special sub-partition 0x0000002c0000-0x000000dc0000 : "rootfs" ``` We will use OS1+disk space: ``` 0x000000160000-0x000001000000 : "firmware" ``` Co-authored-by: Nita Vesa Signed-off-by: Anton Stratonnikov Link: https://github.com/openwrt/openwrt/pull/14304 Signed-off-by: Hauke Mehrtens --- ...628an_xiaomi_mi-router-4a-100m-intl-v2.dts | 94 +++++++++++++++++++ target/linux/ramips/image/mt76x8.mk | 9 ++ .../mt76x8/base-files/etc/board.d/01_leds | 3 +- .../mt76x8/base-files/etc/board.d/02_network | 4 +- 4 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl-v2.dts diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl-v2.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl-v2.dts new file mode 100644 index 0000000000..b12901bd5b --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m-intl-v2.dts @@ -0,0 +1,94 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include + +#include "mt7628an_xiaomi_mi-router-4.dtsi" + +/ { + compatible = "xiaomi,mi-router-4a-100m-intl-v2", "mediatek,mt7628an-soc"; + model = "Xiaomi Mi Router 4A (100M International Edition V2)"; + + aliases { + led-boot = &led_power_yellow; + led-failsafe = &led_power_yellow; + led-running = &led_power_blue; + led-upgrade = &led_power_yellow; + label-mac-device = ðernet; + }; + + leds { + compatible = "gpio-leds"; + + led_power_blue: power_blue { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + led_power_yellow: power_yellow { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + }; + + wan { + color = ; + function = LED_FUNCTION_WAN; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + }; + +}; + +&partitions { + partition@60000 { + label = "overlay"; + reg = <0x60000 0x100000>; + read-only; + }; + + partition@160000 { + label = "firmware"; + reg = <0x160000 0xea0000>; + compatible = "denx,uimage"; + }; +}; + +&pcie { + status = "okay"; +}; + +&eeprom_factory_8000 { + /* MT7613 has different eeprom size '0x4da8' */ + /* See https://github.com/openwrt/openwrt/pull/13587 */ + /* You can also see this in mt76/mt7615/eeprom.h: */ + /* MT7615_EEPROM_FULL_SIZE = MT7615_EEPROM_TXDPD_OFFSET + \ */ + /* MT7615_EEPROM_TXDPD_COUNT * MT7615_EEPROM_TXDPD_SIZE */ + /* where MT7615_EEPROM_TXDPD_OFFSET is 1024 + 256 * 34 = 9728: */ + /* MT7615_EEPROM_SIZE(1024 defined in mt7615.h) + \ */ + /* MT7615_EEPROM_DCOC_COUNT(34) * MT7615_EEPROM_DCOC_SIZE(256)*/ + /* where MT7615_EEPROM_TXDPD_COUNT = 44 + 3 = 47 */ + /* and MT7615_EEPROM_TXDPD_SIZE = 216. */ + /* Altogether it will be 19880 or 0x4da8. */ + reg = <0x8000 0x4da8>; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +ðernet { + nvmem-cells = <&macaddr_factory_4 (-1)>; + nvmem-cell-names = "mac-address"; +}; + +&esw { + mediatek,portmap = <0x3e>; + mediatek,portdisable = <0x2a>; +}; diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 7b360c6088..867c0e377b 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -1092,6 +1092,15 @@ define Device/xiaomi_mi-router-4a-100m-intl endef TARGET_DEVICES += xiaomi_mi-router-4a-100m-intl +define Device/xiaomi_mi-router-4a-100m-intl-v2 + IMAGE_SIZE := 14976k + DEVICE_VENDOR := Xiaomi + DEVICE_MODEL := Mi Router 4A + DEVICE_VARIANT := 100M International Edition V2 + DEVICE_PACKAGES := kmod-mt7615e kmod-mt7663-firmware-ap +endef +TARGET_DEVICES += xiaomi_mi-router-4a-100m-intl-v2 + define Device/xiaomi_mi-router-4c IMAGE_SIZE := 14976k DEVICE_VENDOR := Xiaomi 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 3e0b70cc20..a42c9fe640 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 @@ -171,7 +171,8 @@ wavlink,wl-wn578a2) ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10" ;; xiaomi,mi-router-4a-100m|\ -xiaomi,mi-router-4a-100m-intl) +xiaomi,mi-router-4a-100m-intl|\ +xiaomi,mi-router-4a-100m-intl-v2) ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x01" ;; xiaomi,mi-router-4c) 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 c44361a439..e5326dfe79 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 @@ -186,7 +186,8 @@ ramips_setup_interfaces() "0:wan" "3:lan" "4:lan" "6@eth0" ;; xiaomi,mi-router-4a-100m|\ - xiaomi,mi-router-4a-100m-intl) + xiaomi,mi-router-4a-100m-intl|\ + xiaomi,mi-router-4a-100m-intl-v2) ucidef_add_switch "switch0" \ "4:lan:1" "2:lan:2" "0:wan" "6@eth0" ;; @@ -323,6 +324,7 @@ ramips_setup_macs() ;; xiaomi,mi-router-4a-100m|\ xiaomi,mi-router-4a-100m-intl|\ + xiaomi,mi-router-4a-100m-intl-v2|\ xiaomi,mi-router-4c) wan_mac=$(mtd_get_mac_binary factory 0x4) ;;