From patchwork Tue Dec 27 23:03:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 37013 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1621146wrt; Tue, 27 Dec 2022 15:06:47 -0800 (PST) X-Google-Smtp-Source: AMrXdXtobW4pHVHrS3mTbrphGVgCXr7n+LoO54m6Vz01XkmPSl/EAqRISDycP/krxjFn+K7IoN74 X-Received: by 2002:a17:902:a70c:b0:189:dcc3:e4a1 with SMTP id w12-20020a170902a70c00b00189dcc3e4a1mr24329358plq.9.1672182406800; Tue, 27 Dec 2022 15:06:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672182406; cv=none; d=google.com; s=arc-20160816; b=KTZ2ayG1GX8TMXzwizqHuBD3wHlKzWkp9BnLs4BtGdLvWAxgRXxlW4coV/KI/vqJbk LBMyPurkxrGHXlJd411hn9wnBejCS9/nsstQQb5zZX6fJIskRY60+eEMDwISFWEICSY5 x6gZF7K0lH3Fap6Jn/FtAPwh37dfFaQ/S/l3KZTBnZAHN47A9YBzfBfi8B6PoeFhCKkF 9xQf790sfZZTWHG1pJpxkdwaBtxjP7CMbfFMR9mEuQmoNGi3PGeyH3Y6xM81Fl04A9X9 kkyg06tfQ8Q0VVvS7ancjogwvbLj/mezmtOs/Cu5q7RCzaWjPOiD2qC2lLv2ECNzqqGr xAsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=WFhxyjlvH2C97OwizzrUKlo9kQa69CcIj1hYQfOMQx8=; b=vHdgaJPV3lrJIS5zrrO1Fsosvs/iYDT1lN7CTCtVfBCCuSFnkPZwc0BIRpCSxM/zXg iL0Aw/8MOv1hcagQZLMBvlZPNjkD/1Au6y9JYwzisrB26aIaL48Y84bPbsTWKKlPvjne sYNLuWtKNFQGwpbfJSd7xnfZtzmmX6YoqZ4ULd6B31IV82JIjAtPPY8nz+sEtOlnF72b 1EO7LbI9ad0NATmUJaa0ZrYYelJDQS1DaoHYNQoov7Y/QTff8nJUUxuPuY+nRJaFL8ly rtjGmVQ+WX7eAWoF5LjwJVvwkiJvVr/vc7zJaCGzaIYqRRLJMSToj7omP0ShALyKLRYV ItPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KTKV/mqi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q2-20020a170902edc200b0018c166e2304si14705054plk.299.2022.12.27.15.06.34; Tue, 27 Dec 2022 15:06:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="KTKV/mqi"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231608AbiL0XEE (ORCPT + 99 others); Tue, 27 Dec 2022 18:04:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230289AbiL0XD7 (ORCPT ); Tue, 27 Dec 2022 18:03:59 -0500 Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DA24DF64 for ; Tue, 27 Dec 2022 15:03:50 -0800 (PST) Received: by mail-lj1-x235.google.com with SMTP id e13so12488174ljn.0 for ; Tue, 27 Dec 2022 15:03:50 -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=WFhxyjlvH2C97OwizzrUKlo9kQa69CcIj1hYQfOMQx8=; b=KTKV/mqiy1fp5moT/wefv5Uio4Bf0syNMLLz+KxjDYeGxkXWrqtazNd7itthPYt1Y/ EorL6NBmhsS4taoQmSkpD4gxM76YP6Jr9y3N+BMuOFn0d36IN4IE9cfZ0HZtH2/3dX6o +/jtigOCamBrPQgVztzHUbVzJmmDwzop3+YvcHcnNyS4fn6im2tP+CmtjVWIh202Su1d eilm2y2KFB7A2EZXgBv/oBGJiyzO90r/oAueNAjFZlAKpBViCHQbYwTYgJW6iTOKD6eQ IVFF+HAaintxi+dBUbqyWa0HOa1tqODAh9XAsUViBADu6nhyCdeZym17OaZ1rfPVBpZj CFKw== 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=WFhxyjlvH2C97OwizzrUKlo9kQa69CcIj1hYQfOMQx8=; b=Z2VMWWULCCl7CY3PN3vLlbjB2N9MThoGAEOwG1ER2CY/CQDP7SiHo+XdgyaQ2XktMP gX241nK7qzb+xWebjXfapZV+hdQ3kPwEqMN4PeKlLY7Fo+BXsoseZH3MJBgxZV40nUq0 cYARCLpDHxlxUlF7vABuUDcrp5HT+81fSSaRRG2XQWSDL9Z+jVCYCzZqp3PbtD8GCpTA FLGtkEeF1kcPv4h61j763OWLmA6L+4AAgNq5D6PuVPX3yvhT5U//KRxyMqJe1IA+PaEW 8EVRAzgj+vfJwQ1kFmjUR2UBamAuvlkfYODegxnCRFNGak6Io7aXknr7djRXG/jsApn1 vnDA== X-Gm-Message-State: AFqh2kqHUZe2gdoCMf4+9yZE/E6Pqnv2oFH2uc2PMkkqsLX9yItla5rF 7D8qkGdjjM14dMvCxqOTgBQnGA== X-Received: by 2002:a2e:9296:0:b0:27b:574b:573d with SMTP id d22-20020a2e9296000000b0027b574b573dmr5621509ljh.19.1672182228880; Tue, 27 Dec 2022 15:03:48 -0800 (PST) Received: from Fecusia.local (c-05d8225c.014-348-6c756e10.bbcust.telenor.se. [92.34.216.5]) by smtp.gmail.com with ESMTPSA id bg25-20020a05651c0b9900b0027fbd4ee003sm876925ljb.124.2022.12.27.15.03.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Dec 2022 15:03:41 -0800 (PST) From: Linus Walleij Date: Wed, 28 Dec 2022 00:03:33 +0100 Subject: [PATCH 1/7] dt-bindings: crypto: Let STM32 define Ux500 HASH MIME-Version: 1.0 Message-Id: <20221227-ux500-stm32-hash-v1-1-b637ac4cda01@linaro.org> References: <20221227-ux500-stm32-hash-v1-0-b637ac4cda01@linaro.org> In-Reply-To: <20221227-ux500-stm32-hash-v1-0-b637ac4cda01@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 X-Mailer: b4 0.11.1 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753410339708995230?= X-GMAIL-MSGID: =?utf-8?q?1753410339708995230?= 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. Signed-off-by: Linus Walleij --- .../devicetree/bindings/crypto/st,stm32-hash.yaml | 30 +++++++++++++++++++++- 1 file changed, 29 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..681812e1c941 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,33 @@ 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 + + - if: + not: + properties: + compatible: + items: + const: stericsson,ux500-hash + then: + required: + - interrupts additionalProperties: false