]> git.baikalelectronics.ru Git - uboot.git/commitdiff
kontron-sl-mx8mm: Add CAAM support
authorFabio Estevam <festevam@denx.de>
Thu, 9 Jun 2022 20:13:31 +0000 (17:13 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 28 Jun 2022 13:24:31 +0000 (15:24 +0200)
Add CAAM support, which is required when enabling HAB secure boot.

Select CONFIG_SPL_DRIVERS_MISC so that CONFIG_IMX_HAB could
build successfully, if selected.

Signed-off-by: Fabio Estevam <festevam@denx.de>
Acked-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi
arch/arm/mach-imx/imx8m/Kconfig
board/kontron/sl-mx8mm/spl.c
configs/kontron-sl-mx8mm_defconfig

index 4eadcc9899e9842426109a4be73740ec72cab35e..8cd3b23793c455ab5ad211ecffc59e2adf68d5be 100644 (file)
        };
 };
 
+&crypto {
+       u-boot,dm-spl;
+};
+
+&sec_jr0 {
+       u-boot,dm-spl;
+};
+
+&sec_jr1 {
+       u-boot,dm-spl;
+};
+
+&sec_jr2 {
+       u-boot,dm-spl;
+};
+
+
 &i2c1 {
        u-boot,dm-spl;
        u-boot,dm-pre-reloc;
index ef8518c06bdfcf669728a8287fc5a3411d322f01..09b9d5603d00ad42f5edacd8cd30ba6fd851ab7e 100644 (file)
@@ -107,6 +107,9 @@ config TARGET_KONTRON_MX8MM
        select IMX8MM
        select SUPPORT_SPL
        select IMX8M_LPDDR4
+       select FSL_CAAM
+       select ARCH_MISC_INIT
+       select SPL_CRYPTO if SPL
 
 config TARGET_IMX8MN_BSH_SMM_S2
        bool "imx8mn-bsh-smm-s2"
index 4ef03c8c172fc020acefc235697d00b35a14a46e..5a513722c5d5ffa9f5d09ddb0aa3ef47f7257863 100644 (file)
@@ -13,6 +13,9 @@
 #include <asm/mach-imx/boot_mode.h>
 #include <asm/mach-imx/iomux-v3.h>
 #include <dm/uclass.h>
+#include <dm/device.h>
+#include <dm/uclass-internal.h>
+#include <dm/device-internal.h>
 #include <hang.h>
 #include <i2c.h>
 #include <init.h>
@@ -213,6 +216,12 @@ void spl_board_init(void)
        struct udevice *dev;
        int ret;
 
+       if (IS_ENABLED(CONFIG_FSL_CAAM)) {
+               ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
+               if (ret)
+                       printf("Failed to initialize %s: %d\n", dev->name, ret);
+       }
+
        puts("Normal Boot\n");
 
        ret = uclass_get_device_by_name(UCLASS_CLK,
index 727f99f0063c639795afba76c8b62b0528ba8991..f453ace625549e5ca5eb063dcec6836bf8f6ba5e 100644 (file)
@@ -16,6 +16,7 @@ CONFIG_SPL_TEXT_BASE=0x7E1000
 CONFIG_TARGET_KONTRON_MX8MM=y
 CONFIG_SPL_MMC=y
 CONFIG_SPL_SERIAL=y
+CONFIG_SPL_DRIVERS_MISC=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SPL=y
 CONFIG_SYS_LOAD_ADDR=0x42000000