diff --git a/target/linux/rockchip/patches-5.15/101-net-realtek-r8169-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-5.15/101-net-realtek-r8169-add-LED-configuration-from-OF.patch index 003ad1c14..88c7c0bbd 100644 --- a/target/linux/rockchip/patches-5.15/101-net-realtek-r8169-add-LED-configuration-from-OF.patch +++ b/target/linux/rockchip/patches-5.15/101-net-realtek-r8169-add-LED-configuration-from-OF.patch @@ -1,3 +1,12 @@ +From edcc2833819f6750bf003b95a6ac856aced26274 Mon Sep 17 00:00:00 2001 +From: AnYun +Date: Sat, 18 Mar 2023 23:05:16 +0800 +Subject: [PATCH] r8169: add LED configuration from OF + +--- + drivers/net/ethernet/realtek/r8169_main.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -17,6 +17,7 @@ diff --git a/target/linux/rockchip/patches-5.15/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-5.15/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch new file mode 100644 index 000000000..1781ad445 --- /dev/null +++ b/target/linux/rockchip/patches-5.15/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch @@ -0,0 +1,34 @@ +From edcc2833819f6750bf003b95a6ac856aced26276 Mon Sep 17 00:00:00 2001 +From: AnYun +Date: Mon, 3 Apr 2023 23:26:04 +0800 +Subject: [PATCH] net: phy: realtek: add LED configuration from OF for 8211f + +--- + drivers/net/phy/realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/net/phy/realtek.c ++++ b/drivers/net/phy/realtek.c +@@ -343,6 +343,7 @@ static int rtl8211f_config_init(struct phy_device *phydev) + struct rtl821x_priv *priv = phydev->priv; + struct device *dev = &phydev->mdio.dev; + u16 val_txdly, val_rxdly; ++ u32 led_data; + int ret; + + ret = phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1, +@@ -417,6 +418,14 @@ static int rtl8211f_config_init(struct phy_device *phydev) + return ret; + } + ++ ret = of_property_read_u32(dev->of_node, ++ "realtek,led-data", &led_data); ++ if (!ret) { ++ phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04); ++ phy_write(phydev, 0x10, led_data); ++ phy_write(phydev, RTL821x_PAGE_SELECT, 0x0); ++ } ++ + return genphy_soft_reset(phydev); + } + diff --git a/target/linux/rockchip/patches-6.1/101-net-realtek-r8169-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-6.1/101-net-realtek-r8169-add-LED-configuration-from-OF.patch index 6e077c2f6..b7248f037 100644 --- a/target/linux/rockchip/patches-6.1/101-net-realtek-r8169-add-LED-configuration-from-OF.patch +++ b/target/linux/rockchip/patches-6.1/101-net-realtek-r8169-add-LED-configuration-from-OF.patch @@ -1,3 +1,12 @@ +From edcc2833819f6750bf003b95a6ac856aced26274 Mon Sep 17 00:00:00 2001 +From: AnYun +Date: Sat, 18 Mar 2023 23:05:16 +0800 +Subject: [PATCH] r8169: add LED configuration from OF + +--- + drivers/net/ethernet/realtek/r8169_main.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -17,6 +17,7 @@ diff --git a/target/linux/rockchip/patches-6.1/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch b/target/linux/rockchip/patches-6.1/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch new file mode 100644 index 000000000..eb0de6ea5 --- /dev/null +++ b/target/linux/rockchip/patches-6.1/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch @@ -0,0 +1,34 @@ +From edcc2833819f6750bf003b95a6ac856aced26276 Mon Sep 17 00:00:00 2001 +From: AnYun +Date: Mon, 3 Apr 2023 23:26:04 +0800 +Subject: [PATCH] net: phy: realtek: add LED configuration from OF for 8211f + +--- + drivers/net/phy/realtek.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/net/phy/realtek.c ++++ b/drivers/net/phy/realtek.c +@@ -349,6 +349,7 @@ static int rtl8211f_config_init(struct phy_device *phydev) + struct rtl821x_priv *priv = phydev->priv; + struct device *dev = &phydev->mdio.dev; + u16 val_txdly, val_rxdly; ++ u32 led_data; + int ret; + + ret = phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1, +@@ -425,6 +426,14 @@ static int rtl8211f_config_init(struct phy_device *phydev) + } + } + ++ ret = of_property_read_u32(dev->of_node, ++ "realtek,led-data", &led_data); ++ if (!ret) { ++ phy_write(phydev, RTL821x_PAGE_SELECT, 0xd04); ++ phy_write(phydev, 0x10, led_data); ++ phy_write(phydev, RTL821x_PAGE_SELECT, 0x0); ++ } ++ + return genphy_soft_reset(phydev); + } +