Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600656
| From | Nathan Sullivan <nathan.sullivan@ni.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO |
| Date | 2017-03-14 17:20 +0100 |
| Message-ID | <tkXl0-2CM-19@gated-at.bofh.it> (permalink) |
| References | <tkXkZ-2CM-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
.../bindings/gpio/ni,169445-nand-gpio.txt | 38 ++++++++++++++++++++++
drivers/gpio/gpio-mmio.c | 1 +
2 files changed, 39 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt
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 0000000..ca2f8c7
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt
@@ -0,0 +1,38 @@
+Bindings for the National Instruments 169445 GPIO NAND controller
+
+The 169445 GPIO NAND controller has two memory mapped GPIO registers, one
+for input (the ready signal) and one for output (control signals). It is
+intended to be used with the GPIO NAND driver.
+
+Required properties:
+ - compatible: should be "ni,169445-nand-gpio"
+ - reg-names: must contain
+ "dat" - data register
+ - reg: address + size pairs describing the GPIO register sets;
+ order must correspond with the order of entries in reg-names
+ - #gpio-cells: must be set to 2. The first cell is the pin number and
+ the second cell is used to specify the gpio polarity:
+ 0 = active high
+ 1 = active low
+ - gpio-controller: Marks the device node as a gpio controller.
+
+Optional properties:
+ - no-output: disables driving output on the pins
+
+Examples:
+ gpio1: nand-gpio-out@1f300010 {
+ compatible = "ni,169445-nand-gpio";
+ reg = <0x1f300010 0x4>;
+ reg-names = "dat";
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ gpio2: nand-gpio-in@1f300014 {
+ compatible = "ni,169445-nand-gpio";
+ reg = <0x1f300014 0x4>;
+ reg-names = "dat";
+ gpio-controller;
+ #gpio-cells = <2>;
+ no-output;
+ };
diff --git a/drivers/gpio/gpio-mmio.c b/drivers/gpio/gpio-mmio.c
index d7d03ad..f7da40e 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,
static const struct of_device_id bgpio_of_match[] = {
{ .compatible = "brcm,bcm6345-gpio" },
{ .compatible = "wd,mbl-gpio" },
+ { .compatible = "ni,169445-nand-gpio" },
{ }
};
MODULE_DEVICE_TABLE(of, bgpio_of_match);
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4] NI 169445 board support Nathan Sullivan <nathan.sullivan@ni.com> - 2017-03-14 17:20 +0100
[PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Nathan Sullivan <nathan.sullivan@ni.com> - 2017-03-14 17:20 +0100
Re: [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Linus Walleij <linus.walleij@linaro.org> - 2017-03-23 10:00 +0100
[PATCH 2/2] MIPS: NI 169445 board support Nathan Sullivan <nathan.sullivan@ni.com> - 2017-03-14 17:20 +0100
Re: [PATCH 2/2] MIPS: NI 169445 board support Rob Herring <robh@kernel.org> - 2017-03-23 23:40 +0100
Re: [PATCH 2/2] MIPS: NI 169445 board support Nathan Sullivan <nathan.sullivan@ni.com> - 2017-03-24 15:50 +0100
csiph-web