SNVS/RTC-only mode

Hi Team,

I am working with a Colibri iMX6ULL module on a custom carrier board (Linux version 6.1.142-6.8.3-devel+git.7e69c33e4858 and TDX Wayland with XWayland Upstream 6.8.3-devel-20251008131148+build.0 (kirkstone)). I need assistance with the correct procedure and configuration to properly power off the module and maintain the Real-Time Clock (RTC) and Secure Non-Volatile Storage (SNVS) registers.

My current setup includes the following:

  • The carrier board generates 3.3V from a 5V input.

  • This 3.3V is connected via a Schottky diode to a 1F supercapacitor, which is then connected to the VCC_BAT (Pin 40) of the Colibri module.

The problem I am experiencing is that when I power off the module—either via a software command (poweroff, shutdown) or by directly disconnecting the main power source—the supercapacitor discharges very quickly (in a couple of minutes). This suggests the module is not entering the expected RTC-only or SNVS power-off mode and is instead drawing a high current (likely hundreds of mA) instead of the expected low uA range.

I would like to know the correct and officially supported method to power off the module and ensure it enters the lowest power consumption state (SNVS/RTC-only mode) to keep the RTC and SNVS registers alive.

Specifically, I need guidance on the following:

  1. Correct Power-Off Procedure: What is the recommended userspace command or signal sequence to transition the module into the lowest-power SNVS mode?

  2. Kernel/Device Tree Configuration: What specific kernel configurations and Device Tree settings (.dts) are required to correctly enable and utilize the SNVS domain and put the module into this low-power state?

  3. SNVS Register Access: My goal is to store a power-off timestamp in one of the 32-bit Low Power General Purpose Registers (LPGPRs) within the SNVS domain. Upon the next boot, I need to be able to access this register for logging purposes. Can you provide information or examples on how to correctly write and read these LPGPRs from Linux userspace or the kernel?

Thank you for your time and assistance with this configuration.

Sincerely,

Román

Hi, I’m the Toradex AI Assistant.

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


Based on the Toradex documentation, I’ll address your power management questions for the Colibri iMX6ULL module:

Power Management States Overview

The Colibri iMX6ULL supports several power states (1). The relevant states for your application are:

  • RTC Only: All power rails are removed except VCC_BATT, keeping only the RTC running (1)
  • Shut Down: Software-initiated shutdown where all ‘On’ module rails are switched ‘Off’, but the carrier board still provides 3V3 and VCC_BATT (1)

VCC_BATT Circuit Design

Your supercapacitor setup with the Schottky diode is on the right track. The Colibri iMX6ULL includes an internal power rail switch (2). When the module is powered up, the VCC_BATT rail is connected to the 3.3V rail through this switch (2).

Important SNVS Pin Considerations

The SNVS pins are powered from the VCC_BATT rail and include (3):

Critical Note: Any load on SNVS pins will draw current from the VCC_BATT rail (1). To prevent higher current draw, ensure SNVS pins with any attached load are set to 0 before entering the “RTC Only” state (1).

GPIO Power-Off Configuration

For complete system power-off using GPIO, you need to enable the GPIO power-off driver (4). The kernel configuration CONFIG_POWER_RESET_GPIO must be set (4).

Here’s the device tree configuration example for iMX8X (similar principle applies to iMX6ULL) (4):

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

(4)

Power Consumption Analysis

The RTC on the Colibri iMX6ULL is not designed for ultra-low power consumption (1). The documentation specifically mentions that a standard lithium coin cell battery can drain faster than required for certain designs (1).

Recommendations:

  1. External RTC Option: Consider using an external ultra-low power RTC IC on your carrier board instead (1)
  2. VCC_BATT Connection: If RTC feature is not required, connect pin 40 directly to the main 3.3V rail (3)
  3. SNVS Pin Management: Minimize loads on SNVS pins and set them to 0 before entering low-power states (1)

Power-Off Procedures

Software Power-Off

The standard Linux commands (poweroff, shutdown) will put the module into “Shut Down” state where the software initiates the shutdown (1). In this state, the system can be reactivated by pressing the reset button or by removing and reapplying the 3V3 main supply voltage rail (1).

Hardware Considerations

Your carrier board design should follow the VCC_BATT recommendations in the Colibri Design Guide to ensure compatibility (2). The documentation recommends keeping the same circuit on the carrier board for VCC_BATT as recommended in the Colibri Design Guide (2).

Current Draw Investigation

If your supercapacitor is discharging in minutes rather than the expected low μA range, this suggests the module is not entering the proper low-power state. Check:

  1. Ensure no peripherals on your carrier board are backfeeding power to SNVS pins
  2. Verify that SNVS pins are properly configured as outputs set to 0 before power-down
  3. Consider the inherent power consumption characteristics of the iMX6ULL’s integrated RTC

