net: phy: add support for scanning PHY in PHY packages nodes
authorChristian Marangi <ansuelsmth@gmail.com>
Tue, 6 Feb 2024 17:31:05 +0000 (18:31 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Feb 2024 15:36:19 +0000 (15:36 +0000)
commit385ef48f468696d6d172eb367656a3466fa0408d
tree58c72335910cee04e85611ada29d8c1f7e9f57cf
parent8453c88c7a150a5ae52382b0bfda00a4b0a643ef
net: phy: add support for scanning PHY in PHY packages nodes

Add support for scanning PHY in PHY package nodes. PHY packages nodes
are just container for actual PHY on the MDIO bus.

Their PHY address defined in the PHY package node are absolute and
reflect the address on the MDIO bus.

mdio_bus.c and of_mdio.c is updated to now support and parse also
PHY package subnode by checking if the node name match
"ethernet-phy-package".

As PHY package reg is mandatory and each PHY in the PHY package must
have a reg, every invalid PHY Package node is ignored and will be
skipped by the autoscan fallback.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio/of_mdio.c
drivers/net/phy/mdio_bus.c