Message ID | cddac9f698793dac2993461f9a125f58263eb5ca.1539598608.git.baruch@tkos.co.il |
---|---|
State | Accepted |
Commit | fa14027d5c54e6715d2df9526bc951df7ffc78e7 |
Delegated to: | Joe Hershberger |
Headers | show |
Series | [U-Boot,1/2] net: mvpp2: fix polarity of PHY reset signal | expand |
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>
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
Hi Baruch, https://patchwork.ozlabs.org/patch/984073/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git Thanks! -Joe
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))
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(-)