[PATCH 2/6] ti_sci_* : Add capability to access DM firmware's metadata

Moteen Shah m-shah at ti.com
Thu Jun 5 08:18:13 CEST 2025


Hey Dhruva,

Thanks for the review.

On 03/06/25 14:03, Dhruva Gole wrote:
> On May 28, 2025 at 13:35:15 +0530, Moteen Shah wrote:
>> Introduce response and request structs to receive and request
>> information regarding DM version, etc from TI SCI.
> Nit: Remove the ", etc"
> The patch is literally just about DM version.

There are other details as well in the msg struct actually apart from 
the DM version.
Eg: the DM version is : 0x000b but if you look into the logs shared in 
cover letter of this series, there are other details as well such as sci 
server version, patch version, RM PM HAL version...

Regards,
Moteen

>
>> Signed-off-by: Moteen Shah <m-shah at ti.com>
>> ---
>>   drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
>>   include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
>>   2 files changed, 55 insertions(+)
>>
>> diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
>> index f3d9eb453b4..6ef77d83114 100644
>> --- a/drivers/firmware/ti_sci.h
>> +++ b/drivers/firmware/ti_sci.h
>> @@ -19,6 +19,7 @@
>>   #define TI_SCI_MSG_ENABLE_WDT		0x0000
>>   #define TI_SCI_MSG_WAKE_RESET		0x0001
>>   #define TI_SCI_MSG_VERSION		0x0002
>> +#define TI_SCI_MSG_DM_VERSION		0x000F
>>   #define TI_SCI_MSG_WAKE_REASON		0x0003
>>   #define TI_SCI_MSG_GOODBYE		0x0004
>>   #define TI_SCI_MSG_SYS_RESET		0x0005
>> @@ -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
>> diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
>> index 05a19a8d86c..3f13a980433 100644
>> --- a/include/linux/soc/ti/ti_sci_protocol.h
>> +++ b/include/linux/soc/ti/ti_sci_protocol.h
>> @@ -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;
>>   
>>   /**
>> @@ -264,10 +286,14 @@ struct ti_sci_core_ops {
>>   /**
>>    * struct ti_sci_firmware_ops - DM firmware operations
>>    * @query_dm_cap: Query the DM capabilities
>> + * @get_dm_version: Get the DM version.
>> + *		    Return 0 for successful query 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);
> Reviewed-by: Dhruva Gole <d-gole at ti.com>
>


More information about the U-Boot mailing list