diff options
author | Robert Winkler <robert.winkler@boundarydevices.com> | 2013-06-10 07:51:07 -0700 |
---|---|---|
committer | Robert Winkler <robert.winkler@boundarydevices.com> | 2013-06-18 13:04:57 -0700 |
commit | 988bd71bab51d682be7cb75a1fb606e4aee40738 (patch) | |
tree | 39def16789a5fae18e461bb7eaabc2190e085b45 | |
parent | 64e34b41c92d7c8c8158d5370ae154766feb236f (diff) |
Add support for 1280x800 lvds jeida screen
Add NULL checks before calling detect function pointer.
Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
-rw-r--r-- | board/boundary/nit6xlite/nit6xlite.c | 2 | ||||
-rw-r--r-- | board/boundary/nitrogen6x/nitrogen6x.c | 33 |
2 files changed, 33 insertions, 2 deletions
diff --git a/board/boundary/nit6xlite/nit6xlite.c b/board/boundary/nit6xlite/nit6xlite.c index 9255416ae8..158a4ec3af 100644 --- a/board/boundary/nit6xlite/nit6xlite.c +++ b/board/boundary/nit6xlite/nit6xlite.c @@ -584,7 +584,7 @@ int board_video_skip(void) if (!panel) { for (i = 0; i < ARRAY_SIZE(displays); i++) { struct display_info_t const *dev = displays+i; - if (dev->detect(dev)) { + if (dev->detect && dev->detect(dev)) { panel = dev->mode.name; printf("auto-detected panel %s\n", panel); break; diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index be6aefd3c9..7863db4e7e 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -558,6 +558,17 @@ static void enable_lvds(struct display_info_t const *dev) gpio_direction_output(LVDS_BACKLIGHT_GP, 1); } +static void enable_lvds_jeida(struct display_info_t const *dev) +{ + struct iomuxc *iomux = (struct iomuxc *) + IOMUXC_BASE_ADDR; + u32 reg = readl(&iomux->gpr[2]); + reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT + |IOMUXC_GPR2_BIT_MAPPING_CH0_JEIDA; + writel(reg, &iomux->gpr[2]); + gpio_direction_output(LVDS_BACKLIGHT_GP, 1); +} + static void enable_rgb(struct display_info_t const *dev) { gpio_direction_output(RGB_BACKLIGHT_GP, 1); @@ -584,6 +595,26 @@ static struct display_info_t const displays[] = {{ .sync = FB_SYNC_EXT, .vmode = FB_VMODE_NONINTERLACED } }, { + .bus = 0, + .addr = 0, + .pixfmt = IPU_PIX_FMT_RGB24, + .detect = NULL, + .enable = enable_lvds_jeida, + .mode = { + .name = "LDB-WXGA", + .refresh = 60, + .xres = 1280, + .yres = 800, + .pixclock = 14065, + .left_margin = 40, + .right_margin = 40, + .upper_margin = 3, + .lower_margin = 80, + .hsync_len = 10, + .vsync_len = 10, + .sync = FB_SYNC_EXT, + .vmode = FB_VMODE_NONINTERLACED +} }, { .bus = 2, .addr = 0x4, .pixfmt = IPU_PIX_FMT_LVDS666, @@ -659,7 +690,7 @@ int board_video_skip(void) if (!panel) { for (i = 0; i < ARRAY_SIZE(displays); i++) { struct display_info_t const *dev = displays+i; - if (dev->detect(dev)) { + if (dev->detect && dev->detect(dev)) { panel = dev->mode.name; printf("auto-detected panel %s\n", panel); break; |