All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
@ 2022-06-08 17:02 Fabio Estevam
  2022-06-10 12:22 ` ZHIZHIKIN Andrey
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabio Estevam @ 2022-06-08 17:02 UTC (permalink / raw)
  To: shawnguo
  Cc: linux-arm-kernel, andrey.zhizhikin, linux-imx, kernel,
	gaurav.jain, Fabio Estevam

Now that the JR0 reservation is done in both upstream (v2.7) and
downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize
the job ring 0:

 # dmesg | grep jr
caam_jr 30901000.jr: failed to flush job ring 0
caam_jr: probe of 30901000.jr failed with error -5

Disable the sec_jr0 nodes by default to avoid the caam_jr probe error.

Suggested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
 arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 +
 4 files changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
index 1bf070473829..8049a16d6027 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
@@ -911,6 +911,7 @@ sec_jr0: jr@1000 {
 					compatible = "fsl,sec-v4.0-job-ring";
 					reg = <0x1000 0x1000>;
 					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+					status = "disabled";
 				};
 
 				sec_jr1: jr@2000 {
diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
index e41e1d56f980..fdfcc75a80e8 100644
--- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
@@ -857,6 +857,7 @@ sec_jr0: jr@1000 {
 					 compatible = "fsl,sec-v4.0-job-ring";
 					 reg = <0x1000 0x1000>;
 					 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+					 status = "disabled";
 				};
 
 				sec_jr1: jr@2000 {
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index d9542dfff83f..c560d867fb6e 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -791,6 +791,7 @@ sec_jr0: jr@1000 {
 					compatible = "fsl,sec-v4.0-job-ring";
 					reg = <0x1000 0x1000>;
 					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+					status = "disabled";
 				};
 
 				sec_jr1: jr@2000 {
diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
index 49eadb081b19..4338d82a28de 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
@@ -1018,6 +1018,7 @@ sec_jr0: jr@1000 {
 					compatible = "fsl,sec-v4.0-job-ring";
 					reg = <0x1000 0x1000>;
 					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+					status = "disabled";
 				};
 
 				sec_jr1: jr@2000 {
-- 
2.25.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] 5+ messages in thread

* RE: [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
  2022-06-08 17:02 [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes Fabio Estevam
@ 2022-06-10 12:22 ` ZHIZHIKIN Andrey
  2022-06-10 14:52 ` [EXT] " Gaurav Jain
  2022-06-19  6:06 ` Shawn Guo
  2 siblings, 0 replies; 5+ messages in thread
From: ZHIZHIKIN Andrey @ 2022-06-10 12:22 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: linux-arm-kernel, linux-imx, kernel, gaurav.jain, l.stach,
	Michael Walle, Rouven Czerwinski

Hello Fabio,

As I can see, this is a continuation of the series that I've
posted a while ago [1], so I would also Cc: people that
expressed their concerns regarding this change, specifically
Rouven.

