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

2024-07-25 Thread 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

Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 101 +-
 doc/board/phytec/phycore-am62x.rst|   2 +-
 2 files changed, 100 insertions(+), 3 deletions(-)

diff --git a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi 
b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
index dbee4aa8d8a5..0961ca66f280 100644
--- a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
@@ -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 = <_hs_cert>;
+   core = "secure";
+   load = <0x4>;
+   sw-rev = ;
+   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 = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <_spl_template>;
 
fit {
 
images {
+   tifsstub-hs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-hs";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_hs";
+   };
+   };
+
+   tifsstub-fs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-fs";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_fs";
+   

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

2024-07-25 Thread 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.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 01f04beb55aa..bc71aabaac3e 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -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
-- 
2.34.1



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

2024-07-25 Thread 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.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index 467cac68d0f6..a067b0ba3543 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -78,6 +78,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <0x9dc0>;
+   entry = <0x9dc0>;
+   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";
};
};
-- 
2.34.1



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

2024-07-25 Thread 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.

Signed-off-by: Dhruva Gole 
---
 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

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 72fa5a8d8cdd..262340ef59a3 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index bcef6653cb92..99bdc0348692 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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:
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index e2a848d159ff..b9d35244d446 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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:
diff --git a/doc/board/ti/img/boot_diagram_am62.svg 
b/doc/board/ti/img/boot_diagram_am62.svg
new file mode 100644
index ..44c54dbd2c1e
--- /dev/null
+++ b/doc/board/ti/img/boot_diagram_am62.svg
@@ -0,0 +1,1983 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R
+
+  
+
+Cortex-R
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  ROM
+
+  
+
+ROM
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R SPL
+
+  
+
+Cortex-R SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load and auth 
tiboot3.bin
+
+  
+
+Load and auth t...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load system
+config data
+
+  
+
+Load system...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  DDR Config
+
+  
+
+DDR Config
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load tispl.bin
+
+  
+
+Load tispl.bin
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start Cortex-A
+
+  
+
+Start Cortex-A
+  
+
+
+
+  
+

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

2024-07-25 Thread Dhruva Gole
Use the new boot_firmwares labels that help make documentation more
specific as to which firmwares are used in which devices

Signed-off-by: Dhruva Gole 
---
 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(+)

diff --git a/doc/board/beagle/j721e_beagleboneai64.rst 
b/doc/board/beagle/j721e_beagleboneai64.rst
index d6b9c8ca606a..090b2b3b86ae 100644
--- a/doc/board/beagle/j721e_beagleboneai64.rst
+++ b/doc/board/beagle/j721e_beagleboneai64.rst
@@ -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:
diff --git a/doc/board/phytec/phycore-am62x.rst 
b/doc/board/phytec/phycore-am62x.rst
index a7ce2c58825b..af24acf9aac4 100644
--- a/doc/board/phytec/phycore-am62x.rst
+++ b/doc/board/phytec/phycore-am62x.rst
@@ -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
 ---
 
diff --git a/doc/board/phytec/phycore-am64x.rst 
b/doc/board/phytec/phycore-am64x.rst
index 68d78ad7c25a..01c42b906607 100644
--- a/doc/board/phytec/phycore-am64x.rst
+++ b/doc/board/phytec/phycore-am64x.rst
@@ -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
 ---
 
diff --git a/doc/board/ti/am64x_evm.rst b/doc/board/ti/am64x_evm.rst
index 88997b6a283e..65c4c456528c 100644
--- a/doc/board/ti/am64x_evm.rst
+++ b/doc/board/ti/am64x_evm.rst
@@ -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:
diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst
index 89011c08dd46..60b08ceebf0f 100644
--- a/doc/board/ti/am65x_evm.rst
+++ b/doc/board/ti/am65x_evm.rst
@@ -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:
diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst
index d4a823fa26ca..4fd2aff83547 100644
--- a/doc/board/ti/j7200_evm.rst
+++ b/doc/board/ti/j7200_evm.rst
@@ -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:
diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst
index 80d91cafab08..41c8d4c72a8d 100644
--- a/doc/board/ti/j721e_evm.rst
+++ b/doc/board/ti/j721e_evm.rst
@@ -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:
diff --git a/doc/board/ti/j721s2_evm.rst b/doc/board/ti/j721s2_evm.rst
index f5c48c96a837..21683b90b1a8 100644
--- a/doc/board/ti/j721s2_evm.rst
+++ b/doc/board/ti/j721s2_evm.rst
@@ -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:
 
 
diff --git

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

2024-07-25 Thread 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

Signed-off-by: Dhruva Gole 
---
 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(-)

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 60726b6652ce..72fa5a8d8cdd 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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:
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index c80b50681176..bcef6653cb92 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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:
 
 
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 2a25e84f6c97..e2a848d159ff 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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:
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 67b066a07d3a..c3513f0aee20 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -182,25 +182,44 @@ online
 
 .. note::
 
-  The TI Firmware required for functionality of the system can be
-  one of the following combination (see platform specific boot diagram for
-  further information as to which component runs on which processor):
-
-  * **TIFS** - TI Foundational Security Firmware - Consists of purely firmware
-meant to run on the security enclave.
-  * **DM** - Device Management firmware also called TI System Control Interface
-server (TISCI Server) - This component purely plays the role of managing
-device resources such as power, clock, interrupts, dma etc. This firmware
-runs on a dedicated or multi-use microcontroller outside the security
-enclave.
-
- OR
-
-  * **SYSFW** - System firmware - consists of both TIFS and DM both running on
-the security enclave.
+  The TI Firmwares required for functionality of the system are (see
+  platform specific boot diagram for further information as to which
+  component runs on which processor):
 
 .. k3_rst_include_end_boot_sources
 
+.. k3_rst_include_start_boot_firmwares
+
+* **TIFS** - TI Foundational Security Firmware - Consists of purely firmware
+  meant to run on the security enclave.
+* **DM** - Device Management firmware also called TI System Control Interface
+  server (TISCI Server) - This component purely plays the role of managing
+  device resources such as power, clock, interrupts, dma etc. This firmware
+  runs on a dedicated or multi-use microcontroller outside the security
+  enclave.
+
+.. k3_rst_include_end_boot_firmwares
+.. k3_rst_include_start_tifsstub
+
+* **TIFS Stub** - The TIFS stub is a small piece of binary designed to help
+  restore the required security context and resume the TIFS firmware when
+  the system resumes from low-power modes such as suspend-to-RAM/Deep
+  Sleep. This stub uses the same encryption and customer key signing model
+  as TIFS and is loaded into the ATCM (Tightly Coupled Memory 'A' of the
+  DM R5) during DM startup. Due to the independent certificate signing
+  process, the stub is maintained separately from DM.
+
+.. k3_rst_include_end_tifsstub
+
+OR
+
+.. k3_rst_include_start_boot_firmwares_sysfw
+
+* **SYSFW** - System firmware - consists of both TIFS and DM both running on
+  the security enclave.
+
+.. k3_rst_include_end_boot_firmwares_sysfw
+
 Build Procedure
 ---
 
diff --git a/doc/board/toradex/verdin-am62.rst 
b/doc/board/toradex/verdin-am62.rst
index e8d902732883..93912adc896d 100644
--- a/doc/board/toradex/verdin-am62.rst
+++ b/doc/board/toradex/verdin-am62.rst

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

2024-07-25 Thread Dhruva Gole
Add entry for the TI boards documentation under ARM TI

Signed-off-by: Dhruva Gole 
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index a6e47e8a2179..d9af2aac6251 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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.*
-- 
2.34.1



[PATCH V7 0/7] Low Power Mode: Package TIFS Stub in BeaglePlay

2024-07-25 Thread Dhruva Gole
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/20240719070312.3771755-1-d-g...@ti.com/


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
-- 
2.34.1



[PATCH V6 5/6] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-07-19 Thread 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.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index 467cac68d0f6..a067b0ba3543 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -78,6 +78,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <0x9dc0>;
+   entry = <0x9dc0>;
+   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";
};
};
-- 
2.34.1



[PATCH V6 0/6] Low Power Mode: Package TIFS Stub in BeaglePlay

2024-07-19 Thread Dhruva Gole
Hi,

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.

Changelog:
**
* Reorder and fixup patches as per comments from Nishanth on v5.
* Add more labels in k3.rst that can be included to provide more
  granularity in how we include firmware documentation in each soc.
* Reword the TIFS Stub documentation slightly to show that DM can be
  built by customers and is open source.

Link to v5:
https://lore.kernel.org/all/20240705164833.2386549-1-d-g...@ti.com/


Dhruva Gole (6):
  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

 MAINTAINERS  |1 +
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi |   33 +-
 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  |   55 +-
 doc/board/toradex/verdin-am62.rst|4 +
 20 files changed, 2476 insertions(+), 25 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: 45956736ac7c9c8b04522789c20fb45ff95a
-- 
2.34.1



[PATCH V6 6/6] doc: beagle: am62x_beagleplay: Document the use of TIFS Stub

2024-07-19 Thread 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.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 01f04beb55aa..8bd9e4001007 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -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_lpm_firmware
+
 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
-- 
2.34.1



[PATCH V6 4/6] doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow

2024-07-19 Thread 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.

Signed-off-by: Dhruva Gole 
---
 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

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 8e9820ead734..fad37594ee0d 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index 527c693cb97e..de72400c3b7b 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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:
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 79e964461986..568956e41042 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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:
diff --git a/doc/board/ti/img/boot_diagram_am62.svg 
b/doc/board/ti/img/boot_diagram_am62.svg
new file mode 100644
index ..44c54dbd2c1e
--- /dev/null
+++ b/doc/board/ti/img/boot_diagram_am62.svg
@@ -0,0 +1,1983 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R
+
+  
+
+Cortex-R
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  ROM
+
+  
+
+ROM
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R SPL
+
+  
+
+Cortex-R SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load and auth 
tiboot3.bin
+
+  
+
+Load and auth t...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load system
+config data
+
+  
+
+Load system...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  DDR Config
+
+  
+
+DDR Config
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load tispl.bin
+
+  
+
+Load tispl.bin
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start Cortex-A
+
+  
+
+Start Cortex-A
+  
+
+
+
+  
+

[PATCH V6 2/6] doc: ti: k3: Add TIFS Stub documentation

2024-07-19 Thread 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

Signed-off-by: Dhruva Gole 
---
 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   | 55 ++-
 doc/board/toradex/verdin-am62.rst |  4 +++
 5 files changed, 55 insertions(+), 16 deletions(-)

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 60726b6652ce..8e9820ead734 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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_lpm_firmware
+
 Build procedure:
 
 0. Setup the environment variables:
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index c80b50681176..527c693cb97e 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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_lpm_firmware
+
 Build procedure:
 
 
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 2a25e84f6c97..79e964461986 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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_lpm_firmware
+
 Build procedure:
 
 0. Setup the environment variables:
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 67b066a07d3a..42631528a6b7 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -182,25 +182,48 @@ online
 
 .. note::
 
-  The TI Firmware required for functionality of the system can be
-  one of the following combination (see platform specific boot diagram for
-  further information as to which component runs on which processor):
-
-  * **TIFS** - TI Foundational Security Firmware - Consists of purely firmware
-meant to run on the security enclave.
-  * **DM** - Device Management firmware also called TI System Control Interface
-server (TISCI Server) - This component purely plays the role of managing
-device resources such as power, clock, interrupts, dma etc. This firmware
-runs on a dedicated or multi-use microcontroller outside the security
-enclave.
-
- OR
-
-  * **SYSFW** - System firmware - consists of both TIFS and DM both running on
-the security enclave.
+  The TI Firmwares required for functionality of the system are (see
+  platform specific boot diagram for further information as to which
+  component runs on which processor):
 
 .. k3_rst_include_end_boot_sources
 
+.. k3_rst_include_start_boot_firmwares
+
+* **TIFS** - TI Foundational Security Firmware - Consists of purely firmware
+  meant to run on the security enclave.
+* **DM** - Device Management firmware also called TI System Control Interface
+  server (TISCI Server) - This component purely plays the role of managing
+  device resources such as power, clock, interrupts, dma etc. This firmware
+  runs on a dedicated or multi-use microcontroller outside the security
+  enclave.
+
+.. k3_rst_include_end_boot_firmwares
+.. k3_rst_include_start_lpm_firmware
+
+* **TIFS Stub** - A small piece of code that helps restore the remaining
+  context and resume the TIFS firmware when resuming from Low Power Modes
+  like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly
+  Coupled Memory 'A' of the DM R5) during DM startup. The reason it isn't
+  merged with DM is because in HS devices we need to sign the tifs-stub with
+  customer key. The DM cannot have a component signed using a customer key
+  because a HS device customer owns the customer key and only customer
+  has the access for the customer key. Since TIFS Stub signing has to happen
+  from the customer side but the DM is released by TI or built by customer
+  optionally using publicly available sources, we need to allow binman to
+  sign the TIFS Stub and only then package it alongside other firmwares.
+
+.. k3_rst_include_end_lpm_firmware
+
+OR
+
+.. k3_rst_include_start_boot_firmwares_sysfw
+
+* **SYSFW** - System firmware - consists of both

[PATCH V6 3/6] doc: board: ti: Update to use the new boot firmware labels

2024-07-19 Thread Dhruva Gole
Use the new boot_firmwares labels that help make documentation more
specific as to which firmwares are used in which devices

Signed-off-by: Dhruva Gole 
---
 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(+)

diff --git a/doc/board/beagle/j721e_beagleboneai64.rst 
b/doc/board/beagle/j721e_beagleboneai64.rst
index d6b9c8ca606a..090b2b3b86ae 100644
--- a/doc/board/beagle/j721e_beagleboneai64.rst
+++ b/doc/board/beagle/j721e_beagleboneai64.rst
@@ -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:
diff --git a/doc/board/phytec/phycore-am62x.rst 
b/doc/board/phytec/phycore-am62x.rst
index a7ce2c58825b..af24acf9aac4 100644
--- a/doc/board/phytec/phycore-am62x.rst
+++ b/doc/board/phytec/phycore-am62x.rst
@@ -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
 ---
 
diff --git a/doc/board/phytec/phycore-am64x.rst 
b/doc/board/phytec/phycore-am64x.rst
index 68d78ad7c25a..02388c7a5b22 100644
--- a/doc/board/phytec/phycore-am64x.rst
+++ b/doc/board/phytec/phycore-am64x.rst
@@ -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
 ---
 
diff --git a/doc/board/ti/am64x_evm.rst b/doc/board/ti/am64x_evm.rst
index 88997b6a283e..65c4c456528c 100644
--- a/doc/board/ti/am64x_evm.rst
+++ b/doc/board/ti/am64x_evm.rst
@@ -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:
diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst
index 89011c08dd46..60b08ceebf0f 100644
--- a/doc/board/ti/am65x_evm.rst
+++ b/doc/board/ti/am65x_evm.rst
@@ -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:
diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst
index d4a823fa26ca..4fd2aff83547 100644
--- a/doc/board/ti/j7200_evm.rst
+++ b/doc/board/ti/j7200_evm.rst
@@ -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:
diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst
index 80d91cafab08..41c8d4c72a8d 100644
--- a/doc/board/ti/j721e_evm.rst
+++ b/doc/board/ti/j721e_evm.rst
@@ -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:
diff --git a/doc/board/ti/j721s2_evm.rst b/doc/board/ti/j721s2_evm.rst
index f5c48c96a837..21683b90b1a8 100644
--- a/doc/board/ti/j721s2_evm.rst
+++ b/doc/board/ti/j721s2_evm.rst
@@ -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:
 
 
diff --git a/doc/board

[PATCH V6 1/6] MAINTAINERS: Include the TI docs under ARM TI

2024-07-19 Thread Dhruva Gole
Add entry for the TI boards documentation under ARM TI

Signed-off-by: Dhruva Gole 
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 19ca57d200b9..23246414d6f4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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.*
-- 
2.34.1



Re: [PATCH V5 0/6] Low Power Mode: Package TIFS Stub in BeaglePlay

2024-07-18 Thread Dhruva Gole
On Jul 17, 2024 at 13:49:07 -0500, Nishanth Menon wrote:
> On 22:18-20240705, Dhruva Gole wrote:
> > This series includes the binman related changes required to package TIFS
> > Stub to support Low Power Modes on BeaglePlay.
> > It also documents the boot flow and tispl packaging details regarding
> > the same.
> > 
> > Changelog:
> > * Add more documentation around last time's discussion[1] on packaging TIFS
> >   Stub in DM.
> > 
> > Link to previous series:
> > https://lore.kernel.org/u-boot/20240704084207.2211801-1-d-g...@ti.com/
> > 
> > [1] https://lore.kernel.org/u-boot/20240705151753.7v3geqkupqu673x3@ambiance/
> > 
> > Thanks for the explanation given in [1] Sebin,
> > Cc: Sebin Francis 
> > 
> > Dhruva Gole (6):
> >   arm: dts: k3-am625-beagleplay: Package TIFS Stub
> >   doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub
> >   doc: beagle: am62x_beagleplay: Add TIFS Stub in image format
> >   doc: ti: k3: Add TIFS Stub documentation
> >   doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
> > 
>   Please change the ordering of the patches:
> 
> MAINTAINERS: Include the TI docs under ARM TI
> doc: ti: k3: Add TIFS Stub documentation
> doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
> 
> then do the stuff for beagleplay - first fix, then add new stuff, NOT
> the other way around - yes, i claim that a feature added without
> documentation is a bug.

Understood, Will reorder and address other concerns in next revision.

-- 
Best regards,
Dhruva Gole 


Re: [PATCH V5 4/6] doc: ti: k3: Add TIFS Stub documentation

2024-07-18 Thread Dhruva Gole
On Jul 17, 2024 at 13:47:19 -0500, Nishanth Menon wrote:
> On 22:18-20240705, Dhruva Gole wrote:
> > Add documentation to briefly explain the role of TIFS Stub in relevant
> > K3 SoC's.
> > This also sheds light on why TIFS Stub isn't package with the DM firmware
> > itself.
> > 
> > Signed-off-by: Dhruva Gole 
> > ---
> >  doc/board/ti/k3.rst | 11 +++
> >  1 file changed, 11 insertions(+)
> > 
> > diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
> > index 67b066a07d3a..c80060662074 100644
> > --- a/doc/board/ti/k3.rst
> > +++ b/doc/board/ti/k3.rst
> > @@ -193,6 +193,17 @@ online
> >  device resources such as power, clock, interrupts, dma etc. This 
> > firmware
> >  runs on a dedicated or multi-use microcontroller outside the security
> >  enclave.
> > +  * **TIFS Stub** - A small piece of code that helps restore the remaining
> > +context and resume the TIFS firmware when resuming from Low Power Modes
> > +like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly
> > +Coupled Memory 'A' of the DM R5) during DM startup. The reason it isn't
> > +merged with DM is because in HS devices we need to sign the tifs-stub 
> > with
> > +customer key. The DM cannot have a component signed using a customer 
> > key
> > +because a HS device customer owns the customer key and only customer
> > +has the access for the customer key. Since TIFS Stub signing has to 
> > happen
> > +from the customer side but DM is released by TI, we need to allow 
> > binman to
> > +sign the TIFS Stub and only then package it alongside other firmwares.
> > +This applies only to AM62x, AM62A and AM62P based devices.
> 
> This implies TI is hiding DM source - we are not. TIFS stub is prop
> binary (the usual issues), but can you rephrase the description above? I
> do not want to go and explicitly list out the devices this section has
> either..

OK.
I was trying to convey was the binary is provided by TI not that its
hidden. But yes I will reword it to say:

 but DM is released by TI or can be built independently by customers
