From 4442ba9ed7f2ee547d514f1f8840a51580fa8e54 Mon Sep 17 00:00:00 2001 From: mattis fjallstrom Date: Thu, 2 Jul 2015 00:47:56 -0700 Subject: Enabling some regulators in u-boot so that we get successful boots immediately. Change-Id: Id0e0343359e6e12f803a4f7e84a7d19e9b74dd0c --- board/olio/h1/h1.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'board/olio/h1/h1.c') 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(); -- cgit v1.2.3-70-g09d2