drivers: net: phy: atheros: apply the previous register setting for AR8031 to fix the voltage peak issue
Subsystems (2)
ken
RFC 1/1 drivers: net: phy: atheros: apply the previous register setting for AR8031 to fix the voltage peak issue
Apply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
--- drivers/net/phy/atheros.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/phy/atheros.c +6 -0
@@ -28,6 +28,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,
@@ -44,6 +46,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval |0x3C47 ); + phydev->supported = phydev->drv->features;genphy_config_aneg (phydev);
Signature · 1 line
2.11.0
Quoted 2 lines · On Wed, Feb 1, 2017 at 1:55 PM, ken <Ken Lin> <[email protected]> wrote:
Apply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
Seems reasonable. Was this tested on HW? If so, please add a tested tag.
Thanks,
-Joe
Quoted 35 lines
--- drivers/net/phy/atheros.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/net/phy/atheros.c +6
-1@@ -28,6 +28,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,@@ -44,6 +46,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval |0x3C47 ); + phydev->supported = phydev->drv->features;genphy_config_aneg (phydev); --2.11.0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
2017-02-02 10:01 GMT-08:00 Joe Hershberger <[email protected]>:
Quoted 6 lines · On Wed, Feb 1, 2017 at 1:55 PM, ken <Ken Lin> <[email protected]> wrote:
Quoted 2 lines
Apply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
Seems reasonable. Was this tested on HW? If so, please add a tested tag.
Thank you for your feedback.
Yes, it's been tested and with signal measurement results on our project platforms.
I will submit the patch with a tested tag again.
Quoted 38 lines
Thanks,
-JoeQuoted 35 lines
--- drivers/net/phy/atheros.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/net/phy/atheros.c +6
-1@@ -28,6 +28,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,@@ -44,6 +46,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval |0x3C47 ); + phydev->supported = phydev->drv->features;genphy_config_aneg (phydev); --2.11.0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Quoted 20 lines · On Wed, Feb 1, 2017 at 1:55 PM, ken <Ken Lin> <[email protected]> wrote:
Apply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
--- drivers/net/phy/atheros.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/net/phy/atheros.c +2
-0@@ -28,6 +28,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,
drivers/net/phy/atheros.c static int ar8031_config(struct phy_device *phydev) · line 51
Quoted 6 lines
drivers/net/phy/atheros.c +3
-0@@ -44,6 +46,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval |0x3C47 );
It would also be good if you move this "0x3C47" to a #define and include a comment about what it means.
Quoted 11 lines
drivers/net/phy/atheros.c +1
-1+ phydev->supported = phydev->drv->features;genphy_config_aneg (phydev); --2.11.0
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH 1/1 drivers: net: phy: atheros: apply the previous register setting for AR8031 to fix the voltage peak issue
In reply to kenApply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
Tested on Advantech DMS-BA16 board
--- drivers/net/phy/atheros.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/phy/atheros.c +8 -0
@@ -17,6 +17,8 @@#define AR803x_DEBUG_REG_0 0x0#define AR803x_RGMII_RX_CLK_DLY 0x8000 +#define AR803x_SERDES_TEST_DEFAULT 0x3C47 +static int ar8021_config (struct phy_device *phydev) {phy_write (phydev,MDIO_DEVAD_NONE ,0x1d ,0x05 );
@@ -28,6 +30,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,
@@ -44,6 +48,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval | AR803x_SERDES_TEST_DEFAULT); + phydev->supported = phydev->drv->features;genphy_config_aneg (phydev);
Signature · 1 line
2.11.0
RFC v2 1/1 drivers: net: phy: atheros: apply the previous register setting for AR8031 to fix the voltage peak issue
In reply to kenApply the previous setting for the reserved bits in SetDes Test and System Mode Control register to avoid the voltage peak issue while we do the IEEE PHY comformance test
Tested on Advantech DMS-BA16 board
--- drivers/net/phy/atheros.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/phy/atheros.c +8 -0
@@ -17,6 +17,8 @@#define AR803x_DEBUG_REG_0 0x0#define AR803x_RGMII_RX_CLK_DLY 0x8000 +#define AR803x_SERDES_TEST_DEFAULT 0x3C47 +static int ar8021_config (struct phy_device *phydev) {phy_write (phydev,MDIO_DEVAD_NONE ,0x1d ,0x05 );
@@ -28,6 +30,8 @@ static int ar8021_config(struct phy_device *phydev)static int ar8031_config (struct phy_device *phydev) { +int regval; +if (phydev->interface ==PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface ==PHY_INTERFACE_MODE_RGMII_ID ) { phy_write(phydev, MDIO_DEVAD_NONE, AR803x_PHY_DEBUG_ADDR_REG,
@@ -44,6 +48,10 @@ static int ar8031_config(struct phy_device *phydev) AR803x_RGMII_RX_CLK_DLY); } +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_ADDR_REG, AR803x_DEBUG_REG_5); + regval =phy_read (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG); +phy_write (phydev,MDIO_DEVAD_NONE , AR803x_PHY_DEBUG_DATA_REG, regval | AR803x_SERDES_TEST_DEFAULT); + phydev->supported = phydev->drv->features;genphy_config_aneg (phydev);
Signature · 1 line
2.11.0