xref: /linux/Documentation/devicetree/bindings/mfd/airoha,en7581-gpio-sysctl.yaml (revision 2d32fba02e0e5b67fb3a4ea51dde80c0db83f1c1)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/airoha,en7581-gpio-sysctl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Airoha EN7581 GPIO System Controller
8
9maintainers:
10  - Christian Marangi <ansuelsmth@gmail.com>
11  - Lorenzo Bianconi <lorenzo@kernel.org>
12
13description:
14  Airoha EN7581 SoC GPIO system controller which provided a register map
15  for controlling the GPIO, pins and PWM of the SoC.
16
17properties:
18  compatible:
19    items:
20      - const: airoha,en7581-gpio-sysctl
21      - const: syscon
22      - const: simple-mfd
23
24  reg:
25    maxItems: 1
26
27  pinctrl:
28    type: object
29    $ref: /schemas/pinctrl/airoha,en7581-pinctrl.yaml
30    description:
31      Child node definition for EN7581 Pin controller
32
33  pwm:
34    type: object
35    $ref: /schemas/pwm/airoha,en7581-pwm.yaml
36    description:
37      Child node definition for EN7581 PWM controller
38
39required:
40  - compatible
41  - reg
42
43additionalProperties: false
44
45examples:
46  - |
47    #include <dt-bindings/interrupt-controller/arm-gic.h>
48
49    system-controller@1fbf0200 {
50      compatible = "airoha,en7581-gpio-sysctl", "syscon", "simple-mfd";
51      reg = <0x1fbf0200 0xc0>;
52
53      pinctrl {
54        compatible = "airoha,en7581-pinctrl";
55
56        interrupt-parent = <&gic>;
57        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
58
59        gpio-controller;
60        #gpio-cells = <2>;
61
62        interrupt-controller;
63        #interrupt-cells = <2>;
64
65        mmc-pins {
66          mux {
67            function = "emmc";
68            groups = "emmc";
69          };
70        };
71
72        mdio-pins {
73          mux {
74            function = "mdio";
75            groups = "mdio";
76          };
77
78          conf {
79            pins = "gpio2";
80            output-enable;
81          };
82        };
83      };
84
85      pwm {
86        compatible = "airoha,en7581-pwm";
87
88        #pwm-cells = <3>;
89      };
90    };
91