TISCI PM Low Power Mode API Documentation

Note

This document is applicable to AM62x, AM62Ax and AM62Px devices.

Introduction

This document describes the TISCI API for entering different low power modes supported by the SOC.

Supported low power modes

TISCI_MSG_VALUE_SLEEP_MODE_DEEP_SLEEP          0x0U

Sleep mode in which complete SOC except the wakeup domain is turned off.

TISCI_MSG_VALUE_SLEEP_MODE_MCU_ONLY          0x1U

Sleep mode in which complete SOC except the wakeup and MCU domain is turned off.

TISCI_MSG_VALUE_SLEEP_MODE_IO_ONLY_PLUS_DDR          0x2U

Sleep mode in which complete SOC except the DDR memory and CAN IOs is turned off.

TISCI_MSG_VALUE_SLEEP_MODE_PARTIAL_IO          0x3U

Sleep mode in which complete SOC except the CAN IOs is turned off.

TISCI_MSG_VALUE_SLEEP_MODE_STANDBY          0x4U

Sleep mode in which software is in low power mode but the hardware remains on.

Low power mode Supported by
DEEP_SLEEP am62x, am62ax, am62px
MCU_ONLY am62x, am62ax, am62px
IO_ONLY_PLUS_DDR None
PARTIAL_IO am62x, am62ax, am62px
STANDBY None

Intermediate mode values

TISCI_MSG_VALUE_SLEEP_MODE_DM_MANAGED          0xFDU

Value passed to request device manager for low power mode selection.

TISCI_MSG_VALUE_SLEEP_MODE_NOT_SELECTED          0xFEU

Value returned if device manager has not yet selected the low power mode.

TISCI_MSG_VALUE_SLEEP_MODE_INVALID          0xFFU

Value returned if low power mode entered is invalid.

Macros Used in this Document

TISCI_MSG_VALUE_IO_ENABLE          1U

Used by TISCI_MSG_SET_IO_ISOLATION to enable IO isolation

TISCI_MSG_VALUE_IO_DISABLE          0U

Used by TISCI_MSG_SET_IO_ISOLATION to disable IO isolation

TISCI_MSG_VALUE_HOST_STATE_ON          1U

Used by TISCI_MSG_GET_NEXT_HOST_STATE to return remote core’s state as on

TISCI_MSG_VALUE_HOST_STATE_OFF          0U

Used by TISCI_MSG_GET_NEXT_HOST_STATE to return remote core’s state as off

TISCI_MSG_VALUE_HOST_STATE_INVALID          0xFFU

Used by TISCI_MSG_GET_NEXT_HOST_STATE to return remote core’s state as invalid

TISCI_MSG_VALUE_STATE_SET          1U

Used by set and get constraints APIs to set/get constraint for device/latency

TISCI_MSG_VALUE_STATE_CLEAR          0U

Used by set and get constraints APIs to clear/get constraint for device/latency

TISCI_MSG_VALUE_LPM_WAKE_PIN_INVALID          0xFFU

Used by TISCI_MSG_LPM_WAKE_REASON to return wake pin number as invalid

TISCI_MSG_PREPARE_SLEEP

Objective

Prepare the SOC for entering into a low power mode.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_PREPARE_SLEEP          (0x0300U)

Message Data Structures

struct tisci_msg_prepare_sleep_req

Request for TISCI_MSG_PREPARE_SLEEP.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
mode u8 Low power mode to enter.
ctx_lo u32 Low 32-bits of physical pointer to address to use for context save.
ctx_hi u32 High 32-bits of physical pointer to address to use for context save.
debug_flags u32 Flags that can be set to halt the sequence during suspend or resume to allow JTAG connection and debug.

This message is used as the first step of entering a low power mode. It allows configurable information, including which state to enter to be easily shared from the application, as this is a non-secure message and therefore can be sent by anyone. Notes: Mode is defined as one of TISCI_MSG_VALUE_SLEEP_MODE_x macros. Mode parameter should be equal to partial IO low power mode for partial IO mode entry. In this mode, ctx_lo and ctx_hi are unused. There is no requirement of “carve out” in DDR. Mode parameter should be equal to intermediate value “DM managed” if mode selection logic has to be applied. In this case, ctx_lo and ctx_hi are reserved for internal use (DM application should allocate “carve out” for LPM) For mode value not equal to “DM managed” or partial IO, ctx_lo and ctx_hi should be a reserved memory region as decided on by the HLOS. This region should be a carve out in DDR and valid for use with DMA. Otherwise there are no constraints on this memory. An encrypted blob will be placed here and only a valid blob can be decrypted and authenticated, which eliminates risk of tampering.

struct tisci_msg_prepare_sleep_resp

Response for TISCI_MSG_PREPARE_SLEEP.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

TISCI_MSG_ENTER_SLEEP

Objective

Enter into a low power mode.

Note

Before calling the TISCI_MSG_ENTER_SLEEP, TISCI_MSG_PREPARE_SLEEP should be called to prepare for the low power mode.

Usage

Message Type Normal
Secure Queue Only? Yes

