summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Nikolaus Schaller <hns@goldelico.com>2012-11-20 13:01:02 +0100
committerH. Nikolaus Schaller <hns@goldelico.com>2012-11-20 13:01:02 +0100
commitc562f9b26c9f5abfe5b89c1fbe816e24a705334f (patch)
treef77f4a0c56be6da34a0577a398beb23cfc4b588b
parent9e2ea9f36fc1d914d68a112643ba90fc037c3b27 (diff)
downloadbootable_bootloader_goldelico_gta04-c562f9b26c9f5abfe5b89c1fbe816e24a705334f.zip
bootable_bootloader_goldelico_gta04-c562f9b26c9f5abfe5b89c1fbe816e24a705334f.tar.gz
bootable_bootloader_goldelico_gta04-c562f9b26c9f5abfe5b89c1fbe816e24a705334f.tar.bz2
choose correct I2C bus
-rw-r--r--u-boot/board/goldelico/gta04/commands.c1
-rw-r--r--u-boot/board/goldelico/gta04/systest.c9
2 files changed, 6 insertions, 4 deletions
diff --git a/u-boot/board/goldelico/gta04/commands.c b/u-boot/board/goldelico/gta04/commands.c
index 45520d2..b65e463 100644
--- a/u-boot/board/goldelico/gta04/commands.c
+++ b/u-boot/board/goldelico/gta04/commands.c
@@ -595,6 +595,7 @@ static int do_systest(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
return wlanbttest(0); // just power on
}
if (strncmp ("ch", argv[1], 2) == 0) {
+ i2c_set_bus_num(TWL4030_I2C_BUS); // I2C1
return twl4030_init_battery_charging();
}
if (strncmp ("gp", argv[1], 2) == 0) {
diff --git a/u-boot/board/goldelico/gta04/systest.c b/u-boot/board/goldelico/gta04/systest.c
index 473e9e4..18fde65 100644
--- a/u-boot/board/goldelico/gta04/systest.c
+++ b/u-boot/board/goldelico/gta04/systest.c
@@ -549,7 +549,7 @@ int irdatest(void)
}
#ifdef CONFIG_OMAP3_GTA04
-int wlabbtpower(void)
+int wlanbtpower(void)
{ /* Bluetooth VAUX4 = 3.3V -- CHECKME: 3.3 V is not officially supported by TPS! We use 0x09 = 2.8V here*/
#define TCA6507_BUS (2-1) // I2C2
#define TCA6507_ADDRESS 0x45
@@ -564,7 +564,7 @@ int wlabbtpower(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
- i2c_set_bus_num(0); // write I2C1
+ i2c_set_bus_num(TWL4030_I2C_BUS); // write I2C1
printf("power on VAUX4\n");
twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX4_DEDICATED,
/* 2.8V: */ 0x09 /* 3.15V: 0x0c */,
@@ -576,7 +576,7 @@ int wlabbtpower(void)
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT0, 0);
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT1, 0);
i2c_reg_write(TCA6507_ADDRESS, TCA6507_SELECT2, 0); // release reset for WLAN&BT chip
- i2c_set_bus_num(0); // write I2C1
+ i2c_set_bus_num(TWL4030_I2C_BUS); // write I2C1
return 0;
}
#endif
@@ -584,7 +584,7 @@ int wlabbtpower(void)
int wlanbttest(int test)
{ /* Bluetooth VAUX4 = 3.3V -- CHECKME: 3.3 V is not officially supported! We use 0x09 = 2.8V here*/
#ifdef CONFIG_OMAP3_GTA04
- wlabbtpower();
+ wlanbtpower();
if(test)
{
// now, we should be able to test the UART for the BT part...
@@ -599,6 +599,7 @@ int wlanbttest(int test)
int OTGchargepump(int enable)
{
+ i2c_set_bus_num(TWL4030_I2C_BUS); // I2C1
if(enable)
twl4030_i2c_write_u8(TWL4030_CHIP_USB, 0x20, TWL4030_USB_OTG_CTRL_SET);
else