> -----Original Message-----
> From: Fabio Estevam <festevam@denx.de>
> Sent: Wednesday, June 8, 2022 7:02 PM
> To: shawnguo@kernel.org
> Cc: linux-arm-kernel@lists.infradead.org; ZHIZHIKIN Andrey
> <andrey.zhizhikin@leica-geosystems.com>; linux-imx@nxp.com;
> kernel@pengutronix.de; gaurav.jain@nxp.com; Fabio Estevam <festevam@denx.de>
> Subject: [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
> 
> Now that the JR0 reservation is done in both upstream (v2.7) and
> downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize
> the job ring 0:
> 
>  # dmesg | grep jr
> caam_jr 30901000.jr: failed to flush job ring 0
> caam_jr: probe of 30901000.jr failed with error -5
> 
> Disable the sec_jr0 nodes by default to avoid the caam_jr probe error.
> 
> Suggested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 +
>  4 files changed, 4 insertions(+)

Now, that both U-Boot gained HAB support for i.MX8M series [2],
and TF-A have a JR0 reservation per default [3], I see no
objections this reservation to be made in Kernel DTBs.

With that said,

Reviewed-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>

> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index 1bf070473829..8049a16d6027 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -911,6 +911,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105
> IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index e41e1d56f980..fdfcc75a80e8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -857,6 +857,7 @@ sec_jr0: jr@1000 {
>                                          compatible = "fsl,sec-v4.0-job-ring";
>                                          reg = <0x1000 0x1000>;
>                                          interrupts = <GIC_SPI 105
> IRQ_TYPE_LEVEL_HIGH>;
> +                                        status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index d9542dfff83f..c560d867fb6e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -791,6 +791,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105
> IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 49eadb081b19..4338d82a28de 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -1018,6 +1018,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105
> IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 {
> --
> 2.25.1

-- andrey

Link: [1]: https://lore.kernel.org/lkml/20211207230206.14637-3-andrey.zhizhikin@leica-geosystems.com/
Link: [2]: https://lore.kernel.org/u-boot/20220324062038.2187-1-gaurav.jain@nxp.com/
Link: [3]: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/plat/imx/imx8m/imx8m_caam.c?id=77850c96f23bcdc76ecb0ecd27a982c00fde5d9d

_______________________________________________
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] 5+ messages in thread

* RE: [EXT] [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
  2022-06-08 17:02 [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes Fabio Estevam
  2022-06-10 12:22 ` ZHIZHIKIN Andrey
@ 2022-06-10 14:52 ` Gaurav Jain
  2022-06-19  6:06 ` Shawn Guo
  2 siblings, 0 replies; 5+ messages in thread
From: Gaurav Jain @ 2022-06-10 14:52 UTC (permalink / raw)
  To: Fabio Estevam, shawnguo
  Cc: linux-arm-kernel, andrey.zhizhikin, dl-linux-imx, kernel

Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>

> -----Original Message-----
> From: Fabio Estevam <festevam@denx.de>
> Sent: Wednesday, June 8, 2022 10:32 PM
> To: shawnguo@kernel.org
> Cc: linux-arm-kernel@lists.infradead.org; andrey.zhizhikin@leica-
> geosystems.com; dl-linux-imx <linux-imx@nxp.com>; kernel@pengutronix.de;
> Gaurav Jain <gaurav.jain@nxp.com>; Fabio Estevam <festevam@denx.de>
> Subject: [EXT] [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
> 
> Caution: EXT Email
> 
> Now that the JR0 reservation is done in both upstream (v2.7) and downstream
> (NXP lf_v2.4) TF-A versions, the kernel fails to initialize the job ring 0:
> 
>  # dmesg | grep jr
> caam_jr 30901000.jr: failed to flush job ring 0
> caam_jr: probe of 30901000.jr failed with error -5
> 
> Disable the sec_jr0 nodes by default to avoid the caam_jr probe error.
> 
> Suggested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 +
> arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
> arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
> arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index 1bf070473829..8049a16d6027 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -911,6 +911,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 { diff --git
> a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index e41e1d56f980..fdfcc75a80e8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -857,6 +857,7 @@ sec_jr0: jr@1000 {
>                                          compatible = "fsl,sec-v4.0-job-ring";
>                                          reg = <0x1000 0x1000>;
>                                          interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +                                        status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 { diff --git
> a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index d9542dfff83f..c560d867fb6e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -791,6 +791,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 { diff --git
> a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 49eadb081b19..4338d82a28de 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -1018,6 +1018,7 @@ sec_jr0: jr@1000 {
>                                         compatible = "fsl,sec-v4.0-job-ring";
>                                         reg = <0x1000 0x1000>;
>                                         interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +                                       status = "disabled";
>                                 };
> 
>                                 sec_jr1: jr@2000 {
> --
> 2.25.1


_______________________________________________
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] 5+ messages in thread

* Re: [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
  2022-06-08 17:02 [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes Fabio Estevam
  2022-06-10 12:22 ` ZHIZHIKIN Andrey
  2022-06-10 14:52 ` [EXT] " Gaurav Jain
@ 2022-06-19  6:06 ` Shawn Guo
  2022-06-19  6:52   ` Shawn Guo
  2 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2022-06-19  6:06 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-arm-kernel, andrey.zhizhikin, linux-imx, kernel, gaurav.jain

On Wed, Jun 08, 2022 at 02:02:23PM -0300, Fabio Estevam wrote:
> Now that the JR0 reservation is done in both upstream (v2.7) and
> downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize
> the job ring 0:
> 
>  # dmesg | grep jr
> caam_jr 30901000.jr: failed to flush job ring 0
> caam_jr: probe of 30901000.jr failed with error -5
> 
> Disable the sec_jr0 nodes by default to avoid the caam_jr probe error.

Shouldn't caam_jr driver be fixed to cooperate with the new TF-A?

Shawn

> 
> Suggested-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  arch/arm64/boot/dts/freescale/imx8mm.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mn.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mp.dtsi | 1 +
>  arch/arm64/boot/dts/freescale/imx8mq.dtsi | 1 +
>  4 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> index 1bf070473829..8049a16d6027 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi
> @@ -911,6 +911,7 @@ sec_jr0: jr@1000 {
>  					compatible = "fsl,sec-v4.0-job-ring";
>  					reg = <0x1000 0x1000>;
>  					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +					status = "disabled";
>  				};
>  
>  				sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mn.dtsi b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> index e41e1d56f980..fdfcc75a80e8 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mn.dtsi
> @@ -857,6 +857,7 @@ sec_jr0: jr@1000 {
>  					 compatible = "fsl,sec-v4.0-job-ring";
>  					 reg = <0x1000 0x1000>;
>  					 interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +					 status = "disabled";
>  				};
>  
>  				sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> index d9542dfff83f..c560d867fb6e 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
> @@ -791,6 +791,7 @@ sec_jr0: jr@1000 {
>  					compatible = "fsl,sec-v4.0-job-ring";
>  					reg = <0x1000 0x1000>;
>  					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +					status = "disabled";
>  				};
>  
>  				sec_jr1: jr@2000 {
> diff --git a/arch/arm64/boot/dts/freescale/imx8mq.dtsi b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> index 49eadb081b19..4338d82a28de 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx8mq.dtsi
> @@ -1018,6 +1018,7 @@ sec_jr0: jr@1000 {
>  					compatible = "fsl,sec-v4.0-job-ring";
>  					reg = <0x1000 0x1000>;
>  					interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +					status = "disabled";
>  				};
>  
>  				sec_jr1: jr@2000 {
> -- 
> 2.25.1
> 

_______________________________________________
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] 5+ messages in thread

* Re: [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes
  2022-06-19  6:06 ` Shawn Guo
@ 2022-06-19  6:52   ` Shawn Guo
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2022-06-19  6:52 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-arm-kernel, andrey.zhizhikin, NXP Linux Team, Sascha Hauer,
	gaurav.jain

On Sun, Jun 19, 2022 at 2:07 PM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Wed, Jun 08, 2022 at 02:02:23PM -0300, Fabio Estevam wrote:
> > Now that the JR0 reservation is done in both upstream (v2.7) and
> > downstream (NXP lf_v2.4) TF-A versions, the kernel fails to initialize
> > the job ring 0:
> >
> >  # dmesg | grep jr
> > caam_jr 30901000.jr: failed to flush job ring 0
> > caam_jr: probe of 30901000.jr failed with error -5
> >
> > Disable the sec_jr0 nodes by default to avoid the caam_jr probe error.
>
> Shouldn't caam_jr driver be fixed to cooperate with the new TF-A?

Never mind.  I just went through the discussion pointed out by Andrey.

Patch is applied, thanks!

Shawn

_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2022-06-19  6:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 17:02 [PATCH] arm64: dts: imx8m: Disable job ring 0 nodes Fabio Estevam
2022-06-10 12:22 ` ZHIZHIKIN Andrey
2022-06-10 14:52 ` [EXT] " Gaurav Jain
2022-06-19  6:06 ` Shawn Guo
2022-06-19  6:52   ` Shawn Guo

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.