kernel: as21xxx: backport patch improve PHY HW reset

This patch fixes a bug in a patch we backported.

This patch was cherry picked from upstream Linux because it references a
patch we backported in the fixes tag.

The function phy_id_compare_vendor() is needed by the fix.
Refresh 782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch with the upstream code.

Fixes: 08a616b216 ("generic: backport support for Aeonsemi AS21xxx PHY")
Link: https://github.com/openwrt/openwrt/pull/21366
(cherry picked from commit b3318fe819)
Link: https://github.com/openwrt/openwrt/pull/21390
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
Hauke Mehrtens 2026-01-01 17:41:31 +01:00
parent 15eb5f05ef
commit 22d30efdc8
36 changed files with 180 additions and 62 deletions

View file

@ -29,7 +29,7 @@ Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18191,6 +18191,13 @@ F: drivers/pinctrl/
@@ -18197,6 +18197,13 @@ F: drivers/pinctrl/
F: include/dt-bindings/pinctrl/
F: include/linux/pinctrl/

View file

@ -29,7 +29,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -728,6 +728,14 @@ F: Documentation/devicetree/bindings/phy
@@ -734,6 +734,14 @@ F: Documentation/devicetree/bindings/phy
F: drivers/phy/phy-airoha-pcie-regs.h
F: drivers/phy/phy-airoha-pcie.c

View file

@ -111,7 +111,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -745,6 +745,13 @@ S: Maintained
@@ -751,6 +751,13 @@ S: Maintained
F: Documentation/devicetree/bindings/spi/airoha,en7581-snand.yaml
F: drivers/spi/spi-airoha-snfi.c

View file

@ -35,7 +35,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -750,6 +750,7 @@ M: Christian Marangi <ansuelsmth@gmail.c
@@ -756,6 +756,7 @@ M: Christian Marangi <ansuelsmth@gmail.c
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml

View file

@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/net/phy/as21xxx.c
+++ b/drivers/net/phy/as21xxx.c
@@ -964,6 +964,7 @@ static struct phy_driver as21xxx_drivers
@@ -965,6 +965,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,
@ -33,7 +33,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21011PB1),
@@ -976,6 +977,7 @@ static struct phy_driver as21xxx_drivers
@@ -977,6 +978,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,
@ -41,7 +41,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010PB1),
@@ -988,6 +990,7 @@ static struct phy_driver as21xxx_drivers
@@ -989,6 +991,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,
@ -49,7 +49,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010JB1),
@@ -1000,6 +1003,7 @@ static struct phy_driver as21xxx_drivers
@@ -1001,6 +1004,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,
@ -57,7 +57,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210PB1),
@@ -1012,6 +1016,7 @@ static struct phy_driver as21xxx_drivers
@@ -1013,6 +1017,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,
@ -65,7 +65,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510JB1),
@@ -1024,6 +1029,7 @@ static struct phy_driver as21xxx_drivers
@@ -1025,6 +1030,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,
@ -73,7 +73,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510PB1),
@@ -1036,6 +1042,7 @@ static struct phy_driver as21xxx_drivers
@@ -1037,6 +1043,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,
@ -81,7 +81,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511JB1),
@@ -1048,6 +1055,7 @@ static struct phy_driver as21xxx_drivers
@@ -1049,6 +1056,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,
@ -89,7 +89,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210JB1),
@@ -1060,6 +1068,7 @@ static struct phy_driver as21xxx_drivers
@@ -1061,6 +1069,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,
@ -97,7 +97,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511PB1),
@@ -1072,6 +1081,7 @@ static struct phy_driver as21xxx_drivers
@@ -1073,6 +1082,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,

View file

