[openwrt/openwrt] kernel: as21xxx: backport patch improve PHY HW reset

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 4 07:42:52 PST 2026


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b3318fe819f194ba0c5e2447014fd36a1cdddf27

commit b3318fe819f194ba0c5e2447014fd36a1cdddf27
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Jan 1 17:41:31 2026 +0100

    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: 08a616b2163e ("generic: backport support for Aeonsemi AS21xxx PHY")
    Link: https://github.com/openwrt/openwrt/pull/21366
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...pinctrl-airoha-Add-support-for-EN7581-SoC.patch |  2 +-
 ...-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch |  2 +-
 ...-phy-Add-documentation-for-Airoha-AN7581-.patch |  2 +-
 ...oha-Add-support-for-Airoha-AN7581-USB-PHY.patch |  2 +-
 ...t-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch | 20 ++++----
 ...y-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch | 20 ++++----
 ...1xxx-implement-read-workaround-for-C45-re.patch | 22 ++++----
 ...imx477-Support-for-the-Sony-IMX477-sensor.patch |  2 +-
 ...imx519-Support-for-the-Sony-IMX519-sensor.patch |  2 +-
 ...on-devicetree-Add-documentation-for-imx37.patch |  2 +-
 ...ndings-media-Add-binding-for-the-Raspberr.patch |  2 +-
 ...4_services-ISP-Add-a-more-complex-ISP-pro.patch |  2 +-
 ...ndings-media-i2c-Add-Arducam-Pivariety-Se.patch |  2 +-
 ...ndings-media-i2c-Add-Arducam-64MP-CMOS-se.patch |  2 +-
 ...-media-i2c-Add-IMX708-CMOS-sensor-binding.patch |  2 +-
 ...-media-i2c-Replace-IMX708-sensor-binding-.patch |  2 +-
 ...dt-bindings-i2c-Add-Rohm-BU64754-bindings.patch |  2 +-
 ...pi-dt-bindings-Add-RPI-RP2040-GPIO-Bridge.patch |  2 +-
 ...d-a-driver-for-the-RPI-RP2040-GPIO-bridge.patch |  2 +-
 ...504-media-dt-bindings-i2c-Add-Sony-IMX500.patch |  2 +-
 ...dia-i2c-Add-driver-for-Sony-IMX500-sensor.patch |  2 +-
 ...form-Add-Raspberry-Pi-HEVC-decoder-driver.patch |  2 +-
 ...phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch | 17 ++++++-
 ...roduce-phy_id_compare_vendor-PHY-ID-helpe.patch | 58 ++++++++++++++++++++++
 ...1xxx-better-handle-PHY-HW-reset-on-soft-r.patch | 45 +++++++++++++++++
 ...lock-add-uImage.FIT-subimage-block-driver.patch |  2 +-
 ...t-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch |  2 +-
 ...qess-introduce-the-Qualcomm-IPQESS-driver.patch |  2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  2 +-
 .../701-staging-add-fsl_ppfe-driver.patch          |  2 +-
 ...iatek-Add-2.5Gphy-firmware-dt-bindings-an.patch |  2 +-
 ...iatek-add-driver-for-built-in-2.5G-ethern.patch |  2 +-
 ...-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch |  2 +-
 ...v6.13-spi-mem-add-realtek-nand-controller.patch |  2 +-
 ...Add-driver-for-the-RTL9300-I2C-controller.patch |  2 +-
 ...et-starfive-Add-JH7100-audio-reset-driver.patch |  2 +-
 36 files changed, 180 insertions(+), 62 deletions(-)

diff --git a/target/linux/airoha/patches-6.12/034-01-v6.13-pinctrl-airoha-Add-support-for-EN7581-SoC.patch b/target/linux/airoha/patches-6.12/034-01-v6.13-pinctrl-airoha-Add-support-for-EN7581-SoC.patch
index 0f0fdeec1e..2a265a1b54 100644
--- a/target/linux/airoha/patches-6.12/034-01-v6.13-pinctrl-airoha-Add-support-for-EN7581-SoC.patch
+++ b/target/linux/airoha/patches-6.12/034-01-v6.13-pinctrl-airoha-Add-support-for-EN7581-SoC.patch
@@ -29,7 +29,7 @@ Signed-off-by: Linus Walleij <linus.walleij at 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/
  
