summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2012-06-07 23:42:17 +0200
committerWolfgang Denk <wd@denx.de>2012-06-07 23:42:17 +0200
commitfedab338f3459315cb69627fcf46032ec8df1753 (patch)
treef3364476201839514e578be0938832620be18244 /board
parent74b5b5dbc3345a8fad4bc798f8f88d07d2ef0008 (diff)
parentf6b690e65c0aa5f3da22546ac597d9f01cff2e4e (diff)
Merge branch 'master' of git://git.denx.de/u-boot-video
* 'master' of git://git.denx.de/u-boot-video: video: atmel/lcd: add LCD driver for new Atmel SoC video: cfb_console: flush dcache for frame buffer in DRAM cfb_console: Ignore bell character cfb_console: Add console_clear_line function cfb_console: Fix function console_back omap3_dss: cosmetic changes omap3_dss: add optional framebuffer mx53loco: Add LCD support mx5: Rename mx51_fb_init() mx53: Allow IPUv3 driver to also work on mx53 mx51evk: Add LCD support EXYNOS: display 32bpp bitmap TIZEN logo create lib/tizen directory LCD: display 32bpp decompressed bitmap image common/lcd.c: reduce one CONFIG_LCD_LOGO ifdef common/lcd.c: reduce some CONFIG_LCD_*_LOGO ifdefs common/lcd.c: use ARRAY_SIZE cmd_bmp.c: make bmp_display() usable by drivers or board code LCD: support another s6e8ax0 panel type LCD: change s6e8ax0 panel gamma value include/video.h: drop unused video_printf() Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/mx51evk/mx51evk.c59
-rw-r--r--board/freescale/mx53loco/mx53loco.c72
-rw-r--r--board/samsung/trats/trats.c16
-rw-r--r--board/ttcontrol/vision2/vision2.c2
4 files changed, 148 insertions, 1 deletions
diff --git a/board/freescale/mx51evk/mx51evk.c b/board/freescale/mx51evk/mx51evk.c
index b505a71054..514a7ac2ad 100644
--- a/board/freescale/mx51evk/mx51evk.c
+++ b/board/freescale/mx51evk/mx51evk.c
@@ -36,6 +36,12 @@
#include <fsl_pmic.h>
#include <mc13892.h>
#include <usb/ehci-fsl.h>
+#include <linux/fb.h>
+#include <ipu_pixfmt.h>
+
+#define MX51EVK_LCD_3V3 (3 * 32 + 9) /* GPIO4_9 */
+#define MX51EVK_LCD_5V (3 * 32 + 10) /* GPIO4_10 */
+#define MX51EVK_LCD_BACKLIGHT (2 * 32 + 4) /* GPIO3_4 */
DECLARE_GLOBAL_DATA_PTR;
@@ -453,6 +459,54 @@ int board_mmc_init(bd_t *bis)
}
#endif
+static struct fb_videomode claa_wvga = {
+ .name = "CLAA07LC0ACW",
+ .refresh = 57,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 37037,
+ .left_margin = 40,
+ .right_margin = 60,
+ .upper_margin = 10,
+ .lower_margin = 10,
+ .hsync_len = 20,
+ .vsync_len = 10,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED
+};
+
+void lcd_iomux(void)
+{
+ /* DI2_PIN15 */
+ mxc_request_iomux(MX51_PIN_DI_GP4, IOMUX_CONFIG_ALT4);
+
+ /* Pad settings for MX51_PIN_DI2_DISP_CLK */
+ mxc_iomux_set_pad(MX51_PIN_DI2_DISP_CLK, PAD_CTL_HYS_NONE |
+ PAD_CTL_PKE_ENABLE | PAD_CTL_PUE_KEEPER |
+ PAD_CTL_DRV_MAX | PAD_CTL_SRE_SLOW);
+
+ /* Turn on 3.3V voltage for LCD */
+ mxc_request_iomux(MX51_PIN_CSI2_D12, IOMUX_CONFIG_ALT3);
+ gpio_direction_output(MX51EVK_LCD_3V3, 1);
+
+ /* Turn on 5V voltage for LCD */
+ mxc_request_iomux(MX51_PIN_CSI2_D13, IOMUX_CONFIG_ALT3);
+ gpio_direction_output(MX51EVK_LCD_5V, 1);
+
+ /* Turn on GPIO backlight */
+ mxc_request_iomux(MX51_PIN_DI1_D1_CS, IOMUX_CONFIG_ALT4);
+ mxc_iomux_set_input(MX51_GPIO3_IPP_IND_G_IN_4_SELECT_INPUT,
+ INPUT_CTL_PATH1);
+ gpio_direction_output(MX51EVK_LCD_BACKLIGHT, 1);
+}
+
+void lcd_enable(void)
+{
+ int ret = ipuv3_fb_init(&claa_wvga, 1, IPU_PIX_FMT_RGB565);
+ if (ret)
+ printf("LCD cannot be configured: %d\n", ret);
+}
+
int board_early_init_f(void)
{
setup_iomux_uart();
@@ -460,6 +514,7 @@ int board_early_init_f(void)
#ifdef CONFIG_USB_EHCI_MX5
setup_usb_h1();
#endif
+ lcd_iomux();
return 0;
}
@@ -469,6 +524,8 @@ int board_init(void)
/* address of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+ lcd_enable();
+
return 0;
}
@@ -479,6 +536,8 @@ int board_late_init(void)
setup_iomux_spi();
power_init();
#endif
+ setenv("stdout", "serial");
+
return 0;
}
#endif
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index dec966ddd6..d8e027ce66 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -39,6 +39,10 @@
#include <pmic.h>
#include <dialog_pmic.h>
#include <fsl_pmic.h>
+#include <linux/fb.h>
+#include <ipu_pixfmt.h>
+
+#define MX53LOCO_LCD_POWER (2 * 32 + 24) /* GPIO3_24 */
DECLARE_GLOBAL_DATA_PTR;
@@ -402,10 +406,74 @@ static void clock_1GHz(void)
printf("CPU: Switch DDR clock to 400MHz failed\n");
}
+static struct fb_videomode claa_wvga = {
+ .name = "CLAA07LC0ACW",
+ .refresh = 57,
+ .xres = 800,
+ .yres = 480,
+ .pixclock = 37037,
+ .left_margin = 40,
+ .right_margin = 60,
+ .upper_margin = 10,
+ .lower_margin = 10,
+ .hsync_len = 20,
+ .vsync_len = 10,
+ .sync = 0,
+ .vmode = FB_VMODE_NONINTERLACED
+};
+
+void lcd_iomux(void)
+{
+ mxc_request_iomux(MX53_PIN_DI0_DISP_CLK, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN15, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DI0_PIN3, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT0, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT1, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT2, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT3, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT4, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT5, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT6, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT7, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT8, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT9, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT10, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT11, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT12, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT13, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT14, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT15, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT16, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT17, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT18, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT19, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT20, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT21, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT22, IOMUX_CONFIG_ALT0);
+ mxc_request_iomux(MX53_PIN_DISP0_DAT23, IOMUX_CONFIG_ALT0);
+
+ /* Turn on GPIO backlight */
+ mxc_request_iomux(MX53_PIN_EIM_D24, IOMUX_CONFIG_ALT1);
+ gpio_direction_output(MX53LOCO_LCD_POWER, 1);
+
+ /* Turn on display contrast */
+ mxc_request_iomux(MX53_PIN_GPIO_1, IOMUX_CONFIG_ALT1);
+ gpio_direction_output(IOMUX_TO_GPIO(MX53_PIN_GPIO_1), 1);
+}
+
+void lcd_enable(void)
+{
+ int ret = ipuv3_fb_init(&claa_wvga, 0, IPU_PIX_FMT_RGB565);
+ if (ret)
+ printf("LCD cannot be configured: %d\n", ret);
+}
+
int board_early_init_f(void)
{
setup_iomux_uart();
setup_iomux_fec();
+ lcd_iomux();
return 0;
}
@@ -432,6 +500,8 @@ int board_late_init(void)
clock_1GHz();
print_cpuinfo();
+ setenv("stdout", "serial");
+
return 0;
}
#endif
@@ -442,6 +512,8 @@ int board_init(void)
mxc_set_sata_internal_clock();
+ lcd_enable();
+
return 0;
}
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index 3085de1a14..a0eec75bc5 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -37,6 +37,7 @@
#include <pmic.h>
#include <usb/s3c_udc.h>
#include <max8997_pmic.h>
+#include <libtizen.h>
#include "setup.h"
@@ -53,6 +54,11 @@ u32 get_board_rev(void)
static void check_hw_revision(void);
+static int hwrevision(int rev)
+{
+ return (board_rev & 0xf) == rev;
+}
+
int board_init(void)
{
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
@@ -491,6 +497,16 @@ void init_panel_info(vidinfo_t *vid)
vid->reset_delay = 0;
vid->interface_mode = FIMD_RGB_INTERFACE;
vid->mipi_enabled = 1;
+ vid->logo_on = 1,
+ vid->resolution = HD_RESOLUTION,
+ vid->rgb_mode = MODE_RGB_P,
+
+#ifdef CONFIG_TIZEN
+ get_tizen_logo_info(vid);
+#endif
+
+ if (hwrevision(2))
+ mipi_lcd_device.reverse_panel = 1;
strcpy(s6e8ax0_platform_data.lcd_panel_name, mipi_lcd_device.name);
s6e8ax0_platform_data.lcd_power = lcd_power;
diff --git a/board/ttcontrol/vision2/vision2.c b/board/ttcontrol/vision2/vision2.c
index 282de95e95..d68bef78f8 100644
--- a/board/ttcontrol/vision2/vision2.c
+++ b/board/ttcontrol/vision2/vision2.c
@@ -604,7 +604,7 @@ void lcd_enable(void)
gpio_set_value(2, 1);
mxc_request_iomux(MX51_PIN_GPIO1_2, IOMUX_CONFIG_ALT0);
- ret = mx51_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
+ ret = ipuv3_fb_init(&nec_nl6448bc26_09c, 0, IPU_PIX_FMT_RGB666);
if (ret)
puts("LCD cannot be configured\n");
}