This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Replies: 16
Views: 6733
Dear TI engineer,
I already run android 4.3 on my pandaboard.
My PC OS is ubuntu 12.04,
I want to display with MIPI,
I modify two files (/arch/arm/mach-omap2/board-omap4panda.c and /driver/video/omap2/displays/panel-taal.c)
in board-omap4panda file
I add new struct omap_dss_device omap_panda_lcd_device
In panel-taal.c part,
I modify panel_config
Is my modification correct ?
If I am wrong, how to fix it ?
If I am right , what's next step?
Plz teach me. THX!
Please click the Verify Answer button on this post if it answers your question.
Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ
In reply to Boyko Kazakov:
Hi,
I think that DSI output will have output if the parameters for my display inappropriately.
I have measured my J7 connector pins.
But it doesn't measure signals.
So far, I don't connect my LCD module.
I just hope that DSI has output signals.
Would you please check those files is correct or not ?
THX
Or, would you please give me some more specific methods ?
board-omap4panda.txtKconfig.txt
In reply to Yuan-Heng Lu:
I already added and modified programs as below.
And I have added some initial code in panel_taal.c file .
But minicom.txt print some fail in log file.
My requirement as below,
Interface :DSI
One CLK lane
One Data lane
Frame refresh : 60Hz
Resolution : 320 X 480
RGB format : 18-bit (666)
Mode: Video Mode
Annex is Integral files.
If you need them, you can open it.3250.board-omap4panda.txtminicom.txtpanel-taal.txt
// DSI LCD//board_omap4panda.c part
static struct nokia_dsi_panel_data dsi1_panel = { .name = "taal", .reset_gpio = 102, .use_ext_te = false, .ext_te_gpio = 101, .esd_interval = 0,/* .set_backlight = dsi1_panel_set_backlight,*/};
static struct omap_dss_device sdp4430_lcd_device = {//static struct omap_dss_device omap4_panda_lcd_device={ .name = "lcd", .driver_name = "taal", .type = OMAP_DISPLAY_TYPE_DSI, .data = &dsi1_panel, .phy.dsi = { .type=OMAP_DSS_DSI_TYPE_VIDEO_MODE, .clk_lane = 1, .clk_pol = 0, .data1_lane = 2, .data1_pol = 0, //.module = 0, },
.clocks = { .dispc = { .channel = { /* Logic Clock = 172.8 MHz */ .lck_div = 1, /* Pixel Clock = 34.56 MHz */ .pck_div = 5, .lcd_clk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC, }, .dispc_fclk_src = OMAP_DSS_CLK_SRC_FCK, },
.dsi = { .regn = 16, /* Fint = 2.4 MHz */ .regm = 180, /* DDR Clock = 216 MHz */ .regm_dispc = 5, /* PLL1_CLK1 = 172.8 MHz */ .regm_dsi = 5, /* PLL1_CLK2 = 172.8 MHz */
.lp_clk_div = 10, /* LP Clock = 8.64 MHz */ .dsi_fclk_src = OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI, }, }, .channel = OMAP_DSS_CHANNEL_LCD, .skip_init = false ,// .platform_enable = NULL ,// .platform_disable = NULL ,};
#ifdef CONFIG_MACH_OMAP4_PANDA_DVI_PRIMARYstatic struct omap_dss_device *omap4_panda_dss_devices[] = { &omap4_panda_dvi_device, //original &omap4_panda_hdmi_device, //original &sdp4430_lcd_device, //modified};
static struct omap_dss_board_info omap4_panda_dss_data = { .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), .devices = omap4_panda_dss_devices,// .default_device = &omap4_panda_dvi_device, .default_device= &sdp4430_lcd_device, //modified
};#elsestatic struct omap_dss_device *omap4_panda_dss_devices[] = { &omap4_panda_hdmi_device, &omap4_panda_dvi_device, &sdp4430_lcd_device, //modified};
static struct omap_dss_board_info omap4_panda_dss_data = { .num_devices = ARRAY_SIZE(omap4_panda_dss_devices), .devices = omap4_panda_dss_devices, .default_device = &omap4_panda_hdmi_device,};#endif
void omap4_panda_display_init(void){
u32 reg; //modified reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); //modified reg &= ~OMAP4_DSI1_LANEENABLE_MASK; //modified reg |= 0x1f << OMAP4_DSI1_LANEENABLE_SHIFT; //modified reg &= ~OMAP4_DSI1_PIPD_MASK; //modified reg |= 0x1f << OMAP4_DSI1_PIPD_SHIFT; //modified omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); //modified
int r;
r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT, "lcd1_reset_gpio"); if (r) pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
r = omap4_panda_dvi_init(); if (r) pr_err("error initializing panda DVI\n");
omap4_panda_hdmi_mux_init(); omap_display_init(&omap4_panda_dss_data);}
// panel_taal.c part
static struct panel_config panel_configs[] = { { .name = "taal", // .type = PANEL_TAAL, .type = 0, .timings = { .x_res = 320, .y_res = 480, .pixel_clock =10000, .hsw=3, .hfp=16, .hbp=20, .vsw=2, .vfp=8, .vbp=12, }, .sleep = { .sleep_in = 5, .sleep_out = 5, .hw_reset = 5, .enable_te = 100, /* possible panel bug */ }, .reset_sequence = { .high = 10, .low = 10, }, },};
static int taal_power_on(struct omap_dss_device *dssdev){ struct taal_data *td = dev_get_drvdata(&dssdev->dev); u8 id1, id2, id3; int r;
r = omapdss_dsi_display_enable(dssdev); if (r) { dev_err(&dssdev->dev, "failed to enable DSI\n"); goto err0; }
taal_hw_reset(dssdev);
omapdss_dsi_vc_enable_hs(dssdev, td->channel, false);
r = taal_sleep_out(td);
printk ("cmd sleep out done\n");
r = taal_dcs_write_0(td, DCS_DISPLAY_ON);
printk ("cmd display on done first \n");
if (r) goto err;
r = taal_get_id(td, &id1, &id2, &id3); printk ("cmd taal_get_id done \n") ; if (r) goto err;
/* on early Taal revisions CABC is broken */ if (td->panel_config->type == PANEL_TAAL && (id2 == 0x00 || id2 == 0xff || id2 == 0x81)) td->cabc_broken = true;
r = taal_dcs_write_1(td, DCS_BRIGHTNESS, 0xff); printk ("cmd dcs brightness done \n"); if (r) goto err; r = taal_dcs_write_1(td, DCS_CTRL_DISPLAY, (1<<2) | (1<<5)); /* BL | BCTRL */ printk ("cmd dcs ctrl display \n"); if (r) goto err;
r = taal_dcs_write_1(td, DCS_PIXEL_FORMAT, 0x66); /* 18bit/pixel */ printk ("cmd dcs_pixel_format \n"); if (r) goto err;
r = taal_set_addr_mode(td, td->rotate, td->mirror); printk ("cmd taal_set_addr_mode \n"); if (r) goto err;
if (!td->cabc_broken) { r = taal_dcs_write_1(td, DCS_WRITE_CABC, td->cabc_mode); if (r) goto err; }
printk("cmd display on done \n");
r = _taal_enable_te(dssdev, td->te_enabled); printk("taal_enable_te \n"); if (r) goto err;
td->enabled = 1;
if (!td->intro_printed) { dev_info(&dssdev->dev, "%s panel revision %02x.%02x.%02x\n", td->panel_config->name, id1, id2, id3); if (td->cabc_broken) dev_info(&dssdev->dev, "old Taal version, CABC disabled\n"); td->intro_printed = true; }
omapdss_dsi_vc_enable_hs(dssdev, td->channel, true);
return 0;err: dev_err(&dssdev->dev, "error while enabling panel, issuing HW reset\n");
omapdss_dsi_display_disable(dssdev, true, false);err0: return r;}
From what i saw from the minicom log it looks like incorrect timings. Did you use the DSI timings extractor sheet for the calculations ( find it attached DSI timings extractor OMAP4.xlsx)?
You must understand that the timings for the display controler (DISPC) and for the DSI interface itself must be balanced and thus properly calculated. Those are put typically in the board file.
Command-mode is actually less demanding from OMAP4 point of view, as the panel has it's own framebuffer and you don't need to concern too much about the DSI timings, but the case with video-mode is completely different.
Do you use dsi capable scope for capturing dsi activity?
I suggest you put some gpio toggling in the taal.c for debug purpoise
gpio_set_value(#, 0);///// #number of gpio
udelay(1);
gpio_set_value(#, 1);///// #number of gpio
also a print for every function there to see exactly how it failed ( this introduces delay but when you find how exactly fails you can remove the prints)
printk(KERN_INFO "///%s: START\n", __func__);
also in the probe function
if (strcmp(panel_data->name, panel_configs[i].name) == 0) {+ printk("$ Panel configuration data for: %s\n", panel_configs[i].name);+ printk("$ Xres = %d, Yres = %d, Fpclk = %d kHz\n", panel_configs[i].timings.x_res, panel_configs[i].timings.y_res, panel_configs[i].timings.pixel_clock);+ printk("$ Hfp = %d, Hsw = %d, Hbp = %d\n", panel_configs[i].timings.hfp, panel_configs[i].timings.hsw, panel_configs[i].timings.hbp);+ printk("$ Vfp = %d, Vsw = %d, Vbp = %d\n", panel_configs[i].timings.vfp, panel_configs[i].timings.vsw, panel_configs[i].timings.vbp);
Regards,
Boyko