diff --git a/target/linux/airoha/patches-6.12/123-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch b/target/linux/airoha/patches-6.12/123-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch
index b5cd4982f1..9984b531e5 100644
--- a/target/linux/airoha/patches-6.12/123-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch
+++ b/target/linux/airoha/patches-6.12/123-02-ASoC-airoha-Add-AFE-and-I2S-driver-for-Airoha-AN7581.patch
@@ -29,7 +29,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at 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
  
diff --git a/target/linux/airoha/patches-6.12/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch b/target/linux/airoha/patches-6.12/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch
index 20236571a0..1937a692ee 100644
--- a/target/linux/airoha/patches-6.12/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch
+++ b/target/linux/airoha/patches-6.12/220-05-dt-bindings-phy-Add-documentation-for-Airoha-AN7581-.patch
@@ -111,7 +111,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at 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
  
diff --git a/target/linux/airoha/patches-6.12/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch b/target/linux/airoha/patches-6.12/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch
index 844e2b43cf..8994927b07 100644
--- a/target/linux/airoha/patches-6.12/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch
+++ b/target/linux/airoha/patches-6.12/220-07-phy-airoha-Add-support-for-Airoha-AN7581-USB-PHY.patch
@@ -35,7 +35,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -750,6 +750,7 @@ M:	Christian Marangi <ansuelsmth at gmail.c
+@@ -756,6 +756,7 @@ M:	Christian Marangi <ansuelsmth at gmail.c
  L:	linux-arm-kernel at lists.infradead.org (moderated for non-subscribers)
  S:	Maintained
  F:	Documentation/devicetree/bindings/phy/airoha,an7581-usb-phy.yaml
diff --git a/target/linux/airoha/patches-6.12/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch b/target/linux/airoha/patches-6.12/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch
index 53ea635ffe..5a4533378b 100644
--- a/target/linux/airoha/patches-6.12/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch
+++ b/target/linux/airoha/patches-6.12/801-01-net-phy-add-PHY_DETACH_NO_HW_RESET-PHY-flag.patch
@@ -25,7 +25,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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,
diff --git a/target/linux/airoha/patches-6.12/801-02-net-phy-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch b/target/linux/airoha/patches-6.12/801-02-net-phy-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch
index f2078310d2..029bdb5ab1 100644
--- a/target/linux/airoha/patches-6.12/801-02-net-phy-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch
+++ b/target/linux/airoha/patches-6.12/801-02-net-phy-as21xxx-add-flag-PHY_DETACH_NO_HW_RESET.patch
@@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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,
diff --git a/target/linux/airoha/patches-6.12/804-net-phy-as21xxx-implement-read-workaround-for-C45-re.patch b/target/linux/airoha/patches-6.12/804-net-phy-as21xxx-implement-read-workaround-for-C45-re.patch
index 24cddf8307..0c24e9e20f 100644
--- a/target/linux/airoha/patches-6.12/804-net-phy-as21xxx-implement-read-workaround-for-C45-re.patch
+++ b/target/linux/airoha/patches-6.12/804-net-phy-as21xxx-implement-read-workaround-for-C45-re.patch
@@ -28,7 +28,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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 at 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,
diff --git a/target/linux/bcm27xx/patches-6.12/950-0136-media-i2c-imx477-Support-for-the-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-6.12/950-0136-media-i2c-imx477-Support-for-the-Sony-IMX477-sensor.patch
index d2b8704308..a65167aabc 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0136-media-i2c-imx477-Support-for-the-Sony-IMX477-sensor.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0136-media-i2c-imx477-Support-for-the-Sony-IMX477-sensor.patch
@@ -426,7 +426,7 @@ Signed-off-by: Naushir Patuck <naush at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0137-media-i2c-imx519-Support-for-the-Sony-IMX519-sensor.patch b/target/linux/bcm27xx/patches-6.12/950-0137-media-i2c-imx519-Support-for-the-Sony-IMX519-sensor.patch
index 3b90b2ee86..19006643c8 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0137-media-i2c-imx519-Support-for-the-Sony-IMX519-sensor.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0137-media-i2c-imx519-Support-for-the-Sony-IMX519-sensor.patch
@@ -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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0147-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-6.12/950-0147-Documentation-devicetree-Add-documentation-for-imx37.patch
index e66b500f3a..64ba9736a6 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0147-Documentation-devicetree-Add-documentation-for-imx37.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0147-Documentation-devicetree-Add-documentation-for-imx37.patch
@@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman at 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 at vger.kernel.org
  S:	Maintained
  T:	git git://linuxtv.org/media_tree.git
