[openwrt/openwrt] airoha: an7581: add switch ports interrups
LEDE Commits
lede-commits at lists.infradead.org
Sat Feb 7 08:10:14 PST 2026
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-25.12:
https://git.openwrt.org/4da230548fc8880469969f4da6fffba59356b97f
commit 4da230548fc8880469969f4da6fffba59356b97f
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Mon Dec 1 23:11:17 2025 +0100
airoha: an7581: add switch ports interrups
The MT7531 has an incorrect interrupt number described in the DTS.
This commit also adds PHY interrupts. They work the same as on
the MT7988.
Tested on Gemtek W1700k.
Suggested-by: Benjamin Larsson <benjamin.larsson at genexis.eu>
Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
Link: https://github.com/openwrt/openwrt/pull/21016
(cherry picked from commit 788958880b66dd3f451d53801c8d25e5e6cfe1b8)
Link: https://github.com/openwrt/openwrt/pull/21838
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
target/linux/airoha/dts/an7581.dtsi | 6 ++++-
...-phy-mediatek-enable-interrupts-on-AN7581.patch | 27 ++++++++++++++++++++++
2 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/target/linux/airoha/dts/an7581.dtsi b/target/linux/airoha/dts/an7581.dtsi
index e450c94c56..08955dd354 100644
--- a/target/linux/airoha/dts/an7581.dtsi
+++ b/target/linux/airoha/dts/an7581.dtsi
@@ -929,7 +929,7 @@
interrupt-controller;
#interrupt-cells = <1>;
interrupt-parent = <&gic>;
- interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
+ interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
@@ -988,6 +988,7 @@
gsw_phy1: ethernet-phy at 9 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <9>;
+ interrupts = <1>;
phy-mode = "internal";
status = "disabled";
@@ -1010,6 +1011,7 @@
gsw_phy2: ethernet-phy at a {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <10>;
+ interrupts = <2>;
phy-mode = "internal";
status = "disabled";
@@ -1032,6 +1034,7 @@
gsw_phy3: ethernet-phy at b {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <11>;
+ interrupts = <3>;
phy-mode = "internal";
status = "disabled";
@@ -1054,6 +1057,7 @@
gsw_phy4: ethernet-phy at c {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <12>;
+ interrupts = <4>;
phy-mode = "internal";
status = "disabled";
diff --git a/target/linux/airoha/patches-6.12/610-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch b/target/linux/airoha/patches-6.12/610-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch
new file mode 100644
index 0000000000..a30014bec5
--- /dev/null
+++ b/target/linux/airoha/patches-6.12/610-v7.0-net-phy-mediatek-enable-interrupts-on-AN7581.patch
@@ -0,0 +1,27 @@
+From 2e229771543b2b20e1fe29da00df80c917469449 Mon Sep 17 00:00:00 2001
+From: Aleksander Jan Bajkowski <olek2 at wp.pl>
+Date: Fri, 2 Jan 2026 12:30:06 +0100
+Subject: [PATCH] net: phy: mediatek: enable interrupts on AN7581
+
+Interrupts work just like on MT7988.
+
+Suggested-by: Benjamin Larsson <benjamin.larsson at genexis.eu>
+Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://patch.msgid.link/20260102113222.3519900-1-olek2@wp.pl
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/mediatek/mtk-ge-soc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/phy/mediatek/mtk-ge-soc.c
++++ b/drivers/net/phy/mediatek/mtk-ge-soc.c
+@@ -1492,6 +1492,8 @@ static struct phy_driver mtk_socphy_driv
+ {
+ PHY_ID_MATCH_EXACT(MTK_GPHY_ID_AN7581),
+ .name = "Airoha AN7581 PHY",
++ .config_intr = genphy_no_config_intr,
++ .handle_interrupt = genphy_handle_interrupt_no_ack,
+ .probe = an7581_phy_probe,
+ .led_blink_set = mt798x_phy_led_blink_set,
+ .led_brightness_set = mt798x_phy_led_brightness_set,
More information about the lede-commits
mailing list