From patchwork Sat Mar 16 22:56:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 1912834 X-Patchwork-Delegate: ykai007@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=kwiboo.se header.i=@kwiboo.se header.a=rsa-sha256 header.s=fe-e1b5cab7be header.b=KdkS215f; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4TxxNr5XXvz23sC for ; Sun, 17 Mar 2024 09:58:20 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 02D1188093; Sat, 16 Mar 2024 23:57:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=kwiboo.se header.i=@kwiboo.se header.b="KdkS215f"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 542E988091; Sat, 16 Mar 2024 23:57:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D5F4888096 for ; Sat, 16 Mar 2024 23:57:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=SRS0=8b2e=KX=kwiboo.se=jonas@fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1710629837; bh=6WHhb1pN9axaeXWgBwqMSAJ//8SndkGv37OheVC3NFs=; b=KdkS215fb/YH12sjNX480m+Hz7Q5hkXNlJw57FQvWrywv70EUJU1nHSKvpehePTwdHiLvQPnx l3a3OALZo1/nBH3d3+JbEE2nX+bs4YCcisRUfjlJ3bVa5kGgCK3xN2Y4z7lnPtpwaudqC2ChfQ9 9JnGb7b5CGGMJp31q3TuESFlANF6iSFlGKN/wJ+3pjYnFzUSW1/9Q9QBHvjVJqdc4xg+vIvowEz KqvM5rGMoBBl9yATzfkheAArRczSnPV97opbvEinDiYlUob2LJs55IiCELU0lCDyLLUtnYDxulA UYQ6ZYINU9ArV5W0v1lY+gBMkc9NINyV6QuVqvUt9XkQ== From: Jonas Karlman To: Kever Yang , Simon Glass , Philipp Tomsich , Tom Rini Cc: Andy Yan , Akash Gajjar , u-boot@lists.denx.de, Jonas Karlman Subject: [PATCH 05/13] rockchip: rk3308: Enable random generator Date: Sat, 16 Mar 2024 22:56:31 +0000 Message-ID: <20240316225655.3244348-6-jonas@kwiboo.se> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240316225655.3244348-1-jonas@kwiboo.se> References: <20240316225655.3244348-1-jonas@kwiboo.se> MIME-Version: 1.0 X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 65f623cd0957eaab7babfcd5 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The RK3308 SoC contain a crypto engine block that can generate random numbers. Add rng node to soc u-boot.dtsi and enable Kconfig options to take advantage of the random generator. Signed-off-by: Jonas Karlman --- arch/arm/dts/rk3308-u-boot.dtsi | 5 +++++ arch/arm/mach-rockchip/Kconfig | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/dts/rk3308-u-boot.dtsi b/arch/arm/dts/rk3308-u-boot.dtsi index 396fefb743cf..d6c71f62bc93 100644 --- a/arch/arm/dts/rk3308-u-boot.dtsi +++ b/arch/arm/dts/rk3308-u-boot.dtsi @@ -21,6 +21,11 @@ reg = <0x07 0x10>; }; }; + + rng: rng@ff2f0000 { + compatible = "rockchip,cryptov2-rng"; + reg = <0x0 0xff2f0000 0x0 0x4000>; + }; }; &cru { diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig index 6e07a70bf4ae..fa5917236a43 100644 --- a/arch/arm/mach-rockchip/Kconfig +++ b/arch/arm/mach-rockchip/Kconfig @@ -162,9 +162,11 @@ config ROCKCHIP_RK3308 select SPL_LOAD_FIT imply ARMV8_CRYPTO imply ARMV8_SET_SMPEN + imply DM_RNG imply LEGACY_IMAGE_FORMAT imply MISC imply MISC_INIT_R + imply RNG_ROCKCHIP imply ROCKCHIP_COMMON_BOARD imply ROCKCHIP_OTP imply SPL_CLK