@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/net/phy/as21xxx.c
+++ b/drivers/net/phy/as21xxx.c
@@ -964,7 +964,7 @@ static struct phy_driver as21xxx_drivers
@@ -965,7 +965,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,
@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21011PB1),
@@ -977,7 +977,7 @@ static struct phy_driver as21xxx_drivers
@@ -978,7 +978,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,
@ -34,7 +34,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010PB1),
@@ -990,7 +990,7 @@ static struct phy_driver as21xxx_drivers
@@ -991,7 +991,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,
@ -43,7 +43,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21010JB1),
@@ -1003,7 +1003,7 @@ static struct phy_driver as21xxx_drivers
@@ -1004,7 +1004,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,
@ -52,7 +52,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210PB1),
@@ -1016,7 +1016,7 @@ static struct phy_driver as21xxx_drivers
@@ -1017,7 +1017,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,
@ -61,7 +61,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510JB1),
@@ -1029,7 +1029,7 @@ static struct phy_driver as21xxx_drivers
@@ -1030,7 +1030,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,
@ -70,7 +70,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21510PB1),
@@ -1042,7 +1042,7 @@ static struct phy_driver as21xxx_drivers
@@ -1043,7 +1043,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,
@ -79,7 +79,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511JB1),
@@ -1055,7 +1055,7 @@ static struct phy_driver as21xxx_drivers
@@ -1056,7 +1056,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,
@ -88,7 +88,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21210JB1),
@@ -1068,7 +1068,7 @@ static struct phy_driver as21xxx_drivers
@@ -1069,7 +1069,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,
@ -97,7 +97,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
},
{
PHY_ID_MATCH_EXACT(PHY_ID_AS21511PB1),
@@ -1081,7 +1081,7 @@ static struct phy_driver as21xxx_drivers
@@ -1082,7 +1082,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,

View file

@ -28,7 +28,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/drivers/net/phy/as21xxx.c
+++ b/drivers/net/phy/as21xxx.c
@@ -966,6 +966,21 @@ out:
@@ -967,6 +967,21 @@ out:
return ret;
}
@ -50,7 +50,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
static struct phy_driver as21xxx_drivers[] = {
{
/* PHY expose in C45 as 0x7500 0x9410
@@ -983,6 +998,7 @@ static struct phy_driver as21xxx_drivers
@@ -984,6 +999,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -58,7 +58,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -996,6 +1012,7 @@ static struct phy_driver as21xxx_drivers
@@ -997,6 +1013,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -66,7 +66,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1009,6 +1026,7 @@ static struct phy_driver as21xxx_drivers
@@ -1010,6 +1027,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -74,7 +74,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1022,6 +1040,7 @@ static struct phy_driver as21xxx_drivers
@@ -1023,6 +1041,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -82,7 +82,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1035,6 +1054,7 @@ static struct phy_driver as21xxx_drivers
@@ -1036,6 +1055,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -90,7 +90,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1048,6 +1068,7 @@ static struct phy_driver as21xxx_drivers
@@ -1049,6 +1069,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -98,7 +98,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1061,6 +1082,7 @@ static struct phy_driver as21xxx_drivers
@@ -1062,6 +1083,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -106,7 +106,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1074,6 +1096,7 @@ static struct phy_driver as21xxx_drivers
@@ -1075,6 +1097,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -114,7 +114,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1087,6 +1110,7 @@ static struct phy_driver as21xxx_drivers
@@ -1088,6 +1111,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,
@ -122,7 +122,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
.led_brightness_set = as21xxx_led_brightness_set,
.led_hw_is_supported = as21xxx_led_hw_is_supported,
.led_hw_control_set = as21xxx_led_hw_control_set,
@@ -1100,6 +1124,7 @@ static struct phy_driver as21xxx_drivers
@@ -1101,6 +1125,7 @@ static struct phy_driver as21xxx_drivers
.probe = as21xxx_probe,
.match_phy_device = as21xxx_match_phy_device,
.read_status = as21xxx_read_status,

View file

@ -426,7 +426,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21550,6 +21550,14 @@ T: git git://linuxtv.org/media.git
@@ -21556,6 +21556,14 @@ T: git git://linuxtv.org/media.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx415.yaml
F: drivers/media/i2c/imx415.c

View file

@ -193,7 +193,7 @@ media: i2c: imx519: Squash fixes
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21558,6 +21558,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -21564,6 +21564,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
F: drivers/media/i2c/imx477.c

View file

@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21555,6 +21555,7 @@ M: Raspberry Pi Kernel Maintenance <kern
@@ -21561,6 +21561,7 @@ M: Raspberry Pi Kernel Maintenance <kern
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git

View file

@ -90,7 +90,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4374,6 +4374,13 @@ S: Maintained
@@ -4380,6 +4380,13 @@ S: Maintained
F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
F: drivers/media/platform/broadcom/bcm2835-unicam*

View file

@ -331,7 +331,7 @@ Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4374,6 +4374,15 @@ S: Maintained
@@ -4380,6 +4380,15 @@ S: Maintained
F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml
F: drivers/media/platform/broadcom/bcm2835-unicam*

View file

@ -131,7 +131,7 @@ Signed-off-by: Lee Jackson <info@arducam.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1752,6 +1752,14 @@ S: Maintained
@@ -1758,6 +1758,14 @@ S: Maintained
F: drivers/net/arcnet/
F: include/uapi/linux/if_arcnet.h

View file

@ -134,7 +134,7 @@ Signed-off-by: Lee Jackson <info@arducam.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1752,6 +1752,14 @@ S: Maintained
@@ -1758,6 +1758,14 @@ S: Maintained
F: drivers/net/arcnet/
F: include/uapi/linux/if_arcnet.h

View file

@ -137,7 +137,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21599,6 +21599,14 @@ T: git git://linuxtv.org/media_tree.git
@@ -21605,6 +21605,14 @@ T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/imx519.yaml
F: drivers/media/i2c/imx519.c

View file

@ -271,7 +271,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21604,7 +21604,7 @@ M: Raspberry Pi Kernel Maintenance <kern
@@ -21610,7 +21610,7 @@ M: Raspberry Pi Kernel Maintenance <kern
L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git

View file

@ -67,7 +67,7 @@ Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
+...
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20062,6 +20062,13 @@ S: Supported
@@ -20068,6 +20068,13 @@ S: Supported
F: drivers/iio/light/rohm-bu27008.c
F: drivers/iio/light/rohm-bu27034.c

View file

@ -94,7 +94,7 @@ Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
+
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19355,6 +19355,11 @@ L: linux-edac@vger.kernel.org
@@ -19361,6 +19361,11 @@ L: linux-edac@vger.kernel.org
S: Maintained
F: drivers/ras/amd/fmpm.c

View file

@ -42,7 +42,7 @@ Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19359,6 +19359,7 @@ RASPBERRY PI RP2040 GPIO BRIDGE DRIVER
@@ -19365,6 +19365,7 @@ RASPBERRY PI RP2040 GPIO BRIDGE DRIVER
M: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
S: Maintained
F: Documentation/devicetree/bindings/spi/raspberrypi,rp2040-gpio-bridge.yaml

View file

@ -150,7 +150,7 @@ Signed-off-by: Richard Oliver <richard.oliver@raspberrypi.com>
+
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21604,6 +21604,13 @@ F: Documentation/devicetree/bindings/med
@@ -21610,6 +21610,13 @@ F: Documentation/devicetree/bindings/med
F: Documentation/devicetree/bindings/media/i2c/imx477.yaml
F: drivers/media/i2c/imx477.c

View file

@ -58,7 +58,7 @@ Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21610,6 +21610,7 @@ L: linux-media@vger.kernel.org
@@ -21616,6 +21616,7 @@ L: linux-media@vger.kernel.org
S: Maintained
T: git git://linuxtv.org/media_tree.git
F: Documentation/devicetree/bindings/media/i2c/sony,imx500.yaml

View file

@ -36,7 +36,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19361,6 +19361,16 @@ S: Maintained
@@ -19367,6 +19367,16 @@ S: Maintained
F: Documentation/devicetree/bindings/spi/raspberrypi,rp2040-gpio-bridge.yaml
F: drivers/spi/spi-rp2040-gpio-bridge.c

View file

@ -42,6 +42,21 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
4 files changed, 1106 insertions(+)
create mode 100644 drivers/net/phy/as21xxx.c
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -637,6 +637,12 @@ F: drivers/iio/accel/adxl380.h
F: drivers/iio/accel/adxl380_i2c.c
F: drivers/iio/accel/adxl380_spi.c
+AEONSEMI PHY DRIVER
+M: Christian Marangi <ansuelsmth@gmail.com>
+L: netdev@vger.kernel.org
+S: Maintained
+F: drivers/net/phy/as21xxx.c
+
AF8133J THREE-AXIS MAGNETOMETER DRIVER
M: Ondřej Jirman <megi@xff.cz>
S: Maintained
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -79,6 +79,18 @@ config SFP
@ -964,7 +979,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+
+ /* Skip PHY that are not AS21xxx or already have firmware loaded */
+ if (phydev->c45_ids.device_ids[MDIO_MMD_PCS] != PHY_ID_AS21XXX)
+ return genphy_match_phy_device(phydev, (struct phy_driver *)phydrv);
+ return genphy_match_phy_device(phydev, phydrv);
+
+ /* Read PHY ID to handle firmware just loaded */
+ ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MII_PHYSID1);

View file

@ -0,0 +1,58 @@
From 1abe21ef1adf0c5b6dbb5878c2fa4573df8d29fc Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Sat, 23 Aug 2025 15:44:28 +0200
Subject: net: phy: introduce phy_id_compare_vendor() PHY ID helper
Introduce phy_id_compare_vendor() PHY ID helper to compare a PHY ID with
the PHY ID Vendor using the generic PHY ID Vendor mask.
While at it also rework the PHY_ID_MATCH macro and move the mask to
dedicated define so that PHY driver can make use of the mask if needed.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250823134431.4854-1-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
include/linux/phy.h | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1256,9 +1256,13 @@ struct phy_driver {
#define PHY_ANY_ID "MATCH ANY PHY"
#define PHY_ANY_UID 0xffffffff
-#define PHY_ID_MATCH_EXACT(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 0)
-#define PHY_ID_MATCH_MODEL(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 4)
-#define PHY_ID_MATCH_VENDOR(id) .phy_id = (id), .phy_id_mask = GENMASK(31, 10)
+#define PHY_ID_MATCH_EXTACT_MASK GENMASK(31, 0)
+#define PHY_ID_MATCH_MODEL_MASK GENMASK(31, 4)
+#define PHY_ID_MATCH_VENDOR_MASK GENMASK(31, 10)
+
+#define PHY_ID_MATCH_EXACT(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_EXTACT_MASK
+#define PHY_ID_MATCH_MODEL(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_MODEL_MASK
+#define PHY_ID_MATCH_VENDOR(id) .phy_id = (id), .phy_id_mask = PHY_ID_MATCH_VENDOR_MASK
/**
* phy_id_compare - compare @id1 with @id2 taking account of @mask
@@ -1275,6 +1279,19 @@ static inline bool phy_id_compare(u32 id
}
/**
+ * phy_id_compare_vendor - compare @id with @vendor mask
+ * @id: PHY ID
+ * @vendor_mask: PHY Vendor mask
+ *
+ * Return: true if the bits from @id match @vendor using the
+ * generic PHY Vendor mask.
+ */
+static inline bool phy_id_compare_vendor(u32 id, u32 vendor_mask)
+{
+ return phy_id_compare(id, vendor_mask, PHY_ID_MATCH_VENDOR_MASK);
+}
+
+/**
* phydev_id_compare - compare @id with the PHY's Clause 22 ID
* @phydev: the PHY device
* @id: the PHY ID to be matched

View file

@ -0,0 +1,45 @@
From b4d5cd20507b252c746fa6971d82ac96f3b3e5b7 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Sat, 23 Aug 2025 15:44:29 +0200
Subject: net: phy: as21xxx: better handle PHY HW reset on soft-reboot
On soft-reboot, with a reset GPIO defined for an Aeonsemi PHY, the
special match_phy_device fails to correctly identify that the PHY
needs to load the firmware again.
This is caused by the fact that PHY ID is read BEFORE the PHY reset
GPIO (if present) is asserted, so we can be in the scenario where the
phydev have the previous PHY ID (with the PHY firmware loaded) but
after reset the generic AS21xxx PHY is present in the PHY ID registers.
To better handle this, skip reading the PHY ID register only for the PHY
that are not AS21xxx (by matching for the Aeonsemi Vendor) and always
read the PHY ID for the other case to handle both firmware already
loaded or an HW reset.
Fixes: 830877d89edc ("net: phy: Add support for Aeonsemi AS21xxx PHYs")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://patch.msgid.link/20250823134431.4854-2-ansuelsmth@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/phy/as21xxx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/net/phy/as21xxx.c
+++ b/drivers/net/phy/as21xxx.c
@@ -884,11 +884,12 @@ static int as21xxx_match_phy_device(stru
u32 phy_id;
int ret;
- /* Skip PHY that are not AS21xxx or already have firmware loaded */
- if (phydev->c45_ids.device_ids[MDIO_MMD_PCS] != PHY_ID_AS21XXX)
+ /* Skip PHY that are not AS21xxx */
+ if (!phy_id_compare_vendor(phydev->c45_ids.device_ids[MDIO_MMD_PCS],
+ PHY_VENDOR_AEONSEMI))
return genphy_match_phy_device(phydev, phydrv);
- /* Read PHY ID to handle firmware just loaded */
+ /* Read PHY ID to handle firmware loaded or HW reset */
ret = phy_read_mmd(phydev, MDIO_MMD_PCS, MII_PHYSID1);
if (ret < 0)
return ret;

View file

@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23663,6 +23663,12 @@ F: Documentation/filesystems/ubifs-authe
@@ -23669,6 +23669,12 @@ F: Documentation/filesystems/ubifs-authe
F: Documentation/filesystems/ubifs.rst
F: fs/ubifs/

View file

@ -19,7 +19,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14419,7 +14419,9 @@ M: Daniel Golle <daniel@makrotopia.org>
@@ -14425,7 +14425,9 @@ M: Daniel Golle <daniel@makrotopia.org>
L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/pcs/pcs-mtk-lynxi.c

View file

@ -32,7 +32,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19025,6 +19025,13 @@ L: netdev@vger.kernel.org
@@ -19031,6 +19031,13 @@ L: netdev@vger.kernel.org
S: Maintained
F: drivers/net/ethernet/qualcomm/emac/

View file

@ -64,7 +64,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19031,6 +19031,7 @@ L: netdev@vger.kernel.org
@@ -19037,6 +19037,7 @@ L: netdev@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
F: drivers/net/ethernet/qualcomm/ipqess/

View file

@ -945,7 +945,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
+};
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9107,6 +9107,14 @@ F: drivers/ptp/ptp_qoriq.c
@@ -9113,6 +9113,14 @@ F: drivers/ptp/ptp_qoriq.c
F: drivers/ptp/ptp_qoriq_debugfs.c
F: include/linux/fsl/ptp_qoriq.h

View file

@ -57,7 +57,7 @@ Signed-off-by: Sky Huang <skylake.huang@mediatek.com>
+ };
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14426,9 +14426,10 @@ F: include/linux/pcs/pcs-mtk-usxgmii.h
@@ -14432,9 +14432,10 @@ F: include/linux/pcs/pcs-mtk-usxgmii.h
MEDIATEK ETHERNET PHY DRIVERS
M: Daniel Golle <daniel@makrotopia.org>
M: Qingfang Deng <dqfext@gmail.com>

