generic: 6.1: refresh hack patches
[openwrt/staging/dangole.git] / target / linux / generic / hack-6.1 / 722-net-phy-aquantia-enable-AQR112-and-AQR412.patch
index d4024f1a4358bd64ac24addebf5e47dfccbd04d8..77b190464cfb027f343a8eb4ac16b25dc296eaed 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
 
 --- a/drivers/net/phy/aquantia_main.c
 +++ b/drivers/net/phy/aquantia_main.c
-@@ -20,6 +20,8 @@
+@@ -24,6 +24,8 @@
  #define PHY_ID_AQR405 0x03a1b4b0
  #define PHY_ID_AQR113C        0x31c31c12
  #define PHY_ID_AQR813 0x31c31cb2
@@ -24,9 +24,9 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  
  #define MDIO_PHYXS_VEND_IF_STATUS             0xe812
  #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK   GENMASK(7, 3)
-@@ -126,6 +128,29 @@
- #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL2    BIT(1)
- #define VEND1_GLOBAL_INT_VEND_MASK_GLOBAL3    BIT(0)
+@@ -151,6 +153,29 @@
+ #define AQR107_OP_IN_PROG_SLEEP               1000
+ #define AQR107_OP_IN_PROG_TIMEOUT     100000
  
 +/* registers in MDIO_MMD_VEND1 region */
 +#define AQUANTIA_VND1_GLOBAL_SC                       0x000
@@ -54,7 +54,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  struct aqr107_hw_stat {
        const char *name;
        int reg;
-@@ -257,6 +282,51 @@ static int aqr_config_aneg(struct phy_de
+@@ -282,6 +307,51 @@ static int aqr_config_aneg(struct phy_de
        return genphy_c45_check_and_restart_aneg(phydev, changed);
  }
  
@@ -106,7 +106,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  static int aqr_config_intr(struct phy_device *phydev)
  {
        bool en = phydev->interrupts == PHY_INTERRUPT_ENABLED;
-@@ -780,6 +850,30 @@ static struct phy_driver aqr_driver[] =
+@@ -881,6 +951,30 @@ static struct phy_driver aqr_driver[] =
        .get_stats      = aqr107_get_stats,
        .link_change_notify = aqr107_link_change_notify,
  },
@@ -137,7 +137,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
  };
  
  module_phy_driver(aqr_driver);
-@@ -790,5 +884,7 @@ static struct mdio_device_id __maybe_unu
+@@ -895,6 +989,8 @@ static struct mdio_device_id __maybe_unu
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR405) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
        { PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
@@ -145,3 +145,4 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
 +      { PHY_ID_MATCH_MODEL(PHY_ID_AQR412) },
        { }
  };