Hello Stefano,
On 28.08.2012 09:46, Stefano Babic wrote:
Signed-off-by: Stefano Babic<sba...@denx.de>
---
board/teejet/mt_ventoux/mt_ventoux.c | 91 ++++++++++++++++++++++++++++++++++
board/teejet/mt_ventoux/mt_ventoux.h | 2 +-
include/configs/mt_ventoux.h | 16 ++++++
3 files changed, 108 insertions(+), 1 deletion(-)
diff --git a/board/teejet/mt_ventoux/mt_ventoux.c
b/board/teejet/mt_ventoux/mt_ventoux.c
index 814e72f..a2bda4b 100644
--- a/board/teejet/mt_ventoux/mt_ventoux.c
+++ b/board/teejet/mt_ventoux/mt_ventoux.c
@@ -21,13 +21,17 @@
#include<common.h>
#include<netdev.h>
+#include<malloc.h>
#include<fpga.h>
+#include<video_fb.h>
#include<asm/io.h>
#include<asm/arch/mem.h>
#include<asm/arch/mux.h>
#include<asm/arch/sys_proto.h>
#include<asm/omap_gpio.h>
#include<asm/arch/mmc_host_def.h>
+#include<asm/arch/dss.h>
+#include<asm/arch/clocks.h>
#include<i2c.h>
#include<spartan3.h>
#include<asm/gpio.h>
@@ -53,6 +57,50 @@ DECLARE_GLOBAL_DATA_PTR;
#define FPGA_INIT 119
#define FPGA_DONE 154
+#define LCD_PWR 138
+#define LCD_PON_PIN 139
+
+#if defined(CONFIG_VIDEO)&& !defined(CONFIG_SPL_BUILD)
+static struct {
+ u32 xres;
+ u32 yres;
+} panel_resolution[] = {
+ { 480, 272 },
+ { 800, 480 }
+};
+
+static struct panel_config lcd_cfg[] = {
+ {
+ .timing_h = ((4 /* hpb */ - 1)<< 20) |
+ ((8 /*hfp */- 1)<< 8) |
+ (41 /* hsw */ - 1), /* Horizontal timing */
Could we use here a define, something like this:
#define PANEL_TIMING_H(bp, fp, sw) (((bp - 1) << 20) | ((fp - 1) << 8) | (sw -
1))
.panel_config = {
.timing_h = PANEL_TIMING_H(4, 8, 41),
+ .timing_v = (2 /*vbp */<< 24) |
^^
Is this correct? In the manual I
see for the timing H and V settings
the same bitpositions!
+ (4 /* vfp */<< 8) |
+ (10 - 1), /* Vertical timing */
#define PANEL_TIMING_V(bp, fp, sw) (((bp) << 20) | ((fp) << 8) | (sw - 1))
and here too ?
+ .pol_freq = 0x00000000, /* Pol Freq */
+ .divisor = 0x0001000d, /* 33Mhz Pixel Clock */
+ .panel_type = 0x01, /* TFT */
+ .data_lines = 0x03, /* 24 Bit RGB */
+ .load_mode = 0x02, /* Frame Mode */
+ .panel_color = 0,
+ },
+ {
+ .timing_h = ((20 /* hpb */ - 1)<< 20) |
+ ((192 /*hfp */- 1)<< 8) |
+ (4 /* hsw */ - 1), /* Horizontal timing */
and here ...
+ .timing_v = (2 /*vbp */<< 24) |
+ (20 /* vfp */<< 8) |
+ (10 /* vsw */ - 1), /* Vertical timing */
and here.
+ .pol_freq = 0x00004000, /* Pol Freq */
+ .divisor = 0x0001000E, /* 36Mhz Pixel Clock */
+ .panel_type = 0x01, /* TFT */
+ .data_lines = 0x03, /* 24 Bit RGB */
+ .load_mode = 0x02, /* Frame Mode */
+ .panel_color = 0,
+ }
+};
+#endif
[...]
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot