Commit 66e22932 authored by Jisheng Zhang's avatar Jisheng Zhang Committed by David S. Miller

net: phy: realtek: enable ALDPS to save power for RTL8211F

Enable ALDPS(Advanced Link Down Power Saving) to save power when
link down.
Signed-off-by: default avatarJisheng Zhang <Jisheng.Zhang@synaptics.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a7920efd
...@@ -27,11 +27,16 @@ ...@@ -27,11 +27,16 @@
#define RTL821x_EXT_PAGE_SELECT 0x1e #define RTL821x_EXT_PAGE_SELECT 0x1e
#define RTL821x_PAGE_SELECT 0x1f #define RTL821x_PAGE_SELECT 0x1f
#define RTL8211F_PHYCR1 0x18
#define RTL8211F_INSR 0x1d #define RTL8211F_INSR 0x1d
#define RTL8211F_TX_DELAY BIT(8) #define RTL8211F_TX_DELAY BIT(8)
#define RTL8211F_RX_DELAY BIT(3) #define RTL8211F_RX_DELAY BIT(3)
#define RTL8211F_ALDPS_PLL_OFF BIT(1)
#define RTL8211F_ALDPS_ENABLE BIT(2)
#define RTL8211F_ALDPS_XTAL_OFF BIT(12)
#define RTL8211E_TX_DELAY BIT(1) #define RTL8211E_TX_DELAY BIT(1)
#define RTL8211E_RX_DELAY BIT(2) #define RTL8211E_RX_DELAY BIT(2)
#define RTL8211E_MODE_MII_GMII BIT(3) #define RTL8211E_MODE_MII_GMII BIT(3)
...@@ -178,8 +183,12 @@ static int rtl8211f_config_init(struct phy_device *phydev) ...@@ -178,8 +183,12 @@ static int rtl8211f_config_init(struct phy_device *phydev)
{ {
struct device *dev = &phydev->mdio.dev; struct device *dev = &phydev->mdio.dev;
u16 val_txdly, val_rxdly; u16 val_txdly, val_rxdly;
u16 val;
int ret; int ret;
val = RTL8211F_ALDPS_ENABLE | RTL8211F_ALDPS_PLL_OFF | RTL8211F_ALDPS_XTAL_OFF;
phy_modify_paged_changed(phydev, 0xa43, RTL8211F_PHYCR1, val, val);
switch (phydev->interface) { switch (phydev->interface) {
case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII:
val_txdly = 0; val_txdly = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment