diff options
| author | Daniel Golle <daniel@makrotopia.org> | 2025-08-30 03:34:23 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-09-02 17:45:43 -0700 |
| commit | 720412c4aebc91fdb6c880353a9465ab36a26614 (patch) | |
| tree | 8d4af567770b131d8923df4dc2864cc8bb6f3c00 /drivers | |
| parent | net: dsa: lantiq_gswip: support offset of MII registers (diff) | |
| download | linux-720412c4aebc91fdb6c880353a9465ab36a26614.tar.gz linux-720412c4aebc91fdb6c880353a9465ab36a26614.zip | |
net: dsa: lantiq_gswip: support standard MDIO node name
Instead of matching against the child node's compatible string also
support locating the node of the device tree node of the MDIO bus
in the standard way by referencing the node name ("mdio").
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://patch.msgid.link/5a9a3d659ef0d8b7eca37fb69ec87ff5a3192820.1756520811.git.daniel@makrotopia.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/dsa/lantiq/lantiq_gswip.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c index 4d7c7d933c92..43f83c0736d1 100644 --- a/drivers/net/dsa/lantiq/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq/lantiq_gswip.c @@ -286,6 +286,9 @@ static int gswip_mdio(struct gswip_priv *priv) int err = 0; mdio_np = of_get_compatible_child(switch_np, "lantiq,xrx200-mdio"); + if (!mdio_np) + mdio_np = of_get_child_by_name(switch_np, "mdio"); + if (!of_device_is_available(mdio_np)) goto out_put_node; |