diff --git a/target/linux/bcm27xx/patches-6.12/950-0169-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch b/target/linux/bcm27xx/patches-6.12/950-0169-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch
index 11accacea7..b0f6e9998e 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0169-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0169-media-dt-bindings-media-Add-binding-for-the-Raspberr.patch
@@ -90,7 +90,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at 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*
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0205-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch b/target/linux/bcm27xx/patches-6.12/950-0205-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch
index 279d17de7b..3269e8a7f9 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0205-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0205-staging-vc04_services-ISP-Add-a-more-complex-ISP-pro.patch
@@ -331,7 +331,7 @@ Signed-off-by: Kieran Bingham <kieran.bingham at 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*
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0280-media-dt-bindings-media-i2c-Add-Arducam-Pivariety-Se.patch b/target/linux/bcm27xx/patches-6.12/950-0280-media-dt-bindings-media-i2c-Add-Arducam-Pivariety-Se.patch
index 4b19a89827..4248edb63a 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0280-media-dt-bindings-media-i2c-Add-Arducam-Pivariety-Se.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0280-media-dt-bindings-media-i2c-Add-Arducam-Pivariety-Se.patch
@@ -131,7 +131,7 @@ Signed-off-by: Lee Jackson <info at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0287-media-dt-bindings-media-i2c-Add-Arducam-64MP-CMOS-se.patch b/target/linux/bcm27xx/patches-6.12/950-0287-media-dt-bindings-media-i2c-Add-Arducam-64MP-CMOS-se.patch
index e1f00a0391..d349e8775d 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0287-media-dt-bindings-media-i2c-Add-Arducam-64MP-CMOS-se.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0287-media-dt-bindings-media-i2c-Add-Arducam-64MP-CMOS-se.patch
@@ -134,7 +134,7 @@ Signed-off-by: Lee Jackson <info at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0303-dtbindings-media-i2c-Add-IMX708-CMOS-sensor-binding.patch b/target/linux/bcm27xx/patches-6.12/950-0303-dtbindings-media-i2c-Add-IMX708-CMOS-sensor-binding.patch
index 6329c752e6..d6fa9011f5 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0303-dtbindings-media-i2c-Add-IMX708-CMOS-sensor-binding.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0303-dtbindings-media-i2c-Add-IMX708-CMOS-sensor-binding.patch
@@ -137,7 +137,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0318-dt-bindings-media-i2c-Replace-IMX708-sensor-binding-.patch b/target/linux/bcm27xx/patches-6.12/950-0318-dt-bindings-media-i2c-Replace-IMX708-sensor-binding-.patch
index ae1b01f6d5..11a20bf606 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0318-dt-bindings-media-i2c-Replace-IMX708-sensor-binding-.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0318-dt-bindings-media-i2c-Replace-IMX708-sensor-binding-.patch
@@ -271,7 +271,7 @@ Signed-off-by: Naushir Patuck <naush at 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 at vger.kernel.org
  S:	Maintained
  T:	git git://linuxtv.org/media_tree.git
