xref: /linux/Documentation/devicetree/bindings/gpio/microchip,mpfs-gpio.yaml (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
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
176e12a52cSJamie 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
47*f752a52dSJamie Gibbons  gpio-line-names: true
48735806d8SConor Dooley
49f7992069SConor DooleypatternProperties:
50f7992069SConor Dooley  "^.+-hog(-[0-9]+)?$":
51f7992069SConor Dooley    type: object
52f7992069SConor Dooley    required:
53f7992069SConor Dooley      - gpio-hog
54f7992069SConor Dooley
556e12a52cSJamie GibbonsallOf:
566e12a52cSJamie Gibbons  - if:
576e12a52cSJamie Gibbons      properties:
586e12a52cSJamie Gibbons        compatible:
596e12a52cSJamie Gibbons          contains:
606e12a52cSJamie Gibbons            const: microchip,mpfs-gpio
616e12a52cSJamie Gibbons    then:
62735806d8SConor Dooley      required:
63735806d8SConor Dooley        - interrupts
64735806d8SConor Dooley        - "#interrupt-cells"
65735806d8SConor Dooley        - interrupt-controller
666e12a52cSJamie Gibbons
676e12a52cSJamie Gibbonsrequired:
686e12a52cSJamie Gibbons  - compatible
696e12a52cSJamie Gibbons  - reg
70735806d8SConor Dooley  - "#gpio-cells"
71735806d8SConor Dooley  - gpio-controller
72735806d8SConor Dooley  - clocks
73735806d8SConor Dooley
74735806d8SConor DooleyadditionalProperties: false
75735806d8SConor Dooley
76735806d8SConor Dooleyexamples:
77735806d8SConor Dooley  - |
78735806d8SConor Dooley    gpio@20122000 {
79735806d8SConor Dooley        compatible = "microchip,mpfs-gpio";
80735806d8SConor Dooley        reg = <0x20122000 0x1000>;
81735806d8SConor Dooley        clocks = <&clkcfg 25>;
82735806d8SConor Dooley        interrupt-parent = <&plic>;
83735806d8SConor Dooley        gpio-controller;
84735806d8SConor Dooley        #gpio-cells = <2>;
85735806d8SConor Dooley        interrupt-controller;
86735806d8SConor Dooley        #interrupt-cells = <1>;
87735806d8SConor Dooley        interrupts = <53>, <53>, <53>, <53>,
88735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
89735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
90735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
91735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
92735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
93735806d8SConor Dooley                     <53>, <53>, <53>, <53>,
94735806d8SConor Dooley                     <53>, <53>, <53>, <53>;
95735806d8SConor Dooley    };
96735806d8SConor Dooley...
97