mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: John Doe <john.doe@somewhere.on.planet>
|
|
Date: Sat, 30 Aug 2025 14:07:36 +0800
|
|
Subject: net: phy: realtek: add rtl8211x LED configuration from OF
|
|
|
|
Signed-off-by: retro98boy <retro98boy@qq.com>
|
|
---
|
|
drivers/net/phy/realtek.c | 11 ++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
|
|
index 111111111111..222222222222 100644
|
|
--- a/drivers/net/phy/realtek.c
|
|
+++ b/drivers/net/phy/realtek.c
|
|
@@ -120,6 +120,15 @@ static int rtl821x_write_page(struct phy_device *phydev, int page)
|
|
return __phy_write(phydev, RTL821x_PAGE_SELECT, page);
|
|
}
|
|
|
|
+static void rtl821x_led_of_init(struct phy_device *phydev)
|
|
+{
|
|
+ struct device *dev = &phydev->mdio.dev;
|
|
+ u32 val;
|
|
+
|
|
+ if (!of_property_read_u32(dev->of_node, "realtek,led-data", &val))
|
|
+ phy_write_paged(phydev, 0xd04, 0x10, val);
|
|
+}
|
|
+
|
|
static int rtl821x_probe(struct phy_device *phydev)
|
|
{
|
|
struct device *dev = &phydev->mdio.dev;
|
|
@@ -439,6 +448,8 @@ static int rtl8211f_config_init(struct phy_device *phydev)
|
|
val_rxdly ? "enabled" : "disabled");
|
|
}
|
|
|
|
+ rtl821x_led_of_init(phydev);
|
|
+
|
|
if (priv->has_phycr2) {
|
|
ret = phy_modify_paged(phydev, 0xa43, RTL8211F_PHYCR2,
|
|
RTL8211F_CLKOUT_EN, priv->phycr2);
|
|
--
|
|
Armbian
|
|
|