1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/gpio-vf610.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Freescale VF610 PORT/GPIO module
8
9maintainers:
10  - Stefan Agner <stefan@agner.ch>
11
12description: |
13  The Freescale PORT/GPIO modules are two adjacent modules providing GPIO
14  functionality. Each pair serves 32 GPIOs. The VF610 has 5 instances of
15  each, and each PORT module has its own interrupt.
16
17  Note: Each GPIO port should have an alias correctly numbered in "aliases"
18  node.
19
20properties:
21  compatible:
22    oneOf:
23      - const: fsl,vf610-gpio
24      - items:
25          - const: fsl,imx7ulp-gpio
26          - const: fsl,vf610-gpio
27      - items:
28          - enum:
29              - fsl,imx93-gpio
30              - fsl,imx8ulp-gpio
31          - const: fsl,imx7ulp-gpio
32
33  reg:
34    description: The first reg tuple represents the PORT module, the second tuple
35      represents the GPIO module.
36    maxItems: 2
37
38  interrupts:
39    maxItems: 1
40
41  interrupt-controller: true
42
43  "#interrupt-cells":
44    const: 2
45
46  "#gpio-cells":
47    const: 2
48
49  gpio-controller: true
50
51  clocks:
52    items:
53      - description: SoC GPIO clock
54      - description: SoC PORT clock
55
56  clock-names:
57    items:
58      - const: gpio
59      - const: port
60
61  gpio-ranges:
62    maxItems: 1
63
64patternProperties:
65  "^.+-hog(-[0-9]+)?$":
66    type: object
67
68    required:
69      - gpio-hog
70
71required:
72  - compatible
73  - reg
74  - interrupts
75  - interrupt-controller
76  - "#interrupt-cells"
77  - "#gpio-cells"
78  - gpio-controller
79
80additionalProperties: false
81
82examples:
83  - |
84    #include <dt-bindings/interrupt-controller/arm-gic.h>
85
86    gpio1: gpio@40049000 {
87        compatible = "fsl,vf610-gpio";
88        reg = <0x40049000 0x1000>, <0x400ff000 0x40>;
89        interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
90        gpio-controller;
91        #gpio-cells = <2>;
92        interrupt-controller;
93        #interrupt-cells = <2>;
94        gpio-ranges = <&iomuxc 0 0 32>;
95    };
96