Same Image with different dtb

Hello Community,

I am working with Apalis iMX8 in dunfell version. My primary applications is LCD displays where we will use different types of LCDs. Each LCD has it’s own characteristics like frequency, dimming frequency and resolution. So i want to build same image all these LCDs with different dtb for each LCD panel with it’s specification. What is the procedure to do that and how can i choose the dtb for specific LCD panel.

Thank You.
Muthyam D.

Hi @Muthyam,

I believe you can use device tree overlay for different timings for different different display. Please check below link

Best Regards
Ritesh Kumar

Hello @ritesh.tx ,
I have written a overlay as

Custum_Overlay_Apalis_IMX8.dts (277 Bytes) (the intended functionality of overlay is to change default brightness as 2) ,and converted it into dtbo using
dtc -@ -I dts -O dtb -o Custum_Overlay_Apalis_IMX8.dtbo Custum_Overlay_Apalis_IMX8.dts .
Then i got following .dtbo file
Custum_Overlay_Apalis_IMX8.dtbo (285 Bytes)
I copied this into /boot/overlays/ and in overlays.txt file i appended this .dtbo file. Then i rebooted the system. In boot data it is showing as
Applying Overlay: Custum_Overlay_Apalis_IMX8.dtbo
285 bytes read in 42 ms (5.9 KiB/s)
overlay_boot.txt (39.4 KB)

But when i check the brightness level it is unaltered.
Where i am doing wrong, Help me with this.
Thank You,
Muthyam D.

Hi @Muthyam,
There is no need to modify device tree to change the brightness.
You can update the value of brightness at /sys/class/backlight/backlight/brightness.
Please refer to this article for more detail.

Hello @sahil.tx ,

My intention is to apply overlay, primarily for different LCD display types(i.e include LCD parameters and frequencies). We have to deal with different types of LCD displays which have different dimensions. So for that each LCD display i have to create each overlay.

Before that i want to have clear understanding of overlay, i took brightness as an example for better understanding of overlay.

So now you help me with this. What i am doing wrong here.

Thank You,
Muthyam D.

Hi @Muthyam ,
There is no need to do device tree modification for brightness.
I understand you point that you want to test whether lcd settings can be applied via overlays or not.
The easiest way is to change the display resolution (Cx and Cy) in the overlays according to your display settings and test. There are already pre-built overlays available, you can test with that as well.

Hello @sahil.tx,

I wanted to discuss my requirement regarding LCD displays with you. As I mentioned earlier, my primary application involves using different types of LCDs, each with its own unique characteristics such as frequency, dimming frequency, and resolution. Instead of building a new image for each LCD type, I’m exploring the option of using overlays.

My idea is to create overlays for specific LCDs, where I can include the properties related to that particular display. This way, I can choose the appropriate overlay based on the available LCD display while using the same base image.

I followed the instructions provided in the Toradex documentation on device tree overlays to create a test overlay. In this test overlay, I included brightness-related settings. However, despite the overlay being applied during boot, it doesn’t seem to have any effect on the actual brightness value.

As I’m new to the concept of overlays, I would appreciate your guidance on where I might be going wrong and how I can ensure that the overlay settings are properly applied.

Thank you for your assistance.

Best regards,
Muthyam D.

Hello @sahil.tx , @ritesh.tx
Waiting for your response,
Ideally i want have overlay like
Custum_Overlay_Apalis_IMX8.dts (707 Bytes)
which is for applying different panel-timings and backlight pwm configurations. The above overlay i created and compiled into dtbo. I copied that dtbo to /boot/overlays/ folder in the final image, and applied that by adding that in overlay.txt file.
I observed that during booting that overlay is applied, but when i am reading the panel-timings overlay has no effect on that (in that overlay i rewritten the panel-timings).

Where i am doing wrong, guide me.

thanks ,
Muthyam D.

Hi @Muthyam,

Please use the below additional steps to change the brightness using overlays(BSP 5.7).

  1. vi /lib/systemd/system/systemd-backlight@.service
  2. Edit to below parameter as
    DefaultDependencies=yes
  3. reboot the system and use overlays to change the brightness levels.
    eg. &backlight {
    default-brightness-level=<1>;
    status = “okay”;
    };

Hello @sahil.tx ,
I want to overlay for different panel timings and dimming frequency. Not to change brightness levels. Cause i am new to this overlay concept, i took brightness changing using overlay as a practice. Ideally i want that to apply different panel-timings like resolution and frequency.
I know i can change brightness after login in path, /sys/class/backlight/backlight/brightness .

Similarly i can’t change the panel-timings after login, for that either i have to entire image with different panel-timings i want or take one common image and build an overlays with different panel-timings as per my need. And apply them based on requirement during boot time.

But creation of an overlay has some problem, I have created an overlay and applied, but that does not shows any difference in actual panel-timings.

for better understanding

panel_lvds: panel-lvds {
	compatible = "panel-lvds";
	backlight = <&backlight>;
            status = "okay";
            data-mapping = "vesa-24";
	width-mm = <919>;
        height-mm = <139>;
	primary;
	panel-timing {
			clock-frequency = <148500000>;
			hactive = <1920>;
			vactive = <1080>;
			hback-porch = <60>;
			hfront-porch = <60>;
			vback-porch = <20>;
			vfront-porch = <20>;
			hsync-len = <20>;
			vsync-len = <5>;
			hsync-active = <0>;
			vsync-active = <0>;
			de-active = <1>;
			pixelclk-active = <0>;
	       };


	port {
		panel_lvds_in: endpoint {
			remote-endpoint = <&lvds1_out>;
		};
	};
};

in the above nodes, i want to rewrite the width-mm, height-mm, hactive, vactive and clock-frequency. i want to achieve that using a overlay.

Hope you understood the requirement.

Thanks & Regards,
Muthyam D.

Hi @Muthyam ,
How you are testing that the timings used in the overlays are not getting applied?

Hello @sahil.tx ,
to check those values, after login i am checking fbset , Usually it will give resolution details.
like this
root@apalis-imx8-14727753:~# fbset

mode “1920x1080”
geometry 1920 1080 1920 1080 16
timings 0 0 0 0 0 0 0
accel true
rgba 5/11,6/5,5/0,0/0
endmode

Thanks ,
Muthyam D.