diff options
author | Scott Sweeny <scott.sweeny@timesys.com> | 2009-04-30 09:55:08 -0400 |
---|---|---|
committer | Scott Sweeny <scott.sweeny@timesys.com> | 2009-04-30 09:55:08 -0400 |
commit | 2f4e56050b086c12f3502436586bd731014f0ac4 (patch) | |
tree | 1fc5272140b6410b1b28a444b7dbeada736c2bb6 /board/omap3430lv_som | |
parent | c376a8097edde82a1c3bc1e671ac02ed631a7c0a (diff) |
Add methods for fetching OMAP3430LV SOM production data
This patch originally from LogicPD OMAP35x Release 1.5.0
Original Patch Name: u-boot-1.1.4-omap3430-lv-som-13-production-data.patch
Diffstat (limited to 'board/omap3430lv_som')
-rw-r--r-- | board/omap3430lv_som/omap3430lv_som-data.c | 5 | ||||
-rw-r--r-- | board/omap3430lv_som/omap3430lv_som.c | 60 |
2 files changed, 31 insertions, 34 deletions
diff --git a/board/omap3430lv_som/omap3430lv_som-data.c b/board/omap3430lv_som/omap3430lv_som-data.c index 2b850d3b132..39e666d118f 100644 --- a/board/omap3430lv_som/omap3430lv_som-data.c +++ b/board/omap3430lv_som/omap3430lv_som-data.c @@ -62,6 +62,7 @@ static int gpio_i2c_clock_high_width, gpio_i2c_clock_low_width; static int gpio_i2c_coarse_delay; #define DEBUG_PRODUCTION_DATA 0 +#define DEBUG_PRODUCTION_DATA_BUF 0 #define STATIC static @@ -369,7 +370,7 @@ read_user_zone(unsigned char *buf, int len, int startoff) cmd[3] = len; ret = send_packet(cmd, sizeof(cmd), buf, len); - if (DEBUG_PRODUCTION_DATA) { + if (DEBUG_PRODUCTION_DATA_BUF) { char obuf[128]; int i,j,offset; for (i = 0, offset=0; i<len; i+=16) { @@ -477,7 +478,7 @@ int fetch_production_data(void) int err = 0; char buf[12]; - gpio_i2c_init(115200); + gpio_i2c_init(50000); #ifdef CONFIG_FETCH_ONLY_MAC_ADDRESSES printf("Read default MAC addresses: "); diff --git a/board/omap3430lv_som/omap3430lv_som.c b/board/omap3430lv_som/omap3430lv_som.c index 1ddab93ab28..06c6955e8e5 100644 --- a/board/omap3430lv_som/omap3430lv_som.c +++ b/board/omap3430lv_som/omap3430lv_som.c @@ -257,44 +257,40 @@ void s_init(void) sdrc_init(); } +// Turn on VAUX1 voltage to 3.0 volts to drive level shifters and +// power 3.0v parts (tsc2004 and Product ID chip) +void init_vaux1_voltage(void) +{ +#ifdef CONFIG_DRIVER_OMAP34XX_I2C + unsigned char data; + unsigned short msg; + + i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); + + // Select the output voltage + data = 0x04; + i2c_write(I2C_TRITON2, 0x72, 1, &data, 1); + // Select the Processor resource group + data = 0x20; + i2c_write(I2C_TRITON2, 0x72, 1, &data, 1); + // Enable I2C access to the Power bus + data = 0x02; + i2c_write(I2C_TRITON2, 0x4a, 1, &data, 1); + // Send message MSB + msg = (1<<13) | (1<<4) | (0xd<<0); // group(process_grp1):resource(vaux1):res_active; + data = msg >> 8; + i2c_write(I2C_TRITON2, 0x4b, 1, &data, 1); + // Send message LSB + data = msg & 0xff; + i2c_write(I2C_TRITON2, 0x4c, 1, &data, 1); +#endif +} /******************************************************* * Routine: misc_init_r * Description: Init ethernet (done here so udelay works) ********************************************************/ int misc_init_r(void) { -#ifdef CONFIG_DRIVER_OMAP34XX_I2C - i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); -#endif - -#ifdef CONFIG_DRIVER_OMAP34XX_I2C - - { - unsigned char data; - unsigned short msg; - - // Need to turn on VAUX1 to 3.0v to driver level - // shifters and power the production data chip as well - // as the TSC2004 touch controller - - // Select the output voltage - data = 0x04; - i2c_write(I2C_TRITON2, 0x72, 1, &data, 1); - // Select the Processor resource group - data = 0x20; - i2c_write(I2C_TRITON2, 0x72, 1, &data, 1); - // Enable I2C access to the Power bus - data = 0x02; - i2c_write(I2C_TRITON2, 0x4a, 1, &data, 1); - // Send message MSB - msg = (1<<13) | (1<<4) | (0xd<<0); // group(process_grp1):resource(vaux1):res_active; - data = msg >> 8; - i2c_write(I2C_TRITON2, 0x4b, 1, &data, 1); - // Send message LSB - data = msg & 0xff; - i2c_write(I2C_TRITON2, 0x4c, 1, &data, 1); - } -#endif ether_init(); /* better done here so timers are init'ed */ return (0); |