Skip to contentSkip to conversation

Add TI K3 HSM M4F nodes in device-tree

PATCH Applied Beleswar Padhi 4 participants 10 messages Jan 14 – Jan 16

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover Add TI K3 HSM M4F nodes in device-tree

Some of the TI K3 family of SoCs (like J721S2, J784S4, J722S) have a HSM (High Security Module) M4F core in the Wakeup Voltage Domain which could be used to run secure services like Authentication. Add the device device-tree node definitions for this HSM M4F core. The bindings for this has already been merged[0].

The HSM M4 core is typically booted early from the bootloader and the driver for the same is posted in U-Boot mailing list[1].

v3: Changelog:
[Nishanth]:
1. Use generic node name 'remoteproc'
2. Use label 'hsm' instead of 'hsm_m4fss'
3. Add a comment for separate SRAMs
4. Change firmware-name value to match existing naming convention
5. Change status to 'reserved' and add a commment
6. Re-order bootph-pre-ram property before vendor properties
7. Update commit message to call out rationale for putting firmare-name in SoC level dtsi
8. Dropped [PATCH v2 1/3] in v3 as it is already merged[0].

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
[Krzysztof Kozlowski]:
In [PATCH v2 1/3]
1. Update commit msg to remove redundant "bindings".
2. Update filename to match compatible.
3. Remove "address-cells" & "size-cells" property. These belong to the device's parent node.
4. Drop description from firmware-name property.
5. Fix indentation for DT example.

Link to v1:
https://lore.kernel.org/all/[email protected]/

[0]: https://lore.kernel.org/all/aV59SdFU15HpLHeO@p14s/
[1]: https://lore.kernel.org/all/[email protected]/

Beleswar Padhi (2):
arm64: dts: ti: k3-{j784s4-j742s2/j721s2}-mcu-wakeup: Add HSM M4F node
arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

 .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17 +++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 +
 .../arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 17 +++++++++++++++++
 arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++
 arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +
 .../arm64/boot/dts/ti/k3-j742s2-mcu-wakeup.dtsi |  4 ++++
 .../ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi  | 17 +++++++++++++++++
 7 files changed, 62 insertions(+)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v3 1/2 arm64: dts: ti: k3-{j784s4-j742s2/j721s2}-mcu-wakeup: Add HSM M4F node

The TI K3 J721S2, J784S4 and J742S2 SoCs have a HSM (High Security Module) M4F core in the Wakeup Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC wakeup dtsi files.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

---
v3: Changelog:
[Nishanth]:
1. Use generic node name 'remoteproc'
2. Use label 'hsm' instead of 'hsm_m4fss'
3. Add a comment for separate SRAMs
4. Update firmware-name property to match existing naming conventions
5. Change status to 'reserved' and add a commment
6. Re-order bootph-pre-ram property before vendor properties
7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

 .../arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi | 17 +++++++++++++++++
 .../arm64/boot/dts/ti/k3-j742s2-mcu-wakeup.dtsi |  4 ++++
 .../ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi  | 17 +++++++++++++++++
 3 files changed, 38 insertions(+)
arch/arm64/boot/dts/ti/k3-j721s2-mcu-wakeup.dtsi +17 -0
index fd01437726ab4..32ee8031cfcb6 100644
@@ -766,4 +766,21 @@ mcu_watchdog1: watchdog@40610000 {
 		/* reserved for MCU_R5F0_1 */
 		status = "reserved";
 	};
+
+	hsm: remoteproc@43c00000 {
+		compatible = "ti,hsm-m4fss";
+		/* contiguous regions but instantiated separately in HW */
+		reg = <0x00 0x43c00000 0x00 0x20000>,
+		      <0x00 0x43c20000 0x00 0x10000>,
+		      <0x00 0x43c30000 0x00 0x10000>;
+		reg-names = "sram0_0", "sram0_1", "sram1";
+		resets = <&k3_reset 304 1>;
+		firmware-name = "j721s2-hsm-m4f-fw";
+		bootph-pre-ram;
+		ti,sci = <&sms>;
+		ti,sci-dev-id = <304>;
+		ti,sci-proc-ids = <0x80 0xff>;
+		/* reserved for early-stage bootloader */
+		status = "reserved";
+	};
 };
