mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Simon Hatliff <hatliff@cadence.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Boris Brezillon <boris.brezillon@free-electrons.com>
Subject: [PATCH 2/2] dt-bindings: gpio: Document Cadence GPIO controller bindings
Date: Wed, 29 Mar 2017 18:04:19 +0200	[thread overview]
Message-ID: <1490803459-29697-2-git-send-email-boris.brezillon@free-electrons.com> (raw)
In-Reply-To: <1490803459-29697-1-git-send-email-boris.brezillon@free-electrons.com>

Document Cadence GPIO bindings.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
---
 .../devicetree/bindings/gpio/cdns,gpio.txt         | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/cdns,gpio.txt

diff --git a/Documentation/devicetree/bindings/gpio/cdns,gpio.txt b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt
new file mode 100644
index 000000000000..09fb2c8e5c9d
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/cdns,gpio.txt
@@ -0,0 +1,41 @@
+Cadence GPIO controller bindings
+
+Required properties:
+- compatible: should be "cdns,gpio-r1p02".
+- reg: the register base address and size.
+- #gpio-cells: should be 2.
+  * first cell is the GPIO number.
+  * second cell specifies the GPIO flags, as defined in
+    <dt-bindings/gpio/gpio.h>. Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW
+    flags are supported.
+- gpio-controller: marks the device as a GPIO controller.
+- clocks: should contain one entry referencing the peripheral clock driving the
+  GPIO controller.
+
+Optional properties:
+- interrupt-parent: phandle of the parent interrupt controller.
+- interrupts: interrupt specifier for the controllers interrupt.
+- interrupt-controller: marks the device as an interrupt controller. When
+  defined, interrupts, interrupt-parent and #interrupt-cells are required.
+- interrupt-cells: should be 2.
+  * first cell is the GPIO number you want to use as an IRQ source.
+  * second cell specifies the IRQ type, as defined in
+    <dt-bindings/interrupt-controller/irq.h>.
+
+Example:
+
+	gpio-controller@d050000 {
+		compatible = "cdns,gpio";
+		reg = <0xd050000 0x10000>;
+
+		clocks = <&gpio_pclk>;
+
+		interrupt-parent = <&intc>;
+		interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
-- 
2.7.4

  reply	other threads:[~2017-03-29 16:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 16:04 [PATCH 1/2] gpio: Add a driver for Cadence GPIO controller Boris Brezillon
2017-03-29 16:04 ` Boris Brezillon [this message]
2017-03-30  8:37   ` [PATCH 2/2] dt-bindings: gpio: Document Cadence GPIO controller bindings Linus Walleij
2017-03-30  9:03 ` [PATCH 1/2] gpio: Add a driver for Cadence GPIO controller Linus Walleij
2017-03-30 11:29   ` Boris Brezillon
2017-03-30 11:51     ` Linus Walleij
2017-03-30 17:26     ` Simon Hatliff
2017-03-31 13:28       ` Boris Brezillon
2017-04-10 13:26       ` Boris Brezillon
2017-04-24 13:00         ` 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=1490803459-29697-2-git-send-email-boris.brezillon@free-electrons.com \
    --to=boris.brezillon@free-electrons.com \
    --cc=gnurou@gmail.com \
    --cc=hatliff@cadence.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.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

all inboxes | Powered by JetHome®