From patchwork Fri Feb 11 08:21:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12743007 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 23CE3C433FE for ; Fri, 11 Feb 2022 08:23:02 +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=wdQLOthfHcYnG4ESSyzbGu+BYTOH+BvqiPy3IYfhGuY=; b=su1HWCglDqExLN A/0vsbK5XHb4P/CZmouvzjRBhzxv3BVLzmBYLV6gPhlhRkpMXOZd78anwC00HTfJQ4XkyJIlxx8j8 TD1d9wwx3w6igaC67vDMICJuoDDWEi5uKLo7tZOKWLLPAsY2Q7H3apdN2gSnpF23N1icocPASN4X6 +x6ZK3ndI9MzMnrNuBHKz1DKOfwY8Js+BAbjXvu2qeYL25mDy1xJAxAYoBEn+/gUJLsRUgXBAAgad mrKqtqND4YSUy3/EWi1RnWKmbVHzGAuS1QsIItPDyKvfG3wbVJHatfHZZRgKBYJRxrau0j80PU2eN lzUBAVY7yLT3a3kPfrmg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIRBT-006A2z-NX; Fri, 11 Feb 2022 08:21:39 +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 1nIRBG-0069zm-M2 for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 08:21:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644567686; x=1676103686; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qMUmQ4TZTneTTqUCpiCpMXN7J4xp+B/G0PACVQV1IG4=; b=SM6b8iRUSiYLx+pt0gNWFTqOQmi9jiw+T7RHAo/pYHbrbvf5pAakZUNL Y4pyntOwqN7qePn42NrIFGK3f7Z8m0a8iNzTiVZkM09ni4OBwvRg9r92N 4CVB/d2PWejXNP6kR4tegoPuRUzrgQycmeueQwbhXPad9Ijx0uY8/TW5e pltlCVWhE0eiZlTpziJq4bkCFWgHiCwGOUB5WPlWwqkPBjyWKlPvX98vy 0akNsx/+CAAaxPwlXHJ+xCAhJyey3/RzI5BzZcwn9SVSSyC39RoU+VCbo XgkTYARKoQ1zqG6d9ZzkcEkGWA6Qxg1gLzdguizArCYY0PphH2cMnd5YK w==; IronPort-SDR: PRTSrRINkpJbckJlXqRILlFR/gim7G2JHiV3HV7Uenc3UWPGME7L7wggeyf93gjs6aEKV18Dhi pKvB389ZOj1IHDCOlOpmCqIXPOgSeE4N/ilLNTVSZU338FyuhYTBdMS8MHP6dLqkT5MFWhaYkl KPxorhZoysuKOH3YgF1ttcbz7sjmHt9YDvvpUgrJH3ciFSPiH/Q+vNJFH5N7tFimlhYWGRVCPp HflmjTzP0i2POJUeXJDpcUd7ImVss5ZCPWql4WiP5/vIoKI7gCPeijcSdZVfiDesA3Wp/JFH29 RQ0Pe69k+wL9vxdoKwsuAJNf X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="153253152" 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 01:21:22 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) 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 01:21:22 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 11 Feb 2022 01:21:19 -0700 From: Tudor Ambarus To: , , Subject: [PACTH v3 1/3] dt-bindings: crypto: Convert Atmel AES to yaml Date: Fri, 11 Feb 2022 10:21:12 +0200 Message-ID: <20220211082114.452911-2-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220211082114.452911-1-tudor.ambarus@microchip.com> References: <20220211082114.452911-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_002126_756117_6C858EE8 X-CRM114-Status: GOOD ( 13.63 ) 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..fe59ad30b171 --- /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@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: