Skip to contentSkip to conversation

crypto: atmel-sha204a: Add support for ATSHA204 cryptochip

PATCH In review Pali Rohár 3 participants 3 messages Apr 21, 2022 – May 6, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: atmel-sha204a: Add support for ATSHA204 cryptochip

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.

---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
 drivers/crypto/atmel-sha204a.c                         | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/trivial-devices.yaml +3 -1
index 091792ba993e..bbff73e1b03a 100644
@@ -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
drivers/crypto/atmel-sha204a.c +2 -0
index c96c14e7dab1..3a03f4aaf100 100644
@@ -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 */ }
 };
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Pali Rohár

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.

Quoted 6 lines
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
 drivers/crypto/atmel-sha204a.c                         | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)
maintainer
#2 lore raw
In reply to Pali Rohár
Quoted 10 lines · Pali Rohár

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.

Quoted 5 lines
---
 Documentation/devicetree/bindings/trivial-devices.yaml | 4 +++-
 drivers/crypto/atmel-sha204a.c                         | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt