crypto: atmel-sha204a - Add support for ATSHA204 cryptochip
authorPali Rohár <pali@kernel.org>
Thu, 21 Apr 2022 13:44:57 +0000 (15:44 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 6 May 2022 10:16:54 +0000 (18:16 +0800)
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>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Documentation/devicetree/bindings/trivial-devices.yaml
drivers/crypto/atmel-sha204a.c

index 550a2e5c9e05dd598ca20ed546182ed73e410c0b..98b45773432b703240cbcee025c65f78ea9574e5 100644 (file)
@@ -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
index c96c14e7dab1c0ae89fd026bb733155cf761659c..3a03f4aaf100e9c9f7a5e17973e187de2007c075 100644 (file)
@@ -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 */ }
 };