summaryrefslogtreecommitdiff
path: root/include/linux/soc/ti/ti_sci_protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/soc/ti/ti_sci_protocol.h')
-rw-r--r--include/linux/soc/ti/ti_sci_protocol.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 8adcb45d4b5c..f2d1d74ab8fc 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -195,9 +195,47 @@ struct ti_sci_clk_ops {
u64 *current_freq);
};
+/* TISCI LPM wake up sources */
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_I2C0 0x00
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_UART0 0x10
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_GPIO0 0x20
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_ICEMELTER0 0x30
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER0 0x40
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_TIMER1 0x41
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_WKUP_RTC0 0x50
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_RESET 0x60
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB0 0x70
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_USB1 0x71
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MAIN_IO 0x80
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_MCU_IO 0x81
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_CAN_IO 0x82
+#define TISCI_MSG_VALUE_LPM_WAKE_SOURCE_INVALID 0xFF
+
+/* TISCI LPM IO isolation control values */
+#define TISCI_MSG_VALUE_IO_ENABLE 1
+#define TISCI_MSG_VALUE_IO_DISABLE 0
+
+/**
+ * struct ti_sci_pm_ops - Low Power Mode (LPM) control operations
+ * @prepare_sleep: Prepare to enter low power mode
+ * - mode: Low power mode to enter.
+ * - ctx_lo: Low 32-bits of physical address for context save.
+ * - ctx_hi: High 32-bits of physical address for context save.
+ * - ctx_lo: 'true' if frequency change is desired.
+ * - debug_flags: JTAG control flags for debug.
+ * @lpm_wake_reason: Get the wake up source that woke the SoC from LPM
+ * - source: The wake up source that woke soc from LPM.
+ * - timestamp: Timestamp at which soc woke.
+ * @set_io_isolation: Enable or disable IO isolation
+ * - state: The desired state of the IO isolation.
+ */
struct ti_sci_pm_ops {
int (*prepare_sleep)(const struct ti_sci_handle *handle, u8 mode,
u32 ctx_lo, u32 ctx_hi, u32 flags);
+ int (*lpm_wake_reason)(const struct ti_sci_handle *handle,
+ u32 *source, u64 *timestamp);
+ int (*set_io_isolation)(const struct ti_sci_handle *handle,
+ u8 state);
};
/**