Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Logic PD support staff and engineers participate, Logic PD does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Logic PD engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Logic PD product download, please subscribe to the TDG Forum of interest.

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 21 Nov 2017 03:14 PM by  Malati Chavva
LCD display driver
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages

Malati Chavva



New Member


Posts:6
New Member


--
30 Oct 2017 12:45 PM

    I am trying to add a custom LCD on Torpedo DX3730 based platform. I added previously in panel-omap3logic.c, board-omap3logic.c and board-omap3logic-display.c files in 3.x based BSP. Now I am using the logicPD’s main stream linux and wanted to add the same panel. Can you suggest me which files in 4.4.x to be modified for the same changes.

    Thanks a lot

    Malati


    Adam Ford



    Advanced Member


    Posts:754
    Advanced Member


    --
    30 Oct 2017 01:27 PM
    If you're using the latest edition of our 4.4.y kernel, the file you'll want to edit is arch/arm/boot/dts/logicpd-torpedo-37xx-devkit.dts

    There is a section that shows the display timings of the LCD.

    The document that describes these timings is located: Documentation/devicetree/bindings/display/panel/display-timing.txt

    Let me know if you have any questions

    adam

    Malati Chavva



    New Member


    Posts:6
    New Member


    --
    30 Oct 2017 05:27 PM
    Thanks Adam.
    I did make the changes to /logicpd-torpedo-37xx-devkit.dts and added the new panel-timings. This is needs a reset pulse using GPIO155 The gpio isactive high. It needs to be low for 20msec, so that the LCD panel can reset itself and work fine. The panel-dpi.c driver does not read the enable gpio pin even though it is added in the device tree file. What is it I am missing.

    aliases {
    display0 = &lcd0;
    };

    video_reg: video_reg {
    compatible = "regulator-fixed";
    regulator-name = "lcd-supply";
    regulator-min-microvolt = <3300000>;
    regulator-max-microvolt = <3300000>;
    };

    lcd0: display {
    pinctrl-names = "default";
    pinctrl-0 = <&panel_pwr_pins>;
    compatible = "panel-dpi";
    label = "test-lcd";
    status = "okay";
    /* default-on; */
    enable_gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd INI */

    port {
    lcd_in: endpoint {
    remote-endpoint = <&dpi_out>;
    };
    };

    panel-timing {
    clock-frequency = <5596500>;
    hactive = <240>;
    vactive = <320>;
    hfront-porch = <40>;
    hback-porch = <6>;
    hsync-len = <1>;
    vback-porch = <2>;
    vfront-porch = <2>;
    vsync-len = <1>;
    hsync-active = <0>;
    vsync-active = <0>;
    de-active = <1>;
    pixelclk-active = <0>;
    };
    };

    Thanks a ton in advance.

    Adam Ford



    Advanced Member


    Posts:754
    Advanced Member


    --
    31 Oct 2017 08:28 AM
    The panel-dpi driver is located at drivers/video/fbdev/omap2/displays-new/panel-dpi.c

    Look in function: static int panel_dpi_enable(struct omap_dss_device *dssdev)

    My suggestion would be to try to force the enable pin low for some amount of time:

    If you're using the patched version we released against 4.4.76, you should see there is a function called msleep that we're calling.

    I would suggest if you need the enable pin forced low,

    I would try inserting:

    if (ddata->enable_gpio)
    gpiod_set_value_cansleep(ddata->enable_gpio, 0);
    msleep(20);

    Just before:

    if (ddata->enable_gpio)
    gpiod_set_value_cansleep(ddata->enable_gpio, 1);


    If you don't have the 4.4.76 set of patches, they are available from: http://support.logicpd.com/DesktopM...tryId=3053

    Adam Ford



    Advanced Member


    Posts:754
    Advanced Member


    --
    31 Oct 2017 01:53 PM
    If you're having issues with the the code not showing pr_info, make sure you have ignore_loglevel set in our kernel args. YOu might also check dmesg to see if those messages are there. They may not always appear real-time.

    panel_dpi_probe_of(struct platform_device *pdev) reads the GPIO pins. You could attempt there to force the GPIO pin low. The probe function is run to determine what hardware is in the device tree.

    Malati Chavva



    New Member


    Posts:6
    New Member


    --
    21 Nov 2017 03:14 PM
    It is resolved. However the panel-dpi.c never reads the reset gpio from device tree. I am controlling the reset gpio manually from /sys/class/gpio
    You are not authorized to post a reply.