TISCI Message ID

TISCI_MSG_ENTER_SLEEP          (0x0301U)

Message Data Structures

struct tisci_msg_enter_sleep_req

Request for TISCI_MSG_ENTER_SLEEP.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
mode u8 Low power mode to enter.
proc_id u8 Processor id to be used for restoring boot vector and debug status upon resume.
core_resume_lo u32 Low 32-bits of physical pointer to address for core to begin execution upon resume.
core_resume_hi u32 High 32-bits of physical pointer to address for core to begin execution upon resume.

This message is to be sent after TISCI_MSG_PREPARE_SLEEP and actually triggers entry into the previously selected low power mode.

struct tisci_msg_enter_sleep_resp

Response for TISCI_MSG_ENTER_SLEEP.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
status u32 Value that gives information about what happened during LPM cycle.

TISCI_MSG_LPM_WAKE_REASON

Objective

Get the last entered low power mode, wake up source and pin (if applicable) that woke the soc.

Wake up sources

Wake Up Source Source ID
WKUP_I2C0 0x00
WKUP_UART0 0x10
MCU_GPIO0 0x20
WKUP_ICEMELTER0 0x30
WKUP_TIMER0 0x40
WKUP_TIMER1 0x41
WKUP_RTC0 0x50
RESET 0x60
USB0 0x70
USB1 0x71
MAIN_IO 0x80
MCU_IO 0x81
CAN_IO 0x82
MCU_IPC 0x90
INVALID 0xFF

Wake up pin

Refer to the Pad Configuration PADCONFIG Registers in Registers chapter in the TRM to get information about pad number.

Note

In case of wakeup event on multiple pins simultaneously/concurrently, the smaller padcfg number will be returned.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_WAKE_REASON          (0x0306U)

Message Data Structures

struct tisci_msg_lpm_wake_reason_req

Request for TISCI_MSG_LPM_WAKE_REASON.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

This message is used to query the wake up source from low power mode.

struct tisci_msg_lpm_wake_reason_resp

Response for TISCI_MSG_LPM_WAKE_REASON.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
wake_source u32 The wake up source that woke soc from LPM.
wake_timestamp u64 Timestamp at which soc woke.
wake_pin u8 The pin that has triggered wake up.
mode u8 The last entered low power mode.
rsvd_0 u32 Reserved for future use.
rsvd_1 u32 Reserved for future use.

TISCI_MSG_SET_IO_ISOLATION

Objective

Enable and disable IO isolation

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_SET_IO_ISOLATION          (0x0307U)

Message Data Structures

struct tisci_msg_set_io_isolation_req

Request for TISCI_MSG_SET_IO_ISOLATION.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
state u8 The desired state of the IO isolation.

This message is used to enable/disable IO isolation for low power modes.

struct tisci_msg_set_io_isolation_resp

Response for TISCI_MSG_SET_IO_ISOLATION.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

TISCI_MSG_MIN_CONTEXT_RESTORE

Objective

Restore the minimal context saved during lpm entry.

Note

This message is registered only if IO Plus DDR low power mode exit is detected from MMR read.

Usage

Message Type Normal
Secure Queue Only? Yes

TISCI Message ID

TISCI_MSG_MIN_CONTEXT_RESTORE          (0x0308U)

Message Data Structures

struct tisci_msg_min_context_restore_req

Request for TISCI_MSG_MIN_CONTEXT_RESTORE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
ctx_lo u32 Low 32-bits of physical pointer to address to use for context restore.
ctx_hi u32 High 32-bits of physical pointer to address to use for context restore.

This message is sent from R5 SPL to TIFS to indicate that DDR is active and TIFS can restore the minimal context from the address provided in the ctx_lo and ctx_hi parameters. This response assumes DDR has been fully restored by R5 SPL before it is sent.

struct tisci_msg_min_context_restore_resp

Response for TISCI_MSG_MIN_CONTEXT_RESTORE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

This response is sent from the TIFS to the R5 SPL to indicate that now standard firmware can be executed. This response is sent after DDR firewalls have been fully restored by TIFS.

TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT

Objective

Any device can set a constraint on the low power mode that the SoC can enter.

Note

By setting a constraint, the device ensures that it will not be powered off or reset in the selected mode. Setting constraint on a device does not ensure that the device will be functional in the selected low power mode. Exception: Setting constraint on DDR ensures that DDR will be functional in the selected low power mode. All constraints will be auto cleared at every resume cycle.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT          (0x0309U)

Message Data Structures

struct tisci_msg_lpm_set_device_constraint_req

Request for TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
id u32 Device ID of device on which constraint has to be set/cleared.
state u8 The desired state of constraint: set or clear.
rsvd_0 u32 Reserved for future use.
rsvd_1 u32 Reserved for future use.

