[PATCH v3 4/4] net: phy: dp83867: Set up RGMII TX delay

2019-05-28 Thread Max Uvarov
PHY_INTERFACE_MODE_RGMII_RXID is less then TXID so code to set tx delay is never called. Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: Max Uvarov Cc: Florian Fainelli --- drivers/net/phy/dp83867.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletion

[PATCH v3 2/4] net: phy: dp83867: increase SGMII autoneg timer duration

2019-05-28 Thread Max Uvarov
After reset SGMII Autoneg timer is set to 2us (bits 6 and 5 are 01). That is not enough to finalize autonegatiation on some devices. Increase this timer duration to maximum supported 16ms. Signed-off-by: Max Uvarov Cc: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers/net/phy/dp83867

[PATCH v3 3/4] net: phy: dp83867: do not call config_init twice

2019-05-28 Thread Max Uvarov
Phy state machine calls _config_init just after reset. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 14e9e8a94639..1ec48ecf4133 100644 --- a/drivers/net/phy

[PATCH v3 0/4] net: phy: dp83867: add some fixes

2019-05-28 Thread Max Uvarov
v3: use phy_modify_mmd() v2: fix minor comments by Heiner Kallweit and Florian Fainelli Max Uvarov (4): net: phy: dp83867: fix speed 10 in sgmii mode net: phy: dp83867: increase SGMII autoneg timer duration net: phy: dp83867: do not call config_init twice net: phy: dp83867: Set up RGMII

[PATCH v3 1/4] net: phy: dp83867: fix speed 10 in sgmii mode

2019-05-28 Thread Max Uvarov
For supporting 10Mps speed in SGMII mode DP83867_10M_SGMII_RATE_ADAPT bit of DP83867_10M_SGMII_CFG register has to be cleared by software. That does not affect speeds 100 and 1000 so can be done on init. Signed-off-by: Max Uvarov Cc: Heiner Kallweit Reviewed-by: Florian Fainelli --- drivers

[PATCH v2 0/4] net: phy: dp83867: add some fixes

2019-05-26 Thread Max Uvarov
v2: fix minor comments by Heiner Kallweit and Florian Fainelli. Max Uvarov (4): net: phy: dp83867: fix speed 10 in sgmii mode net: phy: dp83867: increase SGMII autoneg timer duration net: phy: dp83867: do not call config_init twice net: phy: dp83867: Set up RGMII TX delay drivers/net

[PATCH v2 3/4] net: phy: dp83867: do not call config_init twice

2019-05-26 Thread Max Uvarov
Phy state machine calls _config_init just after reset. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 5fafcc091525..a1c0b2128de2 100644 --- a/drivers/net/phy

[PATCH v2 1/4] net: phy: dp83867: fix speed 10 in sgmii mode

2019-05-26 Thread Max Uvarov
For support 10Mps sped in SGMII mode DP83867_10M_SGMII_RATE_ADAPT bit of DP83867_10M_SGMII_CFG register has to be cleared by software. That does not affect speeds 100 and 1000 so can be done on init. Signed-off-by: Max Uvarov Cc: Heiner Kallweit --- drivers/net/phy/dp83867.c | 20

[PATCH v2 4/4] net: phy: dp83867: Set up RGMII TX delay

2019-05-26 Thread Max Uvarov
PHY_INTERFACE_MODE_RGMII_RXID is less then TXID so code to set tx delay is never called. Fixes: 2a10154abcb75 ("net: phy: dp83867: Add TI dp83867 phy") Signed-off-by: Max Uvarov Cc: Florian Fainelli --- drivers/net/phy/dp83867.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletion

[PATCH v2 2/4] net: phy: dp83867: increase SGMII autoneg timer duration

2019-05-26 Thread Max Uvarov
After reset SGMII Autoneg timer is set to 2us (bits 6 and 5 are 01). That us not enough to finalize autonegatiation on some devices. Increase this timer duration to maximum supported 16ms. Signed-off-by: Max Uvarov Cc: Heiner Kallweit --- drivers/net/phy/dp83867.c | 10 ++ 1 file

[PATCH] net:phy:dp83867: set up rgmii tx delay

2019-05-24 Thread Max Uvarov
PHY_INTERFACE_MODE_RGMII_RXID is less then TXID so code to set tx delay is never called. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 2984fd5ae495

