diff options
| author | mattis fjallstrom <mattis@acm.org> | 2015-07-02 00:47:56 -0700 |
|---|---|---|
| committer | mattis fjallstrom <mattis@acm.org> | 2015-07-02 00:47:56 -0700 |
| commit | 4442ba9ed7f2ee547d514f1f8840a51580fa8e54 (patch) | |
| tree | 75e0ced2a67dae1e7373005c0a1760c07aadaf5d | |
| parent | 5106ebfb00bb22353d2758e3ad1adf4058a4b02c (diff) | |
| download | olio-uboot-2014.01-4442ba9ed7f2ee547d514f1f8840a51580fa8e54.tar.xz olio-uboot-2014.01-4442ba9ed7f2ee547d514f1f8840a51580fa8e54.zip | |
Enabling some regulators in u-boot so that we get successful boots immediately.
Change-Id: Id0e0343359e6e12f803a4f7e84a7d19e9b74dd0c
| -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(); |