blob: d61569b3f15b2aae13fe3790fa780f885a863559 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Microchip MPFS GPIO Controller
8
9maintainers:
10 - Conor Dooley <conor.dooley@microchip.com>
11
12properties:
13 compatible:
14 items:
15 - enum:
16 - microchip,mpfs-gpio
Tom Rini762f85b2024-07-20 11:15:10 -060017 - microchip,coregpio-rtl-v3
Tom Rini53633a82024-02-29 12:33:36 -050018
19 reg:
20 maxItems: 1
21
22 interrupts:
23 description:
24 Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
25 minItems: 1
26 maxItems: 32
27
28 interrupt-controller: true
29
30 clocks:
31 maxItems: 1
32
33 "#gpio-cells":
34 const: 2
35
36 "#interrupt-cells":
37 const: 1
38
39 ngpios:
40 description:
41 The number of GPIOs available.
42 minimum: 1
43 maximum: 32
44 default: 32
45
46 gpio-controller: true
Tom Rini762f85b2024-07-20 11:15:10 -060047 gpio-line-names: true
Tom Rini53633a82024-02-29 12:33:36 -050048
49patternProperties:
50 "^.+-hog(-[0-9]+)?$":
51 type: object
52
53 additionalProperties: false
54
55 properties:
56 gpio-hog: true
57 gpios: true
58 input: true
59 output-high: true
60 output-low: true
61 line-name: true
62
63 required:
64 - gpio-hog
65 - gpios
66
Tom Rini762f85b2024-07-20 11:15:10 -060067allOf:
68 - if:
69 properties:
70 compatible:
71 contains:
72 const: microchip,mpfs-gpio
73 then:
74 required:
75 - interrupts
76 - "#interrupt-cells"
77 - interrupt-controller
78
Tom Rini53633a82024-02-29 12:33:36 -050079required:
80 - compatible
81 - reg
Tom Rini53633a82024-02-29 12:33:36 -050082 - "#gpio-cells"
83 - gpio-controller
84 - clocks
85
86additionalProperties: false
87
88examples:
89 - |
90 gpio@20122000 {
91 compatible = "microchip,mpfs-gpio";
92 reg = <0x20122000 0x1000>;
93 clocks = <&clkcfg 25>;
94 interrupt-parent = <&plic>;
95 gpio-controller;
96 #gpio-cells = <2>;
97 interrupt-controller;
98 #interrupt-cells = <1>;
99 interrupts = <53>, <53>, <53>, <53>,
100 <53>, <53>, <53>, <53>,
101 <53>, <53>, <53>, <53>,
102 <53>, <53>, <53>, <53>,
103 <53>, <53>, <53>, <53>,
104 <53>, <53>, <53>, <53>,
105 <53>, <53>, <53>, <53>,
106 <53>, <53>, <53>, <53>;
107 };
108...