lede/target/linux/bcm27xx/patches-6.12/950-0159-net-phy-broadcom-optionally-enable-link-down-powersa.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

27 lines
941 B
Diff

From d99c99597fe709d0f197eb49bfae6191c7c00c4a Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.com>
Date: Mon, 22 May 2023 15:31:17 +0100
Subject: [PATCH] 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>
---
drivers/net/phy/broadcom.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -463,6 +463,9 @@ static int bcm54xx_config_init(struct ph
(phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
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);
switch (BRCM_PHY_MODEL(phydev)) {