xref: /linux/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml (revision ae22a94997b8a03dcb3c922857c203246711f9d4)
1# 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
17
18  reg:
19    maxItems: 1
20
21  interrupts:
22    description:
23      Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
24    minItems: 1
25    maxItems: 32
26
27  interrupt-controller: true
28
29  clocks:
30    maxItems: 1
31
32  "#gpio-cells":
33    const: 2
34
35  "#interrupt-cells":
36    const: 1
37
38  ngpios:
39    description:
40      The number of GPIOs available.
41    minimum: 1
42    maximum: 32
43    default: 32
44
45  gpio-controller: true
46
47patternProperties:
48  "^.+-hog(-[0-9]+)?$":
49    type: object
50
51    additionalProperties: false
52
53    properties:
54      gpio-hog: true
55      gpios: true
56      input: true
57      output-high: true
58      output-low: true
59      line-name: true
60
61    required:
62      - gpio-hog
63      - gpios
64
65required:
66  - compatible
67  - reg
68  - interrupts
69  - "#interrupt-cells"
70  - interrupt-controller
71  - "#gpio-cells"
72  - gpio-controller
73  - clocks
74
75additionalProperties: false
76
77examples:
78  - |
79    gpio@20122000 {
80        compatible = "microchip,mpfs-gpio";
81        reg = <0x20122000 0x1000>;
82        clocks = <&clkcfg 25>;
83        interrupt-parent = <&plic>;
84        gpio-controller;
85        #gpio-cells = <2>;
86        interrupt-controller;
87        #interrupt-cells = <1>;
88        interrupts = <53>, <53>, <53>, <53>,
89                     <53>, <53>, <53>, <53>,
90                     <53>, <53>, <53>, <53>,
91                     <53>, <53>, <53>, <53>,
92                     <53>, <53>, <53>, <53>,
93                     <53>, <53>, <53>, <53>,
94                     <53>, <53>, <53>, <53>,
95                     <53>, <53>, <53>, <53>;
96    };
97...
98