ti_sci_* : Add capability to access DM firmware's metadata

Introduce response and request structs to receive and request
information regarding DM version, etc from TI SCI.

Signed-off-by: Moteen Shah <m-shah@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
This commit is contained in:
Moteen Shah
2025-06-09 13:44:30 +05:30
committed by Tom Rini
parent 3bc174031d
commit 33fc7751b9
2 changed files with 55 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#define TI_SCI_MSG_BOARD_CONFIG_RM 0x000c
#define TI_SCI_MSG_BOARD_CONFIG_SECURITY 0x000d
#define TI_SCI_MSG_BOARD_CONFIG_PM 0x000e
#define TI_SCI_MSG_DM_VERSION 0x000f
#define TISCI_MSG_QUERY_MSMC 0x0020
#define TI_SCI_MSG_QUERY_FW_CAPS 0x0022
@@ -135,6 +136,34 @@ struct ti_sci_msg_resp_version {
u8 abi_minor;
} __packed;
/**
* struct ti_sci_msg_dm_resp_version - Response for a message
* @hdr: Generic header
* @version: Version number of the firmware
* @sub_version: Sub-version number of the firmware
* @patch_version: Patch version number of the firmware
* @abi_major: Major version of the ABI that firmware supports
* @abi_minor: Minor version of the ABI that firmware supports
* @sci_server_version: String describing the SCI server version
* @rm_pm_hal_version: String describing the RM PM HAL version
*
* In general, ABI version changes follow the rule that minor version increments
* are backward compatible. Major revision changes in ABI may not be
* backward compatible.
*
* Response to a message with message type TI_SCI_MSG_DM_VERSION
*/
struct ti_sci_msg_dm_resp_version {
struct ti_sci_msg_hdr hdr;
u16 version;
u8 sub_version;
u8 patch_version;
u8 abi_major;
u8 abi_minor;
char rm_pm_hal_version[12];
char sci_server_version[26];
} __packed;
/**
* struct ti_sci_query_fw_caps_resp - Response for a message
* @hdr: Generic header

View File

@@ -30,6 +30,28 @@ struct ti_sci_version_info {
char firmware_description[32];
};
/**
* struct ti_sci_dm_version_info - version information structure
* @abi_major: Major ABI version. Change here implies risk of backward
* compatibility break.
* @abi_minor: Minor ABI version. Change here implies new feature addition,
* or compatible change in ABI.
* @patch_ver: Patch version of the firmware.
* @sub_ver: Sub-version of the firmware.
* @dm_ver: DM version.
* @sci_server_version: Version string of the SCI server.
* @rm_pm_hal_version: Version string of the RM PM HAL.
*/
struct ti_sci_dm_version_info {
u8 abi_major;
u8 abi_minor;
u8 patch_ver;
u8 sub_ver;
u16 dm_ver;
char rm_pm_hal_version[12];
char sci_server_version[26];
};
struct ti_sci_handle;
/**
@@ -265,10 +287,14 @@ struct ti_sci_core_ops {
* struct ti_sci_firmware_ops - DM firmware operations
* @query_dm_cap: Query the DM capabilities
* Return 0 for successful query else appropriate error value.
* @get_dm_version: Get the DM version.
* Return 0 for successful request else appropriate error value.
*/
struct ti_sci_firmware_ops {
int (*query_dm_cap)(struct ti_sci_handle *handle,
u64 *dm_cap);
int (*get_dm_version)(struct ti_sci_handle *handle,
struct ti_sci_dm_version_info *get_dm_version);
};
#define TI_SCI_MSG_FLAG_FW_CAP_DM 0x100