From fca306c563196481c1ad488b9abf4e84026591f4 Mon Sep 17 00:00:00 2001 From: Rany Hany Date: Thu, 22 Aug 2024 09:09:24 +0000 Subject: [PATCH 1/7] mediatek/mt7622: fix config symbol for 2.5GE MTK driver The commit backporting new MTK patches did not update the Kernel config for mediatek/mt7622 causing the build to fail. Simply use the new config symbol name for the driver to fix the issue. Fixes: 1069514978 ("mediatek: backport pending Ethernet PHY driver patches") Signed-off-by: Rany Hany Link: https://github.com/openwrt/openwrt/pull/16225 Signed-off-by: Robert Marko --- target/linux/mediatek/mt7622/config-6.6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/mt7622/config-6.6 b/target/linux/mediatek/mt7622/config-6.6 index 067dd02d31..fab9c7dbe6 100644 --- a/target/linux/mediatek/mt7622/config-6.6 +++ b/target/linux/mediatek/mt7622/config-6.6 @@ -242,7 +242,7 @@ CONFIG_MAXLINEAR_GPHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -# CONFIG_MEDIATEK_2P5G_PHY is not set +# CONFIG_MEDIATEK_2P5GE_PHY is not set CONFIG_MEDIATEK_GE_PHY=y # CONFIG_MEDIATEK_GE_SOC_PHY is not set CONFIG_MEDIATEK_WATCHDOG=y From 9c0179ff1373991c7b545a4d9f6b2d5768c9e91d Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 22 Aug 2024 11:43:52 +0200 Subject: [PATCH 2/7] generic: 6.6: disable EPAN support Enhanced Privileged Access Never (EPAN) is an ARMv8.7 feature, and since we dont have any SoC-s implementing it lets disable it. Link: https://github.com/openwrt/openwrt/pull/16211 Signed-off-by: Robert Marko --- target/linux/generic/config-6.6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6 index 368d0c6a6b..e0e1bd5280 100644 --- a/target/linux/generic/config-6.6 +++ b/target/linux/generic/config-6.6 @@ -326,7 +326,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_BTI is not set CONFIG_ARM64_CNP=y # CONFIG_ARM64_E0PD is not set -CONFIG_ARM64_EPAN=y +# CONFIG_ARM64_EPAN is not set # CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_ERRATUM_1165522 is not set # CONFIG_ARM64_ERRATUM_1286807 is not set From b42f7a1b305d370c71e4f358de942df97d6347df Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 22 Aug 2024 11:45:16 +0200 Subject: [PATCH 3/7] generic: 5.15, 6.1: enable CNP support Ever since CONFIG_ARM64_PAN was enabled Common Not Private (CNP) is now visible and kernel builds will stop as they are not set in kernel config for 5.15 and 6.1. So, lets enable Common Not Private (CNP) which is ARMv8.2 feature and will be NOP of CPU-s that dont support it. Fixes: a2662309aae1 ("kernel: Enable CONFIG_ARM64_PAN to restrict kernel access to user space memory") Link: https://github.com/openwrt/openwrt/pull/16211 Signed-off-by: Robert Marko --- target/linux/generic/config-5.15 | 2 ++ target/linux/generic/config-6.1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15 index 1b8ad1cf42..9711b8372f 100644 --- a/target/linux/generic/config-5.15 +++ b/target/linux/generic/config-5.15 @@ -318,8 +318,10 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_64K_PAGES is not set # CONFIG_ARM64_AMU_EXTN is not set # CONFIG_ARM64_BTI is not set +CONFIG_ARM64_CNP=y # CONFIG_ARM64_CRYPTO is not set # CONFIG_ARM64_E0PD is not set +# CONFIG_ARM64_EPAN is not set # CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_ERRATUM_1165522 is not set # CONFIG_ARM64_ERRATUM_1286807 is not set diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1 index 81c66f41df..ef4ab7bac1 100644 --- a/target/linux/generic/config-6.1 +++ b/target/linux/generic/config-6.1 @@ -348,8 +348,10 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8 # CONFIG_ARM64_64K_PAGES is not set # CONFIG_ARM64_AMU_EXTN is not set # CONFIG_ARM64_BTI is not set +CONFIG_ARM64_CNP=y # CONFIG_ARM64_CRYPTO is not set # CONFIG_ARM64_E0PD is not set +# CONFIG_ARM64_EPAN is not set # CONFIG_ARM64_ERRATUM_1024718 is not set # CONFIG_ARM64_ERRATUM_1165522 is not set # CONFIG_ARM64_ERRATUM_1286807 is not set From 5d107bbbbbb2f8247bb1d86e3fd9d29f951c4c25 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 18 Aug 2024 15:53:44 -0700 Subject: [PATCH 4/7] tmon: make version apk compatible No need to override version. Signed-off-by: Rosen Penev --- package/devel/tmon/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/package/devel/tmon/Makefile b/package/devel/tmon/Makefile index 6f9182ce9a..25aeb0203f 100644 --- a/package/devel/tmon/Makefile +++ b/package/devel/tmon/Makefile @@ -14,7 +14,6 @@ define Package/tmon SECTION:=devel CATEGORY:=Development TITLE:=Thermal monitoring and testing tool - VERSION:=$(LINUX_VERSION)-$(PKG_RELEASE) URL:=http://www.kernel.org DEPENDS:=+libncursesw endef From c43480c2dc3e5260b585b633f4f8de1abc7354ce Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Thu, 22 Aug 2024 13:42:21 +0200 Subject: [PATCH 5/7] mpc85xx: refresh tl-wdr4900-v1 led configuration This commit change led description in dts file from old method to new approach accepted by upstream. USB power gpio is handled by gpio-export now. Signed-off-by: Pawel Dembicki Link: https://github.com/openwrt/openwrt/pull/16226 Signed-off-by: Robert Marko --- .../arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index 91baba0cd7..cadf593fa6 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -9,6 +9,7 @@ * option) any later version. */ +#include #include #include @@ -316,32 +317,44 @@ leds { compatible = "gpio-leds"; - wps { + led-0 { gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - label = "tp-link:green:wps"; + color = ; + function = LED_FUNCTION_WPS; }; - system_green: system { + system_green: led-1 { gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - label = "tp-link:blue:system"; + color = ; + function = LED_FUNCTION_STATUS; }; - usb1 { + led-2 { gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; - label = "tp-link:green:usb1"; + color = ; + function = LED_FUNCTION_USB; + function-enumerator = <1>; }; - usb2 { + led-3 { gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; - label = "tp-link:green:usb2"; - }; - - usbpower { - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - label = "tp-link:usb:power"; + color = ; + function = LED_FUNCTION_USB; + function-enumerator = <2>; }; }; + gpio_export { + compatible = "gpio-export"; + #size-cells = <0>; + + usb-pwr { + gpio-export,name = "usb_pwr"; + gpio-export,output = <1>; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + }; + buttons { compatible = "gpio-keys"; From 71c6d99d57ce70ae643b3ba5a87dbb6dca1eb694 Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Thu, 22 Aug 2024 13:45:11 +0200 Subject: [PATCH 6/7] mpc85xx: add usb trigger to tl-wdr4900-v1 leds TP-Link tl-wdr4900-v1 has two usb leds. Modern kernels can handle usb led trigger. Let's enable it. Signed-off-by: Pawel Dembicki Link: https://github.com/openwrt/openwrt/pull/16226 Signed-off-by: Robert Marko --- .../arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 21 +++++++++++++++++++ target/linux/mpc85xx/image/p1010.mk | 1 + 2 files changed, 22 insertions(+) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index cadf593fa6..b55fd2e7e7 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -118,6 +118,23 @@ usb@22000 { phy_type = "utmi"; dr_mode = "host"; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + #trigger-source-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + hub_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; }; mdio@24000 { @@ -334,6 +351,8 @@ color = ; function = LED_FUNCTION_USB; function-enumerator = <1>; + linux,default-trigger = "usbport"; + trigger-sources = <&hub_port1>; }; led-3 { @@ -341,6 +360,8 @@ color = ; function = LED_FUNCTION_USB; function-enumerator = <2>; + linux,default-trigger = "usbport"; + trigger-sources = <&hub_port2>; }; }; diff --git a/target/linux/mpc85xx/image/p1010.mk b/target/linux/mpc85xx/image/p1010.mk index a4f2d13dd4..1f898c483f 100644 --- a/target/linux/mpc85xx/image/p1010.mk +++ b/target/linux/mpc85xx/image/p1010.mk @@ -53,6 +53,7 @@ define Device/tplink_tl-wdr4900-v1 DEVICE_VARIANT := v1 DEVICE_COMPAT_VERSION := 1.1 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA + DEVICE_PACKAGES := kmod-usb-ledtrig-usbport TPLINK_HEADER_VERSION := 1 TPLINK_HWID := 0x49000001 TPLINK_HWREV := 1 From cf765b1be685d316ac6ad914008ca4c166d13a6a Mon Sep 17 00:00:00 2001 From: Pawel Dembicki Date: Thu, 22 Aug 2024 14:49:31 +0200 Subject: [PATCH 7/7] mpc85xx: Add QCA8327 LED nodes to tl-wdr4900-v1 dts This commit introduces led nodes in tl-wdr4900-v1 dts. It allows to configure switch leds from userspace. Signed-off-by: Pawel Dembicki Link: https://github.com/openwrt/openwrt/pull/16226 Signed-off-by: Robert Marko --- .../arch/powerpc/boot/dts/tl-wdr4900-v1.dts | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts index b55fd2e7e7..4fd9767d2d 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts @@ -185,30 +185,90 @@ nvmem-cells = <&macaddr_uboot_4fc00 1>; nvmem-cell-names = "mac-address"; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_WAN; + default-state = "keep"; + }; + }; }; port@2 { reg = <2>; label = "lan1"; phy-handle = <&phy_port2>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; port@3 { reg = <3>; label = "lan2"; phy-handle = <&phy_port3>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; port@4 { reg = <4>; label = "lan3"; phy-handle = <&phy_port4>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; port@5 { reg = <5>; label = "lan4"; phy-handle = <&phy_port5>; + + leds { + #address-cells = <1>; + #size-cells = <0>; + + led@0 { + reg = <0>; + color = ; + function = LED_FUNCTION_LAN; + default-state = "keep"; + }; + }; }; }; };