devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC
@ 2018-06-22 18:45 Fabio Estevam
  2018-06-22 18:45 ` [PATCH v2 2/2] crypto: sahara - Add i.MX51 entry Fabio Estevam
  2018-06-25 20:21 ` [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Rob Herring
  0 siblings, 2 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-06-22 18:45 UTC (permalink / raw)
  To: herbert; +Cc: robh+dt, linux-crypto, devicetree, horia.geanta, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

i.MX51 and i.MX53 share the same sahara IP block version, so add
i.MX51 in the list of supported SoCs.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- Fix typo in commit log "i.MX51 and i.MX53"

 Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
index e8a35c7..5343a48 100644
--- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
+++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
@@ -1,8 +1,9 @@
 Freescale SAHARA Cryptographic Accelerator included in some i.MX chips.
-Currently only i.MX27 and i.MX53 are supported.
+Currently i.MX27, i.MX51 and i.MX53 are supported.
 
 Required properties:
-- compatible : Should be "fsl,<soc>-sahara"
+- compatible : Should be "fsl,imx27-sahara", "fsl,imx51-sahara"
+or "fsl,imx53-sahara"
 - reg : Should contain SAHARA registers location and length
 - interrupts : Should contain SAHARA interrupt number
 
-- 
2.7.4

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

* [PATCH v2 2/2] crypto: sahara - Add i.MX51 entry
  2018-06-22 18:45 [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Fabio Estevam
@ 2018-06-22 18:45 ` Fabio Estevam
  2018-06-25 20:21 ` [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Rob Herring
  1 sibling, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-06-22 18:45 UTC (permalink / raw)
  To: herbert; +Cc: robh+dt, linux-crypto, devicetree, horia.geanta, Fabio Estevam

From: Fabio Estevam <fabio.estevam@nxp.com>

i.MX51 and i.MX53 share the same sahara IP block version, so add
i.MX51 in the compatible list.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- Fix typo in commit log "i.MX51 and i.MX53"

 drivers/crypto/sahara.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 0f2245e..ce1a42c 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -1382,6 +1382,7 @@ static const struct platform_device_id sahara_platform_ids[] = {
 MODULE_DEVICE_TABLE(platform, sahara_platform_ids);
 
 static const struct of_device_id sahara_dt_ids[] = {
+	{ .compatible = "fsl,imx51-sahara" },
 	{ .compatible = "fsl,imx53-sahara" },
 	{ .compatible = "fsl,imx27-sahara" },
 	{ /* sentinel */ }
@@ -1507,7 +1508,9 @@ static int sahara_probe(struct platform_device *pdev)
 		if (version != SAHARA_VERSION_3)
 			err = -ENODEV;
 	} else if (of_device_is_compatible(pdev->dev.of_node,
-			"fsl,imx53-sahara")) {
+		   "fsl,imx53-sahara") ||
+		   of_device_is_compatible(pdev->dev.of_node,
+		   "fsl,imx51-sahara")) {
 		if (((version >> 8) & 0xff) != SAHARA_VERSION_4)
 			err = -ENODEV;
 		version = (version >> 8) & 0xff;
-- 
2.7.4

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

* Re: [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC
  2018-06-22 18:45 [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Fabio Estevam
  2018-06-22 18:45 ` [PATCH v2 2/2] crypto: sahara - Add i.MX51 entry Fabio Estevam
@ 2018-06-25 20:21 ` Rob Herring
  2018-06-25 20:27   ` Fabio Estevam
  1 sibling, 1 reply; 6+ messages in thread
From: Rob Herring @ 2018-06-25 20:21 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: herbert, linux-crypto, devicetree, horia.geanta, Fabio Estevam

On Fri, Jun 22, 2018 at 03:45:28PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> i.MX51 and i.MX53 share the same sahara IP block version, so add
> i.MX51 in the list of supported SoCs.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
> Changes since v1:
> - Fix typo in commit log "i.MX51 and i.MX53"
> 
>  Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
> index e8a35c7..5343a48 100644
> --- a/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
> +++ b/Documentation/devicetree/bindings/crypto/fsl-imx-sahara.txt
> @@ -1,8 +1,9 @@
>  Freescale SAHARA Cryptographic Accelerator included in some i.MX chips.
> -Currently only i.MX27 and i.MX53 are supported.
> +Currently i.MX27, i.MX51 and i.MX53 are supported.
>  
>  Required properties:
> -- compatible : Should be "fsl,<soc>-sahara"
> +- compatible : Should be "fsl,imx27-sahara", "fsl,imx51-sahara"
> +or "fsl,imx53-sahara"

Looks like imx51 should be a fallback and you can drop the driver 
change.

>  - reg : Should contain SAHARA registers location and length
>  - interrupts : Should contain SAHARA interrupt number
>  
> -- 
> 2.7.4
> 

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

* Re: [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC
  2018-06-25 20:21 ` [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Rob Herring
@ 2018-06-25 20:27   ` Fabio Estevam
  2018-06-26 14:24     ` Rob Herring
  0 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2018-06-25 20:27 UTC (permalink / raw)
  To: Rob Herring
  Cc: Herbert Xu, linux-crypto,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Horia Geanta Neag, Fabio Estevam

Hi Rob,

On Mon, Jun 25, 2018 at 5:21 PM, Rob Herring <robh@kernel.org> wrote:

> Looks like imx51 should be a fallback and you can drop the driver
> change.

I thought about that too.

If I do like this in imx51.dtsi:

compatible = "fsl,imx51-sahara", "fsl,imx53-sahara";

Then the driver works just fine.

I was not sure if this was OK or not because imx51 was introduced
prior than imx53 was launched.

Would it be OK to use: compatible = "fsl,imx51-sahara", "fsl,imx53-sahara"; ?

Thanks

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

* Re: [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC
  2018-06-25 20:27   ` Fabio Estevam
@ 2018-06-26 14:24     ` Rob Herring
  2018-06-26 23:19       ` Fabio Estevam
  0 siblings, 1 reply; 6+ messages in thread
From: Rob Herring @ 2018-06-26 14:24 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: Herbert Xu, open list:HARDWARE RANDOM NUMBER GENERATOR CORE,
	devicetree, Horia Geantă, Fabio Estevam

On Mon, Jun 25, 2018 at 2:27 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Rob,
>
> On Mon, Jun 25, 2018 at 5:21 PM, Rob Herring <robh@kernel.org> wrote:
>
> > Looks like imx51 should be a fallback and you can drop the driver
> > change.
>
> I thought about that too.
>
> If I do like this in imx51.dtsi:
>
> compatible = "fsl,imx51-sahara", "fsl,imx53-sahara";
>
> Then the driver works just fine.
>
> I was not sure if this was OK or not because imx51 was introduced
> prior than imx53 was launched.
>
> Would it be OK to use: compatible = "fsl,imx51-sahara", "fsl,imx53-sahara"; ?

Yes, but the order should be reversed as it should be most specific
and newest first.

Rob

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

* Re: [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC
  2018-06-26 14:24     ` Rob Herring
@ 2018-06-26 23:19       ` Fabio Estevam
  0 siblings, 0 replies; 6+ messages in thread
From: Fabio Estevam @ 2018-06-26 23:19 UTC (permalink / raw)
  To: Rob Herring
  Cc: Herbert Xu, open list:HARDWARE RANDOM NUMBER GENERATOR CORE,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Horia Geantă, Fabio Estevam

Hi Rob,

On Tue, Jun 26, 2018 at 11:24 AM, Rob Herring <robh@kernel.org> wrote:

>> Would it be OK to use: compatible = "fsl,imx51-sahara", "fsl,imx53-sahara"; ?
>
> Yes, but the order should be reversed as it should be most specific
> and newest first.

Thanks for the feedback. Just sent a dts patch as you suggested.

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

end of thread, other threads:[~2018-06-26 23:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-22 18:45 [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Fabio Estevam
2018-06-22 18:45 ` [PATCH v2 2/2] crypto: sahara - Add i.MX51 entry Fabio Estevam
2018-06-25 20:21 ` [PATCH v2 1/2] dt-bindings: fsl-imx-sahara: Add i.MX51 as a supported SoC Rob Herring
2018-06-25 20:27   ` Fabio Estevam
2018-06-26 14:24     ` Rob Herring
2018-06-26 23:19       ` Fabio Estevam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).