mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Alexander Shiyan <eagle.alexander923@gmail.com>,
	barebox@lists.infradead.org
Subject: Re: [PATCH] ARM: dts: rk356x: Use RNG node from upstream DTSI
Date: Wed, 11 Dec 2024 07:51:55 +0100	[thread overview]
Message-ID: <21e1572a-2b18-45c8-b367-ef147c4a1dce@pengutronix.de> (raw)
In-Reply-To: <20241211063248.4774-1-eagle.alexander923@gmail.com>

Hi,

On 11.12.24 07:32, Alexander Shiyan wrote:
> Since the RNG node was added to the upstream DTSI, let's reuse it.
> Keep the compatibility string to support the barebox HWRNG driver.
> 
> Signed-off-by: Alexander Shiyan <eagle.alexander923@gmail.com>
> ---
>  arch/arm/dts/rk356x.dtsi | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm/dts/rk356x.dtsi b/arch/arm/dts/rk356x.dtsi
> index fbabf2a6a6..1a51b9f1b9 100644
> --- a/arch/arm/dts/rk356x.dtsi
> +++ b/arch/arm/dts/rk356x.dtsi
> @@ -44,14 +44,6 @@ cpu_id: id@a {
>  			reg = <0x0a 0x10>;
>  		};
>  	};
> -
> -	rng: rng@fe388000 {
> -		compatible = "rockchip,rk3568-rng", "rockchip,cryptov2-rng";
> -		reg = <0x0 0xfe388000 0x0 0x2000>;
> -		clocks = <&cru CLK_TRNG_NS>, <&cru HCLK_TRNG_NS>;
> -		clock-names = "trng_clk", "trng_hclk";
> -		resets = <&cru SRST_TRNG_NS>;
> -	};
>  };
>  
>  &pmugrf {
> @@ -62,3 +54,7 @@ reboot_mode_pmugrf: reboot-mode {
>  		mode-serial = <0xef08a53c>; /* rk-usb-loader */
>  	};
>  };
> +
> +&rng {
> +	compatible = "rockchip,rk3568-rng", "rockchip,cryptov2-rng";

Now that there is an upstream compatible binding, I think we should
just add "rockchip,rk3568-rng" compatible to the RNG driver
and drop our DT override completely.

Interestingly, upstream enables the node only for the rk3568 and not
the rk3566. The reasoning appears to be that the rk3566 has way lower
quality than expected and enabling it is unsafe[1].

I think we should follow suit in barebox, but it's appropriate for
the commit message to point out that this change disables the
HWRNG on the RK3566.

[1]: https://lore.kernel.org/all/302bdae2f4defeefe88ea4018a0be11f@manjaro.org/

Cheers,
Ahmad

> +};


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      reply	other threads:[~2024-12-11  6:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11  6:32 Alexander Shiyan
2024-12-11  6:51 ` Ahmad Fatoum [this message]

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=21e1572a-2b18-45c8-b367-ef147c4a1dce@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=eagle.alexander923@gmail.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