doc: board: ti: Update documentation for binman flow

Earlier documentation specified builds for generating bootloader images
using an external TI repository k3-image-gen and core-secdev-k3. Modify
this to using the binman flow so that user understands how to build the
final boot images.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst
index 2b2f4bb..7390e03 100644
--- a/doc/board/ti/k3.rst
+++ b/doc/board/ti/k3.rst
@@ -33,6 +33,7 @@
    j721e_evm
    j7200_evm
    am62x_sk
+   am65x_evm
 
 Boot Flow Overview
 ------------------
@@ -53,13 +54,13 @@
 any peripherals needed load the larger binaries inside the `tispl.bin`
 into DDR.  Once loaded the wakeup SPL will start one of the 'big'
 application cores inside the main domain to initialize the main domain,
-starting with ARM Trusted Firmware (ATF), before moving on to start
-OPTEE and the main domain's U-Boot SPL.
+starting with Trusted Firmware-A (TF-A), before moving on to start
+OP-TEE and the main domain's U-Boot SPL.
 
 .. code-block:: text
 
    |  WKUP Domain   | Main Domain ->
-    ROM -> WKUP SPL -> ATF -> OPTEE -> Main SPL
+    ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL
 
 The main domain's SPL, running on a 64bit application core, has
 virtually unlimited space (billions of bytes now that DDR is working) to
@@ -70,7 +71,7 @@
 .. code-block:: text
 
    |  WKUP Domain   | Main Domain ->
-    ROM -> WKUP SPL -> ATF -> OPTEE -> Main SPL -> UBoot -> Linux
+    ROM -> WKUP SPL -> TF-A -> OP-TEE -> Main SPL -> UBoot -> Linux
 
 This is the typical boot flow for all K3 based SoCs, however this flow
 offers quite a lot in the terms of flexibility, especially on High
@@ -115,17 +116,12 @@
   | **source:** https://source.denx.de/u-boot/u-boot.git
   | **branch:** master
 
-* **K3 Image Gen**
+* **Trusted Firmware-A (TF-A)**
 
-  | **source:** https://git.ti.com/git/k3-image-gen/k3-image-gen.git
+  | **source:** https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
   | **branch:** master
 
-* **ARM Trusted Firmware (ATF)**
-
-  | **source:** https://github.com/ARM-software/arm-trusted-firmware.git
-  | **branch:** master
-
-* **Open Portable Trusted Execution Environment (OPTEE)**
+* **Open Portable Trusted Execution Environment (OP-TEE)**
 
   | **source:** https://github.com/OP-TEE/optee_os.git
   | **branch:** master
@@ -135,11 +131,6 @@
   | **source:** https://git.ti.com/git/processor-firmware/ti-linux-firmware.git
   | **branch:** ti-linux-firmware
 
-* **TI's Security Development Tools**
-
-  | **source:** https://git.ti.com/git/security-development-tools/core-secdev-k3.git
-  | **branch:** master
-
 Build Procedure
 ---------------
 
@@ -161,54 +152,37 @@
 
 .. code-block:: bash
 
-   export CC32=arm-linux-gnueabihf-
-   export CC64=aarch64-linux-gnu-
+ $ export CC32=arm-linux-gnueabihf-
+ $ export CC64=aarch64-linux-gnu-
 
 Building tiboot3.bin
 ^^^^^^^^^^^^^^^^^^^^^
 
 1. To generate the U-Boot SPL for the wakeup domain, use the following
    commands, substituting :code:`{SOC}` for the name of your device (eg:
-   am62x)
+   am62x) to package the various firmware and the wakeup UBoot SPL into
+   the final `tiboot3.bin` binary. (or the `sysfw.itb` if your device
+   uses the split binary flow)
+
 
 .. code-block:: bash
 
-   # inside u-boot source
-   make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32 {SOC}_evm_r5_defconfig
-   make ARCH=arm O=build/wkup CROSS_COMPILE=$CC32
-
-2. Next we will use the K3 Image Gen scripts to package the various
-   firmware and the wakeup UBoot SPL into the final `tiboot3.bin`
-   binary. (or the `sysfw.itb` if your device uses the split binary
-   flow)
-
-.. code-block:: bash
-
-   # inside k3-image-gen source
-   make CROSS_COMPILE=$CC32 SOC={SOC} SOC_TYPE={hs,gp} \
-        TI_SECURE_DEV_PKG=<path/to/securit-development-tools> \
-        SYSFW_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-{hs|gp}.bin> \
-        SYSFW_HS_INNER_CERT_PATH=<path/to/ti-sysfw/ti-fs-firmware-{SOC}-hs-cert.bin
-
-For devices that use the *combined binary flow*, you will also need to
-supply the location of the SPL we created in step 1 above, so it can be
-packaged into the final `tiboot3.bin`.
-
-.. code-block:: bash
-
-   SBL=<path/to/wakeup/u-boot-spl.bin>
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_r5_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC32 \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware>
 
 At this point you should have all the needed binaries to boot the wakeup
 domain of your K3 SoC.
 
 **Combined Binary Boot Flow** (eg: am62x, am64x, ... )
 
