devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Christian Marangi <ansuelsmth@gmail.com>
Cc: Olivia Mackall <olivia@selenic.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Daniel Golle <daniel@makrotopia.org>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-crypto@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	upstream@airoha.com
Subject: Re: [PATCH 2/2] hwrng: add support for Airoha EN7581 TRNG
Date: Thu, 17 Oct 2024 15:11:12 +0200	[thread overview]
Message-ID: <20241017131112.GA28955@francesco-nb> (raw)
In-Reply-To: <20241016151845.23712-2-ansuelsmth@gmail.com>

On Wed, Oct 16, 2024 at 05:18:42PM +0200, Christian Marangi wrote:
> Add support for Airoha TRNG. The Airoha SoC provide a True RNG module
> that can output 4 bytes of raw data at times.
> 
> The module makes use of various noise source to provide True Random
> Number Generation.
> 
> On probe the module is reset to operate Health Test and verify correct
> execution of it.
> 
> The module can also provide DRBG function but the execution mode is
> mutually exclusive, running as TRNG doesn't permit to also run it as
> DRBG.
> 
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
>  drivers/char/hw_random/Kconfig       |  13 ++
>  drivers/char/hw_random/Makefile      |   1 +
>  drivers/char/hw_random/airoha-trng.c | 243 +++++++++++++++++++++++++++
>  3 files changed, 257 insertions(+)
>  create mode 100644 drivers/char/hw_random/airoha-trng.c
> 
> diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
> index 5912c2dd6398..bda283f290bc 100644
> --- a/drivers/char/hw_random/Kconfig
> +++ b/drivers/char/hw_random/Kconfig
> @@ -62,6 +62,19 @@ config HW_RANDOM_AMD
>  
>  	  If unsure, say Y.
>  
> +config HW_RANDOM_AIROHA
> +	tristate "Airoha True HW Random Number Generator support"
> +	depends on ARCH_AIROHA || COMPILE_TEST

> +	default HW_RANDOM
This should not be always enabled when HW_RANDOM is enabled. Enabling
driver should be a opt-in.

Francesco



  parent reply	other threads:[~2024-10-17 13:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 15:18 [PATCH 1/2] dt-bindings: rng: add support for Airoha EN7581 TRNG Christian Marangi
2024-10-16 15:18 ` [PATCH 2/2] hwrng: " Christian Marangi
2024-10-17 10:26   ` kernel test robot
2024-10-17 11:28   ` kernel test robot
2024-10-17 13:11   ` Francesco Dolcini [this message]
2024-10-17 13:13     ` Christian Marangi
2024-10-17 13:39       ` Francesco Dolcini
2024-10-16 17:35 ` [PATCH 1/2] dt-bindings: rng: " Rob Herring (Arm)

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=20241017131112.GA28955@francesco-nb \
    --to=francesco@dolcini.it \
    --cc=ansuelsmth@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=devicetree@vger.kernel.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=krzk+dt@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=olivia@selenic.com \
    --cc=robh@kernel.org \
    --cc=upstream@airoha.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).