diff options
author | Peter Meerwald <p.meerwald@bct-electronic.com> | 2012-02-08 05:24:26 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-02-27 21:19:24 +0100 |
commit | 4258aa62fbf4e001314624d09bcc94b3027c5670 (patch) | |
tree | 68c2d7a5834836024c5f4709aee964e302e7822e | |
parent | 826e99136e2bce61f3f6572e32d7aa724c116e6d (diff) | |
download | u-boot-imx-4258aa62fbf4e001314624d09bcc94b3027c5670.zip u-boot-imx-4258aa62fbf4e001314624d09bcc94b3027c5670.tar.gz u-boot-imx-4258aa62fbf4e001314624d09bcc94b3027c5670.tar.bz2 |
beagle: enable DVI_PUP
this patch addresses the issue that there is no DVI output on beagleboard-xm in
u-boot; the TFP410 is not powered on, DVI_PUP needs to be set high
this is done differently on beagleboard-xm rev. B/C versus earlier boards:
beagleboard-xm B/C need to set GPIO2 of the TWL4030
earlier boards need to set GPIO170
note that the change occured somewhere inbetween beagleboard-xm rev. A2 and A3
note that beagleboard-xm rev. A and rev. B cannot be distinguished using
get_board_revision(), REVISION_XM_A/REVISION_XM_B is bogus
due to this glitch, the patch cannot work correctly on some beagleboard-xm
rev A/B boards
tested on beagleboard-xm rev. C (you should see orange color on a monitor)
note that the framebuffer is NOT yet set up, this could be done along the
lines below (for 800x480 resolution and RGB24) before calling omap3_dss_enable()
static void configure_frame_buffer() {
writel(0x80500000, (uint *) 0x48050480); // address
writel(0x80500000, (uint *) 0x48050484);
writel(0x01df031f, (uint *) 0x4805048c); // size
writel(0x00000091, (uint *) 0x480504a0); // RGB24
}
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
-rw-r--r-- | board/ti/beagle/beagle.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 8757876..c09c833 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -252,6 +252,38 @@ void beagle_display_init(void) } /* + * Enable DVI power + */ +static void beagle_dvi_pup() { + uchar val; + + switch (get_board_revision()) { + case REVISION_AXBX: + case REVISION_CX: + case REVISION_C4: + case REVISION_XM_A: + gpio_request(170, ""); + gpio_direction_output(170, 0); + gpio_set_value(170, 1); + break; + case REVISION_XM_B: + case REVISION_XM_C: + default: + #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) + #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) + + i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); + val |= 4; + i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); + + i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); + val |= 4; + i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); + break; + } +} + +/* * Routine: misc_init_r * Description: Configure board specific parts */ @@ -422,6 +454,8 @@ int misc_init_r(void) GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); dieid_num_r(); + + beagle_dvi_pup(); beagle_display_init(); omap3_dss_enable(); |