1 GPIO via CREG (control registers) driver
3 31 9 7 5 0 < bit number
5 [ not used | gpio-1 | gpio-0 | <-shift-> ] < 32 bit register
8 write 0x2 == set output to "1" (activate)
9 write 0x3 == set output to "0" (deactivate)
12 - compatible : "snps,creg-gpio"
13 - reg : Exactly one register range with length 0x4.
14 - #gpio-cells : Should be one - the pin number.
15 - gpio-controller : Marks the device node as a GPIO controller.
16 - gpio-count: Number of GPIO pins.
17 - gpio-bit-per-line: Number of bits per gpio line (see picture).
18 - gpio-first-shift: Shift (in bits) of the first GPIO field in register
20 - gpio-activate-val: Value should be set in corresponding field to set
21 output to "1" (see picture). Applied to all GPIO ports.
22 - gpio-deactivate-val: Value should be set in corresponding field to set
23 output to "0" (see picture). Applied to all GPIO ports.
26 - gpio-bank-name: name of bank (as default driver name is used is used)
27 - gpio-default-val: array of default output values (must me 0 or 1)
29 Example (see picture):
32 compatible = "snps,creg-gpio";
33 reg = <0xf00014b0 0x4>;
36 gpio-bank-name = "hsdk-spi-cs";
38 gpio-first-shift = <5>;
39 gpio-bit-per-line = <2>;
40 gpio-activate-val = <2>;
41 gpio-deactivate-val = <3>;
42 gpio-default-val = <1 1>;