From patchwork Tue Feb 8 10:49:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12738465 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 9C477C433F5 for ; Tue, 8 Feb 2022 10:51:06 +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=4PvSLb6BfrwpTSJ2ZJ22jEE42ag3alhsV0LMwepp9zI=; b=bk6JUWwbyMsWeG vIw/j8UOVnU0uRDhP+AfYV+G+gao/h/GYZA+CvhBoNanWelbmekbIoZAJaSQmiQk9snwfEWMbiHCq 323Bps6F77SPGTDBm2+ebLWAwB5fT0xFgjyuOisyhaNMAO5MjQECjV/lXUK3dqjCUrmowISn6w6aM MFNJiHk4IXW1IZjgofLBkBoRcE7oahGakPAe9Mng0Ip9dk9NB/i2nOJwq9DGs3UU8TAlc5d2qd8eN RzVfUq0AkdNqbra7XCTt3q71b4MGXAgmRWxt32NtdHxnfYiTKI7OKhFrgxscz/K+2vx2oRiZl5Ir4 EBuEOY9JHflop2+5GLnA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHO42-00DS11-29; Tue, 08 Feb 2022 10:49:38 +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 1nHO3s-00DRz2-7D for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 10:49:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644317368; x=1675853368; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=S1gftKaYgRVlWT8LHhLQHW2YcgyuvKJJFSYmqWNRzww=; b=mrOQZeNtlGA/u2fHBxqsnV4OfNLpxZpJbE2evX+Pd9iKvKyulHTyN8Vj tXDkKhY+Du9l8sCjOq6Kcfn3QpzktOM4meIneM6wUa69RWHb+A6zDYI42 8IQorgdEO+LK7YRhfzHxq++coGnzjucFyppuuz1cA5wIlbLZ1e36Aoyg8 mQsRlHjaArdA1B2swUT1lR0PUExN4/Ch4CmR+XNE/sekt7igzQ0Zojj3T HUvTF0Wp8yCngAvC/NGR9ZxG0u8JYO4Umu0CRKMUOT2o8LuXZOPhkxd98 xgVZSw6J0SCIIXzgz7Kzh3cmhfyA9vdCXTI9Bw/rQ71wpqCkdTVuBj/za w==; IronPort-SDR: dfH9SZszMf+DGfuE/bSUHGRzi0aP3ldUTXgnQqYeq+CsG8Nke37i2VZZFacsOTUH35cWWd2t5I 0wMItFuQpHbVvU6K3xDfFFGdu3CMDU1uGBvEutZGPU+rHI+gfW9Q2q5b26lV6icniAyzvMunQJ pM/cm85JxlQjtR4WRXCMVfQEhl6STTHTn+/ALgjDxNw3LwUEt8zjRgdsQiYk7vdm/qI7DeRcjs 6Dpdjbi3jXOrkA3L3wh7v6Z9RGZ5+pRUmxeVNuvdWTh82EihePXoB9cLwRlzb/pRRoW0KlISRN At9W20RtgftmVfIlt5VlcYYd X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="152826403" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Feb 2022 03:49:27 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 8 Feb 2022 03:49:27 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 8 Feb 2022 03:49:24 -0700 From: Tudor Ambarus To: , Subject: [PATCH v2 1/3] dt-bindings: crypto: Convert Atmel AES to yaml Date: Tue, 8 Feb 2022 12:49:16 +0200 Message-ID: <20220208104918.226156-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208104918.226156-1-tudor.ambarus@microchip.com> References: <20220208104918.226156-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-20220208_024928_296576_4AF4F334 X-CRM114-Status: GOOD ( 13.70 ) 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 --- .../crypto/atmel,at91sam9g46-aes.yaml | 65 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 20 ------ 2 files changed, 65 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..146ff9c7b60e --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-aes.yaml @@ -0,0 +1,65 @@ +# SPDX-License-Identifier: GPL-2.0-only +%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@f8038000 { + 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 Tue Feb 8 10:49:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12738467 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 DA4C8C433F5 for ; Tue, 8 Feb 2022 10:51:13 +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=b1Ff+aL5/a5vieeOXv0C/tFX5prjQT6ZuAJdK4UrHBw=; b=lyYMPhhzxunPtx XkvfnxcF/ABBgiogAnuo2pN/HvqYT6YlPG/5KIUlUBDCQipJAVmuNDIiLhxN/zYfoty76VDs4ldZR /wQdXsKQMn5Cp4J0t9Hz019MSafesPdcj7DcT84d1vhjyS4XYmrtOwefO58dwVt8P2e7Aqc9VVjAG MPs78T5SGNMjGrYHqGSydRnMkRr4DB5Rzjp/WiYuBtjBHRgHGoyI62qmid7WhJaABeNT+xC7xwxJU WI5MgTeUyBwtKSbcobK0DEtnvRR6QeMqJ2CCs8xOdyfyu11Lw5PQqoYuCE4r+OpT4jRS5XEZf6MrO TAVUZZ47dCaTpyV0Txkw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHO4K-00DS6f-J7; Tue, 08 Feb 2022 10:49: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 1nHO40-00DS0f-80 for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 10:49:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644317376; x=1675853376; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=M55KZu2QZB5/Dm64TNCQxn9MG29ddQ39+nhh37gfD/I=; b=TNDLQpYfvcgQMEdLMbX98ylou5KnTS8JQO+2oxz4CvD+kl4klUhKHCDe j17iLwlCzzlMQHGo8t2BYAMCmrRip3Q6vDI3i4gZS4HcQzNdwkJKUfsCq bZuV0nmihr+2Kq2RPBmabGXFp1Rp4HCEh8ASuHFr6oNaw7qswULBukMLi cvAXc+KwS+JNi4LOkcX8JAl+Z5cluuZoRd7V/CJas7NomAOCRfKReFQAM +uXvWaF4UJU0IeDutmLuBhXEjlhCOxt/Em9xZc6M62B2jjOm/f+ttBcfm cyR35Dtj5KcTRyEoOuFr9GQ+k5WBcR3IQp9qL1axEBbAPTU90mPKi9Xgq g==; IronPort-SDR: EkrbKHP3uOk0uVFmPiAseSDf13NtILToVfRQw/p4mx2PLqPCRMmClxA9SIXmw2bPFcX6uI0v2D eU0oISWnIgyX/qx2bllIvdDxFpSOa5AER2i703hAyKUO2v8OTCXZoWi0qwbs7N+ESs+FzxIdfL SmO5SG1LeCQh6fiGu00tc0l7mU82nWS21qKNJ5TaLMrHfGdCwgak+QukN0sgdLnmF9l3VqvzCA UsXj9UZev5aWaqRMZ7iqODWkijTcmtwqfqP6Xpid3RYMCQKEJnpzvo9RmkPxtgVvirFFHZTymJ PddesnsKnjKuKSRsCCsPOcd7 X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="152299954" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Feb 2022 03:49:32 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) 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; Tue, 8 Feb 2022 03:49:30 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 8 Feb 2022 03:49:27 -0700 From: Tudor Ambarus To: , Subject: [PATCH v2 2/3] dt-bindings: crypto: Convert Atmel TDES to yaml Date: Tue, 8 Feb 2022 12:49:17 +0200 Message-ID: <20220208104918.226156-3-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208104918.226156-1-tudor.ambarus@microchip.com> References: <20220208104918.226156-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-20220208_024936_321742_236A4719 X-CRM114-Status: GOOD ( 13.16 ) 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 --- .../crypto/atmel,at91sam9g46-tdes.yaml | 63 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 23 ------- 2 files changed, 63 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..8a71f3feb6a3 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-tdes.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: GPL-2.0-only +%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 Tue Feb 8 10:49:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12738466 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 19D43C433EF for ; Tue, 8 Feb 2022 10:51:10 +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=U+MLU9ZUwKjTs8zzLllOfRl6e3juf21g0lHMPW7Nvh4=; b=GPj8ZaM8pqMMO8 DoiaOry7bx9aWpVopZL4wFSZhvPv2RTO3r6ijJJpXQTHDrO9GYNcxFt6Dws2koteLkaa0YSjajder vWMN7Ejke0ELS/ym7oJ8frzwwym5DEexqKPEHPDqb7VZ6bqEiOAllirEcwnucD3pl8R1cfHt6Jojk UpKPqI/hXYjhWPNmTivnmYsRS8GER1+uu+Ef1BdT8ULoNHET1Qtp4CtOkuBCYTy699PVNHzA5LEY5 oOYMfZy9CNtH9XroH2O3zdqJYxuEwAXVRkGMY1an49BvRGFKbc8WojVxc/LSSuW0gk736u9qxXqRQ A9RZCiF9+OIoMJqYGXTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHO4B-00DS3n-90; Tue, 08 Feb 2022 10:49:47 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nHO3y-00DS01-EZ for linux-arm-kernel@lists.infradead.org; Tue, 08 Feb 2022 10:49:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644317374; x=1675853374; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8bVyjlOCtJLgcl05G5AMbfZqCl2pQSsFOps6GXgAhLc=; b=WhoX+SR9E+jNjvmGn39SRQI8K76Qr0hRuEvrGWq1UGHQvmSAaBBG8hB9 VKKzUvulY2EbAbzSN3YdoVLA3j4Q70BNv7zdy712MmENXTUmfDlQAxM+R t3/emUUjl19uWeHSB3qJrWwlmg7znx+VIrK6FN6QPJX+1yEI/kSd5NvIQ SWTMFSn3VZVgMXKQ1jBXtlljD6IX4pkYwJltRL8Pnt6MaK8cbCAKjCNi2 ylRp8coQ1SYHflMFdD/VhL2xrx98WdA99p1E1JOrxFbLblw4rnZOmQ6IK ZQTmPNzADZhCHXFyQER6OOLd5KbI8Bu5OzxbHgL2+jAhlogs6ChFB6/n+ w==; IronPort-SDR: paXrHcMzXITY/LEfDy4ZULOXn79Aik7ZevZXoqizNpmg3tQ53phwZt/2VbR8iy70Vv8dFse3il hrOqtig2JihYu0NLVdtdTk5+zDmOh9XKlV7WVRayqHsPVvNQmO7Q8o4gPIN7PV+c1Z7TcwExrU nomC21ceRNA+zx92WakxziCSb3VNR72utsgy1K8kD8On7ame2/UMxBFrAmyoGFAzvPhAs/5mci 1gtQXfhJIO+EcoKyxn/csKGhv+0msT5daeDwV5muh0oZxVpDWy9myUVUI0zDa/rh+vnq3VThQn p7++QDtvQu46Fk15XuJmpqi2 X-IronPort-AV: E=Sophos;i="5.88,352,1635231600"; d="scan'208";a="85018008" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 08 Feb 2022 03:49:33 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Tue, 8 Feb 2022 03:49:33 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Tue, 8 Feb 2022 03:49:30 -0700 From: Tudor Ambarus To: , Subject: [PATCH v2 3/3] dt-bindings: crypto: Convert Atmel SHA to yaml Date: Tue, 8 Feb 2022 12:49:18 +0200 Message-ID: <20220208104918.226156-4-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220208104918.226156-1-tudor.ambarus@microchip.com> References: <20220208104918.226156-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-20220208_024934_587743_1A0840FF X-CRM114-Status: GOOD ( 14.42 ) 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 | 59 +++++++++++++++++++ .../bindings/crypto/atmel-crypto.txt | 25 -------- 2 files changed, 59 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..e454f4468dc5 --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/atmel,at91sam9g46-sha.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: GPL-2.0-only +%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"; -};