|
| 1 | +From a9f41e5114e0d88b681328a44b3a4170d687312e Mon Sep 17 00:00:00 2001 |
| 2 | +From: Nishanth Menon <nm@ti.com> |
| 3 | +Date: Tue, 13 Dec 2022 14:25:59 -0600 |
| 4 | +Subject: [PATCH] HACK: net: phy: dp83td510: Hardcode LED configuration |
| 5 | + |
| 6 | +Hardcode LED configuration for LED2 signal to be link status |
| 7 | +and LED0 signal to be rx/tx |
| 8 | + |
| 9 | +Signed-off-by: Nishanth Menon <nm@ti.com> |
| 10 | +--- |
| 11 | + drivers/net/phy/dp83td510.c | 13 +++++++++++++ |
| 12 | + 1 file changed, 13 insertions(+) |
| 13 | + |
| 14 | +diff --git a/drivers/net/phy/dp83td510.c b/drivers/net/phy/dp83td510.c |
| 15 | +index 1ae792b0daaa..dd286bb03305 100644 |
| 16 | +--- a/drivers/net/phy/dp83td510.c |
| 17 | ++++ b/drivers/net/phy/dp83td510.c |
| 18 | +@@ -27,6 +27,18 @@ |
| 19 | + #define DP83TD510E_AN_STAT_1 0x60c |
| 20 | + #define DP83TD510E_MASTER_SLAVE_RESOL_FAIL BIT(15) |
| 21 | + |
| 22 | ++int dp83td510_config_init(struct phy_device *phydev) |
| 23 | ++{ |
| 24 | ++ /* |
| 25 | ++ * Use 0x0049 If we wanted the green LED to be the Rx/Tx indicator. |
| 26 | ++ * But the orange LED is just overwhelming. |
| 27 | ++ * So pick the other way around - Link LED is the green one |
| 28 | ++ * (assuming there is just intermittent data traffic, and don't |
| 29 | ++ * blind the folks), just use the orange LED for link traffic. |
| 30 | ++ */ |
| 31 | ++ return phy_write_mmd(phydev, MDIO_MMD_VEND2, 0x460, 0x0940); |
| 32 | ++} |
| 33 | ++ |
| 34 | + static int dp83td510_config_intr(struct phy_device *phydev) |
| 35 | + { |
| 36 | + int ret; |
| 37 | +@@ -187,6 +199,7 @@ static struct phy_driver dp83td510_driver[] = { |
| 38 | + PHY_ID_MATCH_MODEL(DP83TD510E_PHY_ID), |
| 39 | + .name = "TI DP83TD510E", |
| 40 | + |
| 41 | ++ .config_init = dp83td510_config_init, |
| 42 | + .config_aneg = dp83td510_config_aneg, |
| 43 | + .read_status = dp83td510_read_status, |
| 44 | + .get_features = dp83td510_get_features, |
| 45 | +-- |
| 46 | +2.30.2 |
| 47 | + |
0 commit comments