using the publicly available sources, we need to allow binman..

> 
> Futher, the way it is introduced, did you check the documentation for
> other SoCs? we dont want tifs stub section to punch in for other SoCs
> which dont matter.

Yep, it appears wherever there's include::  ../ti/k3.rst,
I will introduce few more tags between k3_rst_include_start_boot_sources
and k3_rst_include_end_boot_sources to help with this. Does that make
sense?


-- 
Best regards,
Dhruva Gole 


[PATCH V5 6/6] MAINTAINERS: Include the TI docs under ARM TI

2024-07-05 Thread Dhruva Gole
Add entry for the TI boards documentation under ARM TI

Signed-off-by: Dhruva Gole 
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6b32a6d94644..da730c6e4840 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -733,6 +733,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.*
-- 
2.34.1



[PATCH V5 4/6] doc: ti: k3: Add TIFS Stub documentation

2024-07-05 Thread Dhruva Gole
Add documentation to briefly explain the role of TIFS Stub in relevant
K3 SoC's.
This also sheds light on why TIFS Stub isn't package with the DM firmware
itself.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/k3.rst | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 67b066a07d3a..c80060662074 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -193,6 +193,17 @@ online
 device resources such as power, clock, interrupts, dma etc. This firmware
 runs on a dedicated or multi-use microcontroller outside the security
 enclave.
+  * **TIFS Stub** - A small piece of code that helps restore the remaining
+context and resume the TIFS firmware when resuming from Low Power Modes
+like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly
+Coupled Memory 'A' of the DM R5) during DM startup. The reason it isn't
+merged with DM is because in HS devices we need to sign the tifs-stub with
+customer key. The DM cannot have a component signed using a customer key
+because a HS device customer owns the customer key and only customer
+has the access for the customer key. Since TIFS Stub signing has to happen
+from the customer side but DM is released by TI, we need to allow binman to
+sign the TIFS Stub and only then package it alongside other firmwares.
+This applies only to AM62x, AM62A and AM62P based devices.
 
  OR
 
-- 
2.34.1



[PATCH V5 5/6] doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow

2024-07-05 Thread 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.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/am62ax_sk.rst | 4 ++--
 doc/board/ti/am62px_sk.rst | 4 ++--
 doc/board/ti/am62x_sk.rst  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 60726b6652ce..92da6f65f9d5 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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
@@ -144,7 +144,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
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index c80b50681176..3396aae471c6 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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
@@ -153,7 +153,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 2a25e84f6c97..68ddd2ac94ff 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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
@@ -161,7 +161,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
-- 
2.34.1



[PATCH V5 3/6] doc: beagle: am62x_beagleplay: Add TIFS Stub in image format

2024-07-05 Thread Dhruva Gole
Mention the TIFS Stub in the TISP image format

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  |   2 +-
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg | 353 +
 2 files changed, 354 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 375f26fc5f3e..e7347610173e 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -86,7 +86,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
diff --git a/doc/board/ti/img/tifsstub_dm_tispl.bin.svg 
b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
new file mode 100644
index ..5d56d81f6674
--- /dev/null
+++ b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
@@ -0,0 +1,353 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  FIT Header
+
+  
+
+FIT Header
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  TIFS Stub
+(GP, HS-FS, HS-SE)
+
+  
+
+TIFS Stub...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  TF-A
+
+  
+
+TF-A
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  OP-TEE
+
+  
+
+OP-TEE
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  R5 DM FW
+
+  
+
+R5 DM FW
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-A SPL
+
+  
+
+Cortex-A SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  SPL DTB 1..N
+
+  
+
+SPL DTB 1..N
+  
+
+  
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;
+   id="g64" />
+https://www.drawio.com/doc/faq/svg-export-text-problems;
+   target="_blank"
+   id="a68">
+  Text is not SVG - cannot display
+
+  
+
-- 
2.34.1



[PATCH V5 2/6] doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub

2024-07-05 Thread Dhruva Gole
Add the AM62x boot flow to show at which point the TIFS Stub actually
gets loaded.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  |2 +-
 doc/board/ti/img/boot_diagram_am62.svg | 1983 
 2 files changed, 1984 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 01f04beb55aa..375f26fc5f3e 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -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
diff --git a/doc/board/ti/img/boot_diagram_am62.svg 
b/doc/board/ti/img/boot_diagram_am62.svg
new file mode 100644
index ..44c54dbd2c1e
--- /dev/null
+++ b/doc/board/ti/img/boot_diagram_am62.svg
@@ -0,0 +1,1983 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R
+
+  
+
+Cortex-R
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  ROM
+
+  
+
+ROM
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R SPL
+
+  
+
+Cortex-R SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load and auth 
tiboot3.bin
+
+  
+
+Load and auth t...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load system
+config data
+
+  
+
+Load system...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  DDR Config
+
+  
+
+DDR Config
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load tispl.bin
+
+  
+
+Load tispl.bin
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start Cortex-A
+
+  
+
+Start Cortex-A
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start DM
+
+  
+
+Start DM
+  
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Device Mgr
+
+  
+
+Device Mgr
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start 
Cortex-A
+
+  
+
+Start Cort...
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load TIFS Stub in TCM
+
+  
+
+Load TIFS St...
+  
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-A
+
+  
+
+Cortex-A
+  
+
+
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  OP-TEE
+
+  
+
+OP-TEE
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R/M
+C6x/C7x
+
+  
+
+Cortex-R/M...
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Aux f/w
+
+  
+
+Aux f/w
+  
+
+
+

[PATCH V5 1/6] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-07-05 Thread 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.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index 467cac68d0f6..a067b0ba3543 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -78,6 +78,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <0x9dc0>;
+   entry = <0x9dc0>;
+   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";
};
};

base-commit: a9b3723e74aacb5197dc77c9979036dc6b3d9c03
-- 
2.34.1



[PATCH V5 0/6] Low Power Mode: Package TIFS Stub in BeaglePlay

2024-07-05 Thread Dhruva Gole
This series includes the binman related changes required to package TIFS
Stub to support Low Power Modes on BeaglePlay.
It also documents the boot flow and tispl packaging details regarding
the same.

Changelog:
* Add more documentation around last time's discussion[1] on packaging TIFS
  Stub in DM.

Link to previous series:
https://lore.kernel.org/u-boot/20240704084207.2211801-1-d-g...@ti.com/

[1] https://lore.kernel.org/u-boot/20240705151753.7v3geqkupqu673x3@ambiance/

Thanks for the explanation given in [1] Sebin,
Cc: Sebin Francis 

Dhruva Gole (6):
  arm: dts: k3-am625-beagleplay: Package TIFS Stub
  doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub
  doc: beagle: am62x_beagleplay: Add TIFS Stub in image format
  doc: ti: k3: Add TIFS Stub documentation
  doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
  MAINTAINERS: Include the TI docs under ARM TI

 MAINTAINERS  |1 +
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi |   33 +-
 doc/board/beagle/am62x_beagleplay.rst|4 +-
 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 
 doc/board/ti/k3.rst  |   11 +
 9 files changed, 2388 insertions(+), 9 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: a9b3723e74aacb5197dc77c9979036dc6b3d9c03
-- 
2.34.1



Re: [PATCH v3 01/10] common: spl: spl: Init DRAM size in R5/A53 SPL

2024-07-04 Thread Dhruva Gole
On Jul 05, 2024 at 10:20:21 +0530, Chintan Vankar wrote:
> Initialize DRAM size in SPL stage since networking requires DDR
> to be initialized.
> 
> Signed-off-by: Kishon Vijay Abraham I 
> Signed-off-by: Chintan Vankar 
> ---
> 

Reviewed-by: Dhruva Gole 

Best regards,
Dhruva

> Link to v2:
> https://lore.kernel.org/r/20240425120822.2048012-2-c-van...@ti.com/
> 
> Changes from v2 to v3:
> - No changes.
> 
>  common/spl/spl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl.c b/common/spl/spl.c
> index 7794ddccad..5914eb8205 100644
> --- a/common/spl/spl.c
> +++ b/common/spl/spl.c
> @@ -720,7 +720,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
>   initr_watchdog();
>  
>   if (IS_ENABLED(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) ||
> - IS_ENABLED(CONFIG_SPL_ATF))
> + IS_ENABLED(CONFIG_SPL_ATF) || IS_ENABLED(CONFIG_SPL_NET))
>   dram_init_banksize();
>  
>   if (CONFIG_IS_ENABLED(PCI) && !(gd->flags & GD_FLG_DM_DEAD)) {
> -- 
> 2.34.1
> 



Re: [PATCH 8/9] board: phytec: phycore_am62x: Use k3_mmc.env logic

2024-07-04 Thread Dhruva Gole
On Jul 02, 2024 at 22:42:01 -0700, Daniel Schultz wrote:
> Use our common environment file to implement MMC boot.
> 
> Signed-off-by: Daniel Schultz 
> ---

Reviewed-by: Dhruva Gole 

>  board/phytec/phycore_am62x/phycore_am62x.env | 11 +--
>  1 file changed, 1 insertion(+), 10 deletions(-)
[...]

-- 
Best regards,
Dhruva


[PATCH V4 6/6] MAINTAINERS: Include the TI docs under ARM TI

2024-07-04 Thread Dhruva Gole
Add entry for the TI boards documentation under ARM TI

Signed-off-by: Dhruva Gole 
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6b32a6d94644..da730c6e4840 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -733,6 +733,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.*
-- 
2.34.1



[PATCH V4 4/6] doc: ti: k3: Add TIFS Stub documentation

2024-07-04 Thread Dhruva Gole
Add documentation to briefly explain the role of TIFS Stub in relevant
K3 SoC's.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/k3.rst | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 67b066a07d3a..2f63852b3801 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -193,6 +193,11 @@ online
 device resources such as power, clock, interrupts, dma etc. This firmware
 runs on a dedicated or multi-use microcontroller outside the security
 enclave.
+  * **TIFS Stub** - A small piece of code that helps restore the remaining
+context and resume the TIFS firmware when resuming from Low Power Modes
+like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly
+Coupled Memory 'A' of the DM R5) during DM startup. This applies only
+to AM62x, AM62A and AM62P based devices.
 
  OR
 
-- 
2.34.1



[PATCH V4 5/6] doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow

2024-07-04 Thread 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.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/am62ax_sk.rst | 4 ++--
 doc/board/ti/am62px_sk.rst | 4 ++--
 doc/board/ti/am62x_sk.rst  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 60726b6652ce..92da6f65f9d5 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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
@@ -144,7 +144,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
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index c80b50681176..3396aae471c6 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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
@@ -153,7 +153,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index 2a25e84f6c97..68ddd2ac94ff 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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
@@ -161,7 +161,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 OSPI:
-- 
2.34.1



[PATCH V4 3/6] doc: beagle: am62x_beagleplay: Add TIFS Stub in image format

2024-07-04 Thread Dhruva Gole
Mention the TIFS Stub in the TISP image format

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  |   2 +-
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg | 353 +
 2 files changed, 354 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 375f26fc5f3e..e7347610173e 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -86,7 +86,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
diff --git a/doc/board/ti/img/tifsstub_dm_tispl.bin.svg 
b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
new file mode 100644
index ..5d56d81f6674
--- /dev/null
+++ b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
@@ -0,0 +1,353 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  FIT Header
+
+  
+
+FIT Header
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  TIFS Stub
+(GP, HS-FS, HS-SE)
+
+  
+
+TIFS Stub...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  TF-A
+
+  
+
+TF-A
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  OP-TEE
+
+  
+
+OP-TEE
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  R5 DM FW
+
+  
+
+R5 DM FW
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-A SPL
+
+  
+
+Cortex-A SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  SPL DTB 1..N
+
+  
+
+SPL DTB 1..N
+  
+
+  
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;
+   id="g64" />
+https://www.drawio.com/doc/faq/svg-export-text-problems;
+   target="_blank"
+   id="a68">
+  Text is not SVG - cannot display
+
+  
+
-- 
2.34.1



[PATCH V4 2/6] doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub

2024-07-04 Thread Dhruva Gole
Add the AM62x boot flow to show at which point the TIFS Stub actually
gets loaded.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  |2 +-
 doc/board/ti/img/boot_diagram_am62.svg | 1983 
 2 files changed, 1984 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 01f04beb55aa..375f26fc5f3e 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -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
diff --git a/doc/board/ti/img/boot_diagram_am62.svg 
b/doc/board/ti/img/boot_diagram_am62.svg
new file mode 100644
index ..44c54dbd2c1e
--- /dev/null
+++ b/doc/board/ti/img/boot_diagram_am62.svg
@@ -0,0 +1,1983 @@
+
+
+
+
+
+http://www.inkscape.org/namespaces/inkscape;
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd;
+   xmlns:xlink="http://www.w3.org/1999/xlink;
+   xmlns="http://www.w3.org/2000/svg;
+   xmlns:svg="http://www.w3.org/2000/svg;
+   xmlns:xhtml="http://www.w3.org/1999/xhtml;>
+  
+  
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R
+
+  
+
+Cortex-R
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  ROM
+
+  
+
+ROM
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R SPL
+
+  
+
+Cortex-R SPL
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load and auth 
tiboot3.bin
+
+  
+
+Load and auth t...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load system
+config data
+
+  
+
+Load system...
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  DDR Config
+
+  
+
+DDR Config
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load tispl.bin
+
+  
+
+Load tispl.bin
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start Cortex-A
+
+  
+
+Start Cortex-A
+  
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start DM
+
+  
+
+Start DM
+  
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Device Mgr
+
+  
+
+Device Mgr
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Start 
Cortex-A
+
+  
+
+Start Cort...
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Load TIFS Stub in TCM
+
+  
+
+Load TIFS St...
+  
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-A
+
+  
+
+Cortex-A
+  
+
+
+
+
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  OP-TEE
+
+  
+
+OP-TEE
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Cortex-R/M
+C6x/C7x
+
+  
+
+Cortex-R/M...
+  
+
+
+
+
+  
+http://www.w3.org/TR/SVG11/feature#Extensibility;>
+  
+
+  Aux f/w
+
+  
+
+Aux f/w
+  
+
+
+

[PATCH V4 1/6] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-07-04 Thread Dhruva Gole
Add support for packaging the TIFS Stub as it's required for basic Low
Power Modes like Deep Sleep.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index 467cac68d0f6..a067b0ba3543 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -78,6 +78,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <0x9dc0>;
+   entry = <0x9dc0>;
+   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";
};
};
-- 
2.34.1



[PATCH V4 0/6] Low Power Mode: Package TIFS Stub in BeaglePlay

2024-07-04 Thread Dhruva Gole
This series includes the binman related changes required to package TIFS
Stub to support Low Power Modes on BeaglePlay.
It also documents the boot flow and tispl packaging details regarding
the same.

Changelog:
* Add more documentation around TIFS Stub for AM62, 62A and 62P
* Fix documentation formatting errors.
* Add entry to MAINTAINERS for doc/board/ti

Link to previous series:
https://lore.kernel.org/u-boot/20240628093252.1864609-1-d-g...@ti.com/

Dhruva Gole (6):
  arm: dts: k3-am625-beagleplay: Package TIFS Stub
  doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub
  doc: beagle: am62x_beagleplay: Add TIFS Stub in image format
  doc: ti: k3: Add TIFS Stub documentation
  doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
  MAINTAINERS: Include the TI docs under ARM TI

 MAINTAINERS  |1 +
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi |   33 +-
 doc/board/beagle/am62x_beagleplay.rst|4 +-
 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 
 doc/board/ti/k3.rst  |5 +
 9 files changed, 2382 insertions(+), 9 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: 0f073e022ddc5070e5df1d053e4bdc1874fbcc0f
-- 
2.34.1



[PATCH] doc: ti: am62*: Add in TIFS Stub boot flow and img fmts

2024-06-28 Thread 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.

Signed-off-by: Dhruva Gole 
---

This series depends on TIFS Stub BeaglePlay series sent previously:
https://lore.kernel.org/u-boot/20240628093252.1864609-1-d-g...@ti.com/

 doc/board/ti/am62ax_sk.rst | 4 ++--
 doc/board/ti/am62px_sk.rst | 4 ++--
 doc/board/ti/am62x_sk.rst  | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/board/ti/am62ax_sk.rst b/doc/board/ti/am62ax_sk.rst
index 60726b6652ce..92da6f65f9d5 100644
--- a/doc/board/ti/am62ax_sk.rst
+++ b/doc/board/ti/am62ax_sk.rst
@@ -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
@@ -144,7 +144,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
diff --git a/doc/board/ti/am62px_sk.rst b/doc/board/ti/am62px_sk.rst
index 1f2982c36f9e..2c4af97967d3 100644
--- a/doc/board/ti/am62px_sk.rst
+++ b/doc/board/ti/am62px_sk.rst
@@ -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
@@ -153,7 +153,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 A53 SPL DDR Memory Layout
diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index b12dc85f06b5..649c8232d76b 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -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
@@ -147,7 +147,7 @@ Image formats:
 
 - tispl.bin
 
-.. image:: img/dm_tispl.bin.svg
+.. image:: img/tifsstub_dm_tispl.bin.svg
   :alt: tispl.bin image format
 
 A53 SPL DDR Memory Layout

base-commit: c27d592304604559276d939a7ef676952062b4ae
-- 
2.34.1



[PATCH V3 4/4] doc: ti: k3: Add TIFS Stub documentation

2024-06-28 Thread Dhruva Gole
Add documentation to briefly explain the role of TIFS Stub in relevant
K3 SoC's.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/k3.rst | 5 +
 1 file changed, 5 insertions(+)

diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 88821a15e4c6..f45a285db21b 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -192,6 +192,11 @@ online
 device resources such as power, clock, interrupts, dma etc. This firmware
 runs on a dedicated or multi-use microcontroller outside the security
 enclave.
+  * **TIFS Stub** - A small piece of code that helps restore the remaining
+context and resume the TIFS firmware when resuming from Low Power Modes
+like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly
+Coupled Memory 'A' of the DM R5) during DM startup. This applies only
+to AM62x, AM62A and AM62P based devices.
 
  OR
 
-- 
2.34.1



[PATCH V3 3/4] doc: beagle: am62x_beagleplay: Add TIFS Stub in image format

