diff mbox series

[5/5] dt-bindings: add Atmel SHA204A I2C crypto processor

Message ID 20190430162910.16771-6-ard.biesheuvel@linaro.org (mailing list archive)
State New, archived
Headers show
Series synquacer - wire up Atmel SHA204A as RNG in DT and ACPI mode | expand

Commit Message

Ard Biesheuvel April 30, 2019, 4:29 p.m. UTC
Add a compatible string for the Atmel SHA204A I2C crypto processor.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Linus Walleij May 9, 2019, 8:44 p.m. UTC | #1
On Tue, Apr 30, 2019 at 6:29 PM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:

> Add a compatible string for the Atmel SHA204A I2C crypto processor.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Ard Biesheuvel May 16, 2019, 4:06 p.m. UTC | #2
(+ devicetree list)

On Tue, 30 Apr 2019 at 18:29, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> Add a compatible string for the Atmel SHA204A I2C crypto processor.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> index 6b458bb2440d..a93d4b024d0e 100644
> --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> @@ -79,3 +79,16 @@ atecc508a@c0 {
>         compatible = "atmel,atecc508a";
>         reg = <0xC0>;
>  };
> +
> +* Symmetric Cryptography (I2C)
> +
> +Required properties:
> +- compatible : must be "atmel,atsha204a".
> +- reg: I2C bus address of the device.
> +- clock-frequency: must be present in the i2c controller node.
> +
> +Example:
> +atsha204a@c0 {
> +       compatible = "atmel,atsha204a";
> +       reg = <0xC0>;
> +};
> --
> 2.20.1
>

If there are no objections to this patch, may I please have an ack?
Rob Herring May 24, 2019, 1:12 p.m. UTC | #3
On Tue, Apr 30, 2019 at 11:29 AM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>
> Add a compatible string for the Atmel SHA204A I2C crypto processor.
>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>  Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> index 6b458bb2440d..a93d4b024d0e 100644
> --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> @@ -79,3 +79,16 @@ atecc508a@c0 {
>         compatible = "atmel,atecc508a";
>         reg = <0xC0>;
>  };
> +
> +* Symmetric Cryptography (I2C)

This doesn't really seem to be related to the rest of the file which
are all sub-blocks on SoCs. You could just add this one to
trivial-devices.yaml.

> +
> +Required properties:
> +- compatible : must be "atmel,atsha204a".
> +- reg: I2C bus address of the device.
> +- clock-frequency: must be present in the i2c controller node.

That's a property of the controller and doesn't belong here.

> +
> +Example:
> +atsha204a@c0 {

crypto@c0

> +       compatible = "atmel,atsha204a";
> +       reg = <0xC0>;
> +};
> --
> 2.20.1
>
Ard Biesheuvel May 24, 2019, 1:15 p.m. UTC | #4
On Fri, 24 May 2019 at 15:12, Rob Herring <robh+dt@kernel.org> wrote:
>
> On Tue, Apr 30, 2019 at 11:29 AM Ard Biesheuvel
> <ard.biesheuvel@linaro.org> wrote:
> >
> > Add a compatible string for the Atmel SHA204A I2C crypto processor.
> >
> > Cc: Rob Herring <robh+dt@kernel.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > ---
> >  Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > index 6b458bb2440d..a93d4b024d0e 100644
> > --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > @@ -79,3 +79,16 @@ atecc508a@c0 {
> >         compatible = "atmel,atecc508a";
> >         reg = <0xC0>;
> >  };
> > +
> > +* Symmetric Cryptography (I2C)
>
> This doesn't really seem to be related to the rest of the file which
> are all sub-blocks on SoCs. You could just add this one to
> trivial-devices.yaml.
>
> > +
> > +Required properties:
> > +- compatible : must be "atmel,atsha204a".
> > +- reg: I2C bus address of the device.
> > +- clock-frequency: must be present in the i2c controller node.
>
> That's a property of the controller and doesn't belong here.
>

Both comments apply equally to the ECC508 above it, which I
duplicated. Would you like me to move that one into
trivial-devices.yaml as well? (and drop the clock-freq property)

> > +
> > +Example:
> > +atsha204a@c0 {
>
> crypto@c0
>

OK.

> > +       compatible = "atmel,atsha204a";
> > +       reg = <0xC0>;
> > +};
> > --
> > 2.20.1
> >
Rob Herring May 24, 2019, 1:36 p.m. UTC | #5
On Fri, May 24, 2019 at 8:16 AM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>
> On Fri, 24 May 2019 at 15:12, Rob Herring <robh+dt@kernel.org> wrote:
> >
> > On Tue, Apr 30, 2019 at 11:29 AM Ard Biesheuvel
> > <ard.biesheuvel@linaro.org> wrote:
> > >
> > > Add a compatible string for the Atmel SHA204A I2C crypto processor.
> > >
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Mark Rutland <mark.rutland@arm.com>
> > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> > > ---
> > >  Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 +++++++++++++
> > >  1 file changed, 13 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > > index 6b458bb2440d..a93d4b024d0e 100644
> > > --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > > +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
> > > @@ -79,3 +79,16 @@ atecc508a@c0 {
> > >         compatible = "atmel,atecc508a";
> > >         reg = <0xC0>;
> > >  };
> > > +
> > > +* Symmetric Cryptography (I2C)
> >
> > This doesn't really seem to be related to the rest of the file which
> > are all sub-blocks on SoCs. You could just add this one to
> > trivial-devices.yaml.
> >
> > > +
> > > +Required properties:
> > > +- compatible : must be "atmel,atsha204a".
> > > +- reg: I2C bus address of the device.
> > > +- clock-frequency: must be present in the i2c controller node.
> >
> > That's a property of the controller and doesn't belong here.
> >
>
> Both comments apply equally to the ECC508 above it, which I
> duplicated.

Okay, I only quickly scanned it. The problem for this file will be
when converting to schema, it's generally 1 binding per file.

> Would you like me to move that one into
> trivial-devices.yaml as well? (and drop the clock-freq property)

If you want, but that can be a separate patch.

Rob
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
index 6b458bb2440d..a93d4b024d0e 100644
--- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
+++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt
@@ -79,3 +79,16 @@  atecc508a@c0 {
 	compatible = "atmel,atecc508a";
 	reg = <0xC0>;
 };
+
+* Symmetric Cryptography (I2C)
+
+Required properties:
+- compatible : must be "atmel,atsha204a".
+- reg: I2C bus address of the device.
+- clock-frequency: must be present in the i2c controller node.
+
+Example:
+atsha204a@c0 {
+	compatible = "atmel,atsha204a";
+	reg = <0xC0>;
+};