Verdin AM623 - custom management of CTRL_SLEEP_MOCI

Hi,

I am working on the Verdin AM623 board, and the carrier board is designed in a way that expects to have the pin CTRL_SLEEP_MOCI go to output low value when the system is set in any low power condition.

In my test, with default configuration, I see that when I send the command:

echo freeze > /sys/power/state

I observe with oscilloscope that the pin goes from 1.8V to 1.4V, so is not going fixed low but seems to stay like an input open drain state.

How can I fix or modify the standard behavior as required? Maybe I need to set up a device overlay in my project? How to do it?

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:


CTRL_SLEEP_MOCI# Configuration for Verdin AM62

The behavior you’re observing with CTRL_SLEEP_MOCI# going to 1.4V instead of a solid low (0V) during sleep indicates the pin is not being properly driven low by the system. According to the Verdin family specification, CTRL_SLEEP_MOCI# should be driven low during sleep modes to turn off carrier board peripherals (1)(2).

Understanding CTRL_SLEEP_MOCI# Behavior

The CTRL_SLEEP_MOCI# signal is designed to be high during running mode and low during sleep mode (1). This signal enables power rails on the carrier board peripherals that need to be turned off during sleep mode (2).

Device Tree Configuration Solution

Based on the community discussion for similar Verdin modules, you need to create a device tree overlay to properly configure the CTRL_SLEEP_MOCI# pin. Here’s the approach:

1. Create a Device Tree Overlay

Create a device tree overlay file (e.g., ctrl-sleep-moci-fix.dts) with the following structure:

/dts-v1/;
/plugin/;

#include <dt-bindings/gpio/gpio.h>

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

&reg_force_sleep_moci {
    status = "disabled";
};

&{/} {
    carrier_pwr_enable: carrier_pwr_enable {
        compatible = "gpio-leds";
        
        peripheral_power_en {
            label = "carrier-peripheral-power-enable";
            gpios = <&gpio4 29 0>;
            linux,default-trigger = "default-on";
            default-state = "on";
        };
    };
};

(3)

2. Alternative Regulator Approach

You can also try modifying the regulator configuration by removing the regulator-always-on property:

reg_force_sleep_moci: regulator-force-sleep-moci {
    compatible = "regulator-fixed";
    enable-active-high;
    gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>;
    regulator-name = "CTRL_SLEEP_MOCI#";
    /* Remove regulator-always-on to allow sleep control */
};

(3)

Pin Configuration for Verdin AM62

For the Verdin AM62, you need to identify the correct GPIO and pin configuration. Looking at the Verdin AM62 datasheet, the CTRL_SLEEP_MOCI# signal is available on the X1 connector (4). You’ll need to check the specific GPIO mapping for your AM62 module.

Implementation Steps

  1. Create the overlay file with the appropriate GPIO configuration for AM62
  2. Compile the overlay using the device tree compiler
  3. Apply the overlay during boot or runtime
  4. Test the behavior using echo freeze > /sys/power/state

Key Points

  • The pin should be configured as a GPIO output under kernel control (3)
  • Remove any regulator-always-on properties that prevent sleep control (3)
  • The gpio-leds driver approach has proven effective for similar Verdin modules (3)
  • Ensure the GPIO number and controller match your specific AM62 configuration

The voltage drop to 1.4V you’re seeing suggests the pin is floating rather than being actively driven low. The device tree overlay approach should resolve this by ensuring proper GPIO control during power state transitions.

Best regards, Toradex AI Assistant.

1 Like

the management using a dedicated overlay file is resolutive, now the pin is set low correctly in sleep mode.

1 Like