From patchwork Wed Jan 25 00:23:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13114913 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 1777CC38142 for ; Wed, 25 Jan 2023 00:26:30 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PLt2XzAb4uGgKdw0eGu7fK3nRwl6xSRwOWV7ji3zFqo=; b=JsI8VlA6raihwH 9YCXxyHqx1lTMwzJwxtj3E29mY1sg7Vs0oOmwtnBpZ7p6l01TknOlow7PUIP6Ajqr40AaakV5gYpb X0EaBeiHwOPe+6Nt+mEmDa3dxUpt+xIt0D4SI4Un/bvkDyJTcCi6WIbdnfmc8XKZwpNFq3pkmMAMT nL/JcjGUVtCbfMo6e2Ply9xPqOxrNyE1pN98/XzZGSNWr/SE9bMow11s5EzveJY8f73OdzXYGSKti nASYv96yaCVCYp9m6GYlOROO9IuapQxQ/c2zHDgcA51Pa3XLJDvkXGIcCcXNE2MNHiE2I2x1uXVB/ kkyMHJzdWI9W8cXSgLeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKTag-005gQE-7A; Wed, 25 Jan 2023 00:24:38 +0000 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKTZX-005gGr-W0 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 00:23:32 +0000 Received: by mail-ej1-x634.google.com with SMTP id vw16so43475742ejc.12 for ; Tue, 24 Jan 2023 16:23:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=IhJRzXVyFbYsW9+EPTTFmUQre+ecqTHVuxtlkf1ZhBo=; b=KCLc7tjuPxwl5JW8yMLr1Wn5U5TnOHXpJR9NXS35wGwpcxF92n6GwN6d2xeH3QzBrU 4WAG5bmWef/Pu9BseaRWJIdThGWZUghD1/mykmTHdHyUNMMUPv5yKRdM2LqG/f5iCYtm 6HCjTLZJF3O29/qVTTMGYJymLcJEvX0M0G8iT0jKLteUVJGi06JmvEXGBsp3olwYz95A D7gOtlA4y4SqhHcejKrZK41ioSnnOL/8y4AjT0QJ851q9johTHIgv30clTX1wW5iBTgm PRHADWXI1A4mEBUAfuQ8hWdCO5tIm1Rx0SZ1Bq5vTPcQ1WsljCaAYNtJJ5AWQazQ+r5c q4fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IhJRzXVyFbYsW9+EPTTFmUQre+ecqTHVuxtlkf1ZhBo=; b=Gm4AaTPct665qkO+lO57cjKlKaIUj+Xwdie/TGt2qttBUk7PehMZ0NMitE45UwC/cq hRtu3a5Ac8/p6ompuMVeO301ySNEa8vOjjBW9BkW9iNCrQL2Gr9MoyJdM4MqMlrWMQlH O03GK29Vwi9wvVRgSWp17u/dzzEWcsu7fmoMC5fE2uCmS9BJlqPqCEGlueORuUSgL7f/ c/afuwl5zMP+DAtFviRYr9EP60MX+XTTBk3UpqpaxlI86rUPvsREEe9i3QKid6HnlAg1 BYc0f4rSLp4QS/XmLuYcVQBySDJ9nAVHeTTGp+hE8yAR0hHfHQ11j2OnZ3BukzG2biw7 R9CA== X-Gm-Message-State: AFqh2kpsveGWB9nFCc76GJOQDjbNIl4J99ML0NtdlNuycFqNYH1iCIF7 Zz/ybb7pdbz4+zkRg4K3/mMXJucEqJu25wGp X-Google-Smtp-Source: AMrXdXvS1BAG+73sw122jBVVgFvXv4BoWPsK0NmBVj0lSa1oJW1cWbomQQG6e+x6UomqF0DgG/FF/Q== X-Received: by 2002:a17:907:9252:b0:86e:d832:2f60 with SMTP id kb18-20020a170907925200b0086ed8322f60mr27013282ejb.48.1674606199621; Tue, 24 Jan 2023 16:23:19 -0800 (PST) Received: from fedora.local (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id if10-20020a170906df4a00b00738795e7d9bsm1584606ejc.2.2023.01.24.16.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 16:23:19 -0800 (PST) From: Linus Walleij Date: Wed, 25 Jan 2023 01:23:06 +0100 Subject: [PATCH v3 1/6] dt-bindings: crypto: Let STM32 define Ux500 HASH MIME-Version: 1.0 Message-Id: <20221227-ux500-stm32-hash-v3-1-32ee12cd6f06@linaro.org> References: <20221227-ux500-stm32-hash-v3-0-32ee12cd6f06@linaro.org> In-Reply-To: <20221227-ux500-stm32-hash-v3-0-32ee12cd6f06@linaro.org> To: Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Lionel Debieve Cc: linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Rob Herring X-Mailer: b4 0.11.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_162328_151611_9DF05158 X-CRM114-Status: GOOD ( 16.86 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This adds device tree bindings for the Ux500 HASH block as a compatible in the STM32 HASH bindings. The Ux500 HASH binding has been used for ages in the kernel device tree for Ux500 but was never documented, so fill in the gap by making it a sibling of the STM32 HASH block, which is what it is. The relationship to the existing STM32 HASH block is pretty obvious when looking at the register map, and I have written patches to reuse the STM32 HASH driver on the Ux500. The main difference from the outside is that the Ux500 HASH lacks the interrupt line, so some special if-clauses are needed to accomodate this in the binding. Reviewed-by: Rob Herring Signed-off-by: Linus Walleij --- ChangeLog v2->v3: - Pick up Rob's review tag. ChangeLog v1->v2: - Use an else construction instead of if/if not. --- .../devicetree/bindings/crypto/st,stm32-hash.yaml | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml b/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml index 4ccb335e8063..b767ec72a999 100644 --- a/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml +++ b/Documentation/devicetree/bindings/crypto/st,stm32-hash.yaml @@ -6,12 +6,18 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# title: STMicroelectronics STM32 HASH +description: The STM32 HASH block is built on the HASH block found in + the STn8820 SoC introduced in 2007, and subsequently used in the U8500 + SoC in 2010. + maintainers: - Lionel Debieve properties: compatible: enum: + - st,stn8820-hash + - stericsson,ux500-hash - st,stm32f456-hash - st,stm32f756-hash @@ -41,11 +47,26 @@ properties: maximum: 2 default: 0 + power-domains: + maxItems: 1 + required: - compatible - reg - clocks - - interrupts + +allOf: + - if: + properties: + compatible: + items: + const: stericsson,ux500-hash + then: + properties: + interrupts: false + else: + required: + - interrupts additionalProperties: false