generic: add fix for AQR113 PMD Global Transmit Disable bit
PMD Global Transmit Disable bit should be cleared for normal operation. This should be HW default, however I found that on Asus RT-AX89X that uses AQR113C PHY and firmware 5.4 this bit is set by default. With this bit set the AQR cannot achieve a link with its link-partner and it took me multiple hours of digging through the vendor GPL source to find this out, so lets always clear this bit during .config_init() to avoid a situation like this in the future. aqr107_wait_processor_intensive_op() is moved up because datasheet notes that any changes to this bit are processor intensive. This is a modified version of patch that got merged upstream as AQR113C has a separate config_init() upstream. Link: https://github.com/openwrt/openwrt/pull/15840 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
@@ -97,7 +97,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;
|
||||
@@ -807,7 +875,7 @@ static struct phy_driver aqr_driver[] =
|
||||
@@ -816,7 +884,7 @@ static struct phy_driver aqr_driver[] =
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR112),
|
||||
.name = "Aquantia AQR112",
|
||||
.probe = aqr107_probe,
|
||||
@@ -106,7 +106,7 @@ Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com>
|
||||
.config_intr = aqr_config_intr,
|
||||
.handle_interrupt = aqr_handle_interrupt,
|
||||
.get_tunable = aqr107_get_tunable,
|
||||
@@ -830,7 +898,7 @@ static struct phy_driver aqr_driver[] =
|
||||
@@ -839,7 +907,7 @@ static struct phy_driver aqr_driver[] =
|
||||
PHY_ID_MATCH_MODEL(PHY_ID_AQR412),
|
||||
.name = "Aquantia AQR412",
|
||||
.probe = aqr107_probe,
|
||||
|
||||
@@ -21,7 +21,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS 0xe812
|
||||
#define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3)
|
||||
@@ -1014,6 +1016,30 @@ static struct phy_driver aqr_driver[] =
|
||||
@@ -1023,6 +1025,30 @@ static struct phy_driver aqr_driver[] =
|
||||
.led_hw_control_get = aqr_phy_led_hw_control_get,
|
||||
.led_polarity_set = aqr_phy_led_polarity_set,
|
||||
},
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
};
|
||||
|
||||
module_phy_driver(aqr_driver);
|
||||
@@ -1034,6 +1060,8 @@ static struct mdio_device_id __maybe_unu
|
||||
@@ -1043,6 +1069,8 @@ static struct mdio_device_id __maybe_unu
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR113C) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR114C) },
|
||||
{ PHY_ID_MATCH_MODEL(PHY_ID_AQR813) },
|
||||
|
||||
Reference in New Issue
Block a user