From: Vignesh Raghavendra <[email protected]>

Add the initial configuration to build the boot binaries for the AM62L
family of devices

Tested-by: Anshul Dalal <[email protected]>
Signed-off-by: Vignesh Raghavendra <[email protected]>
Signed-off-by: Bryan Brattlof <[email protected]>
---
Changes in v2:
- Removed bootph from scmi{} node
- Removed signatures from u-boot fit image
- Link to v1: https://lore.kernel.org/r/[email protected]
---
 arch/arm/dts/k3-am62l3-evm-binman.dtsi | 218 +++++++++++++++++++++++++++++++++
 arch/arm/dts/k3-am62l3-evm-u-boot.dtsi |  12 ++
 arch/arm/mach-k3/Kconfig               |  21 ++++
 3 files changed, 251 insertions(+)

diff --git a/arch/arm/dts/k3-am62l3-evm-binman.dtsi 
b/arch/arm/dts/k3-am62l3-evm-binman.dtsi
new file mode 100644
index 000000000000..3f7e2097e521
--- /dev/null
+++ b/arch/arm/dts/k3-am62l3-evm-binman.dtsi
@@ -0,0 +1,218 @@
+// SPDX-License-Identifier: GPL-2.0-only or MIT
+/*
+ * Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/ {
+       binman: binman {
+               multiple-images;
+       };
+};
+
+&binman {
+       custMpk {
+               filename = "custMpk.pem";
+
+               custmpk_pem: blob-ext {
+                       filename = "arch/arm/mach-k3/keys/custMpk.pem";
+               };
+       };
+
+       custMpk-crt {
+               filename = "custMpk.crt";
+
+               custmpk_crt: blob-ext {
+                       filename = "arch/arm/mach-k3/keys/custMpk.crt";
+               };
+       };
+
+       custMpk-key {
+               filename = "custMpk.key";
+
+               custmpk_key: blob-ext {
+                       filename = "arch/arm/mach-k3/keys/custMpk.key";
+               };
+       };
+
+       board-cfg {
+               filename = "board-cfg.bin";
+
+               bcfg_yaml: ti-board-config {
+                       config = "board-cfg.yaml";
+                       schema = "arch/arm/mach-k3/am62lx/schema.yaml";
+               };
+       };
+
+       sec-cfg {
+               filename = "sec-cfg.bin";
+
+               sec_yaml: ti-board-config {
+                       config = "sec-cfg.yaml";
+                       schema = "arch/arm/mach-k3/am62lx/schema.yaml";
+               };
+       };
+
+       combined-tifs-cfg {
+               filename = "combined-tifs-cfg.bin";
+
+               ti-board-config {
+                       bcfg_yaml_tifs: board-cfg {
+                               config = "board-cfg.yaml";
+                               schema = "arch/arm/mach-k3/am62lx/schema.yaml";
+                       };
+
+                       sec_yaml_tifs: sec-cfg {
+                               config = "sec-cfg.yaml";
+                               schema = "arch/arm/mach-k3/am62lx/schema.yaml";
+                       };
+               };
+       };
+
+       tiboot3.bin {
+               filename = "tiboot3.bin";
+
+               ti-secure-rom {
+                       content = <&bl1>, <&tifs_enc>, <&tifs_data>, 
<&tifs_cert>;
+                       combined;
+                       sysfw-inner-cert;
+                       keyfile = "custMpk.pem";
+                       sw-rev = <1>;
+                       content-sbl = <&bl1>;
+                       content-sysfw = <&tifs_enc>;
+                       content-sysfw-data = <&tifs_data>;
+                       content-sysfw-inner-cert = <&tifs_cert>;
+                       load = <0x70800000>;
+                       load-sysfw = <CONFIG_K3_TIFS_LOAD_ADDR>;
+                       load-sysfw-data = <CONFIG_K3_TIFS_DATA_LOAD_ADDR>;
+                       core-opts = <160>;
+               };
+
+               bl1: atf-bl1 {
+               };
+
+               tifs_enc: tifs-enc.bin {
+                       filename = "ti-sysfw/ti-fs-firmware-am62lx-hs-enc.bin";
+                       type = "blob-ext";
+               };
+
+               tifs_data: sysfw-data.bin {
+                       filename = "combined-tifs-cfg.bin";
+                       type = "blob-ext";
+               };
+
+               tifs_cert: tifs-cert.bin {
+                       filename = "ti-sysfw/ti-fs-firmware-am62lx-hs-cert.bin";
+                       type = "blob-ext";
+               };
+       };
+
+       tispl.bin {
+               filename = "tispl.bin";
+
+               ti-secure-rom {
+                       content = <&atf>, <&tifs_enc2>, <&tifs_data2>,
+                                 <&tifs_cert2>, <&tee>, <&spl>;
+                       combined;
+                       sysfw-inner-cert;
+                       dm-data;
+                       keyfile = "custMpk.pem";
+                       sw-rev = <1>;
+                       content-sbl = <&atf>;
+                       content-tee = <&tee>;
+                       content-sysfw = <&tifs_enc2>;
+                       content-sysfw-data = <&tifs_data2>;
+                       content-sysfw-inner-cert = <&tifs_cert2>;
+                       content-dm-data = <&spl>;
+                       load = <CONFIG_K3_ATF_LOAD_ADDR>;
+                       load-sysfw = <CONFIG_K3_TIFS_LOAD_ADDR>;
+                       load-sysfw-data = <CONFIG_K3_TIFS_DATA_LOAD_ADDR>;
+                       load-dm-data = <CONFIG_SPL_TEXT_BASE>;
+                       load-tee = <CONFIG_K3_OPTEE_LOAD_ADDR>;
+               };
+
+               atf: atf-bl31 {
+               };
+
+               tifs_enc2: tifs-enc2.bin {
+                       filename = "ti-sysfw/ti-fs-firmware-am62lx-hs-enc.bin";
+                       type = "blob-ext";
+               };
+
+               tifs_data2: sysfw-data2.bin {
+                       filename = "combined-tifs-cfg.bin";
+                       type = "blob-ext";
+               };
+
+               tifs_cert2: tifs-cert2.bin {
+                       filename = "ti-sysfw/ti-fs-firmware-am62lx-hs-cert.bin";
+                       type = "blob-ext";
+               };
+
+               tee: tee-os {
+               };
+
+               spl: section {
+                       u-boot-spl-nodtb {
+                       };
+
+                       u-boot-spl-pubkey-dtb {
+                               algo = "sha512,rsa4096";
+                               required = "conf";
+                               key-name-hint = "custMpk";
+                       };
+               };
+       };
+
+       u-boot.img {
+               filename = "u-boot.img";
+               pad-byte = <0xff>;
+
+               fit {
+                       description = "U-Boot fitImage for AM62Lx SK";
+
+                       images {
+                               uboot {
+                                       description = "U-Boot for AM62Lx SK";
+                                       type = "firmware";
+                                       os = "u-boot";
+                                       arch = "arm";
+                                       compression = "none";
+                                       load = <CONFIG_TEXT_BASE>;
+
+                                       blob {
+                                               filename = "u-boot-nodtb.bin";
+                                       };
+
+                                       hash {
+                                               algo = "sha512";
+                                       };
+                               };
+
+                               fdt-0 {
+                                       description = "k3-am62lx-evm";
+                                       type = "flat_dt";
+                                       arch = "arm";
+                                       compression = "none";
+
+                                       u-boot-dtb {
+                                       };
+
+                                       hash {
+                                               algo = "sha512";
+                                       };
+                               };
+                       };
+
+                       configurations {
+                               default = "conf-0";
+
+                               conf-0 {
+                                       description = "k3-am62lx-evm";
+                                       firmware = "uboot";
+                                       loadables = "uboot";
+                                       fdt = "fdt-0";
+                               };
+                       };
+               };
+       };
+};
diff --git a/arch/arm/dts/k3-am62l3-evm-u-boot.dtsi 
b/arch/arm/dts/k3-am62l3-evm-u-boot.dtsi
new file mode 100644
index 000000000000..d48b478b89c4
--- /dev/null
+++ b/arch/arm/dts/k3-am62l3-evm-u-boot.dtsi
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+#include "k3-am62l3-evm-binman.dtsi"
+
+/ {
+       aliases {
+               mmc1 = &sdhci1;
+       };
+};
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig
index 8249fc97bc93..02f82364777d 100644
--- a/arch/arm/mach-k3/Kconfig
+++ b/arch/arm/mach-k3/Kconfig
@@ -129,6 +129,26 @@ config K3_EARLY_CONS_IDX
          Use this option to set the index of the serial device to be used
          for the early console during SPL execution.
 
+config K3_TIFS_LOAD_ADDR
+       hex "Load address of TI's Foundational Security (TIFS) firmware"
+       default 0x40000
+       help
+         The load address for TI's Foundation Security firmware. This value is
+         used to build the x509 certificate to tell boot ROM where to place the
+         TIFS firmware in memory.
+
+         Unless you know what you're doing. Do not change this value.
+
+config K3_TIFS_DATA_LOAD_ADDR
+       hex "Load address of TIFS configuration data"
+       default 0x6c000
+       help
+         The load address for TI's Foundation Security configuration data. This
+         value is used to build the x509 certificate to tell ROM where to place
+         the TIFS firmware.
+
+         Unless you know what you're doing. Do not change this value.
+
 config K3_ATF_LOAD_ADDR
        hex "Load address of ATF image"
        default 0x80000000 if (SOC_K3_AM625 || SOC_K3_AM62A7 || SOC_K3_AM62P5 
|| SOC_K3_J722S || SOC_K3_AM62L3)
@@ -149,6 +169,7 @@ config K3_ATF_RESERVED_SIZE
 
 config K3_OPTEE_LOAD_ADDR
        hex "Load address of OPTEE image"
+       default 0x80200000 if SOC_K3_AM62L3
        default 0x9e800000
        help
          The load address for the OPTEE image. This value defaults to 
0x9e800000

-- 
2.54.0

Reply via email to