Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5638792ybe; Tue, 10 Sep 2019 06:48:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqz7gurS6b2Mdb47Vq/QvrtrFiJ8OHm+Jrx3P50/pHdnk4sKPjcJC45SkyVcUTO5cngQX3bI X-Received: by 2002:a17:906:31c3:: with SMTP id f3mr25340932ejf.296.1568123319702; Tue, 10 Sep 2019 06:48:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568123319; cv=none; d=google.com; s=arc-20160816; b=LZuzenjyOUOubc2I9V/IXX0KWIVlUDcr9xo4bFlHaUOQAuLk5iMMFo790z5Za4YnYi 93kffMmVmIGdZzBiFSCM3NfvghZN4Ois8cgDOiKQ6aRxujjXolXZR56OjAIQ5KWDOFKB 1Y6/O7bPeXrAwlrpa1jOsBl4s6Xj0aMm8UpysYKhG+lKtVib7Wqc3LUpEwM59CA4p0df BTJGjWwOKtNr7skZtLjnMZ/87TXI1ca0zAurDDL321YFS6LMrIf48/gmpvUwN9atTIOK cXW6yrClZ9NdeCTCQXHK+2Cfpe8SY7IqE4blJuPTzq7w/XKv9writMCniaiFdIgzWUhW Tacw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Ub4SnTSb6gIhX0nmNU7ISH0G8O7vugmWfe28Zf8iviI=; b=sJ2FQpCBAn3QI9dCTEMs1YRlxl7/sqkELC+09uXUxh4lqEzUR/ASBpEiBeXR51nvUo biYKhdjguaokYSa8k3nGYuJrNqArqQfA3EQbIMRBUQl9R75vILO+D2bu1nrY7etHwqFt gQ8xURlul8tGdwSBsrMQ+Nm8NH+YYbY00Enm5IWGN8E8dt7tz+FKSfXN3l3f0fHThL2U HIo6pkDC1vvi8s22jhxtyXak+U01lljmHGqJtTOt5pc7QNc70Q8xQ3drxXi/B7vF/ybv oQkW6ASwXLbYLPSvDd13UxdBkAv2QM+VaVhh7CM9oNij3j0KJ43S9Wtac16R7kmGFBfK 3LrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pEwdeA+6; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p11si8531703edq.310.2019.09.10.06.48.07; Tue, 10 Sep 2019 06:48:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pEwdeA+6; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403831AbfIJMmz (ORCPT + 99 others); Tue, 10 Sep 2019 08:42:55 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34882 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727945AbfIJMmy (ORCPT ); Tue, 10 Sep 2019 08:42:54 -0400 Received: by mail-wr1-f65.google.com with SMTP id g7so19990292wrx.2 for ; Tue, 10 Sep 2019 05:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Ub4SnTSb6gIhX0nmNU7ISH0G8O7vugmWfe28Zf8iviI=; b=pEwdeA+6eJ8v3UkA9Jzqd5hUweTKn/5vjQBsphWKp3lGezCEmdxB0gkbJnCOEKhGrz od2fxEWrNAXGFXdzA33ye3zBGBOj/TLNpu8qryAqCl36Q8YrMxPchxUjjH/s6iaAskST nG14v8Olaqg4c72biCSQvDGbqyDto7+ftndjhrijahjXqLbo57GqwAN8Tu7vSi6kOGXL dv6Mz5F+83dIbK/Fc3+of/C+73aiioDMEJ/03ccEPHtQpdIUlIxBolLpu6aWQe/SbT09 lz7f3H58FD/0HQqJttinWByYSGkebP5i289Jmv9hiLHi+8LDCuWuizCnIIOfEnizaqIK tEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Ub4SnTSb6gIhX0nmNU7ISH0G8O7vugmWfe28Zf8iviI=; b=LsT+RsovRFgs0YK3Qsj1c6KVPAXQnKZ0MTPkY640fIRZtaegeI4TZuXisWIhj0Fe68 v3qyswCYL9UzgYkGXwHgn9VTmRQ34FA6Kj3YStCfSqZ4FIUC/oT9k9BlSpWZ8GEcqB1k Gq/bDnih1+gOOaSiYC4AsdgtCFOZ2raT2Rh6x0DTE00ZVt7EjKjh3ELlEhv5oh7EqDUx M4WeLfF1INlXPtedfmjN8DLhMyDujw+WgyyLpmwbKwL5E1nmvgINbmm+SCvM6QwtDMwO MYPEHw39RkCBnmesl5ehuwoYK5t0TQBYTII/yBx0TINwMhgcx4N9kBZhtfNYasATAvPV 5nzg== X-Gm-Message-State: APjAAAU8o7WWh4K6tXdwjfEV2S2M2wuoS82ogHWxXAJTx0dJvEbwzDt9 f0y9hgncx9OhypH2eGCmhqgRTg== X-Received: by 2002:a05:6000:12d1:: with SMTP id l17mr25805559wrx.91.1568119372913; Tue, 10 Sep 2019 05:42:52 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id h5sm13118486wrr.10.2019.09.10.05.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Sep 2019 05:42:52 -0700 (PDT) Date: Tue, 10 Sep 2019 13:42:50 +0100 From: Daniel Thompson To: Tomer Maimon Cc: mpm@selenic.com, herbert@gondor.apana.org.au, Arnd Bergmann , Greg KH , Rob Herring , Mark Rutland , Avi Fishman , Tali Perry , Patrick Venture , Nancy Yuen , Benjamin Fair , sumit.garg@linaro.org, jens.wiklander@linaro.org, vkoul@kernel.org, Thomas Gleixner , Joel Stanley , devicetree , Linux Kernel Mailing List , linux-crypto@vger.kernel.org, OpenBMC Maillist Subject: Re: [PATCH v2 1/2] dt-binding: hwrng: add NPCM RNG documentation Message-ID: <20190910124250.2i5muqjt5c35kvgb@holly.lan> References: <20190909123840.154745-1-tmaimon77@gmail.com> <20190909123840.154745-2-tmaimon77@gmail.com> <20190910102505.vgyomi575ldrk2lq@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Sep 10, 2019 at 02:55:44PM +0300, Tomer Maimon wrote: > Hi Daniel, > > Sorry but I have probably miss it, thanks a lot for your comment > > On Tue, 10 Sep 2019 at 13:25, Daniel Thompson > wrote: > > > On Mon, Sep 09, 2019 at 03:38:39PM +0300, Tomer Maimon wrote: > > > Added device tree binding documentation for Nuvoton BMC > > > NPCM Random Number Generator (RNG). > > > > > > Signed-off-by: Tomer Maimon > > > --- > > > .../bindings/rng/nuvoton,npcm-rng.txt | 17 +++++++++++++++++ > > > 1 file changed, 17 insertions(+) > > > create mode 100644 > > Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.txt > > > > > > diff --git a/Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.txt > > b/Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.txt > > > new file mode 100644 > > > index 000000000000..a697b4425fb3 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.txt > > > @@ -0,0 +1,17 @@ > > > +NPCM SoC Random Number Generator > > > + > > > +Required properties: > > > +- compatible : "nuvoton,npcm750-rng" for the NPCM7XX BMC. > > > +- reg : Specifies physical base address and size of the > > registers. > > > + > > > +Optional property: > > > +- quality : estimated number of bits of true entropy per 1024 bits > > > + read from the rng. > > > + If this property is not defined, it defaults to > > 1000. > > > > There are pending unreplied review comments about this property (my own > > as it happens): > > https://patchwork.kernel.org/patch/11119371/ > > > > No, there isn't different SoCs. > we had checked the quality of the hwrng and the results we got are set as > default. > we been asked from one of our client to have a dynamic quality, they will > like to be more strict when using the hwrng. > is it problematic to add it? It's a slightly grey area but in general the role of devicetree is to describe the hardware. This parameter is not doing that. If you view the quality assessment of this RNG to be a user preference it is better set the quality to zero which is what the vast majority of hwrng devices do. When the driver sets the quality to zero then the kernel does not stir the entropy pool automatically... instead it relies on the userspace rngd to do that. If the user wants the kernel to stir the pool automatically then the quality can be set using the default_quality kernel parameter. Daniel. > > Having a controllable quality implies that the numeric quality of the > peripheral changes when it is stamped out on different SoCs (otherwise > the driver can confidently set the quality without needing any hint > from the DT). Is that really true here? > > > > Daniel. > > > > > + > > > +Example: > > > + > > > +rng: rng@f000b000 { > > > + compatible = "nuvoton,npcm750-rng"; > > > + reg = <0xf000b000 0x8>; > > > +}; > > > -- > > > 2.18.0 > > > > >