linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Icenowy Zheng <icenowy@aosc.io>
Cc: Maksim Kiselev <bigunclemax@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@csie.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Samuel Holland <samuel@sholland.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Cristian Ciocaltea <cristian.ciocaltea@collabora.com>,
	Maxime Ripard <mripard@kernel.org>,
	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 v3 1/5] dt-bindings: spi: sun6i: add DT bindings for Allwinner R329/D1/R528/T113s SPI
Date: Sun, 7 May 2023 10:50:45 +0100	[thread overview]
Message-ID: <20230507105045.085fa058@slackpad.lan> (raw)
In-Reply-To: <835082fe07b77db8598aebabe98a74c2c5ac47d1.camel@aosc.io>

On Sun, 07 May 2023 12:06:58 +0800
Icenowy Zheng <icenowy@aosc.io> wrote:

Hi,

> 在 2023-05-07星期日的 02:26 +0300,Maksim Kiselev写道:
> > 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 <bigunclemax@gmail.com>
> > ---
> >  .../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..807dde457e3b 100644
> > --- a/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-
> > spi.yaml
> > +++ b/Documentation/devicetree/bindings/spi/allwinner,sun6i-a31-
> > spi.yaml
> > @@ -21,6 +21,7 @@ properties:
> >      oneOf:
> >        - const: allwinner,sun6i-a31-spi
> >        - const: allwinner,sun8i-h3-spi
> > +      - const: allwinner,sun50i-r329-spi
> >        - items:
> >            - enum:
> >                - allwinner,sun8i-r40-spi
> > @@ -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  

This construct doesn't cover the three compatible string case, since we
only get to choose from one of the enums, and always have two strings -
hence my challenge to find the shortest sequence ;-)

> In this case I will prefer to list all 4 compatibles if backward
> compatibility is used:
> "allwinner,sun20i-d1-spi-dbi", "allwinner-sun20i-d1-spi",
> "allwinner,sun50i-r329-spi-dbi", "allwinner, sun50i-r329-spi", in case
> if we were gaining support for either quirks of D1 controller or
> SPI_DBI controllers.

I see where you are coming from, but that order doesn't look right,
since we go back from DBI to normal and then back again. And
"allwinner-sun20i-d1-spi" is not a super set of
"allwinner,sun50i-r329-spi-dbi".
In case we will need a D1 quirk, we could key this to the D1 DBI
compatible as well, I think, so this three string version should work.

Cheers,
Andre

> 
> > +              - allwinner,sun50i-r329-spi-dbi
> > +          - const: allwinner,sun50i-r329-spi
> >  
> >    reg:
> >      maxItems: 1  
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2023-05-07  9:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-06 23:26 [PATCH v3 0/5] Allwinner R329/D1/R528/T113s SPI support Maksim Kiselev
2023-05-06 23:26 ` [PATCH v3 1/5] dt-bindings: spi: sun6i: add DT bindings for Allwinner R329/D1/R528/T113s SPI Maksim Kiselev
2023-05-07  4:06   ` Icenowy Zheng
2023-05-07  7:43     ` Krzysztof Kozlowski
2023-05-07  9:50     ` Andre Przywara [this message]
2023-05-07  7:43   ` Krzysztof Kozlowski
2023-05-06 23:26 ` [PATCH v3 2/5] spi: sun6i: change OF match data to a struct Maksim Kiselev
2023-05-06 23:26 ` [PATCH v3 3/5] spi: sun6i: add quirk for in-controller clock divider Maksim Kiselev
2023-05-07  9:51   ` Andre Przywara
2023-05-07 15:09     ` Maxim Kiselev
2023-05-06 23:26 ` [PATCH v3 4/5] spi: sun6i: add support for R329/D1/R528/T113s SPI controllers Maksim Kiselev
2023-05-07  9:52   ` Andre Przywara
2023-05-06 23:26 ` [PATCH v3 5/5] riscv: dts: allwinner: d1: Add SPI controllers node Maksim Kiselev
2023-05-07  9:52   ` Andre Przywara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230507105045.085fa058@slackpad.lan \
    --to=andre.przywara@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bigunclemax@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=mripard@kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    --cc=samuel@sholland.org \
    --cc=wens@csie.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).