Skip to content

Commit 6f55a70

Browse files
abajkAnsuel
authored andcommitted
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@genexis.eu> Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Link: openwrt/openwrt#21016 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> (cherry picked from commit 7889588) [ fix conflict error, adapt for kernel 6.6 ] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
1 parent 54045c9 commit 6f55a70

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

target/linux/airoha/dts/an7581.dtsi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@
913913
interrupt-controller;
914914
#interrupt-cells = <1>;
915915
interrupt-parent = <&gic>;
916-
interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
916+
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
917917

918918
status = "disabled";
919919

@@ -972,6 +972,7 @@
972972
gsw_phy1: ethernet-phy@9 {
973973
compatible = "ethernet-phy-ieee802.3-c22";
974974
reg = <9>;
975+
interrupts = <1>;
975976
phy-mode = "internal";
976977
status = "disabled";
977978

@@ -994,6 +995,7 @@
994995
gsw_phy2: ethernet-phy@a {
995996
compatible = "ethernet-phy-ieee802.3-c22";
996997
reg = <10>;
998+
interrupts = <2>;
997999
phy-mode = "internal";
9981000
status = "disabled";
9991001

@@ -1016,6 +1018,7 @@
10161018
gsw_phy3: ethernet-phy@b {
10171019
compatible = "ethernet-phy-ieee802.3-c22";
10181020
reg = <11>;
1021+
interrupts = <3>;
10191022
phy-mode = "internal";
10201023
status = "disabled";
10211024

@@ -1038,6 +1041,7 @@
10381041
gsw_phy4: ethernet-phy@c {
10391042
compatible = "ethernet-phy-ieee802.3-c22";
10401043
reg = <12>;
1044+
interrupts = <4>;
10411045
phy-mode = "internal";
10421046
status = "disabled";
10431047

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 2e229771543b2b20e1fe29da00df80c917469449 Mon Sep 17 00:00:00 2001
2+
From: Aleksander Jan Bajkowski <olek2@wp.pl>
3+
Date: Fri, 2 Jan 2026 12:30:06 +0100
4+
Subject: [PATCH] net: phy: mediatek: enable interrupts on AN7581
5+
6+
Interrupts work just like on MT7988.
7+
8+
Suggested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
9+
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
10+
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
11+
Link: https://patch.msgid.link/20260102113222.3519900-1-olek2@wp.pl
12+
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
13+
---
14+
drivers/net/phy/mediatek-ge-soc.c | 2 ++
15+
1 file changed, 2 insertions(+)
16+
17+
--- a/drivers/net/phy/mediatek-ge-soc.c
18+
+++ b/drivers/net/phy/mediatek-ge-soc.c
19+
@@ -1590,6 +1590,8 @@ static struct phy_driver mtk_socphy_driv
20+
{
21+
PHY_ID_MATCH_EXACT(MTK_GPHY_ID_AN7581),
22+
.name = "Airoha AN7581 PHY",
23+
+ .config_intr = genphy_no_config_intr,
24+
+ .handle_interrupt = genphy_handle_interrupt_no_ack,
25+
.probe = an7581_phy_probe,
26+
.led_blink_set = mt798x_phy_led_blink_set,
27+
.led_brightness_set = mt798x_phy_led_brightness_set,

0 commit comments

Comments
 (0)