From patchwork Fri Feb 11 09:39:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12743100 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 AA82BC433F5 for ; Fri, 11 Feb 2022 09:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jV5pZOUPdXZtc1c3fC4DKhOOhfboYWPoff3eG/+onjI=; b=Fe+AsED+G3g2bV uF5IlxjnuwjwRu0iOoQmJNl3bMEqgYrNwXXVNAX/IInIQnhECdAfYa6sb5p6YCcXjlVHabDcwp0K1 FV0mqEa/1oV3Ufd5uCPOMVs0cTrxUN07IV9xhyGDobUN7ltCyN+21KmkwlhIpeE2X3KeL4iMtg4Yz gxFyjM6ZFcRsiaUhHvtqqhpEIjwHUGZLBw6wD9N9+JpUT51j/Ydx63+XLZ6XaR4+UI5L2HFBB+WmU SfDtXqkUuBy9iuiokUo8VeHphay8Ui20Bv9O2EQHFFfCuussGTh0JN5AB1uNhBwCS5dR6hYbR4Cf/ lT51+YesEyDvyGkW2daw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISPE-006Qme-19; Fri, 11 Feb 2022 09:39:56 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISOq-006QaU-1a for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 09:39:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644572371; x=1676108371; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dvUkbyhAbfnFruUSVETo756vfkSDlZZDNN18L/VMz2Q=; b=IQRyA1NAtjsVxGmOn4mu7zg3OASkJHTUWaz5LA85NZHo+98DwfGWenPT Cl0R2hyLoiq65CWIWOeYyJNbtNkutj7Tj3BtcOIjwlqMAJTkfONPIneuh ZHgmqqyvDVF4UZinlMyTubftqFhoSUZU9T183E3jawY2D914Dk5Roe1rw ABSF98nWqWluJLviRh28LmyvecjUZkG7EZb2gwZINVqINonB6J2G8kQnX XI+KNYJROqlI5JA4g2pR66s0C2N9OI2or9lyOhbP9GmvO6kVc5CB2wSnq D+UndZxVWbKepXl427bUJiGdsdIh4yQLqjAvtGhGMvyfPMPYvzvDqtjWc Q==; IronPort-SDR: 5r7sXJahiAhDyBCPfjOnW6BslTL5utcWGTfkJk4/HG/J9rcDdOLWEytEoSB4Dq/smWVyTTdhyd GbYg+Jj25czcZOIEwWAes581KOAU0dYTnsV1x8GT0LQpM9p2AYfyPL5IwsEdyhLCdnYICDHPwQ RnqFA/I8TLiFbBru720e/5bqHjurJHaueGehp9+SmzsOC5zUY1+qDkVhqkyyiorjjP45gjoE9s 0ZV5NSA107uMg41HuyBtIi55nJo8oRSPy4TOl+AYh2Bq/pDGFtI3GdPs9wLln//Peb4rSDKbUY Qnn44WMaGjNDkmFELftZBeCU X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="153263768" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Feb 2022 02:39:31 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 11 Feb 2022 02:39:31 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 11 Feb 2022 02:39:28 -0700 From: Tudor Ambarus To: , , Subject: [PACTH v4 1/3] dt-bindings: crypto: Convert Atmel AES to yaml Date: Fri, 11 Feb 2022 11:39:20 +0200 Message-ID: <20220211093922.456634-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211093922.456634-1-tudor.ambarus@microchip.com> References: <20220211093922.456634-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_013932_166249_A83CB6B8 X-CRM114-Status: GOOD ( 13.64 ) 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: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, kavyasree.kotagiri@microchip.com, claudiu.beznea@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert Atmel AES documentation to yaml format. With the conversion the clock and clock-names properties are made mandatory. The driver returns -EINVAL if "aes_clk" is not found, reflect that in the bindings and make the clock and clock-names properties mandatory. Update the example to better describe how one should define the dt node. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski --- .../crypto/atmel,at91sam9g46-aes.yaml | 66 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 20 ------ 2 files changed, 66 insertions(+), 20 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml new file mode 100644 index 000000000000..0ccaab16dc61 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml @@ -0,0 +1,66 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/atmel,at91sam9g46-aes.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Advanced Encryption Standard (AES) HW cryptographic accelerator + +maintainers: + - Tudor Ambarus + +properties: + compatible: + const: atmel,at91sam9g46-aes + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: aes_clk + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + + dma-names: + items: + - const: tx + - const: rx + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + aes: crypto@e1810000 { + compatible = "atmel,at91sam9g46-aes"; + reg = <0xe1810000 0x100>; + interrupts = ; + clocks = <&pmc PMC_TYPE_PERIPHERAL 27>; + clock-names = "aes_clk"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(1)>, + <&dma0 AT91_XDMAC_DT_PERID(2)>; + dma-names = "tx", "rx"; + }; diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt index f2aab3dc2b52..1353ebd0dcaa 100644 --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt @@ -2,26 +2,6 @@ These are the HW cryptographic accelerators found on some Atmel products. -* Advanced Encryption Standard (AES) - -Required properties: -- compatible : Should be "atmel,at91sam9g46-aes". -- reg: Should contain AES registers location and length. -- interrupts: Should contain the IRQ line for the AES. -- dmas: List of two DMA specifiers as described in - atmel-dma.txt and dma.txt files. -- dma-names: Contains one identifier string for each DMA specifier - in the dmas property. - -Example: -aes@f8038000 { - compatible = "atmel,at91sam9g46-aes"; - reg = <0xf8038000 0x100>; - interrupts = <43 4 0>; - dmas = <&dma1 2 18>, - <&dma1 2 19>; - dma-names = "tx", "rx"; - * Triple Data Encryption Standard (Triple DES) Required properties: From patchwork Fri Feb 11 09:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12743101 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 D0B0FC433EF for ; Fri, 11 Feb 2022 09:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=w00UDc/HbtV4E1hDSokb7PU+tJIgdBKhNS7brk6yX1o=; b=W/0Gld767C+u7D CKKc/KI1mmaSudpFtu/lsGihpBGUQLDPdMJZk2VFI9lnhH8L14S1vkfckN1XHANtLtyxGqG5G7RMB EctCV011Xb0IY6fPd3O1KFcNrRbztYqLiLQuVRNOvtxEe/gI0xe+zbaHEweRNTj0lJcW3IfTnvsQx rVzfAHgtnYKHhtWf0DPKwM7suP5zJybBYZhVQga0lSAZlxQbC+2AgQe8AbkJasE6wtjDuWUnWcOTi UVYO/47pxZN7fETWMujavXNVTaWFqwgqYQL/mKlOSKOzp7EIl4BWB2CkjdhA0Ks2Fsel8S8KP4Qx/ oNqKYRxT4j7iATMIY7bA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISPV-006QtI-3R; Fri, 11 Feb 2022 09:40:13 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISOt-006QdY-IL for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 09:39:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644572375; x=1676108375; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OL6gLT7wev9O0q2qvKg+zBDZoeZnw93JsYQDAe9Nous=; b=Na/SvJWZVdJonzXRFC5ED/4o3Itgvfp1r0rTXAo71gxbJopkvmEbjlxT U08yGGGUThSXVHqvVXRv9CdMFt4igjZnxa7jkOY75SUG2nz2xtjoA0s6G 8YShFQLnuVZhfINm1CaAlR0tPrOByl5V19X66iSHR6BUUItHyNpG0ax/J Y6U3guxSiX1zRm4YyjUQhBMp3PASV7TSdFSbKthff3T9Y7mfI18b68Val q47jUh3wDa759tMMcHpaUm/+39eluNRA6CPCs2/BtkEGKxorzGwDUHljL pA4r84jMI5E0ntde5r9fa+PLlF5PGzJKPtjAwhz1WjaAL58OUrbcLxhZi Q==; IronPort-SDR: 7TcHMiKncXPs2xpOxyWAk8mAwo1Fa8oQyKybgl5KZLwrfWQXYNjU000HNFSjDr6r9gE7xYPlL7 BtSR6Nhw7bDHzO/+ZyvrARP2H2HAze1yFHUXr2vAplvpDx/DlZwq9FDttvWJjta1ByRCBOdoh4 kf+x0s6ggTX5rak71bn2L6KYRMgclIxRt0UexINNKQ9Dg3mvU0MTl9CL0DsKpmjhafrMmbzFsT Tz7p3TRVJjGSdlqXMgGCek3vqL+YH5aKWxYourb7tHc2W76b7kwTe6eQLNs/GC123KMXkEGcXi aNVD7Q1gqQeW4425Z2AIeljc X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="153263793" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Feb 2022 02:39:34 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 11 Feb 2022 02:39:34 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 11 Feb 2022 02:39:31 -0700 From: Tudor Ambarus To: , , Subject: [PACTH v4 2/3] dt-bindings: crypto: Convert Atmel TDES to yaml Date: Fri, 11 Feb 2022 11:39:21 +0200 Message-ID: <20220211093922.456634-3-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211093922.456634-1-tudor.ambarus@microchip.com> References: <20220211093922.456634-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_013935_698371_4C437F48 X-CRM114-Status: GOOD ( 13.10 ) 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: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, kavyasree.kotagiri@microchip.com, claudiu.beznea@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert Atmel TDES documentation to yaml format. With the conversion the clock and clock-names properties are made mandatory. The driver returns -EINVAL if "tdes_clk" is not found, reflect that in the bindings and make the clock and clock-names properties mandatory. Update the example to better describe how one should define the dt node. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski --- .../crypto/atmel,at91sam9g46-tdes.yaml | 64 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 23 ------- 2 files changed, 64 insertions(+), 23 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml new file mode 100644 index 000000000000..fcc5adf03cad --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/atmel,at91sam9g46-tdes.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Triple Data Encryption Standard (TDES) HW cryptographic accelerator + +maintainers: + - Tudor Ambarus + +properties: + compatible: + const: atmel,at91sam9g46-tdes + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: tdes_clk + + dmas: + items: + - description: TX DMA Channel + - description: RX DMA Channel + + dma-names: + items: + - const: tx + - const: rx + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + tdes: crypto@e2014000 { + compatible = "atmel,at91sam9g46-tdes"; + reg = <0xe2014000 0x100>; + interrupts = ; + clocks = <&pmc PMC_TYPE_PERIPHERAL 96>; + clock-names = "tdes_clk"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(54)>, + <&dma0 AT91_XDMAC_DT_PERID(53)>; + dma-names = "tx", "rx"; + }; diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt index 1353ebd0dcaa..5c6541cfcc4a 100644 --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt +++ b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt @@ -2,29 +2,6 @@ These are the HW cryptographic accelerators found on some Atmel products. -* Triple Data Encryption Standard (Triple DES) - -Required properties: -- compatible : Should be "atmel,at91sam9g46-tdes". -- reg: Should contain TDES registers location and length. -- interrupts: Should contain the IRQ line for the TDES. - -Optional properties: -- dmas: List of two DMA specifiers as described in - atmel-dma.txt and dma.txt files. -- dma-names: Contains one identifier string for each DMA specifier - in the dmas property. - -Example: -tdes@f803c000 { - compatible = "atmel,at91sam9g46-tdes"; - reg = <0xf803c000 0x100>; - interrupts = <44 4 0>; - dmas = <&dma1 2 20>, - <&dma1 2 21>; - dma-names = "tx", "rx"; -}; - * Secure Hash Algorithm (SHA) Required properties: From patchwork Fri Feb 11 09:39:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12743102 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 45E07C4332F for ; Fri, 11 Feb 2022 09:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y0PLnF0u/YSGkXR3Eg3Vw0swE02u3x7CwIJMiBJKOUQ=; b=fX6ZmWyycRC/i7 IV++Ipe3NIQ6jO4gLyckk/I/n/klJM8RRYttPYuv278oo7bfVIDR3evgYE/ihEdXcTf29J0D7BNly i6+xC0xB9K+cQ5ikgPfU9jQJxdGLUWqiwxBDSGT3hDIDqCCFim79ZtfXOoBqu3+b7ypLGH2jLXa72 ntVrPbuYmqSDzImpi52fI05dXv/blbvEnjfAjMv1aN5ct9lJdgSR4r8lnPhNwMrXrF7UJAhrg4cKg OT/pCs33iU8KuqNZPJg4gPPoPxgJq6KW/E5O21+uZ5Y7tvZf19akzHYByhBBtDVDfj52qxmQwMpEZ +Ztfd+LF5jDGQoe35P8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISPq-006R0C-1e; Fri, 11 Feb 2022 09:40:34 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nISOx-006Qfg-B6 for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 09:39:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644572379; x=1676108379; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vc01hpWMLj0MX7Suyo/gaNp3ZTgeddpPoZAPTjJV1OQ=; b=TvvUMZMavMXqX4ulR6kCZnKwDztadg5kxl/Gt8HTXOAiKxa5fZakU8b/ hdNeW0GBcMfgIL4EzOvNSBepOC++ccO2Ym839h5ZuqKAB7zJu/Xx8HwCN YKTGJYYfsaYOb32QoM9Y5WydWdRbSl+kDQh+CuuMQ4IDn3uhLXOVjhvud KyexFDedBgN+6ocM5wy0IL6+LIQyu5t8cvANPyG1JbTAfOhKc1w807m57 OzGLU7+dQ+fVI6lqtgDhGJDDoGjLEFqycaGrQhx3e/F+bTrtvDmMPdKSX 5yNixBTtJi+CUJ04BMMBQ9r/GLjMxWMCIAj96m1jlyb3KvarBg7Js4Fgp A==; IronPort-SDR: xfAmm2XmiOHNPcq++MvYfecbNJBno7ge3ynBF+N+c+hXUHUk3gI8c/gv8MHhSdDjsBHN0TOs2/ L2ARxgIK9arZe03vQvraNKAqsftWFc0B4+nUarRP1wLXf/LPUwcVYZcrOdFoFrzr0jVhyM+mJN 5JciyBEa4xkGcv/cAfcg6gg40ezi54RnDvNdDGPhjkcpDsHuzs5CxVWa+ZLO1HEIChbjBNBf3J eQOYtAn53RfQcvMO16P/XMCla33ag57eT1q0UVXVU75JUintNB+vOdppG+LNeK9oYVAJc+iPYr B/JHLnts3AHU0nog1D3IuQDV X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="161908023" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 11 Feb 2022 02:39:38 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 11 Feb 2022 02:39:38 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 11 Feb 2022 02:39:35 -0700 From: Tudor Ambarus To: , , Subject: [PACTH v4 3/3] dt-bindings: crypto: Convert Atmel SHA to yaml Date: Fri, 11 Feb 2022 11:39:22 +0200 Message-ID: <20220211093922.456634-4-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211093922.456634-1-tudor.ambarus@microchip.com> References: <20220211093922.456634-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220211_013939_432969_7FEB4E18 X-CRM114-Status: GOOD ( 14.25 ) 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: , Cc: devicetree@vger.kernel.org, alexandre.belloni@bootlin.com, Tudor Ambarus , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, kavyasree.kotagiri@microchip.com, claudiu.beznea@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Convert Atmel SHA documentation to yaml format. With the conversion the clock and clock-names properties are made mandatory. The driver returns -EINVAL if "sha_clk" is not found, reflect that in the bindings and make the clock and clock-names properties mandatory. Update the example to better describe how one should define the dt node. Signed-off-by: Tudor Ambarus Reviewed-by: Krzysztof Kozlowski --- .../crypto/atmel,at91sam9g46-sha.yaml | 60 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 25 -------- 2 files changed, 60 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml delete mode 100644 Documentation/devicetree/bindings/crypto/atmel-crypto.txt diff --git a/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml new file mode 100644 index 000000000000..5163c51b4547 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/crypto/atmel,at91sam9g46-sha.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Atmel Secure Hash Algorithm (SHA) HW cryptographic accelerator + +maintainers: + - Tudor Ambarus + +properties: + compatible: + const: atmel,at91sam9g46-sha + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: sha_clk + + dmas: + maxItems: 1 + description: TX DMA Channel + + dma-names: + const: tx + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + + sha: crypto@e1814000 { + compatible = "atmel,at91sam9g46-sha"; + reg = <0xe1814000 0x100>; + interrupts = ; + clocks = <&pmc PMC_TYPE_PERIPHERAL 83>; + clock-names = "sha_clk"; + dmas = <&dma0 AT91_XDMAC_DT_PERID(48)>; + dma-names = "tx"; + }; diff --git a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt b/Documentation/devicetree/bindings/crypto/atmel-crypto.txt deleted file mode 100644 index 5c6541cfcc4a..000000000000 --- a/Documentation/devicetree/bindings/crypto/atmel-crypto.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Atmel HW cryptographic accelerators - -These are the HW cryptographic accelerators found on some Atmel products. - -* Secure Hash Algorithm (SHA) - -Required properties: -- compatible : Should be "atmel,at91sam9g46-sha". -- reg: Should contain SHA registers location and length. -- interrupts: Should contain the IRQ line for the SHA. - -Optional properties: -- dmas: One DMA specifiers as described in - atmel-dma.txt and dma.txt files. -- dma-names: Contains one identifier string for each DMA specifier - in the dmas property. Only one "tx" string needed. - -Example: -sha@f8034000 { - compatible = "atmel,at91sam9g46-sha"; - reg = <0xf8034000 0x100>; - interrupts = <42 4 0>; - dmas = <&dma1 2 17>; - dma-names = "tx"; -};