diff --git a/target/linux/bcm27xx/patches-6.12/950-0406-media-dt-bindings-i2c-Add-Rohm-BU64754-bindings.patch b/target/linux/bcm27xx/patches-6.12/950-0406-media-dt-bindings-i2c-Add-Rohm-BU64754-bindings.patch
index 70e51011e4..e5f230c650 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0406-media-dt-bindings-i2c-Add-Rohm-BU64754-bindings.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0406-media-dt-bindings-i2c-Add-Rohm-BU64754-bindings.patch
@@ -67,7 +67,7 @@ Signed-off-by: Jacopo Mondi <jacopo.mondi at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0482-spi-dt-bindings-Add-RPI-RP2040-GPIO-Bridge.patch b/target/linux/bcm27xx/patches-6.12/950-0482-spi-dt-bindings-Add-RPI-RP2040-GPIO-Bridge.patch
index 4a3fd18513..9a9c3c98f8 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0482-spi-dt-bindings-Add-RPI-RP2040-GPIO-Bridge.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0482-spi-dt-bindings-Add-RPI-RP2040-GPIO-Bridge.patch
@@ -94,7 +94,7 @@ Signed-off-by: Richard Oliver <richard.oliver at raspberrypi.com>
 +
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -19355,6 +19355,11 @@ L:	linux-edac at vger.kernel.org
+@@ -19361,6 +19361,11 @@ L:	linux-edac at vger.kernel.org
  S:	Maintained
  F:	drivers/ras/amd/fmpm.c
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0483-spi-Add-a-driver-for-the-RPI-RP2040-GPIO-bridge.patch b/target/linux/bcm27xx/patches-6.12/950-0483-spi-Add-a-driver-for-the-RPI-RP2040-GPIO-bridge.patch
index 088410484b..81016bef85 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0483-spi-Add-a-driver-for-the-RPI-RP2040-GPIO-bridge.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0483-spi-Add-a-driver-for-the-RPI-RP2040-GPIO-bridge.patch
@@ -42,7 +42,7 @@ Signed-off-by: Richard Oliver <richard.oliver at 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 at raspberrypi.com>
  S:	Maintained
  F:	Documentation/devicetree/bindings/spi/raspberrypi,rp2040-gpio-bridge.yaml
diff --git a/target/linux/bcm27xx/patches-6.12/950-0504-media-dt-bindings-i2c-Add-Sony-IMX500.patch b/target/linux/bcm27xx/patches-6.12/950-0504-media-dt-bindings-i2c-Add-Sony-IMX500.patch
index 4818c64bf2..445461be50 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0504-media-dt-bindings-i2c-Add-Sony-IMX500.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0504-media-dt-bindings-i2c-Add-Sony-IMX500.patch
@@ -150,7 +150,7 @@ Signed-off-by: Richard Oliver <richard.oliver at 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
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0505-media-i2c-Add-driver-for-Sony-IMX500-sensor.patch b/target/linux/bcm27xx/patches-6.12/950-0505-media-i2c-Add-driver-for-Sony-IMX500-sensor.patch
index 08b57ed3b0..b98f6d6d88 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0505-media-i2c-Add-driver-for-Sony-IMX500-sensor.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0505-media-i2c-Add-driver-for-Sony-IMX500-sensor.patch
@@ -58,7 +58,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -21610,6 +21610,7 @@ L:	linux-media at vger.kernel.org
+@@ -21616,6 +21616,7 @@ L:	linux-media at vger.kernel.org
  S:	Maintained
  T:	git git://linuxtv.org/media_tree.git
  F:	Documentation/devicetree/bindings/media/i2c/sony,imx500.yaml
diff --git a/target/linux/bcm27xx/patches-6.12/950-0834-media-platform-Add-Raspberry-Pi-HEVC-decoder-driver.patch b/target/linux/bcm27xx/patches-6.12/950-0834-media-platform-Add-Raspberry-Pi-HEVC-decoder-driver.patch
index 459c9ea358..1d142934c7 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0834-media-platform-Add-Raspberry-Pi-HEVC-decoder-driver.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0834-media-platform-Add-Raspberry-Pi-HEVC-decoder-driver.patch
@@ -36,7 +36,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at 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
  
