Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Mon, Jan 9, 2017 at 8:44 PM, David Daneywrote: > 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
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Mon, Jan 9, 2017 at 8:44 PM, David Daney 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
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Fri, Jan 06, 2017 at 03:22:58PM -0800, David Daney wrote: > From: David Daney> > Signed-off-by: David Daney > --- > .../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
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Fri, Jan 06, 2017 at 03:22:58PM -0800, David Daney wrote: > From: David Daney > > Signed-off-by: David Daney > --- > .../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
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On 01/09/2017 11:36 AM, Linus Walleij wrote: On Sat, Jan 7, 2017 at 12:22 AM, David Daneywrote: From: David Daney Signed-off-by: David Daney (...) +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. On the other hand, users of the GPIO interrupt pins need this "interrupt-controller" and "#interrupt-cells" to be able to properly find and configure the proper interrupts. I said the "interrupt-controller" property was optional, because some systems don't use GPIO interrupts and can function without specifying that it is also an interrupt controller. Yours, Linus Walleij
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On 01/09/2017 11:36 AM, Linus Walleij wrote: On Sat, Jan 7, 2017 at 12:22 AM, David Daney wrote: From: David Daney Signed-off-by: David Daney (...) +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. On the other hand, users of the GPIO interrupt pins need this "interrupt-controller" and "#interrupt-cells" to be able to properly find and configure the proper interrupts. I said the "interrupt-controller" property was optional, because some systems don't use GPIO interrupts and can function without specifying that it is also an interrupt controller. Yours, Linus Walleij
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Sat, Jan 7, 2017 at 12:22 AM, David Daneywrote: > From: David Daney > > Signed-off-by: David Daney (...) > +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
Re: [PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
On Sat, Jan 7, 2017 at 12:22 AM, David Daney wrote: > From: David Daney > > Signed-off-by: David Daney (...) > +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
[PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
From: David DaneySigned-off-by: David Daney --- .../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 000..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
[PATCH v2 1/3] dt-bindings: gpio: Add binding documentation for gpio-thunderx
From: David Daney Signed-off-by: David Daney --- .../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 000..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