* [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding
@ 2016-05-11 22:07 Christian Lamparter
2016-05-16 15:27 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Christian Lamparter @ 2016-05-11 22:07 UTC (permalink / raw)
To: linux-gpio, linuxppc-dev, devicetree
Cc: Christian Lamparter, Kumar Gala, Ian Campbell, Mark Rutland,
Pawel Moll, Rob Herring, Alexandre Courbot, Alistair Popple,
Matt Porter, Linus Walleij
This patch adds binding information for IBM/AMCC/APM GPIO
Controllers of the PowerPC 4XX series and compatible SoCs.
The "PowerPC 405EP Embedded Processor Data Sheet" has the
following to say about the GPIO controllers: "
- Controller functions and GPIO registers are programmed
and accessed via memory-mapped OPB bus master accesses
- All GPIOs are pin-shared with other functions. DCRs control
whether a particular pin that has GPIO capabilities acts
as a GPIO or is used for another purpose.
- Each GPIO outputs is separately programmable to emulate
an open-drain driver (i.e. drives to zero, threestated if
output bit is 1)
"
The ppc4xx_gpio.c driver is part of the platform/sysdev drivers
in arch/powerpc/sysdev.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
I looked into arch/powerpc/sysdev/ppc4xx_gpio.c driver and
it doesn't have support for the tri-state logic (open drain
is disabled), but the hardware would support it.
(the #gpio-cells description suffers because of this, since
the high-z option isn't there).
Also there's another problem: There's no DCR pinmux driver?!
So sadly, there's not much information on how to use the DCRs
to control the which pin is muxed to the GPIO or to a SoC
function like the i2c.
This was all the valuable information I could find about the
hardware, so it is included it in the binding text, even
though there's no support for it... Is there anything else
to add?
---
.../devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
diff --git a/Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt b/Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
new file mode 100644
index 0000000..22aabb7
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
@@ -0,0 +1,24 @@
+* IBM/AMCC/APM GPIO Controller for PowerPC 4XX series and compatible SoCs
+
+All GPIOs are pin-shared with other functions. DCRs control whether a
+particular pin that has GPIO capabilities acts as a GPIO or is used for
+another purpose. GPIO outputs are separately programmable to emulate
+an open-drain driver.
+
+Required properties:
+ - compatible: must be "ibm,ppc4xx-gpio"
+ - reg: address and length of the register set for the device
+ - #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.
+
+Example:
+
+GPIO0: gpio@ef600b00 {
+ compatible = "ibm,ppc4xx-gpio";
+ reg = <0xef600b00 0x00000048>;
+ #gpio-cells = <2>;
+ gpio-controller;
+};
--
2.8.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding
2016-05-11 22:07 [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding Christian Lamparter
@ 2016-05-16 15:27 ` Rob Herring
2016-05-16 16:56 ` Rob Herring
0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2016-05-16 15:27 UTC (permalink / raw)
To: Christian Lamparter
Cc: linux-gpio, linuxppc-dev, devicetree, Kumar Gala, Ian Campbell,
Mark Rutland, Pawel Moll, Alexandre Courbot, Alistair Popple,
Matt Porter, Linus Walleij
On Thu, May 12, 2016 at 12:07:48AM +0200, Christian Lamparter wrote:
> This patch adds binding information for IBM/AMCC/APM GPIO
> Controllers of the PowerPC 4XX series and compatible SoCs.
>
> The "PowerPC 405EP Embedded Processor Data Sheet" has the
> following to say about the GPIO controllers: "
>
> - Controller functions and GPIO registers are programmed
> and accessed via memory-mapped OPB bus master accesses
>
> - All GPIOs are pin-shared with other functions. DCRs control
> whether a particular pin that has GPIO capabilities acts
> as a GPIO or is used for another purpose.
>
> - Each GPIO outputs is separately programmable to emulate
> an open-drain driver (i.e. drives to zero, threestated if
> output bit is 1)
>
> "
> The ppc4xx_gpio.c driver is part of the platform/sysdev drivers
> in arch/powerpc/sysdev.
>
> Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> ---
> I looked into arch/powerpc/sysdev/ppc4xx_gpio.c driver and
> it doesn't have support for the tri-state logic (open drain
> is disabled), but the hardware would support it.
> (the #gpio-cells description suffers because of this, since
> the high-z option isn't there).
>
> Also there's another problem: There's no DCR pinmux driver?!
> So sadly, there's not much information on how to use the DCRs
> to control the which pin is muxed to the GPIO or to a SoC
> function like the i2c.
>
> This was all the valuable information I could find about the
> hardware, so it is included it in the binding text, even
> though there's no support for it... Is there anything else
> to add?
> ---
> .../devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt | 24 ++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
Normally, we don't allow wildcards for compatible strings, but given
this is an established binding it is okay.
Acked-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding
2016-05-16 15:27 ` Rob Herring
@ 2016-05-16 16:56 ` Rob Herring
2016-05-24 11:43 ` Linus Walleij
0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2016-05-16 16:56 UTC (permalink / raw)
To: Christian Lamparter
Cc: linux-gpio, linuxppc-dev, devicetree, Kumar Gala, Ian Campbell,
Mark Rutland, Pawel Moll, Alexandre Courbot, Alistair Popple,
Matt Porter, Linus Walleij
On Mon, May 16, 2016 at 10:27:46AM -0500, Rob Herring wrote:
> On Thu, May 12, 2016 at 12:07:48AM +0200, Christian Lamparter wrote:
> > This patch adds binding information for IBM/AMCC/APM GPIO
> > Controllers of the PowerPC 4XX series and compatible SoCs.
> >
> > The "PowerPC 405EP Embedded Processor Data Sheet" has the
> > following to say about the GPIO controllers: "
> >
> > - Controller functions and GPIO registers are programmed
> > and accessed via memory-mapped OPB bus master accesses
> >
> > - All GPIOs are pin-shared with other functions. DCRs control
> > whether a particular pin that has GPIO capabilities acts
> > as a GPIO or is used for another purpose.
> >
> > - Each GPIO outputs is separately programmable to emulate
> > an open-drain driver (i.e. drives to zero, threestated if
> > output bit is 1)
> >
> > "
> > The ppc4xx_gpio.c driver is part of the platform/sysdev drivers
> > in arch/powerpc/sysdev.
> >
> > Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
> > ---
> > I looked into arch/powerpc/sysdev/ppc4xx_gpio.c driver and
> > it doesn't have support for the tri-state logic (open drain
> > is disabled), but the hardware would support it.
> > (the #gpio-cells description suffers because of this, since
> > the high-z option isn't there).
> >
> > Also there's another problem: There's no DCR pinmux driver?!
> > So sadly, there's not much information on how to use the DCRs
> > to control the which pin is muxed to the GPIO or to a SoC
> > function like the i2c.
> >
> > This was all the valuable information I could find about the
> > hardware, so it is included it in the binding text, even
> > though there's no support for it... Is there anything else
> > to add?
> > ---
> > .../devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt | 24 ++++++++++++++++++++++
> > 1 file changed, 24 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt
>
> Normally, we don't allow wildcards for compatible strings, but given
> this is an established binding it is okay.
>
> Acked-by: Rob Herring <robh@kernel.org>
As this is just a binding doc, I've applied it.
Rob
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding
2016-05-16 16:56 ` Rob Herring
@ 2016-05-24 11:43 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-05-24 11:43 UTC (permalink / raw)
To: Rob Herring
Cc: Christian Lamparter, linux-gpio,
linuxppc-dev@lists.ozlabs.org list, devicetree, Kumar Gala,
Ian Campbell, Mark Rutland, Pawel Moll, Alexandre Courbot,
Alistair Popple, Matt Porter
On Mon, May 16, 2016 at 6:56 PM, Rob Herring <robh@kernel.org> wrote:
> On Mon, May 16, 2016 at 10:27:46AM -0500, Rob Herring wrote:
>> On Thu, May 12, 2016 at 12:07:48AM +0200, Christian Lamparter wrote:
>> > This patch adds binding information for IBM/AMCC/APM GPIO
>> > Controllers of the PowerPC 4XX series and compatible SoCs.
(...)
>> Acked-by: Rob Herring <robh@kernel.org>
>
> As this is just a binding doc, I've applied it.
OK less work on my part :)
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-24 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-11 22:07 [PATCH] gpio: dt-bindings: add ibm,ppc4xx-gpio binding Christian Lamparter
2016-05-16 15:27 ` Rob Herring
2016-05-16 16:56 ` Rob Herring
2016-05-24 11:43 ` Linus Walleij
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.