From 593076a7067fc3ba9ee28f0f657619e84e7520ac Mon Sep 17 00:00:00 2001 From: David Wu Date: Mon, 28 Nov 2022 19:00:04 +0800 Subject: [PATCH] net: phy: motorcomm: Add 100m BGS voltage for RK631 Signed-off-by: David Wu Change-Id: I1a8fd4d428e0d3d6c8a0c6b3e2dd63c5d53590a5 --- drivers/net/phy/motorcomm.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c index 3cb8ea0a9c9d..dbae7daefe3a 100644 --- a/drivers/net/phy/motorcomm.c +++ b/drivers/net/phy/motorcomm.c @@ -563,7 +563,7 @@ static int yt8531S_config_init(struct phy_device *phydev) static int yt8531_config_init(struct phy_device *phydev) { - int ret = 0; + int ret = 0, val; #if (YTPHY8531A_XTAL_INIT) ret = yt8531a_xtal_init(phydev); @@ -588,6 +588,13 @@ static int yt8531_config_init(struct phy_device *phydev) if (ret < 0) return ret; + /* Change 100M default BGS voltage from 0x294c to 0x274c */ + val = ytphy_read_ext(phydev, 0x57); + val = (val & ~(0xf << 8)) | (7 << 8); + ret = ytphy_write_ext(phydev, 0x57, val); + if (ret < 0) + return ret; + return ret; }