All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal
@ 2018-10-15 10:16 Baruch Siach
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Baruch Siach @ 2018-10-15 10:16 UTC (permalink / raw)
  To: u-boot

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 <stefanc@marvell.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/net/mvpp2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index 62c0c2be0626..b3b1fe1a0c41 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -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))
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse
  2018-10-15 10:16 [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Baruch Siach
@ 2018-10-15 10:16 ` Baruch Siach
  2018-10-15 22:03   ` Joe Hershberger
                     ` (2 more replies)
  2018-10-15 22:03 ` [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Joe Hershberger
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 8+ messages in thread
From: Baruch Siach @ 2018-10-15 10:16 UTC (permalink / raw)
  To: u-boot

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 <stefanc@marvell.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/net/mvpp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index b3b1fe1a0c41..f28b939b17dc 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -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);
 	}
 
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
@ 2018-10-15 22:03   ` Joe Hershberger
  2018-10-22 14:07   ` Stefan Roese
  2018-10-24 19:57   ` [U-Boot] " Joe Hershberger
  2 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-10-15 22:03 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 15, 2018 at 5:17 AM Baruch Siach <baruch@tkos.co.il> wrote:
>
> 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 <stefanc@marvell.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal
  2018-10-15 10:16 [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Baruch Siach
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
@ 2018-10-15 22:03 ` Joe Hershberger
  2018-10-22 14:06 ` Stefan Roese
  2018-10-24 19:57 ` [U-Boot] " Joe Hershberger
  3 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-10-15 22:03 UTC (permalink / raw)
  To: u-boot

On Mon, Oct 15, 2018 at 5:18 AM Baruch Siach <baruch@tkos.co.il> wrote:
>
> 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 <stefanc@marvell.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal
  2018-10-15 10:16 [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Baruch Siach
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
  2018-10-15 22:03 ` [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Joe Hershberger
@ 2018-10-22 14:06 ` Stefan Roese
  2018-10-24 19:57 ` [U-Boot] " Joe Hershberger
  3 siblings, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2018-10-22 14:06 UTC (permalink / raw)
  To: u-boot

On 15.10.18 12:16, Baruch Siach wrote:
> 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 <stefanc@marvell.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>   drivers/net/mvpp2.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> index 62c0c2be0626..b3b1fe1a0c41 100644
> --- a/drivers/net/mvpp2.c
> +++ b/drivers/net/mvpp2.c
> @@ -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))
> 

Reviewed-by: Stefan Roese <sr@denx.de>
Thanks,
Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
  2018-10-15 22:03   ` Joe Hershberger
@ 2018-10-22 14:07   ` Stefan Roese
  2018-10-24 19:57   ` [U-Boot] " Joe Hershberger
  2 siblings, 0 replies; 8+ messages in thread
From: Stefan Roese @ 2018-10-22 14:07 UTC (permalink / raw)
  To: u-boot

On 15.10.18 12:16, Baruch Siach wrote:
> 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 <stefanc@marvell.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>   drivers/net/mvpp2.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> index b3b1fe1a0c41..f28b939b17dc 100644
> --- a/drivers/net/mvpp2.c
> +++ b/drivers/net/mvpp2.c
> @@ -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);
>   	}
>   
> 

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] net: mvpp2: fix polarity of PHY reset signal
  2018-10-15 10:16 [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Baruch Siach
                   ` (2 preceding siblings ...)
  2018-10-22 14:06 ` Stefan Roese
@ 2018-10-24 19:57 ` Joe Hershberger
  3 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-10-24 19:57 UTC (permalink / raw)
  To: u-boot

Hi Baruch,

https://patchwork.ozlabs.org/patch/984073/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] net: mvpp2: increase PHY reset pulse
  2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
  2018-10-15 22:03   ` Joe Hershberger
  2018-10-22 14:07   ` Stefan Roese
@ 2018-10-24 19:57   ` Joe Hershberger
  2 siblings, 0 replies; 8+ messages in thread
From: Joe Hershberger @ 2018-10-24 19:57 UTC (permalink / raw)
  To: u-boot

Hi Baruch,

https://patchwork.ozlabs.org/patch/984072/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-24 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 10:16 [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Baruch Siach
2018-10-15 10:16 ` [U-Boot] [PATCH 2/2] net: mvpp2: increase PHY reset pulse Baruch Siach
2018-10-15 22:03   ` Joe Hershberger
2018-10-22 14:07   ` Stefan Roese
2018-10-24 19:57   ` [U-Boot] " Joe Hershberger
2018-10-15 22:03 ` [U-Boot] [PATCH 1/2] net: mvpp2: fix polarity of PHY reset signal Joe Hershberger
2018-10-22 14:06 ` Stefan Roese
2018-10-24 19:57 ` [U-Boot] " Joe Hershberger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.