1
1

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 <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/21019
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
Kenneth Kasilag 2026-05-21 22:30:07 +00:00 committed by Jonas Jelonek
parent 8e629c4372
commit ecabaa534e
No known key found for this signature in database
3 changed files with 33 additions and 5 deletions

View File

@ -0,0 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "an7581-w1700k-ubi.dts"
&phy5 {
tx-polarity = <PHY_POL_INVERT>;
rx-polarity = <PHY_POL_INVERT>;
};
&phy8 {
tx-polarity = <PHY_POL_INVERT>;
rx-polarity = <PHY_POL_INVERT>;
};

View File

@ -5,6 +5,7 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/phy/phy.h>
#include "an7581.dtsi"
#include "an7581-npu-mt7996.dtsi"

View File

@ -96,15 +96,27 @@ define Device/gemtek_w1700k-ubi
DEVICE_ALT2_VENDOR := Quantum Fiber
DEVICE_ALT2_MODEL := W1700K
DEVICE_ALT2_VARIANT := 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