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.

OMAP4460 LCD Channel 2 DPI Mode

Other Parts Discussed in Thread: TFP410, TMP102

Hi,

Please could someone assist me with getting the OMAP4460 LCD2 DPI mode working. I am using 4AJ.2.5.P1 (Jellybean)

Here are the steps I have tried so far:

  1. Created a new generic_dpi_panel driver
  2. Setup the board file to load the driver
  3. Tried various bootargs for vram
I get the PCLK at the correct frequency and the HSYNC/VSYNC/DE lines are all running smoothly. However, I get absolutely no data on D0 to D23 lines.
Can someone point me in the right direction of what I could be missing?
Many Thanks,
Nigel
  • Hi Nigel,

    Did you try to read the mux registers in Control Module to check if they are actually set to output display data?

    Regards, Boyko

  • Hi,

    On my custom board I only have UART access. How do I read the registers to check them?

    Many Thanks,

  • You can use the omapconf tool (https://github.com/omapconf/omapconf/wiki) to read the value on specific addresses.

    you check Device Core Control Module Pad Configuration Register Fields Tables in the omap4 TRM (http://www.ti.com/lit/ug/swpu235aa/swpu235aa.pdf) for the appropriate registers.

    Regards,

    Boyko

  • Thanks for the info...

    The MUX is definately setup correctly. 

    I have now checked the dispc registers and found that DISPC_CONTROL2 is disabled and DISPC_OVL_ATTRIBUTES(GFX)  is set to output to  LCD1. I am confident that my driver is setup correctly and I think what I am looking for now is a description of how to correctly enable LCD2 and set the correct overlay/manager to point the data to it.


    I have tried adding bootargs such as omapfb.def_disp=dvi omapfb.mode=dvi:1280x800@60 and it seems these have absolutely no effect.


    Many Thanks,

    Nigel

  • I presume that you checked the configs here:

    http://omappedia.org/wiki/DSS_CONFIG_options

    Did you try to use the bootargs from here?

    http://www.omappedia.com/wiki/Bootargs_for_enabling_display

    Regards, Boyko

  • Hi,

    Yes, I have followed all of these with still no joy. I have now tried an earlier kernel with Android ICS and still the same.issues arise.

    Thanks,

    Nigel

  • Intriguing. Did you examine  your hardware setup? You can check this example to display in u-boot

    http://e2e.ti.com/support/omap/f/849/t/266271.aspx

    Hope you have success with it.

    Regards, Boyko

  • Hi,

    Thanks for the link. I have been able to get the DPI channel outputting the data onto an oscilloscope. Next step is to do the display timing for my lcd and then get the same registers working in the kernel Driver.

    Thanks for the assistance!

  • Hi NigelEvans

    I have the same problem that it use LCD2 channel with DPI mode in JAJ2.5.P2, and I think there are not  many differences between JAJ2.5P2 and 4AJ2.5P1. I hope you can provide me your patch if you can, or point me out my patch where we should revise it, because our DISPC2_PCLK has got no clock. I appreciate your assistance, thank you.

    =========================================================================================

    diff --git a/arch/arm/mach-omap2/board-44xx-tablet-panel.c b/arch/arm/mach-omap2/board-44xx-tablet-panel.c
    index bb801af..dc21479 100644
    --- a/arch/arm/mach-omap2/board-44xx-tablet-panel.c
    +++ b/arch/arm/mach-omap2/board-44xx-tablet-panel.c
    @@ -26,6 +26,7 @@
     
     #include <video/omapdss.h>
     #include <video/omap-panel-tc358765.h>
    +#include <video/omap-panel-generic-dpi.h>
     
     #include "mux.h"
     #include "control.h"
    @@ -46,6 +47,8 @@
     #define HDMI_GPIO_CT_CP_HPD            98 /* HPD mode enable/disable */
     #define HDMI_GPIO_HPD                63 /* Hot plug pin for HDMI */
     #define HDMI_GPIO_LS_OE                99 /* Level shifter for HDMI */
    +#define TABLET_DVI_LCD_TFP410_POWER_DOWN_GPIO    0 //Kaney add
    +#define TABLET_EXP_LCD_ENABLE_GPIO    157 //42 //Kaney add
     
     static void omap4_tablet_init_display_led(void)
     {
    @@ -235,6 +238,57 @@ static struct omap_dss_device tablet_lcd_device = {
         .dispc_timings = &tablet_dispc_timings,
     };
     
    +static int omap4_panda_enable_dvi_lcd(struct omap_dss_device *dssdev)
    +{
    +   printk("Now enable EXP LCD\n");
    +
    +   gpio_set_value(TABLET_EXP_LCD_ENABLE_GPIO, 1);
    +     
    +   return 0;
    +}
    +
    +static void omap4_panda_disable_dvi_lcd(struct omap_dss_device *dssdev)
    +{
    +
    +   printk("Now disable EXP LCD\n");
    +
    +   gpio_set_value(TABLET_EXP_LCD_ENABLE_GPIO, 0);
    +}
    +
    +/* Using generic display panel */
    +static struct panel_generic_dpi_data omap4_dvi_lcd_panel = {
    +   .name            = "EJ070NA-01J",
    +   .platform_enable    = omap4_panda_enable_dvi_lcd,
    +   .platform_disable    = omap4_panda_disable_dvi_lcd,
    +};
    +
    +struct omap_dss_device omap4_panda_dvi_lcd_device = {
    +   .type            = OMAP_DISPLAY_TYPE_DPI,
    +   .name            = "dvi",
    +   .driver_name        = "generic_dpi_panel",
    +   .data            = &omap4_dvi_lcd_panel,
    +   .phy.dpi.data_lines    = 24, //24, //Kaney modify
    +   .reset_gpio        = TABLET_EXP_LCD_ENABLE_GPIO,
    +   .channel        = OMAP_DSS_CHANNEL_LCD2,
    +};
    +
    +static void omap4_panda_dvi_lcd_init(void)
    +{
    +   int r;
    +   /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
    +   /*r = gpio_request_one(omap4_panda_dvi_lcd_device.reset_gpio,
    +               GPIOF_OUT_INIT_LOW, "DVI PD");
    +   if (r)
    +       printk("Failed to get DVI powerdown GPIO\n");*/
    +   r = gpio_request_one(TABLET_EXP_LCD_ENABLE_GPIO,
    +               GPIOF_OUT_INIT_LOW, "lcd_enable_gpio");
    +   if (r)
    +       printk("Failed to get DVI LCD powerdown GPIO\n");
    +
    +}
    +
    +
    +
     static int tablet_panel_enable_hdmi(struct omap_dss_device *dssdev)
     {
         return 0;
    @@ -261,7 +315,8 @@ static struct omap_dss_device tablet_hdmi_device = {
     };
     
     static struct omap_dss_device *tablet_dss_devices[] = {
    -    &tablet_lcd_device,
    +    &omap4_panda_dvi_lcd_device,
    +    //&tablet_lcd_device,
         &tablet_hdmi_device,
     };
     
    @@ -316,7 +371,7 @@ static struct sgx_omaplfb_platform_data omaplfb_plat_data_hdmi_default_display =
     static struct omap_dss_board_info tablet_dss_data = {
         .num_devices    = ARRAY_SIZE(tablet_dss_devices),
         .devices    = tablet_dss_devices,
    -    .default_device    = &tablet_lcd_device,
    +    .default_device    = &omap4_panda_dvi_lcd_device,
     };
     
     static struct omap_dss_board_info tablet_dss_data_hdmi_default_display = {
    @@ -375,13 +430,13 @@ static struct i2c_board_info __initdata omap4xx_i2c_bus2_d2l_info[] = {
     
     void __init tablet_android_display_setup(void)
     {
    -    if (omap_android_display_is_default(&tablet_hdmi_device))
    +    /*if (omap_android_display_is_default(&tablet_hdmi_device))
             omap_android_display_setup(
                 &tablet_dss_data_hdmi_default_display,
                 &dsscomp_config_hdmi_display,
                 &omaplfb_plat_data_hdmi_default_display,
                 &tablet_fb_pdata);
    -    else
    +    else*/
             omap_android_display_setup(&tablet_dss_data,
                 &dsscomp_config_tablet,
                 &omaplfb_plat_data_tablet,
    @@ -394,19 +449,20 @@ int __init tablet_display_init(void)
                     OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
     
         platform_device_register(&tablet_disp_led);
    -    tablet_lcd_init();
    +    //tablet_lcd_init();
    +    omap4_panda_dvi_lcd_init();
     
         omapfb_set_platform_data(&tablet_fb_pdata);
         omap_vram_set_sdram_vram(TABLET_FB_RAM_SIZE, 0);
    -    if (omap_android_display_is_default(&tablet_hdmi_device))
    -        omap_display_init(&tablet_dss_data_hdmi_default_display);
    -    else
    +    //if (omap_android_display_is_default(&tablet_hdmi_device))
    +    //    omap_display_init(&tablet_dss_data_hdmi_default_display);
    +    //else
             omap_display_init(&tablet_dss_data);
     
         tablet_hdmi_init();
     
    -    i2c_register_board_info(2, omap4xx_i2c_bus2_d2l_info,
    -        ARRAY_SIZE(omap4xx_i2c_bus2_d2l_info));
    +    //i2c_register_board_info(2, omap4xx_i2c_bus2_d2l_info,
    +    //    ARRAY_SIZE(omap4xx_i2c_bus2_d2l_info));
     
         return 0;
     }
    diff --git a/arch/arm/mach-omap2/board-44xx-tablet.c b/arch/arm/mach-omap2/board-44xx-tablet.c
    index 05ea021..e3758a7 100644
    --- a/arch/arm/mach-omap2/board-44xx-tablet.c
    +++ b/arch/arm/mach-omap2/board-44xx-tablet.c
    @@ -548,10 +548,10 @@ static struct i2c_board_info __initdata tablet_i2c_boardinfo[] = {
             I2C_BOARD_INFO("cdc_tcxo_driver", 0x6c),
             .platform_data = &tablet_cdc_data,
         },
    -    {
    +    /*{
             I2C_BOARD_INFO("bq24156", 0x6a),
             .platform_data = &tablet_bqdata,
    -    },
    +    },*/
     };
     
     /* TMP102 PCB Temperature sensor close to OMAP
    @@ -681,6 +681,68 @@ static struct omap_board_mux board_mux[] __initdata = {
         OMAP4_MUX(SYS_NIRQ1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP
                         | OMAP_PIN_OFF_WAKEUPENABLE),
     
    +    /* gpio 0 - TFP410 PD */
    +    OMAP4_MUX(KPD_COL1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
    +    /* dispc2_data23 */
    +    OMAP4_MUX(USBB2_ULPITLL_STP, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data22 */
    +    OMAP4_MUX(USBB2_ULPITLL_DIR, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data21 */
    +    OMAP4_MUX(USBB2_ULPITLL_NXT, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data20 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data19 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data18 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data15 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data14 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data13 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data12 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data11 */
    +    OMAP4_MUX(USBB2_ULPITLL_DAT7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data10 */
    +    OMAP4_MUX(DPM_EMU3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data9 */
    +    OMAP4_MUX(DPM_EMU4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data16 */
    +    OMAP4_MUX(DPM_EMU5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data17 */
    +
    +    OMAP4_MUX(DPM_EMU6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_hsync */
    +    OMAP4_MUX(DPM_EMU7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_pclk */
    +    OMAP4_MUX(DPM_EMU8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_vsync */
    +    OMAP4_MUX(DPM_EMU9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_de */
    +
    +    OMAP4_MUX(DPM_EMU10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data8 */
    +    OMAP4_MUX(DPM_EMU11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data7 */
    +    OMAP4_MUX(DPM_EMU12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data6 */
    +    OMAP4_MUX(DPM_EMU13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data5 */
    +    OMAP4_MUX(DPM_EMU14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data4 */
    +    OMAP4_MUX(DPM_EMU15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data3 */
    +    OMAP4_MUX(DPM_EMU16, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data2 */
    +    OMAP4_MUX(DPM_EMU17, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data1 */
    +    OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
    +    /* dispc2_data0 */
    +    OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),     
    +
    +
         /* IO optimization pdpu and offmode settings to reduce leakage */
         OMAP4_MUX(GPMC_A17, OMAP_MUX_MODE3 | OMAP_INPUT_EN),
         OMAP4_MUX(GPMC_NBE1, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
    diff --git a/drivers/video/omap2/displays/panel-generic-dpi.c b/drivers/video/omap2/displays/panel-generic-dpi.c
    index f511f3d..4c02bc4 100644
    --- a/drivers/video/omap2/displays/panel-generic-dpi.c
    +++ b/drivers/video/omap2/displays/panel-generic-dpi.c
    @@ -409,6 +409,27 @@ static struct panel_config generic_dpi_panels[] = {
     
             .name            = "innolux_at080tn52",
         },
    +
    +    /* INNOLUX EJ070NA-01J */
    +    {
    +       {
    +           .x_res            = 1024,
    +           .y_res            = 600,
    +           .pixel_clock        = 40800,
    +           .hsw            = 20, //20,
    +           .hfp            = 45, //1,
    +           .hbp            = 45, //90,
    +           .vsw            = 20, //20,
    +           .vfp            = 5, //12,
    +           .vbp            = 5, //10,
    +       },
    +       .acbi                = 0x0,
    +       .acb                = 0x0,
    +       .config                = OMAP_DSS_LCD_TFT,
    +       .power_on_delay        = 0,
    +       .power_off_delay    = 0,
    +       .name                = "EJ070NA-01J",
    +    },           
     };