Lines Matching +full:dt +full:- +full:binding
5 -----------------
8 properties, each containing a 'gpio-list':
10 gpio-list ::= <single-gpio> [gpio-list]
11 single-gpio ::= <gpio-phandle> <gpio-specifier>
12 gpio-phandle : phandle to gpio controller node
13 gpio-specifier : Array of #gpio-cells specifying specific gpio
16 GPIO properties should be named "[<name>-]gpios", with <name> being the purpose
17 of this GPIO for the device. While a non-existent <name> is considered valid
28 binding of the device.
31 and bit-banged data signals:
34 gpio-controller
35 #gpio-cells = <2>;
38 gpio-controller
39 #gpio-cells = <1>;
43 enable-gpios = <&gpio2 2>;
44 data-gpios = <&gpio1 12 0>,
49 Note that gpio-specifier length is controller dependent. In the
53 gpio-specifier may encode: bank, pin position inside the bank,
54 whether pin is open-drain and whether pin is logically inverted.
56 be documented in the device tree binding for the device. Use the macros
57 defined in include/dt-bindings/gpio/gpio.h whenever possible:
62 enable-gpios = <&qe_pio_e 18 GPIO_ACTIVE_HIGH>;
65 GPIO_ACTIVE_HIGH is 0, so in this example gpio-specifier is "18 0" and encodes
66 GPIO pin number, and GPIO flags as accepted by the "qe_pio_e" gpio-controller.
69 ----------------------------------
71 A gpio-specifier should contain a flag indicating the GPIO polarity; active-
72 high or active-low. If it does, the following best practices should be
75 The gpio-specifier's polarity flag should represent the physical level at the
78 defined by the binding for the device. If the board inverts the signal between
79 the GPIO controller and the device, then the gpio-specifier will represent the
82 When the device's signal polarity is configurable, the binding for the
86 any software using that binding would statically program the device to use
91 a1) (Preferred) Dictated by a binding-specific DT property.
95 a2) Defined statically by the DT binding itself.
97 In particular, the polarity cannot be derived from the gpio-specifier, since
98 that would prevent the DT from separately representing the two orthogonal
99 concepts of configurable signal polarity in the device, and possible board-
105 in the binding. The gpio-specifier should represent the polarity of the signal
112 2) gpio-controller nodes
113 ------------------------
115 Every GPIO controller node must contain both an empty "gpio-controller"
116 property, and a #gpio-cells integer property, which indicates the number of
117 cells in a gpio-specifier.
119 Example of two SOC GPIO banks defined as gpio-controller nodes:
121 qe_pio_a: gpio-controller@1400 {
122 compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
124 gpio-controller;
125 #gpio-cells = <2>;
128 qe_pio_e: gpio-controller@1460 {
129 compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
131 gpio-controller;
132 #gpio-cells = <2>;
135 2.1) gpio- and pin-controller interaction
136 -----------------------------------------
143 controllers. The gpio-ranges property described below represents this, and
146 gpio-range-list ::= <single-gpio-range> [gpio-range-list]
147 single-gpio-range ::= <numeric-gpio-range> | <named-gpio-range>
148 numeric-gpio-range ::=
149 <pinctrl-phandle> <gpio-base> <pinctrl-base> <count>
150 named-gpio-range ::= <pinctrl-phandle> <gpio-base> '<0 0>'
151 pinctrl-phandle : phandle to pin controller node
152 gpio-base : Base GPIO ID in the GPIO controller
153 pinctrl-base : Base pinctrl pin ID in the pin controller
157 described in ../pinctrl/pinctrl-bindings.txt.
159 In case named gpio ranges are used (ranges with both <pinctrl-base> and
160 <count> set to 0), the property gpio-ranges-group-names contains one string
161 for every single-gpio-range in gpio-ranges:
162 gpiorange-names-list ::= <gpiorange-name> [gpiorange-names-list]
163 gpiorange-name : Name of the pingroup associated to the GPIO range in
166 Elements of gpiorange-names-list corresponding to numeric ranges contain
167 the empty string. Elements of gpiorange-names-list corresponding to named
172 Previous versions of this binding required all pin controller nodes that
173 were referenced by any gpio-ranges property to contain a property named
174 #gpio-range-cells with value <3>. This requirement is now deprecated.
181 qe_pio_e: gpio-controller@1460 {
182 #gpio-cells = <2>;
183 compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
185 gpio-controller;
186 gpio-ranges = <&pinctrl1 0 20 10>, <&pinctrl2 10 50 20>;
195 gpio_pio_i: gpio-controller@14B0 {
196 #gpio-cells = <2>;
197 compatible = "fsl,qe-pario-bank-e", "fsl,qe-pario-bank";
199 gpio-controller;
200 gpio-ranges = <&pinctrl1 0 20 10>,
204 gpio-ranges-group-names = "",
215 -----------------------
219 gpio-controller's driver probe function.
223 - gpio-hog: A property specifying that this child node represents a GPIO hog.
224 - gpios: Store the GPIO information (id, flags) for the GPIO to
230 - input: A property specifying to set the GPIO direction as input.
231 - output-low A property specifying to set the GPIO direction as output with
233 - output-high A property specifying to set the GPIO direction as output with
237 - line-name: The GPIO label name. If not present the node name is used.
244 #gpio-cells = <2>;
245 gpio-controller;
248 gpio-hog;
253 gpio-hog;
255 line-name = "foo-bar-gpio";