public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Aneesh V <aneesh@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/9] omap4460: fix TPS initialization
Date: Tue, 22 Nov 2011 15:09:00 +0530	[thread overview]
Message-ID: <1321954745-18112-5-git-send-email-aneesh@ti.com> (raw)
In-Reply-To: <1321954745-18112-1-git-send-email-aneesh@ti.com>

TPS power IC is controlled using a GPIO (gpio_wk7).
This GPIO should be maintained at logic 1 always. As
such an internal pull-up on this pin will do the job,
driving the GPIO outuput is not needed. This will avoid
the need of using GPIO library in SPL and also may
save some power.

Signed-off-by: Aneesh V <aneesh@ti.com>
---
 arch/arm/cpu/armv7/omap-common/clocks-common.c |    8 --------
 board/ti/panda/panda_mux_data.h                |    2 +-
 board/ti/sdp4430/sdp.c                         |    7 +++++++
 board/ti/sdp4430/sdp4430_mux_data.h            |    6 +++++-
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index f64a10b..1e7e20e 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -359,14 +359,6 @@ void do_scale_tps62361(u32 reg, u32 volt_mv)
 	step = volt_mv - TPS62361_BASE_VOLT_MV;
 	step /= 10;
 
-	/*
-	 * Select SET1 in TPS62361:
-	 * VSEL1 is grounded on board. So the following selects
-	 * VSEL1 = 0 and VSEL0 = 1
-	 */
-	gpio_direction_output(TPS62361_VSEL0_GPIO, 0);
-	gpio_set_value(TPS62361_VSEL0_GPIO, 1);
-
 	temp = TPS62361_I2C_SLAVE_ADDR |
 	    (reg << PRM_VC_VAL_BYPASS_REGADDR_SHIFT) |
 	    (step << PRM_VC_VAL_BYPASS_DATA_SHIFT) |
diff --git a/board/ti/panda/panda_mux_data.h b/board/ti/panda/panda_mux_data.h
index c05170e..2970ccd 100644
--- a/board/ti/panda/panda_mux_data.h
+++ b/board/ti/panda/panda_mux_data.h
@@ -76,7 +76,7 @@ const struct pad_conf_entry wkup_padconf_array_essential[] = {
 
 const struct pad_conf_entry wkup_padconf_array_essential_4460[] = {
 
-{PAD1_FREF_CLK4_REQ, (M3)},	 /* gpio_wk7, TPS */
+{PAD1_FREF_CLK4_REQ, (PTU | M7)}, /* gpio_wk7 for TPS: safe mode + pull up */
 
 };
 
diff --git a/board/ti/sdp4430/sdp.c b/board/ti/sdp4430/sdp.c
index e1b853c..9ae9e2c 100644
--- a/board/ti/sdp4430/sdp.c
+++ b/board/ti/sdp4430/sdp.c
@@ -96,6 +96,13 @@ void set_muxconf_regs_non_essential(void)
 	do_set_mux(CONTROL_PADCONF_WKUP, wkup_padconf_array_non_essential,
 		   sizeof(wkup_padconf_array_non_essential) /
 		   sizeof(struct pad_conf_entry));
+
+	if (omap_revision() < OMAP4460_ES1_0) {
+		do_set_mux(CONTROL_PADCONF_WKUP,
+			wkup_padconf_array_non_essential_4430,
+			sizeof(wkup_padconf_array_non_essential_4430) /
+			sizeof(struct pad_conf_entry));
+	}
 }
 
 #if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
diff --git a/board/ti/sdp4430/sdp4430_mux_data.h b/board/ti/sdp4430/sdp4430_mux_data.h
index 1c6e0ee..0a20968 100644
--- a/board/ti/sdp4430/sdp4430_mux_data.h
+++ b/board/ti/sdp4430/sdp4430_mux_data.h
@@ -67,7 +67,7 @@ const struct pad_conf_entry wkup_padconf_array_essential[] = {
 
 const struct pad_conf_entry wkup_padconf_array_essential_4460[] = {
 
-{PAD1_FREF_CLK4_REQ, (M3)},	 /* gpio_wk7, TPS */
+{PAD1_FREF_CLK4_REQ, (PTU | M7)}, /* gpio_wk7 for TPS: safe mode + pull up */
 
 };
 
@@ -275,4 +275,8 @@ const struct pad_conf_entry wkup_padconf_array_non_essential[] = {
 	{PAD1_SYS_BOOT7, (IEN | M3)},		/* gpio_wk10 */
 };
 
+const struct pad_conf_entry wkup_padconf_array_non_essential_4430[] = {
+	{PAD1_FREF_CLK4_REQ, (M3)}	/* gpio_wk7 - Debug led-2 */
+};
+
 #endif /* _SDP4430_MUX_DATA_H */
-- 
1.7.1

  parent reply	other threads:[~2011-11-22  9:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  9:38 [U-Boot] [PATCH 0/9] omap: miscellaneous fixes and improvements Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 1/9] omap: Improve PLL parameter calculation tool Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 2/9] omap4: ttyO2 instead of ttyS2 in default bootargs Aneesh V
2011-11-22  9:38 ` [U-Boot] [PATCH 3/9] omap: fix cache line size for omap3/omap4 boards Aneesh V
2011-11-22 15:58   ` Tom Rini
2011-11-23  5:00     ` Aneesh V
2011-11-29 21:15       ` Tom Rini
2011-11-22  9:39 ` Aneesh V [this message]
2011-11-22  9:39 ` [U-Boot] [PATCH 5/9] omap: remove I2C from SPL Aneesh V
2011-11-22 15:52   ` Tom Rini
2011-11-23  7:34     ` Aneesh V
2011-11-23 15:05       ` Tom Rini
2011-11-22  9:39 ` [U-Boot] [PATCH 6/9] omap4: emif: fix error in driver Aneesh V
2011-11-22  9:39 ` [U-Boot] [PATCH 7/9] omap4460: add ES1.1 identification Aneesh V
2011-11-22  9:39 ` [U-Boot] [PATCH 8/9] omap4+: streamline CONFIG_SYS_TEXT_BASE and other SDRAM addresses Aneesh V
2011-11-22  9:39 ` [U-Boot] [PATCH 9/9] omap4: fix IO setting Aneesh V

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321954745-18112-5-git-send-email-aneesh@ti.com \
    --to=aneesh@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox