Skip to contentSkip to conversation

Print version of the DM firmware

PATCH Superseded Moteen Shah 4 participants 24 messages May 28, 2025 – Jun 5, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Print version of the DM firmware

This patch series adds the functionality to print the DM firmware version being used. Before requesting TISCI for the DM version we first check if the DM split mode capability exists, if yes, we proceed onto making the call to TISCI for retrieving the version information.

DM split mode capability[0] indicates that the DM is a separate binary altogether and has its own versioning information similar to TIFS.

Boot Logs: https://gist.github.com/Jamm02/37864f605445944a0c0caf426e0aba50

[0]https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html#tisci-msg-query-fw-caps

Moteen Shah (6):
ti_sci_*: Add utility to access tisci firmware and SOC capability ti_sci_* : Add capability to access DM firmware's metadata
firmware: ti_sci.c: Add a function to query DM firmware's capability
firmware: ti_sci.c: Add a function to request DM metadata using
ti_sci* calls
arm: mach-k3: Add a function for printing DM version
arm: mach-k3: Print version of DM firmware during boot process

 arch/arm/mach-k3/am62ax/am62a7_init.c  |  4 ++
 arch/arm/mach-k3/am62px/am62p5_init.c  |  4 ++
 arch/arm/mach-k3/am62x/am625_init.c    |  4 ++
 arch/arm/mach-k3/am64x/am642_init.c    |  4 ++
 arch/arm/mach-k3/am65x/am654_init.c    |  4 ++
 arch/arm/mach-k3/common.c              | 29 ++++++++
 arch/arm/mach-k3/common.h              |  1 +
 arch/arm/mach-k3/j721e/j721e_init.c    |  4 ++
 arch/arm/mach-k3/j721s2/j721s2_init.c  |  4 ++
 arch/arm/mach-k3/j722s/j722s_init.c    |  4 ++
 arch/arm/mach-k3/j784s4/j784s4_init.c  |  4 ++
 drivers/firmware/ti_sci.c              | 99 ++++++++++++++++++++++++++
 drivers/firmware/ti_sci.h              | 42 +++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 38 ++++++++++
 14 files changed, 245 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

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

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.

---
 drivers/firmware/ti_sci.h              | 13 +++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 12 ++++++++++++
 2 files changed, 25 insertions(+)
drivers/firmware/ti_sci.h +13 -0
index bb8bc7beead..f3d9eb453b4 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +12 -0
index aa4d105ee98..05a19a8d86c 100644
@@ -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;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/6
#2 lore raw

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

Hi Moteen

Quoted 65 lines · Moteen Shah

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.

---
 drivers/firmware/ti_sci.h              | 13 +++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 12 ++++++++++++
 2 files changed, 25 insertions(+)
drivers/firmware/ti_sci.h +13 -0
index bb8bc7beead..f3d9eb453b4 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +11 -0
index aa4d105ee98..05a19a8d86c 100644
@@ -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.
  *

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_ops { · line 626

Quoted 7 lines
include/linux/soc/ti/ti_sci_protocol.h +1 -0
@@ -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;
Signature · 2 lines
Thanking You
Neha Malcom Francis
Reviewed-by on v1 1/6
#3 lore raw

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

In reply to Moteen Shah
Quoted 7 lines · Moteen Shah

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.

---

Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated
#4 lore raw

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

In reply to Moteen Shah

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

---
 drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
 2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +29 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +26 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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);
 };
 
 #define TI_SCI_MSG_FLAG_FW_CAP_DM	0x100
Signature · 1 line
2.34.1
Reviewed-by on v1 2/6
#5 lore raw

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

Quoted 90 lines · Moteen Shah

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

---
 drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
 2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +29 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +22 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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;
 
 /**

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 290

Quoted 5 lines
include/linux/soc/ti/ti_sci_protocol.h +2 -0
@@ -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.

nitpick: Alignment?

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 299

Quoted 9 lines
include/linux/soc/ti/ti_sci_protocol.h +2 -0
  */
 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
Signature · 2 lines
Thanking You
Neha Malcom Francis
#6 lore raw

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

Hey Neha,

Quoted 89 lines · Neha Malcom Francis
Quoted 88 lines · Moteen Shah

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

---
  drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
  include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
  2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +29 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +22 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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;
 
Quoted 8 lines

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 290

Quoted 7 lines
include/linux/soc/ti/ti_sci_protocol.h +2 -0
  /**
@@ -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.

nitpick: Alignment?

The checkpatch didn't raise an alarm, I'll recheck once and fix it if required in the revision.

Regards,
Moteen

Quoted 12 lines

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 299

Quoted 10 lines
include/linux/soc/ti/ti_sci_protocol.h +2 -0
   */
  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
#7 lore raw

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

Quoted 103 lines · Moteen Shah

Hey Neha,

Quoted 91 lines · Neha Malcom Francis
Quoted 90 lines · Moteen Shah

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

---
  drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++ include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++

  2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +1 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
+ */

drivers/firmware/ti_sci.h +11 -0
+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

include/linux/soc/ti/ti_sci_protocol.h +0 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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.
+ */

