Skip to contentSkip to conversation

Low Power Mode: Package TIFS Stub in BeaglePlay

PATCH Superseded Dhruva Gole 4 participants 17 messages Jul 25, 2024 – Jul 29, 2024 Arm (32-bit)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v7 cover Low Power Mode: Package TIFS Stub in BeaglePlay

Hello,

This series aims to add documentation around the boot flow and tispl packaging details regarding the TIFS Stub. While at it, also refactors the k3 common docs to add more labels to provide more granularity on how we include chunks from common docs into SoC specific docs.

This series also includes the binman related changes required to package TIFS Stub to support Low Power Modes on BeaglePlay and phycore-am625 SOM.

Changelog:
**********
* fixup wording of tifs stub docs as per comments from Nishanth on v6.
* Add packaging of tifs stub in phycore am62 as well. (Build-tested)
* Minor fixup in am64-phycore docs include sysfw

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

Dhruva Gole (7):
MAINTAINERS: Include the TI docs under ARM TI
doc: ti: k3: Add TIFS Stub documentation
doc: board: ti: Update to use the new boot firmware labels
doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
arm: dts: k3-am625-beagleplay: Package TIFS Stub
doc: beagle: am62x_beagleplay: Document the use of TIFS Stub
arm: dts: phycore-am62x: Package TIFS Stub

 MAINTAINERS                                   |    1 +
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi  |   33 +-
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi |  101 +-
 doc/board/beagle/am62x_beagleplay.rst         |    8 +-
 doc/board/beagle/j721e_beagleboneai64.rst     |    4 +
 doc/board/phytec/phycore-am62x.rst            |    4 +
 doc/board/phytec/phycore-am64x.rst            |    4 +
 doc/board/ti/am62ax_sk.rst                    |    8 +-
 doc/board/ti/am62px_sk.rst                    |    8 +-
 doc/board/ti/am62x_sk.rst                     |    8 +-
 doc/board/ti/am64x_evm.rst                    |    4 +
 doc/board/ti/am65x_evm.rst                    |    4 +
 doc/board/ti/img/boot_diagram_am62.svg        | 1983 +++++++++++++++++
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg    |  353 +++
 doc/board/ti/j7200_evm.rst                    |    4 +
 doc/board/ti/j721e_evm.rst                    |    4 +
 doc/board/ti/j721s2_evm.rst                   |    4 +
 doc/board/ti/j722s_evm.rst                    |    4 +
 doc/board/ti/j784s4_evm.rst                   |    4 +
 doc/board/ti/k3.rst                           |   51 +-
 doc/board/toradex/verdin-am62.rst             |    4 +
 21 files changed, 2571 insertions(+), 27 deletions(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg

base-commit: f659ba43837e5ae5a35fdff3736c8e13f9062abd

Signature · 1 line
2.34.1
#1 lore raw

PATCH v7 1/7 MAINTAINERS: Include the TI docs under ARM TI

Add entry for the TI boards documentation under ARM TI

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index a6e47e8a2179..d9af2aac6251 100644
@@ -732,6 +732,7 @@ F:	arch/arm/mach-omap2/
 F:	arch/arm/include/asm/arch-omap*/
 F:	arch/arm/include/asm/ti-common/
 F:	board/ti/
+F:	doc/board/ti/
 F:	drivers/dma/ti*
 F:	drivers/dma/ti*/
 F:	drivers/firmware/ti_sci.*
Signature · 1 line
2.34.1
Reviewed-by on v7 1/7
#2 lore raw

Re: [PATCH V7 1/7] MAINTAINERS: Include the TI docs under ARM TI

Quoted 22 lines · Dhruva Gole

Add entry for the TI boards documentation under ARM TI

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index a6e47e8a2179..d9af2aac6251 100644
@@ -732,6 +732,7 @@ F:	arch/arm/mach-omap2/
 F:	arch/arm/include/asm/arch-omap*/
 F:	arch/arm/include/asm/ti-common/
 F:	board/ti/
+F:	doc/board/ti/
 F:	drivers/dma/ti*
 F:	drivers/dma/ti*/
 F:	drivers/firmware/ti_sci.*
Signature · 1 line
2.34.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#3 lore raw

PATCH v7 2/7 doc: ti: k3: Add TIFS Stub documentation

In reply to Dhruva Gole

* Add documentation to briefly explain the role of TIFS Stub in relevant K3 SoC's.
* Shed light on why TIFS Stub isn't package with the DM firmware itself.
* Modify the platform docs wherever the TIFS Stub documentation applies.
* Also, refactor and add a few new labels to help split the firmware documentation chunks. This will make it easier to include them one by one wherever applicable

---
 doc/board/ti/am62ax_sk.rst        |  4 +++
 doc/board/ti/am62px_sk.rst        |  4 +++
 doc/board/ti/am62x_sk.rst         |  4 +++
 doc/board/ti/k3.rst               | 51 +++++++++++++++++++++----------
 doc/board/toradex/verdin-am62.rst |  4 +++
 5 files changed, 51 insertions(+), 16 deletions(-)
doc/board/ti/am62ax_sk.rst +4 -0
index 60726b6652ce..72fa5a8d8cdd 100644
@@ -60,6 +60,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/am62px_sk.rst +4 -0
index c80b50681176..bcef6653cb92 100644
@@ -68,6 +68,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
+
 Build procedure:
 ----------------
 
doc/board/ti/am62x_sk.rst +4 -0
index 2a25e84f6c97..e2a848d159ff 100644
@@ -59,6 +59,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/k3.rst +35 -16

60 lines not on this page · raw message

doc/board/toradex/verdin-am62.rst +4 -0
index e8d902732883..93912adc896d 100644
@@ -29,6 +29,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
+
 Build procedure:
 ----------------
 
Signature · 1 line
2.34.1
Reviewed-by on v7 2/7
#4 lore raw

Re: [PATCH V7 2/7] doc: ti: k3: Add TIFS Stub documentation

Quoted 10 lines · Dhruva Gole

* Add documentation to briefly explain the role of TIFS Stub in relevant K3 SoC's.
* Shed light on why TIFS Stub isn't package with the DM firmware itself.
* Modify the platform docs wherever the TIFS Stub documentation applies.
* Also, refactor and add a few new labels to help split the firmware documentation chunks. This will make it easier to include them one by one wherever applicable

---

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#5 lore raw

PATCH v7 3/7 doc: board: ti: Update to use the new boot firmware labels

In reply to Dhruva Gole

Use the new boot_firmwares labels that help make documentation more specific as to which firmwares are used in which devices

---
 doc/board/beagle/j721e_beagleboneai64.rst | 4 ++++
 doc/board/phytec/phycore-am62x.rst        | 4 ++++
 doc/board/phytec/phycore-am64x.rst        | 4 ++++
 doc/board/ti/am64x_evm.rst                | 4 ++++
 doc/board/ti/am65x_evm.rst                | 4 ++++
 doc/board/ti/j7200_evm.rst                | 4 ++++
 doc/board/ti/j721e_evm.rst                | 4 ++++
 doc/board/ti/j721s2_evm.rst               | 4 ++++
 doc/board/ti/j722s_evm.rst                | 4 ++++
 doc/board/ti/j784s4_evm.rst               | 4 ++++
 10 files changed, 40 insertions(+)
doc/board/beagle/j721e_beagleboneai64.rst +4 -0
index d6b9c8ca606a..090b2b3b86ae 100644
@@ -42,6 +42,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/phytec/phycore-am62x.rst +4 -0
index a7ce2c58825b..af24acf9aac4 100644
@@ -30,6 +30,10 @@ Sources
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure
 ---------------
 
doc/board/phytec/phycore-am64x.rst +4 -0
index 68d78ad7c25a..01c42b906607 100644
@@ -30,6 +30,10 @@ Sources
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares_sysfw
+    :end-before: .. k3_rst_include_end_boot_firmwares_sysfw
+
 Build procedure
 ---------------
 
doc/board/ti/am64x_evm.rst +4 -0
index 88997b6a283e..65c4c456528c 100644
@@ -48,6 +48,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares_sysfw
+    :end-before: .. k3_rst_include_end_boot_firmwares_sysfw
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/am65x_evm.rst +4 -0
index 89011c08dd46..60b08ceebf0f 100644
@@ -58,6 +58,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares_sysfw
+    :end-before: .. k3_rst_include_end_boot_firmwares_sysfw
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/j7200_evm.rst +4 -0
index d4a823fa26ca..4fd2aff83547 100644
@@ -47,6 +47,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/j721e_evm.rst +4 -0
index 80d91cafab08..41c8d4c72a8d 100644
@@ -52,6 +52,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
doc/board/ti/j721s2_evm.rst +4 -0
index f5c48c96a837..21683b90b1a8 100644
@@ -60,6 +60,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure:
 ----------------
 
doc/board/ti/j722s_evm.rst +4 -0
index 10b243908a1c..e5a1be50c4fa 100644
@@ -45,6 +45,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure:
 ----------------
 
doc/board/ti/j784s4_evm.rst +4 -0
index 2ffec3dbd3be..a1e927cb7438 100644
@@ -60,6 +60,10 @@ Sources
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_boot_firmwares
+
 Build procedure
 ---------------
 0. Setup the environment variables:
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH V7 3/7] doc: board: ti: Update to use the new boot firmware labels

