linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Vabhav Sharma <vabhav.sharma@nxp.com>
Cc: Horia Geanta <horia.geanta@nxp.com>,
	Gaurav Jain <gaurav.jain@nxp.com>,
	Pankaj Gupta <pankaj.gupta@nxp.com>,
	"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dl-linux-imx <linux-imx@nxp.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Silvano Di Ninno <silvano.dininno@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>
Subject: Re: [EXT] Re: [PATCH 1/3] dt-bindings: crypto: fsl: add entropy delay property
Date: Wed, 29 Jun 2022 15:25:59 -0600	[thread overview]
Message-ID: <20220629212559.GA843061-robh@kernel.org> (raw)
In-Reply-To: <AS1PR04MB9358BCBEBDC7EBAC6E5DD6A9F3AC9@AS1PR04MB9358.eurprd04.prod.outlook.com>

On Thu, Jun 16, 2022 at 05:49:30PM +0000, Vabhav Sharma wrote:
> Hello Rob,
> 
> > -----Original Message-----
> > From: Rob Herring <robh@kernel.org>
> > Sent: Monday, June 6, 2022 2:51 AM
> > To: Vabhav Sharma <vabhav.sharma@nxp.com>
> > Cc: Horia Geanta <horia.geanta@nxp.com>; Gaurav Jain
> > <gaurav.jain@nxp.com>; Pankaj Gupta <pankaj.gupta@nxp.com>;
> > herbert@gondor.apana.org.au; davem@davemloft.net;
> > shawnguo@kernel.org; linux-crypto@vger.kernel.org; linux-
> > kernel@vger.kernel.org; dl-linux-imx <linux-imx@nxp.com>;
> > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Silvano Di
> > Ninno <silvano.dininno@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
> > Subject: [EXT] Re: [PATCH 1/3] dt-bindings: crypto: fsl: add entropy delay
> > property
> > 
> > Caution: EXT Email
> > 
> > On Mon, May 30, 2022 at 11:39:22PM +0530, Vabhav Sharma wrote:
> > > Add entropy delay property which defines the length (in system clocks)
> > > of each Entropy sample taken for TRNG configuration.
> > >
> > > Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
> > > Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
> > > Reviewed-by: Varun Sethi <v.sethi@nxp.com>
> > > ---
> > >  Documentation/devicetree/bindings/crypto/fsl-sec4.txt | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> > > b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> > > index 8f359f473ada..1477294eda38 100644
> > > --- a/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> > > +++ b/Documentation/devicetree/bindings/crypto/fsl-sec4.txt
> > > @@ -62,6 +62,12 @@ PROPERTIES
> > >        Definition: A standard property. Define the 'ERA' of the SEC
> > >            device.
> > >
> > > +   - entropy-delay
> > > +      Usage: optional
> > > +      Value type: <u32>
> > > +      Definition: A property which specifies the length (in system clocks)
> > > +          of each Entropy sample taken.
> > > +
> > 
> > Seems like this could be common, but should be a time value (with unit
> > suffix) rather than clocks. If not common, then needs a vendor prefix.
> > Is this time to read a value or time between values produced? Not really clear
> > from the description.
> CAAM TRNG Configuration includes 16-bit field entropy-delay. This field specifies how long the oscillator is given to freely oscillate and generate a single bit of entropy.
> It is specified as number of system clock cycles and this u32 type field already exist in the caam driver code with default value of 3200. However, on some platform this value can vary and support is added to read the value from device tree in order to override default value, Hope this helps to clarify.

So that is how often a sample can be read? Or what happens if you read a 
sample too quick (in less than this delay time)?

Look at other h/w and drivers see if something common makes sense here.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-29 21:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 18:09 [PATCH 0/3] add entropy delay device tree property Vabhav Sharma
2022-05-30 18:09 ` [PATCH 1/3] dt-bindings: crypto: fsl: add entropy delay property Vabhav Sharma
2022-06-05 21:21   ` Rob Herring
2022-06-16 17:49     ` [EXT] " Vabhav Sharma
2022-06-29 21:25       ` Rob Herring [this message]
2023-08-01 23:21         ` Vabhav Sharma
2022-05-30 18:09 ` [PATCH 2/3] arm: dts: imx6sx: Add " Vabhav Sharma
2022-05-30 18:09 ` [PATCH 3/3] crypto: caam: read entropy delay from device tree Vabhav Sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220629212559.GA843061-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=V.Sethi@nxp.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gaurav.jain@nxp.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horia.geanta@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pankaj.gupta@nxp.com \
    --cc=shawnguo@kernel.org \
    --cc=silvano.dininno@nxp.com \
    --cc=vabhav.sharma@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).