Message ID | 20231219125614.33062-2-akhilrajeev@nvidia.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1920963dyi; Tue, 19 Dec 2023 05:06:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IE9p+PnytGTvVsQhptOiWzgLUrbAets9xb4mjf96gCHLXlo28gYKJKMIWCVoyfrr4nDGZpW X-Received: by 2002:a2e:8608:0:b0:2cc:652b:9fd4 with SMTP id a8-20020a2e8608000000b002cc652b9fd4mr1074093lji.79.1702991173057; Tue, 19 Dec 2023 05:06:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702991173; cv=pass; d=google.com; s=arc-20160816; b=VjxUNQ8tcnN3OUdyMSJ8k+M8P2DEBTB7AJhHDWqVkZeFmFUixIqsaMHNQM8RRCE+zs nDoH46YuKmnix3ZrMDh+DykNwGsfRevPCOEaG47/nnkSoPj0CIgBO7a98QNAb6kSSwMv 9XexWdhvSpVFxa3wEC3VsypX3S97ZyqGIocWFXcap5ptU63Db2S9ZWzEvb6EBPmLudfp qFfFVII56cpgc3TdaBbm6NJfYJi4bmVdwYBmLTPfMzWkMZLOZ1dm14aDBQMgzSqqu1Y/ tG0BT1KJzQ2XfUhexFW3Lpxzjp/O8saftcXlOCU9/B1KzGtsd/3Q89js93AIjZTpMnR1 rO2g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6F+fwkli5ySzed5nng9i/+9HcEYwL9hkkpL5cGhqaQI=; fh=qmzHwXoLSbmNTcqsYYtxy0h8ewFZsFKSf2rQ8TjYIhM=; b=ZPO16okvNk2N5x8gx6Gh6PyaU4+VziwTSFc69GeTg5t8Up+FVGO5W7nwClS3TUicXC 8y5jnN+7Ef3xP2TqcoonIEqltYL2S84w7m+GkjJN7fcwlX2OBhoPMZg60OpBB6drOYRc GRZBidc51rU2bZLAwnYWnrYA7e7GmtfWTqbkM4h79cgg9vWS2y0gUWZk4Jn/Aj9Z1x0+ aMVKo7ZLmg4GL5bBieXYpKyOAGoF/gfpqA+NUwDWRBCjZc/HVyh2ayfRz8wfN5OSGlv/ T157058mfexWmh1Ev7HPMzwavOehVc/+u6HKWj9sk2iFEgnE5A5HyyHYhm4ZTyIxS+71 ON9w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="kpnU1/zM"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m26-20020a50931a000000b005535281246asi1600700eda.627.2023.12.19.05.06.12 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 05:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="kpnU1/zM"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5220-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 04BE71F2672C for <ouuuleilei@gmail.com>; Tue, 19 Dec 2023 12:57:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82E5619444; Tue, 19 Dec 2023 12:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="kpnU1/zM" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2087.outbound.protection.outlook.com [40.107.101.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC7AB18650; Tue, 19 Dec 2023 12:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dy1UWiB+WEi0oGeZjvKyYdfSO7+ggDywmOFOlFin+AeTy/9Bduq5kgx3oZCsJaOJeUuz/OkqHYhZjccqjh6zE9JLDlpnBUoGojaMPB0qLKj6Yd3zxUzK8lvHGol2BuSC2Xxg7Mcpuj21FCmcYSljr1Muu1S9otstwtFzv2fuX5ov1c3DB4WeZv0n+WCXxGOx3ehKXUfhnKOpyFBK8OdFCpYiXRzYeL1hvWXrAciSOtSSXA/W7X8G+ePEyl7lKu+OSjRFWbvKY7EQm3ys3pmv6sATL5DFQ5G+RTLn3B7OjzKaNPE4hbwjhfYAANsFVpwnXesPwD42pPRGU3E2v9NJ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6F+fwkli5ySzed5nng9i/+9HcEYwL9hkkpL5cGhqaQI=; b=esSAhEyW0fiIuxAyQSX6M2rPQgeTwl1OMVwZK2hFWIcchRE3m1WqEU/mXOOWZ/rJh5GGGF5KkdPfJtVHinkeYPGnNjtLV6cyI3dPS+fRX81jXX+6GEN4ZqTobNL0RxkhS97QFn2TBFjaKznO/+8bbIat8UpDN3U7OlZVOFBBN/RfaZ4k3l6QZFcOGTOVXkkk4G/z6ItEOrkVoTTZrhOLxVIFiDg14PKPpZuxX2pMprxybespESeArLe/M5SiF64pqHAK0+AP6MpyXOc3KHIB7+f4OM9Rf6X6pG60PqE5Qv1RMUFEPAQBaToWrVwoxUVBCkiZJUboZN1JZkcecC6tzQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=gondor.apana.org.au smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6F+fwkli5ySzed5nng9i/+9HcEYwL9hkkpL5cGhqaQI=; b=kpnU1/zM41o0gt2soBHLG0RgtiZISzlW/r5ZkJyoSIb7H3aVr9Eu3lYvi2tz2LlvvNDNQfCcWl6cR22O1dLKQEac3P1zVX9jLXwNRl3bTTmtlH7m5pLRRL3lA90I0uz2OL6OhPFl8legOPLwhHO5xm3hYVVxTICA8hyINTgCTVIH+9xn57JdW5KszzriNRnt4KPU/cnlAG1ZH6mGqXLW2lICLXt/WS6ZxzfeRQzTZeqxynSmXIa70wKrXQ73mBx2f3TGt9ud9MTDrluuHSBmnXiwGvyVAJPWx8V29vZNfJHnjJLaa6qvC8Tjf5l14J4J0NldoOn3gzZVTjhGHUdg3A== Received: from CY8PR11CA0005.namprd11.prod.outlook.com (2603:10b6:930:48::18) by PH7PR12MB5806.namprd12.prod.outlook.com (2603:10b6:510:1d2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.38; Tue, 19 Dec 2023 12:56:52 +0000 Received: from CY4PEPF0000FCC0.namprd03.prod.outlook.com (2603:10b6:930:48:cafe::d5) by CY8PR11CA0005.outlook.office365.com (2603:10b6:930:48::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.18 via Frontend Transport; Tue, 19 Dec 2023 12:56:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CY4PEPF0000FCC0.mail.protection.outlook.com (10.167.242.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.14 via Frontend Transport; Tue, 19 Dec 2023 12:56:51 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 19 Dec 2023 04:56:49 -0800 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail202.nvidia.com (10.126.190.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 19 Dec 2023 04:56:48 -0800 Received: from BUILDSERVER-IO-L4T.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Tue, 19 Dec 2023 04:56:44 -0800 From: Akhil R <akhilrajeev@nvidia.com> To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>, <robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>, <thierry.reding@gmail.com>, <jonathanh@nvidia.com>, <catalin.marinas@arm.com>, <will@kernel.org>, <mperttunen@nvidia.com>, <linux-crypto@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <krzk@kernel.org> CC: Akhil R <akhilrajeev@nvidia.com> Subject: [PATCH v2 1/5] dt-bindings: crypto: Add Tegra Security Engine Date: Tue, 19 Dec 2023 18:26:10 +0530 Message-ID: <20231219125614.33062-2-akhilrajeev@nvidia.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231219125614.33062-1-akhilrajeev@nvidia.com> References: <20231219125614.33062-1-akhilrajeev@nvidia.com> X-NVConfidentiality: public Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC0:EE_|PH7PR12MB5806:EE_ X-MS-Office365-Filtering-Correlation-Id: f7edfcd8-e0d1-4625-2828-08dc0091f818 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5way4xjrEP7+sil4Uwui/da9+/aZpHujWAnqVRs6ER21/aSRdN5OLBNsaOP2rL+sIMEZbaxaQkeDotA4/a2hcs8Fhivg3LgUU9Z1QWV2oIs/zkCC1NqlEN/6IsV+WKw7PmmD6ONdOmySPmA9WhE8IwsoNuaIY7RdIHPWvvEMIBu8IEB0BMUxgD2HtageJ8QGl20kTnVqNUh+Wz2NdgzLwVvsISLIcJl8DeipSYoS75DJgyzlqZ73kfVMuYppQdr5iN5lesS4Vg/v76mIPr6itAsNh4vGAjKNzr+vCrZgAxL+o7EviwujRMVejwh1JFayU0EVzGz8ZrZIKANK2pzg9Wj3iLjwkRPkjBAoK3KTxPv0JvxZWS0WB0haErTyf4Cri7HDRB0+DD7Ru9rGwdfJ2wIWcI8/qunpFtE1zRRa6m+YiWpavLkIEVbSAc/mRvCwN7XAKgJr86rG2O9b12k5zuAL66B8VZZl9qo1zmApWX62Ag+vBcy5P8iIgYkeY0u7lRefPAThaQpt70dzSsjxCJ30La6VqTxFawstiN6pVccJnMjQOsSkZFNxJsvSTorkyI/gLCOoMoAypQumHrYp7r7t5ST2G6dxoAy8wa1lATHgNSMJJiG9XpPgfAY3VRWgFTgWwYEbtIgKCjuPHIggqjpmSYAAkg4N3GsaTD82UfIkjP9lQz/g0U9YzvfzxFSl74pLI2QxIPawxnPd8NR5BfM5elY88uVnEGzR0RJCh5D+MtTMxFdoc8SQafzcXDQuGsw5DQebyVUmJZq9R2zWuFq3WPqz8ore7fC7g50fHfA= X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230031)(4636009)(136003)(39860400002)(376002)(346002)(396003)(230922051799003)(82310400011)(1800799012)(451199024)(186009)(64100799003)(46966006)(36840700001)(40470700004)(36756003)(921008)(316002)(83380400001)(40480700001)(7416002)(426003)(336012)(70586007)(110136005)(70206006)(2906002)(15650500001)(4326008)(47076005)(8676002)(5660300002)(36860700001)(7696005)(6666004)(8936002)(107886003)(86362001)(1076003)(966005)(478600001)(2616005)(26005)(41300700001)(82740400003)(7636003)(40460700003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2023 12:56:51.1420 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f7edfcd8-e0d1-4625-2828-08dc0091f818 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5806 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785715671911236475 X-GMAIL-MSGID: 1785715671911236475 |
Series |
Add Tegra Security Engine driver
|
|
Commit Message
Akhil R
Dec. 19, 2023, 12:56 p.m. UTC
Add DT binding document for Tegra Security Engine.
The AES and HASH algorithms are handled independently by separate
engines within the Security Engine. These engines are registered
as two separate crypto engine drivers.
Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
---
.../crypto/nvidia,tegra234-se-aes.yaml | 53 +++++++++++++++++++
.../crypto/nvidia,tegra234-se-hash.yaml | 53 +++++++++++++++++++
2 files changed, 106 insertions(+)
create mode 100644 Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml
create mode 100644 Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml
Comments
On 19/12/2023 13:56, Akhil R wrote: > Add DT binding document for Tegra Security Engine. > The AES and HASH algorithms are handled independently by separate > engines within the Security Engine. These engines are registered > as two separate crypto engine drivers. > > Signed-off-by: Akhil R <akhilrajeev@nvidia.com> > --- > .../crypto/nvidia,tegra234-se-aes.yaml | 53 +++++++++++++++++++ > .../crypto/nvidia,tegra234-se-hash.yaml | 53 +++++++++++++++++++ > 2 files changed, 106 insertions(+) > create mode 100644 Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml > create mode 100644 Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml > > diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml > new file mode 100644 > index 000000000000..35c2e701bd42 > --- /dev/null > +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-aes.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVIDIA Tegra Security Engine for AES algorithms > + > +description: | Do not need '|' unless you need to preserve formatting. > + The Tegra Security Engine accelerates the following AES encryption/decryption > + algorithms. s/./:/ and join lines? Wasn't that your intention here? > + AES-ECB, AES-CBC, AES-OFB, AES-XTS, AES-CTR, AES-GCM, AES-CCM, AES-CMAC > + > +maintainers: > + - Akhil R <akhilrajeev@nvidia.com> > + > +properties: > + compatible: > + const: nvidia,tegra234-se2-aes Why "se2"? Anyway, filename like compatible. > + > + reg: > + maxItems: 1 > + > + clocks: > + maxItems: 1 > + > + iommus: > + maxItems: 1 > + > + dma-coherent: true > + > +required: > + - compatible > + - reg > + - clocks > + - iommus > + > +additionalProperties: false > + > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + #include <dt-bindings/memory/tegra234-mc.h> > + #include <dt-bindings/clock/tegra234-clock.h> > + > + crypto@15820000 { > + compatible = "nvidia,tegra234-se2-aes"; > + reg = <0x15820000 0x10000>; > + clocks = <&bpmp TEGRA234_CLK_SE>; > + iommus = <&smmu TEGRA234_SID_SES_SE1>; > + dma-coherent; > + }; > +... > diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml > new file mode 100644 > index 000000000000..e3848e9a53b5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml > @@ -0,0 +1,53 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-hash.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NVIDIA Tegra Security Engine for HASH algorithms > + > +description: | > + The Tegra Security HASH Engine accelerates the following HASH functions. Similar comment > + SHA1, SHA224, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512 > + HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512) > + > +maintainers: > + - Akhil R <akhilrajeev@nvidia.com> > + > +properties: > + compatible: > + const: nvidia,tegra234-se4-hash What is se4? Anyway, filename like compatible. Best regards, Krzysztof
> On 19/12/2023 13:56, Akhil R wrote: > > Add DT binding document for Tegra Security Engine. > > The AES and HASH algorithms are handled independently by separate > > engines within the Security Engine. These engines are registered > > as two separate crypto engine drivers. > > > > Signed-off-by: Akhil R <akhilrajeev@nvidia.com> > > --- > > .../crypto/nvidia,tegra234-se-aes.yaml | 53 +++++++++++++++++++ > > .../crypto/nvidia,tegra234-se-hash.yaml | 53 +++++++++++++++++++ > > 2 files changed, 106 insertions(+) > > create mode 100644 > Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml > > create mode 100644 > Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml > > > > diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se- > aes.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se- > aes.yaml > > new file mode 100644 > > index 000000000000..35c2e701bd42 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml > > @@ -0,0 +1,53 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-aes.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: NVIDIA Tegra Security Engine for AES algorithms > > + > > +description: | > > Do not need '|' unless you need to preserve formatting. Okay. > > > + The Tegra Security Engine accelerates the following AES > encryption/decryption > > + algorithms. > > s/./:/ and join lines? Wasn't that your intention here? Yes. Correct. > > > + AES-ECB, AES-CBC, AES-OFB, AES-XTS, AES-CTR, AES-GCM, AES-CCM, AES- > CMAC > > + > > +maintainers: > > + - Akhil R <akhilrajeev@nvidia.com> > > + > > +properties: > > + compatible: > > + const: nvidia,tegra234-se2-aes > > Why "se2"? > > Anyway, filename like compatible. The instance is named SE2 in the hardware. Thought to align the compatible as well. There is one more instance with a slightly different capability, which we aren't using currently. In case it needs to be supported, we would need a different compatible, but the driver will need only minor changes. I suppose the current compatible can help to maintain the ABI with DT then. > > > > + > > + reg: > > + maxItems: 1 > > + > > + clocks: > > + maxItems: 1 > > + > > + iommus: > > + maxItems: 1 > > + > > + dma-coherent: true > > + > > +required: > > + - compatible > > + - reg > > + - clocks > > + - iommus > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > + #include <dt-bindings/memory/tegra234-mc.h> > > + #include <dt-bindings/clock/tegra234-clock.h> > > + > > + crypto@15820000 { > > + compatible = "nvidia,tegra234-se2-aes"; > > + reg = <0x15820000 0x10000>; > > + clocks = <&bpmp TEGRA234_CLK_SE>; > > + iommus = <&smmu TEGRA234_SID_SES_SE1>; > > + dma-coherent; > > + }; > > +... > > diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se- > hash.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se- > hash.yaml > > new file mode 100644 > > index 000000000000..e3848e9a53b5 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se- > hash.yaml > > @@ -0,0 +1,53 @@ > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-hash.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: NVIDIA Tegra Security Engine for HASH algorithms > > + > > +description: | > > + The Tegra Security HASH Engine accelerates the following HASH functions. > > Similar comment > > > + SHA1, SHA224, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, > SHA3-512 > > + HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512) > > + > > > +maintainers: > > + - Akhil R <akhilrajeev@nvidia.com> > > + > > +properties: > > + compatible: > > + const: nvidia,tegra234-se4-hash > > What is se4? > > Anyway, filename like compatible. Similar to the above, the hardware name is SE4. nvidia,tegra234-se-aes and nvidia,tegra234-se-hash does look good to me. But I am a bit concerned about the ABI breakage in case, we need a different compatible for the remaining instance. Thanks and Regards, Akhil
On 28/12/2023 10:33, Akhil R wrote: >>> +properties: >>> + compatible: >>> + const: nvidia,tegra234-se4-hash >> >> What is se4? >> >> Anyway, filename like compatible. > Similar to the above, the hardware name is SE4. > > nvidia,tegra234-se-aes and nvidia,tegra234-se-hash does look good to me. But I am a bit concerned > about the ABI breakage in case, we need a different compatible for the remaining instance. Isn't this a new device? What ABI breakage? What would be affected? Best regards, Krzysztof
> On 28/12/2023 10:33, Akhil R wrote: > >>> +properties: > >>> + compatible: > >>> + const: nvidia,tegra234-se4-hash > >> > >> What is se4? > >> > >> Anyway, filename like compatible. > > Similar to the above, the hardware name is SE4. > > > > nvidia,tegra234-se-aes and nvidia,tegra234-se-hash does look good to > > me. But I am a bit concerned about the ABI breakage in case, we need a > different compatible for the remaining instance. > > Isn't this a new device? What ABI breakage? What would be affected? I meant a scenario where we need to support SE1 instance as well. There is one more SE instance in Tegra, which is very similar to SE2 AES Engine. But right now, it does not have a good use case in Linux. Now if we add nvidia,tegra234-se-aes and nvidia,tegra234-se-hash, when SE1 needs to be supported, I guess it would be confusing to find the right compatible for it. Regards, Akhil
On 29/12/2023 08:11, Akhil R wrote: >> On 28/12/2023 10:33, Akhil R wrote: >>>>> +properties: >>>>> + compatible: >>>>> + const: nvidia,tegra234-se4-hash >>>> >>>> What is se4? >>>> >>>> Anyway, filename like compatible. >>> Similar to the above, the hardware name is SE4. >>> >>> nvidia,tegra234-se-aes and nvidia,tegra234-se-hash does look good to >>> me. But I am a bit concerned about the ABI breakage in case, we need a >> different compatible for the remaining instance. >> >> Isn't this a new device? What ABI breakage? What would be affected? > > I meant a scenario where we need to support SE1 instance as well. > > There is one more SE instance in Tegra, which is very similar to SE2 AES Engine. > But right now, it does not have a good use case in Linux. Now if we add > nvidia,tegra234-se-aes and nvidia,tegra234-se-hash, when SE1 needs to be > supported, I guess it would be confusing to find the right compatible for it. Hm, I still do not see possibility of breaking of ABI, but sure, se4 makes sense if instances are really different. Otherwise could be one compatible with some property. It kind of depends on the differences. Anyway, name the file based on the compatible. Best regards, Krzysztof
> On 29/12/2023 08:11, Akhil R wrote: > >> On 28/12/2023 10:33, Akhil R wrote: > >>>>> +properties: > >>>>> + compatible: > >>>>> + const: nvidia,tegra234-se4-hash > >>>> > >>>> What is se4? > >>>> > >>>> Anyway, filename like compatible. > >>> Similar to the above, the hardware name is SE4. > >>> > >>> nvidia,tegra234-se-aes and nvidia,tegra234-se-hash does look good to > >>> me. But I am a bit concerned about the ABI breakage in case, we need a > >> different compatible for the remaining instance. > >> > >> Isn't this a new device? What ABI breakage? What would be affected? > > > > I meant a scenario where we need to support SE1 instance as well. > > > > There is one more SE instance in Tegra, which is very similar to SE2 AES Engine. > > But right now, it does not have a good use case in Linux. Now if we add > > nvidia,tegra234-se-aes and nvidia,tegra234-se-hash, when SE1 needs to be > > supported, I guess it would be confusing to find the right compatible for it. > > Hm, I still do not see possibility of breaking of ABI, but sure, se4 > makes sense if instances are really different. Otherwise could be one > compatible with some property. It kind of depends on the differences. > > Anyway, name the file based on the compatible. One compatible with some property looks to be a good approach to me. Instances aren't totally different. So, I will update the compatible to nvidia,tegra234-se-aes and nvidia,tegra234-se-hash in the next revision. Thanks for the comments and inputs. Regards, Akhil
diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml new file mode 100644 index 000000000000..35c2e701bd42 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-aes.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-aes.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra Security Engine for AES algorithms + +description: | + The Tegra Security Engine accelerates the following AES encryption/decryption + algorithms. + AES-ECB, AES-CBC, AES-OFB, AES-XTS, AES-CTR, AES-GCM, AES-CCM, AES-CMAC + +maintainers: + - Akhil R <akhilrajeev@nvidia.com> + +properties: + compatible: + const: nvidia,tegra234-se2-aes + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + iommus: + maxItems: 1 + + dma-coherent: true + +required: + - compatible + - reg + - clocks + - iommus + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/memory/tegra234-mc.h> + #include <dt-bindings/clock/tegra234-clock.h> + + crypto@15820000 { + compatible = "nvidia,tegra234-se2-aes"; + reg = <0x15820000 0x10000>; + clocks = <&bpmp TEGRA234_CLK_SE>; + iommus = <&smmu TEGRA234_SID_SES_SE1>; + dma-coherent; + }; +... diff --git a/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml new file mode 100644 index 000000000000..e3848e9a53b5 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/nvidia,tegra234-se-hash.yaml @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/nvidia,tegra234-se-hash.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NVIDIA Tegra Security Engine for HASH algorithms + +description: | + The Tegra Security HASH Engine accelerates the following HASH functions. + SHA1, SHA224, SHA256, SHA384, SHA512, SHA3-224, SHA3-256, SHA3-384, SHA3-512 + HMAC(SHA224), HMAC(SHA256), HMAC(SHA384), HMAC(SHA512) + +maintainers: + - Akhil R <akhilrajeev@nvidia.com> + +properties: + compatible: + const: nvidia,tegra234-se4-hash + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + iommus: + maxItems: 1 + + dma-coherent: true + +required: + - compatible + - reg + - clocks + - iommus + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/memory/tegra234-mc.h> + #include <dt-bindings/clock/tegra234-clock.h> + + crypto@15840000 { + compatible = "nvidia,tegra234-se4-hash"; + reg = <0x15840000 0x10000>; + clocks = <&bpmp TEGRA234_CLK_SE>; + iommus = <&smmu TEGRA234_SID_SES_SE2>; + dma-coherent; + }; +...