Add CAAM driver model support
Subsystems (5)
v10 cover Add CAAM driver model support
This patchset adds the support for following:
1) CAAM Driver model for all i.MX, layerscape, PPC platforms.
2) Added crypto node in device tree files.
3) fix build issue for mx6sabre: Remove SPL DTB related configs and SPL_OF_CONTROL.
i.MX platforms:
i.MX6, i.MX7, i.MX7ULP, i.MX8MM/MN/MP/MQ, i.MX8QM/QXP
Layerscape platforms:
LS1021, LS1012, LS1028, LS1043, LS1046, LS1088, LS2088, LX2160, LX2162
Powerpc platforms:
P3041, P4080, P5040, P2041, T1024, T1042, T2080, T4240
changes since v9:
- added IS_ENABLED(CONFIG_FSL_CAAM) check before probing CAAM driver.
- FSL_CAAM enablement is moved to defconfigs for layerscape, powerpc.
changes since v8:
- rebase to latest master
- removed patch "crypto/fsl: Improve hwrng performance in kernel".
- moved FSL_CAAM config to board defconfig for Layerscape platforms.
- moved MISC config select to "config FSL_CAAM" as "select MISC if DM".
changes since v7:
- rebase to latest master
- corrected the order of include files as per coding style in jr.c.
https://www.denx.de/wiki/U-Boot/CodingStyle
- added brackets around #defines for -ve number in jr.h
- added comments for struct caam_regs in jr.h
changes since v6:
- rebase to latest master
- added caam_jr_ioctl() operation which calls run_descriptor_jr().
- removed CONFIG_ARCH_IMX8 config from JR driver.
- removed FSL_BLOB config
changes since v5:
- rebase to latest master
- updated BIT() macro for JRDID in drivers/crypto/fsl/jr.h
- removed auto select FSL_BLOB from CMD_BLOB config.
- removed patch for blob key encryption key(bkek), random number generation.
- updated patch description for improving hwrng performance in kernel.
- removed sec_init() from kontron/sl28.
- for LS1028A architecture, enable CAAM only for LS1028AQDS and LS1028ARDB.
changes since v4:
- rebase to latest master
- updated caam_jr_probe() with livetree APIs.
- imx8m: moved jr0 disable code to *-uboot.dtsi files.
changes since v3:
- rebase to latest master
- fixed build error when new file arch/powerpc/include/asm/u-boot-ppc.h is included from assembly files.
- removed arch/arm/dts/fsl-ls1028a.dtsi as it is conflicting with the series
https://lore.kernel.org/u-boot/[email protected]/
Gaurav Jain (13):
crypto/fsl: Add support for CAAM Job ring driver model i.MX8M: crypto: updated device tree for supporting DM in SPL crypto/fsl: i.MX8M: Enable Job ring driver model. i.MX6: Enable Job ring driver model.
i.MX7: Enable Job ring driver model.
i.MX7ULP: Enable Job ring driver model.
i.MX8: Add crypto node in device tree
crypto/fsl: i.MX8: Enable Job ring driver model.
Layerscape: Add crypto node in device tree
Layerscape: Enable Job ring driver model.
PPC: Add crypto node in device tree
PPC: Enable Job ring driver model.
update CAAM MAINTAINER
Ye Li (1):
mx6sabre: Remove unnecessary SPL configs
MAINTAINERS | 6 + arch/arm/Kconfig | 9 +- arch/arm/cpu/armv7/ls102xa/cpu.c | 18 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 11 +- arch/arm/dts/fsl-imx8dx.dtsi | 61 ++- arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi | 34 +- arch/arm/dts/fsl-imx8qm.dtsi | 61 ++- arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi | 34 +- arch/arm/dts/fsl-ls1012a.dtsi | 46 ++- arch/arm/dts/fsl-ls1043a.dtsi | 45 ++- arch/arm/dts/fsl-ls1046a.dtsi | 44 +++ arch/arm/dts/fsl-ls1088a.dtsi | 39 ++ arch/arm/dts/fsl-ls2080a.dtsi | 39 ++ arch/arm/dts/fsl-lx2160a.dtsi | 41 +- arch/arm/dts/imx7ulp.dtsi | 24 ++ arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 + arch/arm/dts/ls1021a.dtsi | 40 ++ arch/arm/include/asm/arch-imx8/imx-regs.h | 5 +- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + arch/arm/mach-imx/cmd_dek.c | 1 + arch/arm/mach-imx/imx8/Kconfig | 7 + arch/arm/mach-imx/imx8/cpu.c | 18 +- arch/arm/mach-imx/imx8m/Kconfig | 13 + arch/arm/mach-imx/imx8m/soc.c | 11 +- arch/arm/mach-imx/mx6/Kconfig | 10 + arch/arm/mach-imx/mx6/soc.c | 13 +- arch/arm/mach-imx/mx7/Kconfig | 1 + arch/arm/mach-imx/mx7/soc.c | 12 +- arch/arm/mach-imx/mx7ulp/Kconfig | 2 + arch/arm/mach-imx/mx7ulp/soc.c | 18 + arch/powerpc/cpu/mpc85xx/cpu_init.c | 19 +- arch/powerpc/dts/p2041si-post.dtsi | 1 + arch/powerpc/dts/p3041si-post.dtsi | 1 + arch/powerpc/dts/p4080si-post.dtsi | 1 + arch/powerpc/dts/p5040si-post.dtsi | 1 + arch/powerpc/dts/qoriq-sec4.0-0.dtsi | 74 ++++ arch/powerpc/dts/qoriq-sec4.2-0.dtsi | 83 ++++ arch/powerpc/dts/qoriq-sec5.2-0.dtsi | 92 +++++ arch/powerpc/dts/t1023si-post.dtsi | 1 + arch/powerpc/dts/t1042si-post.dtsi | 1 + arch/powerpc/dts/t2080si-post.dtsi | 1 + arch/powerpc/dts/t4240si-post.dtsi | 1 + arch/powerpc/include/asm/u-boot-ppc.h | 17 + arch/powerpc/include/asm/u-boot.h | 1 + board/freescale/imx8mm_evk/spl.c | 10 +- board/freescale/imx8mn_evk/spl.c | 9 +- board/freescale/imx8mp_evk/spl.c | 14 +- board/freescale/imx8mq_evk/spl.c | 8 +- board/freescale/imx8qm_mek/spl.c | 6 +- board/freescale/imx8qxp_mek/spl.c | 6 +- board/freescale/ls1012afrdm/ls1012afrdm.c | 7 +- board/freescale/ls1012aqds/ls1012aqds.c | 6 +- board/freescale/ls1012ardb/ls1012ardb.c | 6 +- board/freescale/ls1021aiot/ls1021aiot.c | 6 +- board/freescale/ls1021aqds/ls1021aqds.c | 6 +- board/freescale/ls1021atsn/ls1021atsn.c | 7 +- board/freescale/ls1021atwr/ls1021atwr.c | 8 +- board/freescale/ls1028a/ls1028a.c | 6 +- board/freescale/ls1043ardb/ls1043ardb.c | 6 +- board/freescale/ls1046afrwy/ls1046afrwy.c | 7 +- board/freescale/ls1046aqds/ls1046aqds.c | 7 +- board/freescale/ls1046ardb/ls1046ardb.c | 6 +- board/freescale/ls1088a/ls1088a.c | 6 +- board/freescale/ls2080aqds/ls2080aqds.c | 6 +- board/freescale/ls2080ardb/ls2080ardb.c | 9 +- board/freescale/lx2160a/lx2160a.c | 5 - board/kontron/sl28/sl28.c | 3 - configs/P2041RDB_NAND_defconfig | 1 + configs/P2041RDB_SDCARD_defconfig | 1 + configs/P2041RDB_SPIFLASH_defconfig | 1 + configs/P2041RDB_defconfig | 1 + configs/P3041DS_NAND_defconfig | 1 + configs/P3041DS_SDCARD_defconfig | 1 + configs/P3041DS_SPIFLASH_defconfig | 1 + configs/P3041DS_defconfig | 1 + configs/P4080DS_SDCARD_defconfig | 1 + configs/P4080DS_SPIFLASH_defconfig | 1 + configs/P4080DS_defconfig | 1 + configs/P5040DS_NAND_defconfig | 1 + configs/P5040DS_SDCARD_defconfig | 1 + configs/P5040DS_SPIFLASH_defconfig | 1 + configs/P5040DS_defconfig | 1 + configs/T1024RDB_NAND_defconfig | 1 + configs/T1024RDB_SDCARD_defconfig | 1 + configs/T1024RDB_SPIFLASH_defconfig | 1 + configs/T1024RDB_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T2080QDS_NAND_defconfig | 1 + configs/T2080QDS_SDCARD_defconfig | 1 + configs/T2080QDS_SPIFLASH_defconfig | 1 + configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 1 + configs/T2080QDS_defconfig | 1 + configs/T2080RDB_NAND_defconfig | 1 + configs/T2080RDB_SDCARD_defconfig | 1 + configs/T2080RDB_SPIFLASH_defconfig | 1 + configs/T2080RDB_defconfig | 1 + configs/T2080RDB_revD_NAND_defconfig | 1 + configs/T2080RDB_revD_SDCARD_defconfig | 1 + configs/T2080RDB_revD_SPIFLASH_defconfig | 1 + configs/T2080RDB_revD_defconfig | 1 + configs/T4240RDB_SDCARD_defconfig | 1 + configs/T4240RDB_defconfig | 1 + configs/ls1021aiot_qspi_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_defconfig | 1 + configs/ls1021aqds_nor_lpuart_defconfig | 1 + configs/ls1021aqds_qspi_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + configs/ls1021atwr_nor_defconfig | 1 + configs/ls1021atwr_nor_lpuart_defconfig | 1 + configs/ls1021atwr_qspi_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_defconfig | 1 + configs/ls1043aqds_lpuart_defconfig | 1 + configs/ls1043aqds_nand_defconfig | 1 + configs/ls1043aqds_nor_ddr3_defconfig | 1 + configs/ls1043aqds_qspi_defconfig | 1 + configs/ls1043aqds_sdcard_ifc_defconfig | 1 + configs/ls1043aqds_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_tfa_defconfig | 1 + configs/ls1043ardb_defconfig | 1 + configs/ls1043ardb_nand_defconfig | 1 + configs/ls1043ardb_sdcard_defconfig | 1 + configs/ls1043ardb_tfa_defconfig | 1 + configs/ls1046afrwy_tfa_defconfig | 1 + configs/ls1046aqds_defconfig | 1 + configs/ls1046aqds_lpuart_defconfig | 1 + configs/ls1046aqds_nand_defconfig | 1 + configs/ls1046aqds_qspi_defconfig | 1 + configs/ls1046aqds_sdcard_ifc_defconfig | 1 + configs/ls1046aqds_sdcard_qspi_defconfig | 1 + configs/ls1046aqds_tfa_defconfig | 1 + configs/ls1046ardb_emmc_defconfig | 1 + configs/ls1046ardb_qspi_defconfig | 1 + configs/ls1046ardb_qspi_spl_defconfig | 1 + configs/ls1046ardb_sdcard_defconfig | 1 + configs/ls1046ardb_tfa_defconfig | 1 + configs/mx6sabreauto_defconfig | 2 - configs/mx6sabresd_defconfig | 4 - drivers/crypto/fsl/Kconfig | 3 +- drivers/crypto/fsl/jr.c | 374 ++++++++++++------ drivers/crypto/fsl/jr.h | 31 +- include/fsl_sec.h | 12 +- scripts/config_whitelist.txt | 1 + 158 files changed, 1432 insertions(+), 255 deletions(-) create mode 100644 arch/powerpc/dts/qoriq-sec4.0-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec4.2-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec5.2-0.dtsi create mode 100644 arch/powerpc/include/asm/u-boot-ppc.h
Signature · 1 line
2.17.1
PATCH v10 1/14 crypto/fsl: Add support for CAAM Job ring driver model
added device tree support for job ring driver. sec is initialized based on job ring information processed from device tree.
--- drivers/crypto/fsl/Kconfig | 1 + drivers/crypto/fsl/jr.c | 323 ++++++++++++++++++++++++------------- drivers/crypto/fsl/jr.h | 31 +++- 3 files changed, 241 insertions(+), 114 deletions(-)
drivers/crypto/fsl/Kconfig +1 -0
@@ -2,6 +2,7 @@ config FSL_CAAM bool "Freescale Crypto Driver Support" select SHA_HW_ACCEL # hw_sha1() under drivers/crypto, and needed with SHA_HW_ACCEL + select MISC if DM imply SPL_CRYPTO if (ARM && SPL) imply CMD_HASH help
drivers/crypto/fsl/jr.c +212 -111
548 lines not on this page · raw message
drivers/crypto/fsl/jr.h +28 -3
@@ -1,6 +1,7 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* * Copyright 2008-2014 Freescale Semiconductor, Inc. +* Copyright 2021 NXP * */
@@ -8,7 +9,9 @@#define __JR_H#include <linux/compiler.h> +#include "fsl_sec.h" #include "type.h" +#include <misc.h> #define JR_SIZE 4/* Timeout currently defined as 10 sec */
@@ -35,12 +38,21 @@#define JRSLIODN_SHIFT 0#define JRSLIODN_MASK 0x00000fff -#define JQ_DEQ_ERR -1 -#define JQ_DEQ_TO_ERR -2 -#define JQ_ENQ_ERR -3 +#define JRDID_MS_PRIM_DID BIT(0) +#define JRDID_MS_PRIM_TZ BIT(4) +#define JRDID_MS_TZ_OWN BIT(15) + +#define JQ_DEQ_ERR (-1) +#define JQ_DEQ_TO_ERR (-2) +#define JQ_ENQ_ERR (-3)#define RNG4_MAX_HANDLES 2 +enum { +/* Run caam jobring descriptor(in buf) */ +CAAM_JR_RUN_DESC , +}; +struct op_ring {caam_dma_addr_t desc;uint32_t status;
@@ -102,6 +114,19 @@ struct result {uint32_t status; }; +/* +* struct caam_regs - CAAM initialization register interface +* +* Interface to caam memory map, jobring register, jobring storage. +*/ +struct caam_regs { +ccsr_sec_t *sec;/*caam initialization registers*/ +struct jr_regs *regs;/*jobring configuration registers*/ +u8 jrid;/*id to identify a jobring*/ +/*Private sub-storage for a single JobR*/ +struct jobring jr[CONFIG_SYS_FSL_MAX_NUM_OF_SEC ]; +}; +void caam_jr_strstatus (u32 status);int run_descriptor_jr (uint32_t *desc);
Signature · 1 line
2.17.1
Re: [PATCH v10 01/14] crypto/fsl: Add support for CAAM Job ring driver model
Quoted 5 lines · Gaurav Jain
added device tree support for job ring driver. sec is initialized based on job ring information processed from device tree.
Quoted 7 lines
Signed-off-by Gaurav Jain <[email protected]>Reviewed-by Ye Li <[email protected]>--- drivers/crypto/fsl/Kconfig | 1 + drivers/crypto/fsl/jr.c | 323 ++++++++++++++++++++++++------------- drivers/crypto/fsl/jr.h | 31 +++- 3 files changed, 241 insertions(+), 114 deletions(-)
PATCH v10 2/14 i.MX8M: crypto: updated device tree for supporting DM in SPL
In reply to Gaurav Jaindisabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
--- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 ++++ 4 files changed, 58 insertions(+), 3 deletions(-)
arch/arm/dts/imx8mm-evk-u-boot.dtsi +18 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mm-u-boot.dtsi"
@@ -68,6 +68,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };
arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +18 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ / {
@@ -104,6 +104,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };
arch/arm/dts/imx8mp-evk-u-boot.dtsi +18 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mp-u-boot.dtsi"
@@ -67,6 +67,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &i2c1 { u-boot,dm-spl; };
arch/arm/dts/imx8mq-evk-u-boot.dtsi +4 -0
@@ -10,3 +10,7 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&sec_jr0 { + status = "disabled"; +};
Signature · 1 line
2.17.1
RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Hello Gaurav,
Quoted 20 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Wednesday, January 12, 2022 2:31 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; NXP i . MX U-Boot Team <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Tang Yuantian <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Quoted 2 lines
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
I'd like to return the original question here, which was not completely clarified during previous reviews: where does the reservation restriction is coming from?
BootROM does reserve the JR0 and JR1, which are later released by ATF. NXP downstream ATF keeps the JR0 reserved, but upstream ATF does release *all* JRs to NS World.
If this reservation is taken like the patch proposes and U-Boot is built with upstream ATF - this would eventually lead to the situation where the HW configuration is not aligned with what DTB indicates.
Please note, that recent OP-TEE release has also re-mapped the JR it uses from JR0 to JR2, which can also lead to usage of the JR which is already taken by OP-TEE. There is an ongoing PR in OP-TEE to disable JR nodes via DT overlay for Linux [1], but I'm not sure if the same applies to U-Boot as well.
Quoted 135 lines
Signed-off-by Gaurav Jain <[email protected]>Reviewed-by Ye Li <[email protected]>--- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 ++++ 4 files changed, 58 insertions(+), 3 deletions(-)arch/arm/dts/imx8mm-evk-u- renamed from arch/arm/dts/imx8mm-evk-u-boot.dtsi +0
-0
boot.dtsi
index6b459831e7..e5682ca165100644arch/arm/dts/imx8mm-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mm-u-boot.dtsi"@@ -68,6 +68,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };arch/arm/dts/imx8mn-ddr4- renamed from arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +0
-0
evk-u-boot.dtsi
index1d3844437d..d8df863083100644arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ / {@@ -104,6 +104,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };arch/arm/dts/imx8mp-evk-u- renamed from arch/arm/dts/imx8mp-evk-u-boot.dtsi +0
-0
boot.dtsi
indexab849ebaac..f3f83ba303100644arch/arm/dts/imx8mp-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mp-u-boot.dtsi"@@ -67,6 +67,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &i2c1 { u-boot,dm-spl; };arch/arm/dts/imx8mq-evk-u- renamed from arch/arm/dts/imx8mq-evk-u-boot.dtsi +0
-0
boot.dtsi
index6f9c81462e..8f1f942215100644arch/arm/dts/imx8mq-evk-u-boot.dtsi +4
-1@@ -10,3 +10,7 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&sec_jr0 { + status = "disabled"; +}; --
Quoted 1 line
2.17.1
Re: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Hi,
Am 2022-01-31 22:45, schrieb ZHIZHIKIN Andrey:
Quoted 36 lines
Quoted 19 lines
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Wednesday, January 12, 2022 2:31 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; NXP i . MX U-Boot Team <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Tang Yuantian <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLQuoted 2 lines
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
I'd like to return the original question here, which was not completely clarified
during previous reviews: where does the reservation restriction is coming from?BootROM does reserve the JR0 and JR1, which are later released by ATF. NXP downstream
ATF keeps the JR0 reserved, but upstream ATF does release *all* JRs to NS World.If this reservation is taken like the patch proposes and U-Boot is built with upstream
ATF - this would eventually lead to the situation where the HW configuration is not
aligned with what DTB indicates.
Quoted 7 lines
Please note, that recent OP-TEE release has also re-mapped the JR it uses from JR0 to
JR2, which can also lead to usage of the JR which is already taken by OP-TEE. There is
an ongoing PR in OP-TEE to disable JR nodes via DT overlay for Linux [1], but I'm not
sure if the same applies to U-Boot as well.
From the referenced PR:
| On imx8m platforms, OP-TEE has no direct access to the Linux device | tree. The OP-TEE CAAM driver must disable the secure JR thought the | device tree overlay.
Why is that the case? That "we create some kind of overlay and hope it will fit" sounds very fragile to me. Who is applying this overlay? Will it be applied for u-boot and linux or just for linux?
-michael
RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
In reply to ZHIZHIKIN AndreyHello Andrey
Quoted 49 lines
-----Original Message-----
From: ZHIZHIKIN Andrey <[email protected]>
Sent: Tuesday, February 1, 2022 3:15 AM
To: Gaurav Jain <[email protected]>; [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLCaution: EXT Email
Hello Gaurav,
Quoted 8 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Wednesday, January 12, 2022 2:31 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia GeantaQuoted 8 lines
<[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; NXP i . MX U-Boot Team <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>;
Alison
Quoted 1 line
Wang <[email protected]>; Pramod Kumar
Quoted 6 lines
Tang Yuantian <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Quoted 5 lines
Quoted 2 lines
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
I'd like to return the original question here, which was not completely clarified during previous reviews: where does the reservation restriction is coming from?
As mentioned earlier JR0 is being used by high assurance boot (HAB). This prevents JR0 being used by any other software layer.
Quoted 8 lines
BootROM does reserve the JR0 and JR1, which are later released by ATF. NXP downstream ATF keeps the JR0 reserved, but upstream ATF does release *all* JRs to NS World.
If this reservation is taken like the patch proposes and U-Boot is built with upstream ATF - this would eventually lead to the situation where the HW configuration is not aligned with what DTB indicates.
I agree with you, we will address this in the upstream ATF code base as well.
Quoted 5 lines
Please note, that recent OP-TEE release has also re-mapped the JR it uses from JR0 to JR2, which can also lead to usage of the JR which is already taken by OP- TEE. There is an ongoing PR in OP-TEE to disable JR nodes via DT overlay for Linux [1], but I'm not sure if the same applies to U-Boot as well.
Yes, Sahil would be addressing this issue in the next version of his patch set.
Regards
Gaurav Jain
Quoted 147 lines
Quoted 136 lines
Signed-off-by Gaurav Jain <[email protected]>Reviewed-by Ye Li <[email protected]>--- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 ++++ 4 files changed, 58 insertions(+), 3 deletions(-)(quoted diff) +0
-0b/arch/arm/dts/imx8mm-evk-u-
boot.dtsiindex6b459831e7..e5682ca165100644arch/arm/dts/imx8mm-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mm-u-boot.dtsi"@@ -68,6 +68,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mn-ddr4-
evk-u-boot.dtsiindex1d3844437d..d8df863083100644arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ / {@@ -104,6 +104,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mp-evk-u-
boot.dtsiindexab849ebaac..f3f83ba303100644arch/arm/dts/imx8mp-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mp-u-boot.dtsi"@@ -67,6 +67,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &i2c1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mq-evk-u-
boot.dtsiindex6f9c81462e..8f1f942215100644arch/arm/dts/imx8mq-evk-u-boot.dtsi +4
-1@@ -10,3 +10,7 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&sec_jr0 { + status = "disabled"; +}; --Quoted 1 line
2.17.1
Link: [1]:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co
m%2FOP- TEE%2Foptee_os%2Fpull%2F5143&data=04%7C01%7Cgaurav.jain%40nxp. com%7C86913a749ce04232bd0e08d9e502efa1%7C686ea1d3bc2b4c6fa92cd99 c5c301635%7C0%7C0%7C637792623039930395%7CUnknown%7CTWFpbGZsb3 d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3 D%7C3000&sdata=nTN7YN9G2vNgyhwnj6JrT8BdtGQn%2F0yILgpGdNg3mK g%3D&reserved=0
RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Hello Andrey
I responded to your comments on this patch.
If you are good, can this patch series merged?
Regards
Gaurav Jain
Quoted 260 lines
-----Original Message-----
From: Gaurav Jain
Sent: Thursday, February 3, 2022 10:58 AM
To: ZHIZHIKIN Andrey <[email protected]>; u- [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLHello Andrey
Quoted 8 lines
-----Original Message-----
From: ZHIZHIKIN Andrey <[email protected]>
Sent: Tuesday, February 1, 2022 3:15 AM
To: Gaurav Jain <[email protected]>; [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia GeantaQuoted 8 lines
<[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>;
Alison
Quoted 1 line
Wang <[email protected]>; Pramod Kumar
Quoted 34 lines
Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLCaution: EXT Email
Hello Gaurav,
Quoted 8 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Wednesday, January 12, 2022 2:31 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia GeantaQuoted 8 lines
<[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; NXP i . MX U-Boot Team <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>;
Alison
Quoted 1 line
Wang <[email protected]>; Pramod Kumar
Quoted 6 lines
Tang Yuantian <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLQuoted 5 lines
Quoted 2 lines
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
I'd like to return the original question here, which was not completely clarified during previous reviews: where does the reservation
restriction is coming from?
As mentioned earlier JR0 is being used by high assurance boot (HAB). This prevents JR0 being used by any other software layer.
Quoted 8 lines
BootROM does reserve the JR0 and JR1, which are later released by ATF. NXP downstream ATF keeps the JR0 reserved, but upstream ATF does release *all* JRs to NS World.
If this reservation is taken like the patch proposes and U-Boot is built with upstream ATF - this would eventually lead to the situation where the HW configuration is not aligned with what DTB indicates.
I agree with you, we will address this in the upstream ATF code base as well.
Quoted 6 lines
Please note, that recent OP-TEE release has also re-mapped the JR it uses from
JR0 to JR2, which can also lead to usage of the JR which is already taken by OP- TEE. There is an ongoing PR in OP-TEE to disable JR nodes via DT overlay for Linux [1], but I'm not sure if the same applies to U-Boot aswell.
Yes, Sahil would be addressing this issue in the next version of his patch set.
Regards
Gaurav JainQuoted 134 lines
Quoted 134 lines
Signed-off-by Gaurav Jain <[email protected]>Reviewed-by Ye Li <[email protected]>--- arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 ++++++++++++++++++- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 ++++ 4 files changed, 58 insertions(+), 3 deletions(-)(quoted diff) +0
-0b/arch/arm/dts/imx8mm-evk-u-
boot.dtsiindex6b459831e7..e5682ca165100644arch/arm/dts/imx8mm-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mm-u-boot.dtsi"@@ -68,6 +68,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mn-ddr4-
evk-u-boot.dtsiindex1d3844437d..d8df863083100644arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ / {@@ -104,6 +104,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &usdhc1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mp-evk-u-
boot.dtsiindexab849ebaac..f3f83ba303100644arch/arm/dts/imx8mp-evk-u-boot.dtsi +18
-1@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2019 NXP + * Copyright 2019, 2021 NXP */ #include "imx8mp-u-boot.dtsi"@@ -67,6 +67,23 @@ u-boot,dm-spl; }; +&crypto { + u-boot,dm-spl; +}; + +&sec_jr0 { + u-boot,dm-spl; + status = "disabled"; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + &i2c1 { u-boot,dm-spl; };(quoted diff) +0
-0b/arch/arm/dts/imx8mq-evk-u-
boot.dtsiindex6f9c81462e..8f1f942215100644arch/arm/dts/imx8mq-evk-u-boot.dtsi +3
-0@@ -10,3 +10,7 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&sec_jr0 { + status = "disabled";Quoted 9 lines
Quoted 3 lines
arch/arm/dts/imx8mq-evk-u-boot.dtsi +1
-1+}; --2.17.1
Link: [1]:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
ub.co
m%2FOP-TEE%2Foptee_os%2Fpull%2F5143&data=04%7C01%7Cgaurav.jain%40nxp.
Quoted 1 line
com%7C86913a749ce04232bd0e08d9e502efa1%7C686ea1d3bc2b4c6fa92cd99
Quoted 1 line
c5c301635%7C0%7C0%7C637792623039930395%7CUnknown%7CTWFpbGZsb3
Quoted 1 line
d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3
Quoted 1 line
D%7C3000&sdata=nTN7YN9G2vNgyhwnj6JrT8BdtGQn%2F0yILgpGdNg3mK
Quoted 1 line
g%3D&reserved=0
RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Hello Gaurav,
Sorry, I somehow missed you last reply here.
Quoted 20 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Friday, February 11, 2022 10:48 AM
To: ZHIZHIKIN Andrey <[email protected]>; u- [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl-uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPL
Quoted 93 lines
Hello Andrey
I responded to your comments on this patch.
If you are good, can this patch series merged?Regards
Gaurav JainQuoted 85 lines
-----Original Message-----
From: Gaurav Jain
Sent: Thursday, February 3, 2022 10:58 AM
To: ZHIZHIKIN Andrey <[email protected]>; u- [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: RE: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLHello Andrey
Quoted 8 lines
-----Original Message-----
From: ZHIZHIKIN Andrey <[email protected]>
Sent: Tuesday, February 1, 2022 3:15 AM
To: Gaurav Jain <[email protected]>; [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia GeantaQuoted 8 lines
<[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>;
Alison
Quoted 1 line
Wang <[email protected]>; Pramod Kumar
Quoted 34 lines
Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>
Subject: [EXT] RE: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLCaution: EXT Email
Hello Gaurav,
Quoted 8 lines
-----Original Message-----
From: U-Boot <[email protected]> On Behalf Of Gaurav Jain
Sent: Wednesday, January 12, 2022 2:31 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia GeantaQuoted 8 lines
<[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; NXP i . MX U-Boot Team <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>;
Alison
Quoted 1 line
Wang <[email protected]>; Pramod Kumar
Quoted 6 lines
Tang Yuantian <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 02/14] i.MX8M: crypto: updated device tree for supporting DM in SPLQuoted 5 lines
Quoted 2 lines
disabled use of JR0 in SPL and uboot, as JR0 is reserved for secure boot.
I'd like to return the original question here, which was not completely clarified during previous reviews: where does the reservation
restriction is coming from?
As mentioned earlier JR0 is being used by high assurance boot (HAB). This prevents JR0 being used by any other software layer.
From what I understood reading AN4581 and companion AN12056, HAB requires JR only in case when Encrypted Boot is performed. For image signature verification it is not required, hence this reservation does sound a bit artificial to me. Please correct me here if my understanding is not complete, I was not able to get this information from all the answers you provided before on the purpose of this reservation.
This fact, coupled with the one that upstream TF-A does release all JR to NS-World, suggests that the reservation is not actually necessary, and moreover - it will not reflect what the HW configuration it will have in all combinations of BootROM->SPL->TF-A->(potentially OP-TEE)->Kernel.
Please note, that in case of downstream NXP TF-A is used here - this reservation is rather valid, but it leads to "vendor locking" of upstream U-Boot as it cannot be expected that all board/device vendors are using downstream TF-A.
You do suggest below that this TF-A "mismatch" will be addressed in upstream, but until this is done it is not reasonable to imply this reservation IMHO.
As a side note: I had a patch series in the Kernel that performs exactly the same reservation, but had to hold it back exactly because of the reason I stated above: upstream TF-A does behave different from downstream NXP one, hence booting Kernel with either one of those would have different results with respect to JR0 reservation, see [1]. So you can say that I'm and "interested party" here, since depending on how this is solved in the boot chain would influence my next version of the patch set to the Kernel.
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
BootROM does reserve the JR0 and JR1, which are later released by ATF. NXP downstream ATF keeps the JR0 reserved, but upstream ATF does release *all* JRs to NS World.
If this reservation is taken like the patch proposes and U-Boot is built with upstream ATF - this would eventually lead to the situation where the HW configuration is not aligned with what DTB indicates.
I agree with you, we will address this in the upstream ATF code base as well.
That would be really great! I would personally consider this as a first step before at least this reservation is performed. This would ensure the consistency of HW description that DT provides.
Quoted 11 lines
Quoted 6 lines
Quoted 6 lines
Please note, that recent OP-TEE release has also re-mapped the JR it uses from
JR0 to JR2, which can also lead to usage of the JR which is already taken by OP- TEE. There is an ongoing PR in OP-TEE to disable JR nodes via DT overlay for Linux [1], but I'm not sure if the same applies to U-Bootas
Quoted 3 lines
well.
Yes, Sahil would be addressing this issue in the next version of his patch
set.
Michael had a share of comments regarding the approach chosen for LS family, and I think once that is solved - same solution can be applied to imx8 family.
Quoted 4 lines
Quoted 4 lines
Regards
Gaurav JainQuoted 1 line
-- andrey
PATCH v10 3/14 crypto/fsl: i.MX8M: Enable Job ring driver model.
In reply to Gaurav Jaini.MX8MM/MN/MP/MQ - added support for JR driver model. sec is initialized based on job ring information processed from device tree.
--- arch/arm/Kconfig | 2 +- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + arch/arm/mach-imx/imx8m/Kconfig | 13 +++++++++++++ arch/arm/mach-imx/imx8m/soc.c | 11 ++++++++++- board/freescale/imx8mm_evk/spl.c | 10 +++++++++- board/freescale/imx8mn_evk/spl.c | 9 +++++++-- board/freescale/imx8mp_evk/spl.c | 14 ++++++++++++-- board/freescale/imx8mq_evk/spl.c | 8 ++++++-- drivers/crypto/fsl/jr.c | 14 +++++++++++--- scripts/config_whitelist.txt | 1 + 10 files changed, 71 insertions(+), 12 deletions(-)
arch/arm/Kconfig +1 -1
@@ -820,7 +820,7 @@ config ARCH_IMX8M select ARM64 select GPIO_EXTRA_HEADER select MACH_IMX - select SYS_FSL_HAS_SEC if IMX_HAB + select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_4 select SYS_FSL_SEC_LE select SYS_I2C_MXC
arch/arm/include/asm/arch-imx8m/imx-regs.h +1 -0
@@ -72,6 +72,7 @@#define CONFIG_SYS_FSL_SEC_ADDR (CAAM_IPS_BASE_ADDR + \ CONFIG_SYS_FSL_SEC_OFFSET)#define CONFIG_SYS_FSL_JR0_OFFSET (0x1000) +#define CONFIG_SYS_FSL_JR1_OFFSET (0x2000)#define CONFIG_SYS_FSL_JR0_ADDR (CONFIG_SYS_FSL_SEC_ADDR + \ CONFIG_SYS_FSL_JR0_OFFSET)#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1
arch/arm/mach-imx/imx8m/Kconfig +13 -0
@@ -39,6 +39,9 @@ config TARGET_IMX8MQ_EVK select BINMAN select IMX8MQ select IMX8M_LPDDR4 + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL config TARGET_IMX8MQ_PHANBELL bool "imx8mq_phanbell"
@@ -52,6 +55,9 @@ config TARGET_IMX8MM_EVK select IMX8MM select SUPPORT_SPL select IMX8M_LPDDR4 + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL config TARGET_IMX8MM_ICORE_MX8MM bool "Engicam i.Core MX8M Mini SOM"
@@ -91,6 +97,8 @@ config TARGET_IMX8MN_EVK select IMX8MN select SUPPORT_SPL select IMX8M_LPDDR4 + select FSL_CAAM + select SPL_CRYPTO if SPL config TARGET_IMX8MN_DDR4_EVK bool "imx8mn DDR4 EVK board"
@@ -98,6 +106,8 @@ config TARGET_IMX8MN_DDR4_EVK select IMX8MN select SUPPORT_SPL select IMX8M_DDR4 + select FSL_CAAM + select SPL_CRYPTO if SPL config TARGET_IMX8MP_EVK bool "imx8mp LPDDR4 EVK board"
@@ -105,6 +115,9 @@ config TARGET_IMX8MP_EVK select IMX8MP select SUPPORT_SPL select IMX8M_LPDDR4 + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL config TARGET_PICO_IMX8MQ bool "Support Technexion Pico iMX8MQ"
arch/arm/mach-imx/imx8m/soc.c +10 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2017-2019 NXP +* Copyright 2017-2019, 2021 NXP * * Peng Fan <[email protected]> */
@@ -20,6 +20,7 @@#include <asm/ptrace.h> #include <asm/armv8/mmu.h> #include <dm/uclass.h> +#include <dm/device.h> #include <efi_loader.h> #include <env.h> #include <env_internal.h>
@@ -1197,6 +1198,14 @@ static void acquire_buildinfo(void)int arch_misc_init (void ) { +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + }acquire_buildinfo ();return 0 ;
board/freescale/imx8mm_evk/spl.c +9 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2019 NXP +* Copyright 2019, 2021 NXP */ #include <common.h>
@@ -51,6 +51,14 @@ static void spl_dram_init(void)void spl_board_init (void ) { +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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" ); }
board/freescale/imx8mn_evk/spl.c +7 -2
@@ -1,7 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* -* Copyright 2018-2019 NXP +* Copyright 2018-2019, 2021 NXP * -* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h>
@@ -49,6 +49,11 @@ 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,
board/freescale/imx8mp_evk/spl.c +12 -2
@@ -1,7 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* -* Copyright 2018-2019 NXP +* Copyright 2018-2019, 2021 NXP * -* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h>
@@ -20,6 +20,8 @@#include <asm/arch/ddr.h> #include <power/pmic.h> #include <power/pca9450.h> +#include <dm/uclass.h> +#include <dm/device.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -35,6 +37,14 @@ void spl_dram_init(void)void spl_board_init (void ) { +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + }/* * Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does * not allow to change it. Should set the clock after PMIC
board/freescale/imx8mq_evk/spl.c +6 -2
@@ -1,8 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP * -* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h>
@@ -22,6 +21,7 @@#include <asm/mach-imx/gpio.h> #include <asm/mach-imx/mxc_i2c.h> #include <fsl_esdhc_imx.h> +#include <fsl_sec.h> #include <mmc.h> #include <linux/delay.h> #include <power/pmic.h>
@@ -199,6 +199,10 @@ int power_init_board(void)void spl_board_init (void ) { +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +if (sec_init ()) +printf ("\nsec_init failed!\n" ); + }puts ("Normal Boot\n" ); }
drivers/crypto/fsl/jr.c +11 -3
@@ -43,9 +43,17 @@ struct udevice *caam_dev;#define SEC_ADDR (idx) \ (ulong)((CONFIG_SYS_FSL_SEC_ADDR + sec_offset[idx])) -#define SEC_JR0_ADDR (idx) \ +#ifndef CONFIG_IMX8M +#define SEC_JR_ADDR (idx) \ (ulong)(SEC_ADDR(idx) + \ (CONFIG_SYS_FSL_JR0_OFFSET - CONFIG_SYS_FSL_SEC_OFFSET)) +#define JR_ID 0 +#else +#define SEC_JR_ADDR (idx) \ + (ulong)(SEC_ADDR(idx) + \ + (CONFIG_SYS_FSL_JR1_OFFSET - CONFIG_SYS_FSL_SEC_OFFSET)) +#define JR_ID 1 +#endif struct caam_regs caam_st;#endif
@@ -669,8 +677,8 @@ int sec_init_idx(uint8_t sec_idx) caam =dev_get_priv (caam_dev);#else caam_st.sec = (void *)SEC_ADDR (sec_idx); - caam_st.regs = (struct jr_regs *)SEC_JR0_ADDR (sec_idx); - caam_st.jrid =0 ; + caam_st.regs = (struct jr_regs *)SEC_JR_ADDR (sec_idx); + caam_st.jrid =JR_ID ; caam = &caam_st;#endif ccsr_sec_t *sec = caam->sec;
scripts/config_whitelist.txt +1 -0
@@ -1273,6 +1273,7 @@ CONFIG_SYS_FSL_IFC_LE CONFIG_SYS_FSL_ISBC_VER CONFIG_SYS_FSL_JR0_ADDR CONFIG_SYS_FSL_JR0_OFFSET +CONFIG_SYS_FSL_JR1_OFFSET CONFIG_SYS_FSL_LS1_CLK_ADDR CONFIG_SYS_FSL_LSCH3_SERDES_ADDR CONFIG_SYS_FSL_MAX_NUM_OF_SEC
Signature · 1 line
2.17.1
PATCH v10 4/14 mx6sabre: Remove unnecessary SPL configs
In reply to Gaurav JainFrom: Ye Li <[email protected]>
Because we don't use SPL_DM on mx6sabresd and mx6sabreauto, so it is unnecessary to have SPL DTB related configs and SPL_OF_CONTROL enabled.
--- configs/mx6sabreauto_defconfig | 2 -- configs/mx6sabresd_defconfig | 4 ---- 2 files changed, 6 deletions(-)
configs/mx6sabreauto_defconfig +0 -2
@@ -62,10 +62,8 @@ CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIST="imx6dl-sabreauto imx6q-sabreauto imx6qp-sabreauto" CONFIG_MULTI_DTB_FIT=y -CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
configs/mx6sabresd_defconfig +0 -4
@@ -65,12 +65,8 @@ CONFIG_CMD_FS_GENERIC=y CONFIG_EFI_PARTITION=y # CONFIG_SPL_EFI_PARTITION is not set CONFIG_OF_CONTROL=y -CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIST="imx6q-sabresd imx6qp-sabresd imx6dl-sabresd" CONFIG_MULTI_DTB_FIT=y -CONFIG_SPL_MULTI_DTB_FIT=y -CONFIG_SPL_OF_LIST="imx6dl-sabresd imx6q-sabresd imx6qp-sabresd" -CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
Signature · 1 line
2.17.1
PATCH v10 5/14 i.MX6: Enable Job ring driver model.
In reply to Gaurav Jaini.MX6,i.MX6SX,i.MX6UL - added support for JR driver model.
removed sec_init() call, sec is initialized based on job ring information processed from device tree.
--- arch/arm/mach-imx/mx6/Kconfig | 10 ++++++++++ arch/arm/mach-imx/mx6/soc.c | 13 +++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-)
arch/arm/mach-imx/mx6/Kconfig +10 -0
@@ -354,6 +354,8 @@ config TARGET_MX6SABREAUTO select DM_THERMAL select SUPPORT_SPL imply CMD_DM + select FSL_CAAM + select ARCH_MISC_INIT config TARGET_MX6SABRESD bool "mx6sabresd"
@@ -364,6 +366,8 @@ config TARGET_MX6SABRESD select DM_THERMAL select SUPPORT_SPL imply CMD_DM + select FSL_CAAM + select ARCH_MISC_INIT config TARGET_MX6SLEVK bool "mx6slevk"
@@ -386,6 +390,8 @@ config TARGET_MX6SXSABRESD select DM select DM_THERMAL select SUPPORT_SPL + select FSL_CAAM + select ARCH_MISC_INIT config TARGET_MX6SXSABREAUTO bool "mx6sxsabreauto"
@@ -404,6 +410,8 @@ config TARGET_MX6UL_9X9_EVK select DM_THERMAL select SUPPORT_SPL imply CMD_DM + select FSL_CAAM + select ARCH_MISC_INIT config TARGET_MX6UL_14X14_EVK bool "mx6ul_14x14_evk"
@@ -413,6 +421,8 @@ config TARGET_MX6UL_14X14_EVK select DM_THERMAL select SUPPORT_SPL imply CMD_DM + select FSL_CAAM + select ARCH_MISC_INIT config TARGET_MX6UL_ENGICAM bool "Support Engicam GEAM6UL/Is.IoT"
arch/arm/mach-imx/mx6/soc.c +9 -4
@@ -4,6 +4,7 @@* Sascha Hauer, Pengutronix * * (C) Copyright 2009 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -23,7 +24,6 @@#include <asm/arch/mxc_hdmi.h> #include <asm/arch/crm_regs.h> #include <dm.h> -#include <fsl_sec.h> #include <imx_thermal.h> #include <mmc.h>
@@ -734,9 +734,14 @@ static void setup_serial_number(void)int arch_misc_init (void ) { -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + }setup_serial_number ();return 0 ; }
Signature · 1 line
2.17.1
PATCH v10 6/14 i.MX7: Enable Job ring driver model.
In reply to Gaurav Jaini.MX7D - added support for JR driver model.
removed sec_init() call, sec is initialized based on job ring information processed from device tree.
--- arch/arm/Kconfig | 2 +- arch/arm/mach-imx/mx7/Kconfig | 1 + arch/arm/mach-imx/mx7/soc.c | 12 ++++++++---- 3 files changed, 10 insertions(+), 5 deletions(-)
arch/arm/Kconfig +1 -1
@@ -888,7 +888,7 @@ config ARCH_MX7 select CPU_V7A select GPIO_EXTRA_HEADER select MACH_IMX - select SYS_FSL_HAS_SEC if IMX_HAB + select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_4 select SYS_FSL_SEC_LE imply BOARD_EARLY_INIT_F
arch/arm/mach-imx/mx7/Kconfig +1 -0
@@ -68,6 +68,7 @@ config TARGET_MX7DSABRESD select DM_THERMAL select MX7D imply CMD_DM + select FSL_CAAM config TARGET_PICO_IMX7D bool "pico-imx7d"
arch/arm/mach-imx/mx7/soc.c +8 -4
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2015 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -19,7 +20,6 @@#include <dm.h> #include <env.h> #include <imx_thermal.h> -#include <fsl_sec.h> #include <asm/setup.h> #include <linux/delay.h>
@@ -353,9 +353,13 @@ int arch_misc_init(void)env_set ("serial#" , serial_string);#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + 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); + }return 0 ; }
Signature · 1 line
2.17.1
PATCH v10 7/14 i.MX7ULP: Enable Job ring driver model.
In reply to Gaurav Jainadded crypto node in device tree.
sec is initialized based on job ring information processed from device tree.
--- arch/arm/Kconfig | 2 +- arch/arm/dts/imx7ulp.dtsi | 24 ++++++++++++++++++++++++ arch/arm/mach-imx/mx7ulp/Kconfig | 2 ++ arch/arm/mach-imx/mx7ulp/soc.c | 18 ++++++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-)
arch/arm/Kconfig +1 -1
@@ -875,7 +875,7 @@ config ARCH_MX7ULP select CPU_V7A select GPIO_EXTRA_HEADER select MACH_IMX - select SYS_FSL_HAS_SEC if IMX_HAB + select SYS_FSL_HAS_SEC select SYS_FSL_SEC_COMPAT_4 select SYS_FSL_SEC_LE select ROM_UNIFIED_SECTIONS
arch/arm/dts/imx7ulp.dtsi +24 -0
@@ -1,5 +1,6 @@ /* * Copyright 2015-2016 Freescale Semiconductor, Inc. + * Copyright 2021 NXP * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as
@@ -198,6 +199,29 @@ }; }; + crypto: crypto@40240000 { + compatible = "fsl,sec-v4.0"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x40240000 0x10000>; + ranges = <0 0x40240000 0x10000>; + clocks = <&clks IMX7ULP_CLK_CAAM>, + <&clks IMX7ULP_CLK_NIC1_BUS_DIV>; + clock-names = "aclk", "ipg"; + + sec_jr0: jr@1000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x1000 0x1000>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr1: jr@2000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x2000 0x1000>; + interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + tpm5: tpm@40260000 { compatible = "fsl,imx7ulp-tpm"; reg = <0x40260000 0x1000>;
arch/arm/mach-imx/mx7ulp/Kconfig +2 -0
@@ -25,6 +25,8 @@ config TARGET_MX7ULP_EVK bool "Support mx7ulp EVK board" select MX7ULP select SYS_ARCH_TIMER + select FSL_CAAM + select ARCH_MISC_INIT endchoice
arch/arm/mach-imx/mx7ulp/soc.c +18 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2016 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -15,6 +16,7 @@#include <asm/mach-imx/hab.h> #include <asm/setup.h> #include <linux/bitops.h> +#include <dm.h> #define PMC0_BASE_ADDR 0x410a1000#define PMC0_CTRL 0x28
@@ -80,6 +82,22 @@ int arch_cpu_init(void)return 0 ; } +#if defined(CONFIG_ARCH_MISC_INIT ) +int arch_misc_init (void ) +{ +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + } + +return 0 ; +} +#endif +#ifdef CONFIG_BOARD_POSTCLK_INIT int board_postclk_init (void ) {
Signature · 1 line
2.17.1
PATCH v10 8/14 i.MX8: Add crypto node in device tree
In reply to Gaurav Jaini.MX8(QM/QXP) - updated device tree for supporting DM in SPL.
disabled use of JR1 in SPL and uboot, as JR1 is reserved for SECO FW.
--- arch/arm/dts/fsl-imx8dx.dtsi | 61 +++++++++++++++++++++++- arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi | 34 ++++++++++++- arch/arm/dts/fsl-imx8qm.dtsi | 61 +++++++++++++++++++++++- arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi | 34 ++++++++++++- 4 files changed, 186 insertions(+), 4 deletions(-)
arch/arm/dts/fsl-imx8dx.dtsi +60 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2018 NXP + * Copyright 2018, 2021 NXP */ #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -261,6 +261,30 @@ power-domains = <&pd_dma>; }; }; + + pd_caam: PD_CAAM { + compatible = "nxp,imx8-pd"; + reg = <SC_R_NONE>; + #power-domain-cells = <0>; + #address-cells = <1>; + #size-cells = <0>; + + pd_caam_jr1: PD_CAAM_JR1 { + reg = <SC_R_CAAM_JR1>; + #power-domain-cells = <0>; + power-domains = <&pd_caam>; + }; + pd_caam_jr2: PD_CAAM_JR2 { + reg = <SC_R_CAAM_JR2>; + #power-domain-cells = <0>; + power-domains = <&pd_caam>; + }; + pd_caam_jr3: PD_CAAM_JR3 { + reg = <SC_R_CAAM_JR3>; + #power-domain-cells = <0>; + power-domains = <&pd_caam>; + }; + }; }; i2c0: i2c@5a800000 {
@@ -609,6 +633,41 @@ }; }; }; + + crypto: caam@0x31400000 { + compatible = "fsl,sec-v4.0"; + reg = <0 0x31400000 0 0x400000>; + interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0x31400000 0x400000>; + fsl,first-jr-index = <2>; + fsl,sec-era = <9>; + + sec_jr1: jr1@0x20000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x20000 0x1000>; + interrupts = <GIC_SPI 452 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&pd_caam_jr1>; + status = "disabled"; + }; + + sec_jr2: jr2@30000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x30000 0x1000>; + interrupts = <GIC_SPI 453 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&pd_caam_jr2>; + status = "okay"; + }; + + sec_jr3: jr3@40000 { + compatible = "fsl,sec-v4.0-job-ring"; + reg = <0x40000 0x1000>; + interrupts = <GIC_SPI 454 IRQ_TYPE_LEVEL_HIGH>; + power-domains = <&pd_caam_jr3>; + status = "okay"; + }; + }; }; &A35_0 {
arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi +33 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2018 NXP + * Copyright 2018, 2021 NXP */ &{/imx8qm-pm} {
@@ -80,6 +80,22 @@ u-boot,dm-spl; }; +&pd_caam { + u-boot,dm-spl; +}; + +&pd_caam_jr1 { + u-boot,dm-spl; +}; + +&pd_caam_jr2 { + u-boot,dm-spl; +}; + +&pd_caam_jr3 { + u-boot,dm-spl; +}; + &gpio0 { u-boot,dm-spl; };
@@ -126,3 +142,19 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&crypto { + u-boot,dm-spl; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + +&sec_jr3 { + u-boot,dm-spl; +};
arch/arm/dts/fsl-imx8qm.dtsi +60 -1
78 lines not on this page · raw message
arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi +33 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ /* - * Copyright 2018 NXP + * Copyright 2018, 2021 NXP */ &{/imx8qx-pm} {
@@ -80,6 +80,22 @@ u-boot,dm-spl; }; +&pd_caam { + u-boot,dm-spl; +}; + +&pd_caam_jr1 { + u-boot,dm-spl; +}; + +&pd_caam_jr2 { + u-boot,dm-spl; +}; + +&pd_caam_jr3 { + u-boot,dm-spl; +}; + &gpio0 { u-boot,dm-spl; };
@@ -126,3 +142,19 @@ sd-uhs-sdr104; sd-uhs-ddr50; }; + +&crypto { + u-boot,dm-spl; +}; + +&sec_jr1 { + u-boot,dm-spl; +}; + +&sec_jr2 { + u-boot,dm-spl; +}; + +&sec_jr3 { + u-boot,dm-spl; +};
Signature · 1 line
2.17.1
PATCH v10 9/14 crypto/fsl: i.MX8: Enable Job ring driver model.
In reply to Gaurav Jaini.MX8(QM/QXP) - added support for JR driver model. sec is initialized based on job ring information processed from device tree.
--- arch/arm/Kconfig | 3 ++ arch/arm/include/asm/arch-imx8/imx-regs.h | 5 ++- arch/arm/mach-imx/cmd_dek.c | 1 + arch/arm/mach-imx/imx8/Kconfig | 7 ++++ arch/arm/mach-imx/imx8/cpu.c | 18 ++++++++- board/freescale/imx8qm_mek/spl.c | 6 ++- board/freescale/imx8qxp_mek/spl.c | 6 ++- drivers/crypto/fsl/Kconfig | 2 +- drivers/crypto/fsl/jr.c | 47 ++++++++++++++++++++++- include/fsl_sec.h | 12 +++--- 10 files changed, 91 insertions(+), 16 deletions(-)
arch/arm/Kconfig +3 -0
@@ -809,6 +809,9 @@ config ARCH_LPC32XX config ARCH_IMX8 bool "NXP i.MX8 platform" select ARM64 + select SYS_FSL_HAS_SEC + select SYS_FSL_SEC_COMPAT_4 + select SYS_FSL_SEC_LE select DM select GPIO_EXTRA_HEADER select MACH_IMX
arch/arm/include/asm/arch-imx8/imx-regs.h +4 -1
@@ -1,6 +1,6 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP */ #ifndef __ASM_ARCH_IMX8_REGS_H__
@@ -47,4 +47,7 @@#define USB_BASE_ADDR 0x5b0d0000#define USB_PHY0_BASE_ADDR 0x5b100000 +#define CONFIG_SYS_FSL_SEC_ADDR (0x31400000) +#define CONFIG_SYS_FSL_MAX_NUM_OF_SEC 1 +#endif /* __ASM_ARCH_IMX8_REGS_H__ */
arch/arm/mach-imx/cmd_dek.c +1 -0
@@ -9,6 +9,7 @@#include <command.h> #include <log.h> #include <malloc.h> +#include <memalign.h> #include <asm/byteorder.h> #include <linux/compiler.h> #include <fsl_sec.h>
arch/arm/mach-imx/imx8/Kconfig +7 -0
@@ -8,6 +8,7 @@ config AHAB_BOOT config IMX8 bool + select HAS_CAAM config MU_BASE_SPL hex "MU base address used in SPL"
@@ -72,6 +73,9 @@ config TARGET_IMX8QM_MEK bool "Support i.MX8QM MEK board" select BOARD_LATE_INIT select IMX8QM + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL config TARGET_CONGA_QMX8 bool "Support congatec conga-QMX8 board"
@@ -89,6 +93,9 @@ config TARGET_IMX8QXP_MEK bool "Support i.MX8QXP MEK board" select BOARD_LATE_INIT select IMX8QXP + select FSL_CAAM + select ARCH_MISC_INIT + select SPL_CRYPTO if SPL endchoice
arch/arm/mach-imx/imx8/cpu.c +17 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP */ #include <common.h>
@@ -89,6 +89,22 @@ int arch_cpu_init_dm(void)return 0 ; } +#if defined(CONFIG_ARCH_MISC_INIT ) +int arch_misc_init (void ) +{ +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + } + +return 0 ; +} +#endif +int print_bootinfo (void ) {enum boot_device bt_dev =get_boot_device ();
board/freescale/imx8qm_mek/spl.c +4 -2
@@ -1,7 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP * -* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h>
@@ -24,6 +24,8 @@ void spl_board_init(void) {struct udevice *dev; +uclass_get_device_by_driver (UCLASS_MISC ,DM_DRIVER_GET (imx8_scu), &dev); +uclass_find_first_device (UCLASS_MISC , &dev);for (; dev;uclass_find_next_device (&dev)) {
board/freescale/imx8qxp_mek/spl.c +4 -2
@@ -1,7 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP * -* SPDX-License-Identifier: GPL-2.0+ */ #include <common.h>
@@ -39,6 +39,8 @@ void spl_board_init(void) {struct udevice *dev; +uclass_get_device_by_driver (UCLASS_MISC ,DM_DRIVER_GET (imx8_scu), &dev); +uclass_find_first_device (UCLASS_MISC , &dev);for (; dev;uclass_find_next_device (&dev)) {
drivers/crypto/fsl/Kconfig +1 -1
@@ -12,7 +12,7 @@ config FSL_CAAM config CAAM_64BIT bool - default y if PHYS_64BIT && !ARCH_IMX8M + default y if PHYS_64BIT && !ARCH_IMX8M && !ARCH_IMX8 help Select Crypto driver for 64 bits CAAM version
drivers/crypto/fsl/jr.c +45 -2
102 lines not on this page · raw message
include/fsl_sec.h +5 -7
@@ -3,7 +3,7 @@* Common internal memory map for some Freescale SoCs * * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2018 NXP +* Copyright 2018, 2021 NXP */ #ifndef __FSL_SEC_H
@@ -194,12 +194,10 @@ typedef struct ccsr_sec {#define SEC_CHAVID_LS_RNG_SHIFT 16#define SEC_CHAVID_RNG_LS_MASK 0x000f0000 -#define CONFIG_JRSTARTR_JR0 0x00000001 -struct jr_regs {#if defined(CONFIG_SYS_FSL_SEC_LE ) && \ !(defined(CONFIG_MX6 ) || defined(CONFIG_MX7 ) || \ - defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M )) + defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M ) || defined(CONFIG_IMX8 ))u32 irba_l;u32 irba_h;#else
@@ -214,7 +212,7 @@ struct jr_regs {u32 irja;#if defined(CONFIG_SYS_FSL_SEC_LE ) && \ !(defined(CONFIG_MX6 ) || defined(CONFIG_MX7 ) || \ - defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M )) + defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M ) || defined(CONFIG_IMX8 ))u32 orba_l;u32 orba_h;#else
@@ -248,7 +246,7 @@ struct jr_regs {struct sg_entry {#if defined(CONFIG_SYS_FSL_SEC_LE ) && \ !(defined(CONFIG_MX6 ) || defined(CONFIG_MX7 ) || \ - defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M )) + defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M ) || defined(CONFIG_IMX8 ))uint32_t addr_lo;/* Memory Address - lo */ uint32_t addr_hi;/* Memory Address of start of buffer - hi */ #else
@@ -268,7 +266,7 @@ struct sg_entry { };#if defined(CONFIG_MX6 ) || defined(CONFIG_MX7 ) || \ - defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M ) + defined(CONFIG_MX7ULP ) || defined(CONFIG_IMX8M ) || defined(CONFIG_IMX8 )/* Job Ring Base Address */ #define JR_BASE_ADDR (x) (CONFIG_SYS_FSL_SEC_ADDR + 0x1000 * (x + 1))/* Secure Memory Offset varies accross versions */
Signature · 1 line
2.17.1
PATCH v10 10/14 Layerscape: Add crypto node in device tree
In reply to Gaurav JainLS(1021/1012/1028/1043/1046/1088/2088), LX2160 - updated device tree
--- arch/arm/dts/fsl-ls1012a.dtsi | 46 ++++++++++++++++++++++++++++++++++- arch/arm/dts/fsl-ls1043a.dtsi | 45 +++++++++++++++++++++++++++++++++- arch/arm/dts/fsl-ls1046a.dtsi | 44 +++++++++++++++++++++++++++++++++ arch/arm/dts/fsl-ls1088a.dtsi | 39 +++++++++++++++++++++++++++++ arch/arm/dts/fsl-ls2080a.dtsi | 39 +++++++++++++++++++++++++++++ arch/arm/dts/fsl-lx2160a.dtsi | 41 ++++++++++++++++++++++++++++++- arch/arm/dts/ls1021a.dtsi | 40 ++++++++++++++++++++++++++++++ 7 files changed, 291 insertions(+), 3 deletions(-)
arch/arm/dts/fsl-ls1012a.dtsi +45 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0+ OR X11 /* - * Copyright 2020 NXP + * Copyright 2020-2021 NXP * Copyright 2016 Freescale Semiconductor */
@@ -71,6 +71,50 @@ bus-width = <4>; }; + crypto: crypto@1700000 { + compatible = "fsl,sec-v5.4", "fsl,sec-v5.0", + "fsl,sec-v4.0"; + fsl,sec-era = <8>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x00 0x1700000 0x100000>; + reg = <0x00 0x1700000 0x0 0x100000>; + interrupts = <0 75 0x4>; + dma-coherent; + + sec_jr0: jr@10000 { + compatible = "fsl,sec-v5.4-job-ring", + "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x10000 0x10000>; + interrupts = <0 71 0x4>; + }; + + sec_jr1: jr@20000 { + compatible = "fsl,sec-v5.4-job-ring", + "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x20000 0x10000>; + interrupts = <0 72 0x4>; + }; + + sec_jr2: jr@30000 { + compatible = "fsl,sec-v5.4-job-ring", + "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x30000 0x10000>; + interrupts = <0 73 0x4>; + }; + + sec_jr3: jr@40000 { + compatible = "fsl,sec-v5.4-job-ring", + "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x40000 0x10000>; + interrupts = <0 74 0x4>; + }; + }; + gpio0: gpio@2300000 { compatible = "fsl,qoriq-gpio"; reg = <0x0 0x2300000 0x0 0x10000>;
arch/arm/dts/fsl-ls1043a.dtsi +44 -1
57 lines not on this page · raw message
arch/arm/dts/fsl-ls1046a.dtsi +44 -0
56 lines not on this page · raw message
arch/arm/dts/fsl-ls1088a.dtsi +39 -0
@@ -174,6 +174,45 @@ dr_mode = "host"; }; + crypto: crypto@8000000 { + compatible = "fsl,sec-v5.0", "fsl,sec-v4.0"; + fsl,sec-era = <8>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x00 0x8000000 0x100000>; + reg = <0x00 0x8000000 0x0 0x100000>; + interrupts = <GIC_SPI 139 IRQ_TYPE_LEVEL_HIGH>; + dma-coherent; + + sec_jr0: jr@10000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x10000 0x10000>; + interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr1: jr@20000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x20000 0x10000>; + interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr2: jr@30000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x30000 0x10000>; + interrupts = <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr3: jr@40000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x40000 0x10000>; + interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + pcie1: pcie@3400000 { compatible = "fsl,ls-pcie", "snps,dw-pcie"; reg = <0x00 0x03400000 0x0 0x80000 /* dbi registers */
arch/arm/dts/fsl-ls2080a.dtsi +39 -0
@@ -239,6 +239,45 @@ status = "disabled"; }; + crypto: crypto@8000000 { + compatible = "fsl,sec-v5.0", "fsl,sec-v4.0"; + fsl,sec-era = <8>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x00 0x8000000 0x100000>; + reg = <0x00 0x8000000 0x0 0x100000>; + interrupts = <0 139 0x4>; /* Level high type */ + dma-coherent; + + sec_jr0: jr@10000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x10000 0x10000>; + interrupts = <0 140 0x4>; /* Level high type */ + }; + + sec_jr1: jr@20000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x20000 0x10000>; + interrupts = <0 141 0x4>; /* Level high type */ + }; + + sec_jr2: jr@30000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x30000 0x10000>; + interrupts = <0 142 0x4>; /* Level high type */ + }; + + sec_jr3: jr@40000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x40000 0x10000>; + interrupts = <0 143 0x4>; /* Level high type */ + }; + }; + fsl_mc: fsl-mc@80c000000 { compatible = "fsl,qoriq-mc", "simple-mfd"; reg = <0x00000008 0x0c000000 0 0x40>, /* MC portal base */
arch/arm/dts/fsl-lx2160a.dtsi +40 -1
53 lines not on this page · raw message
arch/arm/dts/ls1021a.dtsi +40 -0
@@ -3,6 +3,7 @@ * Freescale ls1021a SOC common device tree source * * Copyright 2013-2015 Freescale Semiconductor, Inc. + * Copyright 2021 NXP */ #include "skeleton.dtsi"
@@ -144,6 +145,45 @@ big-endian; }; + crypto: crypto@1700000 { + compatible = "fsl,sec-v5.0", "fsl,sec-v4.0"; + fsl,sec-era = <7>; + #address-cells = <1>; + #size-cells = <1>; + reg = <0x1700000 0x100000>; + ranges = <0x0 0x1700000 0x100000>; + interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>; + + sec_jr0: jr@10000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x10000 0x10000>; + interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr1: jr@20000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x20000 0x10000>; + interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr2: jr@30000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x30000 0x10000>; + interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>; + }; + + sec_jr3: jr@40000 { + compatible = "fsl,sec-v5.0-job-ring", + "fsl,sec-v4.0-job-ring"; + reg = <0x40000 0x10000>; + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>; + }; + + }; + clockgen: clocking@1ee1000 { #address-cells = <1>; #size-cells = <1>;
Signature · 1 line
2.17.1
PATCH v10 11/14 Layerscape: Enable Job ring driver model.
In reply to Gaurav JainLS(1021/1012/1028/1043/1046/1088/2088), LX2160, LX2162 platforms are enabled with JR driver model.
removed sec_init() call from board files.
removed CONFIG_FSL_CAAM from defconfig files.
sec is initialized based on job ring information processed from device tree.
--- arch/arm/cpu/armv7/ls102xa/cpu.c | 18 ++++++++++++++++++ arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 11 ++++++++++- board/freescale/ls1012afrdm/ls1012afrdm.c | 7 +------ board/freescale/ls1012aqds/ls1012aqds.c | 6 +----- board/freescale/ls1012ardb/ls1012ardb.c | 6 +----- board/freescale/ls1021aiot/ls1021aiot.c | 6 ++---- board/freescale/ls1021aqds/ls1021aqds.c | 6 +----- board/freescale/ls1021atsn/ls1021atsn.c | 7 ++----- board/freescale/ls1021atwr/ls1021atwr.c | 8 ++------ board/freescale/ls1028a/ls1028a.c | 6 +----- board/freescale/ls1043ardb/ls1043ardb.c | 6 +----- board/freescale/ls1046afrwy/ls1046afrwy.c | 7 +------ board/freescale/ls1046aqds/ls1046aqds.c | 7 +------ board/freescale/ls1046ardb/ls1046ardb.c | 6 +----- board/freescale/ls1088a/ls1088a.c | 6 +----- board/freescale/ls2080aqds/ls2080aqds.c | 6 +----- board/freescale/ls2080ardb/ls2080ardb.c | 9 +-------- board/freescale/lx2160a/lx2160a.c | 5 ----- board/kontron/sl28/sl28.c | 3 --- configs/ls1021aiot_qspi_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_defconfig | 1 + configs/ls1021aqds_nor_lpuart_defconfig | 1 + configs/ls1021aqds_qspi_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + configs/ls1021atwr_nor_defconfig | 1 + configs/ls1021atwr_nor_lpuart_defconfig | 1 + configs/ls1021atwr_qspi_defconfig | 1 + ...ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_defconfig | 1 + configs/ls1043aqds_lpuart_defconfig | 1 + configs/ls1043aqds_nand_defconfig | 1 + configs/ls1043aqds_nor_ddr3_defconfig | 1 + configs/ls1043aqds_qspi_defconfig | 1 + configs/ls1043aqds_sdcard_ifc_defconfig | 1 + configs/ls1043aqds_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_tfa_defconfig | 1 + configs/ls1043ardb_defconfig | 1 + configs/ls1043ardb_nand_defconfig | 1 + configs/ls1043ardb_sdcard_defconfig | 1 + configs/ls1043ardb_tfa_defconfig | 1 + configs/ls1046afrwy_tfa_defconfig | 1 + configs/ls1046aqds_defconfig | 1 + configs/ls1046aqds_lpuart_defconfig | 1 + configs/ls1046aqds_nand_defconfig | 1 + configs/ls1046aqds_qspi_defconfig | 1 + configs/ls1046aqds_sdcard_ifc_defconfig | 1 + configs/ls1046aqds_sdcard_qspi_defconfig | 1 + configs/ls1046aqds_tfa_defconfig | 1 + configs/ls1046ardb_emmc_defconfig | 1 + configs/ls1046ardb_qspi_defconfig | 1 + configs/ls1046ardb_qspi_spl_defconfig | 1 + configs/ls1046ardb_sdcard_defconfig | 1 + configs/ls1046ardb_tfa_defconfig | 1 + 62 files changed, 89 insertions(+), 90 deletions(-)
arch/arm/cpu/armv7/ls102xa/cpu.c +18 -0
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -20,6 +21,7 @@#include <config.h> #include <fsl_wdog.h> #include <linux/delay.h> +#include <dm.h> #include "fsl_epu.h"
@@ -397,3 +399,19 @@ void arch_preboot_os(void) ctrl &= ~ARCH_TIMER_CTRL_ENABLE ; asm("mcr p15, 0, %0, c14, c2, 1" : :"r" (ctrl)); } + +#ifdef CONFIG_ARCH_MISC_INIT +int arch_misc_init (void ) +{ +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + } + +return 0 ; +} +#endif
arch/arm/cpu/armv8/fsl-layerscape/cpu.c +10 -1
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2017-2020 NXP +* Copyright 2017-2021 NXP * Copyright 2014-2015 Freescale Semiconductor, Inc. */
@@ -49,6 +49,7 @@#endif #endif #include <linux/mii.h> +#include <dm.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -1650,6 +1651,14 @@ __weak int serdes_misc_init(void)int arch_misc_init (void ) { +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + }serdes_misc_init ();return 0 ;
board/freescale/ls1012afrdm/ls1012afrdm.c +1 -6
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2017-2018 NXP +* Copyright 2017-2018, 2021 NXP */ #include <common.h>
@@ -22,7 +22,6 @@#include <env_internal.h> #include <fsl_mmdc.h> #include <netdev.h> -#include <fsl_sec.h> #include <net/pfe_eth/pfe/pfe_hw.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -172,10 +171,6 @@ int board_init(void)if (current_el () ==3 )out_le32 (&cci->ctrl_ord,CCI400_CTRLORD_EN_BARRIER ); -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1012aqds/ls1012aqds.c +1 -5
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -28,7 +29,6 @@#include <fsl_mmdc.h> #include <spl.h> #include <netdev.h> -#include <fsl_sec.h> #include "../common/qixis.h" #include "ls1012aqds_qixis.h" #include "ls1012aqds_pfe.h"
@@ -150,10 +150,6 @@ int board_init(void)erratum_a010315 ();#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1012ardb/ls1012ardb.c +1 -5
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -27,7 +28,6 @@#include <env_internal.h> #include <fsl_mmdc.h> #include <netdev.h> -#include <fsl_sec.h> #include <net/pfe_eth/pfe/pfe_hw.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -173,10 +173,6 @@ int board_init(void)erratum_a010315 ();#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1021aiot/ls1021aiot.c +2 -4
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -209,10 +210,7 @@ int misc_init_r(void)device_disable (devdis_tbl,ARRAY_SIZE (devdis_tbl));#endif - -#ifdef CONFIG_FSL_CAAM -return sec_init (); -#endif + return 0; }#endif
board/freescale/ls1021aqds/ls1021aqds.c +1 -5
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2019 NXP +* Copyright 2019, 2021 NXP */ #include <common.h>
@@ -20,7 +20,6 @@#include <mmc.h> #include <fsl_csu.h> #include <fsl_ifc.h> -#include <fsl_sec.h> #include <spl.h> #include <fsl_devdis.h> #include <fsl_validate.h>
@@ -388,9 +387,6 @@ int misc_init_r(void)#ifdef CONFIG_FSL_DEVICE_DISABLE device_disable (devdis_tbl,ARRAY_SIZE (devdis_tbl)); -#endif -#ifdef CONFIG_FSL_CAAM -return sec_init ();#endif return 0 ; }
board/freescale/ls1021atsn/ls1021atsn.c +2 -5
@@ -1,5 +1,5 @@// SPDX-License-Identifier: GPL-2.0 -/* Copyright 2016-2019 NXP +/* Copyright 2016-2019, 2021 NXP */ #include <common.h> #include <clock_legacy.h>
@@ -238,10 +238,7 @@ int misc_init_r(void)#ifdef CONFIG_FSL_DEVICE_DISABLE device_disable (devdis_tbl,ARRAY_SIZE (devdis_tbl));#endif - -#ifdef CONFIG_FSL_CAAM -return sec_init (); -#endif + return 0; }#endif
board/freescale/ls1021atwr/ls1021atwr.c +2 -6
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014 Freescale Semiconductor, Inc. -* Copyright 2019 NXP +* Copyright 2019, 2021 NXP */ #include <common.h>
@@ -26,7 +26,6 @@#include <netdev.h> #include <fsl_mdio.h> #include <tsec.h> -#include <fsl_sec.h> #include <fsl_devdis.h> #include <spl.h> #include <linux/delay.h>
@@ -555,10 +554,7 @@ int misc_init_r(void)#if !defined(CONFIG_QSPI_BOOT ) && !defined(CONFIG_SD_BOOT_QSPI )config_board_mux ();#endif - -#ifdef CONFIG_FSL_CAAM -return sec_init (); -#endif + return 0; }#endif
board/freescale/ls1028a/ls1028a.c +1 -5
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2019 NXP +* Copyright 2019, 2021 NXP */ #include <common.h>
@@ -73,10 +73,6 @@ u32 get_lpuart_clk(void)int board_init (void ) { -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1043ardb/ls1043ardb.c +1 -5
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2015 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -20,7 +21,6 @@#include <fm_eth.h> #include <fsl_esdhc.h> #include <fsl_ifc.h> -#include <fsl_sec.h> #include "cpld.h" #ifdef CONFIG_U_QE #include <fsl_qe.h>
@@ -211,10 +211,6 @@ int board_init(void)out_le32 (SMMU_NSCR0 , val);#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1046afrwy/ls1046afrwy.c +1 -6
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2019 NXP +* Copyright 2019, 2021 NXP */ #include <common.h>
@@ -20,7 +20,6 @@#include <fm_eth.h> #include <fsl_csu.h> #include <fsl_esdhc.h> -#include <fsl_sec.h> #include <fsl_dspi.h> #include "../common/i2c_mux.h"
@@ -135,10 +134,6 @@ val = (in_le32(SMMU_SCR0) | SCR0_CLIENTPD_MASK) & ~(SCR0_USFCFG_MASK);out_le32 (SMMU_NSCR0 , val);#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -select_i2c_ch_pca9547 (I2C_MUX_CH_DEFAULT ,0 );return 0 ; }
board/freescale/ls1046aqds/ls1046aqds.c +1 -6
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. -* Copyright 2019-2020 NXP +* Copyright 2019-2021 NXP */ #include <common.h>
@@ -28,7 +28,6 @@#include <fsl_csu.h> #include <fsl_esdhc.h> #include <fsl_ifc.h> -#include <fsl_sec.h> #include <spl.h> #include "../common/i2c_mux.h"
@@ -421,10 +420,6 @@ int board_init(void)out_le32 (SMMU_NSCR0 , val);#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -return 0 ; }
board/freescale/ls1046ardb/ls1046ardb.c +1 -5
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. +* Copyright 2021 NXP */ #include <common.h>
@@ -23,7 +24,6 @@#include <fsl_esdhc.h> #include <power/mc34vr500_pmic.h> #include "cpld.h" -#include <fsl_sec.h> DECLARE_GLOBAL_DATA_PTR ;
@@ -85,10 +85,6 @@ int board_init(void)out_le32 (SMMU_NSCR0 , val);#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls1088a/ls1088a.c +1 -5
@@ -1,6 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* -* Copyright 2017-2018 NXP +* Copyright 2017-2018, 2021 NXP */ #include <common.h> #include <clock_legacy.h>
@@ -13,7 +13,6 @@#include <netdev.h> #include <fsl_ifc.h> #include <fsl_ddr.h> -#include <fsl_sec.h> #include <asm/global_data.h> #include <asm/io.h> #include <fdt_support.h>
@@ -820,9 +819,6 @@ int board_init(void)out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR105_IRQ_MASK );#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif #ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls2080aqds/ls2080aqds.c +1 -5
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2015 Freescale Semiconductor +* Copyright 2021 NXP */ #include <common.h> #include <clock_legacy.h>
@@ -21,7 +22,6 @@#include <rtc.h> #include <asm/arch/soc.h> #include <hwconfig.h> -#include <fsl_sec.h> #include <asm/arch/ppa.h> #include <asm/arch-fsl-layerscape/fsl_icid.h> #include "../common/i2c_mux.h"
@@ -222,10 +222,6 @@ int board_init(void)#endif #endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
board/freescale/ls2080ardb/ls2080ardb.c +1 -8
@@ -1,7 +1,7 @@// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2015 Freescale Semiconductor -* Copyright 2017 NXP +* Copyright 2017, 2021 NXP */ #include <common.h> #include <clock_legacy.h>
@@ -24,7 +24,6 @@#include <asm/arch/mmu.h> #include <asm/arch/soc.h> #include <asm/arch/ppa.h> -#include <fsl_sec.h> #include <asm/arch-fsl-layerscape/fsl_icid.h> #include "../common/i2c_mux.h"
@@ -288,9 +287,6 @@ int board_init(void)QIXIS_WRITE (rst_ctl,QIXIS_RST_CTL_RESET_EN );#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif #ifdef CONFIG_FSL_LS_PPA ppa_init ();#endif
@@ -299,9 +295,6 @@ int board_init(void)/* invert AQR405 IRQ pins polarity */ out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR405_IRQ_MASK );#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif #if !defined(CONFIG_SYS_EARLY_PCI_INIT ) && defined(CONFIG_DM_ETH )pci_init ();
board/freescale/lx2160a/lx2160a.c +0 -5
@@ -14,7 +14,6 @@#include <errno.h> #include <netdev.h> #include <fsl_ddr.h> -#include <fsl_sec.h> #include <asm/io.h> #include <fdt_support.h> #include <linux/bitops.h>
@@ -596,10 +595,6 @@ int board_init(void)out_le32 (irq_ccsr +IRQCR_OFFSET /4 ,AQR107_IRQ_MASK );#endif -#ifdef CONFIG_FSL_CAAM -sec_init (); -#endif -#if !defined(CONFIG_SYS_EARLY_PCI_INIT ) && defined(CONFIG_DM_ETH )pci_init ();#endif
board/kontron/sl28/sl28.c +0 -3
@@ -28,9 +28,6 @@ int board_early_init_f(void)int board_init (void ) { -if (CONFIG_IS_ENABLED (FSL_CAAM )) -sec_init (); -return 0 ; }
configs/ls1021aiot_qspi_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
configs/ls1021aiot_sdcard_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
configs/ls1021aqds_ddr4_nor_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1021aqds_ddr4_nor_lpuart_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1021aqds_nand_defconfig +1 -0
@@ -73,6 +73,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y
configs/ls1021aqds_nor_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y
configs/ls1021aqds_nor_lpuart_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y
configs/ls1021aqds_qspi_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1021aqds_sdcard_ifc_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y
configs/ls1021aqds_sdcard_qspi_defconfig +1 -0
@@ -68,6 +68,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1021atsn_qspi_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
configs/ls1021atsn_sdcard_defconfig +1 -0
@@ -54,6 +54,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
configs/ls1021atwr_nor_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1021atwr_nor_lpuart_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1021atwr_qspi_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SPL_DM=y +CONFIG_SPL_OF_CONTROL=y # CONFIG_SPL_BLK is not set CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y
configs/ls1021atwr_sdcard_ifc_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1021atwr_sdcard_qspi_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1043aqds_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_lpuart_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_nand_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_nor_ddr3_defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y
configs/ls1043aqds_qspi_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_sdcard_ifc_defconfig +1 -0
@@ -70,6 +70,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_sdcard_qspi_defconfig +1 -0
@@ -69,6 +69,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043aqds_tfa_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1043ardb_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y # CONFIG_DDR_SPD is not set CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1043ardb_nand_defconfig +1 -0
@@ -59,6 +59,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1043ardb_sdcard_defconfig +1 -0
@@ -58,6 +58,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y CONFIG_SPL_SYS_I2C_LEGACY=y
configs/ls1043ardb_tfa_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_ADDR=0x60500000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y # CONFIG_DDR_SPD is not set CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1046afrwy_tfa_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y # CONFIG_DDR_SPD is not set CONFIG_MPC8XXX_GPIO=y CONFIG_DM_I2C=y
configs/ls1046aqds_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_lpuart_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ENV_ADDR=0x60300000 CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_nand_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_qspi_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_sdcard_ifc_defconfig +1 -0
@@ -72,6 +72,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_sdcard_qspi_defconfig +1 -0
@@ -71,6 +71,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046aqds_tfa_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/ls1046ardb_emmc_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1046ardb_qspi_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1046ardb_qspi_spl_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_SPL_ENV_IS_NOWHERE=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1046ardb_sdcard_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
configs/ls1046ardb_tfa_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_SATA_CEVA=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_MPC8XXX_GPIO=y
Signature · 1 line
2.17.1
Re: [PATCH v10 11/14] Layerscape: Enable Job ring driver model.
Am 2022-01-12 14:31, schrieb Gaurav Jain:
Quoted 10 lines
LS(1021/1012/1028/1043/1046/1088/2088), LX2160, LX2162 platforms are enabled with JR driver model.
removed
sec_init()call from board files.
removedCONFIG_FSL_CAAMfrom defconfig files.
sec is initialized based on job ring information processed from device tree.Signed-off-by Gaurav Jain <[email protected]>Reviewed-by Priyanka Jain <[email protected]>
..
Quoted 35 lines
configs/ls1021aiot_qspi_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_defconfig | 1 + configs/ls1021aqds_nor_lpuart_defconfig | 1 + configs/ls1021aqds_qspi_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + configs/ls1021atwr_nor_defconfig | 1 + configs/ls1021atwr_nor_lpuart_defconfig | 1 + configs/ls1021atwr_qspi_defconfig | 1 + ...ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_defconfig | 1 + configs/ls1043aqds_lpuart_defconfig | 1 + configs/ls1043aqds_nand_defconfig | 1 + configs/ls1043aqds_nor_ddr3_defconfig | 1 + configs/ls1043aqds_qspi_defconfig | 1 + configs/ls1043aqds_sdcard_ifc_defconfig | 1 + configs/ls1043aqds_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_tfa_defconfig | 1 + configs/ls1043ardb_defconfig | 1 + configs/ls1043ardb_nand_defconfig | 1 + configs/ls1043ardb_sdcard_defconfig | 1 + configs/ls1043ardb_tfa_defconfig | 1 + configs/ls1046afrwy_tfa_defconfig | 1 + configs/ls1046aqds_defconfig | 1 + configs/ls1046aqds_lpuart_defconfig | 1 + configs/ls1046aqds_nand_defconfig | 1 + configs/ls1046aqds_qspi_defconfig | 1 +
Quoted 8 lines
configs/ls1046aqds_sdcard_ifc_defconfig | 1 + configs/ls1046aqds_sdcard_qspi_defconfig | 1 + configs/ls1046aqds_tfa_defconfig | 1 + configs/ls1046ardb_emmc_defconfig | 1 + configs/ls1046ardb_qspi_defconfig | 1 + configs/ls1046ardb_qspi_spl_defconfig | 1 + configs/ls1046ardb_sdcard_defconfig | 1 + configs/ls1046ardb_tfa_defconfig | 1 +
These are all setting CONFIG_ARCH_MISC_INIT=y which should probably done by the ARCH symbol, see FSL_LSCH3 for example. I don't think this is something the user should take care of and will save you all these settings. But I neither care for ls1021a nor for ls104[36], thus for everything else:
-michael
PATCH v10 12/14 PPC: Add crypto node in device tree
In reply to Gaurav Jaindevice tree imported from linux kernel.c500bee1c5b2 (tag: v5.14-rc4) Linux 5.14-rc4
--- arch/powerpc/dts/p2041si-post.dtsi | 1 + arch/powerpc/dts/p3041si-post.dtsi | 1 + arch/powerpc/dts/p4080si-post.dtsi | 1 + arch/powerpc/dts/p5040si-post.dtsi | 1 + arch/powerpc/dts/qoriq-sec4.0-0.dtsi | 74 ++++++++++++++++++++++ arch/powerpc/dts/qoriq-sec4.2-0.dtsi | 83 +++++++++++++++++++++++++ arch/powerpc/dts/qoriq-sec5.2-0.dtsi | 92 ++++++++++++++++++++++++++++ arch/powerpc/dts/t1023si-post.dtsi | 1 + arch/powerpc/dts/t1042si-post.dtsi | 1 + arch/powerpc/dts/t2080si-post.dtsi | 1 + arch/powerpc/dts/t4240si-post.dtsi | 1 + 11 files changed, 257 insertions(+) create mode 100644 arch/powerpc/dts/qoriq-sec4.0-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec4.2-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec5.2-0.dtsi
arch/powerpc/dts/p2041si-post.dtsi +1 -0
@@ -11,6 +11,7 @@ /include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-gpio-0.dtsi" +/include/ "qoriq-sec4.2-0.dtsi" /* include used FMan blocks */ /include/ "qoriq-fman-0.dtsi"
arch/powerpc/dts/p3041si-post.dtsi +1 -0
@@ -11,6 +11,7 @@ /include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-gpio-0.dtsi" +/include/ "qoriq-sec4.2-0.dtsi" /* include used FMan blocks */ /include/ "qoriq-fman-0.dtsi"
arch/powerpc/dts/p4080si-post.dtsi +1 -0
@@ -11,6 +11,7 @@ /include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-gpio-0.dtsi" +/include/ "qoriq-sec4.0-0.dtsi" /* include used FMan blocks */ /include/ "qoriq-fman-0.dtsi"
arch/powerpc/dts/p5040si-post.dtsi +1 -0
@@ -11,6 +11,7 @@ /include/ "qoriq-clockgen1.dtsi" /include/ "qoriq-gpio-0.dtsi" +/include/ "qoriq-sec5.2-0.dtsi" /* include used FMan blocks */ /include/ "qoriq-fman-0.dtsi"
arch/powerpc/dts/qoriq-sec4.0-0.dtsi new file +74 -0
74 lines not on this page · raw message
arch/powerpc/dts/qoriq-sec4.2-0.dtsi new file +83 -0
83 lines not on this page · raw message
arch/powerpc/dts/qoriq-sec5.2-0.dtsi new file +92 -0
92 lines not on this page · raw message
arch/powerpc/dts/t1023si-post.dtsi +1 -0
@@ -14,6 +14,7 @@ /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi" /include/ "qoriq-gpio-3.dtsi" +/include/ "qoriq-sec5.0-0.dtsi" /* include used FMan blocks */ /include/ "qoriq-fman3l-0.dtsi"
arch/powerpc/dts/t1042si-post.dtsi +1 -0
@@ -12,6 +12,7 @@ /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi" /include/ "qoriq-gpio-3.dtsi" +/include/ "qoriq-sec5.0-0.dtsi" /include/ "qoriq-fman3l-0.dtsi" /include/ "qoriq-fman3-0-1g-0.dtsi"
arch/powerpc/dts/t2080si-post.dtsi +1 -0
@@ -13,6 +13,7 @@ /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi" /include/ "qoriq-gpio-3.dtsi" +/include/ "qoriq-sec5.2-0.dtsi" /include/ "qoriq-fman3-0.dtsi" /include/ "qoriq-fman3-0-10g-0-best-effort.dtsi"
arch/powerpc/dts/t4240si-post.dtsi +1 -0
@@ -12,6 +12,7 @@ /include/ "qoriq-gpio-1.dtsi" /include/ "qoriq-gpio-2.dtsi" /include/ "qoriq-gpio-3.dtsi" +/include/ "qoriq-sec5.0-0.dtsi" /include/ "qoriq-fman3-0.dtsi" /include/ "qoriq-fman3-0-1g-0.dtsi"
Signature · 1 line
2.17.1
PATCH v10 13/14 PPC: Enable Job ring driver model.
In reply to Gaurav Jainremoved sec_init() call and CONFIG_FSL_CAAM from defconfig. sec is initialized based on job ring information processed from device tree.
--- arch/powerpc/cpu/mpc85xx/cpu_init.c | 19 +++++++++++++++++-- arch/powerpc/include/asm/u-boot-ppc.h | 17 +++++++++++++++++ arch/powerpc/include/asm/u-boot.h | 1 + configs/P2041RDB_NAND_defconfig | 1 + configs/P2041RDB_SDCARD_defconfig | 1 + configs/P2041RDB_SPIFLASH_defconfig | 1 + configs/P2041RDB_defconfig | 1 + configs/P3041DS_NAND_defconfig | 1 + configs/P3041DS_SDCARD_defconfig | 1 + configs/P3041DS_SPIFLASH_defconfig | 1 + configs/P3041DS_defconfig | 1 + configs/P4080DS_SDCARD_defconfig | 1 + configs/P4080DS_SPIFLASH_defconfig | 1 + configs/P4080DS_defconfig | 1 + configs/P5040DS_NAND_defconfig | 1 + configs/P5040DS_SDCARD_defconfig | 1 + configs/P5040DS_SPIFLASH_defconfig | 1 + configs/P5040DS_defconfig | 1 + configs/T1024RDB_NAND_defconfig | 1 + configs/T1024RDB_SDCARD_defconfig | 1 + configs/T1024RDB_SPIFLASH_defconfig | 1 + configs/T1024RDB_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T2080QDS_NAND_defconfig | 1 + configs/T2080QDS_SDCARD_defconfig | 1 + configs/T2080QDS_SPIFLASH_defconfig | 1 + configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 1 + configs/T2080QDS_defconfig | 1 + configs/T2080RDB_NAND_defconfig | 1 + configs/T2080RDB_SDCARD_defconfig | 1 + configs/T2080RDB_SPIFLASH_defconfig | 1 + configs/T2080RDB_defconfig | 1 + configs/T2080RDB_revD_NAND_defconfig | 1 + configs/T2080RDB_revD_SDCARD_defconfig | 1 + configs/T2080RDB_revD_SPIFLASH_defconfig | 1 + configs/T2080RDB_revD_defconfig | 1 + configs/T4240RDB_SDCARD_defconfig | 1 + configs/T4240RDB_defconfig | 1 + 41 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 arch/powerpc/include/asm/u-boot-ppc.h
arch/powerpc/cpu/mpc85xx/cpu_init.c +17 -2
@@ -56,6 +56,7 @@#ifdef CONFIG_U_QE #include <fsl_qe.h> #endif +#include <dm.h> #ifdef CONFIG_SYS_FSL_SINGLE_SOURCE_CLK /*
@@ -974,8 +975,6 @@ int cpu_init_r(void)#endif #ifdef CONFIG_FSL_CAAM -sec_init (); -#if defined(CONFIG_ARCH_C29X )if ((SVR_SOC_VER (svr) ==SVR_C292 ) || (SVR_SOC_VER (svr) ==SVR_C293 ))
@@ -1014,6 +1013,22 @@ int cpu_init_r(void)return 0 ; } +#ifdef CONFIG_ARCH_MISC_INIT +int arch_misc_init (void ) +{ +if (IS_ENABLED (CONFIG_FSL_CAAM )) { +struct udevice *dev; +int ret; + + 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); + } + +return 0 ; +} +#endif +void arch_preboot_os (void ) {u32 msr;
arch/powerpc/include/asm/u-boot-ppc.h new file +17 -0
@@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* +* Copyright 2021 NXP +* +* Gaurav Jain <[email protected]> +*/ + +#ifndef _U_BOOT_PPC_H_ +#define _U_BOOT_PPC_H_ + +#ifndef __ASSEMBLY__ + +int arch_misc_init (void ); + +#endif /* __ASSEMBLY__ */ + +#endif /* _U_BOOT_PPC_H_ */
arch/powerpc/include/asm/u-boot.h +1 -0
@@ -21,5 +21,6 @@/* Use the generic board which requires a unified bd_info */ #include <asm-generic/u-boot.h> #include <asm/ppc.h> +#include <asm/u-boot-ppc.h> #endif /* __U_BOOT_H__ */
configs/P2041RDB_NAND_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_BR0_PRELIM_BOOL=y CONFIG_SYS_BR0_PRELIM=0xFFA00C21 CONFIG_SYS_OR0_PRELIM=0xFFFC0796
configs/P2041RDB_SDCARD_defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_BR0_PRELIM_BOOL=y CONFIG_SYS_BR0_PRELIM=0xE8001001 CONFIG_SYS_OR0_PRELIM=0xF8000F85
configs/P2041RDB_SPIFLASH_defconfig +1 -0
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_BR0_PRELIM_BOOL=y CONFIG_SYS_BR0_PRELIM=0xE8001001 CONFIG_SYS_OR0_PRELIM=0xF8000F85
configs/P2041RDB_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_BR0_PRELIM_BOOL=y CONFIG_SYS_BR0_PRELIM=0xE8001001 CONFIG_SYS_OR0_PRELIM=0xF8000F85
configs/P3041DS_NAND_defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P3041DS_SDCARD_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P3041DS_SPIFLASH_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P3041DS_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P4080DS_SDCARD_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P4080DS_SPIFLASH_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P4080DS_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P5040DS_NAND_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_NAND=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P5040DS_SDCARD_defconfig +1 -0
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_MMC=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P5040DS_SPIFLASH_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/P5040DS_defconfig +1 -0
@@ -36,6 +36,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y CONFIG_SYS_BR0_PRELIM_BOOL=y
configs/T1024RDB_NAND_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1024RDB_SDCARD_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1024RDB_SPIFLASH_defconfig +1 -0
@@ -64,6 +64,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1024RDB_defconfig +1 -0
@@ -47,6 +47,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_SYS_FSL_DDR3=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1042D4RDB_NAND_defconfig +1 -0
@@ -54,6 +54,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=66666666 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1042D4RDB_SDCARD_defconfig +1 -0
@@ -53,6 +53,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=66666666 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1042D4RDB_SPIFLASH_defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=66666666 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T1042D4RDB_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=66666666 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080QDS_NAND_defconfig +1 -0
@@ -57,6 +57,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080QDS_SDCARD_defconfig +1 -0
@@ -56,6 +56,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080QDS_SPIFLASH_defconfig +1 -0
@@ -58,6 +58,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080QDS_SRIO_PCIE_BOOT_defconfig +1 -0
@@ -38,6 +38,7 @@ CONFIG_ENV_IS_IN_REMOTE=y CONFIG_ENV_ADDR=0xFFE20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080QDS_defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DYNAMIC_DDR_CLK_FREQ=y CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_NAND_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_SDCARD_defconfig +1 -0
@@ -60,6 +60,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_SPIFLASH_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_defconfig +1 -0
@@ -45,6 +45,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_revD_NAND_defconfig +1 -0
@@ -62,6 +62,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_revD_SDCARD_defconfig +1 -0
@@ -61,6 +61,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_revD_SPIFLASH_defconfig +1 -0
@@ -63,6 +63,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T2080RDB_revD_defconfig +1 -0
@@ -46,6 +46,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133330000 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T4240RDB_SDCARD_defconfig +1 -0
@@ -52,6 +52,7 @@ CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_MMC=y CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133333333 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
configs/T4240RDB_defconfig +1 -0
@@ -37,6 +37,7 @@ CONFIG_ENV_IS_IN_FLASH=y CONFIG_ENV_ADDR=0xEFF20000 CONFIG_DM=y CONFIG_FSL_CAAM=y +CONFIG_ARCH_MISC_INIT=y CONFIG_DDR_CLK_FREQ=133333333 CONFIG_DDR_ECC=y CONFIG_ECC_INIT_VIA_DDRCONTROLLER=y
Signature · 1 line
2.17.1
PATCH v10 14/14 update CAAM MAINTAINER
In reply to Gaurav Jainupdated CAAM driver files maintainer.
--- MAINTAINERS | 6 ++++++ 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
@@ -1334,3 +1334,9 @@ T: git https://source.denx.de/u-boot/u-boot.git F: configs/tools-only_defconfig F: * F: */ + +CAAM +M: Gaurav Jain <[email protected]> +S: Maintained +F: drivers/crypto/fsl/ +F: include/fsl_sec.h
Signature · 1 line
2.17.1
Hi Stefano
Can you help to review and merge this patch series.
Regards
Gaurav Jain
Quoted 263 lines
-----Original Message-----
From: Gaurav Jain
Sent: Wednesday, January 12, 2022 7:02 PM
To: [email protected]
Cc: Stefano Babic <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan <[email protected]>; Simon Glass <[email protected]>; Michael Walle <[email protected]>; Priyanka Jain <[email protected]>; Ye Li <[email protected]>; Horia Geanta <[email protected]>; Ji Luo <[email protected]>; Franck Lenormand <[email protected]>; Silvano Di Ninno <[email protected]>; Sahil Malhotra <[email protected]>; Pankaj Gupta <[email protected]>; Varun Sethi <[email protected]>; dl- uboot-imx <[email protected]>; Shengzhou Liu <[email protected]>; Mingkai Hu <[email protected]>; Rajesh Bhagat <[email protected]>; Meenakshi Aggarwal <[email protected]>; Wasim Khan <[email protected]>; Alison Wang <[email protected]>; Pramod Kumar <[email protected]>; Andy Tang <[email protected]>; Adrian Alonso <[email protected]>; Vladimir Oltean <[email protected]>; Gaurav Jain <[email protected]>
Subject: [PATCH v10 00/14] Add CAAM driver model supportThis patchset adds the support for following:
1) CAAM Driver model for all i.MX, layerscape, PPC platforms.
2) Added crypto node in device tree files.
3) fix build issue for mx6sabre: Remove SPL DTB related configs andSPL_OF_CONTROL.i.MX platforms:
i.MX6, i.MX7, i.MX7ULP, i.MX8MM/MN/MP/MQ, i.MX8QM/QXPLayerscape platforms:
LS1021, LS1012, LS1028, LS1043, LS1046, LS1088, LS2088, LX2160, LX2162Powerpc platforms:
P3041, P4080, P5040, P2041, T1024, T1042, T2080, T4240changes since v9:
- addedIS_ENABLED(CONFIG_FSL_CAAM)check before probing CAAM driver.
-FSL_CAAMenablement is moved to defconfigs for layerscape, powerpc.changes since v8:
- rebase to latest master
- removed patch "crypto/fsl: Improve hwrng performance in kernel".
- movedFSL_CAAMconfig to board defconfig for Layerscape platforms.
- moved MISC config select to "configFSL_CAAM" as "select MISC if DM".changes since v7:
- rebase to latest master
- corrected the order of include files as per coding style injr.c.
https://www.denx.de/wiki/U-Boot/CodingStyle
- added brackets around #defines for -ve number injr.h
- added comments for structcaam_regsinjr.hchanges since v6:
- rebase to latest master
- addedcaam_jr_ioctl()operation which callsrun_descriptor_jr().
- removedCONFIG_ARCH_IMX8config from JR driver.
- removedFSL_BLOBconfigchanges since v5:
- rebase to latest master
- updatedBIT()macro for JRDID indrivers/crypto/fsl/jr.h
- removed auto selectFSL_BLOBfromCMD_BLOBconfig.
- removed patch for blob key encryption key(bkek), random number generation.
- updated patch description for improving hwrng performance in kernel.
- removedsec_init()from kontron/sl28.
- for LS1028A architecture, enable CAAM only for LS1028AQDS and LS1028ARDB.changes since v4:
- rebase to latest master
- updatedcaam_jr_probe()with livetree APIs.
- imx8m: moved jr0 disable code to *-uboot.dtsi files.changes since v3:
- rebase to latest master
- fixed build error when new filearch/powerpc/include/asm/u-boot-ppc.his included from assembly files.
- removedarch/arm/dts/fsl-ls1028a.dtsias it is conflicting with the series
https://lore.kernel.org/u-boot/[email protected]/Gaurav Jain (13):
crypto/fsl: Add support for CAAM Job ring driver model i.MX8M: crypto: updated device tree for supporting DM in SPLcrypto/fsl: i.MX8M: Enable Job ring driver model. i.MX6: Enable Job ring driver model.
i.MX7: Enable Job ring driver model.
i.MX7ULP: Enable Job ring driver model.
i.MX8: Add crypto node in device tree
crypto/fsl: i.MX8: Enable Job ring driver model.
Layerscape: Add crypto node in device tree
Layerscape: Enable Job ring driver model.
PPC: Add crypto node in device tree
PPC: Enable Job ring driver model.
update CAAM MAINTAINERYe Li (1):
mx6sabre: Remove unnecessary SPL configsMAINTAINERS | 6 + arch/arm/Kconfig | 9 +- arch/arm/cpu/armv7/ls102xa/cpu.c | 18 + arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 11 +- arch/arm/dts/fsl-imx8dx.dtsi | 61 ++- arch/arm/dts/fsl-imx8qm-mek-u-boot.dtsi | 34 +- arch/arm/dts/fsl-imx8qm.dtsi | 61 ++- arch/arm/dts/fsl-imx8qxp-mek-u-boot.dtsi | 34 +- arch/arm/dts/fsl-ls1012a.dtsi | 46 ++- arch/arm/dts/fsl-ls1043a.dtsi | 45 ++- arch/arm/dts/fsl-ls1046a.dtsi | 44 +++ arch/arm/dts/fsl-ls1088a.dtsi | 39 ++ arch/arm/dts/fsl-ls2080a.dtsi | 39 ++ arch/arm/dts/fsl-lx2160a.dtsi | 41 +- arch/arm/dts/imx7ulp.dtsi | 24 ++ arch/arm/dts/imx8mm-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mn-ddr4-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mp-evk-u-boot.dtsi | 19 +- arch/arm/dts/imx8mq-evk-u-boot.dtsi | 4 + arch/arm/dts/ls1021a.dtsi | 40 ++ arch/arm/include/asm/arch-imx8/imx-regs.h | 5 +- arch/arm/include/asm/arch-imx8m/imx-regs.h | 1 + arch/arm/mach-imx/cmd_dek.c | 1 + arch/arm/mach-imx/imx8/Kconfig | 7 + arch/arm/mach-imx/imx8/cpu.c | 18 +- arch/arm/mach-imx/imx8m/Kconfig | 13 + arch/arm/mach-imx/imx8m/soc.c | 11 +- arch/arm/mach-imx/mx6/Kconfig | 10 + arch/arm/mach-imx/mx6/soc.c | 13 +- arch/arm/mach-imx/mx7/Kconfig | 1 + arch/arm/mach-imx/mx7/soc.c | 12 +- arch/arm/mach-imx/mx7ulp/Kconfig | 2 + arch/arm/mach-imx/mx7ulp/soc.c | 18 + arch/powerpc/cpu/mpc85xx/cpu_init.c | 19 +- arch/powerpc/dts/p2041si-post.dtsi | 1 + arch/powerpc/dts/p3041si-post.dtsi | 1 + arch/powerpc/dts/p4080si-post.dtsi | 1 + arch/powerpc/dts/p5040si-post.dtsi | 1 + arch/powerpc/dts/qoriq-sec4.0-0.dtsi | 74 ++++ arch/powerpc/dts/qoriq-sec4.2-0.dtsi | 83 ++++ arch/powerpc/dts/qoriq-sec5.2-0.dtsi | 92 +++++ arch/powerpc/dts/t1023si-post.dtsi | 1 + arch/powerpc/dts/t1042si-post.dtsi | 1 + arch/powerpc/dts/t2080si-post.dtsi | 1 + arch/powerpc/dts/t4240si-post.dtsi | 1 + arch/powerpc/include/asm/u-boot-ppc.h | 17 + arch/powerpc/include/asm/u-boot.h | 1 + board/freescale/imx8mm_evk/spl.c | 10 +- board/freescale/imx8mn_evk/spl.c | 9 +- board/freescale/imx8mp_evk/spl.c | 14 +- board/freescale/imx8mq_evk/spl.c | 8 +- board/freescale/imx8qm_mek/spl.c | 6 +- board/freescale/imx8qxp_mek/spl.c | 6 +- board/freescale/ls1012afrdm/ls1012afrdm.c | 7 +- board/freescale/ls1012aqds/ls1012aqds.c | 6 +- board/freescale/ls1012ardb/ls1012ardb.c | 6 +- board/freescale/ls1021aiot/ls1021aiot.c | 6 +- board/freescale/ls1021aqds/ls1021aqds.c | 6 +- board/freescale/ls1021atsn/ls1021atsn.c | 7 +- board/freescale/ls1021atwr/ls1021atwr.c | 8 +- board/freescale/ls1028a/ls1028a.c | 6 +- board/freescale/ls1043ardb/ls1043ardb.c | 6 +- board/freescale/ls1046afrwy/ls1046afrwy.c | 7 +- board/freescale/ls1046aqds/ls1046aqds.c | 7 +- board/freescale/ls1046ardb/ls1046ardb.c | 6 +- board/freescale/ls1088a/ls1088a.c | 6 +- board/freescale/ls2080aqds/ls2080aqds.c | 6 +- board/freescale/ls2080ardb/ls2080ardb.c | 9 +- board/freescale/lx2160a/lx2160a.c | 5 - board/kontron/sl28/sl28.c | 3 - configs/P2041RDB_NAND_defconfig | 1 + configs/P2041RDB_SDCARD_defconfig | 1 + configs/P2041RDB_SPIFLASH_defconfig | 1 + configs/P2041RDB_defconfig | 1 + configs/P3041DS_NAND_defconfig | 1 + configs/P3041DS_SDCARD_defconfig | 1 + configs/P3041DS_SPIFLASH_defconfig | 1 + configs/P3041DS_defconfig | 1 + configs/P4080DS_SDCARD_defconfig | 1 + configs/P4080DS_SPIFLASH_defconfig | 1 + configs/P4080DS_defconfig | 1 + configs/P5040DS_NAND_defconfig | 1 + configs/P5040DS_SDCARD_defconfig | 1 + configs/P5040DS_SPIFLASH_defconfig | 1 + configs/P5040DS_defconfig | 1 + configs/T1024RDB_NAND_defconfig | 1 + configs/T1024RDB_SDCARD_defconfig | 1 + configs/T1024RDB_SPIFLASH_defconfig | 1 + configs/T1024RDB_defconfig | 1 + configs/T1042D4RDB_NAND_defconfig | 1 + configs/T1042D4RDB_SDCARD_defconfig | 1 + configs/T1042D4RDB_SPIFLASH_defconfig | 1 + configs/T1042D4RDB_defconfig | 1 + configs/T2080QDS_NAND_defconfig | 1 + configs/T2080QDS_SDCARD_defconfig | 1 + configs/T2080QDS_SPIFLASH_defconfig | 1 + configs/T2080QDS_SRIO_PCIE_BOOT_defconfig | 1 + configs/T2080QDS_defconfig | 1 + configs/T2080RDB_NAND_defconfig | 1 + configs/T2080RDB_SDCARD_defconfig | 1 + configs/T2080RDB_SPIFLASH_defconfig | 1 + configs/T2080RDB_defconfig | 1 + configs/T2080RDB_revD_NAND_defconfig | 1 + configs/T2080RDB_revD_SDCARD_defconfig | 1 + configs/T2080RDB_revD_SPIFLASH_defconfig | 1 + configs/T2080RDB_revD_defconfig | 1 + configs/T4240RDB_SDCARD_defconfig | 1 + configs/T4240RDB_defconfig | 1 + configs/ls1021aiot_qspi_defconfig | 1 + configs/ls1021aiot_sdcard_defconfig | 1 + configs/ls1021aqds_ddr4_nor_defconfig | 1 + configs/ls1021aqds_ddr4_nor_lpuart_defconfig | 1 + configs/ls1021aqds_nand_defconfig | 1 + configs/ls1021aqds_nor_defconfig | 1 + configs/ls1021aqds_nor_lpuart_defconfig | 1 + configs/ls1021aqds_qspi_defconfig | 1 + configs/ls1021aqds_sdcard_ifc_defconfig | 1 + configs/ls1021aqds_sdcard_qspi_defconfig | 1 + configs/ls1021atsn_qspi_defconfig | 1 + configs/ls1021atsn_sdcard_defconfig | 1 + configs/ls1021atwr_nor_defconfig | 1 + configs/ls1021atwr_nor_lpuart_defconfig | 1 + configs/ls1021atwr_qspi_defconfig | 1 + ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig | 1 + configs/ls1021atwr_sdcard_ifc_defconfig | 1 + configs/ls1021atwr_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_defconfig | 1 + configs/ls1043aqds_lpuart_defconfig | 1 + configs/ls1043aqds_nand_defconfig | 1 + configs/ls1043aqds_nor_ddr3_defconfig | 1 + configs/ls1043aqds_qspi_defconfig | 1 + configs/ls1043aqds_sdcard_ifc_defconfig | 1 + configs/ls1043aqds_sdcard_qspi_defconfig | 1 + configs/ls1043aqds_tfa_defconfig | 1 + configs/ls1043ardb_defconfig | 1 + configs/ls1043ardb_nand_defconfig | 1 + configs/ls1043ardb_sdcard_defconfig | 1 + configs/ls1043ardb_tfa_defconfig | 1 + configs/ls1046afrwy_tfa_defconfig | 1 + configs/ls1046aqds_defconfig | 1 + configs/ls1046aqds_lpuart_defconfig | 1 + configs/ls1046aqds_nand_defconfig | 1 + configs/ls1046aqds_qspi_defconfig | 1 + configs/ls1046aqds_sdcard_ifc_defconfig | 1 + configs/ls1046aqds_sdcard_qspi_defconfig | 1 + configs/ls1046aqds_tfa_defconfig | 1 + configs/ls1046ardb_emmc_defconfig | 1 + configs/ls1046ardb_qspi_defconfig | 1 + configs/ls1046ardb_qspi_spl_defconfig | 1 + configs/ls1046ardb_sdcard_defconfig | 1 + configs/ls1046ardb_tfa_defconfig | 1 + configs/mx6sabreauto_defconfig | 2 - configs/mx6sabresd_defconfig | 4 - drivers/crypto/fsl/Kconfig | 3 +- drivers/crypto/fsl/jr.c | 374 ++++++++++++------ drivers/crypto/fsl/jr.h | 31 +- include/fsl_sec.h | 12 +- scripts/config_whitelist.txt | 1 + 158 files changed, 1432 insertions(+), 255 deletions(-) create mode 100644 arch/powerpc/dts/qoriq-sec4.0-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec4.2-0.dtsi create mode 100644 arch/powerpc/dts/qoriq-sec5.2-0.dtsi create mode 100644 arch/powerpc/include/asm/u-boot-ppc.h--
2.17.1