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 cf497ba4b9e7986f5f7ce6466dc960f964a0719b Mon Sep 17 00:00:00 2001
|
|
From: John Doe <john.doe@somewhere.on.planet>
|
|
Date: Sat, 30 Aug 2025 14:20:58 +0800
|
|
Subject: [PATCH 3/3] net: phy: realtek: add rtl8211x LED configuration from OF
|
|
|
|
Signed-off-by: retro98boy <retro98boy@qq.com>
|
|
---
|
|
drivers/net/phy/realtek/realtek_main.c | 11 +++++++++++
|
|
1 file changed, 11 insertions(+)
|
|
|
|
diff --git a/drivers/net/phy/realtek/realtek_main.c b/drivers/net/phy/realtek/realtek_main.c
|
|
index dd0d67514..4743f99b3 100644
|
|
--- a/drivers/net/phy/realtek/realtek_main.c
|
|
+++ b/drivers/net/phy/realtek/realtek_main.c
|
|
@@ -215,6 +215,15 @@ static int rtl821x_modify_ext_page(struct phy_device *phydev, u16 ext_page,
|
|
return phy_restore_page(phydev, oldpage, ret);
|
|
}
|
|
|
|
+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;
|
|
@@ -595,6 +604,8 @@ static int rtl8211f_config_init(struct phy_device *phydev)
|
|
if (ret)
|
|
return ret;
|
|
|
|
+ rtl821x_led_of_init(phydev);
|
|
+
|
|
if (priv->has_phycr2) {
|
|
ret = phy_modify_paged(phydev, RTL8211F_PHYCR_PAGE,
|
|
RTL8211F_PHYCR2, RTL8211F_CLKOUT_EN,
|
|
--
|
|
2.51.0
|
|
|