From patchwork Sat Nov 12 14:10:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 1547 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1288172wru; Sat, 12 Nov 2022 06:13:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf552vxJ702FLsjzPIX4pNq4j9EZrAsDmYH5OSV3a48X/e3Q7VatkWV1nnFyHWQRFnQ5NPGh X-Received: by 2002:a63:1666:0:b0:46f:9763:a37b with SMTP id 38-20020a631666000000b0046f9763a37bmr5558218pgw.177.1668262426223; Sat, 12 Nov 2022 06:13:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668262426; cv=none; d=google.com; s=arc-20160816; b=ogsfWvlGu/W52hbFqFuTrCsfZenxI8Qk5U06PD1caU9Dwnr6yxViBtKNVFRVN3kxmW DzAHC2AVQAF6p4lLV5KM1eu6XLoDh4fAC+xmEauGjcgzJfR1jm3wLTD9y39ASVUIYr2Q /H7CD0y9p7NMcGq7i56nK0sAKJ+W1Nc3XXoFA3w9RKhjnjX6JdoLXVGy9n1ilHKK8/aJ FAA2Q+MlS+MbwUdTTIiWYjkAJR06Dn6wIpK9mniGYrQdxOXlF/LsDMqJ0tkqELbu/E93 euoEf78BNZygTc4J5hNxfvRdSB/HJ44RBlGi9vUfXGmvSsvjWwy+kvCDxlu8NUFxsPM7 ST2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qDnpKfCINF8AaQCM/kdrtaCelB7JbA9OSxlcTKm9qWQ=; b=bQbru7NTdeKeEwUG7ezf9ZkGpmO4ZZT+qi6Wi+BIaosuR2SOygzHaTw8Xh5Uedb25w O3KP6ReAEpvsXHyzyxeARV3SPuEb2ALSJnq0uLAxFrw1c+VNST67fYuO8wlW60WwY3xS F+CFpiEmjtN4gxUma3nb0vxKvvXlL3hkOM6AWdFk8SVVQA2I2/xH0sAKzCBQBG3Sopwg CsQrsJdgYWo7s0GWdvg71BHwnDEKOk8GajYmUs6EPDDK6/aj8IjB62LduIbOqWwLX69L NH7cjN02P78QdUqrCgyWItLxvBerwyY+guE6YpFxuEpZD3rNv1cdQWEK4/dsN7GQZE2m c0pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@aurel32.net header.s=202004.hall header.b=pNulBD0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c18-20020a170903235200b001842f55e713si5785651plh.321.2022.11.12.06.13.32; Sat, 12 Nov 2022 06:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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; dkim=pass header.i=@aurel32.net header.s=202004.hall header.b=pNulBD0g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234894AbiKLOLq (ORCPT + 99 others); Sat, 12 Nov 2022 09:11:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230170AbiKLOLl (ORCPT ); Sat, 12 Nov 2022 09:11:41 -0500 Received: from hall.aurel32.net (hall.aurel32.net [IPv6:2001:bc8:30d7:100::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E801510B6D; Sat, 12 Nov 2022 06:11:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aurel32.net ; s=202004.hall; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date: Subject:Cc:To:From:Content-Type:From:Reply-To:Subject:Content-ID: Content-Description:In-Reply-To:References:X-Debbugs-Cc; bh=qDnpKfCINF8AaQCM/kdrtaCelB7JbA9OSxlcTKm9qWQ=; b=pNulBD0gRNWpXF4O08o85Nzx/h LZR1zb0kVwNQXbGunQUaplLJIu0Zn1xOZjQJizpv07a/KfEhzHtqnUI7eeWoR/04uxvIMie0y2lxI fL1F0gy0GeEJtcmAKt2nn3mUUi/nza8wNegRPq8YW7myY9NgnNSrnt3QmlMD82DZg1H6CKwwKymYG t0VTWA6AzJZaCEhqY/1G0T17nkSuSn4Ce6kceqnX6+SmGTS2pDlgdBm5XbDZa+aPaMbQ70gnYUOp5 oVmvzrFh9yHw5odv4rE+I2ad4X+s+XXu7dIGRcB87nkMJdxxyD+YCz4fYtxeqb/1fG+GGUVzrVpCZ 0uNOOnSQ==; Received: from [2a01:e34:ec5d:a741:8a4c:7c4e:dc4c:1787] (helo=ohm.rr44.fr) by hall.aurel32.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1otrE5-00AbQy-GS; Sat, 12 Nov 2022 15:11:17 +0100 Received: from aurel32 by ohm.rr44.fr with local (Exim 4.96) (envelope-from ) id 1otrE4-00FxDe-2G; Sat, 12 Nov 2022 15:11:16 +0100 From: Aurelien Jarno To: Olivia Mackall , Herbert Xu , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Philipp Zabel , Lin Jinhan Cc: linux-crypto@vger.kernel.org (open list:HARDWARE RANDOM NUMBER GENERATOR CORE), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-rockchip@lists.infradead.org (open list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list), Aurelien Jarno Subject: [PATCH v1 0/3] hwrng: add hwrng support for Rockchip RK3568 Date: Sat, 12 Nov 2022 15:10:56 +0100 Message-Id: <20221112141059.3802506-1-aurelien@aurel32.net> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=ham 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749299941768834823?= X-GMAIL-MSGID: =?utf-8?q?1749299941768834823?= Rockchip SoCs used to have a random number generator as part of their crypto device, and support for it has to be added to the corresponding driver. However newer Rockchip SoCs like the RK3568 have an independent True Random Number Generator device. This patchset adds a driver for it and enable it in the device tree. Aurelien Jarno (3): dt-bindings: RNG: Add Rockchip RNG bindings hwrng: add Rockchip SoC hwrng driver arm64: dts: rockchip: add DT entry for RNG to RK356x .../devicetree/bindings/rng/rockchip-rng.yaml | 62 +++++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 9 + drivers/char/hw_random/Kconfig | 14 + drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/rockchip-rng.c | 251 ++++++++++++++++++ 5 files changed, 337 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/rockchip-rng.yaml create mode 100644 drivers/char/hw_random/rockchip-rng.c