1# SPDX-License-Identifier: GPL-2.0
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/gpio/x-powers,axp209-gpio.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: X-Powers AXP209 GPIO Device Tree Bindings
8
9maintainers:
10  - Chen-Yu Tsai <wens@csie.org>
11
12properties:
13  "#gpio-cells":
14    const: 2
15    description: >
16      The first cell is the pin number and the second is the GPIO flags.
17
18  compatible:
19    oneOf:
20      - enum:
21          - x-powers,axp209-gpio
22          - x-powers,axp813-gpio
23      - items:
24          - const: x-powers,axp803-gpio
25          - const: x-powers,axp813-gpio
26
27  gpio-controller: true
28
29patternProperties:
30  "^.*-pins?$":
31    $ref: /schemas/pinctrl/pinmux-node.yaml#
32
33    properties:
34      pins:
35        items:
36          enum:
37            - GPIO0
38            - GPIO1
39            - GPIO2
40
41      function:
42        enum:
43          - adc
44          - ldo
45          - gpio_in
46          - gpio_out
47
48required:
49  - compatible
50  - "#gpio-cells"
51  - gpio-controller
52
53additionalProperties: false
54
55...
56