From patchwork Fri Feb 11 08:21:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 12743010 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 D35DAC433EF for ; Fri, 11 Feb 2022 08:23: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=y0PLnF0u/YSGkXR3Eg3Vw0swE02u3x7CwIJMiBJKOUQ=; b=MortrHH0oghZhU BJ9TzXtDWODMb3bdBJqI+vd8xui/0/QD27tYyvBs4nfDwVJ9cjcTq1sz7k0qhSox4kqdp2GhuygyU hBpPXYWoy41V1GqhN/px6vAW3GoJz34DIbf7BnSRWFqhC2Pjo15PkzX/MB93Lg706fmpATjiPOSd3 //Uxy9tWDM4XBPS5UBnrFciYRPn73t9e/9neoLuEyfWVnxHD5GQglU5rYtbZn5sqVHGjCbzPPOyus JrD9oGL1BqY4yM/NOova941JHq75nE1jr/Y8ZSJfya29rd7zyvyKeG5qBp7sVkx9rzPS5qKO740zA bZt3vk6I6/In8uEDhtig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIRBn-006A7M-0H; Fri, 11 Feb 2022 08:21:59 +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 1nIRBP-0069zm-Lb for linux-arm-kernel@lists.infradead.org; Fri, 11 Feb 2022 08:21:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1644567695; x=1676103695; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Vc01hpWMLj0MX7Suyo/gaNp3ZTgeddpPoZAPTjJV1OQ=; b=kIqT3gGAPfJFOAeO3gZHcha8PtevYZ7JYXcqP4B7bB7ucb+WQHFFljAH GYrlRVHVPrIgcNmrTOJREtkdQ+QQHkZauZJos17Kogz2r3cU+KwSD3w7F OqpuVi0pH0dBvbJBG2vpGZeyO2+NGrwJafn4Cm/4gcGZYlFTDzMzxSsAN +Z4ukNp+iP1Va6ALZfx7xUrxPMTk1y4WMEc88yiRr6VXDZW7nFaixFrEK M8f87rlWQ1mPmgYhfQ3GLY4aIlceWbnlBUxiIfQd77CrqpJc/MlasFCy8 W5X91H6kh+amrO4grsYgv9DKrqBJQcIfSeE5BL76eiDaSsGlD7LuL8rNS A==; IronPort-SDR: AoD7tbC++ffsEs145iwyzrlg7UQKfwt8ILlU73zaagyrnbfog0jfxkyJEVH04wszS5l60I6Z1V x+DfEzgN+JXC7Ioy/SfqYaLyVONM6YeiTP6EVcd7aPiR8Fv2rqV48y/w1g4s1YqCgPBRGe8Mv+ oTPXZVKWQWwilnoGq9Zj2HpAmQkJrgCPDqxY3JvLVbmZf/qe8olJeKDsRgNIlNTKdHoqPEhqB3 nU8khnli+k/JCD9TveS6AIjC+gqb5qPb56hxJlWUwKWmvREPizNKMr6ar2XMV4OXXlnWHFgEqo jL0cfjNkK5aBdzw3IZYC3VHz X-IronPort-AV: E=Sophos;i="5.88,360,1635231600"; d="scan'208";a="153253186" 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:34 -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:30 -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:26 -0700 From: Tudor Ambarus To: , , Subject: [PACTH v3 3/3] dt-bindings: crypto: Convert Atmel SHA to yaml Date: Fri, 11 Feb 2022 10:21:14 +0200 Message-ID: <20220211082114.452911-4-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_002135_744668_5A81C76D X-CRM114-Status: GOOD ( 14.36 ) 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"; -};