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 951E5C77B7D for ; Sun, 7 May 2023 22:41:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232054AbjEGWlO (ORCPT ); Sun, 7 May 2023 18:41:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229744AbjEGWlL (ORCPT ); Sun, 7 May 2023 18:41:11 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B2765100D9; Sun, 7 May 2023 15:41:09 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 84FA44B3; Sun, 7 May 2023 15:41:53 -0700 (PDT) Received: from slackpad.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6D0203F663; Sun, 7 May 2023 15:41:05 -0700 (PDT) Date: Sun, 7 May 2023 23:40:49 +0100 From: Andre Przywara To: Maksim Kiselev Cc: Icenowy Zheng , Krzysztof Kozlowski , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , Cristian Ciocaltea , Maxime Ripard , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v4 1/5] dt-bindings: spi: sun6i: add DT bindings for Allwinner R329/D1/R528/T113s SPI Message-ID: <20230507234049.3f285450@slackpad.lan> In-Reply-To: <20230507150345.1971083-2-bigunclemax@gmail.com> References: <20230507150345.1971083-1-bigunclemax@gmail.com> <20230507150345.1971083-2-bigunclemax@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.1.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 7 May 2023 18:03:33 +0300 Maksim Kiselev wrote: Hi, > Listed above Allwinner SoCs has two SPI controllers. First is the regular > SPI controller and the second one has additional functionality for > MIPI-DBI Type C. > > Add compatible strings for these controllers > > Signed-off-by: Maksim Kiselev > Acked-by: Krzysztof Kozlowski > --- > .../devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml b/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml > index de36c6a34a0f..ab2d8a03011e 100644 > --- a/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml > +++ b/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-spi.yaml > @@ -19,6 +19,7 @@ properties: > > compatible: > oneOf: > + - const: allwinner,sun50i-r329-spi > - const: allwinner,sun6i-a31-spi > - const: allwinner,sun8i-h3-spi > - items: > @@ -28,6 +29,12 @@ properties: > - allwinner,sun50i-h616-spi > - allwinner,suniv-f1c100s-spi > - const: allwinner,sun8i-h3-spi > + - items: > + - enum: > + - allwinner,sun20i-d1-spi > + - allwinner,sun20i-d1-spi-dbi > + - allwinner,sun50i-r329-spi-dbi > + - const: allwinner,sun50i-r329-spi So this is still not right: It allows: "allwinner,sun20i-d1-spi-dbi", "allwinner,sun50i-r329-spi" which it shouldn't, but more importantly disallows the three string version that is introduced in patch 5/5, which makes dtbs_check fail. So we need to fix this. I think the simplest is probably: + - items: + - enum: + - allwinner,sun20i-d1-spi + - allwinner,sun50i-r329-spi-dbi + - const: allwinner,sun50i-r329-spi + - items: + - const: allwinner,sun20i-d1-spi-dbi + - const: allwinner,sun50i-r329-spi-dbi + - const: allwinner,sun50i-r329-spi Maybe there is a shorter sequence. This assumes we go with the three-string combo, of course. Cheers, Andre > > reg: > maxItems: 1