diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2013-01-10 10:04:05 +0100 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2013-01-10 10:04:05 +0100 |
commit | 30d2cc7772948237113241593bf0524aa94d2fc0 (patch) | |
tree | 0e69b02931a5c4fdf29bfbd5e1dfe45118d170ee /u-boot/board | |
parent | f29b355213af2849e8fa895faf5c54f4675f27be (diff) | |
download | bootable_bootloader_goldelico_gta04-30d2cc7772948237113241593bf0524aa94d2fc0.zip bootable_bootloader_goldelico_gta04-30d2cc7772948237113241593bf0524aa94d2fc0.tar.gz bootable_bootloader_goldelico_gta04-30d2cc7772948237113241593bf0524aa94d2fc0.tar.bz2 |
moved ITG3200 reset code to tsc init command
Diffstat (limited to 'u-boot/board')
-rw-r--r-- | u-boot/board/goldelico/gta04/gta04.c | 16 | ||||
-rw-r--r-- | u-boot/board/goldelico/gta04/systest.h | 1 | ||||
-rw-r--r-- | u-boot/board/goldelico/gta04/tsc2007.c | 29 |
3 files changed, 30 insertions, 16 deletions
diff --git a/u-boot/board/goldelico/gta04/gta04.c b/u-boot/board/goldelico/gta04/gta04.c index 95865dd..6baa333 100644 --- a/u-boot/board/goldelico/gta04/gta04.c +++ b/u-boot/board/goldelico/gta04/gta04.c @@ -142,22 +142,6 @@ int misc_init_r(void) 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(TCA6507_BUS); // 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 diff --git a/u-boot/board/goldelico/gta04/systest.h b/u-boot/board/goldelico/gta04/systest.h index 4126b3b..07e928a 100644 --- a/u-boot/board/goldelico/gta04/systest.h +++ b/u-boot/board/goldelico/gta04/systest.h @@ -32,5 +32,6 @@ int irdatest(void); int wlanbttest(int serial); int OTGchargepump(int enable); int gpiotest(void); +int keytest(void); #endif diff --git a/u-boot/board/goldelico/gta04/tsc2007.c b/u-boot/board/goldelico/gta04/tsc2007.c index 0df22ce..11565df 100644 --- a/u-boot/board/goldelico/gta04/tsc2007.c +++ b/u-boot/board/goldelico/gta04/tsc2007.c @@ -29,6 +29,7 @@ #include <asm/arch/gpio.h> #include <asm/mach-types.h> #include <i2c.h> +#include <twl4030.h> #include "tsc2007.h" #define TSC2007_BUS (2-1) // I2C2 @@ -92,6 +93,34 @@ int tsc2007_init(void) return 1; } +#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 + */ + if(i2c_probe(0x68)) + { // ITG3200 does not respond + printf("ITG3200 does not respond\n"); + // FIXME: temporarily switch off VAUX2 + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, + /*TWL4030_PM_RECEIVER_VAUX2_VSEL_28*/ 0x09, + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, + TWL4030_PM_RECEIVER_DEV_GRP_P1); + udelay(30*1000); // wait a little until power drops + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, + /*TWL4030_PM_RECEIVER_VAUX2_VSEL_28*/ 0x09, + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, + TWL4030_PM_RECEIVER_DEV_GRP_P1); + udelay(10*1000); // wait a little until power stabilizes and ITG did reset + if(i2c_probe(0x68)) // ITG3200 does not respond + printf("ITG3200 still does not respond\n"); + else + printf("ITG3200 now ok\n"); + } +#endif + if(i2c_probe(TSC2007_ADDRESS)) { printf ("could not probe TSC2007\n"); |