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