-   `k3-image-gen/tiboot3-{SOC}-{hs,gp}-evm.bin`
+   `tiboot3-{SOC}-{gp/hs-fs/hs}.bin`
 
 **Split Binary Boot Flow** (eg: j721e, am65x)
 
-   | `u-boot/build/wkup/tiboot3.bin`
-   | `k3-image-gen/sysfw-{SOC}-evm.bin`
+   | `tiboot3-{SOC}-{gp/hs-fs/hs}.bin`
+   | `sysfw-{SOC}-{gp/hs-fs/hs}-evm.itb`
 
 .. note ::
 
@@ -223,53 +197,47 @@
 the main domain to function properly as well as Device Management (DM)
 firmware if your device using a split firmware.
 
-3. We will first need ATF, as it's the first thing to run on the 'big'
+2. We will first need TF-A, as it's the first thing to run on the 'big'
    application cores on the main domain.
 
 .. code-block:: bash
 
-   # inside arm-trusted-firmware source
-   make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
-        TARGET_BOARD={lite|generic} \
-        SPD=opteed \
+ $ # inside trusted-firmware-a source
+ $ make CROSS_COMPILE=$CC64 ARCH=aarch64 PLAT=k3 \
+        TARGET_BOARD={lite|generic|j784s4} \
+        SPD=opteed
 
-Typically all `j7*` devices will use `TARGET_BOARD=generic` while all
-Sitara (`am6*`) devices use the `lite` option.
+Typically all `j7*` devices will use `TARGET_BOARD=generic` or `TARGET_BOARD
+=j784s4` (if it is a J784S4 device), while all Sitara (`am6*`) devices
+use the `lite` option.
 
-4. The Open Portable Trusted Execution Environment (OPTEE) is designed
+3. The Open Portable Trusted Execution Environment (OP-TEE) is designed
    to run as a companion to a non-secure Linux kernel for Cortex-A cores
    using the TrustZone technology built into the core.
 
 .. code-block:: bash
 
-   # inside optee_os source
-   make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
+ $ # inside optee_os source
+ $ make CROSS_COMPILE=$CC32 CROSS_COMPILE64=$CC64 \
         PLATFORM=k3 CFG_ARM64_core=y
 
-5. Finally, after ATF has initialized the main domain and OPTEE has
+4. Finally, after TF-A has initialized the main domain and OP-TEE has
    finished, we can jump back into U-Boot again, this time running on a
    64bit core in the main domain.
 
 .. code-block:: bash
 
-   # inside u-boot source
-   make ARCH=arm O=build/main CROSS_COMPILE=$CC64 {SOC}_evm_a{53,72}_defconfig
-   make ARCH=arm O=build/main CROSS_COMPILE=$CC64 \
-        ATF=<path/to/atf/bl31.bin \
-        TEE=<path/to/optee/tee-pager_v2.bin
-
-If your device uses a split firmware, you will also need to supply the
-path to the Device Management (DM) Firmware to be included in the final
-`tispl.bin` binary
-
-.. code-block:: bash
-
-   DM=<path/to/ti-linux-firmware/ti-dm/ipc_echo_testb_mcu1_0_release_strip.xer5f>
+ $ # inside u-boot source
+ $ make ARCH=arm {SOC}_evm_a{53,72}_defconfig
+ $ make ARCH=arm CROSS_COMPILE=$CC64 \
+        BINMAN_INDIRS=<path/to/ti-linux-firmware> \
+        BL31=<path/to/trusted-firmware-a/dir>/build/k3/generic/release/bl31.bin \
+        TEE=<path/to/optee_os/dir>/out/arm-plat-k3/core/tee-raw.bin
 
 At this point you should have every binary needed initialize both the
 wakeup and main domain and to boot to the U-Boot prompt
 
 **Main Domain Bootloader**
 
-   | `u-boot/build/main/tispl.bin`
-   | `u-boot/build/main/u-boot.img`
+   | `tispl.bin` for HS devices or `tispl.bin_unsigned` for GP devices
+   | `u-boot.img` for HS devices or `u-boot.img_unsigned` for GP devices