summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Sullivan <nathan.sullivan@ni.com>2017-03-14 12:13:22 -0400
committerLinus Walleij <linus.walleij@linaro.org>2017-03-23 04:49:06 -0400
commitb8c90199b51aa59da06e1a82a22ba11e69bd8150 (patch)
tree5817ea23b4481e7484e277a489c5f09b8ab924f5
parentd8307c09206b35a9526bfdf076c9f516c0b5e6f1 (diff)
gpio: mmio: add support for NI 169445 NAND GPIO
The GPIO-based NAND controller on National Instruments 169445 hardware exposes a set of simple lines for the control signals. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt38
-rw-r--r--drivers/gpio/gpio-mmio.c1
2 files changed, 39 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt
new file mode 100644
index 000000000000..ca2f8c745a27
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt
@@ -0,0 +1,38 @@
1Bindings for the National Instruments 169445 GPIO NAND controller
2
3The 169445 GPIO NAND controller has two memory mapped GPIO registers, one
4for input (the ready signal) and one for output (control signals). It is
5intended to be used with the GPIO NAND driver.
6
7Required properties:
8 - compatible: should be "ni,169445-nand-gpio"
9 - reg-names: must contain
10 "dat" - data register
11 - reg: address + size pairs describing the GPIO register sets;
12 order must correspond with the order of entries in reg-names
13 - #gpio-cells: must be set to 2. The first cell is the pin number and
14 the second cell is used to specify the gpio polarity:
15 0 = active high
16 1 = active low
17 - gpio-controller: Marks the device node as a gpio controller.
18
19Optional properties:
20 - no-output: disables driving output on the pins
21
22Examples:
23 gpio1: nand-gpio-out@1f300010 {
24 compatible = "ni,169445-nand-gpio";
25 reg = <0x1f300010 0x4>;
26 reg-names = "dat";
27 gpio-controller;
28 #gpio-cells = <2>;
29 };
30
31 gpio2: nand-gpio-in@1f300014 {
32 compatible = "ni,169445-nand-gpio";
33 reg = <0x1f300014 0x4>;
34 reg-names = "dat";
35 gpio-controller;
36 #gpio-cells = <2>;
37 no-output;
38 };
diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index d7d03ad052d0..f7da40e46c55 100644
--- a/drivers/gpio/gpio-mmio.c
+++ b/drivers/gpio/gpio-mmio.c
@@ -575,6 +575,7 @@ static void __iomem *bgpio_map(struct platform_device *pdev,
575static const struct of_device_id bgpio_of_match[] = { 575static const struct of_device_id bgpio_of_match[] = {
576 { .compatible = "brcm,bcm6345-gpio" }, 576 { .compatible = "brcm,bcm6345-gpio" },
577 { .compatible = "wd,mbl-gpio" }, 577 { .compatible = "wd,mbl-gpio" },
578 { .compatible = "ni,169445-nand-gpio" },
578 { } 579 { }
579}; 580};
580MODULE_DEVICE_TABLE(of, bgpio_of_match); 581MODULE_DEVICE_TABLE(of, bgpio_of_match);