Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1553496 > unrolled thread

[PATCH v2 0/3] GPIO: Add driver for ThunderX and OCTEON-TX SoCs

Started byDavid Daney <ddaney.cavm@gmail.com>
First post2017-01-07 00:30 +0100
Last post2017-01-10 06:40 +0100
Articles 6 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/3] GPIO: Add driver for ThunderX and OCTEON-TX SoCs David Daney <ddaney.cavm@gmail.com> - 2017-01-07 00:30 +0100
    [PATCH v2 3/3] MAINTAINERS: Add entry for THUNDERX GPIO Driver. David Daney <ddaney.cavm@gmail.com> - 2017-01-07 00:30 +0100
    [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx David Daney <ddaney.cavm@gmail.com> - 2017-01-07 00:30 +0100
      Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx Linus Walleij <linus.walleij@linaro.org> - 2017-01-09 20:40 +0100
        Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx Linus Walleij <linus.walleij@linaro.org> - 2017-01-10 09:50 +0100
      Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for  gpio-thunderx Rob Herring <robh@kernel.org> - 2017-01-10 06:40 +0100

#1553496 — [PATCH v2 0/3] GPIO: Add driver for ThunderX and OCTEON-TX SoCs

FromDavid Daney <ddaney.cavm@gmail.com>
Date2017-01-07 00:30 +0100
Subject[PATCH v2 0/3] GPIO: Add driver for ThunderX and OCTEON-TX SoCs
Message-ID<sWM7n-BR-7@gated-at.bofh.it>
From: David Daney <david.daney@cavium.com>

The Cavium ThunderX and OCTEON-TX family of SoCs have on-chip GPIO
lines.  This patch set adds a driver for these.

Changes from v1:

 - in 1/3: Addressed Rob Harring's comments.

 - in 2/3: Trivial cleanups found in internal review + add some
   comments.

David Daney (3):
  dt-bindings: gpio: Add binding documentation for gpio-thunderx
  gpio: Add gpio driver support for ThunderX and OCTEON-TX
  MAINTAINERS: Add entry for THUNDERX GPIO Driver.

 .../devicetree/bindings/gpio/gpio-thunderx.txt     |  27 ++
 MAINTAINERS                                        |   5 +
 drivers/gpio/Kconfig                               |   8 +
 drivers/gpio/Makefile                              |   1 +
 drivers/gpio/gpio-thunderx.c                       | 487 +++++++++++++++++++++
 5 files changed, 528 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt
 create mode 100644 drivers/gpio/gpio-thunderx.c

-- 
1.8.3.1

[toc] | [next] | [standalone]


#1553500 — [PATCH v2 3/3] MAINTAINERS: Add entry for THUNDERX GPIO Driver.

FromDavid Daney <ddaney.cavm@gmail.com>
Date2017-01-07 00:30 +0100
Subject[PATCH v2 3/3] MAINTAINERS: Add entry for THUNDERX GPIO Driver.
Message-ID<sWM7o-BR-41@gated-at.bofh.it>
In reply to#1553496
From: David Daney <david.daney@cavium.com>

Signed-off-by: David Daney <david.daney@cavium.com>
---
 MAINTAINERS | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 97d0b68..3d254e9 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10886,6 +10886,11 @@ M:	Andreas Noever <andreas.noever@gmail.com>
 S:	Maintained
 F:	drivers/thunderbolt/
 
+THUNDERX GPIO DRIVER
+M:	David Daney <david.daney@cavium.com>
+S:	Maintained
+F:	drivers/gpio/gpio-thunderx.c
+
 TI BQ27XXX POWER SUPPLY DRIVER
 R:	Andrew F. Davis <afd@ti.com>
 F:	include/linux/power/bq27xxx_battery.h
-- 
1.8.3.1

[toc] | [prev] | [next] | [standalone]


#1553501 — [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx

FromDavid Daney <ddaney.cavm@gmail.com>
Date2017-01-07 00:30 +0100
Subject[PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
Message-ID<sWM7o-BR-49@gated-at.bofh.it>
In reply to#1553496
From: David Daney <david.daney@cavium.com>

Signed-off-by: David Daney <david.daney@cavium.com>
---
 .../devicetree/bindings/gpio/gpio-thunderx.txt     | 27 ++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt

diff --git a/Documentation/devicetree/bindings/gpio/gpio-thunderx.txt b/Documentation/devicetree/bindings/gpio/gpio-thunderx.txt
new file mode 100644
index 0000000..3f883ae
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-thunderx.txt
@@ -0,0 +1,27 @@
+Cavium ThunderX/OCTEON-TX GPIO controller bindings
+
+Required Properties:
+- reg: The controller bus address.
+- gpio-controller: Marks the device node as a GPIO controller.
+- #gpio-cells: Must be 2.
+  - First cell is the GPIO pin number relative to the controller.
+  - Second cell is a standard generic flag bitfield as described in gpio.txt.
+
+Optional Properties:
+- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used.
+- interrupt-controller: Marks the device node as an interrupt controller.
+- #interrupt-cells: Must be present and have value of 2 if
+                    "interrupt-controller" is present.
+  - First cell is the GPIO pin number relative to the controller.
+  - Second cell is triggering flags as defined in interrupts.txt.
+
+Example:
+
+gpio_6_0: gpio@6,0 {
+	compatible = "cavium,thunder-8890-gpio";
+	reg = <0x3000 0 0 0 0>; /*  DEVFN = 0x30 (6:0) */
+	gpio-controller;
+	#gpio-cells = <2>;
+	interrupt-controller;
+	#interrupt-cells = <2>;
+};
-- 
1.8.3.1

[toc] | [prev] | [next] | [standalone]


#1554636 — Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-01-09 20:40 +0100
SubjectRe: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
Message-ID<sXNXs-8fG-13@gated-at.bofh.it>
In reply to#1553501
On Sat, Jan 7, 2017 at 12:22 AM, David Daney <ddaney.cavm@gmail.com> wrote:

> From: David Daney <david.daney@cavium.com>
>
> Signed-off-by: David Daney <david.daney@cavium.com>
(...)

> +Optional Properties:
> +- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding is used.
> +- interrupt-controller: Marks the device node as an interrupt controller.
> +- #interrupt-cells: Must be present and have value of 2 if
> +                    "interrupt-controller" is present.
> +  - First cell is the GPIO pin number relative to the controller.
> +  - Second cell is triggering flags as defined in interrupts.txt.

AFAICT this device has an optional list of interrupts as well?
One per pin even?

Yours,
Linus Walleij

[toc] | [prev] | [next] | [standalone]


#1555050 — Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-01-10 09:50 +0100
SubjectRe: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
Message-ID<sY0hX-7uT-11@gated-at.bofh.it>
In reply to#1554636
On Mon, Jan 9, 2017 at 8:44 PM, David Daney <ddaney@caviumnetworks.com> wrote:
> On 01/09/2017 11:36 AM, Linus Walleij wrote:

>>> +Optional Properties:
>>> +- compatible: "cavium,thunder-8890-gpio", unused as PCI driver binding
>>> is used.
>>> +- interrupt-controller: Marks the device node as an interrupt
>>> controller.
>>> +- #interrupt-cells: Must be present and have value of 2 if
>>> +                    "interrupt-controller" is present.
>>> +  - First cell is the GPIO pin number relative to the controller.
>>> +  - Second cell is triggering flags as defined in interrupts.txt.
>>
>>
>> AFAICT this device has an optional list of interrupts as well?
>> One per pin even?
>
> I'm not sure I understand your question.
>
> The GPIO hardware supports an interrupt on each pin.  The underlying
> interrupt mechanism is via PCI MSI-X, which are fully discoverable by the
> driver, so lack of device tree binding for the these underlying MSI-X is
> fully appropriate.

Sorry I guess I'm just ignorant about how PCI works, that has never
been my strongest subject admittedly.

So what you're saying is that PCI devices do not need specifying
interrupts not interrupt parents in the device tree?

That's fine then.

Yours,
Linus Walleij

[toc] | [prev] | [next] | [standalone]


#1554947 — Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx

FromRob Herring <robh@kernel.org>
Date2017-01-10 06:40 +0100
SubjectRe: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
Message-ID<sXXk5-5LU-19@gated-at.bofh.it>
In reply to#1553501
On Fri, Jan 06, 2017 at 03:22:58PM -0800, David Daney wrote:
> From: David Daney <david.daney@cavium.com>
> 
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
>  .../devicetree/bindings/gpio/gpio-thunderx.txt     | 27 ++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpio/gpio-thunderx.txt

Acked-by: Rob Herring <robh@kernel.org>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web