2024-06-28 Thread Dhruva Gole
Mention the TIFS Stub in the TISP image format

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  | 2 +-
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index be42e4d9c2ed..a70727adb621 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -87,7 +87,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
diff --git a/doc/board/ti/img/tifsstub_dm_tispl.bin.svg 
b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
new file mode 100644
index ..04e4f15da21f
--- /dev/null
+++ b/doc/board/ti/img/tifsstub_dm_tispl.bin.svg
@@ -0,0 +1,4 @@
+
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
+http://www.w3.org/2000/svg; style="background-color: rgb(255, 255, 
255);" xmlns:xlink="http://www.w3.org/1999/xlink; version="1.1" width="231px" 
height="351px" viewBox="-0.5 -0.5 231 351" content="mxfile 
host=confluence.itg.ti.com 
modified=2024-06-28T06:00:12.998Z agent=Mozilla/5.0 (X11; 
Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0 
etag=tyHDTMUXFR0F8l2WlmTa version=22.0.8 
type=atlasdiagram id=prx1HvI4_W0GNTyXR3Yw 
name=Page-11Zfvj5owGMf/GpLthReggOzlieCZ7TZ3mJjszaXSCs0KNbVOvb9+rRSF1W3eMnPhDbTf5+mP5/MtjVogKvcTDtfFI0OYWq6N9hYYW67reMCTL6UcamXoDGsh5wTppLOQkhesRVurW4LwppMoGKOCrLtixqoKZ6KjQc7Zrpu2YrS76hrmekX7LKQZpNhIWxAkiloN/Vb2AyZ50azs2DpSwiZZC5sCIrZrSSC2QMQZE3Wr3EeYKngNl3pc8pvoaWMcV+KaAeGsmIJkST6uv0L/efE8fsm/DfQsPyDd6oL1ZsWhIcDZtkJYTeJYYLQriMDpGmYqupOeS60QJdXhFaE0YpTx41iAfBwiT+obwdl33IqE7hIEgYyYZTR7wlzgfUvSZU0wK7HgB5mioyDQiPUZc5v+7uyYC7RWtNwCjY1Qn5L8NPcZpGxolq/g6hpck+lcCg8YIsz/wNh+HeOKVfj/QPTsXyB+MCE6wQWIwa0YAoPhfJqkUknFdmm5AZUbGC0lzCBXrXeTmeVGinE6UGm6mcbv+4Dbc6/EfbMj65m4k8G9wU7WJ7qAut82wiu4PVpzARykJK9kN5Pg5GcARgoYkbftvQ6UBCG10kVTurbdwITTffA3E8CtTPANE77MBvM47sMRBuGV9Lxb0QsMek8SqD1+lI9k0QeG3vCtGQ4NhhFT1airwE5nn/pA0XfemmJoUDyis8dzWa/t3N197gXHa+/Df+Aou+ffvsdY6x8EiH8C/diagram/mxfile">http://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
60px; margin-left: 41px;">FIT HeaderFIT Headerhttp://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
185px; margin-left: 41px;">TIFS Stub(GP, HS-FS, 
HS-SE)TIFS 
Stub...http://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
105px; margin-left: 41px;">TF-ATF-Ahttp://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
140px; margin-left: 41px;">OP-TEEOP-TEEhttp://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
230px; margin-left: 41px;">R5 DM FWR5 DM FWhttp://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
270px; margin-left: 41px;">Cortex-A SPLCortex-A SPLhttp://www.w3.org/TR/SVG11/feature#Extensibility;>http://www.w3.org/1999/xhtml; style="display: flex; align-items: unsafe 
center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 
310px; margin-left: 41px;">SPL DTB 1..NSPL DTB 1..Nhttp://www.w3.org/TR/SVG11/feature#Extensibility"/>https://www.drawio.com/doc/faq/svg-export-text-problems; 
target="_blank">Text is not SVG - cannot display
\ No newline at end of file
-- 
2.34.1



[PATCH V3 2/4] doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub

2024-06-28 Thread Dhruva Gole
Add the AM62x boot flow to show at which point the TIFS Stub actually
gets loaded.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst  | 2 +-
 doc/board/ti/img/boot_diagram_am62.svg | 4 
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 doc/board/ti/img/boot_diagram_am62.svg

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 7784e62b0b71..be42e4d9c2ed 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -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
diff --git a/doc/board/ti/img/boot_diagram_am62.svg 
b/doc/board/ti/img/boot_diagram_am62.svg
new file mode 100644
index ..10b7eff6ce63
--- /dev/null
+++ b/doc/board/ti/img/boot_diagram_am62.svg
@@ -0,0 +1,4 @@
+
+
+http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
+http://www.w3.org/2000/svg; style="background-color: rgb(255, 255, 
255);" xmlns:xlink="http://www.w3.org/1999/xlink; version="1.1" width="706px" 
height="951px" viewBox="-0.5 -0.5 706 951" content="mxfile 
host=confluence.itg.ti.com 
modified=2024-06-28T08:45:50.931Z agent=Mozilla/5.0 (X11; 
Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0 
etag=ufQvR89fuflntMrs8rcJ version=22.0.8 
type=atlasdiagram id=2E521vy4SbTbFAe6AtXR 
name=Page-17V1bc+K4Ev41VJ19gLLl+2MCye5WJbWpkDmzc94MCPCMsVkjkrC//ki2fFMLsAEbkpCHBAlZtvvrbvVNSkfrL95/j9zl/DGcYL+DlMl7Rxt0EFJ1Tad/WM8m6bFUK+mYRd6ED8o7ht6/mHcqvHftTfCqNJCEoU+8ZblzHAYBHpNSnxtF4Vt52DT0y3ddujN+RyXvGI5dH4Nh370JmSe9tlEY/Qf2ZvP0zqrCv1m46WDesZq7k/Ct0KXddbR+FIYk+bR472OfES+lS3Ld/ZZvsweLcECqXPD4/eUNPYz+N34e/vvwuvn7+z9409XtZJpX11/zN+ZPSzYpCeZk4dNPake7XYZeQGKKGrcdY8B6cOQtMMER7QwjMg9nYeD6T3nvbRSugwlmD6HQVkYF1hiHC2/MP/vuCPu37vjXLL6gH/ohmzMIA8wuI1H4K0OAPco0DMi9u/B8xlj/xdHEDVzezblIpSS+dX1vFtDGmFIpfhxINk7JVxwR/F7o4mT8HYf0VaINHcK/NRQjuYTztKnyKd5yDkn5d15gDov3uZwnZ9nMOWz0A0euBooqALEfspfpPgMwKf2X7ON64T94U+x7MXmLKPq8u4jh29wjeLh0x+zSNyrptK/AFlT4iEsvibK277vLlTeK78rQjfB4Ha28V/yMVwk6rDdcE3anfia7Solf1E/CL8iwe2WOsRXIMLreswzINLbTFNegq+jvlKbK+JpaD5XxVVUJwBKNoGpNgasBcJ//egT40hckZVFOqJ1C0EHaxHJGCkNp6vl+oX86xeZ4LCMzI5xHV9Ab/sXCm0zYDaVapMwijSFk9ESAoMq21J5E/hpDSL+K34nA1UXxQ4ZRSfxQupCfHFxjx4qsDJ8eDpFEG40004SSODGwPdE/iiSaPRErU4KV0aoomgCth9CdsDsF8e81fTDqd3gjaqxrvZEXAPjKRssec6mM7ARP3bVPBFy59DUFgwWXLB0uWY5EZvSmQLC2gbDarAhedJAZE2kU0U8zklidU2/GfEuXuJ8BEUEwVFQJEA01BAh0DQcDpr76nO4fneC6SHAbaqJWCe5skwDirZb+59A7ItE11T4v0VO7oED1IXEjEjN6vGTffEKqO9WUfXNUhyGLlOoD6KZ8eHrrqXF/Nnpfnf3TeRsCtrJgjsxwUk9gOVne+3CIR99etSfn24+fP3/0jYHE1wfY4skMD3kzh+8u7xXgy8c8hOGSQ/ETE7LhRKc2cViWu3oEX4XraIx3jeNvRbXCDJMdb89flr3hTvwi7LvEey3H9WVYxJfeRJG7KQzgEpHP/MQ6crZQUwnjXGGI0fh64+mH5Alyrshe5QgtADllgF89igNSHmcR4JoKTqljWporcUqxSt1S66M6pboNAwgth4dUGB/aa5fgYHLDcl6M3L67WjGlW0TvGGrulS9Oy67S0x29RM2uCg1rQ6Ih0756kgpEyxQ9KV0xy3MkyodftkNIqXGI9s2V6Kcdc6UDw+l0hUtjTibWMH5xWazRDu5IF6O8pqmeDHgw1xbgTwYqjId8TVBF3Wzq6DBQLcAeesuQVki2f0lILd05EaRWWtDQFqQwZvM1IYVAnE71grkaBhXBkNAVVNZji8H/ynIqmmR225DCeNMV0hgIdKDqlcipLYavTgfqLs8fxstf/rwf0j9Dsh6xOQLW1T+o+uFzureGBkNWLbu3xsltIUq0aPM3a/SctPkjbiJDTTsG78XRg02xVQhmfmQJB2CLBWQ1lLbu5D+2s3vapjU4lPatcZBrkWP7RY66qZQXA0lUXDVlOsZqrC4WVYiMf8msRyZM1eEVwmBmtaRHc9BWKJ9rxKBL73Mh+l7AxVCFirbK5pym6LtnatqThiVz7QK6NyOVBikuFHlT75mHxrk1Rds7WcP46zCS8tdT9+XuDnDBBy2VPFrnGsbZrXYEhTSva71/hDV6ffOdftG33q822gXYaKZyqI3mKI2xVIXk1de00Yy68BrlFdyuaKNpdlPQwhTWzZpqAmVKp3s7RK9fYjjmAJxMASd0dr0OozFJDO1+8DjsX3X3BehutYLuViTS3eD+wQq5r6+pue264AqWXsWKQvUUFYXy3YMwA/aJtg/WxweV4YH6WubnNbe3s0Iy6yp4hwgeSv3gPZJn2lZT2CKAbVr2l6zIR4VEshxJlhBJMiRsO2xzGZIUlholhKZmCjWEcJtIk1kUVF5sVVuwkatGVgxj9zwXUD2owSC5lNMqKPuRbeiGTNnbY/xxlH05FJbtET6btpcUAjND2CPsme8CKvavrID7lp0kg0x3wUgVjFbsz1MUjvFqRXHYZsIHIdlG7iLSXDnrEsgI2x8AkV3Rybxg9hLvHuiaZ15Tjre/7bIkSzLo2WEOJbZoaoe5BkNxCQcorAiCQsBUmBiOu/LDyfgBCQuUlCH0NhkCBtIe3bj2pf/07Yr3sXiL+W0Z3jL/uzm8pdE1z/dcNvlV8hvjBDGKfn5OOHkt1cRdzbPoGWs8uYSCGXASKrGXtpWUJ96KB4xqTTDODcH0qmqcZxdum6jhlKcGA2h/JJFxZYj/6Wg39MMzjs1+JfJXEFNK5wcmI3FslEqmm8dKC9CmAunjKZFI7SgkJFxUN6hTbuMnLvJ7djKXqbogpaVzldnhuPOWYEzrZv/BLhfmX9ffjGco5WxDV3I0WYOetJZekrpTop9UXViFUA1yeo6t5D+okuy26VnrME73jH3srnAu2Eex21b+KG6aPtWmTlsvM5LTJhupQs5MTatR67KRuHggMbF9CXwDY4DCUUjK7rOPaiqtd48kddMKMng7UVsO1fVJO9darLEpNCrrrL31Vag2TyLDFncaoza5MkvUZIfZaIcqN1OYqNr2mFa5EsYJd0am2zu0pbYFr2lqdtZqqgckxRKtntCiwzAfF3p2IM6WkomLpnE5jqpL3KR2CQwDZqPIDcZzqD73Hpay3brmzu5D3Bqg2LLLlPHID8e/qhqNZ/WwUFkfGRU3/tU9NUUz5PeRnoIieUqhZNls13/TYcStJfuuxhpp6bZgOsGTb1s03IxD9wWLfgyY6IglsvZhP0IsMH2WRg/v0WG87+WebX4qp3wAy11+uXTttcVQLIH+MG3f9n7GCnvGP3tNxgE4CgdyONB8l+4qaqpi1YAee77J8IOe23y0dJkOzIDbWpuyBf3hq2zVlS3LghU00qLCVAZPDyN0IL91k5z11xMqy4ZmWLtCtdXfXHdZOLznLc55xnN9AqsCv0vTcjIKN8bv0OHkFE52QYzDCOeevZiw/U+4JB5TU799ZBRsyZ61llGATloatirC8EnJLznnuWXyQ6/lUnIg6cadOs60mp5bco4kiKaV4x2OdmASRHfK/qsjhnca8aWrh19o

[PATCH V3 0/4] Low Power Mode: Pakage TIFS Stub on BeaglePlay

2024-06-28 Thread Dhruva Gole
This series includes the binman related changes required to package tIFS
Stub to support Low Power Modes on BeaglePlay.
Also, based on comments from previous patch [0] documentation has been
added to describe small addition in boot flow as well as tispl image
format.

I am aware that the new boot flow image will need to be updated in
other places like am62a, am62p and even other boards that use am62x.
However, I would like to keep this series beagleplay TIFSStub specific
and so I will be sending a follow up series to update other places
seperately if that's ok.

Changelog:
* Add new image format for TISPL
* Add new changes in boot flow for am62 family of devices.

[0] https://lore.kernel.org/u-boot/20240618045610.271884-1-d-g...@ti.com/

Dhruva Gole (4):
  arm: dts: k3-am625-beagleplay: Package TIFS Stub
  doc: beagle: am62x_beagleplay: Update the boot flow to show TIFS Stub
  doc: beagle: am62x_beagleplay: Add TIFS Stub in image format
  doc: ti: k3: Add TIFS Stub documentation

 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 doc/board/beagle/am62x_beagleplay.rst|  4 +--
 doc/board/ti/img/boot_diagram_am62.svg   |  4 +++
 doc/board/ti/img/tifsstub_dm_tispl.bin.svg   |  4 +++
 doc/board/ti/k3.rst  |  5 +++
 5 files changed, 47 insertions(+), 3 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: c53b344475734d0d29f522b7b1d80c5b8204442d
-- 
2.34.1



[PATCH V3 1/4] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-06-28 Thread Dhruva Gole
Add support for packaging the TIFS Stub as it's required for basic Low
Power Modes like Deep Sleep.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..5e2248a4a668 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -69,6 +69,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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";
pad-byte = <0xff>;
@@ -105,6 +122,19 @@
};
};
 
+   tifsstub-gp {
+   description = "tifsstub";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-gp";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_gp";
+   };
+   };
+
dm {
description = "DM binary";
type = "firmware";
@@ -148,7 +178,8 @@
conf-0 {
description = "k3-am625-beagleplay";
firmware = "atf";
-   loadables = "tee", "dm", "spl";
+   loadables = "tee", "dm", "spl",
+   "tifsstub-gp";
fdt = "fdt-0";
};
};

base-commit: c53b344475734d0d29f522b7b1d80c5b8204442d
-- 
2.34.1



Re: [PATCH v2] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-06-20 Thread Dhruva Gole
Nishanth,

On Jun 19, 2024 at 13:47:36 -0500, Nishanth Menon wrote:
> On 10:26-20240618, Dhruva Gole wrote:
> > Add support for packaging the TIFS Stub as it's required for basic Low
> > Power Modes like Deep Sleep.
> 
> What the heck is tifs stub?
> https://docs.u-boot.org/en/latest/search.html?q=tifs_keywords=yes=default
> I see no mention of the same?

I agree, documentation is lacking, will be sure to add that.

> > 
> > Acked-by: Neha Malcom Francis 
> > Signed-off-by: Dhruva Gole 
> > ---
> > 
> > No changes from v1, just picked Neha's ack and rebased on master again.
> > Link to v1:
> > https://lore.kernel.org/u-boot/20240612062351.3690091-1-d-g...@ti.com/
> > 
> >  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
> >  1 file changed, 32 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
> > b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > index fb2032068d1c..5e2248a4a668 100644
> > --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > @@ -69,6 +69,23 @@
> > };
> > };
> >  
> > +   tifsstub-gp {
> > +   filename = "tifsstub.bin_gp";
> > +   ti-secure-rom {
> > +   content = <_gp>;
> > +   core = "secure";
> > +   load = <0x6>;
> > +   sw-rev = ;
> > +   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";
> > pad-byte = <0xff>;
> > @@ -105,6 +122,19 @@
> > };
> > };
> >  
> > +   tifsstub-gp {
> > +   description = "tifsstub";
> > +   type = "firmware";
> > +   arch = "arm32";
> > +   compression = "none";
> > +   os = "tifsstub-gp";
> > +   load = <0x9dc0>;
> > +   entry = <0x9dc0>;
> 
> two issues with this:
> a) if the tifsstub-gp is not automatically consumed by tifs by the time
> u-boot is up or kernel is up, this is going to get clobbered by OS
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts#n78
> Should be updated before this is done.

This won't be much of a concern, the TIFS Stub is loaded into the R5 ATCM as
soon as the DM R5 core comes up [0] : See the Deep Sleep Exit part, it
talks about this stub.

[0] 
https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/09_01_00/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Power_Management/pm_sw_arch.html

> b) Documentation update - please always make sure you update
>   documentation when doing this kind of change
> https://docs.u-boot.org/en/latest/board/beagle/am62x_beagleplay.html#image-formats

Will do.

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-06-20 Thread Dhruva Gole
Bryan,

On Jun 19, 2024 at 16:44:48 -0500, Bryan Brattlof wrote:
> On June 18, 2024 thus sayeth Dhruva Gole:
> > Add support for packaging the TIFS Stub as it's required for basic Low
> > Power Modes like Deep Sleep.
> > 
> > Acked-by: Neha Malcom Francis 
> > Signed-off-by: Dhruva Gole 
> > ---
> > 
> > No changes from v1, just picked Neha's ack and rebased on master again.
> > Link to v1:
> > https://lore.kernel.org/u-boot/20240612062351.3690091-1-d-g...@ti.com/
> > 
> >  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
> >  1 file changed, 32 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
> > b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > index fb2032068d1c..5e2248a4a668 100644
> > --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > @@ -69,6 +69,23 @@
> > };
> > };
> >  
> > +   tifsstub-gp {
> > +   filename = "tifsstub.bin_gp";
> > +   ti-secure-rom {
> > +   content = <_gp>;
> > +   core = "secure";
> > +   load = <0x6>;
> > +   sw-rev = ;
> > +   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";
> > pad-byte = <0xff>;
> > @@ -105,6 +122,19 @@
> > };
> > };
> >  
> > +   tifsstub-gp {
> > +   description = "tifsstub";
> > +   type = "firmware";
> > +   arch = "arm32";
> > +   compression = "none";
> > +   os = "tifsstub-gp";
> > +   load = <0x9dc0>;
> > +   entry = <0x9dc0>;
> 
> Is this stub position independent? Or is this address compiled in at 
> build time? We have some variants of 62x that don't have these addresses 
> backed by DRAM.

The stub is not position independent and is indeed fixed at build time.
Can you talk more about these am62x variants that don't have the address
backed by DRAM? What would be the suggested address range in those
cases?

For BeaglePlay atleast I don't see an issue. So I don't think we'd have
issues with this patch in particular?

-- 
Best regards,
Dhruva Gole 


Re: [PATCH] board: beagle: beagleplay: enable OF_SYSTEM_SETUP

2024-06-19 Thread Dhruva Gole
On Jun 19, 2024 at 15:44:41 -0500, Andrew Davis wrote:
> On 6/19/24 2:12 PM, Bryan Brattlof wrote:
> > Unfortunately when enabling FDT fixups for the AM62x family of SoCs and
> > moving TF-A to the bottom of RAM we missed the BeaglePlay. This is
> > causing Linux's memory allocator to clobber TF-A and break its boot.
> > 
> > Enable OF_SYSTEM_SETUP to fixup the kernel's FDT to inform it of the
> > actual location of the firmware
> > 
> > CC: Andrew Davis 
> > CC: Nishanth Menon 
> > CC: Robert Nelson 
> > Reported-by: Dhruva Gole 
> > Signed-off-by: Bryan Brattlof 
> > ---
> 
> Acked-by: Andrew Davis 
> 
> > Hello everyone,
> > 
> > Fair warning, this may turn into a philosophical discussion about the
> > role of device-tree with SystemReady and U-Boot's role in enabling true
> > distribution to be completely agnostic of the board it's running on.
> > 
> > However substantively this is simply fixing a boot regression Dhruva
> > found while testing out the beagleplay.
> > 
> > Happy reviewing
> > ~Bryan
> > ---
> >   board/beagle/beagleplay/Kconfig | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/board/beagle/beagleplay/Kconfig 
> > b/board/beagle/beagleplay/Kconfig
> > index 7dbd833acb4cc..896a1c1be3010 100644
> > --- a/board/beagle/beagleplay/Kconfig
> > +++ b/board/beagle/beagleplay/Kconfig
> > @@ -12,6 +12,7 @@ config TARGET_AM625_A53_BEAGLEPLAY
> > bool "BeagleBoard.org AM625 BeaglePlay running on A53"
> >     select ARM64
> > select BINMAN
> > +   select OF_SYSTEM_SETUP

Thanks for the quick fix,
Tested-by: Dhruva Gole 

Boot logs upto kernel prompt:
https://gist.github.com/DhruvaG2000/4dc1c1e42207dd98a144f27cc9dff177

-- 
Best regards,
Dhruva Gole 


Re: [PATCH 1/6] arm: mach-k3: Add default ATF location for AM62/AM62a

2024-06-19 Thread Dhruva Gole
Hi,

On Feb 14, 2024 at 10:30:04 -0600, Andrew Davis wrote:
> There is a default ATF load address that is used for devices that have
> ATF running in SRAM. For AM62 and AM62a, ATF runs from DRAM. Instead
> of having to override the address in every defconfig, make add a
> default for these ATF in DRAM devices.
> 
> Signed-off-by: Andrew Davis 
> ---
>  arch/arm/mach-k3/Kconfig   | 5 +++--
>  configs/am62ax_evm_a53_defconfig   | 1 -
>  configs/am62x_beagleplay_a53_defconfig | 1 -
>  configs/am62x_evm_a53_defconfig| 1 -
>  configs/phycore_am62x_a53_defconfig| 1 -
>  configs/verdin-am62_a53_defconfig  | 1 -
>  6 files changed, 3 insertions(+), 7 deletions(-)
> 

Beagleplay stops booting completely with latest U-boot so I did a little
bisect and it seems like reverting this patch helps.

I am not sure what other implications there are of reverting this so I
don't suggest immediately dropping it, however some hints around what's
missing on beagleplay vs other platforms would be helpful.

Because other platforms based off the same SoC don't seem to be
affected.

-- 
Best regards,
Dhruva Gole 


[PATCH v2] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-06-17 Thread Dhruva Gole
Add support for packaging the TIFS Stub as it's required for basic Low
Power Modes like Deep Sleep.

Acked-by: Neha Malcom Francis 
Signed-off-by: Dhruva Gole 
---

No changes from v1, just picked Neha's ack and rebased on master again.
Link to v1:
https://lore.kernel.org/u-boot/20240612062351.3690091-1-d-g...@ti.com/

 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..5e2248a4a668 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -69,6 +69,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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";
pad-byte = <0xff>;
@@ -105,6 +122,19 @@
};
};
 