Quoted 8 lines · Dhruva Gole

Use the new boot_firmwares labels that help make documentation more specific as to which firmwares are used in which devices

---
 doc/board/beagle/j721e_beagleboneai64.rst | 4 ++++
 doc/board/phytec/phycore-am62x.rst        | 4 ++++
 doc/board/phytec/phycore-am64x.rst        | 4 ++++

Francesco, do you care about getting this in doc/board/toradex/verdin-am62.rst ?

Quoted 7 lines
 doc/board/ti/am64x_evm.rst                | 4 ++++
 doc/board/ti/am65x_evm.rst                | 4 ++++
 doc/board/ti/j7200_evm.rst                | 4 ++++
 doc/board/ti/j721e_evm.rst                | 4 ++++
 doc/board/ti/j721s2_evm.rst               | 4 ++++
 doc/board/ti/j722s_evm.rst                | 4 ++++
 doc/board/ti/j784s4_evm.rst               | 4 ++++
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#7 lore raw

Re: [PATCH V7 3/7] doc: board: ti: Update to use the new boot firmware labels

Quoted 11 lines · Nishanth Menon
Quoted 8 lines · Dhruva Gole

Use the new boot_firmwares labels that help make documentation more specific as to which firmwares are used in which devices

---
 doc/board/beagle/j721e_beagleboneai64.rst | 4 ++++
 doc/board/phytec/phycore-am62x.rst        | 4 ++++
 doc/board/phytec/phycore-am64x.rst        | 4 ++++

Francesco, do you care about getting this in doc/board/toradex/verdin-am62.rst ?

Sure, I am ok having this added, just adds the required changes to verdin-am62 in this patch.

Thanks,
Francesco

#8 lore raw

PATCH v7 4/7 doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow

In reply to Dhruva Gole

Since AM62x, AM62P and AM62A all use similar boot flows and their low power mode s/w ARCH is also similar in the way that they make use of the TIFS Stub, update their documentation to show where TIFS Stub is.

---
 doc/board/ti/am62ax_sk.rst                 |    4 +-
 doc/board/ti/am62px_sk.rst                 |    4 +-
 doc/board/ti/am62x_sk.rst                  |    4 +-
 doc/board/ti/img/boot_diagram_am62.svg     | 1983 ++++++++++++++++++++
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg |  353 ++++
 5 files changed, 2342 insertions(+), 6 deletions(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg
doc/board/ti/am62ax_sk.rst +2 -2
index 72fa5a8d8cdd..262340ef59a3 100644
@@ -47,7 +47,7 @@ Boot Flow:
 ----------
 Below is the pictorial representation of boot flow:
 
-.. image:: img/boot_diagram_k3_current.svg
+.. image:: img/boot_diagram_am62.svg
   :alt: Boot flow diagram
 
 - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -148,7 +148,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 Switch Setting for Boot Mode
doc/board/ti/am62px_sk.rst +2 -2
index bcef6653cb92..99bdc0348692 100644
@@ -55,7 +55,7 @@ Boot Flow:
 The bootflow is exactly the same as all SoCs in the am62xxx extended SoC
 family. Below is the pictorial representation:
 
-.. image:: img/boot_diagram_k3_current.svg
+.. image:: img/boot_diagram_am62.svg
   :alt: Boot flow diagram
 
 - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -157,7 +157,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
doc/board/ti/am62x_sk.rst +2 -2
index e2a848d159ff..b9d35244d446 100644
@@ -46,7 +46,7 @@ Boot Flow:
 ----------
 Below is the pictorial representation of boot flow:
 
-.. image:: img/boot_diagram_k3_current.svg
+.. image:: img/boot_diagram_am62.svg
   :alt: Boot flow diagram
 
 - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -165,7 +165,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
doc/board/ti/img/boot_diagram_am62.svg new file +1983 -0

1,983 lines not on this page · raw message

doc/board/ti/img/tifsstub_dm_tispl.bin.svg new file +353 -0

353 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v7 4/7
#9 lore raw

Re: [PATCH V7 4/7] doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow

Quoted 5 lines · Dhruva Gole

Since AM62x, AM62P and AM62A all use similar boot flows and their low power mode s/w ARCH is also similar in the way that they make use of the TIFS Stub, update their documentation to show where TIFS Stub is.

Quoted 10 lines
---
 doc/board/ti/am62ax_sk.rst                 |    4 +-
 doc/board/ti/am62px_sk.rst                 |    4 +-
 doc/board/ti/am62x_sk.rst                  |    4 +-
 doc/board/ti/img/boot_diagram_am62.svg     | 1983 ++++++++++++++++++++
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg |  353 ++++
 5 files changed, 2342 insertions(+), 6 deletions(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#10 lore raw

PATCH v7 5/7 arm: dts: k3-am625-beagleplay: Package TIFS Stub

In reply to Dhruva Gole

Add support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.

---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi +32 -1
index 467cac68d0f6..a067b0ba3543 100644
@@ -78,6 +78,23 @@
 		};
 	};
 
+	tifsstub-gp {
+		filename = "tifsstub.bin_gp";
+		ti-secure-rom {
+			content = <&tifsstub_gp>;
+			core = "secure";
+			load = <0x60000>;
+			sw-rev = <CONFIG_K3_X509_SWRV>;
+			keyfile = "ti-degenerate-key.pem";
+			tifsstub;
+		};
+		tifsstub_gp: tifsstub-gp.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-gp.bin";
+			type = "blob-ext";
+			optional;
+		};
+	};
+
 	ti-spl_unsigned {
 		filename = "tispl.bin_unsigned";
 		symlink = "tispl.bin";
@@ -115,6 +132,19 @@
 					};
 				};
 
+				tifsstub-gp {
+					description = "tifsstub";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-gp";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_gp";
+					};
+				};
+
 				dm {
 					description = "DM binary";
 					type = "firmware";
@@ -158,7 +188,8 @@
 				conf-0 {
 					description = "k3-am625-beagleplay";
 					firmware = "atf";
-					loadables = "tee", "dm", "spl";
+					loadables = "tee", "dm", "spl",
+					"tifsstub-gp";
 					fdt = "fdt-0";
 				};
 			};
Signature · 1 line
2.34.1
Reviewed-by on v7 5/7
#11 lore raw

Re: [PATCH V7 5/7] arm: dts: k3-am625-beagleplay: Package TIFS Stub

Quoted 11 lines · Dhruva Gole

Add support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.

Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#12 lore raw

PATCH v7 6/7 doc: beagle: am62x_beagleplay: Document the use of TIFS Stub

In reply to Dhruva Gole

* Include the actual common documentation about the TIFS Stub and role it plays to enable Low Power Modes in the platform.
* Add the AM62x boot flow to show at which point the TIFS Stub actually gets loaded.
* Mention the TIFS Stub in the TISPL image format.

---
 doc/board/beagle/am62x_beagleplay.rst | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
doc/board/beagle/am62x_beagleplay.rst +6 -2
index 01f04beb55aa..bc71aabaac3e 100644
@@ -23,7 +23,7 @@ Boot Flow:
 ----------
 Below is the pictorial representation of boot flow:
 
-.. image:: ../ti/img/boot_diagram_k3_current.svg
+.. image:: ../ti/img/boot_diagram_am62.svg
   :alt: Boot flow diagram
 
 - On this platform, 'TI Foundational Security' (TIFS) functions as the
@@ -38,6 +38,10 @@ Sources:
     :start-after: .. k3_rst_include_start_boot_sources
     :end-before: .. k3_rst_include_end_boot_sources
 
+.. include::  ../ti/k3.rst
+    :start-after: .. k3_rst_include_start_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
+
 Build procedure:
 ----------------
 0. Setup the environment variables:
@@ -86,7 +90,7 @@ Image formats
 
 - tispl.bin
 
-.. image:: ../ti/img/dm_tispl.bin.svg
+.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 Additional hardware for U-Boot development
Signature · 1 line
2.34.1
Reviewed-by on v7 6/7
#13 lore raw

Re: [PATCH V7 6/7] doc: beagle: am62x_beagleplay: Document the use of TIFS Stub

Quoted 11 lines · Dhruva Gole

* Include the actual common documentation about the TIFS Stub and role it plays to enable Low Power Modes in the platform.
* Add the AM62x boot flow to show at which point the TIFS Stub actually gets loaded.
* Mention the TIFS Stub in the TISPL image format.

---
 doc/board/beagle/am62x_beagleplay.rst | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
#14 lore raw

PATCH v7 7/7 arm: dts: phycore-am62x: Package TIFS Stub

In reply to Dhruva Gole

Add support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.

While at it, also make sure it's documented in phycore-am62x

---
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 101 +++++++++++++++++-
 doc/board/phytec/phycore-am62x.rst            |   2 +-
 2 files changed, 100 insertions(+), 3 deletions(-)
arch/arm/dts/k3-am625-phycore-som-binman.dtsi +99 -2
index dbee4aa8d8a5..0961ca66f280 100644
@@ -150,12 +150,107 @@
 			filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
 		};
 	};
+
+	tifsstub-hs {
+		filename = "tifsstub.bin_hs";
+		ti-secure-rom {
+			content = <&tifsstub_hs_cert>;
+			core = "secure";
+			load = <0x40000>;
+			sw-rev = <CONFIG_K3_X509_SWRV>;
+			keyfile = "custMpk.pem";
+			countersign;
+			tifsstub;
+		};
+		tifsstub_hs_cert: tifsstub-hs-cert.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-cert.bin";
+			type = "blob-ext";
+			optional;
+		};
+		tifsstub_hs_enc: tifsstub-hs-enc.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-enc.bin";
+			type = "blob-ext";
+			optional;
+		};
+	};
+
+	tifsstub-fs {
+		filename = "tifsstub.bin_fs";
+		tifsstub_fs_cert: tifsstub-fs-cert.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-cert.bin";
+			type = "blob-ext";
+			optional;
+		};
+		tifsstub_fs_enc: tifsstub-fs-enc.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-enc.bin";
+			type = "blob-ext";
+			optional;
+		};
+
+	};
+
+	tifsstub-gp {
+		filename = "tifsstub.bin_gp";
+		ti-secure-rom {
+			content = <&tifsstub_gp>;
+			core = "secure";
+			load = <0x60000>;
+			sw-rev = <CONFIG_K3_X509_SWRV>;
+			keyfile = "ti-degenerate-key.pem";
+			tifsstub;
+		};
+		tifsstub_gp: tifsstub-gp.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-gp.bin";
+			type = "blob-ext";
+			optional;
+		};
+	};
+
+
 	ti-spl {
 		insert-template = <&ti_spl_template>;
 
 		fit {
 
 			images {
+				tifsstub-hs {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-hs";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_hs";
+					};
+				};
+
+				tifsstub-fs {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-fs";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_fs";
+					};
+				};
+
+				tifsstub-gp {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-gp";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_gp";
+					};
+				};
 				dm {
 					ti-secure {
 						content = <&dm>;
@@ -187,7 +282,8 @@
 				conf-0 {
 					description = "k3-am625-phyboard-lyra-rdk";
 					firmware = "atf";
-					loadables = "tee", "dm", "spl";
+					loadables = "tee", "tifsstub-hs", "tifsstub-fs",
+						    "tifsstub-gp", "dm", "spl";
 					fdt = "fdt-0";
 				};
 			};
@@ -266,7 +362,8 @@
 				conf-0 {
 					description = "k3-am625-phyboard-lyra-rdk";
 					firmware = "atf";
-					loadables = "tee", "dm", "spl";
+					loadables = "tee", "tifsstub-hs", "tifsstub-fs",
+						    "tifsstub-gp", "dm", "spl";
 					fdt = "fdt-0";
 				};
 			};
doc/board/phytec/phycore-am62x.rst +1 -1
index af24acf9aac4..56c1fd8354b4 100644
@@ -32,7 +32,7 @@ Sources
 
 .. include::  ../ti/k3.rst
     :start-after: .. k3_rst_include_start_boot_firmwares
-    :end-before: .. k3_rst_include_end_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
 
 Build procedure
 ---------------
Signature · 1 line
2.34.1
Reviewed-by on v7 7/7
#15 lore raw

Re: [PATCH V7 7/7] arm: dts: phycore-am62x: Package TIFS Stub

Am 25.07.24 um 11:35 schrieb Dhruva Gole:

Quoted 9 lines

Add support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.

Quoted 3 lines

