From patchwork Wed Nov 30 05:52:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JiaJie Ho X-Patchwork-Id: 27599 Return-Path: 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 + 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 ); 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 To: Herbert Xu , "David S . Miller" , Rob Herring , Krzysztof Kozlowski CC: , , , , Jia Jie Ho 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 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 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: 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?= Add documentation to describe Starfive crypto driver bindings. Signed-off-by: Jia Jie Ho Signed-off-by: Huan Feng --- .../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 @@ -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 + - William Qiu + +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 + #include + + 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"; + }; + };