diff options
author | Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> | 2018-06-08 17:58:24 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2018-07-31 07:49:47 +0300 |
commit | 7620ec4df65d6d2148e7476fbaff6619556acb13 (patch) | |
tree | 27f391c2cbfc23fdfca03dbfdd8b9050ed69a8fd | |
parent | fe3eb7a88720fc33d92ed712c56c62cfcdffc0ca (diff) | |
download | u-boot-7620ec4df65d6d2148e7476fbaff6619556acb13.tar.gz |
CREG GPIO: add device tree bindings
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | doc/device-tree-bindings/gpio/snps,creg-gpio.txt | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index fe8423530c..1bd583c975 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -74,6 +74,7 @@ ARC HSDK CREG GPIO M: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> S: Maintained L: uboot-snps-arc@synopsys.com +F: doc/device-tree-bindings/gpio/snps,creg-gpio.txt F: drivers/gpio/hsdk-creg-gpio.c ARM diff --git a/doc/device-tree-bindings/gpio/snps,creg-gpio.txt b/doc/device-tree-bindings/gpio/snps,creg-gpio.txt new file mode 100644 index 0000000000..46ceb65c53 --- /dev/null +++ b/doc/device-tree-bindings/gpio/snps,creg-gpio.txt @@ -0,0 +1,43 @@ +GPIO via CREG (control registers) driver + +31 9 7 5 0 < bit number +| | | | | +[ not used | gpio-1 | gpio-0 | <-shift-> ] < 32 bit register + ^ ^ + | | + write 0x2 == set output to "1" (activate) + write 0x3 == set output to "0" (deactivate) + +Required properties: +- compatible : "snps,creg-gpio" +- reg : Exactly one register range with length 0x4. +- #gpio-cells : Should be one - the pin number. +- gpio-controller : Marks the device node as a GPIO controller. +- gpio-count: Number of GPIO pins. +- gpio-bit-per-line: Number of bits per gpio line (see picture). +- gpio-first-shift: Shift (in bits) of the first GPIO field in register + (see picture). +- gpio-activate-val: Value should be set in corresponding field to set + output to "1" (see picture). Applied to all GPIO ports. +- gpio-deactivate-val: Value should be set in corresponding field to set + output to "0" (see picture). Applied to all GPIO ports. + +Optional properties: +- gpio-bank-name: name of bank (as default driver name is used is used) +- gpio-default-val: array of default output values (must me 0 or 1) + +Example (see picture): + +gpio: gpio@f00014b0 { + compatible = "snps,creg-gpio"; + reg = <0xf00014b0 0x4>; + gpio-controller; + #gpio-cells = <1>; + gpio-bank-name = "hsdk-spi-cs"; + gpio-count = <2>; + gpio-first-shift = <5>; + gpio-bit-per-line = <2>; + gpio-activate-val = <2>; + gpio-deactivate-val = <3>; + gpio-default-val = <1 1>; +}; |