xref: /linux/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml (revision 6e12a52c1459b791f27396a9b656b92aaa600065)
1735806d8SConor Dooley# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2735806d8SConor Dooley%YAML 1.2
3735806d8SConor Dooley---
4735806d8SConor Dooley$id: http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#
5735806d8SConor Dooley$schema: http://devicetree.org/meta-schemas/core.yaml#
6735806d8SConor Dooley
7dd3cb467SAndrew Lunntitle: Microchip MPFS GPIO Controller
8735806d8SConor Dooley
9735806d8SConor Dooleymaintainers:
10735806d8SConor Dooley  - Conor Dooley <conor.dooley@microchip.com>
11735806d8SConor Dooley
12735806d8SConor Dooleyproperties:
13735806d8SConor Dooley  compatible:
14735806d8SConor Dooley    items:
15735806d8SConor Dooley      - enum:
16735806d8SConor Dooley          - microchip,mpfs-gpio
17*6e12a52cSJamie Gibbons          - microchip,coregpio-rtl-v3
18735806d8SConor Dooley
19735806d8SConor Dooley  reg:
20735806d8SConor Dooley    maxItems: 1
21735806d8SConor Dooley
22735806d8SConor Dooley  interrupts:
23735806d8SConor Dooley    description:
24735806d8SConor Dooley      Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
25735806d8SConor Dooley    minItems: 1
26735806d8SConor Dooley    maxItems: 32
27735806d8SConor Dooley
28735806d8SConor Dooley  interrupt-controller: true
29735806d8SConor Dooley
30735806d8SConor Dooley  clocks:
31735806d8SConor Dooley    maxItems: 1
32735806d8SConor Dooley
33735806d8SConor Dooley  "#gpio-cells":
34735806d8SConor Dooley    const: 2
35735806d8SConor Dooley
36735806d8SConor Dooley  "#interrupt-cells":
37735806d8SConor Dooley    const: 1
38735806d8SConor Dooley
39735806d8SConor Dooley  ngpios:
40735806d8SConor Dooley    description:
41735806d8SConor Dooley      The number of GPIOs available.
42735806d8SConor Dooley    minimum: 1
43735806d8SConor Dooley    maximum: 32
44735806d8SConor Dooley    default: 32
45735806d8SConor Dooley
46735806d8SConor Dooley  gpio-controller: true
47735806d8SConor Dooley
48f7992069SConor DooleypatternProperties:
49f7992069SConor Dooley  "^.+-hog(-[0-9]+)?$":
50f7992069SConor Dooley    type: object
51f7992069SConor Dooley
52f7992069SConor Dooley    additionalProperties: false
53f7992069SConor Dooley
54f7992069SConor Dooley    properties:
55f7992069SConor Dooley      gpio-hog: true
56f7992069SConor Dooley      gpios: true
57f7992069SConor Dooley      input: true
58f7992069SConor Dooley      output-high: true
59f7992069SConor Dooley      output-low: true
60f7992069SConor Dooley      line-name: true
61f7992069SConor Dooley
62f7992069SConor Dooley    required:
63f7992069SConor Dooley      - gpio-hog
64f7992069SConor Dooley      - gpios
65f7992069SConor Dooley
66*6e12a52cSJamie GibbonsallOf:
67*6e12a52cSJamie Gibbons  - if:
68*6e12a52cSJamie Gibbons      properties:
69*6e12a52cSJamie Gibbons        compatible:
70*6e12a52cSJamie Gibbons          contains:
71*6e12a52cSJamie Gibbons            const: microchip,mpfs-gpio
72*6e12a52cSJamie Gibbons    then:
73735806d8SConor Dooley      required:
74735806d8SConor Dooley        - interrupts
75735806d8SConor Dooley        - "#interrupt-cells"
76735806d8SConor Dooley        - interrupt-controller
77*6e12a52cSJamie Gibbons
78*6e12a52cSJamie Gibbonsrequired:
79*6e12a52cSJamie Gibbons  - compatible
80*6e12a52cSJamie Gibbons  - reg
81735806d8SConor Dooley  - "#gpio-cells"
82735806d8SConor Dooley  - gpio-controller
83735806d8SConor Dooley  - clocks
84735806d8SConor Dooley
85735806d8SConor DooleyadditionalProperties: false
86735806d8SConor Dooley
87735806d8SConor Dooleyexamples:
88735806d8SConor Dooley  - |
89735806d8SConor Dooley    gpio@20122000 {
90735806d8SConor Dooley        compatible = "microchip,mpfs-gpio";
91735806d8SConor Dooley        reg = <0x20122000 0x1000>;
92735806d8SConor Dooley        clocks = <&clkcfg 25>;
93735806d8SConor Dooley        interrupt-parent = <&plic>;
94735806d8SConor Dooley        gpio-controller;
95735806d8SConor Dooley        #gpio-cells = <2>;
96735806d8SConor Dooley        interrupt-controller;
97735806d8SConor Dooley        #interrupt-cells = <1>;
98735806d8SConor Dooley        interrupts = <53>, <53>, <53>, <53>,
99735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
100735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
101735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
102735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
103735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
104735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
105735806d8SConor Dooley                     <53>, <53>, <53>, <53>;
106735806d8SConor Dooley    };
107735806d8SConor Dooley...
108