On 05/16/2012 09:04 PM, Jeroen Hofstee wrote:
I could not resist removing some brackets etc while looking at the file..
These changes are optional and in a seperate patch. I will email a
seperate patch which I use for testing, but should NOT be in mainline,
since it assumes which LCD is connected.
Beagle owners, please test that I didn't break your orange background;
I don't have the board.
Jeroen Hofstee (2):
omap3_dss: add optional framebuffer
omap3_dss: cosmetic changes
arch/arm/include/asm/arch-omap3/dss.h | 61 ++++++++++++++++----------
drivers/video/Makefile | 2 +-
drivers/video/omap3_dss.c | 78 ++++++++++++++++++++++++---------
3 files changed, 98 insertions(+), 43 deletions(-)
And the promised patch for the twister board, I used for testing;
assuming a lg 4.3 inch display. _Not to be applied, testing only_
Jeroen
commit 1e000bbbfecdc0e4309f894eb5d046d82703d169
Author: Jeroen Hofstee <jhofs...@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.
diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c
index b927586..e9446f7 100644
--- a/board/technexion/twister/twister.c
+++ b/board/technexion/twister/twister.c
@@ -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,
diff --git a/board/technexion/twister/twister.h b/board/technexion/twister/twister.h
index a2051c0..12557aa 100644
--- a/board/technexion/twister/twister.h
+++ b/board/technexion/twister/twister.h
@@ -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)) \
diff --git a/include/configs/twister.h b/include/configs/twister.h
index a852481..adcf083 100644
--- a/include/configs/twister.h
+++ b/include/configs/twister.h
@@ -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"
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot