All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
@ 2016-01-18 18:23 Stephen Warren
  2016-01-18 19:16 ` Tom Warren
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephen Warren @ 2016-01-18 18:23 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

The PMIC is configured such that its GPIOs have the correct configuration
at power-up, so no programming is required.

In fact, the current programming is actively wrong, since:

(a) the AS3722 driver configures the GPIO to be an output before setting
its output value, which causes a 0v glitch on the output.

(b) the AS3722 driver configures the GPIO to drive a high voltage from its
VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the pin
drives 5V not 1.8V as desired.

Solve these problems by removing the code which configures the PMIC GPIOs.

Note that this patch was tested directly on top of v2016.01; since then,
commit 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model
for Ethernet" prevents PCIe from being initialized. Alternatively, simply
revert that commit to get PCIe Ethernet working again, then apply this
patch to test.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-tk1/jetson-tk1.c
index e929a1c1ea27..a66b710cddab 100644
--- a/board/nvidia/jetson-tk1/jetson-tk1.c
+++ b/board/nvidia/jetson-tk1/jetson-tk1.c
@@ -60,19 +60,6 @@ int tegra_pcie_board_init(void)
 		return err;
 	}
 
-	err = as3722_gpio_configure(pmic, 1, AS3722_GPIO_OUTPUT_VDDH |
-					     AS3722_GPIO_INVERT);
-	if (err < 0) {
-		error("failed to configure GPIO#1 as output: %d\n", err);
-		return err;
-	}
-
-	err = as3722_gpio_direction_output(pmic, 2, 1);
-	if (err < 0) {
-		error("failed to set GPIO#2 high: %d\n", err);
-		return err;
-	}
-
 	return 0;
 }
 #endif /* PCI */
-- 
2.7.0

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

* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
  2016-01-18 18:23 [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming Stephen Warren
@ 2016-01-18 19:16 ` Tom Warren
  2016-01-28 17:11   ` Stephen Warren
  2016-01-19 13:10 ` Thierry Reding
  2016-01-22 15:52 ` Thierry Reding
  2 siblings, 1 reply; 6+ messages in thread
From: Tom Warren @ 2016-01-18 19:16 UTC (permalink / raw)
  To: u-boot

Stephen,

> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Monday, January 18, 2016 11:23 AM
> To: u-boot at lists.denx.de; Simon Glass <sjg@chromium.org>; Tom Warren
> <TWarren@nvidia.com>; Stephen Warren <swarren@nvidia.com>
> Cc: Thierry Reding <treding@nvidia.com>
> Subject: [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
> 
> From: Stephen Warren <swarren@nvidia.com>
> 
> The PMIC is configured such that its GPIOs have the correct configuration at
> power-up, so no programming is required.
> 
> In fact, the current programming is actively wrong, since:
> 
> (a) the AS3722 driver configures the GPIO to be an output before setting its
> output value, which causes a 0v glitch on the output.
> 
> (b) the AS3722 driver configures the GPIO to drive a high voltage from its
> VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the
> pin drives 5V not 1.8V as desired.
> 
> Solve these problems by removing the code which configures the PMIC GPIOs.
> 
> Note that this patch was tested directly on top of v2016.01; since then, commit
> 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model for
> Ethernet" prevents PCIe from being initialized. Alternatively, simply revert that
> commit to get PCIe Ethernet working again, then apply this patch to test.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Tom Warren <twarren@nvidia.com>
I'll apply this to u-boot-tegra/next ASAP.

> ---
>  board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
>  1 file changed, 13 deletions(-)
> 
> diff --git a/board/nvidia/jetson-tk1/jetson-tk1.c b/board/nvidia/jetson-
> tk1/jetson-tk1.c
> index e929a1c1ea27..a66b710cddab 100644
> --- a/board/nvidia/jetson-tk1/jetson-tk1.c
> +++ b/board/nvidia/jetson-tk1/jetson-tk1.c
> @@ -60,19 +60,6 @@ int tegra_pcie_board_init(void)
>  		return err;
>  	}
> 
> -	err = as3722_gpio_configure(pmic, 1, AS3722_GPIO_OUTPUT_VDDH |
> -					     AS3722_GPIO_INVERT);
> -	if (err < 0) {
> -		error("failed to configure GPIO#1 as output: %d\n", err);
> -		return err;
> -	}
> -
> -	err = as3722_gpio_direction_output(pmic, 2, 1);
> -	if (err < 0) {
> -		error("failed to set GPIO#2 high: %d\n", err);
> -		return err;
> -	}
> -
>  	return 0;
>  }
>  #endif /* PCI */
> --
> 2.7.0

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

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

* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
  2016-01-18 18:23 [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming Stephen Warren
  2016-01-18 19:16 ` Tom Warren
@ 2016-01-19 13:10 ` Thierry Reding
  2016-01-22 15:52 ` Thierry Reding
  2 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2016-01-19 13:10 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 18, 2016 at 11:23:16AM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> The PMIC is configured such that its GPIOs have the correct configuration
> at power-up, so no programming is required.
> 
> In fact, the current programming is actively wrong, since:
> 
> (a) the AS3722 driver configures the GPIO to be an output before setting
> its output value, which causes a 0v glitch on the output.
> 
> (b) the AS3722 driver configures the GPIO to drive a high voltage from its
> VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the pin
> drives 5V not 1.8V as desired.
> 
> Solve these problems by removing the code which configures the PMIC GPIOs.
> 
> Note that this patch was tested directly on top of v2016.01; since then,
> commit 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model
> for Ethernet" prevents PCIe from being initialized. Alternatively, simply
> revert that commit to get PCIe Ethernet working again, then apply this
> patch to test.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
>  1 file changed, 13 deletions(-)

