net: dsa: qca8k: add ethernet-ports fallback to setup_mdio_bus

Dsa now also supports ethernet-ports. Add this new binding as a fallback
if the ports node can't be found.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ansuel Smith 2021-05-14 23:00:05 +02:00 committed by David S. Miller
parent 95ffeaf18b
commit 1ee0591a10
1 changed files with 3 additions and 0 deletions

View File

@ -718,6 +718,9 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
int err;
ports = of_get_child_by_name(priv->dev->of_node, "ports");
if (!ports)
ports = of_get_child_by_name(priv->dev->of_node, "ethernet-ports");
if (!ports)
return -EINVAL;