View file

@ -20,7 +20,7 @@ Signed-off-by: Sky Huang <skylake.huang@mediatek.com>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -14430,6 +14430,7 @@ M: Sky Huang <SkyLake.Huang@mediatek.com
@@ -14436,6 +14436,7 @@ M: Sky Huang <SkyLake.Huang@mediatek.com
L: netdev@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/mediatek,2p5gphy-fw.yaml

View file

@ -16,7 +16,7 @@ Cc: Robert Marko <robert.marko@sartura.hr>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10965,6 +10965,22 @@ L: virtualization@lists.linux.dev
@@ -10971,6 +10971,22 @@ L: virtualization@lists.linux.dev
S: Supported
F: drivers/vdpa/ifcvf/

View file

@ -28,7 +28,7 @@ Signed-off-by: Mark Brown <broonie@kernel.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19494,6 +19494,12 @@ S: Maintained
@@ -19500,6 +19500,12 @@ S: Maintained
F: Documentation/devicetree/bindings/net/dsa/realtek.yaml
F: drivers/net/dsa/realtek/*

View file

@ -22,7 +22,7 @@ Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -20151,6 +20151,13 @@ S: Maintained
@@ -20157,6 +20157,13 @@ S: Maintained
T: git https://github.com/pkshih/rtw.git
F: drivers/net/wireless/realtek/rtl8xxxu/

View file

@ -20,7 +20,7 @@ Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22065,7 +22065,7 @@ STARFIVE JH71X0 RESET CONTROLLER DRIVERS
@@ -22071,7 +22071,7 @@ STARFIVE JH71X0 RESET CONTROLLER DRIVERS
M: Emil Renner Berthing <kernel@esmil.dk>
M: Hal Feng <hal.feng@starfivetech.com>
S: Maintained