we got a 7 inch lcd with 800x680x24 RGB888, support max dclk = 30 M.
we are trying with our custom board witht the lcd directly connected.
and i get a little modification based on dvsdk4 on both Davinci_platform.c (media\video\davinci) and Vpbe_encoder.c (media\video\davinci) .
remove anything connect to the cpld in dm365.c and configure the kernel to make it run.
in Vpbe_encoder.c:
the red one is added:
/* All Supported encoder modes */
static struct vid_enc_mode_info vpbe_encoder_modes[VPBE_ENCODER_MAX_NUM_STD+1] = {
{
.name = VID_ENC_STD_800x480,
.std = 1,
.if_type = VID_ENC_IF_PRGB,
.interlaced = 1,
.xres = 800,
.yres = 480,
.fps = {30000, 1001},
.left_margin = 18,
.right_margin = 12,
.upper_margin = 20,
.lower_margin = 8,
.hsync_len = 1,
.vsync_len = 1,
.flags = 0},
{
.name = VID_ENC_STD_NTSC,
.std = 1,
.if_type = VID_ENC_IF_INT,
.interlaced = 1,
.xres = 720,
.yres = 480,
.fps = {30000, 1001},
.left_margin = 0x79,
.right_margin = 0,
.upper_margin = 0x10,
.lower_margin = 0,
.hsync_len = 0,
.vsync_len = 0,
.flags = 0},
/ /...
and
.no_of_outputs = VPBE_DM644X_ENCODER_MAX_NO_OUTPUTS,
.output[0] = {
.output_name = VID_ENC_OUTPUT_COMPOSITE,
.no_of_standard = VPBE_DM644X_ENCODER_COMPOSITE_NUM_STD,
//mike changed:
// .standards = {VID_ENC_STD_NTSC, VID_ENC_STD_PAL},
.standards = {VID_ENC_STD_800x480, VID_ENC_STD_NTSC},
},
for Davinci_platform.c :
struct enc_config davinci_enc_default[DAVINCI_ENC_MAX_CHANNELS] = {
//mike changed:
//{VID_ENC_OUTPUT_COMPOSITE,
//VID_ENC_STD_NTSC}
{VID_ENC_OUTPUT_LCD,
VID_ENC_STD_800x480}
};
and in davinci_enc_set_prgb:
else if (cpu_is_davinci_dm365()) {
/* DM365 pinmux */
dispc_reg_out(VENC_CLKCTL, 0x11);
davinci_cfg_reg(DM365_VOUT_FIELD_G81);
davinci_cfg_reg(DM365_VOUT_COUTL_EN);
davinci_cfg_reg(DM365_VOUT_COUTH_EN);
//mike added for RGB888
printk("davinci_enc_set_prgb : pinmux1 calling\n\n\n");
reg = __raw_readl(IO_ADDRESS(0x01c40000 + 0x04));//pin mux 1
reg &= ~(3 << 18); /* FIELD = 2 => R2*/
reg |= 2<<18;
reg &= ~(3 << 20); /* EXTCLK = 2 => B2*/
reg |= 2<<20;
__raw_writel(reg, IO_ADDRESS(0x01c40000 + 0x04));
reg = __raw_readl(IO_ADDRESS(0x01c40000 + 0x10));/* pinmux 4*/
reg |= 0xf<<10; /* R1, R0 */
reg |= 0xff; /* B0, B1, G0, G1 */
__raw_writel(reg, IO_ADDRESS(0x01c40000 + 0x10));
}
if this line :
//dispc_reg_out(VENC_VDPRO, 0x903);
is add in the end of this function, like this
dispc_reg_out(VENC_VDPRO, 0x903);
if (cpu_is_davinci_dm368()) {
/* Turn on LCD display */
mdelay(200);
gpio_set_value(82, 1);
}
after the system start, we can see the color bar in the lcd :
but if we remove this line,
dispc_reg_out(VENC_VDPRO, 0x903);
we get :
i dont kown what's the problem.. and stil i cannot see the linux log and .. the app of qt example cannot be display in the lcd.
we even tried with decode etc, but no luck.
Any help will be appreciated. thinks in advance.
regards, Mike.