From: Kenneth Kasilag Date: Thu, 21 May 2026 22:30:07 +0000 (+0000) Subject: airoha: an7581: 6.18: switch to kmod-phy-realtek for w1700k X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=ecabaa534ed01b123dec42f2b89e5b62ff1494e2;p=thirdparty%2Fopenwrt.git airoha: an7581: 6.18: switch to kmod-phy-realtek for w1700k Use the new kmod-phy-realtek driver for kernel 6.18 on Gemtek W1700K. The driver selection is gated using `KERNEL_PATCHVER` to avoid build failures on 6.12. The device tree selection is also gated by `KERNEL_PATCHVER` to select the appropriate device tree per kernel version. Once kernel 6.18 is tested stable for airoha these changes can be simplified and the obsolete properties removed. Signed-off-by: Kenneth Kasilag Link: https://github.com/openwrt/openwrt/pull/21019 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/airoha/dts/an7581-w1700k-ubi-618.dts b/target/linux/airoha/dts/an7581-w1700k-ubi-618.dts new file mode 100644 index 00000000000..100eb36bb03 --- /dev/null +++ b/target/linux/airoha/dts/an7581-w1700k-ubi-618.dts @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "an7581-w1700k-ubi.dts" + +&phy5 { + tx-polarity = ; + rx-polarity = ; +}; + +&phy8 { + tx-polarity = ; + rx-polarity = ; +}; diff --git a/target/linux/airoha/dts/an7581-w1700k-ubi.dts b/target/linux/airoha/dts/an7581-w1700k-ubi.dts index 42326ec2299..de9900f75a8 100644 --- a/target/linux/airoha/dts/an7581-w1700k-ubi.dts +++ b/target/linux/airoha/dts/an7581-w1700k-ubi.dts @@ -5,6 +5,7 @@ #include #include #include +#include #include "an7581.dtsi" #include "an7581-npu-mt7996.dtsi" diff --git a/target/linux/airoha/image/an7581.mk b/target/linux/airoha/image/an7581.mk index 30a7b6e538c..0beed840b6d 100644 --- a/target/linux/airoha/image/an7581.mk +++ b/target/linux/airoha/image/an7581.mk @@ -96,15 +96,27 @@ define Device/gemtek_w1700k-ubi DEVICE_ALT2_VENDOR := Quantum Fiber DEVICE_ALT2_MODEL := W1700K DEVICE_ALT2_VARIANT := UBI - DEVICE_DTS := an7581-w1700k-ubi + ifeq ($(KERNEL_PATCHVER),6.18) + DEVICE_DTS := an7581-w1700k-ubi-618 + else + DEVICE_DTS := an7581-w1700k-ubi + endif DEVICE_COMPAT_VERSION := 2.0 DEVICE_COMPAT_MESSAGE := Partition table has been changed to cooperate \ with the vendor bootloader with regard to the BMT/BBT partition at \ the end of flash. A reinstall including corrected chainloader is needed. - DEVICE_PACKAGES := airoha-en7581-mt7996-npu-firmware \ - fitblk kmod-i2c-an7581 kmod-hwmon-nct7802 \ - kmod-mt7996-firmware kmod-phy-rtl8261n \ - wpad-basic-mbedtls + DEVICE_PACKAGES := airoha-en7581-mt7996-npu-firmware fitblk kmod-i2c-an7581 \ + kmod-hwmon-nct7802 kmod-mt7996-firmware wpad-basic-mbedtls + ifeq ($(DUMP),1) + # HACK adds: both packages to build the config dependency tree + DEVICE_PACKAGES += rtl8261n-firmware kmod-phy-rtl8261n + else + ifeq ($(KERNEL_PATCHVER),6.18) + DEVICE_PACKAGES += rtl8261n-firmware + else + DEVICE_PACKAGES += kmod-phy-rtl8261n + endif + endif UBINIZE_OPTS := -E 5 BLOCKSIZE := 128k PAGESIZE := 2048