summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2010-10-23 21:56:51 +0200
committerWolfgang Denk <wd@denx.de>2010-10-23 21:56:51 +0200
commit33a08c10c78baf67e41cd03d5732ddc338e8c2e9 (patch)
tree90c168a7741fc77c3e58c47a48af96cb8278c30e /board
parentb4039a54153994e7c9a9f1c42a2a70a9153b6587 (diff)
parenta0152c4ba1ea052df2c3303195d252b86cbfc121 (diff)
downloadtalos-obmc-uboot-33a08c10c78baf67e41cd03d5732ddc338e8c2e9.tar.gz
talos-obmc-uboot-33a08c10c78baf67e41cd03d5732ddc338e8c2e9.zip
Merge branch 'master' of git://git.denx.de/u-boot-video
Diffstat (limited to 'board')
-rw-r--r--board/ttcontrol/vision2/vision2.c68
1 files changed, 68 insertions, 0 deletions
diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index ce4cb78e98..071dad66c4 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -37,14 +37,34 @@
#include <fsl_esdhc.h>
#include <fsl_pmic.h>
#include <mc13892.h>
+#include <linux/fb.h>
DECLARE_GLOBAL_DATA_PTR;
static u32 system_rev;
+extern int mx51_fb_init(struct fb_videomode *mode);
+
#ifdef CONFIG_HW_WATCHDOG
#include <watchdog.h>
+static struct fb_videomode nec_nl6448bc26_09c = {
+ "NEC_NL6448BC26-09C",
+ 60, /* Refresh */
+ 640, /* xres */
+ 480, /* yres */
+ 37650, /* pixclock = 26.56Mhz */
+ 48, /* left margin */
+ 16, /* right margin */
+ 31, /* upper margin */
+ 12, /* lower margin */
+ 96, /* hsync-len */
+ 2, /* vsync-len */
+ 0, /* sync */
+ FB_VMODE_NONINTERLACED, /* vmode */
+ 0, /* flag */
+};
+
void hw_watchdog_reset(void)
{
int val;
@@ -423,6 +443,9 @@ static void setup_gpios(void)
mxc_request_iomux(MX51_PIN_CSPI1_RDY, IOMUX_CONFIG_ALT3);
mxc_iomux_set_pad(MX51_PIN_CSPI1_RDY, 0x82);
+ /* PWM Output GPIO1_2 */
+ mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT1);
+
/*
* Set GPIO1_4 to high and output; it is used to reset
* the system on reboot
@@ -630,6 +653,33 @@ int board_early_init_f(void)
return 0;
}
+static void backlight(int on)
+{
+ if (on) {
+ mxc_gpio_set(65, 1);
+ udelay(10000);
+ mxc_gpio_set(68, 1);
+ } else {
+ mxc_gpio_set(65, 0);
+ mxc_gpio_set(68, 0);
+ }
+}
+
+void lcd_enable(void)
+{
+ int ret;
+
+ mxc_request_iomux(MX51_PIN_DI1_PIN2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX51_PIN_DI1_PIN3, IOMUX_CONFIG_ALT0);
+
+ mxc_gpio_set(2, 1);
+ mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
+
+ ret = mx51_fb_init(&nec_nl6448bc26_09c);
+ if (ret)
+ puts("LCD cannot be configured\n");
+}
+
int board_init(void)
{
#ifdef CONFIG_SYS_ARM_WITHOUT_RELOC
@@ -709,3 +759,21 @@ int checkboard(void)
return 0;
}
+int do_vision_lcd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+ int on;
+
+ if (argc < 2)
+ return cmd_usage(cmdtp);
+
+ on = (strcmp(argv[1], "on") == 0);
+ backlight(on);
+
+ return 0;
+}
+
+U_BOOT_CMD(
+ lcdbl, CONFIG_SYS_MAXARGS, 1, do_vision_lcd,
+ "Vision2 Backlight",
+ "lcdbl [on|off]\n"
+);
OpenPOWER on IntegriCloud