Looks reasonable to me:

Acked-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160119/d8e4c202/attachment.sig>

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

* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
  2016-01-18 18:23 [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming Stephen Warren
  2016-01-18 19:16 ` Tom Warren
  2016-01-19 13:10 ` Thierry Reding
@ 2016-01-22 15:52 ` Thierry Reding
  2 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2016-01-22 15:52 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 18, 2016 at 11:23:16AM -0700, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> The PMIC is configured such that its GPIOs have the correct configuration
> at power-up, so no programming is required.
> 
> In fact, the current programming is actively wrong, since:
> 
> (a) the AS3722 driver configures the GPIO to be an output before setting
> its output value, which causes a 0v glitch on the output.
> 
> (b) the AS3722 driver configures the GPIO to drive a high voltage from its
> VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the pin
> drives 5V not 1.8V as desired.
> 
> Solve these problems by removing the code which configures the PMIC GPIOs.
> 
> Note that this patch was tested directly on top of v2016.01; since then,
> commit 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model
> for Ethernet" prevents PCIe from being initialized. Alternatively, simply
> revert that commit to get PCIe Ethernet working again, then apply this
> patch to test.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>
> ---
>  board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
>  1 file changed, 13 deletions(-)

After applying your other patch:

	pci: restore initialization for DM_PCI

to restore PCI networking on Jetson TK1 I was able to verify that this
still works for me. Interestingly the code before seems to trigger a
visual glitch in the serial output, though I'm not sure I had seen one
like that back when I initially added this support.

Either way, this patch:

Tested-by: Thierry Reding <treding@nvidia.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160122/e3fdbde9/attachment.sig>

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

* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
  2016-01-18 19:16 ` Tom Warren
@ 2016-01-28 17:11   ` Stephen Warren
  2016-01-28 17:30     ` Tom Warren
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Warren @ 2016-01-28 17:11 UTC (permalink / raw)
  To: u-boot

On 01/18/2016 12:16 PM, Tom Warren wrote:
> Stephen Warren wrotea tMonday, January 18, 2016 11:23 AM:
>> The PMIC is configured such that its GPIOs have the correct configuration at
>> power-up, so no programming is required.
>>
>> In fact, the current programming is actively wrong, since:
>>
>> (a) the AS3722 driver configures the GPIO to be an output before setting its
>> output value, which causes a 0v glitch on the output.
>>
>> (b) the AS3722 driver configures the GPIO to drive a high voltage from its
>> VSUP_GPIO power source rather than its VDD_GPIO_LV power source, so the
>> pin drives 5V not 1.8V as desired.
>>
>> Solve these problems by removing the code which configures the PMIC GPIOs.
>>
>> Note that this patch was tested directly on top of v2016.01; since then, commit
>> 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model for
>> Ethernet" prevents PCIe from being initialized. Alternatively, simply revert that
>> commit to get PCIe Ethernet working again, then apply this patch to test.
>>
> Acked-by: Tom Warren <twarren@nvidia.com>
> I'll apply this to u-boot-tegra/next ASAP.

I don't see this patch there yet. It'd be good to get it pulled upstream 
ASAP since the merge window for v2016.03 closes this weekend.

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

* [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
  2016-01-28 17:11   ` Stephen Warren
@ 2016-01-28 17:30     ` Tom Warren
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Warren @ 2016-01-28 17:30 UTC (permalink / raw)
  To: u-boot

OK. I was waiting to see if Simon's dm display driver changes would go in via the Tegra repo (they apply / build OK now, but I've had no time for testing).

With the merge window closing, I'll send a PR with just this fix. Thanks.

Tom

> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Thursday, January 28, 2016 10:11 AM
> To: Tom Warren <TWarren@nvidia.com>
> Cc: u-boot at lists.denx.de; Simon Glass <sjg@chromium.org>; Stephen Warren
> <swarren@nvidia.com>; Thierry Reding <treding@nvidia.com>
> Subject: Re: [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming
> 
> On 01/18/2016 12:16 PM, Tom Warren wrote:
> > Stephen Warren wrotea tMonday, January 18, 2016 11:23 AM:
> >> The PMIC is configured such that its GPIOs have the correct
> >> configuration at power-up, so no programming is required.
> >>
> >> In fact, the current programming is actively wrong, since:
> >>
> >> (a) the AS3722 driver configures the GPIO to be an output before
> >> setting its output value, which causes a 0v glitch on the output.
> >>
> >> (b) the AS3722 driver configures the GPIO to drive a high voltage
> >> from its VSUP_GPIO power source rather than its VDD_GPIO_LV power
> >> source, so the pin drives 5V not 1.8V as desired.
> >>
> >> Solve these problems by removing the code which configures the PMIC
> GPIOs.
> >>
> >> Note that this patch was tested directly on top of v2016.01; since
> >> then, commit
> >> 96350f729c42 "dm: tegra: net: Convert tegra boards to driver model
> >> for Ethernet" prevents PCIe from being initialized. Alternatively,
> >> simply revert that commit to get PCIe Ethernet working again, then apply
> this patch to test.
> >>
> > Acked-by: Tom Warren <twarren@nvidia.com> I'll apply this to
> > u-boot-tegra/next ASAP.
> 
> I don't see this patch there yet. It'd be good to get it pulled upstream ASAP
> since the merge window for v2016.03 closes this weekend.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

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

end of thread, other threads:[~2016-01-28 17:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-18 18:23 [U-Boot] [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming Stephen Warren
2016-01-18 19:16 ` Tom Warren
2016-01-28 17:11   ` Stephen Warren
2016-01-28 17:30     ` Tom Warren
2016-01-19 13:10 ` Thierry Reding
2016-01-22 15:52 ` Thierry Reding

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.