Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3018770ybe; Sun, 8 Sep 2019 05:33:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVnU/LgvZnOGmecOQOx5mS7eeFA4jaE8uIoBbaqhycXMwpVbWXHh/u7hCU3pge1hyn9qvS X-Received: by 2002:a17:902:d907:: with SMTP id c7mr18823392plz.126.1567945999124; Sun, 08 Sep 2019 05:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567945999; cv=none; d=google.com; s=arc-20160816; b=oRlxUEr2zYAPLLUfviYClvAAbbzIwvuihkj4xlnq8gvyFqaStWL3LYRIlJM8LnMjvd htdVJnQgIBKwK6cJ+45eCytiPswtGC6euY+WjEZAomSscudt1TYKUKy2TW9MdTlBIYiR frccBeh6eVKbvSs52WHRO04Z6VsuhUHfpjGocecsxHSkLn52qqAkh9eLznTNw/utLu9m nyKnUBZ924m3M67DuTOhu80g6HkZHLzKgrlPEheQc8rQBIJav3I/HsHlg2h35f71RqOi 0EMjlK3CfGiSzx7rCXbPYIxQcbRsSivKa7PrrEhIwaCweJRq7vzaRD3bOD8vLiwljKhd WI6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=jwA8zeQcFTOeuasey/2ojoREMD6kYXgZMn1u8PVaWVA=; b=P33CgAgQdxYcdbXwsVenp8hQPXdovZ+EztjLuB2YkmKcxZVAOzlOlGRkUfkPof+Uu0 G/Gq6BdZP3Oze6thNIqcz3u0TXoDRFp/hYw1VfijppLNjdusov1slZ0xp6hoHqcEv6BT jU+zVcpn2X//acwRRJPl08L3RGHAy34ZJzCUAPNarD7AweF+SicfF9p3waTsE2yj87L3 QUHd2uJDU4kBKdlKq7QvmWV9TxBKI7jQ0zheztu9j5/p2dUAFD/xm5hNpsQo7CDmzbdp NDO0ISrqXnmQB7vDBqTrqhLa1cVT7uj/HlmtmtkphIk6WZvz8umuuOXJiZaQ5nS9w6JW iRbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XkZG4FLk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 37si9906369pgz.39.2019.09.08.05.33.05; Sun, 08 Sep 2019 05:33:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XkZG4FLk; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727744AbfIGEBY (ORCPT + 99 others); Sat, 7 Sep 2019 00:01:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:48574 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726229AbfIGEBX (ORCPT ); Sat, 7 Sep 2019 00:01:23 -0400 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 Cc: davem@davemloft.net, herbert@gondor.apana.org.au, linux@armlinux.org.uk, mark.rutland@arm.com, robh+dt@kernel.org, wens@csie.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190906184551.17858-4-clabbe.montjoie@gmail.com> User-Agent: NeoMutt/20180716 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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