Hi folks,
I am working with a Verdin imx8mp SOM + Dahlia carrier board and created a Buildroot configuration to build a Linux image for this hardware.
The device tree I am using is the imx8mp-verdin-wifi-dahlia.
I have already successfully created overlays to wake up the Linux from Suspend to RAM when a given GPIO is pressed or to interface with an external LCD.
Now I need an overlay that will make PWM2 keep running even when the system goes into Suspend to RAM mode.
Can you please help me with that?
Thank you.
Hi, I’m the Toradex AI Assistant.
I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?

Hello! Thank you for your detailed explanation of your setup and requirements.
You’re correct that device tree overlays allow you to modify hardware configuration at boot time. When it comes to keeping PWM2 running during Suspend to RAM (often referred to as “suspend”), the behavior is typically governed by both device tree configuration and kernel driver support for suspend/resume.
General Guidance
-
Device Tree Overlay Creation:
You can create an overlay to modify the status or power-domains of the PWM2 node, but there is no standard device tree property that directly tells the PWM controller to stay active during system suspend.
-
Check Power Domains:
Make sure the power domain of PWM2 (usually part of the “AUDIO”, “DISPLAY” or “PERIPHERAL” power domains) remains powered during suspend. This can sometimes be influenced by the device tree, like so:
&pwm2 {
power-domains = <&some_pwrdn>;
status = "okay";
};
You’ll need to verify the correct power domain for PWM2 on the iMX8M Plus.
-
Modify the ‘wakeup-source’ property (not always relevant to keep PWM running, but useful for wakeup purposes):
&pwm2 {
wakeup-source;
};
This can allow the device to be a source of wake-up, but does not itself keep the device active.
-
Kernel Driver Limitations:
Even if you modify the device tree, the behavior during suspend is often determined by the kernel driver implementation for the PWM. Most drivers suspend PWM output during system suspend. You may need to modify the kernel driver if you want the PWM to keep running during suspend, as the current driver might disable clocks to save power.
Example Overlay Snippet
Here’s a sample overlay you might start with (edit names as per your source tree):
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target = <&pwm2>;
__overlay__ {
status = "okay";
// power-domains = <&some_pwrdn>; // Set this as appropriate
// wakeup-source;
};
};
};
But please be aware, this alone may not be sufficient to keep PWM2 running during Suspend to RAM.
Further Steps
- Check the
imx8mp.dtsi and imx8mp-verdin-wifi-dahlia.dts to confirm the correct node for PWM2.
- Review the NXP/Freescale PWM driver (
drivers/pwm/pwm-imx.c) for suspend/resume handling.
- Consult Device Tree Overview for more examples on overlays and device tree manipulation.
If you require the PWM to keep running for a critical use-case (e.g., maintaining a fan or backlight), and software approaches (device tree, power domain settings) do not suffice, you may need to prevent the system from entering full Suspend to RAM, or customize the Linux kernel driver to not suspend the PWM.
Let me know if you need help identifying the PWM2 node or further assistance with overlays!
Best regards,
Toradex AI Assistant.
I am not sure of which power domain to use on the overlay above.
Couldn’t find anything related on the .c file mentioned.
Any other suggestions?
Hi @rodring10 , when the system goes into suspend mode, LPCG will shut down clock source for PWM2 to save power. If you would like to keep PWM2 output when A53 cores are in suspend mode, M7 core on iMX8MP can be used to manipulate PWM2.
Hi @benjamin.tx ,
Thank you very much for your answer.
I came to the same conclusion and now am assessing if getting that driven by the Cortex-M core, which seems a bit of an overkill, or we solve it by changing the hardware a bit.
Anyway, thanks again.
Regards