Message ID | 20221130055214.2416888-7-jiajie.ho@starfivetech.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp746527wrr; Tue, 29 Nov 2022 21:58:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf7j4NoohJOS6Mn0V1Oj+jZ13poNFgz1Fu3CtFpyPUwVl49vGc6f7TgSvU/XwAe87AH1qXMa X-Received: by 2002:a17:902:cad3:b0:189:8b52:cee7 with SMTP id y19-20020a170902cad300b001898b52cee7mr13672127pld.62.1669787906504; Tue, 29 Nov 2022 21:58:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669787906; cv=none; d=google.com; s=arc-20160816; b=GEdL/kUhQ7sfXf1+WoXgmQe6mAo2BrRP5r3wJJ9gFJPoC5VDIii57LmEVm/pqALk1l VYBwh+lUEc1w2I/ZnGoh0QkaSkgeqxE1IaJFUIKEkyH9gS9BQYv90DTpEA6GQaWE3l0c MO3+P2kQ1oR/Uc7whpFCb3zFY/jvpKf/uwP0N+XSYMVabd/O3M1Eg5hE5y+gksMaur0+ rcdwbOINL7Fr6FNTYr+zz7Nd+JInSRy//IkSCEISPftJTj4u7ZrNBfvM9vru8G75S1/0 jGV7o6Ow03Lj+sJiATz94oCn/X+0Gmqas56w3+GiB3XMZ4Ez7TZz2lOeWLR4bxU0jpE/ bmTQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1CtWxtrykMLPcyilOL1SRJavPCwBsPrCZcOz13fR8f4=; b=naHPOJvhfKkmGweb9fqOtgf9SKk4h99EY8oX8g/Ol0KAPpIPbB/0zDbwKIblmdTT7u OZKioIKf9t9AKxuanlvK2dtLpsG3e9hf2v2akYjRnV2hTUiG1YZioWClDtgh/Cc9NOlC 5pLMtfGonDuzEAESp6POfhg2zS3SWMDGPhIkBh4LZZxaDnHjKukPNMaZEwdkKAJIbZr+ twGLZadqNo2AS9D9NHQ96NzmNVREOrZ/rFqqyF5la+hNDC+pKZxgA9N/omtU5/fERJpv QHo6rGRGBvv9xu862ClUQ+ldSElHiwF5ozsKZNml+OHevyH3j03PYn3Mq0m2j/YggN0w T0Tw== ARC-Authentication-Results: i=1; mx.google.com; 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 o6-20020a170902d4c600b001897a0f7025si439605plg.309.2022.11.29.21.58.13; Tue, 29 Nov 2022 21:58:26 -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; 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 S233769AbiK3Fzi convert rfc822-to-8bit (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 30 Nov 2022 00:55:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233609AbiK3Fz2 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 30 Nov 2022 00:55:28 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9601C654FD; Tue, 29 Nov 2022 21:55:27 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 1925A24E31C; Wed, 30 Nov 2022 13:52:46 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:46 +0800 Received: from ubuntu.localdomain (202.188.176.82) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:42 +0800 From: Jia Jie Ho <jiajie.ho@starfivetech.com> To: Herbert Xu <herbert@gondor.apana.org.au>, "David S . Miller" <davem@davemloft.net>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> CC: <linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>, Jia Jie Ho <jiajie.ho@starfivetech.com> Subject: [PATCH 6/6] riscv: dts: starfive: Add crypto and DMA node for VisionFive 2 Date: Wed, 30 Nov 2022 13:52:14 +0800 Message-ID: <20221130055214.2416888-7-jiajie.ho@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221130055214.2416888-1-jiajie.ho@starfivetech.com> References: <20221130055214.2416888-1-jiajie.ho@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750899523508273834?= X-GMAIL-MSGID: =?utf-8?q?1750899523508273834?= |
Series |
crypto: starfive: Add driver for cryptographic engine
|
|
Commit Message
JiaJie Ho
Nov. 30, 2022, 5:52 a.m. UTC
Adding StarFive crypto IP and DMA controller node to VisionFive 2 SoC. Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Signed-off-by: Huan Feng <huan.feng@starfivetech.com> --- .../jh7110-starfive-visionfive-v2.dts | 8 +++++ arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 +++++++++++++++++++ 2 files changed, 44 insertions(+)
Comments
Hey Jia Jie Ho, On 30/11/2022 05:52, Jia Jie Ho wrote: > [You don't often get email from jiajie.ho@starfivetech.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > Adding StarFive crypto IP and DMA controller node > to VisionFive 2 SoC. > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> Out of curiosity, what was Huan Feng's contribution to this patch? Did they co-develop it, or is there some other reason? > --- > .../jh7110-starfive-visionfive-v2.dts | 8 +++++ > arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 +++++++++++++++++++ I figure Emil will likely see anyway, but whenever you get actual review comments and send a v2 - please don't drop people that get_maintainer.pl tells you are responsible for the code in question. > 2 files changed, 44 insertions(+) > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > index 450e920236a5..da2aa4d597f3 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > @@ -115,3 +115,11 @@ &tdm_ext { > &mclk_ext { > clock-frequency = <49152000>; > }; > + > +&sec_dma { > + status = "okay"; > +}; > + > +&crypto { > + status = "okay"; > +}; In what scenario would you not want to have these enabled? Thanks, Conor. > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 4ac159d79d66..745a5650882c 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -455,5 +455,41 @@ uart5: serial@12020000 { > reg-shift = <2>; > status = "disabled"; > }; > + > + sec_dma: sec_dma@16008000 { > + compatible = "arm,pl080", "arm,primecell"; > + arm,primecell-periphid = <0x00041080>; > + reg = <0x0 0x16008000 0x0 0x4000>; > + reg-names = "sec_dma"; > + interrupts = <29>; > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; > + clock-names = "sec_hclk","apb_pclk"; > + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; > + reset-names = "sec_hre"; > + lli-bus-interface-ahb1; > + mem-bus-interface-ahb1; > + memcpy-burst-size = <256>; > + memcpy-bus-width = <32>; > + #dma-cells = <2>; > + status = "disabled"; > + }; > + > + crypto: crypto@16000000 { > + compatible = "starfive,jh7110-crypto"; > + reg = <0x0 0x16000000 0x0 0x4000>; > + reg-names = "secreg"; > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; > + clock-names = "sec_hclk","sec_ahb"; > + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; > + reset-names = "sec_hre"; > + enable-side-channel-mitigation; > + enable-dma; > + dmas = <&sec_dma 1 2>, > + <&sec_dma 0 2>; > + dma-names = "sec_m","sec_p"; > + status = "disabled"; > + }; > }; > }; > -- > 2.25.1 > > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv
On 30/11/2022 06:52, Jia Jie Ho wrote: > Adding StarFive crypto IP and DMA controller node > to VisionFive 2 SoC. > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > --- > .../jh7110-starfive-visionfive-v2.dts | 8 +++++ > arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 +++++++++++++++++++ > 2 files changed, 44 insertions(+) > > diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > index 450e920236a5..da2aa4d597f3 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > @@ -115,3 +115,11 @@ &tdm_ext { > &mclk_ext { > clock-frequency = <49152000>; > }; > + > +&sec_dma { > + status = "okay"; > +}; > + > +&crypto { > + status = "okay"; > +}; > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi > index 4ac159d79d66..745a5650882c 100644 > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > @@ -455,5 +455,41 @@ uart5: serial@12020000 { > reg-shift = <2>; > status = "disabled"; > }; > + > + sec_dma: sec_dma@16008000 { Node names should be generic. https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation No underscores in node names. Does not look like you tested the DTS against bindings. Please run `make dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst for instructions). Best regards, Krzysztof
> -----Original Message----- > From: Conor.Dooley@microchip.com <Conor.Dooley@microchip.com> > Sent: Wednesday, November 30, 2022 5:31 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: robh+dt@kernel.org; herbert@gondor.apana.org.au; linux- > crypto@vger.kernel.org; kernel@esmil.dk; davem@davemloft.net; > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > riscv@lists.infradead.org; krzysztof.kozlowski+dt@linaro.org > Subject: Re: [PATCH 6/6] riscv: dts: starfive: Add crypto and DMA node for > VisionFive 2 > > Hey Jia Jie Ho, > > On 30/11/2022 05:52, Jia Jie Ho wrote: > > [You don't often get email from jiajie.ho@starfivetech.com. Learn why > > this is important at https://aka.ms/LearnAboutSenderIdentification ] > > > > EXTERNAL EMAIL: Do not click links or open attachments unless you know > > the content is safe > > > > Adding StarFive crypto IP and DMA controller node to VisionFive 2 SoC. > > > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > > Out of curiosity, what was Huan Feng's contribution to this patch? > Did they co-develop it, or is there some other reason? > Hi Conor, Yes, Huan Feng co-developed this driver. > > --- > > .../jh7110-starfive-visionfive-v2.dts | 8 +++++ > > arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 +++++++++++++++++++ > > I figure Emil will likely see anyway, but whenever you get actual review > comments and send a v2 - please don't drop people that get_maintainer.pl > tells you are responsible for the code in question. > I will include everyone involved when sending the new patch series. > > 2 files changed, 44 insertions(+) > > > > diff --git > > a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > index 450e920236a5..da2aa4d597f3 100644 > > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > @@ -115,3 +115,11 @@ &tdm_ext { > > &mclk_ext { > > clock-frequency = <49152000>; > > }; > > + > > +&sec_dma { > > + status = "okay"; > > +}; > > + > > +&crypto { > > + status = "okay"; > > +}; > > In what scenario would you not want to have these enabled? > > Thanks, > Conor. > These drivers are always enabled. Is everything ok with the dts node entries? Thank you for spending time reviewing and providing suggestions for this patch. Regards, Jia Jie > > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > index 4ac159d79d66..745a5650882c 100644 > > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > @@ -455,5 +455,41 @@ uart5: serial@12020000 { > > reg-shift = <2>; > > status = "disabled"; > > }; > > + > > + sec_dma: sec_dma@16008000 { > > + compatible = "arm,pl080", "arm,primecell"; > > + arm,primecell-periphid = <0x00041080>; > > + reg = <0x0 0x16008000 0x0 0x4000>; > > + reg-names = "sec_dma"; > > + interrupts = <29>; > > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; > > + clock-names = "sec_hclk","apb_pclk"; > > + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; > > + reset-names = "sec_hre"; > > + lli-bus-interface-ahb1; > > + mem-bus-interface-ahb1; > > + memcpy-burst-size = <256>; > > + memcpy-bus-width = <32>; > > + #dma-cells = <2>; > > + status = "disabled"; > > + }; > > + > > + crypto: crypto@16000000 { > > + compatible = "starfive,jh7110-crypto"; > > + reg = <0x0 0x16000000 0x0 0x4000>; > > + reg-names = "secreg"; > > + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, > > + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; > > + clock-names = "sec_hclk","sec_ahb"; > > + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; > > + reset-names = "sec_hre"; > > + enable-side-channel-mitigation; > > + enable-dma; > > + dmas = <&sec_dma 1 2>, > > + <&sec_dma 0 2>; > > + dma-names = "sec_m","sec_p"; > > + status = "disabled"; > > + }; > > }; > > }; > > -- > > 2.25.1 > > > > > > _______________________________________________ > > linux-riscv mailing list > > linux-riscv@lists.infradead.org > > http://lists.infradead.org/mailman/listinfo/linux-riscv
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Wednesday, November 30, 2022 9:22 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com>; Herbert Xu > <herbert@gondor.apana.org.au>; David S . Miller <davem@davemloft.net>; > Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org> > Cc: linux-crypto@vger.kernel.org; devicetree@vger.kernel.org; linux- > kernel@vger.kernel.org; linux-riscv@lists.infradead.org > Subject: Re: [PATCH 6/6] riscv: dts: starfive: Add crypto and DMA node for > VisionFive 2 > > On 30/11/2022 06:52, Jia Jie Ho wrote: > > Adding StarFive crypto IP and DMA controller node to VisionFive 2 SoC. > > > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > > --- > > .../jh7110-starfive-visionfive-v2.dts | 8 +++++ > > arch/riscv/boot/dts/starfive/jh7110.dtsi | 36 +++++++++++++++++++ > > 2 files changed, 44 insertions(+) > > > > diff --git > > a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > index 450e920236a5..da2aa4d597f3 100644 > > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > @@ -115,3 +115,11 @@ &tdm_ext { > > &mclk_ext { > > clock-frequency = <49152000>; > > }; > > + > > +&sec_dma { > > + status = "okay"; > > +}; > > + > > +&crypto { > > + status = "okay"; > > +}; > > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > index 4ac159d79d66..745a5650882c 100644 > > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > @@ -455,5 +455,41 @@ uart5: serial@12020000 { > > reg-shift = <2>; > > status = "disabled"; > > }; > > + > > + sec_dma: sec_dma@16008000 { > > Node names should be generic. > https://devicetree-specification.readthedocs.io/en/latest/chapter2- > devicetree-basics.html#generic-names-recommendation > > No underscores in node names. > > Does not look like you tested the DTS against bindings. Please run `make > dtbs_check` (see Documentation/devicetree/bindings/writing-schema.rst > for instructions). I'll fix the node name and run dtbs_check for the revised series. Really appreciate your time and effort reviewing this patch. Thanks, Jia Jie
On Thu, Dec 01, 2022 at 06:17:26AM +0000, JiaJie Ho wrote: > > -----Original Message----- > > From: Conor.Dooley@microchip.com <Conor.Dooley@microchip.com> > > Hey Jia Jie Ho, > > > > On 30/11/2022 05:52, Jia Jie Ho wrote: > > > [You don't often get email from jiajie.ho@starfivetech.com. Learn why > > > this is important at https://aka.ms/LearnAboutSenderIdentification ] > > > > > > EXTERNAL EMAIL: Do not click links or open attachments unless you know > > > the content is safe > > > > > > Adding StarFive crypto IP and DMA controller node to VisionFive 2 SoC. > > > > > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > > > > Out of curiosity, what was Huan Feng's contribution to this patch? > > Did they co-develop it, or is there some other reason? > > > Hi Conor, > Yes, Huan Feng co-developed this driver. In that case, the SoB block should look like: Co-developed-by: Huan Feng <huan.feng@starfivetech.com> Signed-off-by: Huan Feng <huan.feng@starfivetech.com> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Similarly for any other patches they may have co-developed :) > > > > > > diff --git > > > a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > > b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > > index 450e920236a5..da2aa4d597f3 100644 > > > --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > > +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts > > > @@ -115,3 +115,11 @@ &tdm_ext { > > > &mclk_ext { > > > clock-frequency = <49152000>; > > > }; > > > + > > > +&sec_dma { > > > + status = "okay"; > > > +}; > > > + > > > +&crypto { > > > + status = "okay"; > > > +}; > > > > In what scenario would you not want to have these enabled? > These drivers are always enabled. > Is everything ok with the dts node entries? If the hardware is always present, why not drop the "disabled" in jh7110.dtsi & these two entries marking them as "okay" in the .dts? > > > diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > > b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > > index 4ac159d79d66..745a5650882c 100644 > > > --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi > > > +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi > > > @@ -455,5 +455,41 @@ uart5: serial@12020000 { > > > reg-shift = <2>; > > > status = "disabled"; > > > }; > > > + > > > + sec_dma: sec_dma@16008000 { > > > + status = "disabled"; > > > + }; > > > + > > > + crypto: crypto@16000000 { > > > + status = "disabled"; > > > + }; > > > }; > > > }; Thanks, Conor.
> -----Original Message----- > From: Conor Dooley <conor@kernel.org> > Sent: Friday, December 2, 2022 2:04 AM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: Conor.Dooley@microchip.com; robh+dt@kernel.org; > herbert@gondor.apana.org.au; linux-crypto@vger.kernel.org; > kernel@esmil.dk; davem@davemloft.net; devicetree@vger.kernel.org; > linux-kernel@vger.kernel.org; linux-riscv@lists.infradead.org; > krzysztof.kozlowski+dt@linaro.org > Subject: Re: [PATCH 6/6] riscv: dts: starfive: Add crypto and DMA node for > VisionFive 2 > > On Thu, Dec 01, 2022 at 06:17:26AM +0000, JiaJie Ho wrote: > > > -----Original Message----- > > > From: Conor.Dooley@microchip.com <Conor.Dooley@microchip.com> > > In that case, the SoB block should look like: > > Co-developed-by: Huan Feng <huan.feng@starfivetech.com> > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > Similarly for any other patches they may have co-developed :) > I'll add these in the v2. > If the hardware is always present, why not drop the "disabled" in jh7110.dtsi > & these two entries marking them as "okay" in the .dts? > Okay, I'll update these too. Thanks again for the suggestions. Best regards, Jia Jie
diff --git a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts index 450e920236a5..da2aa4d597f3 100644 --- a/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts +++ b/arch/riscv/boot/dts/starfive/jh7110-starfive-visionfive-v2.dts @@ -115,3 +115,11 @@ &tdm_ext { &mclk_ext { clock-frequency = <49152000>; }; + +&sec_dma { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; diff --git a/arch/riscv/boot/dts/starfive/jh7110.dtsi b/arch/riscv/boot/dts/starfive/jh7110.dtsi index 4ac159d79d66..745a5650882c 100644 --- a/arch/riscv/boot/dts/starfive/jh7110.dtsi +++ b/arch/riscv/boot/dts/starfive/jh7110.dtsi @@ -455,5 +455,41 @@ uart5: serial@12020000 { reg-shift = <2>; status = "disabled"; }; + + sec_dma: sec_dma@16008000 { + compatible = "arm,pl080", "arm,primecell"; + arm,primecell-periphid = <0x00041080>; + reg = <0x0 0x16008000 0x0 0x4000>; + reg-names = "sec_dma"; + interrupts = <29>; + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; + clock-names = "sec_hclk","apb_pclk"; + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; + reset-names = "sec_hre"; + lli-bus-interface-ahb1; + mem-bus-interface-ahb1; + memcpy-burst-size = <256>; + memcpy-bus-width = <32>; + #dma-cells = <2>; + status = "disabled"; + }; + + crypto: crypto@16000000 { + compatible = "starfive,jh7110-crypto"; + reg = <0x0 0x16000000 0x0 0x4000>; + reg-names = "secreg"; + clocks = <&stgcrg JH7110_STGCLK_SEC_HCLK>, + <&stgcrg JH7110_STGCLK_SEC_MISCAHB>; + clock-names = "sec_hclk","sec_ahb"; + resets = <&stgcrg JH7110_STGRST_SEC_TOP_HRESETN>; + reset-names = "sec_hre"; + enable-side-channel-mitigation; + enable-dma; + dmas = <&sec_dma 1 2>, + <&sec_dma 0 2>; + dma-names = "sec_m","sec_p"; + status = "disabled"; + }; }; };