1 From 6370a6cd16a5aa9726bf209c0f0a3179f4011cb1 Mon Sep 17 00:00:00 2001
2 From: Jonathan Bell <jonathan@raspberrypi.com>
3 Date: Mon, 22 May 2023 15:31:17 +0100
4 Subject: [PATCH] net: phy: broadcom: optionally enable link-down powersave
7 It's really a function of the board whether or not to use this feature
8 as it may require MAC compatibility as well as interop testing.
10 Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
12 drivers/net/phy/broadcom.c | 3 +++
13 1 file changed, 3 insertions(+)
15 --- a/drivers/net/phy/broadcom.c
16 +++ b/drivers/net/phy/broadcom.c
17 @@ -370,6 +370,9 @@ static int bcm54xx_config_init(struct ph
18 (phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
19 bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0);
21 + if (of_property_read_bool(np, "brcm,powerdown-enable"))
22 + phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE;
24 bcm54xx_adjust_rxrefclk(phydev);
26 switch (BRCM_PHY_MODEL(phydev)) {