From patchwork Tue Nov 19 06:14:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Brennan X-Patchwork-Id: 11250891 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6B7C109A for ; Tue, 19 Nov 2019 06:14:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 71D2420692 for ; Tue, 19 Nov 2019 06:14:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="m314i2hi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=brennan.io header.i=stephen@brennan.io header.b="cwmy2wB5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 71D2420692 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=brennan.io Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Date:Subject:Message-ID:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=lviASF6jaNyv8jeHGPk+0Irozv9NRq67c/7xiy0+g20=; b=m314i2hitBgVlN Ce7B7FCzhd1AJjl0CwENzooBtHyXyzDjNgJ9NTO0st5QBkSyNsUnNB3zys1fs1qBx2tUGs5lI/1Kx eDvp+sI4IzTMpF7u9lQ7XIsRYHoQleGmBl093o/BfeXO94F997K2eX0HooHS7RSPfGoj0hZX6z2+n AYP4H4JJFC09x3+deC91BEf+zqhYhzNn/7O/nnnVolfLcQUL8JRvdsl6h5Di6j8suB9+7qHPcfqTJ 3jL0hyTxAOYq3DVtH5dwgTaAm2go1y9jeIpq1A0vLb/OlQkC97EmMJPkKCZ0NglKnxraTpDgFvaIk hamR/91nz5bGy4dwHZgQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWwmX-0005HW-K2; Tue, 19 Nov 2019 06:14:33 +0000 Received: from sender4-of-o58.zoho.com ([136.143.188.58]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iWwmS-0005Gg-G4; Tue, 19 Nov 2019 06:14:32 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1574144058; cv=none; d=zohomail.com; s=zohoarc; b=FDZb191bVzzsmEhPHuSDRaaVt7KFIt6KQmswEHW57HA+Cvb8V+jTzRidED3Tjz7Xm96HWmBJ7KUDXQFl/wjoCpoaPSqhcNZQRr+QI1U97jojCKx5XpR+c1FKu2C/BpuLbqkIk0+59jlaUXPiT8tqqwLVOT0XK8sQTd8miJsEwcc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1574144058; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=c7L5ybwI41MQuUShcRtA57Ge+Ip1hk0Hb3ub23HMqaQ=; b=EVXnrACu/oK4Kz7ddwHdXs5N6VnpFcWRdQG9wf0BHjbCuxoDJM7S4BjU6QO8iYXtX681eQb1ErHkAvTEanYfEATZCIxq1Wkgi6i04HB+ajTd5RHK+VyHNi62Sfs6BEwZqyDs6yUQcFAUFTfV0iDJqtna60s3e/2DS9IpQH8AMpo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=brennan.io; spf=pass smtp.mailfrom=stephen@brennan.io; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1574144058; s=selector01; d=brennan.io; i=stephen@brennan.io; h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; l=1186; bh=c7L5ybwI41MQuUShcRtA57Ge+Ip1hk0Hb3ub23HMqaQ=; b=cwmy2wB55tgQXK/vQOWlD0swe4jSvp7d9+e6rK8Bvpfqq1lWyISr2Q+caX1K0uKJ iN4iRAVa+khnM2t8o0YWkT58iS9CLOjGLSYm89a2+NqqcvA+if0BGcX+3P3U22kjJqV gaYUl4LZ9JiVjTQYu9Gxf29gt7KjG/K0mdCxuxT0= Received: from localhost (195.173.24.136.in-addr.arpa [136.24.173.195]) by mx.zohomail.com with SMTPS id 1574144058311185.86846931854632; Mon, 18 Nov 2019 22:14:18 -0800 (PST) From: Stephen Brennan To: stephen@brennan.io Message-ID: <20191119061407.69911-1-stephen@brennan.io> Subject: [PATCH v2 0/3] Raspberry Pi 4 HWRNG Support Date: Mon, 18 Nov 2019 22:14:04 -0800 X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-ZohoMailClient: External X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191118_221428_593775_DE2FEF59 X-CRM114-Status: GOOD ( 12.33 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Florian Fainelli , Herbert Xu , Scott Branden , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, Ray Jui , linux-kernel@vger.kernel.org, Eric Anholt , Rob Herring , bcm-kernel-feedback-list@broadcom.com, Stefan Wahren , Matt Mackall , Arnd Bergmann , linux-crypto@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch series enables support for the HWRNG included on the Raspberry Pi 4. It is simply a rebase of Stefan's branch [1]. I went ahead and tested this out on a Pi 4. Prior to this patch series, attempting to use the hwrng gives: $ head -c 2 /dev/hwrng head: /dev/hwrng: Input/output error After this series, the same command gives two random bytes. Changes in v2: - specify the correct size for the region in the dts, refactor bcm283x rng --- Stefan Wahren (2): dt-bindings: rng: add BCM2711 RNG compatible hwrng: iproc-rng200: Add support for BCM2711 Stephen Brennan (1): ARM: dts: bcm2711: Enable HWRNG support .../devicetree/bindings/rng/brcm,iproc-rng200.txt | 1 + arch/arm/boot/dts/bcm2711.dtsi | 6 +++--- arch/arm/boot/dts/bcm2835.dtsi | 1 + arch/arm/boot/dts/bcm2836.dtsi | 1 + arch/arm/boot/dts/bcm2837.dtsi | 1 + arch/arm/boot/dts/bcm283x-common.dtsi | 11 +++++++++++ arch/arm/boot/dts/bcm283x.dtsi | 6 ------ drivers/char/hw_random/Kconfig | 2 +- drivers/char/hw_random/iproc-rng200.c | 1 + 9 files changed, 20 insertions(+), 10 deletions(-) create mode 100644 arch/arm/boot/dts/bcm283x-common.dtsi