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.

PROCESSOR-SDK-AM62X: PROCESSOR-SDK-AM62X: How to enable lvds pixel clock?

Part Number: PROCESSOR-SDK-AM62X

Hi, can you provide the step of enable the lvds pixel clock ? We need to use lvds to drive the panel.

Thanks,

Andrew

  • Hi Andrew,

    What OS do you use on AM62x?

  • Hi Bin Liu,
    Thanks for you reply.
    I use Arago. (SDK: dr-download.ti.com/.../tisdk-default-image-am62xx-evm.wic.xz)

  • Currently I have made the following changes:

    1. add this to k3-am62x-sk-common.dtsi

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    /{
    fragment@101 {
    target-path = "/";
    __overlay__ {
    display {
    status = "okay";
    compatible = "panel-lvds";
    width-mm = <223>;
    height-mm = <125>;
    data-mapping = "jeida-24";
    panel-timing {
    clock-frequency = <43750000>;
    hactive = <1024>;
    vactive = <600>;
    hsync-len = <54>;
    hfront-porch = <21>;
    hback-porch = <77>;
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    2.add "name_overlay" to uEnv.txt, like this:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # This uEnv.txt file can contain additional environment settings that you
    # want to set in U-Boot at boot time. This can be simple variables such
    # as the serverip or custom variables. The format of this file is:
    # variable=value
    # NOTE: This file will be evaluated after the bootcmd is run and the
    # bootcmd must be set to load this file if it exists (this is the
    # default on all newer U-Boot images. This also means that some
    # variables such as bootdelay cannot be changed by this file since
    # it is not evaluated until the bootcmd is run.
    # The environment is saved to eMMC, but we wish that a newly created SD card
    # will boot without any manual configuration. To do this we will reset the
    # environment upon the first boot, and then create a file in the boot partition
    # of the SD card to mark when the first-time setup has been done.
    psdk_setup_file=.psdk_setup
    check_psdk_setup=load mmc 1:1 ${loadaddr} ${psdk_setup_file}
    # Unfortunately, the following will be erased before it can be invoked
    # (See below in "uenvcmd")
    #mark_psdk_setup=mw .b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} ${psdk_setup_file} 1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    3.And I comment out the backlight part in panel-lvds.c, like this:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    static int panel_lvds_probe(struct platform_device *pdev)
    {
    struct panel_lvds *lvds;
    int ret;
    pr_err("##### [panel_lvds_probe] #######\n");
    lvds = devm_kzalloc(&pdev->dev, sizeof(*lvds), GFP_KERNEL);
    if (!lvds)
    return -ENOMEM;
    lvds->dev = &pdev->dev;
    ret = panel_lvds_parse_dt(lvds);
    if (ret < 0)
    return ret;
    lvds->supply = devm_regulator_get_optional(lvds->dev, "power");
    if (IS_ERR(lvds->supply)) {
    ret = PTR_ERR(lvds->supply);
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I can see the "### panel_lvds_probe check\n" on putty, so panel_lvds_probe can run to final line.

    However, the pixel clock cannot be measured on lvds pins CH1_LVDS_CLKP and CH1_LVDS_CLKN.

    Please tell me what I did wrong or didn't do, thanks.

  • Hi Krunal:

    I change sdk version to 08.06.00.42

    And tried following steps:

    (1) add "name_overlays=k3-am625-sk-oldi-panel.dtbo" to uEnv.txt

    (2) run these 2 cmds:

          root@am62xx-evm:~#/etc/init.d/weston stop

          root@am62xx-evm:~#kmstest

    I get following error.

    Fullscreen
    1
    2
    3
    terminate called after throwing an instance of 'std::runtime_error'
    what(): No modesetting DRM card found
    Aborted (core dumped)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Our EVK board does not have the HDMI IC part on it.

    Because the kmstest is not successful, the LVDS pixel clock cannot be measured.

    Please help us analyze the reason.

  • Hi Andrew,

    I am routing your query to our Linux  expert for comments.

  • Hi Bin Liu,

    Sorry I got your name wrong.

    Thanks for your reply.

    Andrew 

  • Hello Andrew,

    1. Are you using TI SK EVM or custom board?

    2. I don't understand your overlay command and this does not look correct: name_overlays=k3-am625-sk.dtb k3-am625-sk-lpmdemo.dtb k3-am625-skeleton.dtb 

    3. In general, with our EVM and our TI SDK, here are the steps needed:

    1.https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am625-sk-oldi-panel.dts?h=ti-linux-5.10.y <-------- DTS entry
    2. https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/gpu/drm/panel/panel-simple.c?h=ti-linux-5.10.y#n2821 <----- Timing defined here
    3. In Uboot, add command "name_overlays=k3-am625-sk-oldi-panel.dtbo"

    4. I would recommend you to try the above commands on our SK EVM and run the same kmstest command.

    Regards,
    Krunal

  • Kruanl, 

    It is on customer board with GP device. 

    There is no HDMI transmitter on customer board. 

    Will this cause problem on overlay commend or Kmstest?  

    "No modesetting DRM card found" --> What does this mean? 

    BR, Rich

  • Hi Rich, 

    That command basically means the DSS driver could not initialize any display cards. I am guessing the LVDS probe failed and it cannot find any display cards.

    Regards,
    Krunal

  • Hi Kruanl,

    Thanks for your reply.

    Here are our current steps:

    1. Use ti-processor-sdk-linux-am62xx-evm-08.06.00.42-Linux-x86-Install.bin and tisdk-default-image-am62xx-evm.wic.xz (version 08.06.00.42)

    2. Add name_overlays=k3-am625-sk-oldi-panel.dtbo in uEnv.txt

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    # This uEnv.txt file can contain additional environment settings that you
    # want to set in U-Boot at boot time. This can be simple variables such
    # as the serverip or custom variables. The format of this file is:
    # variable=value
    # NOTE: This file will be evaluated after the bootcmd is run and the
    # bootcmd must be set to load this file if it exists (this is the
    # default on all newer U-Boot images. This also means that some
    # variables such as bootdelay cannot be changed by this file since
    # it is not evaluated until the bootcmd is run.
    # The environment is saved to eMMC, but we wish that a newly created SD card
    # will boot without any manual configuration. To do this we will reset the
    # environment upon the first boot, and then create a file in the boot partition
    # of the SD card to mark when the first-time setup has been done.
    psdk_setup_file=.psdk_setup
    check_psdk_setup=load mmc 1:1 ${loadaddr} ${psdk_setup_file}
    # Unfortunately, the following will be erased before it can be invoked
    # (See below in "uenvcmd")
    #mark_psdk_setup=mw .b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} ${psdk_setup_file} 1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    3. edit k3-am625-sk-oldi-panel.dts like PROCESSOR-SDK-AM62X: LVDS and RGB

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    // SPDX-License-Identifier: GPL-2.0
    /**
    * Microtips integrated OLDI panel and touch DT overlay for AM625 - SK
    *
    * Copyright (C) 2021 Texas Instruments Incorporated - http://www.ti.com/
    */
    /dts-v1/;
    /plugin/;
    #include <dt-bindings/pinctrl/k3.h>
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    / {
    fragment@101 {
    target-path = "/";
    __overlay__ {
    display {
    compatible = "microtips,13-101hieb0hf0-s";
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    4. sudo make linux

    5. copy k3-am625-sk-oldi-panel.dtbo to /media/Andrew/root/boot

    6. root@am62xx-evm:~#/etc/init.d/weston stop

    7. root@am62xx-evm:~#kmstest

    8. get error message "No modesetting DRM card found"

    Thanks,

    Andrew

  • Thanks to Krunal, Bin Liu and Rich for helping us during this time, now we can get pixel clock.

    Thanks,

    Andrew

  • Krunal, 

    We have confirmed the error message is caused due to HDMI transmitter is not presented and it work as EVM does after HDMI transmitter is populated in customer board. (Customer reserves it but will not use for MP).

    We know root cause now but we need a way to workaround it. 

    Please provide instruction on how to skip or disable VP2 output (a patch will be preferred) to benifit other customers. 

    BR, Rich 

  • Hi Rich,

    I am a little confused by your above findings. Here are my follow up questions:

    1. Based on your above message, are you saying it's a HW problem and HDMI transmitter needs to be populated? If yes, I have worked with customers who just have LVDS on their custom board and it works fine for them. I am not sure why it is a problem with your custom design. 

    2. If it's a SW problem, have you tried to disable the HDMI on SK EVM? If no, trying disabling the HDMI node from DTS and LVDS should still enumerate. I am pretty confident that you do not need to enable both VP1 and VP2 simultaneously and they can be used independently.  

    In summary, I still do not understand the problem and don't understand why a patch is required.

    Regards,
    Krunal

  • Krunal, 

    Yes, that's what we thought at beginning and we don't think HDMI transmitter will be required and we can disable or skip the VP2 in DTS. The reality is we have difficulty to complete this and need an instruction or patch for this. We fail to do and find no way to skip it. That's why you see the error message. 

    BR, Rich 

  • Hi Rich,

    Even on AM62 SK EVM, you couldn't disable VP2 and you see the error?

    Regards,
    Krunal

  • Hi Krunal, 
    Can you remove the HDMI IC on the AM62x GP  board and check the LVDS pixel clock appear?

  • Hi Albert,

    We have customers who do not go into production with the HDMI IC and they only use LVDS and they have not reported a similar issue. On our board, I can try to disable the HDMI chip in SW and see if LVDS still works. I will report to you by tomorrow. 

    Regards,
    Krunal

  • Hi Albert,

    On the 8.06 release, I deleted the HDMI node from the DTS and only had the LVDS node. After making the change, I was still able to boot the LVDS panel. I also connected a HDMI monitor but nothing showed up on the screen because the HDMI IC was not initiated by the SW. I have also attached a file that shows what I deleted from the DTS file.

    Based on the above test, it is very clear that the SW does not care if HDMI IC is present or not and LVDS will still work.

    Regards,
    Krunal

    no_hdmi_test.patch

  • Hi Krunal,

    Thanks for your patch.

    Albert is my colleague, We have successfully driven lvds after using the patch you provided.

    The previous situation happened when the HDMI IC was not installed on the HW, and the SW did not disable the HDMI IC.

    Thanks,

    Andrew