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
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,axp221-gpio
23          - x-powers,axp813-gpio
24      - items:
25          - enum:
26              - x-powers,axp223-gpio
27              - x-powers,axp809-gpio
28          - const: x-powers,axp221-gpio
29      - items:
30          - const: x-powers,axp803-gpio
31          - const: x-powers,axp813-gpio
32
33  gpio-controller: true
34
35patternProperties:
36  "^.*-pins?$":
37    $ref: /schemas/pinctrl/pinmux-node.yaml#
38    additionalProperties: false
39
40    properties:
41      pins:
42        items:
43          enum:
44            - GPIO0
45            - GPIO1
46            - GPIO2
47
48      function:
49        enum:
50          - adc
51          - ldo
52          - gpio_in
53          - gpio_out
54
55required:
56  - compatible
57  - "#gpio-cells"
58  - gpio-controller
59
60additionalProperties: false
61
62...
63