File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 17
17
#define DP83TG720S_PHY_RESET 0x1f
18
18
#define DP83TG720S_HW_RESET BIT(15)
19
19
20
+ #define DP83TG720S_LPS_CFG3 0x18c
21
+ /* Power modes are documented as bit fields but used as values */
22
+ /* Power Mode 0 is Normal mode */
23
+ #define DP83TG720S_LPS_CFG3_PWR_MODE_0 BIT(0)
24
+
20
25
#define DP83TG720S_RGMII_DELAY_CTRL 0x602
21
26
/* In RGMII mode, Enable or disable the internal delay for RXD */
22
27
#define DP83TG720S_RGMII_RX_CLK_SEL BIT(1)
@@ -154,10 +159,17 @@ static int dp83tg720_config_init(struct phy_device *phydev)
154
159
*/
155
160
usleep_range (1000 , 2000 );
156
161
157
- if (phy_interface_is_rgmii (phydev ))
158
- return dp83tg720_config_rgmii_delay (phydev );
162
+ if (phy_interface_is_rgmii (phydev )) {
163
+ ret = dp83tg720_config_rgmii_delay (phydev );
164
+ if (ret )
165
+ return ret ;
166
+ }
159
167
160
- return 0 ;
168
+ /* In case the PHY is bootstrapped in managed mode, we need to
169
+ * wake it.
170
+ */
171
+ return phy_write_mmd (phydev , MDIO_MMD_VEND2 , DP83TG720S_LPS_CFG3 ,
172
+ DP83TG720S_LPS_CFG3_PWR_MODE_0 );
161
173
}
162
174
163
175
static struct phy_driver dp83tg720_driver [] = {
You can’t perform that action at this time.
0 commit comments