include/linux/soc/ti/ti_sci_protocol.h +10 -0
+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;
    /**

Quoted 8 lines
Quoted 7 lines
include/linux/soc/ti/ti_sci_protocol.h +2 -0
@@ -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.

nitpick: Alignment?

Quoted 2 lines

The checkpatch didn't raise an alarm, I'll recheck once and fix it if required in the revision.

I don't think checkpatch looks for alignment in comments, just a nitpick as it looks way more intended to the right.

Quoted 15 lines

Regards,
Moteen

Quoted 11 lines
Quoted 9 lines

   */
  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

Signature · 2 lines
Thanking You
Neha Malcom Francis
Reviewed-by on v1 2/6
#8 lore raw

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

In reply to Moteen Shah
Quoted 2 lines · Moteen Shah

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.

Quoted 89 lines
---
 drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
 2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +29 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +22 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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 {
 /**

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 296

Quoted 10 lines
include/linux/soc/ti/ti_sci_protocol.h +4 -0
  * 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);
Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated
#9 lore raw

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

Hey Dhruva,

Thanks for the review.

Quoted 5 lines · Dhruva Gole
Quoted 2 lines · Moteen Shah

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

Quoted 101 lines
Quoted 89 lines
---
  drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
  include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
  2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +29 -0
index f3d9eb453b4..6ef77d83114 100644
@@ -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
include/linux/soc/ti/ti_sci_protocol.h +22 -0
index 05a19a8d86c..3f13a980433 100644
@@ -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 {
  /**

include/linux/soc/ti/ti_sci_protocol.h struct ti_sci_core_ops { · line 296

Quoted 10 lines
include/linux/soc/ti/ti_sci_protocol.h +4 -0
   * 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);
#10 lore raw

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

In reply to Moteen Shah

On May 28, 2025 thus sayeth Moteen Shah:

Quoted 14 lines

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

---
 drivers/firmware/ti_sci.h              | 29 ++++++++++++++++++++++++++
 include/linux/soc/ti/ti_sci_protocol.h | 26 +++++++++++++++++++++++
 2 files changed, 55 insertions(+)
drivers/firmware/ti_sci.h +0 -0
index f3d9eb453b4..6ef77d83114 100644

drivers/firmware/ti_sci.h line 22

Quoted 4 lines
drivers/firmware/ti_sci.h +1 -0
@@ -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

These definitions are in order

drivers/firmware/ti_sci.h line 25

Quoted 3 lines
drivers/firmware/ti_sci.h +0 -0
 #define TI_SCI_MSG_WAKE_REASON		0x0003
 #define TI_SCI_MSG_GOODBYE		0x0004
 #define TI_SCI_MSG_SYS_RESET		0x0005

~Bryan

#11 lore raw

PATCH 3/6 firmware: ti_sci.c: Add a function to query DM firmware's capability

In reply to Moteen Shah

Add a new function to query the capabilities of the DM firmware, using TI SCI protocol to retrieve a 64-bit firmware capability, where each bit represents a specific capability supported by the firmware.

---
 drivers/firmware/ti_sci.c | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
drivers/firmware/ti_sci.c +45 -0
index 54d6689ce78..bb9738efa81 100644
@@ -278,6 +278,48 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 	return ret;
 }
 
+/**
+ * ti_sci_cmd_query_dm_cap() - Command to query DM firmware's capabilities
+ * @handle:	Pointer to TI SCI handle
+ * @fw_caps:	Pointer to firmware capabilities
+ *
+ * Return: 0 if all went fine, else return appropriate error.
+ */
+static int ti_sci_cmd_query_dm_cap(struct ti_sci_handle *handle, u64 *fw_caps)
+{
+	struct ti_sci_query_fw_caps_resp *cap_info;
+	struct ti_sci_msg_hdr hdr;
+	struct ti_sci_info *info;
+	struct ti_sci_xfer *xfer;
+	int ret;
+
+	if (IS_ERR(handle))
+		return PTR_ERR(handle);
+	if (!handle)
+		return -EINVAL;
+
+	info = handle_to_ti_sci_info(handle);
+
+	xfer = ti_sci_setup_one_xfer(info, TI_SCI_MSG_QUERY_FW_CAPS,
+				     TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+				     (u32 *)&hdr, sizeof(struct ti_sci_msg_hdr),
+				     sizeof(*cap_info));
+	if (IS_ERR(xfer)) {
+		ret = PTR_ERR(xfer);
+		return ret;
+	}
+
+	ret = ti_sci_do_xfer(info, xfer);
+	if (ret)
+		return ret;
+
+	cap_info = (struct ti_sci_query_fw_caps_resp *)xfer->tx_message.buf;
+
+	*fw_caps = cap_info->fw_caps;
+
+	return 0;
+}
+
 /**
  * ti_sci_cmd_get_revision() - command to get the revision of the SCI entity
  * @handle:	pointer to TI SCI handle
@@ -2624,6 +2666,7 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	struct ti_sci_dev_ops *dops = &ops->dev_ops;
 	struct ti_sci_clk_ops *cops = &ops->clk_ops;
 	struct ti_sci_core_ops *core_ops = &ops->core_ops;
+	struct ti_sci_firmware_ops *fw_ops = &ops->fw_ops;
 	struct ti_sci_rm_core_ops *rm_core_ops = &ops->rm_core_ops;
 	struct ti_sci_proc_ops *pops = &ops->proc_ops;
 	struct ti_sci_rm_ringacc_ops *rops = &ops->rm_ring_ops;
@@ -2694,6 +2737,8 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	fwl_ops->set_fwl_region = ti_sci_cmd_set_fwl_region;
 	fwl_ops->get_fwl_region = ti_sci_cmd_get_fwl_region;
 	fwl_ops->change_fwl_owner = ti_sci_cmd_change_fwl_owner;
+
+	fw_ops->query_dm_cap = ti_sci_cmd_query_dm_cap;
 }
 
 /**
Signature · 1 line
2.34.1
Reviewed-by on v1 3/6
#12 lore raw

Re: [PATCH 3/6] firmware: ti_sci.c: Add a function to query DM firmware's capability

Quoted 71 lines · Moteen Shah

Add a new function to query the capabilities of the DM firmware, using TI SCI protocol to retrieve a 64-bit firmware capability, where each bit represents a specific capability supported by the firmware.

---
 drivers/firmware/ti_sci.c | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
drivers/firmware/ti_sci.c +43 -0
index 54d6689ce78..bb9738efa81 100644
@@ -278,6 +278,48 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 	return ret;
 }
 
+/**
+ * ti_sci_cmd_query_dm_cap() - Command to query DM firmware's capabilities
+ * @handle:	Pointer to TI SCI handle
+ * @fw_caps:	Pointer to firmware capabilities
+ *
+ * Return: 0 if all went fine, else return appropriate error.
+ */
+static int ti_sci_cmd_query_dm_cap(struct ti_sci_handle *handle, u64 *fw_caps)
+{
+	struct ti_sci_query_fw_caps_resp *cap_info;
+	struct ti_sci_msg_hdr hdr;
+	struct ti_sci_info *info;
+	struct ti_sci_xfer *xfer;
+	int ret;
+
+	if (IS_ERR(handle))
+		return PTR_ERR(handle);
+	if (!handle)
+		return -EINVAL;
+
+	info = handle_to_ti_sci_info(handle);
+
+	xfer = ti_sci_setup_one_xfer(info, TI_SCI_MSG_QUERY_FW_CAPS,
+				     TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+				     (u32 *)&hdr, sizeof(struct ti_sci_msg_hdr),
+				     sizeof(*cap_info));
+	if (IS_ERR(xfer)) {
+		ret = PTR_ERR(xfer);
+		return ret;
+	}
+
+	ret = ti_sci_do_xfer(info, xfer);
+	if (ret)
+		return ret;
+
+	cap_info = (struct ti_sci_query_fw_caps_resp *)xfer->tx_message.buf;
+
+	*fw_caps = cap_info->fw_caps;
+
+	return 0;
+}
+
 /**
  * ti_sci_cmd_get_revision() - command to get the revision of the SCI entity
  * @handle:	pointer to TI SCI handle
@@ -2624,6 +2666,7 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	struct ti_sci_dev_ops *dops = &ops->dev_ops;
 	struct ti_sci_clk_ops *cops = &ops->clk_ops;
 	struct ti_sci_core_ops *core_ops = &ops->core_ops;
+	struct ti_sci_firmware_ops *fw_ops = &ops->fw_ops;
 	struct ti_sci_rm_core_ops *rm_core_ops = &ops->rm_core_ops;
 	struct ti_sci_proc_ops *pops = &ops->proc_ops;
 	struct ti_sci_rm_ringacc_ops *rops = &ops->rm_ring_ops;

drivers/firmware/ti_sci.c static void ti_sci_setup_ops(struct ti_sci_info *info) · line 2744

Quoted 8 lines
drivers/firmware/ti_sci.c +2 -0
@@ -2694,6 +2737,8 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	fwl_ops->set_fwl_region = ti_sci_cmd_set_fwl_region;
 	fwl_ops->get_fwl_region = ti_sci_cmd_get_fwl_region;
 	fwl_ops->change_fwl_owner = ti_sci_cmd_change_fwl_owner;
+
+	fw_ops->query_dm_cap = ti_sci_cmd_query_dm_cap;
 }
 
 /**
Signature · 2 lines
Thanking You
Neha Malcom Francis
Reviewed-by on v1 3/6
#13 lore raw

Re: [PATCH 3/6] firmware: ti_sci.c: Add a function to query DM firmware's capability

In reply to Moteen Shah
Quoted 9 lines · Moteen Shah

Add a new function to query the capabilities of the DM firmware, using TI SCI protocol to retrieve a 64-bit firmware capability, where each bit represents a specific capability supported by the firmware.

---
 drivers/firmware/ti_sci.c | 45 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated
#14 lore raw

PATCH 4/6 firmware: ti_sci.c: Add a function to request DM metadata using ti_sci* calls

In reply to Moteen Shah

Add a function to retrieve information of the DM firmware's ABI versions, RM/PM HAL, firmware version, etc using TI_SCI protocol.

---
 drivers/firmware/ti_sci.c | 54 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
drivers/firmware/ti_sci.c +54 -0
index bb9738efa81..8a8edc97e85 100644
@@ -320,6 +320,59 @@ static int ti_sci_cmd_query_dm_cap(struct ti_sci_handle *handle, u64 *fw_caps)
 	return 0;
 }
 
+/**
+ * ti_sci_cmd_get_dm_version() - command to get the DM version of the SCI
+ *				 entity
+ * @handle:	Pointer to TI SCI handle
+ * @dm_info:	Pointer to DM version information structure
+ *
+ * Return: 0 if all went fine, else return appropriate error.
+ */
+
+static int ti_sci_cmd_get_dm_version(struct ti_sci_handle *handle,
+				     struct ti_sci_dm_version_info *dm_info)
+{
+	struct ti_sci_msg_dm_resp_version *ver_info;
+	struct ti_sci_msg_hdr hdr;
+	struct ti_sci_info *info;
+	struct ti_sci_xfer *xfer;
+	int ret;
+
+	if (IS_ERR(handle))
+		return PTR_ERR(handle);
+	if (!handle || !dm_info)
+		return -EINVAL;
+
+	info = handle_to_ti_sci_info(handle);
+
+	xfer = ti_sci_setup_one_xfer(info, TI_SCI_MSG_DM_VERSION,
+				     TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+				     (u32 *)&hdr, sizeof(struct ti_sci_msg_hdr),
+				     sizeof(*ver_info));
+	if (IS_ERR(xfer)) {
+		ret = PTR_ERR(xfer);
+		return ret;
+	}
+
+	ret = ti_sci_do_xfer(info, xfer);
+	if (ret)
+		return ret;
+
+	ver_info = (struct ti_sci_msg_dm_resp_version *)xfer->tx_message.buf;
+
+	dm_info->abi_major = ver_info->abi_major;
+	dm_info->abi_minor = ver_info->abi_minor;
+	dm_info->dm_ver = ver_info->version;
+	dm_info->patch_ver = ver_info->patch_version;
+	dm_info->sub_ver = ver_info->sub_version;
+	strlcpy(dm_info->sci_server_version, ver_info->sci_server_version,
+		sizeof(ver_info->sci_server_version));
+	strlcpy(dm_info->rm_pm_hal_version, ver_info->rm_pm_hal_version,
+		sizeof(ver_info->rm_pm_hal_version));
+
+	return 0;
+}
+
 /**
  * ti_sci_cmd_get_revision() - command to get the revision of the SCI entity
  * @handle:	pointer to TI SCI handle
@@ -2738,6 +2791,7 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	fwl_ops->get_fwl_region = ti_sci_cmd_get_fwl_region;
 	fwl_ops->change_fwl_owner = ti_sci_cmd_change_fwl_owner;
 
+	fw_ops->get_dm_version = ti_sci_cmd_get_dm_version;
 	fw_ops->query_dm_cap = ti_sci_cmd_query_dm_cap;
 }
 
Signature · 1 line
2.34.1
Reviewed-by on v1 4/6
#15 lore raw

Re: [PATCH 4/6] firmware: ti_sci.c: Add a function to request DM metadata using ti_sci* calls

Quoted 73 lines · Moteen Shah

Add a function to retrieve information of the DM firmware's ABI versions, RM/PM HAL, firmware version, etc using TI_SCI protocol.

---
 drivers/firmware/ti_sci.c | 54 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)
drivers/firmware/ti_sci.c +53 -0
index bb9738efa81..8a8edc97e85 100644
@@ -320,6 +320,59 @@ static int ti_sci_cmd_query_dm_cap(struct ti_sci_handle *handle, u64 *fw_caps)
 	return 0;
 }
 
+/**
+ * ti_sci_cmd_get_dm_version() - command to get the DM version of the SCI
+ *				 entity
+ * @handle:	Pointer to TI SCI handle
+ * @dm_info:	Pointer to DM version information structure
+ *
+ * Return: 0 if all went fine, else return appropriate error.
+ */
+
+static int ti_sci_cmd_get_dm_version(struct ti_sci_handle *handle,
+				     struct ti_sci_dm_version_info *dm_info)
+{
+	struct ti_sci_msg_dm_resp_version *ver_info;
+	struct ti_sci_msg_hdr hdr;
+	struct ti_sci_info *info;
+	struct ti_sci_xfer *xfer;
+	int ret;
+
+	if (IS_ERR(handle))
+		return PTR_ERR(handle);
+	if (!handle || !dm_info)
+		return -EINVAL;
+
+	info = handle_to_ti_sci_info(handle);
+
+	xfer = ti_sci_setup_one_xfer(info, TI_SCI_MSG_DM_VERSION,
+				     TI_SCI_FLAG_REQ_ACK_ON_PROCESSED,
+				     (u32 *)&hdr, sizeof(struct ti_sci_msg_hdr),
+				     sizeof(*ver_info));
+	if (IS_ERR(xfer)) {
+		ret = PTR_ERR(xfer);
+		return ret;
+	}
+
+	ret = ti_sci_do_xfer(info, xfer);
+	if (ret)
+		return ret;
+
+	ver_info = (struct ti_sci_msg_dm_resp_version *)xfer->tx_message.buf;
+
+	dm_info->abi_major = ver_info->abi_major;
+	dm_info->abi_minor = ver_info->abi_minor;
+	dm_info->dm_ver = ver_info->version;
+	dm_info->patch_ver = ver_info->patch_version;
+	dm_info->sub_ver = ver_info->sub_version;
+	strlcpy(dm_info->sci_server_version, ver_info->sci_server_version,
+		sizeof(ver_info->sci_server_version));
+	strlcpy(dm_info->rm_pm_hal_version, ver_info->rm_pm_hal_version,
+		sizeof(ver_info->rm_pm_hal_version));
+
+	return 0;
+}
+
 /**
  * ti_sci_cmd_get_revision() - command to get the revision of the SCI entity
  * @handle:	pointer to TI SCI handle

drivers/firmware/ti_sci.c static void ti_sci_setup_ops(struct ti_sci_info *info) · line 2797

Quoted 7 lines
drivers/firmware/ti_sci.c +1 -0
@@ -2738,6 +2791,7 @@ static void ti_sci_setup_ops(struct ti_sci_info *info)
 	fwl_ops->get_fwl_region = ti_sci_cmd_get_fwl_region;
 	fwl_ops->change_fwl_owner = ti_sci_cmd_change_fwl_owner;
 
+	fw_ops->get_dm_version = ti_sci_cmd_get_dm_version;
 	fw_ops->query_dm_cap = ti_sci_cmd_query_dm_cap;
 }
 
Signature · 2 lines
Thanking You
Neha Malcom Francis
Reviewed-by on v1 4/6
#16 lore raw

Re: [PATCH 4/6] firmware: ti_sci.c: Add a function to request DM metadata using ti_sci* calls

In reply to Moteen Shah
Quoted 5 lines · Moteen Shah

Add a function to retrieve information of the DM firmware's ABI versions, RM/PM HAL, firmware version, etc using TI_SCI protocol.

---

Signature · 3 lines
Best regards,
Dhruva Gole
Texas Instruments Incorporated
#17 lore raw

PATCH 5/6 arm: mach-k3: Add a function for printing DM version

In reply to Moteen Shah

Add a function to print version of the DM firmware in use. The function queries the firmware capabilities first and if DM split mode bit is set, sends a request to TISCI for retrieving the version information.

The DM split mode bit indicates that DM is a separate binary altogether and hence it will have its own versioning.

---
 arch/arm/mach-k3/common.c | 29 +++++++++++++++++++++++++++++
 arch/arm/mach-k3/common.h |  1 +
 2 files changed, 30 insertions(+)
arch/arm/mach-k3/common.c +29 -0
index fa8cd93d664..524bb1da1a0 100644
@@ -68,6 +68,35 @@ void k3_sysfw_print_ver(void)
 	       ti_sci->version.firmware_revision, fw_desc);
 }
 
+void __maybe_unused k3_dm_print_ver(void)
+{
+	struct ti_sci_handle *ti_sci = get_ti_sci_handle();
+	struct ti_sci_firmware_ops *fw_ops = &ti_sci->ops.fw_ops;
+	struct ti_sci_dm_version_info dm_info = {0};
+	u64 fw_caps;
+	int ret;
+
+	ret = fw_ops->query_dm_cap(ti_sci, &fw_caps);
+	if (ret) {
+		printf("Failed to query DM firmware capability %d\n", ret);
+		return;
+	}
+
+	if (!(fw_caps & TI_SCI_MSG_FLAG_FW_CAP_DM))
+		return;
+
+	ret = fw_ops->get_dm_version(ti_sci, &dm_info);
+	if (ret) {
+		printf("Failed to fetch DM firmware version %d\n", ret);
+		return;
+	}
+
+	printf("DM ABI: %d.%d (firmware ver 0x%04x '%s--%s' "
+	       "patch_ver: %d)\n", dm_info.abi_major, dm_info.abi_minor,
+	       dm_info.dm_ver, dm_info.sci_server_version,
+	       dm_info.rm_pm_hal_version, dm_info.patch_ver);
+}
+
 void mmr_unlock(uintptr_t base, u32 partition)
 {
 	/* Translate the base address */
arch/arm/mach-k3/common.h +1 -0
index 7bd72da1de8..487291697d9 100644
@@ -38,6 +38,7 @@ void disable_linefill_optimization(void);
 void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
 int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
 void k3_sysfw_print_ver(void);
+void k3_dm_print_ver(void);
 void spl_enable_cache(void);
 void mmr_unlock(uintptr_t base, u32 partition);
 bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
Signature · 1 line
2.34.1
Reviewed-by on v1 5/6
#18 lore raw

Re: [PATCH 5/6] arm: mach-k3: Add a function for printing DM version

Quoted 59 lines · Moteen Shah

Add a function to print version of the DM firmware in use. The function queries the firmware capabilities first and if DM split mode bit is set, sends a request to TISCI for retrieving the version information.

The DM split mode bit indicates that DM is a separate binary altogether and hence it will have its own versioning.

---
 arch/arm/mach-k3/common.c | 29 +++++++++++++++++++++++++++++
 arch/arm/mach-k3/common.h |  1 +
 2 files changed, 30 insertions(+)
arch/arm/mach-k3/common.c +29 -0
index fa8cd93d664..524bb1da1a0 100644
@@ -68,6 +68,35 @@ void k3_sysfw_print_ver(void)
 	       ti_sci->version.firmware_revision, fw_desc);
 }
 
