Skip to contentSkip to conversation

linux: net: phy: realtek: changing LED behaviour for RTL8211F

RFC PATCH In review Oliver Graute 3 participants 5 messages Feb 9, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 linux: net: phy: realtek: changing LED behaviour for RTL8211F

This enable the LEDs for network activity and 100/1000Link for the RTL8211F

---
 drivers/net/phy/realtek.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/phy/realtek.c +5 -0
index 3d99fd6664d7..5c796883cad3 100644
@@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev)
 		}
 	}
 
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04);
+        phy_write(phydev, 0x10, 0x15B);
+
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
+
 	return genphy_soft_reset(phydev);
 }
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 12 lines · Oliver Graute

This enable the LEDs for network activity and 100/1000Link for the RTL8211F

---
 drivers/net/phy/realtek.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/phy/realtek.c +0 -0
index 3d99fd6664d7..5c796883cad3 100644

drivers/net/phy/realtek.c static int rtl8211f_config_init(struct phy_device *phydev) · line 423

Quoted 8 lines
drivers/net/phy/realtek.c +5 -0
@@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev)
 		}
 	}
 
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04);
+        phy_write(phydev, 0x10, 0x15B);
+
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
+

nit: it looks like the indentation in the new lines above should
be using a single tab rather than 8 spaces.

Quoted 6 lines
drivers/net/phy/realtek.c +0 -0
 	return genphy_soft_reset(phydev);
 }
 
Signature · 1 line
2.17.1
#2 lore raw
Quoted 16 lines · Simon Horman
Quoted 15 lines · Oliver Graute

This enable the LEDs for network activity and 100/1000Link for the RTL8211F

---
 drivers/net/phy/realtek.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/phy/realtek.c +0 -0
index 3d99fd6664d7..5c796883cad3 100644
@@ -416,6 +416,11 @@ static int rtl8211f_config_init(struct phy_device *phydev)
 		}
 	}
 
Quoted 8 lines

drivers/net/phy/realtek.c static int rtl8211f_config_init(struct phy_device *phydev) · line 423

Quoted 5 lines
drivers/net/phy/realtek.c +5 -0
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04);
+        phy_write(phydev, 0x10, 0x15B);
+
+        phy_write(phydev, RTL821x_PAGE_SELECT, 0x0);
+

nit: it looks like the indentation in the new lines above should
be using a single tab rather than 8 spaces.

thx, I will fix the indentation.

is this the right place to turn on the realtek phy LEDs for RTL8211F?

Best regards,

Oliver

#3 lore raw
Quoted 1 line

is this the right place to turn on the realtek phy LEDs for RTL8211F?

Probably not. There are a few issues. This will only work one particular board. Therefore, you'd need some kind of runtime configuration to also support other boards. But lately any LED related patches for PHYs were NAK'd because they need to integrate with the LED subsystem. See [1].

-michael

[1] https://lore.kernel.org/r/[email protected]/

#4 lore raw
Quoted 10 lines · Michael Walle
Quoted 1 line

is this the right place to turn on the realtek phy LEDs for RTL8211F?

Probably not. There are a few issues. This will only work one particular board. Therefore, you'd need some kind of runtime configuration to also support other boards. But lately any LED related patches for PHYs were NAK'd because they need to integrate with the LED subsystem. See [1].

-michael

[1] https://lore.kernel.org/r/[email protected]/

ok thx for this information.

Best Regards,

Oliver