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.

How can I enable the dpi interface of OMAP5432EVM

Hi,

I want enable the dpi interface of OMAP5432EVM, and I use a LVDS83B to transfer the dpi signals to LVDS signals. The dpi signals is multiplexed with other signals, so I add some codes in /android-3.4/arch/arm/mach-omap2/board-omap5panda.c,

        OMAP5_MUX(MCSPI2_CS0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA15, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA14, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA13, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA12, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA11, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA10, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA9, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA8, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA7, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA6, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA5, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA4, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA3, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA2, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_DATA0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_WE, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_CS0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_A0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_RE, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_HSYNC0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(RFBI_TE_VSYNC0, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_182, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_183, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_184, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_185, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_186, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),
        OMAP5_MUX(GPIO6_187, OMAP_PIN_OUTPUT | OMAP_MUX_MODE3),

But when I "cat /sys/kernel/debug/omap_mux/board/core" on the omap5432evm, it seems that the above codes do not word. How can the codes take effect, and what else should I do to use the dpi interface?

Thanks.

Best regards,

Shuhua

  • Hi Shuhua,

    Did you check if you have CONFIG_OMAP_MUX defined

    and also why did you add OMAP_PIN_OUTPUT to every mux config( it is set by default as out)

    Regards,

    Boyko

  • Hi, Boyko

    Thanks for the reply.

    The CONFIG_OMAP_MUX is defined at include/generated/autoconf.h:#define CONFIG_OMAP_MUX 1, and I removed OMAP_PIN_OUTPUT, but I still found that

    OMAP5_MUX(RFBI_DATA0, OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE7)

    ........

    at shell@android:/sys/kernel/debug/omap_mux/board when I use adb tool.

    It seems they are configed at some where else, but I did not find where.

    Best regards,

    Shuhua

  • Hi Shuhua,
    Did you made any other changes to the mux config or the board file, check if you call omap5_mux_init and also what mux structure are you applying to it?

    Regards,
    Boyko
  • Hi,Boyko

    I did not make any other changes to the mux config and the board file, and the omap5_mux_init is called, there are following informations in the boot information:

    [    0.179626] omap_mux_init: Add partition: #1: core, flags: 4
    [    0.180358] omap_mux_init: Add partition: #2: wkup, flags: 4

    and the omap_mux_init function is called by the omap5_mux_init.

    I used the default mux structure: omap_mux, and I used the structure omap_board_mux to change the mux modes.

    And I found another problem, when I changed the printf message of the following line code in the mux.c:

            pr_info("%s: Add partition test: #%d: %s, flags: %x\n", __func__,
                    mux_partitions_cnt, partition->name, partition->flags);

    the message did not change. So it is possible that the changed codes were not compiled into the new kernel, or the new kernel was not flashed into the OMAP5432 board.

    I followed the steps of Panda5AJ.1.5 Release Notes(http://omapedia.org/wiki/Panda5AJ.1.5_Release_Notes#Building_Kernel) to build the kernel and flash the emmc images firstly, and I followed the next steps to build the kernel and prepare eMMC binaries/images when I changed some codes:

    Building Kernel:

    cd ${YOUR_PATH}/kernel/android-3.4
    export CROSS_COMPILE=${MYDROID}/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-

    make ARCH=arm android_omap_defconfig
    make ARCH=arm uImage modules

    Building Android Filesystem (AFS):

    cd $MYDROID
    . build/envsetup.sh
    lunch 25  #(specific lunch target: full_omap5panda-userdebug)
    make -j2

    Preparing eMMC binaries/images:

    cd $YOUR_PATH
    mkdir emmc_files
    cp -v ${MYDROID}/out/target/product/panda5/*img emmc_files
    cp -v ${MYDROID}/device/ti/omap5sevm/boot/fastboot.sh emmc_files
    cp -v ${MYDROID}/out/host/linux-x86/bin/{simg2img,make_ext4fs,mkbootimg,fastboot,adb} emmc_files
    cp -v ${YOUR_PATH}/kernel/android-3.4/arch/arm/boot/zImage emmc_files/kernel
    cp -v ${YOUR_PATH}/usbboot/out/omap5uevm/omap5uevm_GP_ES2.0_MLO emmc_files
    cp -v ${YOUR_PATH}/usbboot/out/omap5uevm/usbboot emmc_files

    Are these steps correct?

    And when I followed the flashing eMMC images steps,  the following information comes out which is different from the Panda5AJ.1.5 Release Notes:

    I am really appreciate with any suggestions.

    Best regards,

    Shuhua

  • Hi Shuhua,

    Why don't you try making a prototype pinmux function for DPI

    as this one for the DSI ( https://gitorious.org/linux-omap-dss2/archit-dss2-clone/commit/177ad7ab50e55fa695b7291857727ab0b08d7bfe ) ( ignoring the ID and other irrelevant lines for the DPI)

    Regards,

    Boyko

  • Hi, Boyko

    Thanks for your reply.

    I will try to make a prototype pinmux function for DPI as you say.

    But I have a more urgent problem about the flashing eMMC images. I changed some codes of the kernel, I compiled the kernel again and I flashed it into the omap5432eVM, but nothing changed. I followed the steps of Panda5AJ.1.5 Release Notes such as I  I pointed out last time, could you point out what's wrong with my steps in the working.

    Best regards,

    Shuhua

  • Hi Shuhua,

    This is one way to replace the recompiled kernel

    cd /omap5/5AJ.1.5.1/kernel/android-3.4
    make -j4 ARCH=arm CROSS_COMPILE=arm-eabi- uImage modules
    sudo cp -v /omap5/5AJ.1.5.1/kernel/android-3.4/arch/arm/boot/zImage /omap5/5AJ.1.5.1/emmc_files/zImage
    cd /omap5/5AJ.1.5.1/emmc_files
    ./mkbootimg --kernel zImage --ramdisk initrd.img --cmdline "no_console_suspend=1 console=ttyO2,115200n8 androidboot.console=ttyO2 omap_wdt.timer_margin=30 vmalloc=496M omapfb.fb_opt=-1,-1,-1,1,1920,1080 console=ttyO2,115200n8 mem=1024M androidboot.console=ttyO2 vram=20M omapfb.vram=0:16M earlyprintk loglevel=4" --base 0x80000000 --output robot.boot.img

    sudo ./usbboot -f
    sleep 2
    sudo ./fastboot flash boot robot.boot.img

    Regards,

    Boyko

  • Hi Boyko,

    Thanks a lot, it works.

    I flashed the recompiled kernel into the board, and I set the dpi signals into correct mux modes, but the screen also has no signals.

    The display system of Panda5AJ.1.5 have fram buffers, managers, displays, overlays, what's  the relation of them and how can I integrate them to implement the DPI display interface?

    Best regards,

    Shuhua

  • Hi Shuhua,

    The kernel you are using have all you need reconfigured. Now you have to check you build and include the dpi driver.

    check also if you  use the node for the  required lcd  in the  struct omap5evm_dss_devices.

    Regards,

    Boyko

  • Hi Shuhua,

    Did you set correct omap_dss_device.clocks ??
    As my experience, clocks source was important.

    Did you try to use version of 5aj1.5.1?
    5AJ1.5.1 can support DPI panel, 5aj1.5 only for DSI and 5AJ1.5 need to patch some code to support DPI panel.

    If you are using 5aj1.5, these code patch will needed.


    (1)drviers/video/omap2/dss/dss.h
    void dss_set_dpi_channel(int channel);
    (2)drviers/video/omap2/dss/dss.c

    void dss_set_dpi_channel(int channel)
    {
    REG_FLD_MOD(DSS_CONTROL, channel, 17, 16);
    }

    (3)/drviers/video/omap2/dss/dpi.c

    static void dpi_basic_init(struct omap_dss_device *dssdev)
    {
    bool is_tft;

    is_tft = (dssdev->panel.config & OMAP_DSS_LCD_TFT) != 0;

    dispc_mgr_set_io_pad_mode(DSS_IO_PAD_MODE_BYPASS);
    dispc_mgr_enable_stallmode(dssdev->manager->id, false);

    dispc_mgr_set_lcd_display_type(dssdev->manager->id, is_tft ?
    OMAP_DSS_LCD_DISPLAY_TFT : OMAP_DSS_LCD_DISPLAY_STN);
    dispc_mgr_set_tft_data_lines(dssdev->manager->id,
    dssdev->phy.dpi.data_lines);

    dss_set_dpi_channel(dssdev->channel);  

    }



  • Hi, yi-chia lan

    Thanks for your replay.

    I will try to add the code patch you mentioned.

    Where did not find the 5aj1.5.1? I just find 5aj1.5.

    Best regards,

    Shuhua

  • Hi Shuhua,

    http://www.omappedia.com/wiki/Panda5AJ.1.5.1_Release_Notes

    Regards,

    Boyko

  • Hi, Boyko,

    Thanks a lot.

    I will try to use this release.

    Best regards,

    Shuhua