diff mbox

[4/6] hwrng: atmel: Add TRNG DT binding doc

Message ID 1412093987-30241-5-git-send-email-boris.brezillon@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Boris BREZILLON Sept. 30, 2014, 4:19 p.m. UTC
Document DT bindings of Atmel's TRNG (True Random Number Generator) IP.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 Documentation/devicetree/bindings/hwrng/atmel-trng.txt | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwrng/atmel-trng.txt

Comments

Peter Korsgaard Sept. 30, 2014, 5:12 p.m. UTC | #1
>>>>> "Boris" == Boris Brezillon <boris.brezillon@free-electrons.com> writes:

 > Document DT bindings of Atmel's TRNG (True Random Number Generator) IP.
 > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
 > ---
 >  Documentation/devicetree/bindings/hwrng/atmel-trng.txt | 16 ++++++++++++++++
 >  1 file changed, 16 insertions(+)
 >  create mode 100644 Documentation/devicetree/bindings/hwrng/atmel-trng.txt

 > diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
 > new file mode 100644
 > index 0000000..4ac5aaa
 > --- /dev/null
 > +++ b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
 > @@ -0,0 +1,16 @@
 > +Atmel TRNG (True Random Number Generator) block
 > +
 > +Required properties:
 > +- compatible : Should be "atmel,at91sam9g45-trng"
 > +- reg : Offset and length of the register set of this block
 > +- interrupts : the interrupt number for the TRNG block

The interrupt isn't strictly speaking required as it isn't used by the
driver, but as 9G45 has the signal wired up I guess it makes sense.

Acked-by: Peter Korsgaard <peter@korsgaard.com>
Boris BREZILLON Sept. 30, 2014, 5:21 p.m. UTC | #2
Hi Peter,

On Tue, 30 Sep 2014 19:12:22 +0200
Peter Korsgaard <peter@korsgaard.com> wrote:

> >>>>> "Boris" == Boris Brezillon <boris.brezillon@free-electrons.com> writes:
> 
>  > Document DT bindings of Atmel's TRNG (True Random Number Generator) IP.
>  > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
>  > ---
>  >  Documentation/devicetree/bindings/hwrng/atmel-trng.txt | 16 ++++++++++++++++
>  >  1 file changed, 16 insertions(+)
>  >  create mode 100644 Documentation/devicetree/bindings/hwrng/atmel-trng.txt
> 
>  > diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
>  > new file mode 100644
>  > index 0000000..4ac5aaa
>  > --- /dev/null
>  > +++ b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
>  > @@ -0,0 +1,16 @@
>  > +Atmel TRNG (True Random Number Generator) block
>  > +
>  > +Required properties:
>  > +- compatible : Should be "atmel,at91sam9g45-trng"
>  > +- reg : Offset and length of the register set of this block
>  > +- interrupts : the interrupt number for the TRNG block
> 
> The interrupt isn't strictly speaking required as it isn't used by the
> driver, but as 9G45 has the signal wired up I guess it makes sense.

This irq might be used in a near future (in order to wait for data as
requested by hwrng code when the wait argument is true).
Thus I prefer to keep it as required.

Best Regards,

Boris
Peter Korsgaard Sept. 30, 2014, 5:35 p.m. UTC | #3
>>>>> "Boris" == Boris Brezillon <boris.brezillon@free-electrons.com> writes:

Hi,

 >> The interrupt isn't strictly speaking required as it isn't used by the
 >> driver, but as 9G45 has the signal wired up I guess it makes sense.

 > This irq might be used in a near future (in order to wait for data as
 > requested by hwrng code when the wait argument is true).
 > Thus I prefer to keep it as required.

Ok, fine by me.
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/hwrng/atmel-trng.txt b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
new file mode 100644
index 0000000..4ac5aaa
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwrng/atmel-trng.txt
@@ -0,0 +1,16 @@ 
+Atmel TRNG (True Random Number Generator) block
+
+Required properties:
+- compatible : Should be "atmel,at91sam9g45-trng"
+- reg : Offset and length of the register set of this block
+- interrupts : the interrupt number for the TRNG block
+- clocks: should contain the TRNG clk source
+
+Example:
+
+trng@fffcc000 {
+	compatible = "atmel,at91sam9g45-trng";
+	reg = <0xfffcc000 0x4000>;
+	interrupts = <6 IRQ_TYPE_LEVEL_HIGH 0>;
+	clocks = <&trng_clk>;
+};