Enable MAC controlled energy efficient ethernet (EEE) so that MAC can keep the PHY in EEE sleep mode when link utilization is low to reduce energy consumption. Signed-off-by: Narayan Reddy <narayanr@xxxxxxxxxx> Signed-off-by: Revanth Kumar Uppala <ruppala@xxxxxxxxxx> --- drivers/net/phy/aquantia_main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/phy/aquantia_main.c b/drivers/net/phy/aquantia_main.c index c99b9d066463..faca2a0b1d49 100644 --- a/drivers/net/phy/aquantia_main.c +++ b/drivers/net/phy/aquantia_main.c @@ -28,6 +28,9 @@ #define MDIO_AN_ADVT 0x0010 +#define VEND1_SEC_INGRESS_CNTRL_REG1 0x7001 +#define MAC_CNTRL_EEE (BIT(8) | BIT(12)) + #define MDIO_PHYXS_VEND_IF_STATUS 0xe812 #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_MASK GENMASK(7, 3) #define MDIO_PHYXS_VEND_IF_STATUS_TYPE_KR 0 @@ -596,6 +599,12 @@ static int aqr107_config_init(struct phy_device *phydev) if (ret < 0) return ret; + /* Enable MAC Controlled EEE */ + ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, + VEND1_SEC_INGRESS_CNTRL_REG1, MAC_CNTRL_EEE); + if (ret < 0) + return ret; + return aqr107_set_downshift(phydev, MDIO_AN_VEND_PROV_DOWNSHIFT_DFLT); } -- 2.17.1