Skip to content

Commit 7889588

Browse files
abajkhauke
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>
1 parent 6f07cf4 commit 7889588

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
@@ -929,7 +929,7 @@
929929
interrupt-controller;
930930
#interrupt-cells = <1>;
931931
interrupt-parent = <&gic>;
932-
interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
932+
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
933933

934934
status = "disabled";
935935

@@ -988,6 +988,7 @@
988988
gsw_phy1: ethernet-phy@9 {
989989
compatible = "ethernet-phy-ieee802.3-c22";
990990
reg = <9>;
991+
interrupts = <1>;
991992
phy-mode = "internal";
992993
status = "disabled";
993994

@@ -1010,6 +1011,7 @@
10101011
gsw_phy2: ethernet-phy@a {
10111012
compatible = "ethernet-phy-ieee802.3-c22";
10121013
reg = <10>;
1014+
interrupts = <2>;
10131015
phy-mode = "internal";
10141016
status = "disabled";
10151017

@@ -1032,6 +1034,7 @@
10321034
gsw_phy3: ethernet-phy@b {
10331035
compatible = "ethernet-phy-ieee802.3-c22";
10341036
reg = <11>;
1037+
interrupts = <3>;
10351038
phy-mode = "internal";
10361039
status = "disabled";
10371040

@@ -1054,6 +1057,7 @@
10541057
gsw_phy4: ethernet-phy@c {
10551058
compatible = "ethernet-phy-ieee802.3-c22";
10561059
reg = <12>;
1060+
interrupts = <4>;
10571061
phy-mode = "internal";
10581062
status = "disabled";
10591063

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/mtk-ge-soc.c | 2 ++
15+
1 file changed, 2 insertions(+)
16+
17+
--- a/drivers/net/phy/mediatek/mtk-ge-soc.c
18+
+++ b/drivers/net/phy/mediatek/mtk-ge-soc.c
19+
@@ -1492,6 +1492,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)