Skip to contentSkip to conversation

u-boot 2011.10rc: Fix pmic shut down over USB power

PATCH Applied Joel A Fernandes 3 participants 4 messages Nov 4, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot 2011.10rc: Fix pmic shut down over USB power

These are some fixes suggested by Jason Kridner to fix the PMIC instabilities we've been seeing over USB power.

---
 ...vm-Fix-bone-pmic-shut-down-over-USB-power.patch |   67 ++++++++++++++++++++
 recipes-bsp/u-boot/u-boot_2011.10rc.bb             |    3 +-
 2 files changed, 69 insertions(+), 1 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot/2011.09git/0006-am335x-evm-Fix-bone-pmic-shut-down-over-USB-power.patch
recipes-bsp/u-boot/u-boot/2011.09git/0006-am335x-evm-Fix-bone-pmic-shut-down-over-USB-power.patch new file +67 -0
new file mode 100644
index 0000000..2b8caa3
@@ -0,0 +1,67 @@
+From 801316091ac7e14cc8fa9b0bd2cdce76bea06991 Mon Sep 17 00:00:00 2001
+From: Joel A Fernandes <[email protected]>
+Date: Thu, 3 Nov 2011 22:19:19 -0500
+Subject: [PATCH] am335x-evm: Fix bone pmic shut down over USB power
+Cc: [email protected]
+
+* Set DCDC2 to 1.2v for all boards irrespective of board version, or power source.
+* Set USB current trip point to 1300mA for all boards and power sources.
+* Only Skip setting of MPU frequency to 720MHz for A1 and USB-powered boards.
+
+Credits to Jason for noticing this. Tested with 20 reboots over USB.
+
+Signed-off-by: Jason Kridner <[email protected]>
+Signed-off-by: Joel A Fernandes <[email protected]>
+---
+ board/ti/am335x/evm.c |   27 ++++++++++++++-------------
+ 1 files changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/board/ti/am335x/evm.c b/board/ti/am335x/evm.c
+index e95a088..bd3c09a 100644
+--- a/board/ti/am335x/evm.c
++++ b/board/ti/am335x/evm.c
+@@ -483,12 +483,10 @@ void spl_board_init(void)
+ 		if (tps65217_reg_read(STATUS, &pmic_status_reg))
+ 			return;
+ 
+-		/* Only perform PMIC configurations if board rev > A1 */
+-		if (!strncmp(header.version, "00A1", 4))
+-			return;
+-
+-		if (!(pmic_status_reg & PWR_SRC_AC_BITMASK)) {
+-			printf("No AC power, disabling frequency switch\n");
++		/* Set DCDC2 (MPU) voltage to 1.275V */
++		if (tps65217_voltage_update(DEFDCDC2,
++					     DCDC_VOLT_SEL_1275MV)) {
++			printf("tps65217_voltage_update failure\n");
+ 			return;
+ 		}
+ 
+@@ -507,14 +505,17 @@ void spl_board_init(void)
+ 				       USB_INPUT_CUR_LIMIT_MASK))
+ 			printf("tps65217_reg_write failure\n");
+ 
+-		/* Set DCDC2 (MPU) voltage to 1.275V */
+-		if (!tps65217_voltage_update(DEFDCDC2,
+-					     DCDC_VOLT_SEL_1275MV)) {
+-			/* Set MPU Frequency to 720MHz */
+-			mpu_pll_config(MPUPLL_M_720);
+-		} else {
+-			printf("tps65217_voltage_update failure\n");
++		/* Only perform PMIC configurations if board rev > A1 */
++		if (!strncmp(header.version, "00A1", 4))
++			return;
++
++		if (!(pmic_status_reg & PWR_SRC_AC_BITMASK)) {
++			printf("No AC power, disabling frequency switch\n");
++			return;
+ 		}
++
++		/* Set MPU Frequency to 720MHz */
++		mpu_pll_config(MPUPLL_M_720);
+ 	} else {
+ 		/* 
+ 		 * EVM PMIC code.  PMIC voltage is configuring for frequency
+-- 
+1.7.4.1
+
recipes-bsp/u-boot/u-boot_2011.10rc.bb +2 -1
index eda4a62..cf1979d 100644
@@ -4,7 +4,7 @@ require u-boot.inc
 COMPATIBLE_MACHINE = "(ti33x)"
 DEFAULT_PREFERENCE_ti33x = "99"
 PV = "2011.09+git"
-PR = "r17"
+PR = "r18"
 
 # SPL build
 UBOOT_BINARY = "u-boot.img"
@@ -17,6 +17,7 @@ SRC_URI = "git://arago-project.org/git/projects/u-boot-am33x.git;protocol=git;br
            file://2011.09git/0003-am335x_evm-set-bootdelay-to-1.patch \
            file://2011.09git/0004-am335x-evm-make-MMC-rootfs-RO-on-boot-so-fsck-works.patch \
            file://2011.09git/0005-am335x-Change-mmc_load_uimage-to-load-at-a-fixed-add.patch \
+           file://2011.09git/0006-am335x-evm-Fix-bone-pmic-shut-down-over-USB-power.patch \
           "
 
 SRCREV = "f63b270e47f62f4d1a05b2001357e215966c6f5a"
Signature · 1 line
1.7.0.4
#2 lore raw
Quoted 10 lines · Koen Kooi

Op 4 nov. 2011, om 04:37 heeft Joel A Fernandes het volgende geschreven:

Quoted 5 lines

These are some fixes suggested by Jason Kridner to fix the PMIC instabilities we've been seeing over USB power.

Applied, thanks!

This is of course the bad for A1 patch :)

Signature · 1 line
Tom
#3 lore raw
Quoted 17 lines

-----Original Message-----
From: Tom Rini [mailto:[email protected]]
Sent: Friday, November 04, 2011 12:52 PM
To: Koen Kooi
Cc: Fernandes, Joel A; [email protected]
Subject: Re: [meta-ti] [PATCH] u-boot 2011.10rc: Fix pmic shut down over USB power

Quoted 2 lines · Koen Kooi

Op 4 nov. 2011, om 04:37 heeft Joel A Fernandes het volgende

geschreven:

Quoted 4 lines
Quoted 4 lines

These are some fixes suggested by Jason Kridner to fix the PMIC instabilities we've been seeing over USB power.

Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

Applied, thanks!

This is of course the bad for A1 patch :)

New patch is coming! And if your A1 does not have a programmed EEPROM, then it doesn't have a bad effect anyway but that's another topic ;)

Thanks,
Joel