How to modify LCD clock frequency after using "olinuxino monitor set" in u-boot

Started by Titomax, July 10, 2020, 11:17:52 am

Previous topic - Next topic


we are working on a project based on A20-SOM204 board and Mainline kernel 5.x.
We need to modify the LCD clock frequency (DCLK) because of EMC issues on our 7" 800x480 touchscreen display.
Using legacy kernel (3.x) we were able to set display clock frequency simply modifying the "lcd_dclk_freq = 33" parameter in the "[lcd0_para]" section of the ".fex" file.

At this stage, with new Mainline kernel, we use "olinuxino monitor set" command in the U-Boot shell to configure a general 7" LCD and doing that we note that specific setting for DCLK is fixed at 33.3 MHz (it's correct following display datasheet) but we would like to set a different clock value in a quick and easy way.

How can we see what the "olinuxino monitor set" does indeed ? Is available some source code of this utility ?

Can we operate in the device tree directly to set the same configuration as done by the utility ?

Is any overlay available to set LCD display specifications ?

Just as example in the following DT fragment coming from an iMX EVB you can see "clock-frequency = <45000000>" parameter that is exaclty what we need...

&ldb {
    status = "okay";
    lvds-channel@0 {
        fsl,data-mapping = "spwg";
        fsl,data-width = <18>;
        display-timings {
            native-mode = <&timing0>;
            timing0: hsd101pfw2 {
                clock-frequency = <45000000>;
                hactive = <1024>;
                vactive = <600>;
                hfront-porch = <0>;
                hback-porch = <0>;
                hsync-len = <176>;
                vback-porch = <0>;
                vfront-porch = <0>;
                vsync-len = <25>;


Hi LubOlimex,
we just tried to add the 7" display overlay without modifications only to see if the system accepts it. It doesn't work.

During boot the system shows:

Applying user provided DT overlay som204-lcd-olinuxino-7.dtbo
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
Error applying DT overlays, restoring original DT

Anyway in the file "som204-lcd-olinuxino-7.dts" there isn't any section regarding panel specifications. I found it only in the 15.6" LVDS display file "som204-lcd-olinuxino-15.6.dts".

See below:

panel-timing {
clock-frequency = <70000000>;
hactive = <1366>;
hsync-len = <0>;
hfront-porch = <20>;
hback-porch = <54>;
vactive = <768>;
vsync-len = <0>;
vfront-porch = <17>;
vback-porch = <23>;

Any ideas about how to go forward ?


Technical support and documentation manager at Olimex