[PATCH] imx7: Disable CAAM Job Ring 0

Fabio Estevam festevam at gmail.com
Tue Sep 12 17:11:00 CEST 2023


From: Fabio Estevam <festevam at denx.de>

Trying to boot a fitImage after a successful hab_auth_img operation
causes the following error:

 ## Loading kernel from FIT Image at 88000000 ...
   Using 'conf-imx7d-smegw01.dtb' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux kernel
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x8800010c
     Data Size:    9901752 Bytes = 9.4 MiB
     Architecture: ARM
     OS:           Linux
     Load Address: 0x80800000
     Entry Point:  0x80800000
     Hash algo:    sha256
     Hash value:   28f8779bbf010780f16dd3d84ecb9b604c44c5c2cf7acd098c264a2d3f68e969
   Verifying Hash Integrity ... sha256Error in SEC deq
   CAAM was not setup properly or it is faulty error!

The reason for this error is that the BootROM uses the CAAM Job Ring 0,
so disable its node in U-Boot to avoid the resource conflict.

imx8m dtsi files also have the Job Ring 0 disable since the following
kernel commit:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch?h=v6.5&id=dc9c1ceb555ff661e6fc1081434600771f29657c

For a temporary solution, disable the Job Ring 0 in imx7s-u-boot.dtsi.

Reported-by: Eduard Strehlau <eduard at lionizers.com>
Signed-off-by: Fabio Estevam <festevam at denx.de>
---
 arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi | 2 ++
 arch/arm/dts/imx7d-pico-pi-u-boot.dtsi         | 2 ++
 arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi        | 2 ++
 arch/arm/dts/imx7d-sdb-u-boot.dtsi             | 2 ++
 arch/arm/dts/imx7d-smegw01-u-boot.dtsi         | 3 +++
 arch/arm/dts/imx7s-u-boot.dtsi                 | 7 +++++++
 6 files changed, 18 insertions(+)
 create mode 100644 arch/arm/dts/imx7d-smegw01-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx7s-u-boot.dtsi

diff --git a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
index 52aa8758701f..57ca28edb70d 100644
--- a/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-colibri-eval-v3-u-boot.dtsi
@@ -3,6 +3,8 @@
  * Copyright 2020-2022 Toradex
  */
 
+#include "imx7s-u-boot.dtsi"
+
 &{/aliases} {
 	/* SDHCI instance order: eMMC, SD/MMC */
 	mmc0 = &usdhc3;
diff --git a/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi b/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi
index 67b41ae1129c..843b4583e53a 100644
--- a/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-pico-pi-u-boot.dtsi
@@ -1,3 +1,5 @@
+#include "imx7s-u-boot.dtsi"
+
 /{
     aliases {
         mmc0 = &usdhc3;
diff --git a/arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi b/arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi
index 62cdcbaeb67d..896c8bcaa5ad 100644
--- a/arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-sdb-qspi-u-boot.dtsi
@@ -3,6 +3,8 @@
  * Copyright 2018 NXP
  */
 
+#include "imx7s-u-boot.dtsi"
+
 &qspi {
 	flash0: mx25l51245g at 0 {
 		compatible = "jedec,spi-nor";
diff --git a/arch/arm/dts/imx7d-sdb-u-boot.dtsi b/arch/arm/dts/imx7d-sdb-u-boot.dtsi
index ac1d6e2e6480..e4a27b8dd5aa 100644
--- a/arch/arm/dts/imx7d-sdb-u-boot.dtsi
+++ b/arch/arm/dts/imx7d-sdb-u-boot.dtsi
@@ -1,3 +1,5 @@
+#include "imx7s-u-boot.dtsi"
+
 &fec2 {
 	status = "disable";
 };
diff --git a/arch/arm/dts/imx7d-smegw01-u-boot.dtsi b/arch/arm/dts/imx7d-smegw01-u-boot.dtsi
new file mode 100644
index 000000000000..90f7500ee34c
--- /dev/null
+++ b/arch/arm/dts/imx7d-smegw01-u-boot.dtsi
@@ -0,0 +1,3 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+
+#include "imx7s-u-boot.dtsi"
diff --git a/arch/arm/dts/imx7s-u-boot.dtsi b/arch/arm/dts/imx7s-u-boot.dtsi
new file mode 100644
index 000000000000..c4c1da3c64f1
--- /dev/null
+++ b/arch/arm/dts/imx7s-u-boot.dtsi
@@ -0,0 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+ OR MIT
+
+&crypto {
+	sec_jr0: jr at 1000 {
+		status = "disabled";
+	};
+};
-- 
2.34.1



More information about the U-Boot mailing list