arch/arm64/boot/dts/ti/k3-j742s2-mcu-wakeup.dtsi +4 -0
index 61db2348d6a47..2f40afcfa67c4 100644
@@ -15,3 +15,7 @@ &mcu_r5fss0_core0 {
 &mcu_r5fss0_core1 {
 	firmware-name = "j742s2-mcu-r5f0_1-fw";
 };
+
+&hsm {
+	firmware-name = "j742s2-hsm-m4f-fw";
+};
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi +17 -0
index cc22bfb5f5996..df37902c963ff 100644
@@ -762,4 +762,21 @@ mcu_watchdog1: watchdog@40610000 {
 		/* reserved for MCU_R5F0_1 */
 		status = "reserved";
 	};
+
+	hsm: remoteproc@43c00000 {
+		compatible = "ti,hsm-m4fss";
+		/* contiguous regions but instantiated separately in HW */
+		reg = <0x00 0x43c00000 0x00 0x20000>,
+		      <0x00 0x43c20000 0x00 0x10000>,
+		      <0x00 0x43c30000 0x00 0x10000>;
+		reg-names = "sram0_0", "sram0_1", "sram1";
+		resets = <&k3_reset 371 1>;
+		firmware-name = "j784s4-hsm-m4f-fw";
+		bootph-pre-ram;
+		ti,sci = <&sms>;
+		ti,sci-dev-id = <371>;
+		ti,sci-proc-ids = <0x80 0xff>;
+		/* reserved for early-stage bootloader */
+		status = "reserved";
+	};
 };
Signature · 1 line
2.34.1
#2 lore raw

PATCH v3 2/2 arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

In reply to Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
1. Use generic node name 'remoteproc'
2. Use label 'hsm' instead of 'hsm_m4fss'
3. Add a comment for separate SRAMs
4. Update firmware-name property to match existing naming conventions
5. Change status to 'reserved' and add a commment
6. Re-order bootph-pre-ram property before vendor properties
7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

 .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17 +++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 +
 arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++
 arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +
 4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +17 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
 		clocks = <&k3_clks 204 2>;
 		power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
 	};
+
+	hsm: remoteproc@43c00000 {
+		compatible = "ti,hsm-m4fss";
+		/* contiguous regions but instantiated separately in HW */
+		reg = <0x00 0x43c00000 0x00 0x20000>,
+		      <0x00 0x43c20000 0x00 0x10000>,
+		      <0x00 0x43c30000 0x00 0x10000>;
+		reg-names = "sram0_0", "sram0_1", "sram1";
+		resets = <&k3_reset 225 1>;
+		firmware-name = "am62p-hsm-m4f-fw";
+		bootph-pre-ram;
+		ti,sci = <&dmsc>;
+		ti,sci-dev-id = <225>;
+		ti,sci-proc-ids = <0x80 0xff>;
+		/* reserved for early-stage bootloader */
+		status = "reserved";
+	};
 };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +1 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {
 			 <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */
 			 <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */
 			 <0x00 0x43600000 0x00 0x43600000 0x00 0x00010000>, /* SA3 sproxy data */
+			 <0x00 0x43c00000 0x00 0x43c00000 0x00 0x00040000>, /* HSM SRAM ranges */
 			 <0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */
 			 <0x00 0x44860000 0x00 0x44860000 0x00 0x00040000>, /* SA3 sproxy config */
 			 <0x00 0x48000000 0x00 0x48000000 0x00 0x06408000>, /* DMSS */
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi +5 -0
index 873415ec4fa37..9ee5d0c8ffd1e 100644
@@ -429,6 +429,11 @@ &wkup_r5fss0_core0 {
 	firmware-name = "j722s-wkup-r5f0_0-fw";
 };
 
+/* MAIN domain overrides */
+&hsm {
+	firmware-name = "j722s-hsm-m4f-fw";
+};
+
 &main_conf {
 	serdes_ln_ctrl: mux-controller@4080 {
 		compatible = "reg-mux";
arch/arm64/boot/dts/ti/k3-j722s.dtsi +1 -0
index c8b634c346779..059c65ece183f 100644
@@ -173,6 +173,7 @@ cbass_main: bus@f0000 {
 			 <0x00 0x31200000 0x00 0x31200000 0x00 0x00040000>, /* USB1 DWC3 Core window */
 			 <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */
 			 <0x00 0x43600000 0x00 0x43600000 0x00 0x00010000>, /* SA3 sproxy data */
+			 <0x00 0x43c00000 0x00 0x43c00000 0x00 0x00040000>, /* HSM SRAM ranges */
 			 <0x00 0x44043000 0x00 0x44043000 0x00 0x00000fe0>, /* TI SCI DEBUG */
 			 <0x00 0x44860000 0x00 0x44860000 0x00 0x00040000>, /* SA3 sproxy config */
 			 <0x00 0x48000000 0x00 0x48000000 0x00 0x06408000>, /* DMSS */
Signature · 1 line
2.34.1
#3 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

Hi Beleswar,

Quoted 49 lines · Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
1. Use generic node name 'remoteproc'
2. Use label 'hsm' instead of 'hsm_m4fss'
3. Add a comment for separate SRAMs
4. Update firmware-name property to match existing naming conventions
5. Change status to 'reserved' and add a commment
6. Re-order bootph-pre-ram property before vendor properties
7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

  .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17 +++++++++++++++++
  arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 +
  arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++
  arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +
  4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +0 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
  		clocks = <&k3_clks 204 2>;
  		power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
  	};

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi vpu: video-codec@30210000 { · line 1129

Quoted 10 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +10 -0
+
+	hsm: remoteproc@43c00000 {
+		compatible = "ti,hsm-m4fss";
+		/* contiguous regions but instantiated separately in HW */
+		reg = <0x00 0x43c00000 0x00 0x20000>,
+		      <0x00 0x43c20000 0x00 0x10000>,
+		      <0x00 0x43c30000 0x00 0x10000>;
+		reg-names = "sram0_0", "sram0_1", "sram1";
+		resets = <&k3_reset 225 1>;
+		firmware-name = "am62p-hsm-m4f-fw";

you don't need clock and power-domain for this ?

Quoted 16 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +7 -0
+		bootph-pre-ram;
+		ti,sci = <&dmsc>;
+		ti,sci-dev-id = <225>;
+		ti,sci-proc-ids = <0x80 0xff>;
+		/* reserved for early-stage bootloader */
+		status = "reserved";
+	};
  };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +0 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {
  			 <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */
  			 <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */
[..]
#4 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

Hi Udit,

Quoted 56 lines · Udit

Hi Beleswar,

Quoted 53 lines · Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
  1. Use generic node name 'remoteproc'
  2. Use label 'hsm' instead of 'hsm_m4fss'
  3. Add a comment for separate SRAMs
  4. Update firmware-name property to match existing naming conventions
  5. Change status to 'reserved' and add a commment
  6. Re-order bootph-pre-ram property before vendor properties
  7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

  .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17 +++++++++++++++++ arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 + arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++ arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +

  4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +4 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
           clocks = <&k3_clks 204 2>;
           power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
       };
+
+    hsm: remoteproc@43c00000 {
+        compatible = "ti,hsm-m4fss";
+        /* contiguous regions but instantiated separately in HW */
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi vpu: video-codec@30210000 { · line 1129

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +6 -0
+        reg = <0x00 0x43c00000 0x00 0x20000>,
+              <0x00 0x43c20000 0x00 0x10000>,
+              <0x00 0x43c30000 0x00 0x10000>;
+        reg-names = "sram0_0", "sram0_1", "sram1";
+        resets = <&k3_reset 225 1>;
+        firmware-name = "am62p-hsm-m4f-fw";

you don't need clock and power-domain for this ?

That info is abstracted out via ti-sci calls. ti_sci_cmd_get_device() takes care of setting clocks and power domains for us.

Same for other rprocs:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi#L178

Thanks,
Beleswar

Quoted 18 lines
Quoted 18 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +7 -0
+        bootph-pre-ram;
+        ti,sci = <&dmsc>;
+        ti,sci-dev-id = <225>;
+        ti,sci-proc-ids = <0x80 0xff>;
+        /* reserved for early-stage bootloader */
+        status = "reserved";
+    };
   };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +0 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {

               <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */ [..]

#5 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

Quoted 70 lines · Beleswar

Hi Udit,

Quoted 57 lines · Udit

Hi Beleswar,

Quoted 54 lines · Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
  1. Use generic node name 'remoteproc'
  2. Use label 'hsm' instead of 'hsm_m4fss'
  3. Add a comment for separate SRAMs
  4. Update firmware-name property to match existing naming conventions
  5. Change status to 'reserved' and add a commment
  6. Re-order bootph-pre-ram property before vendor properties
  7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

  .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17
+++++++++++++++++
  arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 + arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++ arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +

  4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +4 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
           clocks = <&k3_clks 204 2>;
           power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
       };
+
+    hsm: remoteproc@43c00000 {
+        compatible = "ti,hsm-m4fss";
+        /* contiguous regions but instantiated separately in HW */
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi vpu: video-codec@30210000 { · line 1129

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +6 -0
+        reg = <0x00 0x43c00000 0x00 0x20000>,
+              <0x00 0x43c20000 0x00 0x10000>,
+              <0x00 0x43c30000 0x00 0x10000>;
+        reg-names = "sram0_0", "sram0_1", "sram1";
+        resets = <&k3_reset 225 1>;
+        firmware-name = "am62p-hsm-m4f-fw";

you don't need clock and power-domain for this ?

Quoted 6 lines

That info is abstracted out via ti-sci calls. ti_sci_cmd_get_device() takes care of setting clocks and power domains for us.

Same for other rprocs:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi#L178

Is this specific handling for m4 core ? , I see other rproc got power at cluster level

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi#L1518

Quoted 22 lines

Thanks,
Beleswar

Quoted 18 lines
Quoted 18 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +7 -0
+        bootph-pre-ram;
+        ti,sci = <&dmsc>;
+        ti,sci-dev-id = <225>;
+        ti,sci-proc-ids = <0x80 0xff>;
+        /* reserved for early-stage bootloader */
+        status = "reserved";
+    };
   };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +0 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {

               <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */ [..]

#6 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

Quoted 75 lines · Udit
Quoted 73 lines · Beleswar

Hi Udit,

Quoted 57 lines · Udit

Hi Beleswar,

Quoted 54 lines · Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
  1. Use generic node name 'remoteproc'
  2. Use label 'hsm' instead of 'hsm_m4fss'
  3. Add a comment for separate SRAMs
  4. Update firmware-name property to match existing naming conventions
  5. Change status to 'reserved' and add a commment
  6. Re-order bootph-pre-ram property before vendor properties
  7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

  .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17
+++++++++++++++++
  arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 + arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++ arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +

  4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +4 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
           clocks = <&k3_clks 204 2>;
           power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
       };
+
+    hsm: remoteproc@43c00000 {
+        compatible = "ti,hsm-m4fss";
+        /* contiguous regions but instantiated separately in HW */
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi vpu: video-codec@30210000 { · line 1129

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +6 -0
+        reg = <0x00 0x43c00000 0x00 0x20000>,
+              <0x00 0x43c20000 0x00 0x10000>,
+              <0x00 0x43c30000 0x00 0x10000>;
+        reg-names = "sram0_0", "sram0_1", "sram1";
+        resets = <&k3_reset 225 1>;
+        firmware-name = "am62p-hsm-m4f-fw";

you don't need clock and power-domain for this ?

That info is abstracted out via ti-sci calls. ti_sci_cmd_get_device() takes care of setting clocks and power domains for us.

Quoted 6 lines
Quoted 3 lines

Same for other rprocs:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi#L178

Is this specific handling for m4 core ?

For all single cores like M4, DSP, R5F0_0/R5F0_1 etc.

Quoted 1 line

, I see other rproc got power at cluster level

We don't make any ti-sci calls for the cluster level, which is why we need that info here in DT. Otherwise, ti-sci calls take care of the individual cores for us. That's why R5F child cores don't have power domain info in the DT:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi#L1521-L1535

Thanks,
Beleswar

Quoted 27 lines

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi#L1518

Quoted 22 lines

Thanks,
Beleswar

Quoted 18 lines
Quoted 18 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +7 -0
+        bootph-pre-ram;
+        ti,sci = <&dmsc>;
+        ti,sci-dev-id = <225>;
+        ti,sci-proc-ids = <0x80 0xff>;
+        /* reserved for early-stage bootloader */
+        status = "reserved";
+    };
   };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +0 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {

               <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */ [..]

Reviewed-by
#7 lore raw

Re: [PATCH v3 2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node

Quoted 82 lines · Beleswar
Quoted 80 lines · Udit
Quoted 76 lines · Beleswar

Hi Udit,

Quoted 57 lines · Udit

Hi Beleswar,

Quoted 54 lines · Beleswar Padhi

The TI K3 AM62P and J722S SoCs have a HSM (High Security Module) M4F core in the MAIN Voltage Domain which could be used to run secure services like Authentication. Add Device Tree Node definitions for the HSM core in the respective SoC common main dtsi file.

The HSM node is reserved to be loaded and booted by the early-stage bootloader. The firmware-name property is defined at the SoC level since the HSM is not a general-purpose remote core and boards are unlikely to use separate firmware. If needed in exceptional cases, board-specific device trees can override this property.

The corresponding reg ranges of HSM node has also been added to its parent node's (cbass_main bus) ranges property.

---
v3: Changelog:
[Nishanth]:
  1. Use generic node name 'remoteproc'
  2. Use label 'hsm' instead of 'hsm_m4fss'
  3. Add a comment for separate SRAMs
  4. Update firmware-name property to match existing naming conventions
  5. Change status to 'reserved' and add a commment
  6. Re-order bootph-pre-ram property before vendor properties
  7. Update commit msg adding rationale for firmware-name in SoC.dtsi

Link to v2:
https://lore.kernel.org/all/[email protected]/

v2: Changelog:
1. None

Link to v1:
https://lore.kernel.org/all/[email protected]/

  .../boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 17
+++++++++++++++++
  arch/arm64/boot/dts/ti/k3-am62p.dtsi            |  1 + arch/arm64/boot/dts/ti/k3-j722s-main.dtsi       |  5 +++++ arch/arm64/boot/dts/ti/k3-j722s.dtsi            |  1 +

  4 files changed, 24 insertions(+)
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +4 -0
index 3cf7c2b3ce2dd..0e1af2a69ca2e 100644
@@ -1117,4 +1117,21 @@ vpu: video-codec@30210000 {
           clocks = <&k3_clks 204 2>;
           power-domains = <&k3_pds 204 TI_SCI_PD_EXCLUSIVE>;
       };
+
+    hsm: remoteproc@43c00000 {
+        compatible = "ti,hsm-m4fss";
+        /* contiguous regions but instantiated separately in HW */
Quoted 8 lines

arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi vpu: video-codec@30210000 { · line 1129

Quoted 6 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +6 -0
+        reg = <0x00 0x43c00000 0x00 0x20000>,
+              <0x00 0x43c20000 0x00 0x10000>,
+              <0x00 0x43c30000 0x00 0x10000>;
+        reg-names = "sram0_0", "sram0_1", "sram1";
+        resets = <&k3_reset 225 1>;
+        firmware-name = "am62p-hsm-m4f-fw";

you don't need clock and power-domain for this ?

That info is abstracted out via ti-sci calls. ti_sci_cmd_get_device() takes care of setting clocks and power domains for us.

Same for other rprocs:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-am62-mcu.dtsi#L178

Quoted 4 lines
Quoted 1 line

Is this specific handling for m4 core ?

For all single cores like M4, DSP, R5F0_0/R5F0_1 etc.

Ok

Quoted 10 lines
Quoted 2 lines

, I see other rproc got power at cluster level

We don't make any ti-sci calls for the cluster level, which is why we need that info here in DT. Otherwise, ti-sci calls take care of the individual cores for us. That's why R5F child cores don't have power domain info in the DT:
https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi#L1521-L1535

R5 cores are inside cluster , it is be better to handle core and cluster in same way.

But this patch is not related to R5.

So

Quoted 31 lines

Thanks,
Beleswar

Quoted 27 lines

https://github.com/torvalds/linux/blob/master/arch/arm64/boot/dts/ti/k3-j7200-main.dtsi#L1518

Quoted 22 lines

Thanks,
Beleswar

Quoted 18 lines
Quoted 18 lines
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi +7 -0
+        bootph-pre-ram;
+        ti,sci = <&dmsc>;
+        ti,sci-dev-id = <225>;
+        ti,sci-proc-ids = <0x80 0xff>;
+        /* reserved for early-stage bootloader */
+        status = "reserved";
+    };
   };
arch/arm64/boot/dts/ti/k3-am62p.dtsi +0 -0
index e2c01328eb298..9d6266d6ddb82 100644
@@ -96,6 +96,7 @@ cbass_main: bus@f0000 {

               <0x00 0x31100000 0x00 0x31100000 0x00 0x00050000>, /* USB1 DWC3 Core window */ <0x00 0x40900000 0x00 0x40900000 0x00 0x00030000>, /* SA3UL */ [..]

Reviewed-by on the v3 series
#8 lore raw
In reply to Beleswar Padhi

On January 14, 2026 thus sayeth Beleswar Padhi:

Quoted 9 lines

Some of the TI K3 family of SoCs (like J721S2, J784S4, J722S) have a HSM (High Security Module) M4F core in the Wakeup Voltage Domain which could be used to run secure services like Authentication. Add the device device-tree node definitions for this HSM M4F core. The bindings for this has already been merged[0].

The HSM M4 core is typically booted early from the bootloader and the driver for the same is posted in U-Boot mailing list[1].

Nice! Amazing job cleaning up the remote core drivers Beleswar! And defining them so well in DT for us. For the series

~Bryan

maintainer Applied
#9 lore raw
In reply to Beleswar Padhi

Hi Beleswar Padhi,

Quoted 10 lines · Beleswar Padhi

Some of the TI K3 family of SoCs (like J721S2, J784S4, J722S) have a HSM (High Security Module) M4F core in the Wakeup Voltage Domain which could be used to run secure services like Authentication. Add the device device-tree node definitions for this HSM M4F core. The bindings for this has already been merged[0].

The HSM M4 core is typically booted early from the bootloader and the driver for the same is posted in U-Boot mailing list[1].

[...]

I have applied the following to branch ti-k3-dts-next on [1].

Thank you!

[1/2] arm64: dts: ti: k3-{j784s4-j742s2/j721s2}-mcu-wakeup: Add HSM M4F node

      commit: 474530ef050b77482365de8c595b491f1d4ba683
[2/2] arm64: dts: ti: k3-am62p-j722s-common-main: Add HSM M4F node
      commit: ac838e45b46f33ae8ab7195892f4dcf1143a161b

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 4 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource