All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
@ 2019-12-13 15:39 ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: horia.geanta, Adam Ford, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Catalin Marinas, Will Deacon, Aymen Sghaier,
	Herbert Xu, David S. Miller, devicetree, linux-kernel,
	linux-crypto

The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
the driver is restricting the check to just the i.MX8MQ.

This patch expands the check for either i.MX8MQ or i.MX8MM.

Signed-off-by: Adam Ford <aford173@gmail.com>

---
V2:  Expand the check that forces the setting on imx8mq to also be true for imx8mm
     Explictly state imx8mm compatiblity instead of making it generic to all imx8m*
      this is mostly due to lack of other hardware to test

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index d7c3c3805693..c01dda692ecc 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -102,7 +102,8 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
 	     * Apparently on i.MX8MQ it doesn't matter if virt_en == 1
 	     * and the following steps should be performed regardless
 	     */
-	    of_machine_is_compatible("fsl,imx8mq")) {
+	    of_machine_is_compatible("fsl,imx8mq") ||
+	    of_machine_is_compatible("fsl,imx8mm")) {
 		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);
 
 		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
@@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = {
 	{ .soc_id = "i.MX6*",  .data = &caam_imx6_data },
 	{ .soc_id = "i.MX7*",  .data = &caam_imx7_data },
 	{ .soc_id = "i.MX8MQ", .data = &caam_imx7_data },
+	{ .soc_id = "i.MX8MM", .data = &caam_imx7_data },
 	{ .family = "Freescale i.MX" },
 	{ /* sentinel */ }
 };
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
@ 2019-12-13 15:39 ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aymen Sghaier, Fabio Estevam, Herbert Xu,
	horia.geanta, devicetree, Adam Ford, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Catalin Marinas, Shawn Guo,
	David S. Miller, linux-crypto

The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
the driver is restricting the check to just the i.MX8MQ.

This patch expands the check for either i.MX8MQ or i.MX8MM.

Signed-off-by: Adam Ford <aford173@gmail.com>

---
V2:  Expand the check that forces the setting on imx8mq to also be true for imx8mm
     Explictly state imx8mm compatiblity instead of making it generic to all imx8m*
      this is mostly due to lack of other hardware to test

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index d7c3c3805693..c01dda692ecc 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -102,7 +102,8 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
 	     * Apparently on i.MX8MQ it doesn't matter if virt_en == 1
 	     * and the following steps should be performed regardless
 	     */
-	    of_machine_is_compatible("fsl,imx8mq")) {
+	    of_machine_is_compatible("fsl,imx8mq") ||
+	    of_machine_is_compatible("fsl,imx8mm")) {
 		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);
 
 		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
@@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = {
 	{ .soc_id = "i.MX6*",  .data = &caam_imx6_data },
 	{ .soc_id = "i.MX7*",  .data = &caam_imx7_data },
 	{ .soc_id = "i.MX8MQ", .data = &caam_imx7_data },
+	{ .soc_id = "i.MX8MM", .data = &caam_imx7_data },
 	{ .family = "Freescale i.MX" },
 	{ /* sentinel */ }
 };
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH V2 2/3] arm64: dts: imx8mm: Add Crypto CAAM support
  2019-12-13 15:39 ` Adam Ford
@ 2019-12-13 15:39   ` Adam Ford
  -1 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: horia.geanta, Adam Ford, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Catalin Marinas, Will Deacon, Aymen Sghaier,
	Herbert Xu, David S. Miller, devicetree, linux-kernel,
	linux-crypto

The i.MX8M Mini supports the same crypto engine as what is in
the i.MX8MQ, but it is not currently present in the device tree.

This patch places in into the device tree.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  Don't disable it by default

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 860cddec9632..1f0178078572 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -726,6 +726,36 @@
 				status = "disabled";
 			};
 
+			crypto: crypto@30900000 {
+				compatible = "fsl,sec-v4.0";
+				#address-cells = <1>;
+				#size-cells = <1>;
+				reg = <0x30900000 0x40000>;
+				ranges = <0 0x30900000 0x40000>;
+				interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MM_CLK_AHB>,
+					 <&clk IMX8MM_CLK_IPG_ROOT>;
+				clock-names = "aclk", "ipg";
+
+				sec_jr0: jr@1000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x1000 0x1000>;
+					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				sec_jr1: jr@2000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x2000 0x1000>;
+					interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				sec_jr2: jr@3000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x3000 0x1000>;
+					interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+				};
+			};
+
 			i2c1: i2c@30a20000 {
 				compatible = "fsl,imx8mm-i2c", "fsl,imx21-i2c";
 				#address-cells = <1>;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH V2 2/3] arm64: dts: imx8mm: Add Crypto CAAM support
@ 2019-12-13 15:39   ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aymen Sghaier, Fabio Estevam, Herbert Xu,
	horia.geanta, devicetree, Adam Ford, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Catalin Marinas, Shawn Guo,
	David S. Miller, linux-crypto

The i.MX8M Mini supports the same crypto engine as what is in
the i.MX8MQ, but it is not currently present in the device tree.

This patch places in into the device tree.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  Don't disable it by default

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 860cddec9632..1f0178078572 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -726,6 +726,36 @@
 				status = "disabled";
 			};
 
+			crypto: crypto@30900000 {
+				compatible = "fsl,sec-v4.0";
+				#address-cells = <1>;
+				#size-cells = <1>;
+				reg = <0x30900000 0x40000>;
+				ranges = <0 0x30900000 0x40000>;
+				interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>;
+				clocks = <&clk IMX8MM_CLK_AHB>,
+					 <&clk IMX8MM_CLK_IPG_ROOT>;
+				clock-names = "aclk", "ipg";
+
+				sec_jr0: jr@1000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x1000 0x1000>;
+					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				sec_jr1: jr@2000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x2000 0x1000>;
+					interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
+				};
+
+				sec_jr2: jr@3000 {
+					compatible = "fsl,sec-v4.0-job-ring";
+					reg = <0x3000 0x1000>;
+					interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
+				};
+			};
+
 			i2c1: i2c@30a20000 {
 				compatible = "fsl,imx8mm-i2c", "fsl,imx21-i2c";
 				#address-cells = <1>;
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-13 15:39 ` Adam Ford
@ 2019-12-13 15:39   ` Adam Ford
  -1 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: horia.geanta, Adam Ford, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Catalin Marinas, Will Deacon, Aymen Sghaier,
	Herbert Xu, David S. Miller, devicetree, linux-kernel,
	linux-crypto

Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
is currently not enabled by default.

This patch enables this driver by default.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  New to series

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 6a83ba2aea3e..0212975b908b 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -845,6 +845,7 @@ CONFIG_SECURITY=y
 CONFIG_CRYPTO_ECHAINIV=y
 CONFIG_CRYPTO_ANSI_CPRNG=y
 CONFIG_CRYPTO_DEV_SUN8I_CE=m
+CONFIG_CRYPTO_DEV_FSL_CAAM=y
 CONFIG_CRYPTO_DEV_HISI_ZIP=m
 CONFIG_CMA_SIZE_MBYTES=32
 CONFIG_PRINTK_TIME=y
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-13 15:39   ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-13 15:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Mark Rutland, Aymen Sghaier, Fabio Estevam, Herbert Xu,
	horia.geanta, devicetree, Adam Ford, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, NXP Linux Team,
	Pengutronix Kernel Team, Catalin Marinas, Shawn Guo,
	David S. Miller, linux-crypto

Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
is currently not enabled by default.

This patch enables this driver by default.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
V2:  New to series

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 6a83ba2aea3e..0212975b908b 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -845,6 +845,7 @@ CONFIG_SECURITY=y
 CONFIG_CRYPTO_ECHAINIV=y
 CONFIG_CRYPTO_ANSI_CPRNG=y
 CONFIG_CRYPTO_DEV_SUN8I_CE=m
+CONFIG_CRYPTO_DEV_FSL_CAAM=y
 CONFIG_CRYPTO_DEV_HISI_ZIP=m
 CONFIG_CMA_SIZE_MBYTES=32
 CONFIG_PRINTK_TIME=y
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
  2019-12-13 15:39 ` Adam Ford
@ 2019-12-16 15:15   ` Iuliana Prodan
  -1 siblings, 0 replies; 22+ messages in thread
From: Iuliana Prodan @ 2019-12-16 15:15 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Horia Geanta, Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
> the driver is restricting the check to just the i.MX8MQ.
> 
> This patch expands the check for either i.MX8MQ or i.MX8MM.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 

For the series:

Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>

> ---
> V2:  Expand the check that forces the setting on imx8mq to also be true for imx8mm
>       Explictly state imx8mm compatiblity instead of making it generic to all imx8m*
>        this is mostly due to lack of other hardware to test
> 
> diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
> index d7c3c3805693..c01dda692ecc 100644
> --- a/drivers/crypto/caam/ctrl.c
> +++ b/drivers/crypto/caam/ctrl.c
> @@ -102,7 +102,8 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
>   	     * Apparently on i.MX8MQ it doesn't matter if virt_en == 1
>   	     * and the following steps should be performed regardless
>   	     */
> -	    of_machine_is_compatible("fsl,imx8mq")) {
> +	    of_machine_is_compatible("fsl,imx8mq") ||
> +	    of_machine_is_compatible("fsl,imx8mm")) {
>   		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);
>   
>   		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
> @@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = {
>   	{ .soc_id = "i.MX6*",  .data = &caam_imx6_data },
>   	{ .soc_id = "i.MX7*",  .data = &caam_imx7_data },
>   	{ .soc_id = "i.MX8MQ", .data = &caam_imx7_data },
> +	{ .soc_id = "i.MX8MM", .data = &caam_imx7_data },
>   	{ .family = "Freescale i.MX" },
>   	{ /* sentinel */ }
>   };
> 


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
@ 2019-12-16 15:15   ` Iuliana Prodan
  0 siblings, 0 replies; 22+ messages in thread
From: Iuliana Prodan @ 2019-12-16 15:15 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu,
	Horia Geanta, Fabio Estevam, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Catalin Marinas, Shawn Guo, David S. Miller, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
> the driver is restricting the check to just the i.MX8MQ.
> 
> This patch expands the check for either i.MX8MQ or i.MX8MM.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 

For the series:

Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>

> ---
> V2:  Expand the check that forces the setting on imx8mq to also be true for imx8mm
>       Explictly state imx8mm compatiblity instead of making it generic to all imx8m*
>        this is mostly due to lack of other hardware to test
> 
> diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
> index d7c3c3805693..c01dda692ecc 100644
> --- a/drivers/crypto/caam/ctrl.c
> +++ b/drivers/crypto/caam/ctrl.c
> @@ -102,7 +102,8 @@ static inline int run_descriptor_deco0(struct device *ctrldev, u32 *desc,
>   	     * Apparently on i.MX8MQ it doesn't matter if virt_en == 1
>   	     * and the following steps should be performed regardless
>   	     */
> -	    of_machine_is_compatible("fsl,imx8mq")) {
> +	    of_machine_is_compatible("fsl,imx8mq") ||
> +	    of_machine_is_compatible("fsl,imx8mm")) {
>   		clrsetbits_32(&ctrl->deco_rsr, 0, DECORSR_JR0);
>   
>   		while (!(rd_reg32(&ctrl->deco_rsr) & DECORSR_VALID) &&
> @@ -509,6 +510,7 @@ static const struct soc_device_attribute caam_imx_soc_table[] = {
>   	{ .soc_id = "i.MX6*",  .data = &caam_imx6_data },
>   	{ .soc_id = "i.MX7*",  .data = &caam_imx7_data },
>   	{ .soc_id = "i.MX8MQ", .data = &caam_imx7_data },
> +	{ .soc_id = "i.MX8MM", .data = &caam_imx7_data },
>   	{ .family = "Freescale i.MX" },
>   	{ /* sentinel */ }
>   };
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-13 15:39   ` Adam Ford
@ 2019-12-17  9:11     ` Horia Geanta
  -1 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17  9:11 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
So do the Layerscape ARMv8-based SoCs:
LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A

> is currently not enabled by default.
> 
> This patch enables this driver by default.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2:  New to series
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 6a83ba2aea3e..0212975b908b 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
>  CONFIG_CRYPTO_ECHAINIV=y
>  CONFIG_CRYPTO_ANSI_CPRNG=y
>  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> +CONFIG_CRYPTO_DEV_FSL_CAAM=y
This should probably be "m" instead.

Horia

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-17  9:11     ` Horia Geanta
  0 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17  9:11 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu, Will Deacon,
	Shawn Guo, Sascha Hauer, linux-kernel, Rob Herring, dl-linux-imx,
	Pengutronix Kernel Team, Catalin Marinas, Fabio Estevam,
	David S. Miller, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
So do the Layerscape ARMv8-based SoCs:
LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A

> is currently not enabled by default.
> 
> This patch enables this driver by default.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> ---
> V2:  New to series
> 
> diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> index 6a83ba2aea3e..0212975b908b 100644
> --- a/arch/arm64/configs/defconfig
> +++ b/arch/arm64/configs/defconfig
> @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
>  CONFIG_CRYPTO_ECHAINIV=y
>  CONFIG_CRYPTO_ANSI_CPRNG=y
>  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> +CONFIG_CRYPTO_DEV_FSL_CAAM=y
This should probably be "m" instead.

Horia

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 2/3] arm64: dts: imx8mm: Add Crypto CAAM support
  2019-12-13 15:39   ` Adam Ford
@ 2019-12-17  9:54     ` Horia Geanta
  -1 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17  9:54 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini supports the same crypto engine as what is in
> the i.MX8MQ, but it is not currently present in the device tree.
> 
> This patch places in into the device tree.
		    ^ it
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 2/3] arm64: dts: imx8mm: Add Crypto CAAM support
@ 2019-12-17  9:54     ` Horia Geanta
  0 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17  9:54 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu, Will Deacon,
	Shawn Guo, Sascha Hauer, linux-kernel, Rob Herring, dl-linux-imx,
	Pengutronix Kernel Team, Catalin Marinas, Fabio Estevam,
	David S. Miller, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini supports the same crypto engine as what is in
> the i.MX8MQ, but it is not currently present in the device tree.
> 
> This patch places in into the device tree.
		    ^ it
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
  2019-12-13 15:39 ` Adam Ford
@ 2019-12-17 10:05   ` Horia Geanta
  -1 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17 10:05 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Rob Herring, Mark Rutland, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
> the driver is restricting the check to just the i.MX8MQ.
> 
> This patch expands the check for either i.MX8MQ or i.MX8MM.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini
@ 2019-12-17 10:05   ` Horia Geanta
  0 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-17 10:05 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu, Will Deacon,
	Shawn Guo, Sascha Hauer, linux-kernel, Rob Herring, dl-linux-imx,
	Pengutronix Kernel Team, Catalin Marinas, Fabio Estevam,
	David S. Miller, linux-crypto

On 12/13/2019 5:39 PM, Adam Ford wrote:
> The i.MX8M Mini uses the same crypto engine as the i.MX8MQ, but
> the driver is restricting the check to just the i.MX8MQ.
> 
> This patch expands the check for either i.MX8MQ or i.MX8MM.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-17  9:11     ` Horia Geanta
@ 2019-12-17 13:07       ` Adam Ford
  -1 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-17 13:07 UTC (permalink / raw)
  To: Horia Geanta
  Cc: linux-arm-kernel, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, Catalin Marinas, Will Deacon, Aymen Sghaier,
	Herbert Xu, David S. Miller, devicetree, linux-kernel,
	linux-crypto

On Tue, Dec 17, 2019 at 3:11 AM Horia Geanta <horia.geanta@nxp.com> wrote:
>
> On 12/13/2019 5:39 PM, Adam Ford wrote:
> > Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
> So do the Layerscape ARMv8-based SoCs:
> LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A
>
> > is currently not enabled by default.
> >
> > This patch enables this driver by default.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V2:  New to series
> >
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 6a83ba2aea3e..0212975b908b 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
> >  CONFIG_CRYPTO_ECHAINIV=y
> >  CONFIG_CRYPTO_ANSI_CPRNG=y
> >  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> > +CONFIG_CRYPTO_DEV_FSL_CAAM=y
> This should probably be "m" instead.

Out of curiosity, what is the rule for when things are 'm' vs 'y'?

In the Code Aurora repo, it is set to 'y' and the mainline kernel for
the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
used 'y' here.

I can do a V3 to address the other items you noted, but I want to
understand the rules about the defconfig so I don't make the same
mistake again.

thanks,

adam
>
> Horia

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-17 13:07       ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-17 13:07 UTC (permalink / raw)
  To: Horia Geanta
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu, Will Deacon,
	Fabio Estevam, Sascha Hauer, linux-kernel, Rob Herring,
	dl-linux-imx, Pengutronix Kernel Team, Catalin Marinas,
	Shawn Guo, David S. Miller, linux-arm-kernel, linux-crypto

On Tue, Dec 17, 2019 at 3:11 AM Horia Geanta <horia.geanta@nxp.com> wrote:
>
> On 12/13/2019 5:39 PM, Adam Ford wrote:
> > Both the i.MX8MQ and i.MX8M Mini support the CAAM driver, but it
> So do the Layerscape ARMv8-based SoCs:
> LS1012A, LS1028A, LS1043A, LS1046A, LS1088A, LS2088A, LX2160A
>
> > is currently not enabled by default.
> >
> > This patch enables this driver by default.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> > ---
> > V2:  New to series
> >
> > diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
> > index 6a83ba2aea3e..0212975b908b 100644
> > --- a/arch/arm64/configs/defconfig
> > +++ b/arch/arm64/configs/defconfig
> > @@ -845,6 +845,7 @@ CONFIG_SECURITY=y
> >  CONFIG_CRYPTO_ECHAINIV=y
> >  CONFIG_CRYPTO_ANSI_CPRNG=y
> >  CONFIG_CRYPTO_DEV_SUN8I_CE=m
> > +CONFIG_CRYPTO_DEV_FSL_CAAM=y
> This should probably be "m" instead.

Out of curiosity, what is the rule for when things are 'm' vs 'y'?

In the Code Aurora repo, it is set to 'y' and the mainline kernel for
the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
used 'y' here.

I can do a V3 to address the other items you noted, but I want to
understand the rules about the defconfig so I don't make the same
mistake again.

thanks,

adam
>
> Horia

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-17 13:07       ` Adam Ford
@ 2019-12-17 18:25         ` Fabio Estevam
  -1 siblings, 0 replies; 22+ messages in thread
From: Fabio Estevam @ 2019-12-17 18:25 UTC (permalink / raw)
  To: Adam Ford
  Cc: Horia Geanta, linux-arm-kernel, Rob Herring, Mark Rutland,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

Hi Adam,

On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:

> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>
> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> used 'y' here.
>
> I can do a V3 to address the other items you noted, but I want to
> understand the rules about the defconfig so I don't make the same
> mistake again.

In arch/arm64/configs/defconfig we try to select modules whenever possible.

The exceptions are drivers that are vital for boot such as PMIC,
pinctrl, clks, etc.

The CAAM driver does not fall into this category, so selecting it as
module is preferred here.

Thanks

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-17 18:25         ` Fabio Estevam
  0 siblings, 0 replies; 22+ messages in thread
From: Fabio Estevam @ 2019-12-17 18:25 UTC (permalink / raw)
  To: Adam Ford
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu,
	Horia Geanta, Catalin Marinas, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Shawn Guo, David S. Miller, linux-arm-kernel, linux-crypto

Hi Adam,

On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:

> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>
> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> used 'y' here.
>
> I can do a V3 to address the other items you noted, but I want to
> understand the rules about the defconfig so I don't make the same
> mistake again.

In arch/arm64/configs/defconfig we try to select modules whenever possible.

The exceptions are drivers that are vital for boot such as PMIC,
pinctrl, clks, etc.

The CAAM driver does not fall into this category, so selecting it as
module is preferred here.

Thanks

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-17 18:25         ` Fabio Estevam
@ 2019-12-18 13:05           ` Adam Ford
  -1 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-18 13:05 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Horia Geanta, linux-arm-kernel, Rob Herring, Mark Rutland,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto

On Tue, Dec 17, 2019 at 12:25 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Adam,
>
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
>
> > Out of curiosity, what is the rule for when things are 'm' vs 'y'?
> >
> > In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> > the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> > used 'y' here.
> >
> > I can do a V3 to address the other items you noted, but I want to
> > understand the rules about the defconfig so I don't make the same
> > mistake again.
>
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
>
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
>
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.

That makes sense.  Thank you for the clarification.  I'll keep that in
mind if I submit future updates.

adam
>
> Thanks

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-18 13:05           ` Adam Ford
  0 siblings, 0 replies; 22+ messages in thread
From: Adam Ford @ 2019-12-18 13:05 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Herbert Xu,
	Horia Geanta, Catalin Marinas, Sascha Hauer, linux-kernel,
	Will Deacon, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Shawn Guo, David S. Miller, linux-arm-kernel, linux-crypto

On Tue, Dec 17, 2019 at 12:25 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Adam,
>
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
>
> > Out of curiosity, what is the rule for when things are 'm' vs 'y'?
> >
> > In the Code Aurora repo, it is set to 'y' and the mainline kernel for
> > the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
> > used 'y' here.
> >
> > I can do a V3 to address the other items you noted, but I want to
> > understand the rules about the defconfig so I don't make the same
> > mistake again.
>
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
>
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
>
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.

That makes sense.  Thank you for the clarification.  I'll keep that in
mind if I submit future updates.

adam
>
> Thanks

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
  2019-12-17 18:25         ` Fabio Estevam
@ 2019-12-20  8:07           ` Horia Geanta
  -1 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-20  8:07 UTC (permalink / raw)
  To: Fabio Estevam, Adam Ford
  Cc: linux-arm-kernel, Rob Herring, Mark Rutland, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, dl-linux-imx,
	Catalin Marinas, Will Deacon, Aymen Sghaier, Herbert Xu,
	David S. Miller, devicetree, linux-kernel, linux-crypto,
	Theodore Ts'o

On 12/17/2019 8:25 PM, Fabio Estevam wrote:
> Hi Adam,
> 
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
> 
>> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>>
>> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
>> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
>> used 'y' here.
>>
>> I can do a V3 to address the other items you noted, but I want to
>> understand the rules about the defconfig so I don't make the same
>> mistake again.
> 
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
> 
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
> 
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.
> 
One comment here though.

CAAM's RNG is not "vital" for booting, but IIUC it would decrease the boot time
since it feeds the entropy pool through the hwrng interface.

Once RNG driver is fixed, would it be acceptable to add:
CONFIG_HW_RANDOM=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
in arm64 defconfig?

Thanks,
Horia


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM
@ 2019-12-20  8:07           ` Horia Geanta
  0 siblings, 0 replies; 22+ messages in thread
From: Horia Geanta @ 2019-12-20  8:07 UTC (permalink / raw)
  To: Fabio Estevam, Adam Ford
  Cc: Mark Rutland, devicetree, Aymen Sghaier, Theodore Ts'o,
	Herbert Xu, Will Deacon, Catalin Marinas, Sascha Hauer,
	linux-kernel, Rob Herring, dl-linux-imx, Pengutronix Kernel Team,
	Shawn Guo, David S. Miller, linux-arm-kernel, linux-crypto

On 12/17/2019 8:25 PM, Fabio Estevam wrote:
> Hi Adam,
> 
> On Tue, Dec 17, 2019 at 10:07 AM Adam Ford <aford173@gmail.com> wrote:
> 
>> Out of curiosity, what is the rule for when things are 'm' vs 'y'?
>>
>> In the Code Aurora repo, it is set to 'y' and the mainline kernel for
>> the i.MX6/7, the imx_v6_v7_defconfig is also set to 'y' which is why I
>> used 'y' here.
>>
>> I can do a V3 to address the other items you noted, but I want to
>> understand the rules about the defconfig so I don't make the same
>> mistake again.
> 
> In arch/arm64/configs/defconfig we try to select modules whenever possible.
> 
> The exceptions are drivers that are vital for boot such as PMIC,
> pinctrl, clks, etc.
> 
> The CAAM driver does not fall into this category, so selecting it as
> module is preferred here.
> 
One comment here though.

CAAM's RNG is not "vital" for booting, but IIUC it would decrease the boot time
since it feeds the entropy pool through the hwrng interface.

Once RNG driver is fixed, would it be acceptable to add:
CONFIG_HW_RANDOM=y
CONFIG_CRYPTO_DEV_FSL_CAAM=y
in arm64 defconfig?

Thanks,
Horia


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-12-20  8:07 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13 15:39 [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini Adam Ford
2019-12-13 15:39 ` Adam Ford
2019-12-13 15:39 ` [PATCH V2 2/3] arm64: dts: imx8mm: Add Crypto CAAM support Adam Ford
2019-12-13 15:39   ` Adam Ford
2019-12-17  9:54   ` Horia Geanta
2019-12-17  9:54     ` Horia Geanta
2019-12-13 15:39 ` [PATCH V2 3/3] arm64: defconfig: Enable CRYPTO_DEV_FSL_CAAM Adam Ford
2019-12-13 15:39   ` Adam Ford
2019-12-17  9:11   ` Horia Geanta
2019-12-17  9:11     ` Horia Geanta
2019-12-17 13:07     ` Adam Ford
2019-12-17 13:07       ` Adam Ford
2019-12-17 18:25       ` Fabio Estevam
2019-12-17 18:25         ` Fabio Estevam
2019-12-18 13:05         ` Adam Ford
2019-12-18 13:05           ` Adam Ford
2019-12-20  8:07         ` Horia Geanta
2019-12-20  8:07           ` Horia Geanta
2019-12-16 15:15 ` [PATCH V2 1/3] crypto: caam: Add support for i.MX8M Mini Iuliana Prodan
2019-12-16 15:15   ` Iuliana Prodan
2019-12-17 10:05 ` Horia Geanta
2019-12-17 10:05   ` Horia Geanta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.