All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Othacehe <othacehe@gnu.org>
To: "Tom Rini" <trini@konsulko.com>, "Marek Vasut" <marex@denx.de>,
	"Peng Fan" <peng.fan@nxp.com>,
	"Shiji Yang" <yangshiji66@outlook.com>, "Ye Li" <ye.li@nxp.com>,
	"Alice Guo" <alice.guo@nxp.com>, "Stefano Babic" <sbabic@denx.de>,
	"Sébastien Szymanski" <sebastien.szymanski@armadeus.com>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Simon Glass" <sjg@chromium.org>,
	"Mathieu Othacehe" <m.othacehe@gmail.com>
Cc: u-boot@lists.denx.de, Mathieu Othacehe <othacehe@gnu.org>
Subject: [PATCH 1/2] imx9: Fix OP-TEE support
Date: Mon, 26 Feb 2024 18:37:18 +0100	[thread overview]
Message-ID: <20240226173719.25629-2-othacehe@gnu.org> (raw)
In-Reply-To: <20240226173719.25629-1-othacehe@gnu.org>

This fixes OP-TEE support by:

- Adding tee.bin to container.cfg
- Starting ELE RNG in SPL

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 arch/arm/mach-imx/imx9/container.cfg | 3 ++-
 board/freescale/imx93_evk/spl.c      | 7 +++++++
 board/phytec/phycore_imx93/spl.c     | 7 +++++++
 board/variscite/imx93_var_som/spl.c  | 6 ++++++
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/imx9/container.cfg b/arch/arm/mach-imx/imx9/container.cfg
index f268bc9eb2c..72fe791eae6 100644
--- a/arch/arm/mach-imx/imx9/container.cfg
+++ b/arch/arm/mach-imx/imx9/container.cfg
@@ -7,4 +7,5 @@ BOOT_FROM SD 0x400
 SOC_TYPE IMX9
 CONTAINER
 IMAGE A55 bl31.bin 0x204E0000
-IMAGE A55 u-boot.bin CONFIG_TEXT_BASE
\ No newline at end of file
+IMAGE A55 u-boot.bin CONFIG_TEXT_BASE
+IMAGE A55 tee.bin 0x96000000
\ No newline at end of file
diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c
index a98ed69db88..2fd5559195e 100644
--- a/board/freescale/imx93_evk/spl.c
+++ b/board/freescale/imx93_evk/spl.c
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch-mx7ulp/gpio.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/mach-imx/syscounter.h>
 #include <asm/sections.h>
 #include <dm/uclass.h>
@@ -43,6 +44,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 
 void spl_board_init(void)
 {
+	int ret;
+
+	ret = ele_start_rng();
+	if (ret)
+		printf("Fail to start RNG: %d\n", ret);
+
 	puts("Normal Boot\n");
 }
 
diff --git a/board/phytec/phycore_imx93/spl.c b/board/phytec/phycore_imx93/spl.c
index dabc5316f33..16303fc187a 100644
--- a/board/phytec/phycore_imx93/spl.c
+++ b/board/phytec/phycore_imx93/spl.c
@@ -11,6 +11,7 @@
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/trdc.h>
 #include <asm/mach-imx/boot_mode.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/sections.h>
 #include <hang.h>
 #include <init.h>
@@ -34,6 +35,12 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 
 void spl_board_init(void)
 {
+	int ret;
+
+	ret = ele_start_rng();
+	if (ret)
+		printf("Fail to start RNG: %d\n", ret);
+
 	puts("Normal Boot\n");
 }
 
diff --git a/board/variscite/imx93_var_som/spl.c b/board/variscite/imx93_var_som/spl.c
index e6db4eb562b..36e17219d63 100644
--- a/board/variscite/imx93_var_som/spl.c
+++ b/board/variscite/imx93_var_som/spl.c
@@ -20,6 +20,7 @@
 #include <asm/mach-imx/mxc_i2c.h>
 #include <asm/arch-mx7ulp/gpio.h>
 #include <asm/sections.h>
+#include <asm/mach-imx/ele_api.h>
 #include <asm/mach-imx/syscounter.h>
 #include <dm/uclass.h>
 #include <dm/device.h>
@@ -47,9 +48,14 @@ int spl_board_boot_device(enum boot_device boot_dev_spl)
 void spl_board_init(void)
 {
 	struct var_eeprom *ep = VAR_EEPROM_DATA;
+	int ret;
 
 	puts("Normal Boot\n");
 
+	ret = ele_start_rng();
+	if (ret)
+		printf("Fail to start RNG: %d\n", ret);
+
 	/* Copy EEPROM contents to DRAM */
 	memcpy(ep, &eeprom, sizeof(*ep));
 }
-- 
2.41.0


  reply	other threads:[~2024-02-26 17:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 17:37 [PATCH 0/2] Fix OP-TEE support Mathieu Othacehe
2024-02-26 17:37 ` Mathieu Othacehe [this message]
2024-02-26 17:37 ` [PATCH 2/2] tools: imx9_image: Reword warning message Mathieu Othacehe
2024-03-04 17:54 ` [PATCH 0/2] Fix OP-TEE support Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240226173719.25629-2-othacehe@gnu.org \
    --to=othacehe@gnu.org \
    --cc=alice.guo@nxp.com \
    --cc=festevam@gmail.com \
    --cc=m.othacehe@gmail.com \
    --cc=marex@denx.de \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=sebastien.szymanski@armadeus.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=yangshiji66@outlook.com \
    --cc=ye.li@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.