Unfortunately, the available documentation doesn’t provide specific details about LPGPR register access from userspace. For detailed kernel configuration and SNVS register programming examples, you may need to consult additional Toradex BSP documentation or consider using an external RTC solution for ultra-low power applications.

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.

How is the correct way to set the SNVS pin Managment to 0? Also, I found this definitions in the imx6ul.dtsi:
snvs: snvs@20cc000 {
compatible = “fsl,sec-v4.0-mon”, “syscon”, “simple-mfd”;
reg = <0x020cc000 0x4000>;

		snvs_rtc: snvs-rtc-lp {
			compatible = "fsl,sec-v4.0-mon-rtc-lp";
			regmap = <&snvs>;
			offset = <0x34>;
			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
				     <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
		};

		snvs_poweroff: snvs-poweroff {
			compatible = "syscon-poweroff";
			regmap = <&snvs>;
			offset = <0x38>;
			value = <0x60>;
			mask = <0x60>;
			status = "disabled";
		};

		snvs_pwrkey: snvs-powerkey {
			compatible = "fsl,sec-v4.0-pwrkey";
			regmap = <&snvs>;
			interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
			linux,keycode = <KEY_POWER>;
			wakeup-source;
			status = "disabled";
		};

		snvs_lpgpr: snvs-lpgpr {
			compatible = "fsl,imx6ul-snvs-lpgpr";
		};
	};

How do I have to define in my-carrier.dtsi to overwrite and configure the snvs pins and the detection of the voltage supervisor? Do I have to use gpio-keys, gpio-poweroff or snvs_pwrkey?

Hi @roman.dm!

Have you tested the low power mode described in this article? If not, please give it a try and see if it meets your expectations.

To wake the module, you can use the RTC wakealarm, a GPIO, or a UART as described in the article I shared.

Best regards.

Hi Lucas,

In this moment I´ve defined my-carrier.dtsi like this:

/ {

/delete-node/ gpio-keys;

power_interrupt: power-interrupt {
	compatible = "gpio-keys";
	pinctrl-names = "default";
	//pinctrl-names = "default", "sleep";
	pinctrl-0 = <&pinctrl_power_int>;
	//pinctrl-1 = <&pinctrl_power_int_sleep>;
	status = "okay";
 	label = "Power supervisor";

	power_supervisor_key {
		gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;//SODIMM 99 signal is high -> low
		linux,code = <KEY_POWER>;		
   		wakeup-source;				
		debounce-interval = <50>;
	};
};
];

and:

&iomuxc {
	pinctrl_power_int: powerintgrp {
         	fsl,pins = <
             		MX6UL_PAD_JTAG_TCK__GPIO1_IO14 		0x170b0  
         	>;
     	};
};

