Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D9F93C2BBCA for ; Fri, 28 Jun 2024 09:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Li0J7JFTJBqy3Pt4fk7663jjXmqs9LaTZgTVr0VEN2Q=; b=WEQ8iTPcOl7bZ+LGJa9rC8DPWu D1Uyxh+5vBK0PfrUnI43gez4KqTP0GhDN8RZBfGyd5WejO71ZXMaXjnLzLxYIEaezYMLBCcMTf0uH 6l51iTXXeLy2ORnVDKdDunt/ZjBHsQwEdWIfR4p2IfkKomDxpFoyHU4PquQoPKJ5GAVI5uCVfQb3k uxuHWDx3PD37CNu9KBRcAoLJgQ2MQWES9q+YSd7EdD7/9XyZGLm/671i4NemUHKB8RLXkGRJCxtoK lTIy5uXZOwA3JlpkEhMDzhjUBL9Te+IKNpO0qn+tcZTj2UdJShV64pw5dhqZalMp5EXeoRVPfrRIK HdJlk2BA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN7w3-0000000DGBX-0CtV; Fri, 28 Jun 2024 09:30:27 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sN7vs-0000000DGAg-3Mo5 for linux-arm-kernel@lists.infradead.org; Fri, 28 Jun 2024 09:30:18 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D8EEB106F; Fri, 28 Jun 2024 02:30:38 -0700 (PDT) Received: from donnerap.manchester.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id F0FEF3F6A8; Fri, 28 Jun 2024 02:30:11 -0700 (PDT) Date: Fri, 28 Jun 2024 10:30:07 +0100 From: Andre Przywara To: Chen-Yu Tsai Cc: Corentin Labbe , Herbert Xu , "David S . Miller" , Jernej Skrabec , Samuel Holland , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ryan Walklin , Philippe Simons , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org Subject: Re: [PATCH v2 4/4] arm64: dts: allwinner: h616: add crypto engine node Message-ID: <20240628103007.6ea3685c@donnerap.manchester.arm.com> In-Reply-To: References: <20240624232110.9817-1-andre.przywara@arm.com> <20240624232110.9817-5-andre.przywara@arm.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240628_023016_919246_4A03B100 X-CRM114-Status: GOOD ( 21.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 28 Jun 2024 01:54:00 +0800 Chen-Yu Tsai wrote: Hi Chen-Yu, > On Tue, Jun 25, 2024 at 7:23=E2=80=AFAM Andre Przywara wrote: > > > > The Allwinner H616 SoC contains a crypto engine very similar to the H6 > > version, but with all base addresses in the DMA descriptors shifted by > > two bits. This requires a new compatible string. > > Also the H616 CE relies on the internal osciallator for the TRNG > > operation, so we need to reference this clock. > > > > Signed-off-by: Andre Przywara > > --- > > arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm6= 4/boot/dts/allwinner/sun50i-h616.dtsi > > index 921d5f61d8d6a..187663d45ed72 100644 > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi > > @@ -113,6 +113,16 @@ soc { > > #size-cells =3D <1>; > > ranges =3D <0x0 0x0 0x0 0x40000000>; > > > > + crypto: crypto@1904000 { > > + compatible =3D "allwinner,sun50i-h616-crypto"; > > + reg =3D <0x01904000 0x1000>; =20 >=20 > The address range only goes up to 0x019047ff. The other half is the > secure crypto engine. The other bits look correct. You are right, the manual restricts CE_NS to 0x019047ff, and we certainly use much less registers than that anyway. So good catch! > I can fix this up when applying, assuming the driver parts get merged > in the next few days. Many thanks, I'd be very grateful if you could fix this up! Cheers, Andre >=20 > Chenyu >=20 > > + interrupts =3D ; > > + clocks =3D <&ccu CLK_BUS_CE>, <&ccu CLK_CE>, > > + <&ccu CLK_MBUS_CE>, <&rtc CLK_IOSC>; > > + clock-names =3D "bus", "mod", "ram", "trng"; > > + resets =3D <&ccu RST_BUS_CE>; > > + }; > > + > > syscon: syscon@3000000 { > > compatible =3D "allwinner,sun50i-h616-system-co= ntrol"; > > reg =3D <0x03000000 0x1000>; > > -- > > 2.39.4 > > =20