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

(cherry picked from commit 4b843e7f0319867c412070e7752dbb47f195b322)

Details

Provenance
kdAuthored on Oct 27 2021, 8:34 AM
mwCommitted on Mar 29 2022, 10:24 PM
Reviewer
mw
Differential Revision
D32690: mii_fdt: Add support for switch PHY node lookup
Parents
rG993cd606c238: sdhci_xenon: add ACPI support
Branches
Unknown
Tags
Unknown