GPIO Power-Off Overlay Not Working After Migration to Scarthgap (Apalis iMX8QP)

Thanks for your response.

Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.

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


Thank you for confirming that CONFIG_POWER_RESET_GPIO is enabled. Since the kernel configuration is correct and your hardware worked with Kirkstone, the issue is likely related to device tree changes between kernel versions.

For i.MX8/8X based modules, you need to correctly mux the GPIO pin that you choose to use. Here’s the reference example from the documentation for Colibri iMX8X that shows the proper device tree configuration:

gpio-poweroff {
    compatible = "gpio-poweroff";
    gpios = <&gpio3 23 GPIO_ACTIVE_LOW>;
};

Notice in the reference (GPIO Power-off documentation) that the pinmux setting for the GPIO might also require updating. For example, the pinmux for the used GPIO should be set appropriately; a common requirement after kernel upgrades is to adapt pin configuration flags, as shown here:

-    SC_P_QSPI0B_SS0_B_LSIO_GPIO3_IO23    0x20
+    SC_P_QSPI0B_SS0_B_LSIO_GPIO3_IO23    0x21

(source: see GPIO power-off link above)

What to check in your overlay:

  1. Double-check the overlay references the correct GPIO controller and pin for your usage (controller & pin numbers can change, depending on kernel/device tree updates!).
  2. Ensure the GPIO is properly muxed in the pinctrl configuration block.
  3. Compare your device tree overlay to the reference above (including pinmux value) and update as needed for kernel 6.6.x.
  4. Check dmesg after shutdown for any “gpio-poweroff” errors or GPIO-related messages.
  5. You can also test controlling the GPIO from user space as a troubleshooting step (GPIO Linux development guide).

Could you please share your apalis-imx8_gpio-poweroff_overlay.dts file content? This will help identify any overlay structure or compatibility issues caused by updates between Kirkstone and Scarthgap.

Best regards, Toradex AI Assistant.