Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp983086iog; Wed, 29 Jun 2022 14:33:40 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tC8AR3o2I+CLQblhZxJOCcNFTttaLACiQ/fyzNhqvyaWnoOUKIcLln18XFbBNQyvAc+pDA X-Received: by 2002:a17:90b:4f8d:b0:1ec:af3b:d813 with SMTP id qe13-20020a17090b4f8d00b001ecaf3bd813mr8164434pjb.2.1656538419781; Wed, 29 Jun 2022 14:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656538419; cv=none; d=google.com; s=arc-20160816; b=rtmk8/3d2/QzVfTeqHIyyn4CD+9NLLv/2f+9d91SmJUOdKgHMkS3cJc6iMGlLfPiSf gRgg7eFvlYhOhWqVMz3bB3kc17N4w3qjyxj6yBMG6PMGBrU215d7NNwbqTUILzekusAF TxYFJsFGoZKNK/31AH3+1eQ7znnY9mJtNkshfian/m7EdCTidQOXtBTVo76glC1797a2 AjJXNOSZ1tJz/BEWfWm4Y6arMb3fycUy79soBahXmu0oSOZMQDiBizdGjx/1P7EX6+89 87cejRlugYcVzrF5BcHFso/Vf02NupvPHOX2lQNl+TWqTkzrJOm99bcgAa+D7CdXdmMo bNww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=BAnlbGwaJ9TyuQs7iWeZBAejDnwxdU93bNzpne1ImGI=; b=UOOrF/eLPRmjikr085DLrkDNyVglDvYMvG295EaxvAYEGGOiGMFabPkjjhAl3mCxoo uwEzevBJ3Nl53Frczc32xylTfENsJ+3rZFzXMlDoKhfOjiJftokVuby3EayFP5ANKM1s 5c1+vPTkBbaB7350Uqgr4x2lnmtJ+NMJYg+NE7l0Uw2v+DRtNEFDnMYBX9IE6sg54U7g CyNjfnL/xVTE92W6WVbnSXl2h1hEwRWL6MUA0wtbu22wGB/1DGMBG7ow/7kIG6drpMsM QbEHk3faR2+2Oq3VoMMBlC0OTXXddw8Dukgr0YG1kLd/b1SBvhj/bl57XNMMkj78R4Ko 2TbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a056a00234600b0051bbdb40149si22861819pfj.122.2022.06.29.14.33.15; Wed, 29 Jun 2022 14:33:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbiF2V0D (ORCPT + 99 others); Wed, 29 Jun 2022 17:26:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229747AbiF2V0C (ORCPT ); Wed, 29 Jun 2022 17:26:02 -0400 Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D64331D323; Wed, 29 Jun 2022 14:26:01 -0700 (PDT) Received: by mail-il1-f173.google.com with SMTP id p13so11183052ilq.0; Wed, 29 Jun 2022 14:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=BAnlbGwaJ9TyuQs7iWeZBAejDnwxdU93bNzpne1ImGI=; b=IgjNy2Zga4vDDf7qOZFDF1Dcoh6WAXr9ry+/yBHINDuhz5nMJoa/aPAtOfJQO1R19U IzQuH2UeQioxQyLivEW8zE9jXWuvRInJ6Q3SquNp3ThntFIeU/IosJ1ZG9foqXFtd4Jg swtyqXFOvoy/VCefUUgI1IDIWczdayEa8RAXXp6e5hGB93y6kCLMBLaoSCUm7Jd8RInW Iw976kJmzllMZ7jZV9Mujx8ey5wVJlgKvMFTYnJMekuFu0H/SMLSCSsTQGmzHlbJBxcu MbcyTLFRCfndpfJYayNQnz/avOO5uMhpFUkiEBxVf67jqdduf+vvL9buqxVEGqNzAJn2 buCg== X-Gm-Message-State: AJIora+GZkHNQGPktE/Zl1QVv7jOT4oezAdXybU8ybOixtrN824ek7go 3zlCLCz0IPoYlKBtTLN0ZWtFY53g+Q== X-Received: by 2002:a05:6e02:1214:b0:2da:705c:5f03 with SMTP id a20-20020a056e02121400b002da705c5f03mr3048170ilq.318.1656537961129; Wed, 29 Jun 2022 14:26:01 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id e24-20020a5d85d8000000b006694bc50b82sm8293589ios.35.2022.06.29.14.25.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 14:26:00 -0700 (PDT) Received: (nullmailer pid 858117 invoked by uid 1000); Wed, 29 Jun 2022 21:25:59 -0000 Date: Wed, 29 Jun 2022 15:25:59 -0600 From: Rob Herring To: Vabhav Sharma Cc: Horia Geanta , Gaurav Jain , Pankaj Gupta , "herbert@gondor.apana.org.au" , "davem@davemloft.net" , "shawnguo@kernel.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Silvano Di Ninno , Varun Sethi Subject: Re: [EXT] Re: [PATCH 1/3] dt-bindings: crypto: fsl: add entropy delay property Message-ID: <20220629212559.GA843061-robh@kernel.org> References: <20220530180924.1792399-1-vabhav.sharma@nxp.com> <20220530180924.1792399-2-vabhav.sharma@nxp.com> <20220605212114.GA3528129-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Jun 16, 2022 at 05:49:30PM +0000, Vabhav Sharma wrote: > Hello Rob, > > > -----Original Message----- > > From: Rob Herring > > Sent: Monday, June 6, 2022 2:51 AM > > To: Vabhav Sharma > > Cc: Horia Geanta ; Gaurav Jain > > ; Pankaj Gupta ; > > herbert@gondor.apana.org.au; davem@davemloft.net; > > shawnguo@kernel.org; linux-crypto@vger.kernel.org; linux- > > kernel@vger.kernel.org; dl-linux-imx ; > > devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; Silvano Di > > Ninno ; Varun Sethi > > 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 > > > Reviewed-by: Horia Geanta > > > Reviewed-by: Varun Sethi > > > --- > > > 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: > > > + 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