This message is used by host to set constraint on a device. This can be sent anytime after boot before prepare sleep message and after current low power mode is exited. Any device can set a constraint on the low power mode that the SoC can enter. It allows configurable information to be easily shared from the application, as this is a non-secure message and therefore can be sent by anyone. By setting a constraint, the device ensures that it will not be powered off or reset in the selected mode. Notes: Access Restriction: Exclusivity flag of Device will be honored for setting constraint. If some other host has exclusive rights on this device, NAK will be returned. Clearing of constraints can be done irrespective of exclusivity.

struct tisci_msg_lpm_set_device_constraint_resp

Response for TISCI_MSG_LPM_SET_DEVICE_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT

Objective

Any host can set a constraint on the low power mode that the SoC can enter.

Latency Table

Low power mode Minimum (ms) Maximum (ms)
DEEP_SLEEP 101 X
MCU_ONLY 10 100

Note

By setting a wakeup latency constraint, the host ensures that the resume time from selected low power mode will be less than the constraint value. For deepest low power mode, there is no upper limit (maximum value) for latency. All constraints will be auto cleared at every resume cycle.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT          (0x030AU)

Message Data Structures

struct tisci_msg_lpm_set_latency_constraint_req

Request for TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
resume_latency u16 The maximum acceptable latency to wake up from low power mode in milliseconds. The deeper the state, the higher the latency.
state u8 The desired state of constraint: set or clear.
rsvd u32 Reserved for future use.

This message is used by host to set latency for waking up from low power mode. This can be sent anytime after boot before prepare sleep message and after current low power mode is exited. Any host can set a constraint on the low power mode that the SoC can enter. It allows configurable information to be easily shared from the application, as this is a non-secure message and therefore can be sent by anyone. By setting a wakeup latency constraint, the host ensures that the resume time from selected low power mode will be less than the constraint value.

struct tisci_msg_lpm_set_latency_constraint_resp

Response for TISCI_MSG_LPM_SET_LATENCY_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

TISCI_MSG_LPM_GET_DEVICE_CONSTRAINT

Objective

Get the constraints set by a host on a device.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_GET_DEVICE_CONSTRAINT          (0x030BU)

Message Data Structures

struct tisci_msg_lpm_get_device_constraint_req

Request for TISCI_MSG_LPM_GET_DEVICE_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
id u32 Device ID of device for which constraint value is requested.

This message is used by host to get constraints that it has put on a device.

struct tisci_msg_lpm_get_device_constraint_resp

Response for TISCI_MSG_LPM_GET_DEVICE_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
state u8 The returned state of constraint: set or clear.

TISCI_MSG_LPM_GET_LATENCY_CONSTRAINT

Objective

Get the low power mode resume latency value set by a host.

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_GET_LATENCY_CONSTRAINT          (0x030CU)

Message Data Structures

struct tisci_msg_lpm_get_latency_constraint_req

Request for TISCI_MSG_LPM_GET_LATENCY_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

This message is used by the host to get the resume latency it set for waking up from low power mode.

struct tisci_msg_lpm_get_latency_constraint_resp

Response for TISCI_MSG_LPM_GET_LATENCY_CONSTRAINT.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
resume_latency u16 The maximum acceptable latency for waking up from low power mode in milliseconds. The deeper the state, the higher the latency.
state u8 The returned state of constraint: set or clear.

TISCI_MSG_LPM_GET_NEXT_SYS_MODE

Objective

Return the next (upcoming) power state of the system. It can be one of the following system modes.

System modes

System mode Mode ID
DEEP_SLEEP 0x00
MCU_ONLY 0x01
IO_ONLY_PLUS_DDR 0x02
PARTIAL_IO 0x03
STANDBY 0x04
NOT_SELECTED 0xFE

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_GET_NEXT_SYS_MODE          (0x030DU)

Message Data Structures

struct tisci_msg_lpm_get_next_sys_mode_req

Request for TISCI_MSG_LPM_GET_NEXT_SYS_MODE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

This message is used to enquire DM for selected system wide low power mode.

struct tisci_msg_lpm_get_next_sys_mode_resp

Response for TISCI_MSG_LPM_GET_NEXT_SYS_MODE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
mode u8 The selected system wide low power mode.

Note: If the mode selection is not yet locked, this API returns “not selected” mode.

TISCI_MSG_LPM_GET_NEXT_HOST_STATE

Objective

Return the next (upcoming) power state of the requesting host.

Host states

Host state State ID
OFF 0x00
ON 0x01
INVALID 0xFF

Usage

Message Type Normal
Secure Queue Only? No

TISCI Message ID

TISCI_MSG_LPM_GET_NEXT_HOST_STATE          (0x030EU)

Message Data Structures

struct tisci_msg_lpm_get_next_host_state_req

Request for TISCI_MSG_GET_LPM_NEXT_HOST_STATE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.

This message is used by host to enquire DM for its expected state in current low power mode selection - ON or OFF.

struct tisci_msg_lpm_get_next_host_state_resp

Response for TISCI_MSG_LPM_GET_NEXT_HOST_STATE.

Parameter Type Description
hdr struct tisci_header TISCI header to provide ACK/NAK flags to the host.
state u8 The expected state of host in selected low power mode.

Note: If the mode selection is not yet locked, this API returns invalid state.