kontron-sl-mx8mm: Add CAAM support
Subsystems (3)
PATCH v2 1/1 kontron-sl-mx8mm: Add CAAM support
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.
---
Changes since v1:
- Do not disable sec_jr0 node in -u-boot.dtsi. This will get disabled by the imx8mm.dtsi. Sent a patch upstream doing this. (Andrey)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 16 ++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 3 +++ board/kontron/sl-mx8mm/spl.c | 9 +++++++++ configs/kontron-sl-mx8mm_defconfig | 1 + 4 files changed, 29 insertions(+)
arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +16 -0
@@ -25,6 +25,22 @@ }; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &fec1 { phy-mode = "rgmii-rxid"; };
arch/arm/mach-imx/imx8m/Kconfig +3 -0
@@ -106,6 +106,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"
board/kontron/sl-mx8mm/spl.c +9 -0
@@ -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,
configs/kontron-sl-mx8mm_defconfig +1 -0
@@ -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
Signature · 1 line
2.25.1
Am 09.06.22 um 22:13 schrieb Fabio Estevam:
Quoted 6 lines
Add CAAM support, which is required when enabling HAB secure boot.
Select
CONFIG_SPL_DRIVERS_MISCso thatCONFIG_IMX_HABcould build successfully, if selected.Signed-off-by Fabio Estevam <[email protected]>
Build-tested on next and partly runtime-tested by verifying that "SEC0:
RNG instantiated" is printed to the console in SPL and U-Boot proper.
Quoted 91 lines
---
Changes since v1:
- Do not disablesec_jr0node in-u-boot.dtsi. This will get disabled by theimx8mm.dtsi. Sent a patch upstream doing this. (Andrey)arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi | 16 ++++++++++++++++ arch/arm/mach-imx/imx8m/Kconfig | 3 +++ board/kontron/sl-mx8mm/spl.c | 9 +++++++++ configs/kontron-sl-mx8mm_defconfig | 1 + 4 files changed, 29 insertions(+)arch/arm/dts/imx8mm-kontron-n801x-u-boot.dtsi +16
-0@@ -25,6 +25,22 @@ }; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &fec1 { phy-mode = "rgmii-rxid"; };arch/arm/mach-imx/imx8m/Kconfig +3
-0@@ -106,6 +106,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"board/kontron/sl-mx8mm/spl.c +9
-0@@ -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,configs/kontron-sl-mx8mm_defconfig +1
-0@@ -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