[PATCH 01/20] net: sunxi_emac: chase DT nodes to find PHY regulator

Sam Edwards cfsworks at gmail.com
Wed Aug 9 21:56:51 CEST 2023


Hi Andre,

Looks good to me! My target doesn't have PHY on a regulator, so no test 
result for this one.

On 7/21/23 07:45, Andre Przywara wrote:
> At the moment the sun4i EMAC driver relies on hardcoded CONFIG_MACPWR
> Kconfig symbols to enable potential PHY regulators. As we want to get rid
> of those, we need to find the regulator by chasing up the DT.
> 
> The sun4i-emac binding puts the PHY regulator into the MDIO node, which
> is the parent of the PHY device. U-Boot does not have (and does not
> need) an MDIO driver, so we need to chase down the regulator through the
> EMAC node: we follow the "phy-handle" property to find the PHY node,
> then go up to its parent, where we find the "phy-supply" link to the
> regulator. Let U-Boot find the associated regulator device, and put that
> into the private device struct, so we can find and enable the regulator
> at probe time, later.
> 
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>

Reviewed-by: Sam Edwards <CFSworks at gmail.com>
Thanks,
Sam


More information about the U-Boot mailing list