kernel: hack: support inverted LEDs on MaxLinear GPY211 PHY
Add downstream DT property to setup the PHY LEDs of the MaxLinear GPY211 PHY in such way that the VDD of the LED is driven by the SoC pin rather than the GND (which is the default). Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/phy/mxl-gpy.c
|
||||
+++ b/drivers/net/phy/mxl-gpy.c
|
||||
@@ -191,8 +191,11 @@ static bool gpy_2500basex_chk(struct phy
|
||||
@@ -195,8 +195,11 @@ static bool gpy_2500basex_chk(struct phy
|
||||
|
||||
phydev->speed = SPEED_2500;
|
||||
phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -216,6 +219,14 @@ static int gpy_config_aneg(struct phy_de
|
||||
@@ -220,6 +223,14 @@ static int gpy_config_aneg(struct phy_de
|
||||
u32 adv;
|
||||
int ret;
|
||||
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
if (phydev->autoneg == AUTONEG_DISABLE) {
|
||||
/* Configure half duplex with genphy_setup_forced,
|
||||
* because genphy_c45_pma_setup_forced does not support.
|
||||
@@ -306,6 +317,8 @@ static void gpy_update_interface(struct
|
||||
@@ -310,6 +321,8 @@ static void gpy_update_interface(struct
|
||||
switch (phydev->speed) {
|
||||
case SPEED_2500:
|
||||
phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL,
|
||||
VSPEC1_SGMII_CTRL_ANEN, 0);
|
||||
if (ret < 0)
|
||||
@@ -317,7 +330,7 @@ static void gpy_update_interface(struct
|
||||
@@ -321,7 +334,7 @@ static void gpy_update_interface(struct
|
||||
case SPEED_100:
|
||||
case SPEED_10:
|
||||
phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
|
||||
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
|
||||
--- a/drivers/net/phy/mxl-gpy.c
|
||||
+++ b/drivers/net/phy/mxl-gpy.c
|
||||
@@ -367,8 +367,11 @@ static bool gpy_2500basex_chk(struct phy
|
||||
@@ -371,8 +371,11 @@ static bool gpy_2500basex_chk(struct phy
|
||||
|
||||
phydev->speed = SPEED_2500;
|
||||
phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
@@ -28,7 +28,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -392,6 +395,14 @@ static int gpy_config_aneg(struct phy_de
|
||||
@@ -396,6 +399,14 @@ static int gpy_config_aneg(struct phy_de
|
||||
u32 adv;
|
||||
int ret;
|
||||
|
||||
@@ -43,7 +43,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
if (phydev->autoneg == AUTONEG_DISABLE) {
|
||||
/* Configure half duplex with genphy_setup_forced,
|
||||
* because genphy_c45_pma_setup_forced does not support.
|
||||
@@ -482,6 +493,8 @@ static void gpy_update_interface(struct
|
||||
@@ -486,6 +497,8 @@ static void gpy_update_interface(struct
|
||||
switch (phydev->speed) {
|
||||
case SPEED_2500:
|
||||
phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
|
||||
@@ -52,7 +52,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
||||
ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL,
|
||||
VSPEC1_SGMII_CTRL_ANEN, 0);
|
||||
if (ret < 0)
|
||||
@@ -493,7 +506,7 @@ static void gpy_update_interface(struct
|
||||
@@ -497,7 +510,7 @@ static void gpy_update_interface(struct
|
||||
case SPEED_100:
|
||||
case SPEED_10:
|
||||
phydev->interface = PHY_INTERFACE_MODE_SGMII;
|
||||
|
||||
Reference in New Issue
Block a user