From: Rob Herring <robh+dt@kernel.org>
To: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-spi <linux-spi@vger.kernel.org>,
Chen-Yu Tsai <wens@csie.org>, Mark Brown <broonie@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] dt-bindings: spi: Add YAML schemas for the generic SPI options
Date: Tue, 7 May 2019 20:37:09 -0500 [thread overview]
Message-ID: <CAL_Jsq+AzBUcJouvOCdYPHK6z8h_V3h5vqYPUuFD756z49wf3w@mail.gmail.com> (raw)
In-Reply-To: <20190507151353.ns2i72ii5cw6z7lz@flea>
On Tue, May 7, 2019 at 1:07 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
>
> Hi,
>
> On Tue, May 07, 2019 at 09:35:28AM -0500, Rob Herring wrote:
> > On Tue, May 7, 2019 at 8:48 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> > >
> > > The SPI controllers have a bunch of generic options that are needed in a
> > > device tree. Add a YAML schemas for those.
> >
> > I'd started on this one, but was planning to move it to the schema
> > repository. The issue there is re-licensing (adding BSD 2 clause).
> > Maybe better to just move it later.
>
> I just found out that dt-doc-validate also chokes on the reference
> URI. Maybe I should just submit it to the repo then once that is
> settled?
I'm not really too excited about chasing down licensing on every file
we want to move and I'd like to avoid per file licenses, so I'd like
local $refs to work. I think I've got something figured out that will
work. It will need a small kernel side change though.
> > > +properties:
> > > + $nodename:
> > > + pattern: "^spi(@[a-zA-Z0-9]+)?$"
> >
> > I think we want just "(@.*)". At a minimum, you need to allow for ','.
> > It would be the a bus schema for the parent which should validate unit
> > addresses, so we should pretty much just allow anything here.
>
> The issue with this is that it will also match any node starting with
> spi. In the Allwinner case, that also means the pinctrl nodes with spi
> pins in them, but I'm sure we can find more corner cases.
Maybe I wasn't clear, but I meant changing just the unit-address part. So:
"^spi(@.*)$"
>
> > > +
> > > + "#address-cells":
> > > + const: 1
> > > +
> > > + "#size-cells":
> > > + const: 0
> > > +
> > > + cs-gpios:
> > > + description: |
> > > + GPIOs used as chip selects.
> > > + If that property is used, the number of chip selects will be
> > > + increased automatically with max(cs-gpios, hardware chip selects).
> > > +
> > > + So if, for example, the controller has 2 CS lines, and the
> > > + cs-gpios looks like this
> > > + cs-gpios = <&gpio1 0 0>, <0>, <&gpio1 1 0>, <&gpio1 2 0>;
> > > +
> > > + Then it should be configured so that num_chipselect = 4, with
> > > + the following mapping
> > > + cs0 : &gpio1 0 0
> > > + cs1 : native
> > > + cs2 : &gpio1 1 0
> > > + cs3 : &gpio1 2 0
> > > +
> > > + num-cs:
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > + description:
> > > + Total number of chip selects.
> > > +
> > > + spi-slave:
> > > + $ref: /schemas/types.yaml#/definitions/flag
> >
> > "type: boolean" is sufficient here. Maybe we should just remove
> > 'flag'. OTOH, maybe consistency with other types and the abstraction
> > is better as we could add to the flag schema.
>
> I was trying to be consistent. Do you want me to remove it?
No, it's fine.
Rob
next prev parent reply other threads:[~2019-05-08 1:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-07 13:48 [PATCH 1/4] dt-bindings: spi: Add YAML schemas for the generic SPI options Maxime Ripard
2019-05-07 13:48 ` [PATCH 2/4] dt-bindings: spi: sun4i: Add YAML schemas Maxime Ripard
2019-05-07 13:48 ` [PATCH 3/4] dt-bindings: spi: sun6i: " Maxime Ripard
2019-05-07 14:51 ` Rob Herring
2019-05-07 13:48 ` [PATCH 4/4] ARM: dts: sun6i: Add default address and size cells for SPI Maxime Ripard
2019-05-07 14:35 ` [PATCH 1/4] dt-bindings: spi: Add YAML schemas for the generic SPI options Rob Herring
2019-05-07 15:13 ` Maxime Ripard
2019-05-08 1:37 ` Rob Herring [this message]
2019-05-08 7:02 ` Geert Uytterhoeven
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=CAL_Jsq+AzBUcJouvOCdYPHK6z8h_V3h5vqYPUuFD756z49wf3w@mail.gmail.com \
--to=robh+dt@kernel.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maxime.ripard@bootlin.com \
--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).