net: mvpp2: fix polarity of PHY reset signal
PATCH 1/2 net: mvpp2: fix polarity of PHY reset signal
The dm_gpio_set_value() call sets the logical level of the GPIO signal. That is, it takes the GPIO_ACTIVE_{LOW,HIGH} property into account. The driver needs to assert the reset, and then deassert it. Not the other way around.
--- drivers/net/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mvpp2.c +2 -2
@@ -4805,9 +4805,9 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)static void mvpp2_gpio_init (struct mvpp2_port *port) {if (dm_gpio_is_valid (&port->phy_reset_gpio)) { -dm_gpio_set_value (&port->phy_reset_gpio,0 ); -udelay (1000 );dm_gpio_set_value (&port->phy_reset_gpio,1 ); +udelay (1000 ); +dm_gpio_set_value (&port->phy_reset_gpio,0 ); }if (dm_gpio_is_valid (&port->phy_tx_disable_gpio))
Signature · 1 line
2.19.1
PATCH 2/2 net: mvpp2: increase PHY reset pulse
The default Linux PHY reset delay is 10ms. This is also the requirement for Marvell 88E151x PHYs, which are likely to be used with this Ethernet MAC.
--- drivers/net/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mvpp2.c +1 -1
@@ -4806,7 +4806,7 @@ static void mvpp2_gpio_init(struct mvpp2_port *port) {if (dm_gpio_is_valid (&port->phy_reset_gpio)) {dm_gpio_set_value (&port->phy_reset_gpio,1 ); -udelay (1000 ); +udelay (10000 );dm_gpio_set_value (&port->phy_reset_gpio,0 ); }
Signature · 1 line
2.19.1
PATCH 2/2 net: mvpp2: increase PHY reset pulse
Quoted 7 lines · Baruch Siach
The default Linux PHY reset delay is 10ms. This is also the requirement for Marvell 88E151x PHYs, which are likely to be used with this Ethernet MAC.
Cc Stefan Chulski <[email protected]>Signed-off-by Baruch Siach <[email protected]>
PATCH 2/2 net: mvpp2: increase PHY reset pulse
In reply to Baruch SiachQuoted 16 lines · Baruch Siach
The default Linux PHY reset delay is 10ms. This is also the requirement for Marvell 88E151x PHYs, which are likely to be used with this Ethernet MAC.
Cc Stefan Chulski <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- drivers/net/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/mvpp2.c +0
-0
drivers/net/mvpp2.c static void mvpp2_gpio_init(struct mvpp2_port *port) · line 4812
Quoted 8 lines
drivers/net/mvpp2.c +1
-1@@ -4806,7 +4806,7 @@ static void mvpp2_gpio_init(struct mvpp2_port *port) {if (dm_gpio_is_valid (&port->phy_reset_gpio)) {dm_gpio_set_value (&port->phy_reset_gpio,1 ); -udelay (1000 ); +udelay (10000 );dm_gpio_set_value (&port->phy_reset_gpio,0 ); }
Thanks,
Stefan
[U-Boot] net: mvpp2: increase PHY reset pulse
In reply to Baruch SiachHi Baruch,
https://patchwork.ozlabs.org/patch/984072/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe
PATCH 1/2 net: mvpp2: fix polarity of PHY reset signal
In reply to Baruch SiachQuoted 8 lines · Baruch Siach
The
dm_gpio_set_value()call sets the logical level of the GPIO signal. That is, it takes the GPIO_ACTIVE_{LOW,HIGH} property into account. The driver needs to assert the reset, and then deassert it. Not the other way around.Cc Stefan Chulski <[email protected]>Signed-off-by Baruch Siach <[email protected]>
PATCH 1/2 net: mvpp2: fix polarity of PHY reset signal
In reply to Baruch SiachQuoted 18 lines · Baruch Siach
The
dm_gpio_set_value()call sets the logical level of the GPIO signal. That is, it takes the GPIO_ACTIVE_{LOW,HIGH} property into account. The driver needs to assert the reset, and then deassert it. Not the other way around.Cc Stefan Chulski <[email protected]>Signed-off-by Baruch Siach <[email protected]>--- drivers/net/mvpp2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/mvpp2.c +0
-0@@ -4805,9 +4805,9 @@ static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port)static void mvpp2_gpio_init (struct mvpp2_port *port)
drivers/net/mvpp2.c static int phy_info_parse(struct udevice *dev, struct mvpp2_port *port) · line 4813
Quoted 10 lines
drivers/net/mvpp2.c +2
-2{if (dm_gpio_is_valid (&port->phy_reset_gpio)) { -dm_gpio_set_value (&port->phy_reset_gpio,0 ); -udelay (1000 );dm_gpio_set_value (&port->phy_reset_gpio,1 ); +udelay (1000 ); +dm_gpio_set_value (&port->phy_reset_gpio,0 ); }if (dm_gpio_is_valid (&port->phy_tx_disable_gpio))
Thanks,
Stefan
Hi Baruch,
https://patchwork.ozlabs.org/patch/984073/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe