Files
xiaomi-ax3600/target/linux/airoha/patches-6.12/801-02-net-phy-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch
Christian Marangi 927fe598db airoha: add pending patch to fix Aeonsemi AS21xxx PHY
Add pending patch to make address some workaround needed to make the
Aeonsemi AS21xxx PHY working on the Airoha AN7581/AN7583 board.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-10-24 12:17:45 +02:00

109 lines
4.0 KiB
Diff

From 7ad1470c3d08c1abea747aa0c789e924f63fcbc4 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Wed, 25 Jun 2025 00:51:45 +0200
Subject: [PATCH 2/2] net: phy: as21xxx: add flag PHY_DETACH_NO_HW_RESET
Add flag PHY_DETACH_NO_HW_RESET to handle firmware getting reset on
calling phy_detach() if the GPIO reset PIN is defined in DT.
This will skip the firmware from getting reset permitting the PHY to
continue work when the PHY is torn down and gets up again.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/net/phy/as21xxx.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
--- a/drivers/net/phy/as21xxx.c
+++ b/drivers/net/phy/as21xxx.c
@@ -964,7 +964,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21011PB1),
@@ -977,7 +977,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010PB1),
@@ -990,7 +990,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010JB1),
@@ -1003,7 +1003,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210PB1),
@@ -1016,7 +1016,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510JB1),
@@ -1029,7 +1029,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510PB1),
@@ -1042,7 +1042,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511JB1),
@@ -1055,7 +1055,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210JB1),
@@ -1068,7 +1068,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511PB1),
@@ -1081,7 +1081,7 @@ static struct phy_driver as21xxx_drivers
.led_hw_control_set = as21xxx_led_hw_control_set,
.led_hw_control_get = as21xxx_led_hw_control_get,
.led_polarity_set = as21xxx_led_polarity_set,
- .flags = PHY_DETACH_NO_RESET,
+ .flags = PHY_DETACH_NO_HW_RESET,
},
};
module_phy_driver(as21xxx_drivers);