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