Message ID | 20221130055214.2416888-6-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 q4csp745980wrr; Tue, 29 Nov 2022 21:56:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf7DQspvYs+dFcjmktMIrbTf/fx25luLIaE4EegVjDnKneYP4PNpRoCk4W/ulrUxTyPVgU43 X-Received: by 2002:a05:6a00:368e:b0:574:ead0:7c22 with SMTP id dw14-20020a056a00368e00b00574ead07c22mr20019935pfb.9.1669787775728; Tue, 29 Nov 2022 21:56:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669787775; cv=none; d=google.com; s=arc-20160816; b=kAZMaGgrISM05UszMMTrQkOYZKdQbUf1I57sKFCADfDWXUTu3fCernFEeiLHDQCyNP eFITzA8dIOG3ujeFtaHRgK29p20BXTzbWofSGMvz0hmLc84qsumzhWD8c3QmUsDQxO8C y8hfbSIvJyXT4MBgksTNIjjc8mM1TwohylmSVYbZ+++/tWKGlD0MX4FuSrGRwNbp9s2L ghed60vfo92hBAcohqErcHElXSSCxZ/bIY5yQP9kTFvq88n97lElfOjW+9lmTRTUd4u+ aNZlRKrJD2YqPta1NFqxoXxNYTW4D7+ph0zQghajAXfLY/e98MqXY1X0EMVJHCCogqcc 3RDg== 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=6ZVtKewytzZdVf+Iq1eVdyYR+rKXfvfg9ltz1YqSdDc=; b=hGZcSmvxgWtywUKGrMeHjv/Lcj8O0m7lxrZd0wrrVM3xLy3jbu9HhEASHvZKBWV6JZ HdQAW/8b2zRv47yIlNDnrL7tZsUBZKvpW7mbDSvZ70V6/y6vCA6b1qLoIT4LqiYIbH+Z 4GDVjRQzZoZKl5rENfNEgZqb5cF0UxiDb1tS2wCtB6t4SyV+nu/s15G8toQS+Cl9A1ii ZRhtotXYri6CpzeBaAT1yVbQmjYtv1+z7XXQ1wOq2Arg9G/EtkFPsfKJdzSBkw0owHC0 LIzbJ0M76WzIiTsDbc0R39tAnJK1+EWXAkyMLpnqL+nmyMNYehrjr+3iEB15irVwrYHt 8Zeg== 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 b10-20020a056a000a8a00b0056d3f75ea65si882451pfl.117.2022.11.29.21.56.03; Tue, 29 Nov 2022 21:56:15 -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 S233512AbiK3Fz1 convert rfc822-to-8bit (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 30 Nov 2022 00:55:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230033AbiK3FzZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 30 Nov 2022 00:55:25 -0500 X-Greylist: delayed 181 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 29 Nov 2022 21:55:24 PST Received: from ex01.ufhost.com (ex01.ufhost.com [61.152.239.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EBED654D6; Tue, 29 Nov 2022 21:55:24 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by ex01.ufhost.com (Postfix) with ESMTP id 533A924E1FE; Wed, 30 Nov 2022 13:52:42 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 30 Nov 2022 13:52:42 +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:38 +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 5/6] dt-bindings: crypto: Add bindings for Starfive crypto driver Date: Wed, 30 Nov 2022 13:52:13 +0800 Message-ID: <20221130055214.2416888-6-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,SPF_HELO_NONE, 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?1750899386624644600?= X-GMAIL-MSGID: =?utf-8?q?1750899386624644600?= |
Series |
crypto: starfive: Add driver for cryptographic engine
|
|
Commit Message
JiaJie Ho
Nov. 30, 2022, 5:52 a.m. UTC
Add documentation to describe Starfive crypto driver bindings. Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> Signed-off-by: Huan Feng <huan.feng@starfivetech.com> --- .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/crypto/starfive-crypto.yaml
Comments
On 30/11/2022 06:52, Jia Jie Ho wrote: > Add documentation to describe Starfive crypto > driver bindings. Please wrap commit message according to Linux coding style / submission process: https://elixir.bootlin.com/linux/v5.18-rc4/source/Documentation/process/submitting-patches.rst#L586 Subject: drop second, redundant "bindings". > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > --- > .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ > 1 file changed, 109 insertions(+) > create mode 100644 Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > diff --git a/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > new file mode 100644 > index 000000000000..6b852f774c32 > --- /dev/null > +++ b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml Filename based on compatible, so starfive,jh7110-crypto.yaml > @@ -0,0 +1,109 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/crypto/starfive-crypto.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: StarFive Crypto Controller Device Tree Bindings Drop "Device Tree Bindings" > + > +maintainers: > + - Jia Jie Ho <jiajie.ho@starfivetech.com> > + - William Qiu <william.qiu@starfivetech.com> > + > +properties: > + compatible: > + const: starfive,jh7110-crypto > + > + reg: > + maxItems: 1 > + > + reg-names: > + items: > + - const: secreg Why do you need reg-names for one entry? > + > + clocks: > + items: > + - description: Hardware reference clock > + - description: AHB reference clock > + > + clock-names: > + items: > + - const: sec_hclk > + - const: sec_ahb sec seems redundant, so just "ahb". The first clock then "hclk" or "ref"? > + > + interrupts: > + items: > + - description: Interrupt pin for algo completion > + - description: Interrupt pin for DMA transfer completion > + > + interrupt-names: > + items: > + - const: secirq > + - const: dmairq Drop "irq" from both. > + > + resets: > + items: > + - description: STG domain reset line > + > + reset-names: > + items: > + - const: sec_hre Drop "sec". Why do you need the names for one entry? > + > + enable-side-channel-mitigation: > + description: Enable side-channel-mitigation feature for AES module. > + Enabling this feature will affect the speed performance of > + crypto engine. > + type: boolean Why exactly this is a hardware (DT) property, not runtime? > + > + enable-dma: > + description: Enable data transfer using dedicated DMA controller. > + type: boolean Usually the presence of dmas indicates whether to use or not to use DMA. Do you expect a case where DMA channels are provided by you don't want DMA? Explain such case and describe why it is a hardware/system integration property. > + > + dmas: > + items: > + - description: TX DMA channel > + - description: RX DMA channel > + > + dma-names: > + items: > + - const: sec_m tx > + - const: sec_p rx > + > +required: > + - compatible > + - reg > + - reg-names > + - clocks > + - clock-names > + - resets > + - reset-names > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/clock/starfive-jh7110.h> > + #include <dt-bindings/reset/starfive-jh7110.h> > + > + soc { > + #address-cells = <2>; > + #size-cells = <2>; Use 4 spaces for example indentation. > + Best regards, Krzysztof
On Wed, 30 Nov 2022 13:52:13 +0800, Jia Jie Ho wrote: > Add documentation to describe Starfive crypto > driver bindings. > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > --- > .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ > 1 file changed, 109 insertions(+) > create mode 100644 Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: dtschema/dtc warnings/errors: Documentation/devicetree/bindings/crypto/starfive-crypto.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No such file or directory 21 | #include <dt-bindings/clock/starfive-jh7110.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.lib:406: Documentation/devicetree/bindings/crypto/starfive-crypto.example.dtb] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1492: dt_binding_check] Error 2 doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20221130055214.2416888-6-jiajie.ho@starfivetech.com The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Wednesday, November 30, 2022 9:21 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 5/6] dt-bindings: crypto: Add bindings for Starfive crypto > driver > > On 30/11/2022 06:52, Jia Jie Ho wrote: > > Add documentation to describe Starfive crypto driver bindings. > > Please wrap commit message according to Linux coding style / submission > process: > https://elixir.bootlin.com/linux/v5.18- > rc4/source/Documentation/process/submitting-patches.rst#L586 > > > Subject: drop second, redundant "bindings". > > I'll fix the commit title and message in the next version. > > > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > > --- > > .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ > > 1 file changed, 109 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > > > diff --git > > a/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > new file mode 100644 > > index 000000000000..6b852f774c32 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > Filename based on compatible, so starfive,jh7110-crypto.yaml > Will update filename. > > @@ -0,0 +1,109 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/crypto/starfive-crypto.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: StarFive Crypto Controller Device Tree Bindings > > Drop "Device Tree Bindings" > Will update title. > > + > > +maintainers: > > + - Jia Jie Ho <jiajie.ho@starfivetech.com> > > + - William Qiu <william.qiu@starfivetech.com> > > + > > +properties: > > + compatible: > > + const: starfive,jh7110-crypto > > + > > + reg: > > + maxItems: 1 > > + > > + reg-names: > > + items: > > + - const: secreg > > Why do you need reg-names for one entry? > Will remove need of reg-names and update probe function accordingly. > > + > > + clocks: > > + items: > > + - description: Hardware reference clock > > + - description: AHB reference clock > > + > > + clock-names: > > + items: > > + - const: sec_hclk > > + - const: sec_ahb > > sec seems redundant, so just "ahb". The first clock then "hclk" or "ref"? > Will fix in next version. > > + > > + interrupts: > > + items: > > + - description: Interrupt pin for algo completion > > + - description: Interrupt pin for DMA transfer completion > > + > > + interrupt-names: > > + items: > > + - const: secirq > > + - const: dmairq > > Drop "irq" from both. > Will fix. > > + > > + resets: > > + items: > > + - description: STG domain reset line > > + > > + reset-names: > > + items: > > + - const: sec_hre > > Drop "sec". Why do you need the names for one entry? > Will remove names. > > + > > + enable-side-channel-mitigation: > > + description: Enable side-channel-mitigation feature for AES module. > > + Enabling this feature will affect the speed performance of > > + crypto engine. > > + type: boolean > > Why exactly this is a hardware (DT) property, not runtime? > This is a hardware setting provided in StarFive crypto engine only. The crypto API doesn't control this setting during runtime and leaving this always on will impact speed performance. So, I added this property to allow user to control this in dtb. > > + > > + enable-dma: > > + description: Enable data transfer using dedicated DMA controller. > > + type: boolean > > Usually the presence of dmas indicates whether to use or not to use DMA. > Do you expect a case where DMA channels are provided by you don't want > DMA? Explain such case and describe why it is a hardware/system integration > property. > I'll remove this property as DMA is always enabled. > > + > > + dmas: > > + items: > > + - description: TX DMA channel > > + - description: RX DMA channel > > + > > + dma-names: > > + items: > > + - const: sec_m > > tx > Will fix. > > + - const: sec_p > > rx > Will fix. > > + > > +required: > > + - compatible > > + - reg > > + - reg-names > > + - clocks > > + - clock-names > > + - resets > > + - reset-names > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/clock/starfive-jh7110.h> > > + #include <dt-bindings/reset/starfive-jh7110.h> > > + > > + soc { > > + #address-cells = <2>; > > + #size-cells = <2>; > > Use 4 spaces for example indentation. I'll fix the indentation. Thank you for taking time to review and provide helpful comments for this patch. Best regards, Jia Jie
On 01/12/2022 10:01, JiaJie Ho wrote: >>> + >>> + enable-side-channel-mitigation: >>> + description: Enable side-channel-mitigation feature for AES module. >>> + Enabling this feature will affect the speed performance of >>> + crypto engine. >>> + type: boolean >> >> Why exactly this is a hardware (DT) property, not runtime? >> > > This is a hardware setting provided in StarFive crypto engine only. > The crypto API doesn't control this setting during runtime and leaving this always on will impact speed performance. > So, I added this property to allow user to control this in dtb. Devicetree should not describe policies, so without justification it does not look like hardware property. Drop. Best regards, Krzysztof
> -----Original Message----- > From: Rob Herring <robh@kernel.org> > Sent: Wednesday, November 30, 2022 9:48 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com> > Cc: linux-crypto@vger.kernel.org; linux-riscv@lists.infradead.org; Rob > Herring <robh+dt@kernel.org>; Herbert Xu > <herbert@gondor.apana.org.au>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org>; linux-kernel@vger.kernel.org; > devicetree@vger.kernel.org; David S . Miller <davem@davemloft.net> > Subject: Re: [PATCH 5/6] dt-bindings: crypto: Add bindings for Starfive crypto > driver > > > On Wed, 30 Nov 2022 13:52:13 +0800, Jia Jie Ho wrote: > > Add documentation to describe Starfive crypto driver bindings. > > > > Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> > > Signed-off-by: Huan Feng <huan.feng@starfivetech.com> > > --- > > .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ > > 1 file changed, 109 insertions(+) > > create mode 100644 > > Documentation/devicetree/bindings/crypto/starfive-crypto.yaml > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m > dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > > dtschema/dtc warnings/errors: > Documentation/devicetree/bindings/crypto/starfive- > crypto.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No > such file or directory > 21 | #include <dt-bindings/clock/starfive-jh7110.h> > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > compilation terminated. > make[1]: *** [scripts/Makefile.lib:406: > Documentation/devicetree/bindings/crypto/starfive-crypto.example.dtb] > Error 1 > make[1]: *** Waiting for unfinished jobs.... > make: *** [Makefile:1492: dt_binding_check] Error 2 > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/project/devicetree- > bindings/patch/20221130055214.2416888-6-jiajie.ho@starfivetech.com > > The base for the series is generally the latest rc1. A different dependency > should be noted in *this* patch. > Hi Rob Herring, The #include in example have dependencies on the following patches: https://patchwork.kernel.org/project/linux-riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ https://patchwork.kernel.org/project/linux-riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ I've noted them in the cover letter. How do I add them in this patch? Thanks, Jia Jie
On 06/12/2022 04:48, JiaJie Ho wrote: > > >> -----Original Message----- >> From: Rob Herring <robh@kernel.org> >> Sent: Wednesday, November 30, 2022 9:48 PM >> To: JiaJie Ho <jiajie.ho@starfivetech.com> >> Cc: linux-crypto@vger.kernel.org; linux-riscv@lists.infradead.org; Rob >> Herring <robh+dt@kernel.org>; Herbert Xu >> <herbert@gondor.apana.org.au>; Krzysztof Kozlowski >> <krzysztof.kozlowski+dt@linaro.org>; linux-kernel@vger.kernel.org; >> devicetree@vger.kernel.org; David S . Miller <davem@davemloft.net> >> Subject: Re: [PATCH 5/6] dt-bindings: crypto: Add bindings for Starfive crypto >> driver >> >> >> On Wed, 30 Nov 2022 13:52:13 +0800, Jia Jie Ho wrote: >>> Add documentation to describe Starfive crypto driver bindings. >>> >>> Signed-off-by: Jia Jie Ho <jiajie.ho@starfivetech.com> >>> Signed-off-by: Huan Feng <huan.feng@starfivetech.com> >>> --- >>> .../bindings/crypto/starfive-crypto.yaml | 109 ++++++++++++++++++ >>> 1 file changed, 109 insertions(+) >>> create mode 100644 >>> Documentation/devicetree/bindings/crypto/starfive-crypto.yaml >>> >> >> My bot found errors running 'make DT_CHECKER_FLAGS=-m >> dt_binding_check' >> on your patch (DT_CHECKER_FLAGS is new in v5.13): >> >> yamllint warnings/errors: >> >> dtschema/dtc warnings/errors: >> Documentation/devicetree/bindings/crypto/starfive- >> crypto.example.dts:21:18: fatal error: dt-bindings/clock/starfive-jh7110.h: No >> such file or directory >> 21 | #include <dt-bindings/clock/starfive-jh7110.h> >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> compilation terminated. >> make[1]: *** [scripts/Makefile.lib:406: >> Documentation/devicetree/bindings/crypto/starfive-crypto.example.dtb] >> Error 1 >> make[1]: *** Waiting for unfinished jobs.... >> make: *** [Makefile:1492: dt_binding_check] Error 2 >> >> doc reference errors (make refcheckdocs): >> >> See https://patchwork.ozlabs.org/project/devicetree- >> bindings/patch/20221130055214.2416888-6-jiajie.ho@starfivetech.com >> >> The base for the series is generally the latest rc1. A different dependency >> should be noted in *this* patch. >> > > Hi Rob Herring, > > The #include in example have dependencies on the following patches: > https://patchwork.kernel.org/project/linux-riscv/cover/20221118010627.70576-1-hal.feng@starfivetech.com/ > https://patchwork.kernel.org/project/linux-riscv/cover/20221118011714.70877-1-hal.feng@starfivetech.com/ > I've noted them in the cover letter. > How do I add them in this patch? You cannot. Testing bot does not take dependencies, so it did not have above clock IDs. This also should point your attention that if crypto maintainers pick up this patch, they also won't have the clock IDs so their tree will have such failure as well. You can wait with your patch till dependency hits mainline or you can just replace clock IDs with numbers and drop the header (and later you can correct the example if needed... or leave it as is). Best regards, Krzysztof
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Tuesday, December 6, 2022 4:26 PM > To: JiaJie Ho <jiajie.ho@starfivetech.com>; Rob Herring <robh@kernel.org> > Cc: linux-crypto@vger.kernel.org; linux-riscv@lists.infradead.org; Rob > Herring <robh+dt@kernel.org>; Herbert Xu > <herbert@gondor.apana.org.au>; Krzysztof Kozlowski > <krzysztof.kozlowski+dt@linaro.org>; linux-kernel@vger.kernel.org; > devicetree@vger.kernel.org; David S . Miller <davem@davemloft.net> > Subject: Re: [PATCH 5/6] dt-bindings: crypto: Add bindings for Starfive crypto > driver > > On 06/12/2022 04:48, JiaJie Ho wrote: > > > > > > The #include in example have dependencies on the following patches: > > https://patchwork.kernel.org/project/linux-riscv/cover/20221118010627. > > 70576-1-hal.feng@starfivetech.com/ > > https://patchwork.kernel.org/project/linux-riscv/cover/20221118011714. > > 70877-1-hal.feng@starfivetech.com/ > > I've noted them in the cover letter. > > How do I add them in this patch? > > You cannot. Testing bot does not take dependencies, so it did not have > above clock IDs. This also should point your attention that if crypto > maintainers pick up this patch, they also won't have the clock IDs so their tree > will have such failure as well. > > You can wait with your patch till dependency hits mainline or you can just > replace clock IDs with numbers and drop the header (and later you can > correct the example if needed... or leave it as is). > I'll replace the IDs and drop the header then. Thanks. Regards, Jia Jie
> -----Original Message----- > From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> > Sent: Thursday, December 1, 2022 5:27 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 5/6] dt-bindings: crypto: Add bindings for Starfive crypto > driver > > On 01/12/2022 10:01, JiaJie Ho wrote: > > >>> + > >>> + enable-side-channel-mitigation: > >>> + description: Enable side-channel-mitigation feature for AES module. > >>> + Enabling this feature will affect the speed performance of > >>> + crypto engine. > >>> + type: boolean > >> > >> Why exactly this is a hardware (DT) property, not runtime? > >> > > > > This is a hardware setting provided in StarFive crypto engine only. > > The crypto API doesn't control this setting during runtime and leaving this > always on will impact speed performance. > > So, I added this property to allow user to control this in dtb. > > Devicetree should not describe policies, so without justification it does not > look like hardware property. Drop. > I'll remove this in v2 and set the value using module param instead. Thanks. Best regards, Jia Jie
diff --git a/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml new file mode 100644 index 000000000000..6b852f774c32 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/starfive-crypto.yaml @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/starfive-crypto.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive Crypto Controller Device Tree Bindings + +maintainers: + - Jia Jie Ho <jiajie.ho@starfivetech.com> + - William Qiu <william.qiu@starfivetech.com> + +properties: + compatible: + const: starfive,jh7110-crypto + + reg: + maxItems: 1 + + reg-names: + items: + - const: secreg + + clocks: + items: + - description: Hardware reference clock + - description: AHB reference clock + + clock-names: + items: + - const: sec_hclk + - const: sec_ahb + + interrupts: + items: + - description: Interrupt pin for algo completion + - description: Interrupt pin for DMA transfer completion + + interrupt-names: + items: + - const: secirq + - const: dmairq + + resets: + items: + - description: STG domain reset line + + reset-names: + items: + - const: sec_hre + + enable-side-channel-mitigation: + description: Enable side-channel-mitigation feature for AES module. + Enabling this feature will affect the speed performance of + crypto engine. + type: boolean + + enable-dma: + description: Enable data transfer using dedicated DMA controller. + type: boolean + + dmas: + items: + - description: TX DMA channel + - description: RX DMA channel + + dma-names: + items: + - const: sec_m + - const: sec_p + +required: + - compatible + - reg + - reg-names + - clocks + - clock-names + - resets + - reset-names + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/starfive-jh7110.h> + #include <dt-bindings/reset/starfive-jh7110.h> + + soc { + #address-cells = <2>; + #size-cells = <2>; + + 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>; + interrupts = <28>, <29>; + interrupt-names = "secirq", "dmairq"; + 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"; + }; + };