]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
omap4460: fix TPS initialization
authorAneesh V <aneesh@ti.com>
Mon, 21 Nov 2011 23:39:00 +0000 (23:39 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 6 Dec 2011 22:59:34 +0000 (23:59 +0100)
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
board/ti/panda/panda_mux_data.h
board/ti/sdp4430/sdp.c
board/ti/sdp4430/sdp4430_mux_data.h

index f64a10bfcba05dccc822ada192cfd09d4f4350e3..1e7e20e249f3502b4d92f295fc57de10d3ea7d32 100644 (file)
@@ -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) |
index c05170e336026fb3b26531d4f0f5aef7cdb193c2..2970ccd60922b6b7d093643cc42291994a9edf65 100644 (file)
@@ -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 */
 
 };
 
index e1b853c4e961566ae3aac6f0d62f44dc563aa166..9ae9e2c602c3dc10706b62cd2d60a6b99947fcc7 100644 (file)
@@ -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)
index 1c6e0eeb60cd2bc8434c69e35975052e1d95a882..0a20968978923d10a0ea76eaa809365460eae1e6 100644 (file)
@@ -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 */