diff --git a/target/linux/generic/backport-6.12/782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch b/target/linux/generic/backport-6.12/782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch
index bcf9b1a6e5..f1bcb35e66 100644
--- a/target/linux/generic/backport-6.12/782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch
+++ b/target/linux/generic/backport-6.12/782-05-v6.16-net-phy-Add-support-for-Aeonsemi-AS21xxx-PHYs.patch
@@ -42,6 +42,21 @@ Signed-off-by: Jakub Kicinski <kuba at 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 at gmail.com>
++L:	netdev at vger.kernel.org
++S:	Maintained
++F:	drivers/net/phy/as21xxx.c
++
+ AF8133J THREE-AXIS MAGNETOMETER DRIVER
+ M:	Ondřej Jirman <megi at 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 at 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);
diff --git a/target/linux/generic/backport-6.12/786-01-v6.18-net-phy-introduce-phy_id_compare_vendor-PHY-ID-helpe.patch b/target/linux/generic/backport-6.12/786-01-v6.18-net-phy-introduce-phy_id_compare_vendor-PHY-ID-helpe.patch
new file mode 100644
index 0000000000..cf74512958
--- /dev/null
+++ b/target/linux/generic/backport-6.12/786-01-v6.18-net-phy-introduce-phy_id_compare_vendor-PHY-ID-helpe.patch
@@ -0,0 +1,58 @@
+From 1abe21ef1adf0c5b6dbb5878c2fa4573df8d29fc Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at 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 at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://patch.msgid.link/20250823134431.4854-1-ansuelsmth@gmail.com
+Signed-off-by: Jakub Kicinski <kuba at 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
diff --git a/target/linux/generic/backport-6.12/786-02-v6.18-net-phy-as21xxx-better-handle-PHY-HW-reset-on-soft-r.patch b/target/linux/generic/backport-6.12/786-02-v6.18-net-phy-as21xxx-better-handle-PHY-HW-reset-on-soft-r.patch
new file mode 100644
index 0000000000..5b00da4024
--- /dev/null
+++ b/target/linux/generic/backport-6.12/786-02-v6.18-net-phy-as21xxx-better-handle-PHY-HW-reset-on-soft-r.patch
@@ -0,0 +1,45 @@
+From b4d5cd20507b252c746fa6971d82ac96f3b3e5b7 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at 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 at gmail.com>
+Link: https://patch.msgid.link/20250823134431.4854-2-ansuelsmth@gmail.com
+Signed-off-by: Jakub Kicinski <kuba at 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;
diff --git a/target/linux/generic/pending-6.12/510-block-add-uImage.FIT-subimage-block-driver.patch b/target/linux/generic/pending-6.12/510-block-add-uImage.FIT-subimage-block-driver.patch
index 21615160a9..1b5bf44225 100644
--- a/target/linux/generic/pending-6.12/510-block-add-uImage.FIT-subimage-block-driver.patch
+++ b/target/linux/generic/pending-6.12/510-block-add-uImage.FIT-subimage-block-driver.patch
@@ -36,7 +36,7 @@ Signed-off-by: Daniel Golle <daniel at 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/
  
diff --git a/target/linux/generic/pending-6.12/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch b/target/linux/generic/pending-6.12/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch
index 381b3a98cd..318d6216d8 100644
--- a/target/linux/generic/pending-6.12/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch
+++ b/target/linux/generic/pending-6.12/739-05-net-pcs-add-driver-for-MediaTek-USXGMII-PCS.patch
@@ -19,7 +19,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -14419,7 +14419,9 @@ M:	Daniel Golle <daniel at makrotopia.org>
+@@ -14425,7 +14425,9 @@ M:	Daniel Golle <daniel at makrotopia.org>
  L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/pcs/pcs-mtk-lynxi.c
diff --git a/target/linux/ipq40xx/patches-6.12/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.12/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
index 337e440d91..1f5e5c09a7 100644
--- a/target/linux/ipq40xx/patches-6.12/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
+++ b/target/linux/ipq40xx/patches-6.12/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
@@ -32,7 +32,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -19025,6 +19025,13 @@ L:	netdev at vger.kernel.org
+@@ -19031,6 +19031,13 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/qualcomm/emac/
  
diff --git a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
index df6f6da017..701c495d17 100644
--- a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -64,7 +64,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -19031,6 +19031,7 @@ L:	netdev at vger.kernel.org
+@@ -19037,6 +19037,7 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
  F:	drivers/net/ethernet/qualcomm/ipqess/
diff --git a/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
index 44797dc7bf..a3c9741578 100644
--- a/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
+++ b/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
@@ -945,7 +945,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at 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
  
