HomeFreeBSD

mii_fdt: Add support for switch PHY node lookup

Description

mii_fdt: Add support for switch PHY node lookup

Previously we would only search for a PHY xref in node of the miibus
parent.
That didn't work very well with switches.
Fix that by searching through "ports" subnode, checking if any of its
children have a valid PHY xref.
Since switches tend to have multiple ports we also have multiple
candidates.
Use the PHY address read from mii_attach_args to find the right one.

Obtained from: Semihalf
Sponsored by: Alstom Group
Reviewed by: mw
Differential revision: https://reviews.freebsd.org/D32690

Details

Provenance
kdAuthored on Oct 27 2021, 8:34 AM
wmaCommitted on Nov 6 2021, 8:08 AM
Reviewer
mw
Differential Revision
D32690: mii_fdt: Add support for switch PHY node lookup
Parents
rG463b6ba05a69: Introduce qoriq_gpio_pic driver
Branches
Unknown
Tags
Unknown