[PATCH 1/6] ti_sci_*: Add utility to access tisci firmware and SOC capability

Neha Malcom Francis n-francis at ti.com
Tue Jun 3 08:03:47 CEST 2025


Hi Moteen

On 28/05/25 13:35, Moteen Shah wrote:
> Introduce response and request structs for receiving information
> regarding FW/SOC capability from DM. The received capability can
> further be used to call API's based on the feature supported by
> the DM firmware.
> 
> Signed-off-by: Moteen Shah <m-shah at ti.com>
> ---
>  drivers/firmware/ti_sci.h              | 13 +++++++++++++
>  include/linux/soc/ti/ti_sci_protocol.h | 12 ++++++++++++
>  2 files changed, 25 insertions(+)
> 
> diff --git a/drivers/firmware/ti_sci.h b/drivers/firmware/ti_sci.h
> index bb8bc7beead..f3d9eb453b4 100644
> --- a/drivers/firmware/ti_sci.h
> +++ b/drivers/firmware/ti_sci.h
> @@ -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_QUERY_FW_CAPS	0x0022
>  #define TISCI_MSG_QUERY_MSMC		0x0020
>  
>  /* Device requests */
> @@ -134,6 +135,18 @@ struct ti_sci_msg_resp_version {
>  	u8 abi_minor;
>  } __packed;
>  
> +/**
> + * struct ti_sci_query_fw_caps_resp - Response for a message
> + * @hdr:	Generic header
> + * @fw_caps:	64-bit value representing the FW/SOC capabilities.
> + *
> + * Response to a message with message type TI_SCI_MSG_QUERY_FW_CAPS
> + */
> +struct ti_sci_query_fw_caps_resp {
> +	struct ti_sci_msg_hdr hdr;
> +	u64    fw_caps;
> +} __packed;
> +
>  /**
>   * struct ti_sci_msg_req_reboot - Reboot the SoC
>   * @hdr:	Generic Header
> diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
> index aa4d105ee98..05a19a8d86c 100644
> --- a/include/linux/soc/ti/ti_sci_protocol.h
> +++ b/include/linux/soc/ti/ti_sci_protocol.h
> @@ -261,6 +261,17 @@ struct ti_sci_core_ops {
>  			  u64 *msmc_start, u64 *msmc_end);
>  };
>  
> +/**
> + * struct ti_sci_firmware_ops - DM firmware operations
> + * @query_dm_cap: Query the DM capabilities
> + */
> +struct ti_sci_firmware_ops {
> +	int (*query_dm_cap)(struct ti_sci_handle *handle,
> +			    u64 *dm_cap);
> +};
> +
> +#define TI_SCI_MSG_FLAG_FW_CAP_DM	0x100
> +
>  /**
>   * struct ti_sci_proc_ops - Processor specific operations.
>   *
> @@ -609,6 +620,7 @@ struct ti_sci_ops {
>  	struct ti_sci_dev_ops dev_ops;
>  	struct ti_sci_clk_ops clk_ops;
>  	struct ti_sci_core_ops core_ops;
> +	struct ti_sci_firmware_ops fw_ops;
>  	struct ti_sci_proc_ops proc_ops;
>  	struct ti_sci_rm_core_ops rm_core_ops;
>  	struct ti_sci_rm_ringacc_ops rm_ring_ops;

Reviewed-by: Neha Malcom Francis <n-francis at ti.com>

-- 
Thanking You
Neha Malcom Francis


More information about the U-Boot mailing list