[PATCH 3/3] net:phy:dp83867: do not call config_init twice

2019-05-24 Thread Max Uvarov
Phy state machine calls _config_init just after reset. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 66b0a09ad094..2984fd5ae495 100644 --- a/drivers/net/phy

[PATCH 0/3] net:phy:dp83867: add some fixes

2019-05-24 Thread Max Uvarov
Patch "fix speed 10 in sgmii mode" I already sent before and the was no mutch objections. Just resending it. Patch "increase SGMII autoneg timer duration" fixes autoneg between mac and the phy. And the latest "do not call config_init twice" is the logical code c

[PATCH 2/3] net:phy:dp83867: increase SGMII autoneg timer duration

2019-05-24 Thread Max Uvarov
After reset SGMII Autoneg timer is set to 2us (bits 6 and 5 are 01). That us not enough to finalize autonegatiation on some devices. Increase this timer duration to maximum supported 16ms. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 13 + 1 file changed, 13 insertions

[PATCH 1/3] net:phy:dp83867: fix speed 10 in sgmii mode

2019-05-24 Thread Max Uvarov
For support 10Mps sped in SGMII mode DP83867_10M_SGMII_RATE_ADAPT bit of DP83867_10M_SGMII_CFG register has to be cleared by software. That does not affect speeds 100 and 1000 so can be done on init. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 22 ++ 1 file

[PATCH] net: phy: dp83867: add soft reset delay

2019-02-25 Thread Max Uvarov
Similar to dp83640 delay after soft reset is needed to set up registers correctly. Signed-off-by: Max Uvarov --- drivers/net/phy/dp83867.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index ac8ba642d616..e1ec36c51511 100644 --- a

[PATCH] net: phy-micrel: check return code in flp center function

2017-11-30 Thread Max Uvarov
Fix obvious typo that first return value is set but not checked. Signed-off-by: Max Uvarov --- drivers/net/phy/micrel.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index fdb43dd..ab46141 100644 --- a/drivers/net

[PATCHv3 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access

2017-08-11 Thread Max Uvarov
Polling 14 mdio devices on single mdio bus eats 30% of 1Ghz cpu time due to busy loop in wait(). Add small delay to relax cpu. Signed-off-by: Max Uvarov Reviewed-by: Andrew Lunn Reviewed-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_mdio.c | 4 +++- 1 file changed, 3 insertions

[PATCHv3 2/2] drivers: net: davinci_mdio: print bus frequency

2017-08-11 Thread Max Uvarov
Frequency can be adjusted in DT it make sense to print current used value on driver init. Signed-off-by: Max Uvarov Reviewed-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_mdio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti

[PATCHv3 0/2] davinci_mdio: remove busy loop on wait user access

2017-08-11 Thread Max Uvarov
v3: no code change, just added cover letter First patch fixes cpu load on polling busy mdio line. Second patch just prints which mdio frequency was configured. Max Uvarov (2): drivers: net: davinci_mdio: remove busy loop on wait user access drivers: net: davinci_mdio: print bus frequency

[PATCHv2 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access

2017-08-10 Thread Max Uvarov
Polling 14 mdio devices on single mdio bus eats 30% of 1Ghz cpu time due to busy loop in wait(). Add small delay to relax cpu. Signed-off-by: Max Uvarov --- v2: fix spelling in commit description. drivers/net/ethernet/ti/davinci_mdio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCHv2 2/2] drivers: net: davinci_mdio: print bus frequency

2017-08-10 Thread Max Uvarov
Frequency can be adjusted in DT it make sense to print current used value on driver init. Signed-off-by: Max Uvarov --- drivers/net/ethernet/ti/davinci_mdio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet

[PATCH 1/2] drivers: net: davinci_mdio: remove busy loop on wait user access

2017-08-10 Thread Max Uvarov
Polling 14 mdio devices on single mdio bus eats 30% of 1Ghz cpu time due to busy loop in waiti(). Aadd small delay to relax cpu. Signed-off-by: Max Uvarov --- drivers/net/ethernet/ti/davinci_mdio.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti

[PATCH 2/2] drivers: net: davinci_mdio: print bus frequency

2017-08-10 Thread Max Uvarov
Frequency can be audjusted in DT it make sense to print current used value on driver init. Signed-off-by: Max Uvarov --- drivers/net/ethernet/ti/davinci_mdio.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net