linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Mark Brown <broonie@kernel.org>,
	Tinghan Shen <tinghan.shen@mediatek.com>
Cc: linus.walleij@linaro.org, matthias.bgg@gmail.com,
	bgolaszewski@baylibre.com, sean.wang@mediatek.com,
	bayi.cheng@mediatek.com, gch981213@gmail.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-spi@vger.kernel.org,
	Project_Global_Chrome_Upstream_Group@mediatek.com
Subject: Re: [PATCH v6 2/4] dt-bindings: spi: add new clock name 'axi' for spi nor
Date: Tue, 14 Dec 2021 10:26:33 -0600	[thread overview]
Message-ID: <YbjFuQxL+Wp8tU6r@robh.at.kernel.org> (raw)
In-Reply-To: <YbdvIPq1hKPmKXXs@sirena.org.uk>

On Mon, Dec 13, 2021 at 04:04:48PM +0000, Mark Brown wrote:
> On Sun, Dec 12, 2021 at 04:40:12AM +0800, Tinghan Shen wrote:
> 
> > Some mtk spi nor has dedicated dma(s) inside. Add a new clock name, axi,
> > for spi nor dma bus clock.
> 
> >    clock-names:
> > +    minItems: 2
> >      items:
> >        - const: spi
> >        - const: sf
> > +      - const: axi
> 
> This will cause any existing DTs that don't have both spi and sf clocks
> defined to fail to validate which doesn't seem great.

That was true before this. The default for 'minItems' is the number of 
entries in 'items' (this is not the default for json-schema, but default 
for DT bindings as that's the common case).

> Given that your
> commit message says this is only required for some SoCs shouldn't the
> minimum clocks requirement depend on which particular SoC/IP version is
> being used?  Not exactly sure how one specifies that in the YAML format.

With an if/then schema adding maxItems/minItems constraints (e.g. 
'maxItems: 2' for existing compatibles). There are many examples in the 
tree.

Rob

  reply	other threads:[~2021-12-14 16:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-11 20:40 [PATCH v6 0/4] Add basic SoC support for mediatek mt8195 Tinghan Shen
2021-12-11 20:40 ` [PATCH v6 1/4] dt-bindings: arm: mediatek: add mt8195 pericfg compatible Tinghan Shen
2021-12-11 20:40 ` [PATCH v6 2/4] dt-bindings: spi: add new clock name 'axi' for spi nor Tinghan Shen
2021-12-13 16:04   ` Mark Brown
2021-12-14 16:26     ` Rob Herring [this message]
2021-12-15  2:03     ` Tinghan Shen
2021-12-11 20:40 ` [PATCH v6 3/4] dt-bindings: pinctrl: mt8195: add 'pins' wrapping node Tinghan Shen
2021-12-14 16:38   ` Rob Herring
2021-12-16  2:43     ` Tinghan Shen
2021-12-11 20:40 ` [PATCH v6 4/4] arm64: dts: Add mediatek SoC mt8195 and evaluation board Tinghan Shen

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=YbjFuQxL+Wp8tU6r@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=bayi.cheng@mediatek.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gch981213@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=sean.wang@mediatek.com \
    --cc=tinghan.shen@mediatek.com \
    /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).