From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0FE5C54EBE for ; Sun, 8 Jan 2023 18:34:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233104AbjAHSeK (ORCPT ); Sun, 8 Jan 2023 13:34:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjAHSdz (ORCPT ); Sun, 8 Jan 2023 13:33:55 -0500 Received: from mail-il1-f175.google.com (mail-il1-f175.google.com [209.85.166.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60CE41005; Sun, 8 Jan 2023 10:33:54 -0800 (PST) Received: by mail-il1-f175.google.com with SMTP id u8so3833295ilq.13; Sun, 08 Jan 2023 10:33:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AnLn590CxObCPHVpqzU2YKM6yS2U3fQhJcXnp9MuaEg=; b=yh0nj16rq21xVLIhyzGh4KV0gPtbKpkAGH7DHxNUGZo7FzxlgpNUsApBYVqqTbu8FF nfZam41n0JqkQCdNexu5+SVKPvtGvIXvtFuinSm1EILeA/zIgbHgEdPDmG/WxTKgX3wg 94bHOa8aR6yphsYfWhtjS8u8xQn/frj9W2TMXTrgoP2x8U5Y2ATwj+cmNzgw4Um54Ta1 U9huDZ9k1ytH5SIBX3wdnE1ANuBbPco3jt3WIrdfqGHwS8RgavK28Pt3eAs6JqKmquuJ iy99dy//Ucw9VHu5v1RoAgohQ2hvtge4Tn3RRGTEaxsq80IyV5xsW2ZYk19ERJbBjyfj i6ZQ== X-Gm-Message-State: AFqh2kqTibbDQWCtndaUjn3yuxvPh1lci6r+q7bRhMYOcUben7e0s8Xb oWQ3GoeCt/9160Bc8salcg== X-Google-Smtp-Source: AMrXdXsyQQy9O9q6deLP1/nsKTazK9kzf6iytk5IS8CbSyS/PIHCy5h3pO4pbod2IM6YsQCWfPmI7w== X-Received: by 2002:a05:6e02:525:b0:30c:2bb4:a2ea with SMTP id h5-20020a056e02052500b0030c2bb4a2eamr22671802ils.13.1673202833579; Sun, 08 Jan 2023 10:33:53 -0800 (PST) Received: from robh_at_kernel.org ([2605:ef80:8069:516a:f2b0:691e:4315:7c0f]) by smtp.gmail.com with ESMTPSA id y21-20020a027315000000b00389cb050d1bsm2099433jab.33.2023.01.08.10.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 10:33:53 -0800 (PST) Received: (nullmailer pid 180457 invoked by uid 1000); Sun, 08 Jan 2023 18:33:50 -0000 Date: Sun, 8 Jan 2023 12:33:50 -0600 From: Rob Herring To: Linus Walleij Cc: Herbert Xu , "David S. Miller" , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , 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 Subject: Re: [PATCH 1/7] dt-bindings: crypto: Let STM32 define Ux500 HASH Message-ID: <20230108183350.GA177741-robh@kernel.org> References: <20221227-ux500-stm32-hash-v1-0-b637ac4cda01@linaro.org> <20221227-ux500-stm32-hash-v1-1-b637ac4cda01@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221227-ux500-stm32-hash-v1-1-b637ac4cda01@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Wed, Dec 28, 2022 at 12:03:33AM +0100, Linus Walleij wrote: > 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 Why not use 'else' instead? > + then: > + required: > + - interrupts > > additionalProperties: false > > > -- > 2.38.1 > From mboxrd@z Thu Jan 1 00:00:00 1970 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 CC21CC63797 for ; Sun, 8 Jan 2023 18:35:25 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cG1Ucs7YfjhEGsifaM3u9tzI9RtkocYqi7fnyh8uTfM=; b=tTbfLr8sPTi0HK 9XjtGlpeoUle7YXtdXxcmbc3XnMufngUQl9+RHbeYjRXIJcfP/3ZwU3SV9Hpx68LcQ8etA40SiNGq tikqSjxqx1qzCfYN6frH5D0yhrnaULjPNDGyFSbeWJHBY1Uv69vThUJXG/KQB7OeaH97FuF9GP2Oa HBfjpMT57zhkdNb26ETJHoLJw7L3ExwhMOMKNYX49lXboV6D/LWkHKa9ph1WLYkpF5MNVy3ZDwoL/ DqYsb2NPtTykJGwJlENFYohdPCGKUTpf7F64ADsQt2yDeuQR6dxu7hfnpxrCYzEEo+7ZMfWrExkv4 VKbjgz7N3IQK/eW5l5lQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEaUo-00FHYf-1I; Sun, 08 Jan 2023 18:34:14 +0000 Received: from mail-il1-f174.google.com ([209.85.166.174]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEaUk-00FHVu-Fv for linux-arm-kernel@lists.infradead.org; Sun, 08 Jan 2023 18:34:12 +0000 Received: by mail-il1-f174.google.com with SMTP id c20so3846088ilj.10 for ; Sun, 08 Jan 2023 10:33:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AnLn590CxObCPHVpqzU2YKM6yS2U3fQhJcXnp9MuaEg=; b=grf1uN2bVXl2IoCLKm//SKWB3CgAEO6re0yrFSOo6bBEjLA4NLJfshiF0v/TAMXZN9 6yqRwEZVbUIaFmazBumwTdUFxAXh7eV4NGykaKhb9J7fStiSzTEmmNt+ymO4Jl0eiqRF BYOz6TwTjC7psombwv+kKb+ZAsTrF+Trxv3t//mjXEEeV2xL2I6AqJIPu+B/TWoazS7m GAADJ7Dg8+JnS6CVMto8F8nYyLYBZGPS5gW+C5bQZ0LLyY5kxh2ueo48NoFqOXgy29sR zPyZH71esED+Iqm+aDVYx5B2g2l7Km5L008joOvjgxCZTFsYtGMs0+LPVsmF0ATNEykw PPdA== X-Gm-Message-State: AFqh2krtTibXvYo4Ixb6tzCg33JzvEazlLvBRxNLRbS/Ztz7urf7KKJ7 IGVXzC6rQy593WsoEJkRyw== X-Google-Smtp-Source: AMrXdXsyQQy9O9q6deLP1/nsKTazK9kzf6iytk5IS8CbSyS/PIHCy5h3pO4pbod2IM6YsQCWfPmI7w== X-Received: by 2002:a05:6e02:525:b0:30c:2bb4:a2ea with SMTP id h5-20020a056e02052500b0030c2bb4a2eamr22671802ils.13.1673202833579; Sun, 08 Jan 2023 10:33:53 -0800 (PST) Received: from robh_at_kernel.org ([2605:ef80:8069:516a:f2b0:691e:4315:7c0f]) by smtp.gmail.com with ESMTPSA id y21-20020a027315000000b00389cb050d1bsm2099433jab.33.2023.01.08.10.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Jan 2023 10:33:53 -0800 (PST) Received: (nullmailer pid 180457 invoked by uid 1000); Sun, 08 Jan 2023 18:33:50 -0000 Date: Sun, 8 Jan 2023 12:33:50 -0600 From: Rob Herring To: Linus Walleij Cc: Herbert Xu , "David S. Miller" , Krzysztof Kozlowski , Maxime Coquelin , Alexandre Torgue , Lionel Debieve , 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 Subject: Re: [PATCH 1/7] dt-bindings: crypto: Let STM32 define Ux500 HASH Message-ID: <20230108183350.GA177741-robh@kernel.org> References: <20221227-ux500-stm32-hash-v1-0-b637ac4cda01@linaro.org> <20221227-ux500-stm32-hash-v1-1-b637ac4cda01@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221227-ux500-stm32-hash-v1-1-b637ac4cda01@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230108_103410_554273_7F366385 X-CRM114-Status: GOOD ( 27.23 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Dec 28, 2022 at 12:03:33AM +0100, Linus Walleij wrote: > 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 Why not use 'else' instead? > + then: > + required: > + - interrupts > > additionalProperties: false > > > -- > 2.38.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel