linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org,
	linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-watchdog@vger.kernel.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Anson Huang <Anson.Huang@nxp.com>
Subject: Re: [PATCH 02/22] dt-bindings: gpio: fsl-imx-gpio: Add gpio-ranges property
Date: Mon, 24 Aug 2020 08:58:01 +0200	[thread overview]
Message-ID: <20200824065801.GH13023@pengutronix.de> (raw)
In-Reply-To: <20200824063806.GA2497@kozik-lap>

On Mon, Aug 24, 2020 at 08:38:06AM +0200, Krzysztof Kozlowski wrote:
> On Mon, Aug 24, 2020 at 07:24:46AM +0200, Sascha Hauer wrote:
> > On Sun, Aug 23, 2020 at 06:15:30PM +0200, Krzysztof Kozlowski wrote:
> > > The GPIO controller node can have gpio-ranges property.  This fixes
> > > dtbs_check warnings like:
> > > 
> > >   arch/arm64/boot/dts/freescale/imx8mm-evk.dt.yaml: gpio@30200000: 'gpio-ranges' does not match any of the regexes: 'pinctrl-[0-9]+'
> > >     From schema: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> > > 
> > > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> > > ---
> > >  .../devicetree/bindings/gpio/fsl-imx-gpio.yaml    | 15 +++++++++++++++
> > >  1 file changed, 15 insertions(+)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> > > index 454db20c2d1a..1fac69573bb9 100644
> > > --- a/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> > > +++ b/Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
> > > @@ -51,6 +51,9 @@ properties:
> > >  
> > >    gpio-controller: true
> > >  
> > > +  gpio-ranges:
> > > +    maxItems: 1
> > > +
> > >  required:
> > >    - compatible
> > >    - reg
> > > @@ -62,6 +65,18 @@ required:
> > >  
> > >  additionalProperties: false
> > >  
> > > +allOf:
> > > +  - if:
> > > +      properties:
> > > +        compatible:
> > > +          contains:
> > > +            const: fsl,imx8mp-gpio
> > > +    then:
> > > +      properties:
> > > +        gpio-ranges:
> > > +          minItems: 1
> > > +          maxItems: 2
> > 
> > Why do you limit this to fsl,imx8mp-gpio? The i.MX5,6,7 dtsi files use
> > gpio-ranges as well and other i.MX dtsi files could also use it.
> 
> All other cases use maximum one element in gpio-ranges, so they are
> covered so I assumed they are continuous. But if it not the case, I can
> make all them maximum 2.

I misread this, I thought you allow gpio-ranges only for imx8mp, but
it's only the maxItems you set differently for that SoC. Anyway,
arch/arm/boot/dts/imx6dl.dtsi has this:

&gpio1 {
        gpio-ranges = <&iomuxc  0 131 2>, <&iomuxc  2 137 8>, <&iomuxc 10 189 2>,
                      <&iomuxc 12 194 1>, <&iomuxc 13 193 1>, <&iomuxc 14 192 1>,
                      <&iomuxc 15 191 1>, <&iomuxc 16 185 2>, <&iomuxc 18 184 1>,
                      <&iomuxc 19 187 1>, <&iomuxc 20 183 1>, <&iomuxc 21 188 1>,
                      <&iomuxc 22 123 3>, <&iomuxc 25 121 1>, <&iomuxc 26 127 1>,
                      <&iomuxc 27 126 1>, <&iomuxc 28 128 1>, <&iomuxc 29 130 1>,
                      <&iomuxc 30 129 1>, <&iomuxc 31 122 1>;
};

I don't think it makes sense to specify maxItems.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2020-08-24  6:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-23 16:15 [PATCH 01/22] dt-bindings: gpio: fsl-imx-gpio: Add i.MX 8 compatibles Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 02/22] dt-bindings: gpio: fsl-imx-gpio: Add gpio-ranges property Krzysztof Kozlowski
2020-08-24  5:24   ` Sascha Hauer
2020-08-24  6:38     ` Krzysztof Kozlowski
2020-08-24  6:58       ` Sascha Hauer [this message]
2020-08-24  7:07         ` Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 03/22] dt-bindings: gpio: fsl-imx-gpio: Add parsing of hogs Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 04/22] dt-bindings: gpio: fsl-imx-gpio: Add power-domains Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 05/22] dt-bindings: perf: fsl-imx-ddr: Add i.MX 8M compatibles Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 06/22] dt-bindings: pwm: imx-pwm: " Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 07/22] dt-bindings: serial: fsl-imx-uart: " Krzysztof Kozlowski
2020-08-24  5:46   ` Sascha Hauer
2020-08-24  6:39     ` Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 08/22] dt-bindings: watchdog: fsl-imx-wdt: " Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 09/22] dt-bindings: mtd: gpmi-nand: " Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 10/22] dt-bindings: reset: fsl,imx7-src: " Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 11/22] dt-bindings: thermal: imx8mm-thermal: Add i.MX 8M Nano compatible Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 12/22] dt-bindings: mmc: fsl-imx-esdhc: Fix i.MX 8M compatible matching Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 13/22] dt-bindings: nvmem: imx-ocotp: Update i.MX 8M compatibles Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 14/22] dt-bindings: arm: fsl: Fix Toradex Colibri i.MX 8 binding Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 15/22] dt-bindings: arm: fsl: Add ZII Ultra boards binding Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 16/22] dt-bindings: interrupt-controller: fsl,irqsteer: Fix compatible matching Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 17/22] arm64: dts: imx8mq-evk: Add hog suffix to wl-reg-on Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 18/22] arm64: dts: imx8mq-zii-ultra: Add hog suffixes to GPIO hogs Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 19/22] arm64: dts: imx8mm: Remove i.MX7 compatible from USDHC Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 20/22] arm64: dts: imx8qxp: Remove i.MX7 compatible from UART Krzysztof Kozlowski
2020-08-23 16:15 ` [PATCH 21/22] arm64: dts: imx8qxp: Remove i.MX7 compatible from USDHC Krzysztof Kozlowski
2020-08-24  9:00   ` Aisheng Dong
2020-08-24  9:11     ` Krzysztof Kozlowski
2020-08-24  9:45       ` Dong Aisheng
2020-08-24 10:31         ` Bough Chen
2020-08-24 10:32           ` Krzysztof Kozlowski
2020-08-24 10:30             ` Dong Aisheng
2020-08-23 16:15 ` [PATCH 22/22] arm64: dts: imx8mp: Remove i.MX7 compatible from DDR PMU Krzysztof Kozlowski
2020-08-28  9:42 ` [PATCH 01/22] dt-bindings: gpio: fsl-imx-gpio: Add i.MX 8 compatibles Linus Walleij

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=20200824065801.GH13023@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=Anson.Huang@nxp.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzk@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=thierry.reding@gmail.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).