While at it, also make sure it's documented in phycore-am62x

Thank you,

Quoted 150 lines
---
  arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 101 +++++++++++++++++-
  doc/board/phytec/phycore-am62x.rst            |   2 +-
  2 files changed, 100 insertions(+), 3 deletions(-)
arch/arm/dts/k3-am625-phycore-som-binman.dtsi +99 -2
index dbee4aa8d8a5..0961ca66f280 100644
@@ -150,12 +150,107 @@
  			filename = "ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
  		};
  	};
+
+	tifsstub-hs {
+		filename = "tifsstub.bin_hs";
+		ti-secure-rom {
+			content = <&tifsstub_hs_cert>;
+			core = "secure";
+			load = <0x40000>;
+			sw-rev = <CONFIG_K3_X509_SWRV>;
+			keyfile = "custMpk.pem";
+			countersign;
+			tifsstub;
+		};
+		tifsstub_hs_cert: tifsstub-hs-cert.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-cert.bin";
+			type = "blob-ext";
+			optional;
+		};
+		tifsstub_hs_enc: tifsstub-hs-enc.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-enc.bin";
+			type = "blob-ext";
+			optional;
+		};
+	};
+
+	tifsstub-fs {
+		filename = "tifsstub.bin_fs";
+		tifsstub_fs_cert: tifsstub-fs-cert.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-cert.bin";
+			type = "blob-ext";
+			optional;
+		};
+		tifsstub_fs_enc: tifsstub-fs-enc.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-hs-enc.bin";
+			type = "blob-ext";
+			optional;
+		};
+
+	};
+
+	tifsstub-gp {
+		filename = "tifsstub.bin_gp";
+		ti-secure-rom {
+			content = <&tifsstub_gp>;
+			core = "secure";
+			load = <0x60000>;
+			sw-rev = <CONFIG_K3_X509_SWRV>;
+			keyfile = "ti-degenerate-key.pem";
+			tifsstub;
+		};
+		tifsstub_gp: tifsstub-gp.bin {
+			filename = "ti-sysfw/ti-fs-stub-firmware-am62x-gp.bin";
+			type = "blob-ext";
+			optional;
+		};
+	};
+
+
  	ti-spl {
  		insert-template = <&ti_spl_template>;
 
  		fit {
 
  			images {
+				tifsstub-hs {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-hs";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_hs";
+					};
+				};
+
+				tifsstub-fs {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-fs";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_fs";
+					};
+				};
+
+				tifsstub-gp {
+					description = "TIFSSTUB";
+					type = "firmware";
+					arch = "arm32";
+					compression = "none";
+					os = "tifsstub-gp";
+					load = <0x9dc00000>;
+					entry = <0x9dc00000>;
+					blob-ext {
+						filename = "tifsstub.bin_gp";
+					};
+				};
  				dm {
  					ti-secure {
  						content = <&dm>;
@@ -187,7 +282,8 @@
  				conf-0 {
  					description = "k3-am625-phyboard-lyra-rdk";
  					firmware = "atf";
-					loadables = "tee", "dm", "spl";
+					loadables = "tee", "tifsstub-hs", "tifsstub-fs",
+						    "tifsstub-gp", "dm", "spl";
  					fdt = "fdt-0";
  				};
  			};
@@ -266,7 +362,8 @@
  				conf-0 {
  					description = "k3-am625-phyboard-lyra-rdk";
  					firmware = "atf";
-					loadables = "tee", "dm", "spl";
+					loadables = "tee", "tifsstub-hs", "tifsstub-fs",
+						    "tifsstub-gp", "dm", "spl";
  					fdt = "fdt-0";
  				};
  			};
doc/board/phytec/phycore-am62x.rst +1 -1
index af24acf9aac4..56c1fd8354b4 100644
@@ -32,7 +32,7 @@ Sources
 
  .. include::  ../ti/k3.rst
      :start-after: .. k3_rst_include_start_boot_firmwares
-    :end-before: .. k3_rst_include_end_boot_firmwares
+    :end-before: .. k3_rst_include_end_tifsstub
 
  Build procedure
  ---------------
Reviewed-by on v7 7/7
#16 lore raw

Re: [PATCH V7 7/7] arm: dts: phycore-am62x: Package TIFS Stub

In reply to Dhruva Gole
Quoted 9 lines · Dhruva Gole

Add support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.

Quoted 4 lines

While at it, also make sure it's documented in phycore-am62x

---

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