From: Nathan Sullivan <nathan.sullivan@ni.com> To: <linus.walleij@linaro.org>, <gnurou@gmail.com>, <mark.rutland@arm.com>, <devicetree@vger.kernel.org>, <robh+dt@kernel.org>, <ralf@linux-mips.org> Cc: <linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>, <linux-mips@linux-mips.org>, Nathan Sullivan <nathan.sullivan@ni.com> Subject: [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Date: Wed, 8 Mar 2017 13:35:43 -0600 [thread overview] Message-ID: <1489001744-26545-2-git-send-email-nathan.sullivan@ni.com> (raw) In-Reply-To: <1489001744-26545-1-git-send-email-nathan.sullivan@ni.com> 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 | 36 ++++++++++++++++++++++ drivers/gpio/gpio-mmio.c | 1 + 2 files changed, 37 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..ca2c14f --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt @@ -0,0 +1,36 @@ +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. + +Examples: + gpio1: nand-gpio-out@1f300010 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300010 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <5>; + }; + + gpio2: nand-gpio-in@1f300014 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300014 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <1>; + }; 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
WARNING: multiple messages have this Message-ID (diff)
From: Nathan Sullivan <nathan.sullivan@ni.com> To: linus.walleij@linaro.org, gnurou@gmail.com, mark.rutland@arm.com, devicetree@vger.kernel.org, robh+dt@kernel.org, ralf@linux-mips.org Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-mips@linux-mips.org, Nathan Sullivan <nathan.sullivan@ni.com> Subject: [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Date: Wed, 8 Mar 2017 13:35:43 -0600 [thread overview] Message-ID: <1489001744-26545-2-git-send-email-nathan.sullivan@ni.com> (raw) Message-ID: <20170308193543.OSeaY7gGnpEOIu9_cwyedZ662BK4UHDpn_Or-ZvFwVo@z> (raw) In-Reply-To: <1489001744-26545-1-git-send-email-nathan.sullivan@ni.com> 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 | 36 ++++++++++++++++++++++ drivers/gpio/gpio-mmio.c | 1 + 2 files changed, 37 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..ca2c14f --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/ni,169445-nand-gpio.txt @@ -0,0 +1,36 @@ +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. + +Examples: + gpio1: nand-gpio-out@1f300010 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300010 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <5>; + }; + + gpio2: nand-gpio-in@1f300014 { + compatible = "ni,169445-nand-gpio"; + reg = <0x1f300014 0x4>; + reg-names = "dat"; + gpio-controller; + #gpio-cells = <2>; + ngpios = <1>; + }; 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
next prev parent reply other threads:[~2017-03-08 19:36 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-08 19:35 [PATCH v3] NI 169445 board support Nathan Sullivan 2017-03-08 19:35 ` Nathan Sullivan 2017-03-08 19:35 ` Nathan Sullivan [this message] 2017-03-08 19:35 ` [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Nathan Sullivan 2017-03-10 10:21 ` Christian Lamparter 2017-03-15 10:15 ` Linus Walleij 2017-03-08 19:35 ` [PATCH 2/2] MIPS: NI 169445 board support Nathan Sullivan 2017-03-08 19:35 ` Nathan Sullivan -- strict thread matches above, loose matches on Subject: below -- 2017-03-14 16:13 [PATCH v4] " Nathan Sullivan 2017-03-14 16:13 ` [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Nathan Sullivan 2017-03-14 16:13 ` Nathan Sullivan 2017-03-23 8:49 ` Linus Walleij 2017-03-06 20:05 [PATCH v2] MIPS: NI 169445 board support Nathan Sullivan 2017-03-06 20:06 ` [PATCH 1/2] gpio: mmio: add support for NI 169445 NAND GPIO Nathan Sullivan 2017-03-06 20:06 ` Nathan Sullivan 2017-03-15 9:33 ` 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=1489001744-26545-2-git-send-email-nathan.sullivan@ni.com \ --to=nathan.sullivan@ni.com \ --cc=devicetree@vger.kernel.org \ --cc=gnurou@gmail.com \ --cc=linus.walleij@linaro.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mips@linux-mips.org \ --cc=mark.rutland@arm.com \ --cc=ralf@linux-mips.org \ --cc=robh+dt@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: linkBe 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).