Skip to contentSkip to conversation

ARM: tegra: rm Jetson TK1 PMIC GPIO programming

PATCH New Stephen Warren 4 participants 6 messages Jan 18, 2016 – Jan 28, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

From: Stephen Warren <[email protected]>

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.

---
 board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
 1 file changed, 13 deletions(-)
board/nvidia/jetson-tk1/jetson-tk1.c +0 -13
index e929a1c1ea27..a66b710cddab 100644
@@ -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 */
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

Stephen,

Quoted 22 lines

-----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 <[email protected]>; Tom Warren <[email protected]>; Stephen Warren <[email protected]>
Cc: Thierry Reding <[email protected]>
Subject: [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming

From: Stephen Warren <[email protected]>

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.

Quoted 8 lines

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.

I'll apply this to u-boot-tegra/next ASAP.

Quoted 30 lines
---
 board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
 1 file changed, 13 deletions(-)
board/nvidia/jetson- renamed from board/nvidia/jetson-tk1/jetson-tk1.c +0 -0

tk1/jetson-tk1.c
index e929a1c1ea27..a66b710cddab 100644

board/nvidia/jetson-tk1/jetson-tk1.c +0 -14
@@ -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 */
--
Quoted 1 line

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.
-----------------------------------------------------------------------------------

#2 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

Quoted 15 lines · Tom Warren

Stephen Warren wrotea tMonday, January 18, 2016 11:23 AM:

Quoted 14 lines

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.

Quoted 7 lines
Quoted 5 lines

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.

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.

#3 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

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

Quoted 30 lines

-----Original Message-----
From: Stephen Warren [mailto:swarren at wwwdotorg.org]
Sent: Thursday, January 28, 2016 10:11 AM
To: Tom Warren <[email protected]>
Cc: u-boot at lists.denx.de; Simon Glass <[email protected]>; Stephen Warren <[email protected]>; Thierry Reding <[email protected]>
Subject: Re: [PATCH] ARM: tegra: rm Jetson TK1 PMIC GPIO programming

Quoted 14 lines · Tom Warren

Stephen Warren wrotea tMonday, January 18, 2016 11:23 AM:

Quoted 13 lines

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.

Quoted 6 lines
Quoted 6 lines

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

Quoted 7 lines

this patch to test.

Quoted 3 lines
Quoted 1 line

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.
-----------------------------------------------------------------------------------

#4 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

In reply to Stephen Warren
Quoted 22 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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.

Quoted 4 lines
---
 board/nvidia/jetson-tk1/jetson-tk1.c | 13 -------------
 1 file changed, 13 deletions(-)

Looks reasonable to me:

-------------- 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>

#5 lore raw

PATCH 1/1 ARM: tegra: rm Jetson TK1 PMIC GPIO programming

In reply to Stephen Warren
Quoted 22 lines · Stephen Warren

From: Stephen Warren <[email protected]>

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.

Quoted 4 lines
---
 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:

-------------- 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>