System Power States - 2021.2 English

Zynq UltraScale+ MPSoC Software Developer Guide

Document ID
UG1137
Release Date
2021-10-27
Version
2021.2 English

You may request to change the power state of a system or the entire system. The PMU facilitates the switching of the system or sub-system to the new power state.

Shutdown

You may shutdown the APU sub-system with the standard 'shutdown' command.

To shut down the entire system, the user must shut down all the other sub-systems prior to shutting down the APU sub-system. For example, use the following command to power down the PL.

echo pm_release_node 69 > /sys/kernel/debug/zynqmp-firmware/pm

Use this command to power up the PL again:

echo pm_request_node 69 > /sys/kernel/debug/zynqmp-firmware/pm

For information about how to shut down the PL sub-system, see the Libmetal and OpenAMP for Zynq Devices User Guide (UG1186).

Reboot

You can use the reboot command to reset the APU, the PS or the System. By default, the reboot command resets the system. You can change the scope of the reboot command to APU or PS if required. To change the reboot scope to APU:

echo subsystem > /sys/firmware/zynqmp/shutdown_scope

To change the reboot scope to PS:

echo ps_only > /sys/firmware/zynqmp/shutdown_scope

To change the reboot scope to System:

echo system > /sys/firmware/zynqmp/shutdown_scope

The reboot scope is set to System again after the reset.

Suspend

The kernel is suspended when the CPU and most of the peripherals are powered down. The system run states needed to resume from suspend is stored in the DRAM, which is put into self-refresh mode.

Kernel configurations required:

  • Power management options
    • [*] Suspend to RAM and standby
    • [*] User space wakeup sources interface
    • [*] Device power management core functionality
  • Device Drivers
    • SoC (System On Chip) specific Drivers
      • Xilinx® SoC drivers
        • Zynq MPSoC SoC
          • [*] Enable Xilinx Zynq MPSoC Power Management driver
          • [*] Enable Zynq MPSoC generic PM domains
  • Firmware Drivers
    • Zynq MPSoC Firmware Drivers
      • -*- Enable Xilinx Zynq MPSoC firmware interface
Note: Any device can prevent the kernel from suspending.

See also https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate.

To suspend the kernel:

$ echo mem > /sys/power/state

Wake-up Source

The kernel resumes from the suspend mode when a wake-up event occurs. The following wake-up sources can be used:

  • UART

    If enabled as a wake-up source, a UART input will trigger the kernel to resume from the suspend mode.

    Kernel configurations required:

    • Same as Suspend.

    For example, to wake up the APU on UART input:

    $ echo enabled > /sys/devices/platform/amba/ff000000.serial/tty/ttyPS0/power/wakeup
  • RTC

    If enabled as a wake-up source, the kernel will resume from the suspend mode when the RTC timer expires. Note that the RTC wake-up source is enabled by default.

    Kernel configurations required:

    • Same as Suspend.

    For example, to set RTC to wake up the APU after 10 seconds:

    $ echo +10 > /sys/class/rtc/rtc0/wakealarm
  • GPIO

    If enabled as a wake-up source, a GPIO event will trigger the kernel to resume from the suspend mode.

    Kernel configurations required:

    • Device Drivers
      • Input device support, [*]

        Generic input layer (needed for keyboard, mouse, ...) (INPUT [=y]) [*] Keyboards (INPUT_KEYBOARD [=y])

        [*] GPIO Buttons (CONFIG_KEYBOARD_GPIO=y)

        [*] Polled GPIO buttons

    For example, to wake up the APU on the GPIO pin:

    $ echo enabled > /sys/devices/platform/gpio-keys/power/wakeup