summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Sweeny <scott.sweeny@timesys.com>2009-04-30 09:55:08 -0400
committerScott Sweeny <scott.sweeny@timesys.com>2009-04-30 09:55:08 -0400
commit2f4e56050b086c12f3502436586bd731014f0ac4 (patch)
tree1fc5272140b6410b1b28a444b7dbeada736c2bb6
parentc376a8097edde82a1c3bc1e671ac02ed631a7c0a (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
-rw-r--r--board/omap3430lv_som/omap3430lv_som-data.c5
-rw-r--r--board/omap3430lv_som/omap3430lv_som.c60
-rw-r--r--include/configs/omap3530lv_som.h3
-rw-r--r--lib_arm/board.c5
4 files changed, 38 insertions, 35 deletions
diff --git a/board/omap3430lv_som/omap3430lv_som-data.c b/board/omap3430lv_som/omap3430lv_som-data.c
index 2b850d3b13..39e666d118 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 1ddab93ab2..06c6955e8e 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);
diff --git a/include/configs/omap3530lv_som.h b/include/configs/omap3530lv_som.h
index c1043a1e6b..00037f65d0 100644
--- a/include/configs/omap3530lv_som.h
+++ b/include/configs/omap3530lv_som.h
@@ -362,6 +362,9 @@ extern unsigned int pin_get_gpio_input(unsigned int pin);
extern unsigned int pin_set_gpio_dataout(unsigned int pin, unsigned int set);
extern unsigned int pin_init_gpio(unsigned int pin_num, unsigned int in_out);
+// Turn on VAUX1 voltage for Product ID
+extern void init_vaux1_voltage(void);
+
// Set the enetaddr environment variable from production data
extern int fetch_production_data(void);
extern void board_get_nth_enetaddr (unsigned char *enetaddr, int which);
diff --git a/lib_arm/board.c b/lib_arm/board.c
index 540dc1f411..69f231c476 100644
--- a/lib_arm/board.c
+++ b/lib_arm/board.c
@@ -246,6 +246,9 @@ init_fnc_t *init_sequence[] = {
#endif
dram_init, /* configure available RAM banks */
display_dram_config,
+#if defined(CONFIG_3430LV_SOM)
+ init_vaux1_voltage,
+#endif
NULL,
};
@@ -320,7 +323,7 @@ void start_armboot (void)
if (is_nand)
#endif
{
- puts ("NAND:");
+ puts ("NAND: ");
nand_init(); /* go init the NAND */
}
#endif