summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2012-08-30 12:06:09 +0200
committerH. Nikolaus Schaller <hns@goldelico.com>2012-08-30 12:06:09 +0200
commit3d98c3057fade551a00a87f87b14eaa28c43e1d8 (patch)
tree83bb84e35d5a04a8211eb5cbd17aa14220e752a1
parent8a2402c6c69968c9c3a123b55a9357e11089a80e (diff)
downloadbootable_bootloader_goldelico_gta04-3d98c3057fade551a00a87f87b14eaa28c43e1d8.zip
bootable_bootloader_goldelico_gta04-3d98c3057fade551a00a87f87b14eaa28c43e1d8.tar.gz
bootable_bootloader_goldelico_gta04-3d98c3057fade551a00a87f87b14eaa28c43e1d8.tar.bz2
prepared to check if ITG3200 did not reset on power-up
-rw-r--r--u-boot/board/goldelico/gta04/gta04.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/u-boot/board/goldelico/gta04/gta04.c b/u-boot/board/goldelico/gta04/gta04.c
index 234be76..cd9e9d2 100644
--- a/u-boot/board/goldelico/gta04/gta04.c
+++ b/u-boot/board/goldelico/gta04/gta04.c
@@ -141,6 +141,23 @@ int misc_init_r(void)
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT0, 0);
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT1, 0);
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT2, 0x40); // pull down reset for WLAN&BT chip
+
+#if 1
+ // FIXME: if(gta04_board_revision() should have ITG)
+ /* if the GTA04 is connected to USB power first and
+ * the battery is inserted after this, all power rails
+ * have oscillated until the battery is available
+ * this makes the ITG3200 Power On Reset fail
+ */
+ i2c_set_bus_num(1); // I2C2
+ udelay(10*1000); // wait a little until power stabilizes
+ if(i2c_probe(0x68)) { // ITG3200 does not respond
+ printf("ITG3200 does not respond\n");
+ // Pulse VAUX2 to force POR
+ // how can we do that???
+ }
+#endif
+
i2c_set_bus_num(0); // write I2C1
#if 0 // FIXME: enable only on demand if we want to test BT/WIFI - and apply RESET
@@ -151,9 +168,10 @@ int misc_init_r(void)
TWL4030_PM_RECEIVER_DEV_GRP_P1);
#endif
- /* make dependent on CPU type */
- setenv("mpurate", "600");
- setenv("mpurate", "800");
+ if (get_cpu_family() == CPU_OMAP36XX)
+ setenv("mpurate", "800");
+ else
+ setenv("mpurate", "600");
twl4030_power_init();