6 1. Properties for GPIO Controllers
14 Description: The #gpio-cells property defines the number of cells required
15 to encode a gpio specifier.
20 Property: gpio-controller
24 Description: The presence of a gpio-controller property defines a node as a
34 Description: The pin-count property defines the number of GPIO pins.
41 compatible = "mrvl,gpio";
44 interrupts = <6 7 8 9>;
45 interrupt-parent = <&PIC>;
49 2. Properties for GPIO consumer nodes.
55 Value type: <prop-encoded-array> encoded as arbitrary number of GPIO
58 Description: The gpios property of a device node defines the GPIO or GPIOs
59 that are used by the device. The value of the gpios property
60 consists of an arbitrary number of GPIO specifiers.
62 The first cell of the GPIO specifier is phandle of the node's
63 parent GPIO controller and remaining cells are defined by the
64 binding describing the GPIO parent, typically include
65 information like pin number, direction and various flags.
68 gpios = <&GPIO 0 1 0 /* GPIO[0]: IN, NONE */
69 &GPIO 1 2 0>; /* GPIO[1]: OUT, NONE */
72 3. "mrvl,gpio" controller GPIO specifier
74 <phandle pin dir flags>
77 pin: 0-MAX GPIO pin number.
81 2 OUT Output direction.
85 0x0001---- IN_POL_LOW Polarity low (active-low).
86 0x0002---- IN_IRQ_EDGE Interrupt, edge triggered.
87 0x0004---- IN_IRQ_LEVEL Interrupt, level triggered.
90 0x----0001 OUT_BLINK Blink on the pin.
91 0x----0002 OUT_OPEN_DRAIN Open drain output line.
92 0x----0004 OUT_OPEN_SRC Open source output line.
96 gpios = <&GPIO 0 1 0x00000000 /* GPIO[0]: IN */
97 &GPIO 1 2 0x00000000 /* GPIO[1]: OUT */
98 &GPIO 2 1 0x00020000 /* GPIO[2]: IN, IRQ (edge) */
99 &GPIO 3 1 0x00040000 /* GPIO[3]: IN, IRQ (level) */
101 &GPIO 10 2 0x00000001>; /* GPIO[10]: OUT, blink */