+void __maybe_unused k3_dm_print_ver(void)
+{
+	struct ti_sci_handle *ti_sci = get_ti_sci_handle();
+	struct ti_sci_firmware_ops *fw_ops = &ti_sci->ops.fw_ops;
+	struct ti_sci_dm_version_info dm_info = {0};
+	u64 fw_caps;
+	int ret;
+
+	ret = fw_ops->query_dm_cap(ti_sci, &fw_caps);
+	if (ret) {
+		printf("Failed to query DM firmware capability %d\n", ret);
+		return;
+	}
+
+	if (!(fw_caps & TI_SCI_MSG_FLAG_FW_CAP_DM))
+		return;
+
+	ret = fw_ops->get_dm_version(ti_sci, &dm_info);
+	if (ret) {
+		printf("Failed to fetch DM firmware version %d\n", ret);
+		return;
+	}
+
+	printf("DM ABI: %d.%d (firmware ver 0x%04x '%s--%s' "
+	       "patch_ver: %d)\n", dm_info.abi_major, dm_info.abi_minor,
+	       dm_info.dm_ver, dm_info.sci_server_version,
+	       dm_info.rm_pm_hal_version, dm_info.patch_ver);
+}
+
 void mmr_unlock(uintptr_t base, u32 partition)
 {
 	/* Translate the base address */
arch/arm/mach-k3/common.h +0 -0
index 7bd72da1de8..487291697d9 100644

arch/arm/mach-k3/common.h void disable_linefill_optimization(void); · line 44

Quoted 7 lines
arch/arm/mach-k3/common.h +1 -0
@@ -38,6 +38,7 @@ void disable_linefill_optimization(void);
 void remove_fwl_configs(struct fwl_data *fwl_data, size_t fwl_data_size);
 int load_firmware(char *name_fw, char *name_loadaddr, u32 *loadaddr);
 void k3_sysfw_print_ver(void);
+void k3_dm_print_ver(void);
 void spl_enable_cache(void);
 void mmr_unlock(uintptr_t base, u32 partition);
 bool is_rom_loaded_sysfw(struct rom_extended_boot_data *data);
Signature · 2 lines
Thanking You
Neha Malcom Francis
#19 lore raw

PATCH 6/6 arm: mach-k3: Print version of DM firmware during boot process

In reply to Moteen Shah

Print DM firmware's version in the boot up process of K3 devices.

---
 arch/arm/mach-k3/am62ax/am62a7_init.c | 4 ++++
 arch/arm/mach-k3/am62px/am62p5_init.c | 4 ++++
 arch/arm/mach-k3/am62x/am625_init.c   | 4 ++++
 arch/arm/mach-k3/am64x/am642_init.c   | 4 ++++
 arch/arm/mach-k3/am65x/am654_init.c   | 4 ++++
 arch/arm/mach-k3/j721e/j721e_init.c   | 4 ++++
 arch/arm/mach-k3/j721s2/j721s2_init.c | 4 ++++
 arch/arm/mach-k3/j722s/j722s_init.c   | 4 ++++
 arch/arm/mach-k3/j784s4/j784s4_init.c | 4 ++++
 9 files changed, 36 insertions(+)
arch/arm/mach-k3/am62ax/am62a7_init.c +4 -0
index 52a21277227..5bee04c5c31 100644
@@ -172,6 +172,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
 		/* Probe/configure ESM0 */
 		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am62px/am62p5_init.c +4 -0
index 01e47deca94..304fdc75736 100644
@@ -224,6 +224,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_K3_AM62A_DDRSS)) {
 		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
 		if (ret)
arch/arm/mach-k3/am62x/am625_init.c +4 -0
index 595fc391ac5..5bcce365790 100644
@@ -261,6 +261,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
 		/* Probe/configure ESM0 */
 		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am64x/am642_init.c +4 -0
index 41812b7dbf7..7a317632e5b 100644
@@ -242,6 +242,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	do_dt_magic();
 
 #if defined(CONFIG_ESM_K3)
arch/arm/mach-k3/am65x/am654_init.c +4 -0
index a4f038029d7..774ad7feb1d 100644
@@ -244,6 +244,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	/* Perform board detection */
 	do_board_detect();
 
arch/arm/mach-k3/j721e/j721e_init.c +4 -0
index f31c20f7ed6..498243485f5 100644
@@ -374,6 +374,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	/* Perform board detection */
 	do_board_detect();
 
arch/arm/mach-k3/j721s2/j721s2_init.c +4 -0
index 5941fa26a95..528590f0434 100644
@@ -232,6 +232,10 @@ void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 bool check_rom_loaded_sysfw(void)
arch/arm/mach-k3/j722s/j722s_init.c +4 -0
index af211377e7c..d8123f282ee 100644
@@ -150,6 +150,10 @@ static void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 static void k3_mem_init(void)
arch/arm/mach-k3/j784s4/j784s4_init.c +4 -0
index 787cf6261e4..ccf29810849 100644
@@ -208,6 +208,10 @@ void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 void k3_mem_init(void)
Signature · 1 line
2.34.1
#20 lore raw

Re: [PATCH 6/6] arm: mach-k3: Print version of DM firmware during boot process

Quoted 3 lines · Moteen Shah

Print DM firmware's version in the boot up process of K3 devices.

This patch does not apply cleanly on the latest master, you may have to rebase.

Quoted 147 lines
---
 arch/arm/mach-k3/am62ax/am62a7_init.c | 4 ++++
 arch/arm/mach-k3/am62px/am62p5_init.c | 4 ++++
 arch/arm/mach-k3/am62x/am625_init.c   | 4 ++++
 arch/arm/mach-k3/am64x/am642_init.c   | 4 ++++
 arch/arm/mach-k3/am65x/am654_init.c   | 4 ++++
 arch/arm/mach-k3/j721e/j721e_init.c   | 4 ++++
 arch/arm/mach-k3/j721s2/j721s2_init.c | 4 ++++
 arch/arm/mach-k3/j722s/j722s_init.c   | 4 ++++
 arch/arm/mach-k3/j784s4/j784s4_init.c | 4 ++++
 9 files changed, 36 insertions(+)
arch/arm/mach-k3/am62ax/am62a7_init.c +4 -0
index 52a21277227..5bee04c5c31 100644
@@ -172,6 +172,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
 		/* Probe/configure ESM0 */
 		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am62px/am62p5_init.c +4 -0
index 01e47deca94..304fdc75736 100644
@@ -224,6 +224,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_K3_AM62A_DDRSS)) {
 		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
 		if (ret)
arch/arm/mach-k3/am62x/am625_init.c +4 -0
index 595fc391ac5..5bcce365790 100644
@@ -261,6 +261,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	if (IS_ENABLED(CONFIG_ESM_K3)) {
 		/* Probe/configure ESM0 */
 		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am64x/am642_init.c +4 -0
index 41812b7dbf7..7a317632e5b 100644
@@ -242,6 +242,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	do_dt_magic();
 
 #if defined(CONFIG_ESM_K3)
arch/arm/mach-k3/am65x/am654_init.c +4 -0
index a4f038029d7..774ad7feb1d 100644
@@ -244,6 +244,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	/* Perform board detection */
 	do_board_detect();
 
arch/arm/mach-k3/j721e/j721e_init.c +4 -0
index f31c20f7ed6..498243485f5 100644
@@ -374,6 +374,10 @@ void board_init_f(ulong dummy)
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
 	/* Perform board detection */
 	do_board_detect();
 
arch/arm/mach-k3/j721s2/j721s2_init.c +4 -0
index 5941fa26a95..528590f0434 100644
@@ -232,6 +232,10 @@ void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 bool check_rom_loaded_sysfw(void)
arch/arm/mach-k3/j722s/j722s_init.c +4 -0
index af211377e7c..d8123f282ee 100644
@@ -150,6 +150,10 @@ static void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 static void k3_mem_init(void)
arch/arm/mach-k3/j784s4/j784s4_init.c +4 -0
index 787cf6261e4..ccf29810849 100644
@@ -208,6 +208,10 @@ void k3_spl_init(void)
 
 	/* Output System Firmware version info */
 	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
 }
 
 void k3_mem_init(void)
Signature · 2 lines
Thanking You
Neha Malcom Francis
#21 lore raw

Re: [PATCH 6/6] arm: mach-k3: Print version of DM firmware during boot process

Hey Neha,

Quoted 6 lines · Neha Malcom Francis
Quoted 3 lines · Moteen Shah

Print DM firmware's version in the boot up process of K3 devices.

This patch does not apply cleanly on the latest master, you may have to rebase.

I will do a rebase and send a revision for this.
Thanks for the review.

Regards,
Moteen

Quoted 148 lines
Quoted 148 lines
---
  arch/arm/mach-k3/am62ax/am62a7_init.c | 4 ++++
  arch/arm/mach-k3/am62px/am62p5_init.c | 4 ++++
  arch/arm/mach-k3/am62x/am625_init.c   | 4 ++++
  arch/arm/mach-k3/am64x/am642_init.c   | 4 ++++
  arch/arm/mach-k3/am65x/am654_init.c   | 4 ++++
  arch/arm/mach-k3/j721e/j721e_init.c   | 4 ++++
  arch/arm/mach-k3/j721s2/j721s2_init.c | 4 ++++
  arch/arm/mach-k3/j722s/j722s_init.c   | 4 ++++
  arch/arm/mach-k3/j784s4/j784s4_init.c | 4 ++++
  9 files changed, 36 insertions(+)
arch/arm/mach-k3/am62ax/am62a7_init.c +4 -0
index 52a21277227..5bee04c5c31 100644
@@ -172,6 +172,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	if (IS_ENABLED(CONFIG_ESM_K3)) {
  		/* Probe/configure ESM0 */
  		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am62px/am62p5_init.c +4 -0
index 01e47deca94..304fdc75736 100644
@@ -224,6 +224,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	if (IS_ENABLED(CONFIG_K3_AM62A_DDRSS)) {
  		ret = uclass_get_device(UCLASS_RAM, 0, &dev);
  		if (ret)
arch/arm/mach-k3/am62x/am625_init.c +4 -0
index 595fc391ac5..5bcce365790 100644
@@ -261,6 +261,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	if (IS_ENABLED(CONFIG_ESM_K3)) {
  		/* Probe/configure ESM0 */
  		ret = uclass_get_device_by_name(UCLASS_MISC, "esm@420000", &dev);
arch/arm/mach-k3/am64x/am642_init.c +4 -0
index 41812b7dbf7..7a317632e5b 100644
@@ -242,6 +242,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	do_dt_magic();
 
  #if defined(CONFIG_ESM_K3)
arch/arm/mach-k3/am65x/am654_init.c +4 -0
index a4f038029d7..774ad7feb1d 100644
@@ -244,6 +244,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	/* Perform board detection */
  	do_board_detect();
 
arch/arm/mach-k3/j721e/j721e_init.c +4 -0
index f31c20f7ed6..498243485f5 100644
@@ -374,6 +374,10 @@ void board_init_f(ulong dummy)
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
 
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
+
  	/* Perform board detection */
  	do_board_detect();
 
arch/arm/mach-k3/j721s2/j721s2_init.c +4 -0
index 5941fa26a95..528590f0434 100644
@@ -232,6 +232,10 @@ void k3_spl_init(void)
 
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
  }
 
  bool check_rom_loaded_sysfw(void)
arch/arm/mach-k3/j722s/j722s_init.c +4 -0
index af211377e7c..d8123f282ee 100644
@@ -150,6 +150,10 @@ static void k3_spl_init(void)
 
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
  }
 
  static void k3_mem_init(void)
arch/arm/mach-k3/j784s4/j784s4_init.c +4 -0
index 787cf6261e4..ccf29810849 100644
@@ -208,6 +208,10 @@ void k3_spl_init(void)
 
  	/* Output System Firmware version info */
  	k3_sysfw_print_ver();
+
+	/* Output DM Firmware version info */
+	if (IS_ENABLED(CONFIG_ARM64))
+		k3_dm_print_ver();
  }
 
  void k3_mem_init(void)
#22 lore raw

Re: [PATCH 6/6] arm: mach-k3: Print version of DM firmware during boot process

In reply to Moteen Shah

On May 28, 2025 thus sayeth Moteen Shah:

Quoted 9 lines

Print DM firmware's version in the boot up process of K3 devices.

---
 arch/arm/mach-k3/am62ax/am62a7_init.c | 4 ++++
 arch/arm/mach-k3/am62px/am62p5_init.c | 4 ++++
 arch/arm/mach-k3/am62x/am625_init.c   | 4 ++++
 arch/arm/mach-k3/am64x/am642_init.c   | 4 ++++
 arch/arm/mach-k3/am65x/am654_init.c   | 4 ++++

The AM64 and AM65 use DMSC firmware. Can they ever have a different DM version than what is reported by the SYSFW call?

Quoted 4 lines
 arch/arm/mach-k3/j721e/j721e_init.c   | 4 ++++
 arch/arm/mach-k3/j721s2/j721s2_init.c | 4 ++++
 arch/arm/mach-k3/j722s/j722s_init.c   | 4 ++++
 arch/arm/mach-k3/j784s4/j784s4_init.c | 4 ++++

~Bryan

#23 lore raw

Re: [PATCH 6/6] arm: mach-k3: Print version of DM firmware during boot process

Hey Bryan,

Quoted 10 lines · Bryan Brattlof

On May 28, 2025 thus sayeth Moteen Shah:

Quoted 9 lines

Print DM firmware's version in the boot up process of K3 devices.

---
  arch/arm/mach-k3/am62ax/am62a7_init.c | 4 ++++
  arch/arm/mach-k3/am62px/am62p5_init.c | 4 ++++
  arch/arm/mach-k3/am62x/am625_init.c   | 4 ++++
  arch/arm/mach-k3/am64x/am642_init.c   | 4 ++++
  arch/arm/mach-k3/am65x/am654_init.c   | 4 ++++
Quoted 2 lines

The AM64 and AM65 use DMSC firmware. Can they ever have a different DM version than what is reported by the SYSFW call?

No actually. So the way patch series is designed, for platforms like AM64 and AM65 having no DM capability, we don't print anything, essentially the changes this series makes in am64 and am65 init files are redundant and can be removed. I will remove the mentioned platforms in the revision.

Thanks for the review.

Regards,
Moteen

Quoted 6 lines
Quoted 5 lines
  arch/arm/mach-k3/j721e/j721e_init.c   | 4 ++++
  arch/arm/mach-k3/j721s2/j721s2_init.c | 4 ++++
  arch/arm/mach-k3/j722s/j722s_init.c   | 4 ++++
  arch/arm/mach-k3/j784s4/j784s4_init.c | 4 ++++

~Bryan