diff options
Diffstat (limited to 'board/olio/h1/h1.c')
| -rw-r--r-- | board/olio/h1/h1.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/board/olio/h1/h1.c b/board/olio/h1/h1.c index 8c5f8786d..1a3fe6a30 100644 --- a/board/olio/h1/h1.c +++ b/board/olio/h1/h1.c @@ -69,6 +69,42 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) } #endif +#define TPS65910_VMMC_REG 0x35 +static int disp_regulator_init(void) +{ + uchar buf; + + if (i2c_probe(TPS65910_CTRL_I2C_ADDR)) + return -1; + + /* Tell the TPS65910 to use i2c */ + tps65910_set_i2c_control(); + + /* SEL[1:0] = 3.3 V, ST[1:0] = On high power (ACTIVE) */ + buf = 0x0d; + + /* set VMMC_REG to supply 3.3 V */ + return i2c_write(TPS65910_CTRL_I2C_ADDR, TPS65910_VMMC_REG, 1, &buf, 1); +} + +#define TPS65910_VDIG1_REG 0x30 +static int accel_regulator_init(void) +{ + uchar buf; + + if (i2c_probe(TPS65910_CTRL_I2C_ADDR)) + return -1; + + /* Tell the TPS65910 to use i2c */ + tps65910_set_i2c_control(); + + /* SEL[1:0] = 1.8 V, ST[1:0] = On high power (ACTIVE) */ + buf = 0x09; + + /* set VDIG1_REG to supply 1.8 V */ + return i2c_write(TPS65910_CTRL_I2C_ADDR, TPS65910_VDIG1_REG, 1, &buf, 1); +} + /* * Routine: misc_init_r * Description: Configure board specific parts @@ -79,6 +115,10 @@ int misc_init_r(void) struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE; + if (disp_regulator_init()) + puts("failed to set VMMC regulator for tps65910\n"); + if (accel_regulator_init()) + puts("failed to set VMMC regulator for tps65910\n"); //MUX_BEAGLE_XM(); dieid_num_r(); |