From: Conor Dooley <conor@kernel.org>
To: Manikandan Muralidharan <manikandan.m@microchip.com>
Cc: linus.walleij@linaro.org, brgl@bgdev.pl, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
claudiu.beznea@tuxon.dev, arnd@arndb.de,
durai.manickamkr@microchip.com, linux-gpio@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Hari.PrasathGE@microchip.com,
Balamanikandan.Gunasundar@microchip.com,
Nayabbasha.Sayed@microchip.com, Dharma.B@microchip.com,
Varshini.Rajendran@microchip.com, Balakrishnan.S@microchip.com,
Charan.Pedumuru@microchip.com
Subject: Re: [PATCH 4/5] dt-bindings: gpio: convert Atmel GPIO to json-schema
Date: Mon, 24 Jun 2024 17:22:04 +0100 [thread overview]
Message-ID: <20240624-divinity-gonad-e30bb4554403@spud> (raw)
In-Reply-To: <20240624100431.191172-5-manikandan.m@microchip.com>
[-- Attachment #1: Type: text/plain, Size: 4645 bytes --]
On Mon, Jun 24, 2024 at 03:34:30PM +0530, Manikandan Muralidharan wrote:
> Convert the Atmel GPIO controller binding document to DT schema format
> using json-schema.
This should mention that there are additional compatible strings added.
>
> Signed-off-by: Manikandan Muralidharan <manikandan.m@microchip.com>
> ---
> .../bindings/gpio/atmel,at91rm9200-gpio.yaml | 78 +++++++++++++++++++
> .../devicetree/bindings/gpio/gpio_atmel.txt | 31 --------
> 2 files changed, 78 insertions(+), 31 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_atmel.txt
>
> diff --git a/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> new file mode 100644
> index 000000000000..3ace7ba687fc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> @@ -0,0 +1,78 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/atmel,at91rm9200-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Microchip GPIO controller (PIO)
> +
> +maintainers:
> + - Manikandan Muralidharan <manikandan.m@microchip.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - items:
> + - enum:
> + - atmel,at91sam9x5-gpio
> + - microchip,sam9x60-gpio
> + - const: atmel,at91rm9200-gpio
This is definitely wrong, cos it disallows having
"atmel,at91rm9200-gpio" on it's own.
> + - items:
> + - enum:
> + - microchip,sam9x7-gpio
> + - const: microchip,sam9x60-gpio
> + - const: atmel,at91rm9200-gpio
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + interrupt-controller: true
> +
> + "#interrupt-cells":
> + const: 2
> +
> + gpio-controller: true
> + gpio-line-names: true
> +
> + "#gpio-cells":
> + const: 2
> +
> + clocks:
> + maxItems: 1
> +
> + "#gpio-lines":
> + description:
> + Number of gpio, 32 by default if absent
default: 32
> + maxItems: 1
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - interrupt-controller
> + - "#interrupt-cells"
> + - gpio-controller
> + - "#gpio-cells"
> + - clocks
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/at91.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + pioA: gpio@fffff400 {
The label here isn't needed.
Thanks,
Conor.
> + compatible = "atmel,at91rm9200-gpio";
> + reg = <0xfffff400 0x200>;
> + interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt b/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
> deleted file mode 100644
> index 29416f9c3220..000000000000
> --- a/Documentation/devicetree/bindings/gpio/gpio_atmel.txt
> +++ /dev/null
> @@ -1,31 +0,0 @@
> -* Atmel GPIO controller (PIO)
> -
> -Required properties:
> -- compatible: "atmel,<chip>-gpio", where <chip> is at91rm9200 or at91sam9x5.
> -- reg: Should contain GPIO controller registers location and length
> -- interrupts: Should be the port interrupt shared by all the pins.
> -- #gpio-cells: Should be two. The first cell is the pin number and
> - the second cell is used to specify optional parameters to declare if the GPIO
> - is active high or low. See gpio.txt.
> -- gpio-controller: Marks the device node as a GPIO controller.
> -- interrupt-controller: Marks the device node as an interrupt controller.
> -- #interrupt-cells: Should be two. The first cell is the pin number and the
> - second cell is used to specify irq type flags, see the two cell description
> - in interrupt-controller/interrupts.txt for details.
> -
> -optional properties:
> -- #gpio-lines: Number of gpio if absent 32.
> -
> -
> -Example:
> - pioA: gpio@fffff200 {
> - compatible = "atmel,at91rm9200-gpio";
> - reg = <0xfffff200 0x100>;
> - interrupts = <2 4>;
> - #gpio-cells = <2>;
> - gpio-controller;
> - #gpio-lines = <19>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> - };
> -
> --
> 2.25.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-06-24 16:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 10:04 [PATCH 0/5] Convert Atmel PIO3 Pinctrl and GPIO bindings to yaml Manikandan Muralidharan
2024-06-24 10:04 ` [PATCH 1/5] ARM: dts: microchip: change to simple-mfd from simple-bus for PIO3 pinumux controller Manikandan Muralidharan
2024-06-24 10:04 ` [PATCH 2/5] ARM: dts: microchip: Remove additional compatible string from PIO3 pinctrl nodes Manikandan Muralidharan
2024-06-24 10:04 ` [PATCH 3/5] ARM: dts: microchip: sam9x60: Remove additional compatible string from GPIO node Manikandan Muralidharan
2024-06-24 10:04 ` [PATCH 4/5] dt-bindings: gpio: convert Atmel GPIO to json-schema Manikandan Muralidharan
2024-06-24 11:24 ` Rob Herring (Arm)
2024-06-25 3:24 ` Manikandan.M
2024-06-24 16:22 ` Conor Dooley [this message]
2024-06-24 10:04 ` [PATCH 5/5] dt-bindings: pinctrl: Convert Atmel PIO3 pinctrl " Manikandan Muralidharan
2024-06-24 11:24 ` Rob Herring (Arm)
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=20240624-divinity-gonad-e30bb4554403@spud \
--to=conor@kernel.org \
--cc=Balakrishnan.S@microchip.com \
--cc=Balamanikandan.Gunasundar@microchip.com \
--cc=Charan.Pedumuru@microchip.com \
--cc=Dharma.B@microchip.com \
--cc=Hari.PrasathGE@microchip.com \
--cc=Nayabbasha.Sayed@microchip.com \
--cc=Varshini.Rajendran@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=brgl@bgdev.pl \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=durai.manickamkr@microchip.com \
--cc=krzk+dt@kernel.org \
--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=manikandan.m@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=robh@kernel.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).