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 X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F8F4C43331 for ; Sat, 7 Sep 2019 04:01:48 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 66D8421848 for ; Sat, 7 Sep 2019 04:01:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="upG537tD"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="XkZG4FLk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66D8421848 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=4vWXqxSqVKI0YwL111P1ISkG5S86pUfPHzrsc5owKYI=; b=upG537tDwxVWFg mCtTZofGJXlG6yfGn/7kkCvgm5UdWL0/IhCvnmjmY1f90Aq8BQLdorqlMWIZGgmbiWmgrrVG9B9YG OvsHOEPr1VCyQ5Y/GyDTaHKNZBkdG1zWu+S3qnHrZ00FIjIIVBr62jcixU4TuF9ZXrxecu6zaXMj7 Su7ru62b9u4QCLdNxUe7RnkPMhLvapCfJhh04jrsub3hv1pzL8Ilz5/ufySU+cOUQjwLtiie+mbFQ REkA193gr8Yp+C0Qk/dgW6YcS8E0GzAe8lXCqOpR4KIVasBgK//0W29TQ5W36LuxEus52zA7VQ0OT UtCCZSzbXiql8MCyj4aQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i6Ruv-00026p-Gx; Sat, 07 Sep 2019 04:01:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i6Rud-0001s7-Al for linux-arm-kernel@lists.infradead.org; Sat, 07 Sep 2019 04:01:24 +0000 Received: from localhost (unknown [194.251.198.105]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6B81520854; Sat, 7 Sep 2019 04:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567828883; bh=iu+lz+zqRz/+ZH/PPEzbT7toVzrtFnm5HGdE4wWlvRo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XkZG4FLkpMuUlfykl/s2Cjtw2sN2NURmDBBPEpjYtpByLcMJ7uUc25IwecXQHXmUA bXWD2DoHkX3EMLNtKOBWAIE6u0TohVtD+T/XI45WydWqeIihnPfQF2j71VPG1oEpsB ZlxEkT6RF0Y7LBx34lvC1oF5lXbcy0vm3D0Fuxhs= Date: Sat, 7 Sep 2019 07:01:16 +0300 From: Maxime Ripard To: Corentin Labbe Subject: Re: [PATCH 3/9] dt-bindings: crypto: Add DT bindings documentation for sun8i-ce Crypto Engine Message-ID: <20190907040116.lib532o2eqt4qnvv@flea> References: <20190906184551.17858-1-clabbe.montjoie@gmail.com> <20190906184551.17858-4-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190906184551.17858-4-clabbe.montjoie@gmail.com> User-Agent: NeoMutt/20180716 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190906_210123_417569_AAB4B594 X-CRM114-Status: GOOD ( 15.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, herbert@gondor.apana.org.au, linux-sunxi@googlegroups.com, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, wens@csie.org, robh+dt@kernel.org, linux-crypto@vger.kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Sep 06, 2019 at 08:45:45PM +0200, Corentin Labbe wrote: > This patch adds documentation for Device-Tree bindings for the > Crypto Engine cryptographic accelerator driver. > > Signed-off-by: Corentin Labbe > --- > .../bindings/crypto/allwinner,sun8i-ce.yaml | 84 +++++++++++++++++++ > 1 file changed, 84 insertions(+) > create mode 100644 Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml > > diff --git a/Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml b/Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml > new file mode 100644 > index 000000000000..bd8ccedd6059 > --- /dev/null > +++ b/Documentation/devicetree/bindings/crypto/allwinner,sun8i-ce.yaml So, usually we're using the first compatible supported here as the name. > @@ -0,0 +1,84 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/crypto/allwinner,sun8i-ce.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Allwinner Crypto Engine driver > + > +maintainers: > + - Corentin Labbe > + > +properties: > + compatible: > + oneOf: > + - const: allwinner,sun8i-h3-crypto > + - const: allwinner,sun8i-r40-crypto > + - const: allwinner,sun50i-a64-crypto > + - const: allwinner,sun50i-h5-crypto > + - const: allwinner,sun50i-h6-crypto An enum would be better here, it provides a more obvious error message. > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > +if: > + properties: > + compatible: > + contains: > + const: allwinner,sun50i-h6-crypto > +then: > + clocks: > + items: > + - description: Bus clock > + - description: Module clock > + - description: MBus clock > + > + clock-names: > + items: > + - const: ahb > + - const: mod > + - const: mbus It looks like there's a reset line on the H6 as well for that controller (register 0x68c of the CCU, "CE_BGR_REG"). > +else: > + clocks: > + items: > + - description: Bus clock > + - description: Module clock > + > + clock-names: > + items: > + - const: ahb > + - const: mod > + > + resets: > + maxItems: 1 > + > + reset-names: > + const: ahb This prevents the usage of the additionalProperties property, which you should really use. What you can do instead is moving the clocks and clock-names description under properties, with a minItems of 2 and a maxItems of 3. Then you can restrict the length of that property to either 2 or 3 depending on the case here. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel