xref: /linux/Documentation/devicetree/bindings/gpio/pin-control-gpio.yaml (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/pin-control-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Pin control based generic GPIO controller
8
9description:
10  The pin control-based GPIO will facilitate a pin controller's ability
11  to drive electric lines high/low and other generic properties of a
12  pin controller to perform general-purpose one-bit binary I/O.
13
14maintainers:
15  - Dan Carpenter <dan.carpenter@linaro.org>
16
17properties:
18  compatible:
19    const: scmi-pinctrl-gpio
20
21  gpio-controller: true
22
23  "#gpio-cells":
24    const: 2
25
26  gpio-line-names: true
27
28  gpio-ranges: true
29
30  ngpios: true
31
32patternProperties:
33  "^.+-hog(-[0-9]+)?$":
34    type: object
35
36    required:
37      - gpio-hog
38
39required:
40  - compatible
41  - gpio-controller
42  - "#gpio-cells"
43  - gpio-ranges
44  - ngpios
45
46additionalProperties: false
47
48examples:
49  - |
50    gpio {
51        compatible = "scmi-pinctrl-gpio";
52        gpio-controller;
53        #gpio-cells = <2>;
54        ngpios = <4>;
55        gpio-line-names = "gpio_5_17", "gpio_5_20", "gpio_5_22", "gpio_2_1";
56        gpio-ranges = <&scmi_pinctrl 0 30 4>;
57        pinctrl-names = "default";
58        pinctrl-0 = <&keys_pins>;
59    };
60