[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1539111085-25502-4-git-send-email-atish.patra@wdc.com>
Date: Tue, 9 Oct 2018 11:51:24 -0700
From: Atish Patra <atish.patra@....com>
To: palmer@...ive.com, linux-riscv@...ts.infradead.org,
linux-pwm@...r.kernel.org, linux-gpio@...r.kernel.org
Cc: linus.walleij@...aro.org, robh+dt@...nel.org,
thierry.reding@...il.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, mark.rutland@....com,
hch@...radead.org, atish.patra@....com
Subject: [RFC 3/4] gpio: sifive: Add DT documentation for SiFive GPIO.
From: "Wesley W. Terpstra" <wesley@...ive.com>
DT documentation for GPIO added with updated compatible
string.
Signed-off-by: Wesley W. Terpstra <wesley@...ive.com>
[Atish: Compatible string update]
Signed-off-by: Atish Patra <atish.patra@....com>
---
.../devicetree/bindings/gpio/gpio-sifive.txt | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-sifive.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio-sifive.txt b/Documentation/devicetree/bindings/gpio/gpio-sifive.txt
new file mode 100644
index 00000000..781fe4ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-sifive.txt
@@ -0,0 +1,28 @@
+SiFive GPIO controller bindings
+
+Required properties:
+- compatible: should be one of
+ "sifive,fu540-c000-gpio0","sifive,gpio0"
+- reg: Physical base address and length of the controller's registers.
+- #gpio-cells : Should be 2
+ - The first cell is the GPIO offset number.
+ - The second cell indicates the polarity of the GPIO
+- gpio-controller : Marks the device node as a GPIO controller.
+- interrupt-controller: Marks the device node as an interrupt controller.
+- #interrupt-cells : Should be 2.
+ - The first cell is the GPIO offset number within the GPIO controller.
+ - The second cell is the edge/level to use for interrupt generation.
+- interrupts: Specify the interrupts, one per GPIO
+
+Example:
+
+gpio: gpio@...60000 {
+ compatible = "sifive,fu540-c000-gpio0","sifive,gpio0";
+ interrupt-parent = <&plic>;
+ interrupts = <7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22>;
+ reg = <0x0 0x10060000 0x0 0x1000>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+};
--
2.7.4
Powered by blists - more mailing lists