linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip
@ 2022-04-21 13:44 Pali Rohár
  2022-05-02 20:11 ` Rob Herring
  2022-05-06 10:20 ` Herbert Xu
  0 siblings, 2 replies; 3+ messages in thread
From: Pali Rohár @ 2022-04-21 13:44 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Rob Herring
  Cc: Nicolas Ferre, Alexandre Belloni, Ludovic Desroches, devicetree,
	linux-crypto, linux-kernel

ATSHA204 is predecessor of ATSHA204A which supports less features and some
of them are slightly different.

Introduce a new compatible string for ATSHA204 cryptochip "atmel,atsha204".

Current version of Linux kernel driver atmel-sha204a.c implements only hw
random number generator which is same in both ATSHA204 and ATSHA204A
cryptochips. So driver already supports also ATSHA204 hw generator, so just
simply extends list of compatible strings.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
 drivers/crypto/atmel-sha204a.c                         | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/trivial-devices.yaml b/Documentation/devicetree/bindings/trivial-devices.yaml
index 091792ba993e..bbff73e1b03a 100644
--- a/Documentation/devicetree/bindings/trivial-devices.yaml
+++ b/Documentation/devicetree/bindings/trivial-devices.yaml
@@ -47,7 +47,9 @@ properties:
           - at,24c08
             # i2c trusted platform module (TPM)
           - atmel,at97sc3204t
-            # i2c h/w symmetric crypto module
+            # ATSHA204 - i2c h/w symmetric crypto module
+          - atmel,atsha204
+            # ATSHA204A - i2c h/w symmetric crypto module
           - atmel,atsha204a
             # i2c h/w elliptic curve crypto module
           - atmel,atecc508a
diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c
index c96c14e7dab1..3a03f4aaf100 100644
--- a/drivers/crypto/atmel-sha204a.c
+++ b/drivers/crypto/atmel-sha204a.c
@@ -132,12 +132,14 @@ static int atmel_sha204a_remove(struct i2c_client *client)
 }
 
 static const struct of_device_id atmel_sha204a_dt_ids[] = {
+	{ .compatible = "atmel,atsha204", },
 	{ .compatible = "atmel,atsha204a", },
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, atmel_sha204a_dt_ids);
 
 static const struct i2c_device_id atmel_sha204a_id[] = {
+	{ "atsha204", 0 },
 	{ "atsha204a", 0 },
 	{ /* sentinel */ }
 };
-- 
2.20.1


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

* Re: [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip
  2022-04-21 13:44 [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip Pali Rohár
@ 2022-05-02 20:11 ` Rob Herring
  2022-05-06 10:20 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-05-02 20:11 UTC (permalink / raw)
  To: Pali Rohár
  Cc: linux-crypto, David S. Miller, Nicolas Ferre, Ludovic Desroches,
	devicetree, Rob Herring, linux-kernel, Herbert Xu,
	Alexandre Belloni

On Thu, 21 Apr 2022 15:44:57 +0200, Pali Rohár wrote:
> ATSHA204 is predecessor of ATSHA204A which supports less features and some
> of them are slightly different.
> 
> Introduce a new compatible string for ATSHA204 cryptochip "atmel,atsha204".
> 
> Current version of Linux kernel driver atmel-sha204a.c implements only hw
> random number generator which is same in both ATSHA204 and ATSHA204A
> cryptochips. So driver already supports also ATSHA204 hw generator, so just
> simply extends list of compatible strings.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
>  drivers/crypto/atmel-sha204a.c                         | 2 ++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip
  2022-04-21 13:44 [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip Pali Rohár
  2022-05-02 20:11 ` Rob Herring
@ 2022-05-06 10:20 ` Herbert Xu
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2022-05-06 10:20 UTC (permalink / raw)
  To: Pali Rohár
  Cc: David S. Miller, Rob Herring, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, devicetree, linux-crypto, linux-kernel

On Thu, Apr 21, 2022 at 03:44:57PM +0200, Pali Rohár wrote:
> ATSHA204 is predecessor of ATSHA204A which supports less features and some
> of them are slightly different.
> 
> Introduce a new compatible string for ATSHA204 cryptochip "atmel,atsha204".
> 
> Current version of Linux kernel driver atmel-sha204a.c implements only hw
> random number generator which is same in both ATSHA204 and ATSHA204A
> cryptochips. So driver already supports also ATSHA204 hw generator, so just
> simply extends list of compatible strings.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
>  drivers/crypto/atmel-sha204a.c                         | 2 ++
>  2 files changed, 5 insertions(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2022-05-06 10:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 13:44 [PATCH] crypto: atmel-sha204a: Add support for ATSHA204 cryptochip Pali Rohár
2022-05-02 20:11 ` Rob Herring
2022-05-06 10:20 ` Herbert Xu

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).