The GPIO-keys node has been deleted because I am using SODIMM 45 as a GPIO for other purposes. Therefore, I set SODIMM 99 as an input for the reset output of a voltage supervisor. Right now, it is disconnected from the voltage supervisor, and I am manually testing the pin behavior. When I set the pin low, the module turns off:
root@colibri-imx6ull-07138346:~# Stopping Session c1 of User root…
[ OK ] Removed slice Slice /system/modprobe.
[ OK ] Stopped target Multi-User System.
[ OK ] Stopped target Login Prompts.
[ OK ] Stopped target RPC Port Mapper.
[ OK ] Stopped target Timer Units.
[ OK ] Stopped Daily Cleanup of Temporary Directories.
[ OK ] Stopped target Hardware activated USB gadget.
[ OK ] Closed Load/Save RF Kill Switch Status /dev/rfkill Watch.
Stopping The Apache HTTP Server…
Stopping Avahi mDNS/DNS-SD Stack…
Stopping Kernel Logging Service…
Stopping System Logging Service…
Stopping NTP client/server…
Stopping Getty on tty1…
Stopping IIO Daemon…
Stopping Telephony service…
Stopping Serial Getty on ttymxc0…
Stopping Load/Save Random Seed…
Stopping Target Communication Framework agent…
Stopping Timestamping service…
[ OK ] Stopped Kernel Logging Service.
[ OK ] Stopped System Logging Service.
[ OK ] Stopped Telephony service.
[ OK ] Stopped NTP client/server.
[ OK ] Stopped Avahi mDNS/DNS-SD Stack.
[ OK ] Stopped Getty on tty1.
[ OK ] Stopped Serial Getty on ttymxc0.
[ OK ] Stopped Target Communication Framework agent.
[ OK ] Stopped Load/Save Random Seed.
[ OK ] Stopped Timestamping service.
[ OK ] Stopped Session c1 of User root.
[ OK ] Stopped The Apache HTTP Server.
[ OK ] Stopped IIO Daemon.
[ OK ] Removed slice Slice /system/getty.
[ OK ] Removed slice Slice /system/serial-getty.
[ OK ] Stopped target Host and Network Name Lookups.
Stopping User Login Management…
Stopping User Manager for UID 0…
[ OK ] Stopped User Manager for UID 0.
Stopping User Runtime Directory /run/user/0…
[ OK ] Stopped User Login Management.
[ OK ] Unmounted /run/user/0.
[ OK ] Stopped User Runtime Directory /run/user/0.
[ OK ] Removed slice User Slice of UID 0.
Stopping D-Bus System Message Bus…
Stopping Permit User Sessions…
[ OK ] Stopped D-Bus System Message Bus.
[ OK ] Stopped Permit User Sessions.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Network.
[ OK ] Stopped target Path Units.
[ OK ] Stopped Dispatch Password тІts to Console Directory Watch.
[ OK ] Stopped Forward Password RтІuests to Wall Directory Watch.
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped target Slice Units.
[ OK ] Removed slice User and Session Slice.
[ OK ] Stopped target Socket Units.
[ OK ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[ OK ] Closed D-Bus System Message Bus Socket.
[ OK ] Closed dropbear.socket.
[ OK ] Stopped target System Initialization.
[ OK ] Closed Syslog Socket.
Stopping Network Name Resolution…
Stopping Record System Boot/Shutdown in UTMP…
[ OK ] Stopped Network Name Resolution.
[ OK ] Stopped Record System Boot/Shutdown in UTMP.
Stopping Network Configuration…
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped target Local File Systems.
Unmounting Temporary Directory /tmp…
Unmounting /var/volatile…
[ OK ] Stopped Network Configuration.
[ OK ] Unmounted Temporary Directory /tmp.
[ OK ] Unmounted /var/volatile.
[ OK ] Stopped target Preparation for Local File Systems.
[ OK ] Stopped target Preparation for Network.
[ OK ] Stopped target Swaps.
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Closed Network Service Netlink Socket.
[ OK ] Stopped Remount Root and Kernel File Systems.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Reached target System Shutdown.
[ OK ] Reached target Late Shutdown Services.
[ OK ] Finished System Power Off.
[ OK ] Reached target System Power Off.
[ 73.795949] systemd-shutdown[1]: Syncing filesystems and block devices.
[ 73.813096] systemd-shutdown[1]: Sending SIGTERM to remaining processes…
[ 73.839064] systemd-journald[150]: Received SIGTERM from PID 1 (systemd-shutdow).
[ 73.909636] systemd-shutdown[1]: Sending SIGKILL to remaining processes…
[ 73.954643] systemd-shutdown[1]: Unmounting file systems.
[ 73.986356] (sd-remount)[628]: Remounting ‘/’ read-only with options ‘assert=read-only,ubi=0,vol=2’.
[ 74.012844] UBIFS (ubi0:2): background thread “ubifs_bgt0_2” stops
[ 74.021842] systemd-shutdown[1]: All filesystems unmounted.
[ 74.027502] systemd-shutdown[1]: Deactivating swaps.
[ 74.032876] systemd-shutdown[1]: All swaps deactivated.
[ 74.038166] systemd-shutdown[1]: Detaching loop devices.
[ 74.053748] systemd-shutdown[1]: All loop devices detached.
[ 74.059832] systemd-shutdown[1]: Stopping MD devices.
[ 74.065652] systemd-shutdown[1]: All MD devices stopped.
[ 74.071371] systemd-shutdown[1]: Detaching DM devices.
[ 74.077238] systemd-shutdown[1]: All DM devices detached.
[ 74.082885] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[ 74.097914] systemd-shutdown[1]: Syncing filesystems and block devices.
[ 74.106840] systemd-shutdown[1]: Powering off.
[ 74.139885] ci_hdrc ci_hdrc.1: remove, state 4
[ 74.144399] usb usb1: USB disconnect, device number 1
[ 74.150820] ci_hdrc ci_hdrc.1: USB bus 1 deregistered
[ 74.158759] reboot: Power down

When the module is powered down, I turn off my carrier as well, and the supercapacitor connected to VCC_BAT discharges in a couple of minutes. Therefore, I assume that the module is not setting the SNVS/RTC-only mode. How can I achieve this? When I turn on my carrier again, the Colibri does not turn on. When the 3V3 rails are re-energized, does the SODIMM 99 have to set the pull-up again and consequently wake up the module?