diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-06-25 15:27:44 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-07-20 19:03:48 +0200 |
commit | 79bb6460012c7c9f40aeb7b7d5f28aaac4455912 (patch) | |
tree | 02c24499be95b62b2906a8de698423b73ec33392 /Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt | |
parent | 9caf1f2202da2affedf0c9e3c1ccda8ea6d353e1 (diff) |
gpio-tz1090-pdc: add TZ1090 PDC gpio driver
Add a GPIO driver for the low-power Powerdown Controller GPIOs in the
TZ1090 SoC.
The driver is instantiated by device tree and supports interrupts for
the SysWake GPIOs only.
Changes in v4:
- fix typos in DT bindings compatible properties
- reference Documentation/devicetree/bindings/gpio/gpio.txt in
gpio-ranges description in DT bindings
- fix gpio-ranges examples in DT bindings (it must now have 3 cells)
Changes in v3:
- separated from irq-imgpdc and removed arch/metag changes to allow
these patches to go upstream separately via the pinctrl[/gpio] trees
(particularly the pinctrl drivers depend on the new pinconf DT
bindings).
- some s/unsigned/unsigned int/.
- gpio-tz1090*: refer to <dt-bindings/gpio/gpio.h> and
<dt-bindings/interrupt-controller/irq.h> flags in bindings.
- gpio-tz1090*: move initcall from postcore to subsys.
Changes in v2:
- gpio-tz1090-pdc: remove references to Linux flags in dt bindings
- gpio-tz1090-pdc: make use of BIT() from linux/bitops.h
- gpio-tz1090-pdc: make register accessors inline to match pinctrl
- gpio-tz1090-pdc: update gpio-ranges to use 3 cells after recent ABI
breakage
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Rob Landley <rob@landley.net>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-doc@vger.kernel.org
Cc: devicetree-discuss@lists.ozlabs.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt')
-rw-r--r-- | Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt b/Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt new file mode 100644 index 00000000000..1fd98ffa8cb --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-tz1090-pdc.txt @@ -0,0 +1,45 @@ +ImgTec TZ1090 PDC GPIO Controller + +Required properties: +- compatible: Compatible property value should be "img,tz1090-pdc-gpio". + +- reg: Physical base address of the controller and length of memory mapped + region. This starts at and cover the SOC_GPIO_CONTROL registers. + +- gpio-controller: Specifies that the node is a gpio controller. + +- #gpio-cells: Should be 2. The syntax of the gpio specifier used by client + nodes should have the following values. + <[phandle of the gpio controller node] + [PDC gpio number] + [gpio flags]> + + Values for gpio specifier: + - GPIO number: a value in the range 0 to 6. + - GPIO flags: bit field of flags, as defined in <dt-bindings/gpio/gpio.h>. + Only the following flags are supported: + GPIO_ACTIVE_HIGH + GPIO_ACTIVE_LOW + +Optional properties: +- gpio-ranges: Mapping to pin controller pins (as described in + Documentation/devicetree/bindings/gpio/gpio.txt) + +- interrupts: Individual syswake interrupts (other GPIOs cannot interrupt) + + +Example: + + pdc_gpios: gpio-controller@02006500 { + gpio-controller; + #gpio-cells = <2>; + + compatible = "img,tz1090-pdc-gpio"; + reg = <0x02006500 0x100>; + + interrupt-parent = <&pdc>; + interrupts = <8 IRQ_TYPE_NONE>, /* Syswake 0 */ + <9 IRQ_TYPE_NONE>, /* Syswake 1 */ + <10 IRQ_TYPE_NONE>; /* Syswake 2 */ + gpio-ranges = <&pdc_pinctrl 0 0 7>; + }; |