Verdin AM623 deep sleep wake up sources

Hi,

in my design, I have the requirement to go in deep sleep mode using the command:

echo mem > /sys/power/state

that should be the deep sleep mode. From this condition I have 4 wake up sources:

  • pin SODIMM 252 - CTRL_WAKE1_MICO : linked to keyboard interrupt
  • pin SODIMM 63 - HDMI_1_CEC - MCU_GPIO0_8 : short circuited to pin SODIMM 252
  • pin SODIMM 246 - CTRL_RECOVERY_MICO : linked to a button
  • pin SODIMM 248 - CTRL_PWR_BTN_MICO : linked to a button

Experimentally I see that :

  • toggle on pin 246 low system wakes up every time
  • toggle on pins 63 / 248 wakes up the system only once
  • toggle on pin 248 does not wakes up the system

What shall I control in the system configuration and device tree overlay configurations to make all those input sources work correctly to wake up the system?

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? :+1: :-1:


To configure multiple wake-up sources for deep sleep mode on your Toradex module, you need to understand the proper wake-up configuration and device tree overlay setup.

Understanding Deep Sleep Mode

For deep sleep mode using echo mem > /sys/power/state, the system enters Suspend-to-RAM (deep) state(1). The default wake-up behavior varies by pin configuration and module type.

Standard Wake-up Pin Configuration

According to the Verdin iMX8M Plus datasheet, pin 252 (CTRL_WAKE1_MICO#) is the standard external wake signal(2):

  • SODIMM 252: CTRL_WAKE1_MICO# - Standard external wake signal
  • i.MX 8MP Function: SAI1_RXFS / GPIO4_IO0
  • This pin is guaranteed to be wake-up compatible with other Verdin modules(2)

Wake-up Source Configuration Requirements

To configure multiple GPIO pins as wake-up sources, you need to create a device tree overlay that:

1. Enable Wake-up Capability for Each Pin

For each wake-up source, you need to configure the GPIO with proper wake-up properties in your device tree overlay(3)(4). The overlay structure should include:

/dts-v1/;
/plugin/;

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

(3)(4)

2. Configure GPIO Properties for Wake-up

Each GPIO used as a wake-up source must be properly configured with:

  • Correct pinmux settings
  • GPIO direction (input for wake-up sources)
  • Wake-up capability enabled
  • Proper interrupt configuration

3. Device Tree Overlay Customization Process

To write your custom device tree overlay(3)(4):

  1. Identify the specific pin functions for your SODIMM pins in the datasheet
  2. Create pinctrl configurations with proper GPIO pinmux definitions(4)
  3. Add wake-up properties to each GPIO node
  4. Configure interrupt settings for edge detection

4. Pin-Specific Considerations

Based on your observations:

  • SODIMM 246 (CTRL_RECOVERY_MICO): Works consistently - this suggests proper wake-up configuration
  • SODIMM 63 and 248: Work only once - indicates potential configuration issues with interrupt clearing or GPIO state management
  • SODIMM 252: Should work as the standard wake-up pin(2)

Recommended Approach

  1. Check existing device tree overlays provided by Toradex for similar wake-up configurations(3)
  2. Create a custom overlay that properly configures all four pins with wake-up capabilities
  3. Ensure proper interrupt handling for each wake-up source
  4. Test wake-up functionality systematically for each pin

Device Tree Overlay Development Resources

For creating and deploying your custom overlay:

The key is ensuring each wake-up GPIO is properly configured with interrupt capabilities and wake-up properties in your device tree overlay, rather than relying on default pin configurations.

Best regards, Toradex AI Assistant.

Hello Andrea,

Quick check, which AM62 board version are you using?
Unfortunately the V1.1 has known issues with sleep, which have been resolved in the 1.2 version

best regards

Maximiliano Zapata
Toradex

Hello,

I am using version 1.2, I am aware about the v1.1 bug related to the deep sleep.

Actually I’m struggling making work the pin 244 as wake up source even if it is in the deep sleep wake up pin list in datasheet. Also, seems like there is a problem in managing the keyboard ISR as wake up source: it works just once, then seems like the ISR is no more triggered (keyboard no more works).

If you have any suggestion on overlay settings or some more bug I need to know about this chip, it’s more than welcome (I have few experience in embedded linux dev, any suggestion is welcome :slight_smile:

Thanks,

Andrea

Hi Andrea,

thanks for the clarification, quick question:

  1. is there are particular reason preventing you from using the CTRL_WAKE1_MICO (PIN 252) for wake up? (which is intended for this purpose - See datasheet page 62).
  2. you mentioned at the beginning of this thread: SODIMM 252 - CTRL_WAKE1_MICO : linked to keyboard interrupt, can this interrupt be moved to a different GPI ?

The pin 252 on the X1 connector is the default wakeup source for the Verdin Family, and only this pin is guaranteed to be wakeup compatible with other Verdin modules. Please use only this pin to wake up the module if the carrier board needs to be compatible with other Verdin modules. (see page 59). While other pin can be used, we would recommend using this one if possible.

Maximiliano Zapata
Toradex