net: phy: broadcom: optionally enable link-down powersave based on DT

It's really a function of the board whether or not to use this feature
as it may require MAC compatibility as well as interop testing.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
This commit is contained in:
Jonathan Bell
2023-05-22 15:31:17 +01:00
committed by Dom Cobley
parent c18474cda3
commit a34cecf271

View File

@@ -491,6 +491,9 @@ static int bcm54xx_config_init(struct phy_device *phydev)
(phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE)) (phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0); bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0);
if (of_property_read_bool(np, "brcm,powerdown-enable"))
phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE;
bcm54xx_adjust_rxrefclk(phydev); bcm54xx_adjust_rxrefclk(phydev);
switch (phydev->drv->phy_id & PHY_ID_MATCH_MODEL_MASK) { switch (phydev->drv->phy_id & PHY_ID_MATCH_MODEL_MASK) {