diff --git a/target/linux/mediatek/patches-6.12/700-net-phy-mediatek-Add-2.5Gphy-firmware-dt-bindings-an.patch b/target/linux/mediatek/patches-6.12/700-net-phy-mediatek-Add-2.5Gphy-firmware-dt-bindings-an.patch
index 8c0ded2b37..24f6bad5fc 100644
--- a/target/linux/mediatek/patches-6.12/700-net-phy-mediatek-Add-2.5Gphy-firmware-dt-bindings-an.patch
+++ b/target/linux/mediatek/patches-6.12/700-net-phy-mediatek-Add-2.5Gphy-firmware-dt-bindings-an.patch
@@ -57,7 +57,7 @@ Signed-off-by: Sky Huang <skylake.huang at 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 at makrotopia.org>
  M:	Qingfang Deng <dqfext at gmail.com>
diff --git a/target/linux/mediatek/patches-6.12/701-net-phy-mediatek-add-driver-for-built-in-2.5G-ethern.patch b/target/linux/mediatek/patches-6.12/701-net-phy-mediatek-add-driver-for-built-in-2.5G-ethern.patch
index 0bb8ba00a3..b2139a4134 100644
--- a/target/linux/mediatek/patches-6.12/701-net-phy-mediatek-add-driver-for-built-in-2.5G-ethern.patch
+++ b/target/linux/mediatek/patches-6.12/701-net-phy-mediatek-add-driver-for-built-in-2.5G-ethern.patch
@@ -20,7 +20,7 @@ Signed-off-by: Sky Huang <skylake.huang at mediatek.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -14430,6 +14430,7 @@ M:	Sky Huang <SkyLake.Huang at mediatek.com
+@@ -14436,6 +14436,7 @@ M:	Sky Huang <SkyLake.Huang at mediatek.com
  L:	netdev at vger.kernel.org
  S:	Maintained
  F:	Documentation/devicetree/bindings/net/mediatek,2p5gphy-fw.yaml
diff --git a/target/linux/mvebu/patches-6.12/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-6.12/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
index 5e343ef7c3..e17246149a 100644
--- a/target/linux/mvebu/patches-6.12/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
+++ b/target/linux/mvebu/patches-6.12/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
@@ -16,7 +16,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -10965,6 +10965,22 @@ L:	virtualization at lists.linux.dev
+@@ -10971,6 +10971,22 @@ L:	virtualization at lists.linux.dev
  S:	Supported
  F:	drivers/vdpa/ifcvf/
  
diff --git a/target/linux/realtek/patches-6.12/001-v6.13-spi-mem-add-realtek-nand-controller.patch b/target/linux/realtek/patches-6.12/001-v6.13-spi-mem-add-realtek-nand-controller.patch
index ab630a0ee4..4679e380f8 100644
--- a/target/linux/realtek/patches-6.12/001-v6.13-spi-mem-add-realtek-nand-controller.patch
+++ b/target/linux/realtek/patches-6.12/001-v6.13-spi-mem-add-realtek-nand-controller.patch
@@ -28,7 +28,7 @@ Signed-off-by: Mark Brown <broonie at 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/*
  
diff --git a/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch b/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch
index 4d025d6049..690bc365e8 100644
--- a/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch
+++ b/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch
@@ -22,7 +22,7 @@ Signed-off-by: Andi Shyti <andi.shyti at 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/
  
diff --git a/target/linux/starfive/patches-6.12/1007-reset-starfive-Add-JH7100-audio-reset-driver.patch b/target/linux/starfive/patches-6.12/1007-reset-starfive-Add-JH7100-audio-reset-driver.patch
index bf4362f923..8be8bf73ed 100644
--- a/target/linux/starfive/patches-6.12/1007-reset-starfive-Add-JH7100-audio-reset-driver.patch
+++ b/target/linux/starfive/patches-6.12/1007-reset-starfive-Add-JH7100-audio-reset-driver.patch
@@ -20,7 +20,7 @@ Signed-off-by: Emil Renner Berthing <kernel at 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 at esmil.dk>
  M:	Hal Feng <hal.feng at starfivetech.com>
  S:	Maintained




More information about the lede-commits mailing list