blob: cabda2eab4a230b632b7adeab44477564d510ac5 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# 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,imx8ulp-gpio
24 - const: fsl,vf610-gpio
25 - items:
26 - const: fsl,imx7ulp-gpio
27 - const: fsl,vf610-gpio
28 - items:
29 - enum:
30 - fsl,imx93-gpio
31 - fsl,imx95-gpio
32 - const: fsl,imx8ulp-gpio
33
34 reg:
35 minItems: 1
36 maxItems: 2
37
38 interrupts:
39 items:
40 - description: GPIO Trustzone non-secure interrupt number
41 - description: GPIO Trustzone secure interrupt number
42 minItems: 1
43
44 interrupt-controller: true
45
46 "#interrupt-cells":
47 const: 2
48
49 "#gpio-cells":
50 const: 2
51
52 gpio-controller: true
53
Tom Rini6b642ac2024-10-01 12:20:28 -060054 gpio-line-names:
55 minItems: 1
56 maxItems: 32
57
Tom Rini53633a82024-02-29 12:33:36 -050058 clocks:
59 items:
60 - description: SoC GPIO clock
61 - description: SoC PORT clock
62
63 clock-names:
64 items:
65 - const: gpio
66 - const: port
67
68 gpio-ranges:
69 minItems: 1
70 maxItems: 4
71
72patternProperties:
73 "^.+-hog(-[0-9]+)?$":
74 type: object
75
76 required:
77 - gpio-hog
78
79required:
80 - compatible
81 - reg
82 - interrupts
83 - interrupt-controller
84 - "#interrupt-cells"
85 - "#gpio-cells"
86 - gpio-controller
87
88allOf:
89 - if:
90 properties:
91 compatible:
92 contains:
93 enum:
94 - fsl,vf610-gpio
95 - fsl,imx7ulp-gpio
96 then:
97 properties:
98 interrupts:
99 maxItems: 1
100 reg:
101 items:
102 - description: PORT register base address
103 - description: GPIO register base address
104 else:
105 properties:
106 interrupts:
107 minItems: 2
108 reg:
109 items:
110 - description: GPIO register base address
111
112additionalProperties: false
113
114examples:
115 - |
116 #include <dt-bindings/interrupt-controller/arm-gic.h>
117
118 gpio1: gpio@40049000 {
119 compatible = "fsl,vf610-gpio";
120 reg = <0x40049000 0x1000>, <0x400ff000 0x40>;
121 interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
122 gpio-controller;
123 #gpio-cells = <2>;
124 interrupt-controller;
125 #interrupt-cells = <2>;
126 gpio-ranges = <&iomuxc 0 0 32>;
127 };