mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

Uses upstream DSA switch modules (rtl8365mb, rtl8366), similar to RTL8367C and rtl8366rb swconfig drivers. The package dependencies exclude targets built without kernel CONFIG_OF. It also fixes the rtl8366rb LED support. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Signed-off-by: Robert Marko <robimarko@gmail.com>
35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
From 8685c98d45c54346caf005de69988e13c731c533 Mon Sep 17 00:00:00 2001
|
|
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Date: Fri, 9 Feb 2024 02:03:43 -0300
|
|
Subject: net: dsa: realtek: get internal MDIO node by name
|
|
|
|
The binding docs requires for SMI-connected devices that the switch
|
|
must have a child node named "mdio" and with a compatible string of
|
|
"realtek,smi-mdio". Meanwile, for MDIO-connected switches, the binding
|
|
docs only requires a child node named "mdio".
|
|
|
|
This patch changes the driver to use the common denominator for both
|
|
interfaces, looking for the MDIO node by name, ignoring the compatible
|
|
string.
|
|
|
|
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
|
|
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
|
|
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
|
|
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
|
|
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
---
|
|
drivers/net/dsa/realtek/realtek-smi.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/dsa/realtek/realtek-smi.c
|
|
+++ b/drivers/net/dsa/realtek/realtek-smi.c
|
|
@@ -333,7 +333,7 @@ static int realtek_smi_setup_mdio(struct
|
|
struct device_node *mdio_np;
|
|
int ret;
|
|
|
|
- mdio_np = of_get_compatible_child(priv->dev->of_node, "realtek,smi-mdio");
|
|
+ mdio_np = of_get_child_by_name(priv->dev->of_node, "mdio");
|
|
if (!mdio_np) {
|
|
dev_err(priv->dev, "no MDIO bus node\n");
|
|
return -ENODEV;
|