commit 1e000bbbfecdc0e4309f894eb5d046d82703d169
Author: Jeroen Hofstee <jhofstee@victronenergy.com>
Date: Wed May 16 14:54:56 2012 +0200
twister: add lg 4.3 inch LCD - testing only!
Since different LCDs can be connected to the twister board,
this should _NOT BE IN MAINLINE_. For testing only....
LCD led is now on instead of off in non graphical mode.
@@ -26,6 +26,7 @@
#include <common.h>
#include <netdev.h>
#include <asm/io.h>
+#include <asm/arch/dss.h>
#include <asm/arch/mem.h>
#include <asm/arch/mux.h>
#include <asm/arch/sys_proto.h>
@@ -60,6 +61,58 @@ static const u32 gpmc_XR16L2751[] = {
XR16L2751_GPMC_CONFIG6,
};
+#ifdef CONFIG_CFB_CONSOLE
+
+#define SIZE_X 480
+#define SIZE_Y 272
+#define TIMING(bp, fp, sw) (((bp) << 20) | ((fp) << 8) | (sw))
+
+static u32 fb[SIZE_X * SIZE_Y];
+
+static struct panel_config lg_lb043 = {
+ .timing_h = TIMING(4, 8, 41),
+ .timing_v = TIMING(2, 4, 10),
+ .pol_freq = 0x00000028,
+ .divisor = 0x00010036,
+ .lcd_size = (SIZE_Y - 1) << 16 | (SIZE_X - 1),
+ .panel_type = 0x01,
+ .data_lines = 0x03,
+ .load_mode = 0x02,
+ .panel_color = 0x000000ff,
+ .frame_buffer = fb,
+};
+
+#define BACKLIGHT_POWER_GPIO 53
+#define LCD_DISABLE_VDD_GPIO 138
+#define LCD_POWER_GPIO 139
+
+static void enable_lcd(void)
+{
+ if (gpio_request(LCD_DISABLE_VDD_GPIO, "LCD_DISABLE_VDD"))
+ printf("failed to request LCD_DISABLE_VDD pin\n");
+ else
+ gpio_direction_output(LCD_DISABLE_VDD_GPIO, 0);
+
+ if (gpio_request(LCD_POWER_GPIO, "LCD_POWER"))
+ printf("failed to request LCD_POWER pin\n");
+ else
+ gpio_direction_output(LCD_POWER_GPIO, 1);
+
+ if (gpio_request(BACKLIGHT_POWER_GPIO, "BACKLIGHT"))
+ printf("failed to request BACKLIGHT pin\n");
+ else
+ gpio_direction_output(BACKLIGHT_POWER_GPIO, 1);
+}
+
+int board_video_init(void)
+{
+ omap3_dss_panel_config(&lg_lb043);
+ omap3_dss_enable();
+ enable_lcd();
+ return 0;
+}
+#endif
+
#ifdef CONFIG_USB_EHCI
static struct omap_usbhs_board_data usbhs_bdata = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
@@ -127,7 +127,7 @@ const omap3_sysinfo sysinfo = {
MUX_VAL(CP(GPMC_D15), (IEN | PTU | EN | M0)) \
MUX_VAL(CP(GPMC_NCS0), (IDIS | PTU | EN | M0)) \
MUX_VAL(CP(GPMC_NCS1), (IEN | PTU | EN | M0)) \
- MUX_VAL(CP(GPMC_NCS2), (IDIS | PTD | EN | M2)) /*PWM9*/\
+ MUX_VAL(CP(GPMC_NCS2), (IDIS | PTD | EN | M4)) /*LCD LED*/\
MUX_VAL(CP(GPMC_NCS3), (IEN | PTU | EN | M0)) \
MUX_VAL(CP(GPMC_NCS4), (IEN | PTD | EN | M4)) \
MUX_VAL(CP(GPMC_NCS5), (IDIS | PTU | EN | M0)) \
@@ -48,6 +48,13 @@
#define CONFIG_SMC911X_BASE 0x2C000000
#define CONFIG_SMC911X_NO_EEPROM
+#define CONFIG_CFB_CONSOLE
+#ifdef CONFIG_CFB_CONSOLE
+# define CONFIG_VGA_AS_SINGLE_DEVICE
+# define CONFIG_VIDEO_OMAP3
+# define CONFIG_SPLASH_SCREEN
+#endif
+
#define CONFIG_EXTRA_ENV_SETTINGS CONFIG_TAM3517_SETTINGS \
"bootcmd=run nandboot\0"