+   tifsstub-gp {
+   description = "tifsstub";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-gp";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_gp";
+   };
+   };
+
dm {
description = "DM binary";
type = "firmware";
@@ -148,7 +178,8 @@
conf-0 {
description = "k3-am625-beagleplay";
firmware = "atf";
-   loadables = "tee", "dm", "spl";
+   loadables = "tee", "dm", "spl",
+   "tifsstub-gp";
fdt = "fdt-0";
};
};

base-commit: 16324b43db3f2b4fbbc3b701893fcfc4104f33fb
-- 
2.34.1



[PATCH v2] board: beagleplay: Fix the bootpart to pick from root partition

2024-06-17 Thread Dhruva Gole
The Kernel Image and DTB files are supposed to be picked from the rootfs
of the SD Card, this fails in legacy boot flow because bootpart is set
to 1:1. Fix it.

Fixes: a200f428b5b21 ("board: ti: am62x: Add am62x_beagleplay_* defconfigs and 
env file")
Reviewed-by: Nishanth Menon 
Acked-by: Chirag Shilwant 
Signed-off-by: Dhruva Gole 
---

No changes, just picked the r-by's and acks.

Link to v1:
https://lore.kernel.org/u-boot/20240613080604.3828083-1-d-g...@ti.com/


 board/beagle/beagleplay/beagleplay.env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/beagle/beagleplay/beagleplay.env 
b/board/beagle/beagleplay/beagleplay.env
index bbf6b925d02c..190181c8ad0c 100644
--- a/board/beagle/beagleplay/beagleplay.env
+++ b/board/beagle/beagleplay/beagleplay.env
@@ -11,7 +11,7 @@ set_led_state_start_load=led led-0 on; led led-1 off;
led led-2 on; led led-3 off; led led-4 on
 boot=mmc
 mmcdev=1
-bootpart=1:1
+bootpart=1:2
 bootdir=/boot
 boot_targets=mmc1 mmc0
 bootmeths=script extlinux efi pxe

base-commit: 16324b43db3f2b4fbbc3b701893fcfc4104f33fb
-- 
2.34.1



[PATCH v4 2/2] doc: beagle: am62x_beagleplay: Rename the boot bins

2024-06-17 Thread Dhruva Gole
Rename the boot bins as the _unsigned postfixes are not longer
required. We have symlinks in place for having generic names for all the
boot bins now.

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 7784e62b0b71..f5a85dd1fb82 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -71,11 +71,10 @@ Set the variables corresponding to this platform:
 
 Target Images
 -
-Copy the below images to an SD card and boot:
+Copy these images to an SD card and boot:
 
-* tiboot3-am62x-gp-evm.bin from R5 build as tiboot3.bin
-* tispl.bin_unsigned from Cortex-A build as tispl.bin
-* u-boot.img_unsigned from Cortex-A build as u-boot.img
+* tiboot3.bin from Cortex-R5 build.
+* tispl.bin and u-boot.img from Cortex-A build
 
 Image formats
 -
-- 
2.34.1



[PATCH v4 1/2] arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tispl

2024-06-17 Thread Dhruva Gole
Add symlinks for both tiboot3.bin and tispl.bin because a user has to
anyway rename these files to get the platform to boot up.
This just makes it more intuitive and convenient.

Reviewed-by: Manorit Chawdhry 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 1 +
 arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..bd48af8d186a 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -71,6 +71,7 @@
 
ti-spl_unsigned {
filename = "tispl.bin_unsigned";
+   symlink = "tispl.bin";
pad-byte = <0xff>;
 
fit {
diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts 
b/arch/arm/dts/k3-am625-r5-beagleplay.dts
index 9db58f093c8c..da6746e009d5 100644
--- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
+++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
@@ -79,6 +79,7 @@
  {
tiboot3-am62x-gp-evm.bin {
filename = "tiboot3-am62x-gp-evm.bin";
+   symlink = "tiboot3.bin";
ti-secure-rom {
content = <_boot_spl_unsigned>, <_fs_gp>,
<_tifs_cfg_gp>, <_dm_cfg_gp>;
-- 
2.34.1



[PATCH v4 0/2] k3-am625-beagleplay: Add symlinks for tiboot3 and tispl

2024-06-17 Thread Dhruva Gole
Add symlinks for both tiboot3.bin and tispl.bin because a user has to
anyway rename these files to get the platform to boot up.
Also update the documentation to reflect above change.

Changes in v4:
* Add the docs patch.

Cc: Nishant Menon 
Cc: Robert Nelson 

Dhruva Gole (2):
  arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tispl
  doc: beagle: am62x_beagleplay: Rename the boot bins

 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 1 +
 arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
 doc/board/beagle/am62x_beagleplay.rst| 7 +++
 3 files changed, 5 insertions(+), 4 deletions(-)


base-commit: 16324b43db3f2b4fbbc3b701893fcfc4104f33fb
-- 
2.34.1



Re: [PATCH] mtd: spi-nor: ids: Add IS25LP01GG flash support

2024-06-17 Thread Dhruva Gole
On Jun 17, 2024 at 09:48:42 +0530, Prasad Kummari wrote:
> Add support for ISSI 128MB flash IS25LP01GG. This part

Can we have the datasheet link for this part?
I am assuming it's this?
https://www.issi.com/WW/pdf/25LP-WP01GG.pdf

Better to add it to the commit message.

> supports 4byte opcodes. It also supports dual and quad
> read.
> 
> Signed-off-by: Prasad Kummari 
> ---
>  drivers/mtd/spi/spi-nor-ids.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> index 4e83b8c94c..8cad764237 100644
> --- a/drivers/mtd/spi/spi-nor-ids.c
> +++ b/drivers/mtd/spi/spi-nor-ids.c
> @@ -242,6 +242,8 @@ const struct flash_info spi_nor_ids[] = {
>   SECT_4K | USE_FSR | SPI_NOR_OCTAL_READ | 
> SPI_NOR_4B_OPCODES) },
>   { INFO("is25lx512",  0x9d5a1a, 0, 64 * 1024, 1024,
>   SECT_4K | USE_FSR | SPI_NOR_4B_OPCODES | 
> SPI_NOR_HAS_TB) },
> + { INFO("is25lp01gg",  0x9d6021, 0, 64 * 1024, 2048,
> + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | 
> SPI_NOR_HAS_TB) },

Otherwise looks good to me,
Reviewed-by: Dhruva Gole 


-- 
Best regards,
Dhruva


Re: [PATCH] board: beagleplay: Fix the bootpart to pick from root partition

2024-06-17 Thread Dhruva Gole
Hi Robert and Bryan,

On Jun 15, 2024 at 21:30:55 -0500, Robert Nelson wrote:
> On Sat, Jun 15, 2024 at 8:55 PM Bryan Brattlof  wrote:
> >
> > On June 13, 2024 thus sayeth Dhruva Gole:
> > > The Kernel Image and DTB files are supposed to be picked from the rootfs
> > > of the SD Card, this fails in legacy boot flow because bootpart is set
> > > to 1:1. Fix it.
> > >
> > > Fixes: a200f428b5b21 ("board: ti: am62x: Add am62x_beagleplay_*
> > > defconfigs and env file")
> > > Signed-off-by: Dhruva Gole 
> > > ---
> > >  board/beagle/beagleplay/beagleplay.env | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/board/beagle/beagleplay/beagleplay.env 
> > > b/board/beagle/beagleplay/beagleplay.env
> > > index bbf6b925d02c..190181c8ad0c 100644
> > > --- a/board/beagle/beagleplay/beagleplay.env
> > > +++ b/board/beagle/beagleplay/beagleplay.env
> > > @@ -11,7 +11,7 @@ set_led_state_start_load=led led-0 on; led led-1 off;
> > >   led led-2 on; led led-3 off; led led-4 on
> > >  boot=mmc
> > >  mmcdev=1
> > > -bootpart=1:1
> > > +bootpart=1:2
> > >  bootdir=/boot
> > >  boot_targets=mmc1 mmc0
> > >  bootmeths=script extlinux efi pxe
> >
> > Shouldn't the fix be to just drop 'script' from bootmeths. These TI
> > scripts needed to go away years ago.
> 
> I agree! nuke the non bootmeth's. ;)

People are still using legacy bootmethods out there. I think the cleanup
will still take time till everyone is on the same page and I feel like
beagle being a community platform, doesn't mandate to use a "fixed" boot
flow atleast until stdboot is fully at feature parity with legacy boot.
Some users may still care for the legacy boot method.

>From the discussions so far it seems evident to me that the BeagleBone
debian images are anyway going to be unaffected by this change so that
removes the question of it causing any regressions on that end.

People who do want to use legacy boot and pick kernel image and DTB from
their root partitions will benefit from this change for sure.

So I don't really see the need/argument here to not go ahead with this patch?

We can definitely have separate discussion around whether we need to remove
legacy flow bits from upstream U-Boot, but no reason to keep this small fix
blocked till we have those discussions is what I feel.

-- 
Best regards,
Dhruva Gole 


[PATCH v3] arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tispl

2024-06-14 Thread Dhruva Gole
Add symlinks for both tiboot3.bin and tispl.bin because a user has to
anyway rename these files to get the platform to boot up.
This just makes it more intuitive and convenient.

Signed-off-by: Dhruva Gole 
---

This is just a RESEND of v1, because the changes in v2 were not
required. Link to previous revision:
https://lore.kernel.org/u-boot/20240614115340.4091211-1-d-g...@ti.com/


 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 1 +
 arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..bd48af8d186a 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -71,6 +71,7 @@
 
ti-spl_unsigned {
filename = "tispl.bin_unsigned";
+   symlink = "tispl.bin";
pad-byte = <0xff>;
 
fit {
diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts 
b/arch/arm/dts/k3-am625-r5-beagleplay.dts
index 9db58f093c8c..da6746e009d5 100644
--- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
+++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
@@ -79,6 +79,7 @@
  {
tiboot3-am62x-gp-evm.bin {
filename = "tiboot3-am62x-gp-evm.bin";
+   symlink = "tiboot3.bin";
ti-secure-rom {
content = <_boot_spl_unsigned>, <_fs_gp>,
<_tifs_cfg_gp>, <_dm_cfg_gp>;

base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec
-- 
2.34.1



Re: [PATCH V2] arm: dts: k3-am625-beagleplay: Add symlinks for boot binaries

2024-06-14 Thread Dhruva Gole
On Jun 14, 2024 at 17:23:40 +0530, Dhruva Gole wrote:
> Add symlinks for tiboot3.bin, tispl.bin & u-boot.img because a user has to
> anyway rename these files to get the platform to boot up.
> This just makes it more intuitive and convenient.
> 
> Signed-off-by: Dhruva Gole 
> ---
> 
> Changes:
> Add symlink for u-boot.img as well as per Manorit's suggestion.
> 
> Link to prev. patch:
> https://lore.kernel.org/u-boot/20240614084052.4029849-1-d-g...@ti.com/
> 
> Cc: Manorit Chawdhry 
> Cc: Nishant Menon 
> Cc: Robert Nelson 
>  [...]

NAK.
Please do not apply this patch, it seems that u-boot.img file didn't
need a symlink in the first place as it was getting generated without a
symlink. I am not sure why u-boot.img is special in this regard but
tispl and tiboot3 still require the symlinks. I'll resend the first
correct patch again.

Please excuse the noise.

-- 
Best regards,
Dhruva Gole 


Re: [PATCH] arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tispl

2024-06-14 Thread Dhruva Gole
On Jun 14, 2024 at 15:16:30 +0530, Manorit Chawdhry wrote:
> Hi Dhruva,
> 
> On 14:10-20240614, Dhruva Gole wrote:
> > Add symlinks for both tiboot3.bin and tispl.bin because a user has to
> > anyway rename these files to get the platform to boot up.
> > This just makes it more intuitive and convenient.
> > 
> > Signed-off-by: Dhruva Gole 
> > ---
> >  arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 1 +
> >  arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
> >  2 files changed, 2 insertions(+)
> > 
> > diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
> > b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > index fb2032068d1c..bd48af8d186a 100644
> > --- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > +++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
> > @@ -71,6 +71,7 @@
> >  
> > ti-spl_unsigned {
> > filename = "tispl.bin_unsigned";
> > +   symlink = "tispl.bin";
> > pad-byte = <0xff>;
> >  
> > fit {
> > diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts 
> > b/arch/arm/dts/k3-am625-r5-beagleplay.dts
> > index 9db58f093c8c..da6746e009d5 100644
> > --- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
> > +++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
> > @@ -79,6 +79,7 @@
> >   {
> > tiboot3-am62x-gp-evm.bin {
> > filename = "tiboot3-am62x-gp-evm.bin";
> > +   symlink = "tiboot3.bin";
> > ti-secure-rom {
> >     content = <_boot_spl_unsigned>, <_fs_gp>,
> > <_tifs_cfg_gp>, <_dm_cfg_gp>;
> 
> Maybe do it for u-boot.img_unsigned as well, I see that also doesn't have a
> symlink.

Good catch, sent out a v2 with this added.
Thanks.

-- 
Dhruva Gole 


[PATCH V2] arm: dts: k3-am625-beagleplay: Add symlinks for boot binaries

2024-06-14 Thread Dhruva Gole
Add symlinks for tiboot3.bin, tispl.bin & u-boot.img because a user has to
anyway rename these files to get the platform to boot up.
This just makes it more intuitive and convenient.

Signed-off-by: Dhruva Gole 
---

Changes:
Add symlink for u-boot.img as well as per Manorit's suggestion.

Link to prev. patch:
https://lore.kernel.org/u-boot/20240614084052.4029849-1-d-g...@ti.com/

Cc: Manorit Chawdhry 
Cc: Nishant Menon 
Cc: Robert Nelson 

 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 2 ++
 arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
 2 files changed, 3 insertions(+)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..77e6292d790f 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -71,6 +71,7 @@
 
ti-spl_unsigned {
filename = "tispl.bin_unsigned";
+   symlink = "tispl.bin";
pad-byte = <0xff>;
 
fit {
@@ -157,6 +158,7 @@
 
u-boot_unsigned {
filename = "u-boot.img_unsigned";
+   symlink = "u-boot.img";
pad-byte = <0xff>;
 
fit {
diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts 
b/arch/arm/dts/k3-am625-r5-beagleplay.dts
index 9db58f093c8c..da6746e009d5 100644
--- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
+++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
@@ -79,6 +79,7 @@
  {
tiboot3-am62x-gp-evm.bin {
filename = "tiboot3-am62x-gp-evm.bin";
+   symlink = "tiboot3.bin";
ti-secure-rom {
content = <_boot_spl_unsigned>, <_fs_gp>,
<_tifs_cfg_gp>, <_dm_cfg_gp>;

base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec
-- 
2.34.1



[PATCH] arm: dts: k3-am625-beagleplay: Add symlinks for tiboot3 and tispl

2024-06-14 Thread Dhruva Gole
Add symlinks for both tiboot3.bin and tispl.bin because a user has to
anyway rename these files to get the platform to boot up.
This just makes it more intuitive and convenient.

Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 1 +
 arch/arm/dts/k3-am625-r5-beagleplay.dts  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..bd48af8d186a 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -71,6 +71,7 @@
 
ti-spl_unsigned {
filename = "tispl.bin_unsigned";
+   symlink = "tispl.bin";
pad-byte = <0xff>;
 
fit {
diff --git a/arch/arm/dts/k3-am625-r5-beagleplay.dts 
b/arch/arm/dts/k3-am625-r5-beagleplay.dts
index 9db58f093c8c..da6746e009d5 100644
--- a/arch/arm/dts/k3-am625-r5-beagleplay.dts
+++ b/arch/arm/dts/k3-am625-r5-beagleplay.dts
@@ -79,6 +79,7 @@
  {
tiboot3-am62x-gp-evm.bin {
filename = "tiboot3-am62x-gp-evm.bin";
+   symlink = "tiboot3.bin";
ti-secure-rom {
content = <_boot_spl_unsigned>, <_fs_gp>,
<_tifs_cfg_gp>, <_dm_cfg_gp>;

base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec
-- 
2.34.1



Re: [PATCH] board: beagleplay: Fix the bootpart to pick from root partition

2024-06-14 Thread Dhruva Gole
Robert,

On Jun 13, 2024 at 16:51:24 -0500, Robert Nelson wrote:
> On Thu, Jun 13, 2024 at 4:47 PM Robert Nelson  wrote:
> >
> > On Thu, Jun 13, 2024 at 3:06 AM Dhruva Gole  wrote:
> > >
> > > The Kernel Image and DTB files are supposed to be picked from the rootfs
> > > of the SD Card, this fails in legacy boot flow because bootpart is set
> > > to 1:1. Fix it.
> >
> > and where is that rule defined?
> >
> > Production boards ship with Kernel Image and DTB's in the 1st fat 
> > partition..
> 
> Besides, u-boot should scan for extlinux.conf on "any" partition.

I can see where you come from, and I agree on the above points when it
comes to stdboot.
However when a user wishes to use legacy boot, and in the case there
isn't extlinux.conf in such a case u-boot will rely on information in
the env file (please correct me if my understanding is wrong).

The env file says:
bootdir=/boot

Thus u-boot ends up looking for Image and dtb in /boot/Image under BOOT
partition, and ultimately fails, because the /boot/Image path is
generally found inside the root partition ie. 1:2

The idea of this patch is to keep support for such legacy boot alive, if
you feel there's another way to do this feel free to suggest.

--
Dhruva


[PATCH] board: beagleplay: Fix the bootpart to pick from root partition

2024-06-13 Thread Dhruva Gole
The Kernel Image and DTB files are supposed to be picked from the rootfs
of the SD Card, this fails in legacy boot flow because bootpart is set
to 1:1. Fix it.

Fixes: a200f428b5b21 ("board: ti: am62x: Add am62x_beagleplay_* defconfigs and 
env file")
Signed-off-by: Dhruva Gole 
---
 board/beagle/beagleplay/beagleplay.env | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/beagle/beagleplay/beagleplay.env 
b/board/beagle/beagleplay/beagleplay.env
index bbf6b925d02c..190181c8ad0c 100644
--- a/board/beagle/beagleplay/beagleplay.env
+++ b/board/beagle/beagleplay/beagleplay.env
@@ -11,7 +11,7 @@ set_led_state_start_load=led led-0 on; led led-1 off;
led led-2 on; led led-3 off; led led-4 on
 boot=mmc
 mmcdev=1
-bootpart=1:1
+bootpart=1:2
 bootdir=/boot
 boot_targets=mmc1 mmc0
 bootmeths=script extlinux efi pxe
-- 
2.34.1



[PATCH] arm: dts: k3-am625-beagleplay: Package TIFS Stub

2024-06-12 Thread Dhruva Gole
Add support for packaging the TIFS Stub as it's required for basic Low
Power Modes like Deep Sleep.

Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi 
b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index fb2032068d1c..5e2248a4a668 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -69,6 +69,23 @@
};
};
 
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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";
pad-byte = <0xff>;
@@ -105,6 +122,19 @@
};
};
 
+   tifsstub-gp {
+   description = "tifsstub";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-gp";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_gp";
+   };
+   };
+
dm {
description = "DM binary";
type = "firmware";
@@ -148,7 +178,8 @@
conf-0 {
description = "k3-am625-beagleplay";
firmware = "atf";
-   loadables = "tee", "dm", "spl";
+   loadables = "tee", "dm", "spl",
+   "tifsstub-gp";
fdt = "fdt-0";
};
};
-- 
2.34.1



[PATCH 2/2] arm: dts: k3: binman: am62p: add support for signing TIFSStub images

2024-06-07 Thread Dhruva Gole
Adds TIFS stub binaries, this is required for deepsleep functionality.

This implements the same change as commit 128f81290b7d ("arm: dts: k3:
binman: am625: add support for signing TIFSSTUB Images") did for TI AM62
SK board.

Signed-off-by: Vibhore Vardhan 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am62p-sk-binman.dtsi | 65 +++-
 1 file changed, 64 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/k3-am62p-sk-binman.dtsi 
b/arch/arm/dts/k3-am62p-sk-binman.dtsi
index dea14945bf56..210179756a79 100644
--- a/arch/arm/dts/k3-am62p-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am62p-sk-binman.dtsi
@@ -74,12 +74,74 @@
filename = 
"ti-dm/am62pxx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
};
};
+   tifsstub-hs {
+   filename = "tifsstub.bin_hs";
+   ti-secure-rom {
+   content = <_hs_cert>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   keyfile = "custMpk.pem";
+   countersign;
+   tifsstub;
+   };
+   tifsstub_hs_cert: tifsstub-hs-cert.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62px-hs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   tifsstub_hs_enc: tifsstub-hs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62px-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-am62px-hs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   tifsstub_fs_enc: tifsstub-fs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62px-hs-enc.bin";
+   type = "blob-ext";
+   optional;
+   };
+
+   };
 
ti-spl {
insert-template = <_spl_template>;
 
fit {
images {
+   tifsstub-hs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-hs";
+   load = <0x9ca0>;
+   entry = <0x9ca0>;
+   blob-ext {
+   filename = "tifsstub.bin_hs";
+   };
+   };
+
+   tifsstub-fs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-fs";
+   load = <0x9ca0>;
+   entry = <0x9ca0>;
+   blob-ext {
+   filename = "tifsstub.bin_fs";
+   };
+   };
dm {
ti-secure {
content = <>;
@@ -116,7 +178,8 @@
conf-0 {
description = "k3-am62px-sk";
firmware = "atf";
-   loadables = "tee", "dm", "spl";
+   loadables = "tee", "dm", "spl",
+   "tifsstub-hs", "tifsstub-fs";
fdt = "fdt-0";
};
};
-- 
2.34.1



[PATCH 1/2] arm: dts: k3: binman: am62a: add support for signing TIFSStub Images

2024-06-07 Thread Dhruva Gole
Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
and include them in tispl.bin and tispl.bin_unsigned.

This implements the same change as commit 128f81290b7d ("arm: dts: k3:
binman: am625: add support for signing TIFSSTUB Images") did for TI AM62
SK board.

Signed-off-by: Vibhore Vardhan 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am62a-sk-binman.dtsi | 138 ++-
 1 file changed, 136 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/k3-am62a-sk-binman.dtsi 
b/arch/arm/dts/k3-am62a-sk-binman.dtsi
index ec3bf7ce913b..d7ecd84c83da 100644
--- a/arch/arm/dts/k3-am62a-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am62a-sk-binman.dtsi
@@ -154,11 +154,105 @@
filename = 
"ti-dm/am62axx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
};
};
+
+   tifsstub-hs {
+   filename = "tifsstub.bin_hs";
+   ti-secure-rom {
+   content = <_hs_cert>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   keyfile = "custMpk.pem";
+   countersign;
+   tifsstub;
+   };
+   tifsstub_hs_cert: tifsstub-hs-cert.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62ax-hs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   tifsstub_hs_enc: tifsstub-hs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62ax-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-am62ax-hs-cert.bin";
+   type = "blob-ext";
+   optional;
+   };
+   tifsstub_fs_enc: tifsstub-fs-enc.bin {
+   filename = 
"ti-sysfw/ti-fs-stub-firmware-am62ax-hs-enc.bin";
+   type = "blob-ext";
+   optional;
+   };
+
+   };
+
+   tifsstub-gp {
+   filename = "tifsstub.bin_gp";
+   ti-secure-rom {
+   content = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   keyfile = "ti-degenerate-key.pem";
+   tifsstub;
+   };
+   tifsstub_gp: tifsstub-gp.bin {
+   filename = "ti-sysfw/ti-fs-stub-firmware-am62ax-gp.bin";
+   type = "blob-ext";
+   optional;
+   };
+   };
+
ti-spl {
insert-template = <_spl_template>;
 
fit {
images {
+   tifsstub-hs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-hs";
+   load = <0x9ca0>;
+   entry = <0x9ca0>;
+   blob-ext {
+   filename = "tifsstub.bin_hs";
+   };
+   };
+
+   tifsstub-fs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-fs";
+   load = <0x9ca0>;
+   entry = <0x9ca0>;
+   blob-ext {
+   filename = "tifsstub.bin_fs";
+   };
+   };
+
+   tifsstub-gp {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arc

[PATCH 0/2] binman: am62a/62p: add support for signing TIFSStub

2024-06-07 Thread Dhruva Gole
Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
and include them in tispl.bin and tispl.bin_unsigned in AM62A.

AM62P doesn't have any GP support, hence not applicable.

These changes are required for Low Power Mode features to work on these
SoCs as this TIFS Stub gets used in the Low Power Exit sequences.

Boot tested on both platforms that are being touched:

[0] AM62A, [1] AM62P

[0] https://gist.github.com/DhruvaG2000/d5f2a46818d8025a540efe9289feacb4
[1] https://gist.github.com/DhruvaG2000/ce29f6e9315a78d3e9e5810f55f17f43

Dhruva Gole (2):
  arm: dts: k3: binman: am62a: add support for signing TIFSStub Images
  arm: dts: k3: binman: am62p: add support for signing TIFSStub images

 arch/arm/dts/k3-am62a-sk-binman.dtsi | 138 ++-
 arch/arm/dts/k3-am62p-sk-binman.dtsi |  65 -
 2 files changed, 200 insertions(+), 3 deletions(-)


base-commit: 1ebd659cf020843fd8e8ef90d85a66941cbab6ec
-- 
2.34.1



Re: [PATCH 0/3] arm: dts: am625/am62a7: Switch over to OF_UPSTREAM

2024-06-05 Thread Dhruva Gole
Hi,

On Jun 05, 2024 at 10:27:49 -0500, Nishanth Menon wrote:
> Cleanup am625 on by switching over the last two platforms (SK and
> beagleplay) over to OF_UPSTREAM, and while at it, switch over am62a7
> (last of the am62* family) over as well.

Thanks for the cleanup.

> 
> This superscedes the previous version of beagleplay only patch[1]
> 
> Test logs: https://gist.github.com/nmenon/ba310d3750a80789aca6a4fd90190135
> 
> Nishanth Menon (3):
>   arm: dts: am625_beagleplay: Switch to OF_UPSTREAM
>   arm: dts: am625_sk: Switch to OF_UPSTREAM
>   arm: dts: am62a7_sk: Switch to OF_UPSTREAM
> 

For the series,
Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole


Re: [PATCH v2 0/8] Add DFU, emmc and usb boot for TI am62x

2024-05-29 Thread Dhruva Gole
Hi Sjoerd,

On Aug 21, 2023 at 14:20:26 -0400, Tom Rini wrote:
> On Mon, Aug 21, 2023 at 04:13:32PM +, Marcel Ziswiler wrote:
> > Hi Sjoerd
> > 
> > On Thu, 2023-06-01 at 08:37 +0200, Sjoerd Simons wrote:
> > > On Wed, 2023-05-31 at 17:14 -0400, Tom Rini wrote:
> > > > On Thu, Apr 06, 2023 at 08:55:34PM +0200, Sjoerd Simons wrote:
> > > > 
> > > > > This series adds more boot sources for the TI am62x. For that the
> > > > > dts'
> > > > > are synced from the upstream ti-next git tree (to add usb nodes),
> > > > > some
> > > > > dwc3 glue is and finally the default configuration is tuned to add
> > > > > support for DFU and USB (host and gadget)
> > > > 
> > > > This seems, conceptually, fine.  But as we're getting the TI dts
> > > > files
> > > > in sync with the kernel, I'm deferring this version and you'll want
> > > > to
> > > > rebase and re-post once everything has settled.
> > > 
> > > Thanks for the update/hint ;) I also got a few review comments so the
> > > plan is to include those and repost.. Just my may has been stupidly
> > > busy causing me to not get around it in the first place, so maybe that
> > > turned into good timing in the end.
> > 
> > Any progress on this?
> > 
> > I still carry your re-based series on top of latest master [1] and USB DFU 
> > is working very well on Verdin AM62.
> > 
> > Thanks!
> > 
> > [1] https://github.com/ziswiler/u-boot/tree/verdin-am62-usb-support
> 
> As the am62 files have been re-synced, re-basing this and re-posting for
> next would be appropriate at this point.

Any updates on this? Do you have plans to rebase and resend this series?



-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2 2/5] board: phytec: Fix function definitions in AM6x SOM detection

2024-05-22 Thread Dhruva Gole
On May 22, 2024 at 09:55:02 +0200, Wadim Egorov wrote:
> Functions are declared as phytec_am6* and not phytec_am62*.
> Update the definitions to match the declarations.
> 
> Fixes: 9d152c23279c ("board: phytec: Add SOM detection for AM6x")
> 
> Signed-off-by: Wadim Egorov 
> Tested-by: John Ma 
> ---
>  board/phytec/common/am6_som_detection.c | 18 +-
>  1 file changed, 9 insertions(+), 9 deletions(-)

Reviewed-by: Dhruva Gole 

[...]

-- 
Best regards,
Dhruva Gole


Re: [PATCH v2 1/5] board: phytec: Make AM6 SoM detection depend on I2C

2024-05-22 Thread Dhruva Gole
Hi,

On May 22, 2024 at 09:55:01 +0200, Wadim Egorov wrote:
> SoM detection is using I2C driver model functions.
> Let's depend on I2C.
> 
> Signed-off-by: Wadim Egorov 
> Tested-by: John Ma 
> ---

Reviewed-by: Dhruva Gole 


-- 
Best regards,
Dhruva Gole


Re: [PATCH 2/2] configs: add defconfigs for the am625-lp-sk

2024-05-02 Thread Dhruva Gole
On Apr 30, 2024 at 14:57:46 -0500, Bryan Brattlof wrote:
> The am62x-lp-sk is a package and reference board spin of the am62x-sk to
> showcase the low-power features of the am62x SoC family. Because it so
> closely resembles the am62x-sk board, us the preprocessor to inherit its

s/us/use

> configuration making the needed changes for this board.
> 
> Signed-off-by: Bryan Brattlof 
> ---
>  configs/am62x_lp_sk_a53_defconfig | 3 +++
>  configs/am62x_lp_sk_r5_defconfig  | 2 ++
>  2 files changed, 5 insertions(+)
> 
> diff --git a/configs/am62x_lp_sk_a53_defconfig 
> b/configs/am62x_lp_sk_a53_defconfig
> new file mode 100644
> index 0..904b2142b2f53
> --- /dev/null
> +++ b/configs/am62x_lp_sk_a53_defconfig
> @@ -0,0 +1,3 @@
> +#include 
> +CONFIG_DEFAULT_DEVICE_TREE="ti/k3-am62-lp-sk"
> +CONFIG_OF_UPSTREAM=y
> diff --git a/configs/am62x_lp_sk_r5_defconfig 
> b/configs/am62x_lp_sk_r5_defconfig
> new file mode 100644
> index 0..93b3922e6fec5
> --- /dev/null
> +++ b/configs/am62x_lp_sk_r5_defconfig
> @@ -0,0 +1,2 @@
> +#include 
> +CONFIG_DEFAULT_DEVICE_TREE="k3-am62-r5-lp-sk"

Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH 1/2] arm: dts: add U-Boot dtbs for the am625-lp-sk

2024-05-02 Thread Dhruva Gole
On Apr 30, 2024 at 14:57:45 -0500, Bryan Brattlof wrote:
> From: Nitin Yadav 
> 
> Add the U-Boot device tree overrides for the am62x-lp-sk reference
> board.
> 
> Signed-off-by: Nitin Yadav 
> Signed-off-by: Bryan Brattlof 
> ---
>  arch/arm/dts/k3-am62-lp-sk-binman.dtsi   |   21 +
>  arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi   |   17 +
>  arch/arm/dts/k3-am62-lp4-50-800-800.dtsi | 2190 
> ++
>  arch/arm/dts/k3-am62-r5-lp-sk.dts|   82 ++
>  4 files changed, 2310 insertions(+)
> 
> diff --git a/arch/arm/dts/k3-am62-lp-sk-binman.dtsi 
> b/arch/arm/dts/k3-am62-lp-sk-binman.dtsi
> new file mode 100644
> index 0..de425a4b54f81
> --- /dev/null
> +++ b/arch/arm/dts/k3-am62-lp-sk-binman.dtsi
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/

Can make this 2024, here and everywhere else.

> + */
> +
> +#include "k3-binman.dtsi"
> +#include "k3-am625-sk-binman.dtsi"
> +
> +#ifdef CONFIG_TARGET_AM625_A53_EVM
> +
> +#define SPL_AM62_LP_SK_DTB "spl/dts/ti/k3-am62-lp-sk.dtb"
> +
> +_am625_sk_dtb {
> + filename = SPL_AM62_LP_SK_DTB;
> +};
> +
> +_am625_sk_dtb_unsigned {
> + filename = SPL_AM62_LP_SK_DTB;
> +};
> +
> +#endif
> diff --git a/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi 
> b/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi
> new file mode 100644
> index 0..08f572446657e
> --- /dev/null
> +++ b/arch/arm/dts/k3-am62-lp-sk-u-boot.dtsi
> @@ -0,0 +1,17 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * AM62x LP SK dts file for SPLs
> + * Copyright (C) 2021-2023 Texas Instruments Incorporated - 
> https://www.ti.com/

2024 ^^

[...]

With that fixed,
Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2 1/3] mtd: spi-nore-core: Fix 4KB erase opcode for s25fs-s

2024-04-10 Thread Dhruva Gole
On Apr 09, 2024 at 15:20:20 +0900, tkuw584...@gmail.com wrote:
> From: Takahiro Kuwano 
> 
> The correct 4KB erase opcode should be selected based on the address width
> currently used.
> 
> Fixes: 562d166a13 ("mtd: spi-nor-core: Add fixups for s25fs512s")
> Signed-off-by: Takahiro Kuwano 
> ---
>  drivers/mtd/spi/spi-nor-core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
> index f86003ca8c..9620852817 100644
> --- a/drivers/mtd/spi/spi-nor-core.c
> +++ b/drivers/mtd/spi/spi-nor-core.c
> @@ -3299,8 +3299,10 @@ static int s25fs_s_quad_enable(struct spi_nor *nor)
>  
>  static int s25fs_s_erase_non_uniform(struct spi_nor *nor, loff_t addr)
>  {
> + u8 opcode = nor->addr_width == 4 ? SPINOR_OP_BE_4K_4B : SPINOR_OP_BE_4K;
> +
>   /* Support 8 x 4KB sectors at bottom */
> - return spansion_erase_non_uniform(nor, addr, SPINOR_OP_BE_4K_4B, 0, 
> SZ_32K);
> +     return spansion_erase_non_uniform(nor, addr, opcode, 0, SZ_32K);

Reviewed-by: Dhruva Gole 


-- 
Best regards,
Dhruva


Re: [PATCH v2 2/3] mtd: spi-nor-id: Use INFO6 macro for S25FL-S

2024-04-10 Thread Dhruva Gole
On Apr 09, 2024 at 15:20:21 +0900, tkuw584...@gmail.com wrote:
> From: Takahiro Kuwano 
> 
> The 6th ID byte is needed to distiguish S25FL-S and S25FS-S families.
> 
> Signed-off-by: Takahiro Kuwano 
> ---
>  drivers/mtd/spi/spi-nor-ids.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> index 4e83b8c94c..a3dca506a3 100644
> --- a/drivers/mtd/spi/spi-nor-ids.c
> +++ b/drivers/mtd/spi/spi-nor-ids.c
> @@ -338,8 +338,8 @@ const struct flash_info spi_nor_ids[] = {
>*/
>   { INFO("s25sl032p",  0x010215, 0x4d00,  64 * 1024,  64, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
>   { INFO("s25sl064p",  0x010216, 0x4d00,  64 * 1024, 128, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
> - { INFO("s25fl256s0", 0x010219, 0x4d00, 256 * 1024, 128, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> - { INFO("s25fl256s1", 0x010219, 0x4d01,  64 * 1024, 512, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> + { INFO6("s25fl256s0", 0x010219, 0x4d0080, 256 * 1024, 128, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },
> + { INFO6("s25fl256s1", 0x010219, 0x4d0180,  64 * 1024, 512, 
> SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | USE_CLSR) },

Reviewed-by: Dhruva Gole 


-- 
Best regards,
Dhruva


Re: [PATCH 2/2] arm: dts: k3: binman: am625: add support for signing TIFSSTUB Images

2024-04-04 Thread Dhruva Gole
Hi Neha!

On Apr 04, 2024 at 10:20:21 +0530, Neha Malcom Francis wrote:
> Hi Dhruva
> 
> On 03/04/24 17:33, Dhruva Gole wrote:
> > From: Kamlesh Gurudasani 
> > 
> > Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
> > and include them in tispl.bin and tispl.bin_unsigned.
> > 
> > Signed-off-by: Kamlesh Gurudasani 
> > Signed-off-by: Dhruva Gole 
> > ---
> >   arch/arm/dts/k3-am625-sk-binman.dtsi | 141 ++-
> >   1 file changed, 139 insertions(+), 2 deletions(-)
> > 
[...]
> > dm {
> > ti-dm {
> > filename = "ti-dm.bin";
> > @@ -270,7 +406,8 @@
> > conf-0 {
> > description = "k3-am625-sk";
> > firmware = "atf";
> > -   loadables = "tee", "dm", "spl";
> > +   loadables = "tee", "tifsstub-hs", 
> > "tifsstub-fs",
> > + "tifsstub-gp", "dm", "spl";
> > fdt = "fdt-0";
> > };
> > };
> 
> 
> If there are multiple boards that will support TIFSSTUB in future, I would
> prefer templating these out and putting them in k3-binman.dtsi. However

That's a great idea. From the next set of boards for which also need
binman TIFS Stub support we will keep in mind as you said below.
Currently amidst all the movement and cleanup I don't want to push out
too many changes at once.

I also have cleanup and OF_UPSTREAM changes for am62x pending which I
plan on posting sometime soon..

> considering there's a lot of movement currently (cleanup and OF_STREAM) in
> that file, you can maybe take this up when adding support for the next
> board.
> 
> Reviewed-by: Neha Malcom Francis 

Thanks!

-- 
Best regards,
Dhruva Gole 


[PATCH 2/2] arm: dts: k3: binman: am625: add support for signing TIFSSTUB Images

2024-04-03 Thread Dhruva Gole
From: Kamlesh Gurudasani 

Add support for signing of TIFSSTUB images for HSSE, HSFS and GP devices
and include them in tispl.bin and tispl.bin_unsigned.

Signed-off-by: Kamlesh Gurudasani 
Signed-off-by: Dhruva Gole 
---
 arch/arm/dts/k3-am625-sk-binman.dtsi | 141 ++-
 1 file changed, 139 insertions(+), 2 deletions(-)

diff --git a/arch/arm/dts/k3-am625-sk-binman.dtsi 
b/arch/arm/dts/k3-am625-sk-binman.dtsi
index 5b058bd03a07..dfd38d64f638 100644
--- a/arch/arm/dts/k3-am625-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am625-sk-binman.dtsi
@@ -151,11 +151,107 @@
filename = 
"ti-dm/am62xx/ipc_echo_testb_mcu1_0_release_strip.xer5f";
};
};
+
+   tifsstub-hs {
+   filename = "tifsstub.bin_hs";
+   ti-secure-rom {
+   content = <_hs_cert>;
+   core = "secure";
+   load = <0x4>;
+   sw-rev = ;
+   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 = <_gp>;
+   core = "secure";
+   load = <0x6>;
+   sw-rev = ;
+   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 = <_spl_template>;
 
fit {
images {
+
+   tifsstub-hs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-hs";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_hs";
+   };
+   };
+
+   tifsstub-fs {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   os = "tifsstub-fs";
+   load = <0x9dc0>;
+   entry = <0x9dc0>;
+   blob-ext {
+   filename = "tifsstub.bin_fs";
+   };
+   };
+
+   tifsstub-gp {
+   description = "TIFSSTUB";
+   type = "firmware";
+   arch = "arm32";
+   compression = "none";
+   

[PATCH 1/2] arm: mach-k3: add support for detecting TIFSSTUB images

2024-04-03 Thread Dhruva Gole
From: Kamlesh Gurudasani 

Add support for detecting and processing TIFSSTUB images for HS, HSFS
and GP devices.

TIFSSTUB image for related device type will be loaded, rest TIFSSTUB
images will be discarded.

Example, for GP device, tifsstub-gp will be loaded, tifsstub-hs and
tifsstub-fs will be discarded.

Signed-off-by: Kamlesh Gurudasani 
Signed-off-by: Dhruva Gole 
---
 arch/arm/mach-k3/r5/common.c | 24 
 1 file changed, 24 insertions(+)

diff --git a/arch/arm/mach-k3/r5/common.c b/arch/arm/mach-k3/r5/common.c
index c02f8d330998..0f6c294f1eb2 100644
--- a/arch/arm/mach-k3/r5/common.c
+++ b/arch/arm/mach-k3/r5/common.c
@@ -24,6 +24,9 @@ enum {
IMAGE_ID_OPTEE,
IMAGE_ID_SPL,
IMAGE_ID_DM_FW,
+   IMAGE_ID_TIFSSTUB_HS,
+   IMAGE_ID_TIFSSTUB_FS,
+   IMAGE_ID_T,
IMAGE_AMT,
 };
 
@@ -33,6 +36,9 @@ static const char *image_os_match[IMAGE_AMT] = {
"tee",
"U-Boot",
"DM",
+   "tifsstub-hs",
+   "tifsstub-fs",
+   "tifsstub-gp",
 };
 #endif
 
@@ -314,6 +320,24 @@ void board_fit_image_post_process(const void *fit, int 
node, void **p_image,
break;
}
}
+
+   if (i < IMAGE_AMT && i > IMAGE_ID_DM_FW) {
+   int device_type = get_device_type();
+
+   if ((device_type == K3_DEVICE_TYPE_HS_SE &&
+strcmp(os, "tifsstub-hs")) ||
+  (device_type == K3_DEVICE_TYPE_HS_FS &&
+strcmp(os, "tifsstub-fs")) ||
+  (device_type == K3_DEVICE_TYPE_GP &&
+strcmp(os, "tifsstub-gp"))) {
+   *p_size = 0;
+   } else {
+   debug("tifsstub-type: %s\n", os);
+   }
+
+   return;
+   }
+
/*
 * Only DM and the DTBs are being authenticated here,
 * rest will be authenticated when A72 cluster is up
-- 
2.34.1



[PATCH 0/2] Add TIFS Stub support in AM62x

2024-04-03 Thread Dhruva Gole
Add support for signing, detection and loading of TIFSSTUB images for
for HSSE, HSFS and GP AM62x devices.

Boot tested and Deepsleep entry exist tested with ti-linux:
https://gist.github.com/DhruvaG2000/036010f6ae75aa6443fc77f61fd74893

Patches are based on top of tag: v2024.04

Cc: Tom Rini 
Cc: Neha Malcom Francis 
Cc: Kamlesh Gurudasani 
Cc: Vibhore Vardhan 
Cc: Vishal Mahaveer 
Cc: Akashdeep Kaur 
Cc: Sebin Francis 

Kamlesh Gurudasani (2):
  arm: mach-k3: add support for detecting TIFSSTUB images
  arm: dts: k3: binman: am625: add support for signing TIFSSTUB Images

 arch/arm/dts/k3-am625-sk-binman.dtsi | 141 ++-
 arch/arm/mach-k3/r5/common.c |  24 +
 2 files changed, 163 insertions(+), 2 deletions(-)

-- 
2.34.1



Re: [PATCH v1] verdin-am62: move verdin am62 to OF_UPSTREAM

2024-04-03 Thread Dhruva Gole
On Apr 03, 2024 at 09:15:10 +0200, Marcel Ziswiler wrote:
> From: Marcel Ziswiler 
> 
> Move verdin-am62 to OF_UPSTREAM:

Thanks!

> - handle the fact that dtbs now have a 'ti/' prefix
> - imply OF_UPSTREAM
> - remove redundant files from arch/arm/dts leaving only the
>   *-u-boot.dtsi files
> - update MAINTAINERS file
> 
> Signed-off-by: Marcel Ziswiler 
> 
> ---

Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva


Re: [PATCH v2 5/5] power: regulator: tps65941: Add TPS65224 PMIC regulator support

2024-03-08 Thread Dhruva Gole
buck_probe(struct udevice *dev)
>   case TPS65941_BUCK_ID_2:
>   case TPS65941_BUCK_ID_3:
>   case TPS65941_BUCK_ID_4:
> - case TPS65941_BUCK_ID_5:
>   debug("Single phase regulator\n");
>   break;
> + case TPS65941_BUCK_ID_5:
> + if (chip_id != TPS65224) {
> + debug("Single phase regulator\n");
> + } else {
> + printf("Wrong ID for regulator\n");

no printfs please.

> + return -EINVAL;
> + }
> + break;
>   case TPS65941_BUCK_ID_12:
> + idx = 1;
> + break;
>   case TPS65941_BUCK_ID_123:
>   case TPS65941_BUCK_ID_1234:
> - idx = 1;
> + if (chip_id != TPS65224) {
> + idx = 1;
> + } else {
> + printf("Wrong ID for regulator\n");

ditto.

> + return -EINVAL;
> + }
>   break;
>   case TPS65941_BUCK_ID_34:
> - idx = 3;
> + if (chip_id != TPS65224) {
> + idx = 3;
> + } else {
> + printf("Wrong ID for regulator\n");

Like in your other patches, can you please use pr_err or friends?

> + return -EINVAL;
> + }
>   break;
>   default:
>   pr_err("Wrong ID for regulator\n");
> -- 
> 2.25.1
> 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2 1/5] power: tps65941: Add macros of TPS65224 PMIC

2024-03-08 Thread Dhruva Gole
On Mar 06, 2024 at 19:09:43 +0530, Bhargav Raviprakash wrote:
> Re-use the TPS65941 PMIC driver for TPS65224 PMIC.
> Add additional macros of TPS65224 to aid in the driver
> re-use.
> 
> Signed-off-by: Bhargav Raviprakash 
> ---

Reviewed-by: Dhruva Gole 

>  include/power/tps65941.h | 30 ++
>  1 file changed, 30 insertions(+)
> 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2 3/5] power: regulator: tps65941: Added macros for BUCK ID

2024-03-08 Thread Dhruva Gole
Hi,

On Mar 06, 2024 at 19:09:45 +0530, Bhargav Raviprakash wrote:
> Adds macros for buck and ldo ids and switched to using switch
> case instead of if else in probe functions. Helps in adding
> support for TPS65224 PMIC.
> 
> Signed-off-by: Bhargav Raviprakash 
> ---
>  drivers/power/regulator/tps65941_regulator.c | 54 +++-
>  1 file changed, 42 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/power/regulator/tps65941_regulator.c 
> b/drivers/power/regulator/tps65941_regulator.c
> index b041126775..cf54e30df5 100644
> --- a/drivers/power/regulator/tps65941_regulator.c
> +++ b/drivers/power/regulator/tps65941_regulator.c
> @@ -16,6 +16,25 @@
>  #include 
>  #include 
>  
> +/* Single Phase Buck IDs */
> +#define TPS65941_BUCK_ID_11
> +#define TPS65941_BUCK_ID_22
> +#define TPS65941_BUCK_ID_33
> +#define TPS65941_BUCK_ID_44
> +#define TPS65941_BUCK_ID_55
> +
> +/* Multi Phase Buck IDs */
> +#define TPS65941_BUCK_ID_12  12
> +#define TPS65941_BUCK_ID_34  34
> +#define TPS65941_BUCK_ID_123123
> +#define TPS65941_BUCK_ID_1234  1234
> +
> +/* LDO IDs */
> +#define TPS65941_LDO_ID_1 1
> +#define TPS65941_LDO_ID_2 2
> +#define TPS65941_LDO_ID_3 3
> +#define TPS65941_LDO_ID_4 4
> +
>  static const char tps65941_buck_ctrl[TPS65941_BUCK_NUM] = {0x4, 0x6, 0x8, 
> 0xA,
>   0xC};
>  static const char tps65941_buck_vout[TPS65941_BUCK_NUM] = {0xE, 0x10, 0x12,
> @@ -270,10 +289,15 @@ static int tps65941_ldo_probe(struct udevice *dev)
>   uc_pdata->type = REGULATOR_TYPE_LDO;
>  
>   idx = dev->driver_data;
> - if (idx == 1 || idx == 2 || idx == 3 || idx == 4) {
> + switch (idx) {
> + case TPS65941_LDO_ID_1:
> + case TPS65941_LDO_ID_2:
> + case TPS65941_LDO_ID_3:
> + case TPS65941_LDO_ID_4:
>   debug("Single phase regulator\n");
> - } else {
> - printf("Wrong ID for regulator\n");
> + break;
> + default:
> + pr_err("Wrong ID for regulator\n");
>   return -EINVAL;
>   }
>  
> @@ -292,18 +316,24 @@ static int tps65941_buck_probe(struct udevice *dev)
>   uc_pdata->type = REGULATOR_TYPE_BUCK;
>  
>   idx = dev->driver_data;
> - if (idx == 1 || idx == 2 || idx == 3 || idx == 4 || idx == 5) {
> + switch (idx) {
> + case TPS65941_BUCK_ID_1:
> + case TPS65941_BUCK_ID_2:
> + case TPS65941_BUCK_ID_3:
> + case TPS65941_BUCK_ID_4:
> + case TPS65941_BUCK_ID_5:
>   debug("Single phase regulator\n");
> - } else if (idx == 12) {
> + break;
> + case TPS65941_BUCK_ID_12:
> + case TPS65941_BUCK_ID_123:
> + case TPS65941_BUCK_ID_1234:
>   idx = 1;
> - } else if (idx == 34) {
> + break;
> + case TPS65941_BUCK_ID_34:
>   idx = 3;
> - } else if (idx == 123) {
> - idx = 1;
> - } else if (idx == 1234) {
> - idx = 1;
> - } else {
> - printf("Wrong ID for regulator\n");
> + break;
> + default:
> + pr_err("Wrong ID for regulator\n");
>   return -EINVAL;

Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v2 2/5] power: pmic: tps65941: Add TI TPS65224 PMIC

2024-03-08 Thread Dhruva Gole
On Mar 06, 2024 at 19:09:44 +0530, Bhargav Raviprakash wrote:
> Adds compatible and data field values of TPS65224 driver in
> TPS65941 PMIC driver.
> 
> Signed-off-by: Bhargav Raviprakash 
> ---
>  drivers/power/pmic/tps65941.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/pmic/tps65941.c b/drivers/power/pmic/tps65941.c
> index 727b42747a..ef63eb733a 100644
> --- a/drivers/power/pmic/tps65941.c
> +++ b/drivers/power/pmic/tps65941.c
> @@ -75,6 +75,7 @@ static const struct udevice_id tps65941_ids[] = {
>   { .compatible = "ti,tps659412", .data = TPS659411 },
>   { .compatible = "ti,tps659413", .data = TPS659413 },
>   { .compatible = "ti,lp876441",  .data =  LP876441 },
> +     { .compatible = "ti,tps65224",  .data =  TPS65224 },

Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH] doc: board: phytec: phycore-am62x: Update artifact names

2024-02-28 Thread Dhruva Gole

Hi,

+ Tom

On 28/02/24 14:28, Wadim Egorov wrote:

Use proper binary artifact names for HSFS devices.
Do not use the *_unsigned binaries.

Signed-off-by: Wadim Egorov 
---



Reviewed-by: Dhruva Gole 


  doc/board/phytec/phycore-am62x.rst | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/board/phytec/phycore-am62x.rst 
b/doc/board/phytec/phycore-am62x.rst
index 1d641a78cf..bc6d524669 100644
--- a/doc/board/phytec/phycore-am62x.rst
+++ b/doc/board/phytec/phycore-am62x.rst
@@ -92,9 +92,9 @@ Assuming the uSD card is `/dev/mmcblk0`:
  To boot from a micro SD card on a HSFS device simply copy the following
  artifacts to the FAT partition:
  
-* tiboot3.bin from R5 build as tiboot3.bin

-* tispl.bin_unsigned from Cortex-A build as tispl.bin
-* u-boot.img_unsigned from Cortex-A build as u-boot.img
+* tiboot3.bin from R5 build
+* tispl.bin from Cortex-A build
+* u-boot.img from Cortex-A build


LGTM.


--
Thanks and Regards,
Dhruva Gole


Re: [PATCH v2 2/2] doc: board: phytec: Add phyCORE-AM64x

2024-02-27 Thread Dhruva Gole
Hi,

On Feb 26, 2024 at 13:23:41 +0100, Wadim Egorov wrote:
> Add documentation for PHYTEC phyCORE-AM64x SoM.
> 
> Signed-off-by: Wadim Egorov 
> ---
>  doc/board/phytec/index.rst |   1 +
>  doc/board/phytec/phycore-am64x.rst | 159 +
>  2 files changed, 160 insertions(+)
>  create mode 100644 doc/board/phytec/phycore-am64x.rst
> 
> diff --git a/doc/board/phytec/index.rst b/doc/board/phytec/index.rst
> index fea0b07620..99848a9e95 100644
> --- a/doc/board/phytec/index.rst
> +++ b/doc/board/phytec/index.rst
> @@ -9,5 +9,6 @@ PHYTEC
> imx8mm-phygate-tauri-l
> imx93-phyboard-segin
> phycore-am62x
> +   phycore-am64x
> phycore-imx8mm
> phycore-imx8mp
> diff --git a/doc/board/phytec/phycore-am64x.rst 
> b/doc/board/phytec/phycore-am64x.rst
> new file mode 100644
> index 00..202b756dc4
> --- /dev/null
> +++ b/doc/board/phytec/phycore-am64x.rst
> @@ -0,0 +1,159 @@
> +.. SPDX-License-Identifier: GPL-2.0+
> +.. sectionauthor:: Wadim Egorov 
> +
> +phyCORE-AM64x
> +=
> +
> +The `phyCORE-AM64x <https://www.phytec.com/product/phycore-am64x>`_ is a
> +SoM (System on Module) featuring TI's AM64x SoC. It can be used in 
> combination
> +with different carrier boards. This module can come with different sizes and
> +models for DDR, eMMC, SPI NOR Flash and various SoCs from the AM64x family.
> +
> +A development Kit, called `phyBOARD-Lyra 
> <https://www.phytec.com/product/phyboard-am64x>`_
> +is used as a carrier board reference design around the AM64x SoM.
> +
> +Quickstart
> +--
> +
> +* Download sources and TI firmware blobs
> +* Build Trusted Firmware-A
> +* Build OP-TEE
> +* Build U-Boot for the R5
> +* Build U-Boot for the A53
> +* Create bootable uSD Card
> +* Boot
> +
> +Sources
> +---
> +
> +.. include::  ../ti/k3.rst
> +:start-after: .. k3_rst_include_start_boot_sources
> +:end-before: .. k3_rst_include_end_boot_sources
> +
> +Build procedure
> +---
> +
> +Setup the environment variables:
> +
> +.. include::  ../ti/k3.rst
> +:start-after: .. k3_rst_include_start_common_env_vars_desc
> +:end-before: .. k3_rst_include_end_common_env_vars_desc
> +
> +.. include::  ../ti/k3.rst
> +:start-after: .. k3_rst_include_start_board_env_vars_desc
> +:end-before: .. k3_rst_include_end_board_env_vars_desc
> +
> +Set the variables corresponding to this platform:
> +
> +.. include::  ../ti/k3.rst
> +:start-after: .. k3_rst_include_start_common_env_vars_defn
> +:end-before: .. k3_rst_include_end_common_env_vars_defn
> +.. code-block:: bash
> +
> + $ export UBOOT_CFG_CORTEXR=phycore_am64x_r5_defconfig
> + $ export UBOOT_CFG_CORTEXA=phycore_am64x_a53_defconfig
> + $ export TFA_BOARD=lite
> + $ # we don't use any extra TFA parameters
> + $ unset TFA_EXTRA_ARGS
> + $ export OPTEE_PLATFORM=k3-am64x
> + # we don't use any extra OPTEE parameters
> + unset OPTEE_EXTRA_ARGS
> +
> +.. include::  ../ti/am62x_sk.rst
> +:start-after: .. am62x_evm_rst_include_start_build_steps
> +:end-before: .. am62x_evm_rst_include_end_build_steps
> +
> +uSD Card creation
> +-
> +
> +Use fdisk to partition the uSD card. The layout should look similar to:
> +
> +.. code-block:: bash
> +
> + $ sudo fdisk -l /dev/mmcblk0
> + Disk /dev/mmcblk0: 7.56 GiB, 8120172544 bytes, 15859712 sectors
> + Units: sectors of 1 * 512 = 512 bytes
> + Sector size (logical/physical): 512 bytes / 512 bytes
> + I/O size (minimum/optimal): 512 bytes / 512 bytes
> + Disklabel type: dos
> + Disk identifier: 0x6583d9a3
> +
> + Device Boot  Start End Sectors   Size Id Type
> + /dev/mmcblk0p1 *  2048  264191  262144   128M  c W95 FAT32 (LBA)
> + /dev/mmcblk0p2  264192 1934953 1670762 815.8M 83 Linux
> +
> +
> +Once partitioned, the boot partition has to be formatted with a FAT 
> filesystem.
> +Assuming the uSD card is `/dev/mmcblk0`:
> +
> +.. code-block:: bash
> +
> + $ mkfs.vfat /dev/mmcblk0p1
> +
> +To boot from a micro SD card on a HSFS device simply copy the following
> +artifacts to the FAT partition:
> +
> +* tiboot3.bin from R5 build as tiboot3.bin
> +* tispl.bin_unsigned from Cortex-A build as tispl.bin
> +* u-boot.img_unsigned from Cortex-A build as u-boot.img

Is the _unsigned really required? I guess the regular tispl and
u-boot.img should also work right? It will just skip auth I guess.

[...]

Mostly looks good, thanks!
Reviewed-by: Dhruva Gole 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH v1 4/5] power: regulator: tps65941: use function callbacks for conversion ops

2024-02-23 Thread Dhruva Gole
On Feb 23, 2024 at 14:42:11 +0530, Bhargav Raviprakash wrote:
> Use function callbacks for volt2val, val2volt and slewrate lookups.
> This makes it easier to add support for TPS65224 PMIC regulators.
> 
> Signed-off-by: Bhargav Raviprakash 
> ---
>  drivers/power/regulator/tps65941_regulator.c | 61 +++-
>  1 file changed, 48 insertions(+), 13 deletions(-)

Add Tom Rini in To or CC please.

> 
> diff --git a/drivers/power/regulator/tps65941_regulator.c 
> b/drivers/power/regulator/tps65941_regulator.c
> index cf54e30df5..cdfbc3f4de 100644
> --- a/drivers/power/regulator/tps65941_regulator.c
> +++ b/drivers/power/regulator/tps65941_regulator.c
> @@ -35,6 +35,17 @@
>  #define TPS65941_LDO_ID_3 3
>  #define TPS65941_LDO_ID_4 4
>  
> +#define TPS65941_BUCK_CONV_OPS_IDX  0
> +#define TPS65941_LDO_CONV_OPS_IDX   0
> +
> +struct tps65941_reg_conv_ops {
> + int volt_mask;
> + int (*volt2val)(int idx, int uV);
> + int (*val2volt)(int idx, int volt);
> + int slew_mask;
> + int (*lookup_slew)(int id);
> +};
> +
>  static const char tps65941_buck_ctrl[TPS65941_BUCK_NUM] = {0x4, 0x6, 0x8, 
> 0xA,
>   0xC};
>  static const char tps65941_buck_vout[TPS65941_BUCK_NUM] = {0xE, 0x10, 0x12,
> @@ -79,7 +90,7 @@ static int tps65941_buck_enable(struct udevice *dev, int 
> op, bool *enable)
>   return 0;
>  }
>  
> -static int tps65941_buck_volt2val(int uV)
> +static int tps65941_buck_volt2val(int /*idx*/, int uV)

IMHO /*idx*/ does NOT look good.
Check something like __maybe_unused attribute

[...]

-- 
Best regards,
Dhruva Gole 


[PATCH V5 2/2] firmware: ti_sci: Add comment explaining the is_secure code

2024-01-30 Thread Dhruva Gole
Add a comment to explain the code under is_secure condition of
ti_sci_do_xfer. This will help avoid confusion amongst people who may in
future touch upon this code.

Reviewed-by: Nishanth Menon 
Signed-off-by: Dhruva Gole 
---
 drivers/firmware/ti_sci.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index b77ac36af284..ee0921855881 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -239,6 +239,12 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
+   /*
+* The reason why we need the is_secure code is because of boot R5.
+* boot R5 starts off in "secure mode" when it hands off from Boot
+* ROM over to the Secondary bootloader. The initial set of calls
+* we have to make need to be on a secure pipe.
+*/
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
secure_hdr->checksum = 0;
-- 
2.34.1



[PATCH V5 1/2] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-30 Thread Dhruva Gole
The ti_sci driver in U-Boot has support for secure_msg as part of it's
do_xfer function. This let's U-boot send secure messages during boot up.

The protocol to send such secure messages is described as part of the
struct ti_sci_secure_msg_hdr. As part of this, there are 2 fields for
checksum and reserved that occupy the first 4 bytes of any secure
message. This is called as the secure_hdr.

As of now, the secure_hdr needs to be 0 init-ed before sending secure
messages. However the existing code was never putting the zero-inited vars
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make secure_hdr members 0, it automatically ensures
the first 4 bytes of secure_buf are 0.

Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
Interface (TI SCI)")
Reviewed-by: Nishanth Menon 
Signed-off-by: Dhruva Gole 
---
 drivers/firmware/ti_sci.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6e9f93e9a302..b77ac36af284 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -236,21 +236,21 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 {
struct k3_sec_proxy_msg *msg = >tx_message;
u8 secure_buf[info->desc->max_msg_size];
-   struct ti_sci_secure_msg_hdr secure_hdr;
+   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
-   secure_hdr.checksum = 0;
-   secure_hdr.reserved = 0;
-   memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf,
+   secure_hdr->checksum = 0;
+   secure_hdr->reserved = 0;
+   memcpy(_buf[sizeof(*secure_hdr)], xfer->tx_message.buf,
   xfer->tx_message.len);
 
xfer->tx_message.buf = (u32 *)secure_buf;
-   xfer->tx_message.len += sizeof(secure_hdr);
+   xfer->tx_message.len += sizeof(*secure_hdr);
 
if (xfer->rx_len)
-   xfer->rx_len += sizeof(secure_hdr);
+   xfer->rx_len += sizeof(*secure_hdr);
}
 
/* Send the message */
-- 
2.34.1



[PATCH V5 0/2] firmware: ti_sci: zero the secure_hdr in do_xfer

2024-01-30 Thread Dhruva Gole
This series adds a fix to make the initial 4 bytes of the secure_hdr to be 0 as 
per the protocol requirement as of now.
Also, inorder to provide a little more context to people add a comment to 
explain why secure calls are made from uboot

For context, please refer to the discussion from the first patch here:
https://lore.kernel.org/all/20240124101558.184411-1-d-g...@ti.com/

Boot tested for sanity on AM62x SK and J721S2:
https://gist.github.com/DhruvaG2000/9ca35d1261e8b30f1c2d4a514b9cd941

Changelog:

v4 --> v5
Pick Nishanth's review and also s/sizeof(var)/sizeof(*var) in 1/2

v3 --> v4
Improve commit message in 1/2 and add comment in 2/2

v2 --> v3
Address Kamlesh's comment on v2: use sizeof(struct ti_sci_secure_msg_hdr)

v1 --> v2
Rebased on top of latest master branch

Cc: Nishanth Menon 
Cc: Tom Rini 
Cc: Neha Francis 
Cc: Manorit Chawdhry 
Cc: Vignesh Raghavendra 
Cc: Kamlesh Gurudasani 
Cc: Andrew Davis 

Dhruva Gole (2):
  firmware: ti_sci: fix the secure_hdr in do_xfer
  firmware: ti_sci: Add comment explaining the is_secure code

 drivers/firmware/ti_sci.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)


base-commit: d5c0c990c3128401810514c66b41b386096d206e
prerequisite-patch-id: 2ed0c527b6ebf850744d9ff0eca0300a125f7796
-- 
2.34.1



[PATCH V4 2/2] firmware: ti_sci: Add comment explaining the is_secure code

2024-01-30 Thread Dhruva Gole
Add a comment to explain the code under is_secure condition of
ti_sci_do_xfer. This will help avoid confusion amongst people who may in
future touch upon this code.

Signed-off-by: Dhruva Gole 
---
 drivers/firmware/ti_sci.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 49d2696a6d09..d969470b5221 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -239,6 +239,12 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
+   /*
+* The reason why we need the is_secure code is because of boot R5.
+* boot R5 starts off in "secure mode" when it hands off from Boot
+* ROM over to the Secondary bootloader. The initial set of calls
+* we have to make need to be on a secure pipe.
+*/
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
secure_hdr->checksum = 0;
-- 
2.34.1



[PATCH V4 1/2] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-30 Thread Dhruva Gole
The ti_sci driver in U-Boot has support for secure_msg as part of it's
do_xfer function. This let's U-boot send secure messages during boot up.

The protocol to send such secure messages is described as part of the
struct ti_sci_secure_msg_hdr. As part of this, there are 2 fields for
checksum and reserved that occupy the first 4 bytes of any secure
message. This is called as the secure_hdr.

As of now, the secure_hdr needs to be 0 init-ed before sending secure
messages. However the existing code was never putting the zero-inited vars
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make secure_hdr members 0, it automatically ensures
the first 4 bytes of secure_buf are 0.

Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
Interface (TI SCI)")
Cc: Nishanth Menon 
Cc: Andrew Davis 
Cc: Manorit Chawdhry 
Signed-off-by: Dhruva Gole 
---
 drivers/firmware/ti_sci.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6e9f93e9a302..49d2696a6d09 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -236,21 +236,21 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 {
struct k3_sec_proxy_msg *msg = >tx_message;
u8 secure_buf[info->desc->max_msg_size];
-   struct ti_sci_secure_msg_hdr secure_hdr;
+   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
-   secure_hdr.checksum = 0;
-   secure_hdr.reserved = 0;
-   memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf,
+   secure_hdr->checksum = 0;
+   secure_hdr->reserved = 0;
+   memcpy(_buf[sizeof(struct ti_sci_secure_msg_hdr)], 
xfer->tx_message.buf,
   xfer->tx_message.len);
 
xfer->tx_message.buf = (u32 *)secure_buf;
-   xfer->tx_message.len += sizeof(secure_hdr);
+   xfer->tx_message.len += sizeof(struct ti_sci_secure_msg_hdr);
 
if (xfer->rx_len)
-   xfer->rx_len += sizeof(secure_hdr);
+   xfer->rx_len += sizeof(struct ti_sci_secure_msg_hdr);
}
 
/* Send the message */
-- 
2.34.1



[PATCH V4 0/2] firmware: ti_sci: zero the secure_hdr in do_xfer

2024-01-30 Thread Dhruva Gole
This series adds a fix to make the initial 4 bytes of the secure_hdr to
be 0 as per the protocol requirement as of now.
Also, inorder to provide a little more context to people add a comment
to explain why secure calls are made from uboot

For context, please refer to the discussion from the first patch here:
https://lore.kernel.org/all/20240124101558.184411-1-d-g...@ti.com/

Boot tested for sanity on AM62x SK and J721S2:
https://gist.github.com/DhruvaG2000/9ca35d1261e8b30f1c2d4a514b9cd941

Changelog:

v3 --> v4
Improve commit message in 1/2 and add comment in 2/2

v2 --> v3
Address Kamlesh's comment on v2: use sizeof(struct ti_sci_secure_msg_hdr)

v1 --> v2
Rebased on top of latest master branch

Cc: Nishanth Menon 
Cc: Tom Rini 
Cc: Neha Francis 
Cc: Manorit Chawdhry 
Cc: Vignesh Raghavendra 
Cc: Kamlesh Gurudasani 

Dhruva Gole (2):
  firmware: ti_sci: fix the secure_hdr in do_xfer
  firmware: ti_sci: Add comment explaining the is_secure code

 drivers/firmware/ti_sci.c | 18 --
 1 file changed, 12 insertions(+), 6 deletions(-)


base-commit: d5c0c990c3128401810514c66b41b386096d206e
prerequisite-patch-id: 2ed0c527b6ebf850744d9ff0eca0300a125f7796
-- 
2.34.1



Re: [PATCH V3] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-28 Thread Dhruva Gole
On Jan 24, 2024 at 12:09:06 -0600, Nishanth Menon wrote:
> On 18:37-20240124, Dhruva Gole wrote:
> > The secure_hdr needs to be 0 init-ed however this was never being put
> > into the secure_buf, leading to possibility of the first 4 bytes of
> > secure_buf being possibly garbage.
> > 
> > Fix this by initialising the secure_hdr itself to the secure_buf
> > location, thus when we make it 0, it automatically ensures the first 4
> > bytes are 0.
> > 
> > Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
> > Interface (TI SCI)")
> > Signed-off-by: Dhruva Gole 
> > ---
> > 
> > Boot tested for sanity on AM62x SK
> > https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074
> > 
> > Changelog:
> > v2 --> v3
> > Address Kamlesh's comment on v2: use sizeof(struct ti_sci_secure_msg_hdr)
> 
> Lets finish discussing in:
> https://lore.kernel.org/all/20240124163910.sp7gt56lihoujm7k@etching/

Bringing the conversation back to this latest patch revision,
Based on where we left off:
https://lore.kernel.org/all/20240125171335.qoxphnemadkh7xjd@gullible/

Would it be better to add a comment above ``if (info->is_secure) {`` in
drivers/firmware/ti_sci.c as follows:
The secure path will be used by R5 SPL bcause it starts of in "secure mode" 
when it hands
off from Boot ROM over to the Secondary bootloader.

Kindly advise if the patch needs respin with that minor change, and if the rest
of it seems okay?

-- 
Best regards,
Dhruva Gole 


Re: [PATCH] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
On Jan 24, 2024 at 12:08:13 -0600, Nishanth Menon wrote:
> On 23:07-20240124, Dhruva Gole wrote:
> > On Jan 24, 2024 at 10:39:10 -0600, Nishanth Menon wrote:
> > > On 18:38-20240124, Dhruva Gole wrote:
> > > > On Jan 24, 2024 at 16:42:12 +0530, Kamlesh Gurudasani wrote:
> > > > > Dhruva Gole  writes:
> > > > > 
> > > > > > The secure_hdr needs to be 0 init-ed however this was never being 
> > > > > > put
> > > > > > into the secure_buf, leading to possibility of the first 4 bytes of
> > > > > > secure_buf being possibly garbage.
> > > > > >
> > > > > > Fix this by initialising the secure_hdr itself to the secure_buf
> > > > > > location, thus when we make it 0, it automatically ensures the 
> > > > > > first 4
> > > > > > bytes are 0.
> > > > > >
> > > > > > Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System 
> > > > > > Control Interface (TI SCI)")
> > > > > > Signed-off-by: Dhruva Gole 
> > > > > > ---
> > > > > >
> > > > > > Boot tested for sanity on AM62x SK
> > > > > > https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074
> > > > > >
> > > > > > Cc: Nishanth Menon 
> > > > > > Cc: Tom Rini 
> > > > > >
> > > > > >  drivers/firmware/ti_sci.c | 6 +++---
> > > > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > > > >
> > > > > > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> > > > > > index f5f659c11274..83ee8401a731 100644
> > > > > > --- a/drivers/firmware/ti_sci.c
> > > > > > +++ b/drivers/firmware/ti_sci.c
> > > > > > @@ -236,13 +236,13 @@ static int ti_sci_do_xfer(struct ti_sci_info 
> > > > > > *info,
> > > > > >  {
> > > > > > struct k3_sec_proxy_msg *msg = >tx_message;
> > > > > > u8 secure_buf[info->desc->max_msg_size];
> > > > > > -   struct ti_sci_secure_msg_hdr secure_hdr;
> > > > > > +   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
> > > > > > ti_sci_secure_msg_hdr *)secure_buf;
> > > > > > int ret;
> > > > > >  
> > > > > > if (info->is_secure) {
> > > > > > /* ToDo: get checksum of the entire message */
> > > > > > -   secure_hdr.checksum = 0;
> > > > > > -   secure_hdr.reserved = 0;
> > > > > > +   secure_hdr->checksum = 0;
> > > > > > +   secure_hdr->reserved = 0;
> > > > > > 
> > > > > > memcpy(_buf[sizeof(secure_hdr)],xfer->tx_message.buf,
> > > > > secure_hdr is pointer now, the value may be same but (struct
> > > > > ti_sci_secure_msg_hdr) would make more sense
> > > > 
> > > > Good catch Kamlesh! I have sent a new revision addressing this.
> > > > 
> > > 
> > > Makes no sense why we have secure API support in U-Boot. what is using
> > > this?
> > 
> > In my understanding of generic K3 boot flow, things like proc_boot and
> > even applying or removing of firewalls will need a secure channel to
> > talk to TIFS right? From my understanding secure host can only talk to
> > TIFS and make such requests hence secure API.
> 
> U-boot runs in NS world, you cant even talk to the Trustzone Sec proxy
> without triggering a firewall violation.

I am not going to debate on whether U-Boot is or isn't a secure entity.
The original code base was making secure_hdr.checksum = 0;

But this wasn't really being used anywhere. I am just making sure what the
original code base intended to do is being actually done.

> 
> 
> https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/TISCI_header.html?highlight=header#secure-messaging-header
> "The Secure Messaging Header is only required when sending messages over
> secure transport. Messages sent over non-secure transport must not
> contain the secure messaging header."

Yes, understood. I do not have the context behind the commit
32cd25128bd849 ("firmware: Add basic support for TI System Control
Interface (TI SCI)") but perhaps you do. So please help me understand
why there's this code:
memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf, 
xfer->tx_message.len);

which is basically trying to create a 4 byte offset (trying to abide by the 
secure
msg format?) 
If UBoot as you say is non secure let's just send regular TISCI messages. Are 
you
suggesting that we trim all of if (info->is_secure) and related "secure"
code from uboot? Then that's a separate cleanup we need to have.


> 
> btw, that checksum field should be renamed integ_check, but anyways..
> 
> So, I do not see a reason to even have that if condition in the first
> place and what real bug was getting fixed in this patch.

"Real" bug or "potential" bug, the code did not seem to be doing what it should 
have
been doing, that's all. For anyone reading the checksum = 0 that is
there in today's code it's super confusing.

Either get rid of it completely, or else make it do what it was trying
to do. Let me know how we should proceed.


-- 
Best regards,
Dhruva Gole 


Re: [PATCH] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
On Jan 24, 2024 at 10:39:10 -0600, Nishanth Menon wrote:
> On 18:38-20240124, Dhruva Gole wrote:
> > On Jan 24, 2024 at 16:42:12 +0530, Kamlesh Gurudasani wrote:
> > > Dhruva Gole  writes:
> > > 
> > > > The secure_hdr needs to be 0 init-ed however this was never being put
> > > > into the secure_buf, leading to possibility of the first 4 bytes of
> > > > secure_buf being possibly garbage.
> > > >
> > > > Fix this by initialising the secure_hdr itself to the secure_buf
> > > > location, thus when we make it 0, it automatically ensures the first 4
> > > > bytes are 0.
> > > >
> > > > Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System 
> > > > Control Interface (TI SCI)")
> > > > Signed-off-by: Dhruva Gole 
> > > > ---
> > > >
> > > > Boot tested for sanity on AM62x SK
> > > > https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074
> > > >
> > > > Cc: Nishanth Menon 
> > > > Cc: Tom Rini 
> > > >
> > > >  drivers/firmware/ti_sci.c | 6 +++---
> > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > >
> > > > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> > > > index f5f659c11274..83ee8401a731 100644
> > > > --- a/drivers/firmware/ti_sci.c
> > > > +++ b/drivers/firmware/ti_sci.c
> > > > @@ -236,13 +236,13 @@ static int ti_sci_do_xfer(struct ti_sci_info 
> > > > *info,
> > > >  {
> > > > struct k3_sec_proxy_msg *msg = >tx_message;
> > > > u8 secure_buf[info->desc->max_msg_size];
> > > > -   struct ti_sci_secure_msg_hdr secure_hdr;
> > > > +   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
> > > > ti_sci_secure_msg_hdr *)secure_buf;
> > > > int ret;
> > > >  
> > > > if (info->is_secure) {
> > > > /* ToDo: get checksum of the entire message */
> > > > -   secure_hdr.checksum = 0;
> > > > -   secure_hdr.reserved = 0;
> > > > +   secure_hdr->checksum = 0;
> > > > +   secure_hdr->reserved = 0;
> > > > 
> > > > memcpy(_buf[sizeof(secure_hdr)],xfer->tx_message.buf,
> > > secure_hdr is pointer now, the value may be same but (struct
> > > ti_sci_secure_msg_hdr) would make more sense
> > 
> > Good catch Kamlesh! I have sent a new revision addressing this.
> > 
> 
> Makes no sense why we have secure API support in U-Boot. what is using
> this?

In my understanding of generic K3 boot flow, things like proc_boot and
even applying or removing of firewalls will need a secure channel to
talk to TIFS right? From my understanding secure host can only talk to
TIFS and make such requests hence secure API.

-- 
Best regards,
Dhruva Gole 


Re: [PATCH] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
On Jan 24, 2024 at 16:42:12 +0530, Kamlesh Gurudasani wrote:
> Dhruva Gole  writes:
> 
> > The secure_hdr needs to be 0 init-ed however this was never being put
> > into the secure_buf, leading to possibility of the first 4 bytes of
> > secure_buf being possibly garbage.
> >
> > Fix this by initialising the secure_hdr itself to the secure_buf
> > location, thus when we make it 0, it automatically ensures the first 4
> > bytes are 0.
> >
> > Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
> > Interface (TI SCI)")
> > Signed-off-by: Dhruva Gole 
> > ---
> >
> > Boot tested for sanity on AM62x SK
> > https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074
> >
> > Cc: Nishanth Menon 
> > Cc: Tom Rini 
> >
> >  drivers/firmware/ti_sci.c | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
> > index f5f659c11274..83ee8401a731 100644
> > --- a/drivers/firmware/ti_sci.c
> > +++ b/drivers/firmware/ti_sci.c
> > @@ -236,13 +236,13 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
> >  {
> > struct k3_sec_proxy_msg *msg = >tx_message;
> > u8 secure_buf[info->desc->max_msg_size];
> > -   struct ti_sci_secure_msg_hdr secure_hdr;
> > +   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
> > ti_sci_secure_msg_hdr *)secure_buf;
> > int ret;
> >  
> > if (info->is_secure) {
> > /* ToDo: get checksum of the entire message */
> > -   secure_hdr.checksum = 0;
> > -   secure_hdr.reserved = 0;
> > +   secure_hdr->checksum = 0;
> > +   secure_hdr->reserved = 0;
> > memcpy(_buf[sizeof(secure_hdr)],xfer->tx_message.buf,
> secure_hdr is pointer now, the value may be same but (struct
> ti_sci_secure_msg_hdr) would make more sense

Good catch Kamlesh! I have sent a new revision addressing this.

-- 
Best regards,
Dhruva Gole 


[PATCH V3] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
The secure_hdr needs to be 0 init-ed however this was never being put
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make it 0, it automatically ensures the first 4
bytes are 0.

Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
Interface (TI SCI)")
Signed-off-by: Dhruva Gole 
---

Boot tested for sanity on AM62x SK
https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074

Changelog:
v2 --> v3
Address Kamlesh's comment on v2: use sizeof(struct ti_sci_secure_msg_hdr)

v1 --> v2:
Rebased on top of latest master branch

Cc: Nishanth Menon 
Cc: Tom Rini 
Cc: Neha Francis 
Cc: Manorit Chawdhry 
Cc: Vignesh Raghavendra 
Cc: Kamlesh Gurudasani 

---

 drivers/firmware/ti_sci.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6e9f93e9a302..49d2696a6d09 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -236,21 +236,21 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 {
struct k3_sec_proxy_msg *msg = >tx_message;
u8 secure_buf[info->desc->max_msg_size];
-   struct ti_sci_secure_msg_hdr secure_hdr;
+   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
-   secure_hdr.checksum = 0;
-   secure_hdr.reserved = 0;
-   memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf,
+   secure_hdr->checksum = 0;
+   secure_hdr->reserved = 0;
+   memcpy(_buf[sizeof(struct ti_sci_secure_msg_hdr)], 
xfer->tx_message.buf,
   xfer->tx_message.len);
 
xfer->tx_message.buf = (u32 *)secure_buf;
-   xfer->tx_message.len += sizeof(secure_hdr);
+   xfer->tx_message.len += sizeof(struct ti_sci_secure_msg_hdr);
 
if (xfer->rx_len)
-   xfer->rx_len += sizeof(secure_hdr);
+   xfer->rx_len += sizeof(struct ti_sci_secure_msg_hdr);
}
 
/* Send the message */

base-commit: 15e7927b5a2d33666af19879577bf0c30ab088fe
-- 
2.34.1



Re: [PATCH] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
On Jan 24, 2024 at 15:45:58 +0530, Dhruva Gole wrote:
> The secure_hdr needs to be 0 init-ed however this was never being put
> into the secure_buf, leading to possibility of the first 4 bytes of
> secure_buf being possibly garbage.
> 
> Fix this by initialising the secure_hdr itself to the secure_buf
> location, thus when we make it 0, it automatically ensures the first 4
> bytes are 0.
> 
> Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
> Interface (TI SCI)")
> Signed-off-by: Dhruva Gole 
> ---
> 
> Boot tested for sanity on AM62x SK
> https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074
> 
> Cc: Nishanth Menon 
> Cc: Tom Rini 
> 
>  drivers/firmware/ti_sci.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 

Kindly ignore this patch, seems like it's from an older u-boot. I have
rebased an sent new patch with updated boot logs.

Please forgive the spam.

-- 
Best regards,
Dhruva Gole 


[PATCH V2] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
The secure_hdr needs to be 0 init-ed however this was never being put
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make it 0, it automatically ensures the first 4
bytes are 0.

Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
Interface (TI SCI)")
Signed-off-by: Dhruva Gole 
---

Boot tested for sanity on AM62x SK
https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074

Changelog:
Rebased on top of latest master branch

Cc: Nishanth Menon 
Cc: Tom Rini 
Cc: Neha Francis 
Cc: Manorit Chawdhry ,
Cc: Vignesh Raghavendra ,
Cc: Kamlesh Gurudasani 

 drivers/firmware/ti_sci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index 6e9f93e9a302..f7675e383d47 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -236,13 +236,13 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 {
struct k3_sec_proxy_msg *msg = >tx_message;
u8 secure_buf[info->desc->max_msg_size];
-   struct ti_sci_secure_msg_hdr secure_hdr;
+   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
-   secure_hdr.checksum = 0;
-   secure_hdr.reserved = 0;
+   secure_hdr->checksum = 0;
+   secure_hdr->reserved = 0;
memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf,
   xfer->tx_message.len);
 

base-commit: 15e7927b5a2d33666af19879577bf0c30ab088fe
-- 
2.34.1



[PATCH] firmware: ti_sci: fix the secure_hdr in do_xfer

2024-01-24 Thread Dhruva Gole
The secure_hdr needs to be 0 init-ed however this was never being put
into the secure_buf, leading to possibility of the first 4 bytes of
secure_buf being possibly garbage.

Fix this by initialising the secure_hdr itself to the secure_buf
location, thus when we make it 0, it automatically ensures the first 4
bytes are 0.

Fixes: 32cd25128bd849 ("firmware: Add basic support for TI System Control 
Interface (TI SCI)")
Signed-off-by: Dhruva Gole 
---

Boot tested for sanity on AM62x SK
https://gist.github.com/DhruvaG2000/724ceba3a0db03f4b0bff47de1160074

Cc: Nishanth Menon 
Cc: Tom Rini 

 drivers/firmware/ti_sci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/firmware/ti_sci.c b/drivers/firmware/ti_sci.c
index f5f659c11274..83ee8401a731 100644
--- a/drivers/firmware/ti_sci.c
+++ b/drivers/firmware/ti_sci.c
@@ -236,13 +236,13 @@ static int ti_sci_do_xfer(struct ti_sci_info *info,
 {
struct k3_sec_proxy_msg *msg = >tx_message;
u8 secure_buf[info->desc->max_msg_size];
-   struct ti_sci_secure_msg_hdr secure_hdr;
+   struct ti_sci_secure_msg_hdr *secure_hdr = (struct 
ti_sci_secure_msg_hdr *)secure_buf;
int ret;
 
if (info->is_secure) {
/* ToDo: get checksum of the entire message */
-   secure_hdr.checksum = 0;
-   secure_hdr.reserved = 0;
+   secure_hdr->checksum = 0;
+   secure_hdr->reserved = 0;
memcpy(_buf[sizeof(secure_hdr)], xfer->tx_message.buf,
   xfer->tx_message.len);
 

base-commit: a1448e3cf9a0602d284566d6cacf60b96c3c1316
-- 
2.34.1



Re: [PATCH v2 9/9] mtd: spi-nor-ids: Add Infineon(Cypress) s28hs02gt ID

2023-12-27 Thread Dhruva Gole
Hi!

On Dec 22, 2023 at 14:46:06 +0900, tkuw584...@gmail.com wrote:
> From: Takahiro Kuwano 
> 
> Infineon(Cypress) S28HS02GT is 1.8V, 2Gb (256MB) NOR Flash memory with
> Octal interface. It is a dual-die package parts and has same features
> with existing S28 series.
> 
> Signed-off-by: Takahiro Kuwano 
> ---
>  drivers/mtd/spi/spi-nor-ids.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mtd/spi/spi-nor-ids.c b/drivers/mtd/spi/spi-nor-ids.c
> index f86e7ff8e5..949ceee375 100644
> --- a/drivers/mtd/spi/spi-nor-ids.c
> +++ b/drivers/mtd/spi/spi-nor-ids.c
> @@ -370,6 +370,7 @@ const struct flash_info spi_nor_ids[] = {
>   { INFO("s28hl01gt",  0x345a1b,  0, 256 * 1024, 512, 
> SPI_NOR_OCTAL_DTR_READ) },
>   { INFO("s28hs512t",  0x345b1a,  0, 256 * 1024, 256, 
> SPI_NOR_OCTAL_DTR_READ) },
>   { INFO("s28hs01gt",  0x345b1b,  0, 256 * 1024, 512, 
> SPI_NOR_OCTAL_DTR_READ) },
> + { INFO("s28hs02gt",  0x345b1c,  0, 256 * 1024, 1024, 
> SPI_NOR_OCTAL_DTR_READ) },

Reviewed-by: Dhruva Gole 

>  #endif
>  #endif
>  #ifdef CONFIG_SPI_FLASH_SST  /* SST */
> -- 
> 2.34.1
> 

-- 
Best regards,
Dhruva Gole 


Re: [PATCH 0/2] docs: AM62x: Remove SW_PRNG Flag for OPTEE

2023-12-04 Thread Dhruva Gole

Hi Nishanth,

On 05/12/23 01:00, Nishanth Menon wrote:

On 15:59-20231201, Dhruva Gole wrote:

The CFG_WITH_SOFTWARE_PRNG option was needed once when there were some
issues with system crashes/ hangs after a suspend-resume cycle. However
this seems to no longer be the case with newer firmwares, and this
config is not needed for basic boot support of the SoC either, hence
remove it from the docs.

Cc: Kamlesh 
Cc: Vibhore Vardhan 
Cc: Wadim Egorov >
Dhruva Gole (2):
   doc: board: beagle: am62x_beagleplay: Delete SW_PRNG flag for OPTEE
   doc: board: ti: am62x_sk: Remove SW_PRNG Flag for OPTEE

  doc/board/beagle/am62x_beagleplay.rst | 1 -
  doc/board/ti/am62x_sk.rst | 1 -
  2 files changed, 2 deletions(-)



NAK to the series. RNG seed is needed for KASLR. either enable h/w RNG


@Wadim: Please take note and ignore my previous suggestion to you to
remove this line, keep this line as is.


or at least enable S/W RNG in OPTEE.



Agreed, I will send a patch to use HWRNG later on then. For now let's
just keep the PRNG enabled in these docs.


--
Thanks and Regards,
Dhruva Gole


Re: [PATCH v2 1/2] board: phytec: am62x: Add PHYTEC phyCORE-AM62x SoM

2023-12-01 Thread Dhruva Gole
Hi,

On Nov 30, 2023 at 12:56:06 +0100, Wadim Egorov wrote:
> Add basic support for PHYTEC phyCORE-AM62x SoM.
> 
> Supported features:
>   - 2GB DDR4 RAM
>   - eMMC Flash
>   - OSPI NOR Flash
>   - external uSD
>   - Ethernet
>   - debug UART
> 
> Product page SoM: https://www.phytec.com/product/phycore-am62x
> 
> Device trees were taken from Linux v6.7-rc3.

Thanks for providing the Linux tag, since DT changes are in sync with
kernel,

Reviewed-by: Dhruva Gole 

> 
> Signed-off-by: Wadim Egorov 
> ---
> v2:
>   - Add cover-letter & mention Linux version I took the DTs from
>   - Move board selection to mach-k3
>   - Add missing SPL_LDSCRIPT definition
>   - Refactore binman file for templated FITs & drop key overrides
>   - Drop SoC provided bootph params from dt files
> Note: Later we can drop more bootph params after we added them to Linux
>   - Drop CONFIG_TI_SECURE_DEVICE as it is set as default for K3
>   - Drop cpsw3g custom DT property 'mac_efuse' and custom DT node cpsw-phy-sel
> as driver picks these from standard property/node (-u-boot.dtsi)
>   - Add a53 cluster power to control from the rproc driver (a53 dt node)
> 
> ---
>  arch/arm/dts/Makefile |4 +-
>  .../arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi | 2190 +
>  arch/arm/dts/k3-am62-phycore-som.dtsi |  324 +++
>  .../k3-am625-phyboard-lyra-rdk-u-boot.dtsi|  166 ++
>  arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts   |  266 ++
>  arch/arm/dts/k3-am625-phycore-som-binman.dtsi |  380 +++
>  arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts  |  119 +
>  arch/arm/mach-k3/am62x/Kconfig|   17 +
>  board/phytec/phycore_am62x/Kconfig|   33 +
>  board/phytec/phycore_am62x/MAINTAINERS|   15 +
>  board/phytec/phycore_am62x/Makefile   |8 +
>  board/phytec/phycore_am62x/board-cfg.yaml |   36 +
>  board/phytec/phycore_am62x/phycore-am62x.c|   59 +
>  board/phytec/phycore_am62x/phycore_am62x.env  |   23 +
>  board/phytec/phycore_am62x/pm-cfg.yaml|   12 +
>  board/phytec/phycore_am62x/rm-cfg.yaml| 1088 
>  board/phytec/phycore_am62x/sec-cfg.yaml   |  379 +++
>  configs/phycore_am62x_a53_defconfig   |  115 +
>  configs/phycore_am62x_r5_defconfig|  130 +
>  include/configs/phycore_am62x.h   |   15 +
>  20 files changed, 5378 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/k3-am62-phycore-som-ddr4-2gb.dtsi
>  create mode 100644 arch/arm/dts/k3-am62-phycore-som.dtsi
>  create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk-u-boot.dtsi
>  create mode 100644 arch/arm/dts/k3-am625-phyboard-lyra-rdk.dts
>  create mode 100644 arch/arm/dts/k3-am625-phycore-som-binman.dtsi
>  create mode 100644 arch/arm/dts/k3-am625-r5-phycore-som-2gb.dts
>  create mode 100644 board/phytec/phycore_am62x/Kconfig
>  create mode 100644 board/phytec/phycore_am62x/MAINTAINERS
>  create mode 100644 board/phytec/phycore_am62x/Makefile
>  create mode 100644 board/phytec/phycore_am62x/board-cfg.yaml
>  create mode 100644 board/phytec/phycore_am62x/phycore-am62x.c
>  create mode 100644 board/phytec/phycore_am62x/phycore_am62x.env
>  create mode 100644 board/phytec/phycore_am62x/pm-cfg.yaml
>  create mode 100644 board/phytec/phycore_am62x/rm-cfg.yaml
>  create mode 100644 board/phytec/phycore_am62x/sec-cfg.yaml
>  create mode 100644 configs/phycore_am62x_a53_defconfig
>  create mode 100644 configs/phycore_am62x_r5_defconfig
>  create mode 100644 include/configs/phycore_am62x.h
> 
[]

-- 
Best regards,
Dhruva Gole 


[PATCH 2/2] doc: board: ti: am62x_sk: Remove SW_PRNG Flag for OPTEE

2023-12-01 Thread Dhruva Gole
This SoC does not require the CFG_WITH_SOFTWARE_PRNG option to be set
for base boot support, hence remove it from the U-Boot documentation.

Signed-off-by: Dhruva Gole 
---
 doc/board/ti/am62x_sk.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst
index b12dc85f06b5..35d759e806c0 100644
--- a/doc/board/ti/am62x_sk.rst
+++ b/doc/board/ti/am62x_sk.rst
@@ -84,7 +84,6 @@ Set the variables corresponding to this platform:
   # we dont use any extra TFA parameters
   unset TFA_EXTRA_ARGS
   export OPTEE_PLATFORM=k3-am62x
-  export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
 
 .. am62x_evm_rst_include_start_build_steps
 
-- 
2.34.1



[PATCH 1/2] doc: board: beagle: am62x_beagleplay: Delete SW_PRNG flag for OPTEE

2023-12-01 Thread Dhruva Gole
Delete the flag CFG_WITH_SOFTWARE_PRNG as it's not necessary/ boot
requirement for this SoC

Signed-off-by: Dhruva Gole 
---
 doc/board/beagle/am62x_beagleplay.rst | 1 -
 1 file changed, 1 deletion(-)

diff --git a/doc/board/beagle/am62x_beagleplay.rst 
b/doc/board/beagle/am62x_beagleplay.rst
index 7784e62b0b71..50d7d3c620d7 100644
--- a/doc/board/beagle/am62x_beagleplay.rst
+++ b/doc/board/beagle/am62x_beagleplay.rst
@@ -63,7 +63,6 @@ Set the variables corresponding to this platform:
   # we dont use any extra TFA parameters
   unset TFA_EXTRA_ARGS
   export OPTEE_PLATFORM=k3-am62x
-  export OPTEE_EXTRA_ARGS="CFG_WITH_SOFTWARE_PRNG=y"
 
 .. include::  ../ti/am62x_sk.rst
 :start-after: .. am62x_evm_rst_include_start_build_steps
-- 
2.34.1



  1   2   >