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.
Hi, can you provide the step of enable the lvds pixel clock ? We need to use lvds to drive the panel.
Thanks,
Andrew
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
/{ 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>; vsync-len = <8>; vfront-porch = <3>; vback-porch = <9>; }; port@0 { dual-lvds-odd-pixels; lcd_in0: endpoint { remote-endpoint = <&oldi_out0>; }; }; port@1 { dual-lvds-even-pixels; lcd_in1: endpoint { remote-endpoint = <&oldi_out1>; }; }; }; }; }; }; &main_pmx0 { main_oldi0_pins_default: main-oldi0-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */ AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */ AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */ AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */ AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */ AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */ AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */ AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */ AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */ AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */ AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */ AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */ AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */ AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */ AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */ AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */ AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */ AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */ AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */ AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */ >; }; }; &dss { pinctrl-names = "default"; pinctrl-0 = <&main_oldi0_pins_default &main_dss0_pins_default>; status = "okay"; }; &dss_ports { #address-cells = <1>; #size-cells = <0>; /* VP1: LVDS Output (OLDI TX 0) */ port@0 { reg = <0>; oldi_out0: endpoint { remote-endpoint = <&lcd_in0>; }; }; /* VP1: LVDS Output (OLDI TX 1) */ port@2 { reg = <2>; oldi_out1: endpoint { remote-endpoint = <&lcd_in1>; }; }; };
2.add "name_overlay" to uEnv.txt, like this:
# 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 name_overlays=k3-am625-sk.dtb k3-am625-sk-lpmdemo.dtb k3-am625-skeleton.dtb # Reset to the default environment do_psdk_setup=env default -f -a; saveenv # If not previously configured, then configure the environment and indicate this by writing a file uenvcmd=if run check_psdk_setup; then echo "Already setup."; else run do_psdk_setup; mw.b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} .psdk_setup 1; reset; fi
3.And I comment out the backlight part in panel-lvds.c, like this:
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); if (ret != -ENODEV) { if (ret != -EPROBE_DEFER) dev_err(lvds->dev, "failed to request regulator: %d\n", ret); return ret; } lvds->supply = NULL; } /* Get GPIOs and backlight controller. */ lvds->enable_gpio = devm_gpiod_get_optional(lvds->dev, "enable", GPIOD_OUT_LOW); if (IS_ERR(lvds->enable_gpio)) { ret = PTR_ERR(lvds->enable_gpio); dev_err(lvds->dev, "failed to request %s GPIO: %d\n", "enable", ret); return ret; } lvds->reset_gpio = devm_gpiod_get_optional(lvds->dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(lvds->reset_gpio)) { ret = PTR_ERR(lvds->reset_gpio); dev_err(lvds->dev, "failed to request %s GPIO: %d\n", "reset", ret); return ret; } /* * TODO: Handle all power supplies specified in the DT node in a generic * way for panels that don't care about power supply ordering. LVDS * panels that require a specific power sequence will need a dedicated * driver. */ /* Register the panel. */ pr_err("lvds->bus_format=%d \n",lvds->bus_format); pr_err("lvds->width=%d \n",lvds->width); pr_err("lvds->width=%d \n",lvds->height); pr_err("lvds->data_mirror=%d \n",lvds->data_mirror); pr_err("lvds->video_mode->pixelclock=%lu \n",lvds->video_mode.pixelclock); pr_err("lvds->video_mode->hactive=%d \n",lvds->video_mode.hactive); pr_err("lvds->lvds->video_mode->vactive=%d \n",lvds->video_mode.vactive); pr_err("lvds->video_mode->hback-porch=%d \n",lvds->video_mode.hback_porch); pr_err("lvds->video_mode->hfront-porch=%d \n",lvds->video_mode.hfront_porch); pr_err("lvds->video_mode->vback-porch=%d \n",lvds->video_mode.vback_porch); pr_err("lvds->video_mode->vfront-porch=%d \n",lvds->video_mode.vfront_porch); pr_err("lvds->video_mode->hsync-len=%d \n",lvds->video_mode.hsync_len); pr_err("lvds->video_mode->vsync-len=%d \n",lvds->video_mode.vsync_len); drm_panel_init(&lvds->panel, lvds->dev, &panel_lvds_funcs, DRM_MODE_CONNECTOR_LVDS); ret = drm_panel_of_backlight(&lvds->panel); //if (ret) //return ret; drm_panel_add(&lvds->panel); dev_set_drvdata(lvds->dev, lvds); pr_err("### panel_lvds_probe check\n"); return 0; }
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.
terminate called after throwing an instance of 'std::runtime_error' what(): No modesetting DRM card found Aborted (core dumped)
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.
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
# 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 name_overlays=k3-am625-sk-oldi-panel.dtbo # Reset to the default environment do_psdk_setup=env default -f -a; saveenv # If not previously configured, then configure the environment and indicate this by writing a file uenvcmd=if run check_psdk_setup; then echo "Already setup."; else run do_psdk_setup; mw.b ${loadaddr} 0 1; fatwrite mmc 1:1 ${loadaddr} .psdk_setup 1; reset; fi
3. edit k3-am625-sk-oldi-panel.dts like PROCESSOR-SDK-AM62X: LVDS and RGB
// 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"; /* * Note that the OLDI TX 0 transmits the odd set of pixels * while the OLDI TX 1 transmits the even set. This is a * fixed configuration in the IP integration and is not * changeable. The properties, "dual-lvds-odd-pixels" and * "dual-lvds-even-pixels" have been used to merely * identify if a Dual Link configuration is required. * Swapping them will not make any difference. */ port@0 { dual-lvds-odd-pixels; lcd_in0: endpoint { remote-endpoint = <&oldi_out0>; }; }; }; }; }; }; &main_pmx0 { main_oldi0_pins_default: main-oldi0-pins-default { pinctrl-single,pins = < AM62X_IOPAD(0x0260, PIN_OUTPUT, 0) /* (AA5) OLDI0_A0N */ AM62X_IOPAD(0x025c, PIN_OUTPUT, 0) /* (Y6) OLDI0_A0P */ AM62X_IOPAD(0x0268, PIN_OUTPUT, 0) /* (AD3) OLDI0_A1N */ AM62X_IOPAD(0x0264, PIN_OUTPUT, 0) /* (AB4) OLDI0_A1P */ AM62X_IOPAD(0x0270, PIN_OUTPUT, 0) /* (Y8) OLDI0_A2N */ AM62X_IOPAD(0x026c, PIN_OUTPUT, 0) /* (AA8) OLDI0_A2P */ AM62X_IOPAD(0x0278, PIN_OUTPUT, 0) /* (AB6) OLDI0_A3N */ AM62X_IOPAD(0x0274, PIN_OUTPUT, 0) /* (AA7) OLDI0_A3P */ AM62X_IOPAD(0x0280, PIN_OUTPUT, 0) /* (AC6) OLDI0_A4N */ AM62X_IOPAD(0x027c, PIN_OUTPUT, 0) /* (AC5) OLDI0_A4P */ AM62X_IOPAD(0x0288, PIN_OUTPUT, 0) /* (AE5) OLDI0_A5N */ AM62X_IOPAD(0x0284, PIN_OUTPUT, 0) /* (AD6) OLDI0_A5P */ AM62X_IOPAD(0x0290, PIN_OUTPUT, 0) /* (AE6) OLDI0_A6N */ AM62X_IOPAD(0x028c, PIN_OUTPUT, 0) /* (AD7) OLDI0_A6P */ AM62X_IOPAD(0x0298, PIN_OUTPUT, 0) /* (AD8) OLDI0_A7N */ AM62X_IOPAD(0x0294, PIN_OUTPUT, 0) /* (AE7) OLDI0_A7P */ AM62X_IOPAD(0x02a0, PIN_OUTPUT, 0) /* (AD4) OLDI0_CLK0N */ AM62X_IOPAD(0x029c, PIN_OUTPUT, 0) /* (AE3) OLDI0_CLK0P */ AM62X_IOPAD(0x02a8, PIN_OUTPUT, 0) /* (AE4) OLDI0_CLK1N */ AM62X_IOPAD(0x02a4, PIN_OUTPUT, 0) /* (AD5) OLDI0_CLK1P */ >; }; }; &dss { pinctrl-names = "default"; pinctrl-0 = <&main_oldi0_pins_default &main_dss0_pins_default>; }; &dss_ports { #address-cells = <1>; #size-cells = <0>; /* VP1: LVDS Output (OLDI TX 0) */ port@0 { reg = <0>; oldi_out0: endpoint { remote-endpoint = <&lcd_in0>; }; }; }; &main_i2c0 { #address-cells = <1>; #size-cells = <0>; touchscreen@41 { compatible = "ilitek,ili251x"; reg = <0x41>; interrupt-parent = <&exp1>; interrupts = <22 IRQ_TYPE_EDGE_FALLING>; }; };
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
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