xref: /freebsd-src/sys/contrib/device-tree/Bindings/gpio/microchip,mpfs-gpio.yaml (revision b2d2a78ad80ec68d4a17f5aef97d21686cb1e29b)
1c9ccf3a3SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2c9ccf3a3SEmmanuel Vadot%YAML 1.2
3c9ccf3a3SEmmanuel Vadot---
4c9ccf3a3SEmmanuel Vadot$id: http://devicetree.org/schemas/gpio/microchip,mpfs-gpio.yaml#
5c9ccf3a3SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c9ccf3a3SEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: Microchip MPFS GPIO Controller
8c9ccf3a3SEmmanuel Vadot
9c9ccf3a3SEmmanuel Vadotmaintainers:
10c9ccf3a3SEmmanuel Vadot  - Conor Dooley <conor.dooley@microchip.com>
11c9ccf3a3SEmmanuel Vadot
12c9ccf3a3SEmmanuel Vadotproperties:
13c9ccf3a3SEmmanuel Vadot  compatible:
14c9ccf3a3SEmmanuel Vadot    items:
15c9ccf3a3SEmmanuel Vadot      - enum:
16c9ccf3a3SEmmanuel Vadot          - microchip,mpfs-gpio
17*7d0873ebSEmmanuel Vadot          - microchip,coregpio-rtl-v3
18c9ccf3a3SEmmanuel Vadot
19c9ccf3a3SEmmanuel Vadot  reg:
20c9ccf3a3SEmmanuel Vadot    maxItems: 1
21c9ccf3a3SEmmanuel Vadot
22c9ccf3a3SEmmanuel Vadot  interrupts:
23c9ccf3a3SEmmanuel Vadot    description:
24c9ccf3a3SEmmanuel Vadot      Interrupt mapping, one per GPIO. Maximum 32 GPIOs.
25c9ccf3a3SEmmanuel Vadot    minItems: 1
26c9ccf3a3SEmmanuel Vadot    maxItems: 32
27c9ccf3a3SEmmanuel Vadot
28c9ccf3a3SEmmanuel Vadot  interrupt-controller: true
29c9ccf3a3SEmmanuel Vadot
30c9ccf3a3SEmmanuel Vadot  clocks:
31c9ccf3a3SEmmanuel Vadot    maxItems: 1
32c9ccf3a3SEmmanuel Vadot
33c9ccf3a3SEmmanuel Vadot  "#gpio-cells":
34c9ccf3a3SEmmanuel Vadot    const: 2
35c9ccf3a3SEmmanuel Vadot
36c9ccf3a3SEmmanuel Vadot  "#interrupt-cells":
37c9ccf3a3SEmmanuel Vadot    const: 1
38c9ccf3a3SEmmanuel Vadot
39c9ccf3a3SEmmanuel Vadot  ngpios:
40c9ccf3a3SEmmanuel Vadot    description:
41c9ccf3a3SEmmanuel Vadot      The number of GPIOs available.
42c9ccf3a3SEmmanuel Vadot    minimum: 1
43c9ccf3a3SEmmanuel Vadot    maximum: 32
44c9ccf3a3SEmmanuel Vadot    default: 32
45c9ccf3a3SEmmanuel Vadot
46c9ccf3a3SEmmanuel Vadot  gpio-controller: true
47*7d0873ebSEmmanuel Vadot  gpio-line-names: true
48c9ccf3a3SEmmanuel Vadot
497ef62cebSEmmanuel VadotpatternProperties:
507ef62cebSEmmanuel Vadot  "^.+-hog(-[0-9]+)?$":
517ef62cebSEmmanuel Vadot    type: object
527ef62cebSEmmanuel Vadot    required:
537ef62cebSEmmanuel Vadot      - gpio-hog
547ef62cebSEmmanuel Vadot
55*7d0873ebSEmmanuel VadotallOf:
56*7d0873ebSEmmanuel Vadot  - if:
57*7d0873ebSEmmanuel Vadot      properties:
58*7d0873ebSEmmanuel Vadot        compatible:
59*7d0873ebSEmmanuel Vadot          contains:
60*7d0873ebSEmmanuel Vadot            const: microchip,mpfs-gpio
61*7d0873ebSEmmanuel Vadot    then:
62c9ccf3a3SEmmanuel Vadot      required:
63c9ccf3a3SEmmanuel Vadot        - interrupts
64c9ccf3a3SEmmanuel Vadot        - "#interrupt-cells"
65c9ccf3a3SEmmanuel Vadot        - interrupt-controller
66*7d0873ebSEmmanuel Vadot
67*7d0873ebSEmmanuel Vadotrequired:
68*7d0873ebSEmmanuel Vadot  - compatible
69*7d0873ebSEmmanuel Vadot  - reg
70c9ccf3a3SEmmanuel Vadot  - "#gpio-cells"
71c9ccf3a3SEmmanuel Vadot  - gpio-controller
72c9ccf3a3SEmmanuel Vadot  - clocks
73c9ccf3a3SEmmanuel Vadot
74c9ccf3a3SEmmanuel VadotadditionalProperties: false
75c9ccf3a3SEmmanuel Vadot
76c9ccf3a3SEmmanuel Vadotexamples:
77c9ccf3a3SEmmanuel Vadot  - |
78c9ccf3a3SEmmanuel Vadot    gpio@20122000 {
79c9ccf3a3SEmmanuel Vadot        compatible = "microchip,mpfs-gpio";
80c9ccf3a3SEmmanuel Vadot        reg = <0x20122000 0x1000>;
81c9ccf3a3SEmmanuel Vadot        clocks = <&clkcfg 25>;
82c9ccf3a3SEmmanuel Vadot        interrupt-parent = <&plic>;
83c9ccf3a3SEmmanuel Vadot        gpio-controller;
84c9ccf3a3SEmmanuel Vadot        #gpio-cells = <2>;
85c9ccf3a3SEmmanuel Vadot        interrupt-controller;
86c9ccf3a3SEmmanuel Vadot        #interrupt-cells = <1>;
87c9ccf3a3SEmmanuel Vadot        interrupts = <53>, <53>, <53>, <53>,
88c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
89c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
90c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
91c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
92c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
93c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>,
94c9ccf3a3SEmmanuel Vadot                     <53>, <53>, <53>, <53>;
95c9ccf3a3SEmmanuel Vadot    };
96c9ccf3a3SEmmanuel Vadot...
97