Torizon OS 7 upgrade Overlay

Hi,

I have recently upgraded my iMX8MP from Torizon 6 to Torizon 7. I followed the instructions and also updated the bootloader.

I have an overlay which is used for a mipi display. This was working correctly in Torizon 6 , however, when I have upgraded to Torizon 7 it does not load correctly and the OS roll backs. If I exlcude the overlay the OS loads correctly so the problem is definitely to do with the overlay.

What has changed between the two versions that would cause the difference in behavior?

Any help would be greatly appreciated.

Kind Regards

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/*
 * Copyright 2020-2022 Toradex
 */

// Verdin DSI to HDMI Adapter orderable at Toradex.

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clock/imx8mm-clock.h>
#include <dt-bindings/pwm/pwm.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

/ {
	compatible = "toradex,verdin-imx8mp";
};

// pwm3, channel 0, period 100000 ns (10 kHz), normal polarity
&backlight {
	compatible = "pwm-backlight";
	brightness-levels = <0 100>;
	num-interpolated-steps = <100>;
	default-brightness-level = <80>;
      
    power-supply = <&reg_3p3v>;  
    pwms = <&pwm3 0 100000 0>;
	status = "okay";
};

&i2c2 {
    #address-cells = <1>;
	#size-cells = <0>;
	status = "okay";
	
	touch@41 {
		compatible = "ilitek,ili251x";
		reg = <0x41>;
		/* Verdin DSI_1_INT# (TOUCH_INT#, SODIMM 17) */
		interrupt-parent = <&gpio4>;
		interrupts = <25 IRQ_TYPE_EDGE_RISING>;
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_gpio_9_dsi>, <&pinctrl_i2s_2_bclk_touch_reset>;
		/* Verdin I2S_2_BCLK (TOUCH_RESET#, SODIMM 42) */
		reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
	};  
};

&pwm3{
	status = "okay";
};

&hdmi_connector {
    status = "disabled";
};

&gpu_2d {
	status = "okay";
};

&gpu_3d {
	status = "okay";
};

/* LCDIF to MIPI-DSI */
&lcdif1 {
	status = "okay";
};

&mipi_dsi{
	status = "okay";	
	panel@0 {
        compatible = "YTC550,v1";
        backlight = <&backlight>;
        reg = <0>;		
		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
		dsi-lanes = <4>;
		status = "okay";
	};
};

/* Verdin I2C_2_DSI */
&i2c2 {
	/* Lower frequency to avoid DDC/EDID issues with certain displays/screens. */
	clock-frequency = <10000>;
	status = "okay";
};

&mix_gpu_ml {
	status = "okay";
};

&ml_vipsi {
	status = "okay";
};

&panel_lvds {
    status = "disabled";
};

&vpu_g1 {
	status = "okay";
};

&vpu_g2 {
	status = "okay";
};

&vpu_vc8000e {
	status = "okay";
};

&vpu_v4l2 {
	status = "okay";
};

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Device Tree Overlay Issues After Torizon OS 6 to 7 Upgrade

When upgrading from Torizon OS 6 to 7, there are several potential causes for device tree overlay issues that could trigger automatic rollbacks (1).

Common Causes of Overlay Failures

The automatic rollback you’re experiencing indicates that the system failed to boot successfully after applying your overlay (1). Torizon OS considers a boot successful only when the boot-complete systemd target is executed successfully, which includes critical services like the Docker daemon (1).

Bootloader Compatibility Requirements

Since you mentioned updating the bootloader, ensure you followed the correct sequence for major OS upgrades (2):

  1. Upgrade to latest Torizon OS 6.x.y version first
  2. Update bootloader to appropriate version for 6→7 transition
  3. Then upgrade to Torizon OS 7.x.y

For Verdin iMX8MP, the bootloader package version for OS major upgrade from 6.x.y → 7.x.y should be 2024.07-7.1.0+git.3f772959501c-r4 (2).

Device Tree Overlay Troubleshooting Steps

1. Verify Overlay Compatibility

Use TorizonCore Builder to check if your overlay is compatible with the new device tree (3):

$ torizoncore-builder dto list --device-tree ./linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-dev.dts

(3)

2. Update Device Tree Sources

Clone the updated device tree repository for Torizon OS 7 (3):

$ torizoncore-builder dt checkout

(3)

3. Test Overlay Application

Apply your overlay using TorizonCore Builder’s standalone approach (3):

$ torizoncore-builder images unpack <your-torizon-7-image>
$ torizoncore-builder dt apply <path-to-base-device-tree>
$ torizoncore-builder dto apply <path-to-your-overlay>

(3)

Potential Issues in Your Overlay

Looking at your overlay code, potential compatibility issues between Torizon OS 6 and 7 could include:

  • GPIO pin assignments or configurations
  • Clock reference changes
  • Display subsystem modifications
  • Power supply reference updates

Recommended Next Steps

  1. Check system logs to identify the specific failure point before rollback
  2. Validate your overlay against the Torizon OS 7 device tree sources (3)
  3. Test incrementally by applying parts of your overlay to isolate the problematic section
  4. Use TorizonCore Builder’s build approach with a configuration file for production deployment (3)

The automatic rollback feature is designed to protect your system (1), so the overlay failure is being caught before it can cause permanent issues.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Greetings @DAH,

If I try to apply your overlay as is with TorizonCore Builder against Torizon OS 7.4.0 it fails with the following:

Compiling Device Tree with DTC 1.6.0...
The device tree was compiled with warnings. To view them, run the command again with debug log level enabled (torizoncore-builder --log-level debug <command>).
Please note that some warnings can come from .dtsi files included in the device tree source e.g. from the SoC vendor.
The warnings don't necessarily indicate a breaking issue with the device tree.
'test.dts' compiles successfully.

Failed to apply '/tmp/tmptequakv9': FDT_ERR_NOTFOUND

error: cannot apply device tree overlays ['/tmp/tmptequakv9'] against device tree /storage/sysroot/ostree/deploy/torizon/deploy/95ec6c36a6b5ec0ee9b2f8038c9ea5eed262087f4e6f42b923225d68d40a8c51.0/usr/lib/modules/6.6.101-7.4.0-g557af2783d91/dtb/imx8mp-verdin-wifi-dev.dtb.
error: overlay 'test.dts' is not applicable.

So there is definitely some incompatibility between your overlay and the device tree used in Torizon OS 7.

Looking at your overlay I believe the issue is the following nodes:

&hdmi_connector {
    status = "disabled";
};
...
&panel_lvds {
    status = "disabled";
};

These nodes do not exist in the device tree for Verdin i.MX8MP on Torizon OS 7: Making sure you're not a bot!

However, these nodes did exist in the device tree back in Torizon OS 6: Making sure you're not a bot!

So that’s probably the issue. Once I commented-out/removed these nodes from the overlay, then I could successfully apply the overlay with TorizonCore Builder. I didn’t test further to see if the overlay behaved as expected since I assume this overlay relies on your hardware setup.

Best Regards,
Jeremias

Hello @DAH !

Were you able to apply the overlay successfully and boot the system as expected?

Please let me know if this resolved the issue or if you’re still seeing unexpected behavior.

Hi Joao,

Sorry for the delay in getting back to you.

Yes, I managed to get the overlay working correctly. Thank you for all your help.

Kind Regards

Glad to hear it works for you now. Happy we were able to help you here.

Best Regards,
Jeremias