xref: /freebsd/sys/contrib/device-tree/Bindings/mfd/maxim,max77705.yaml (revision 8ccc0d235c226d84112561d453c49904398d085c)
1*8ccc0d23SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*8ccc0d23SEmmanuel Vadot%YAML 1.2
3*8ccc0d23SEmmanuel Vadot---
4*8ccc0d23SEmmanuel Vadot$id: http://devicetree.org/schemas/mfd/maxim,max77705.yaml#
5*8ccc0d23SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8ccc0d23SEmmanuel Vadot
7*8ccc0d23SEmmanuel Vadottitle: Maxim MAX77705 Companion Power Management and USB Type-C interface
8*8ccc0d23SEmmanuel Vadot
9*8ccc0d23SEmmanuel Vadotmaintainers:
10*8ccc0d23SEmmanuel Vadot  - Dzmitry Sankouski <dsankouski@gmail.com>
11*8ccc0d23SEmmanuel Vadot
12*8ccc0d23SEmmanuel Vadotdescription: |
13*8ccc0d23SEmmanuel Vadot  This is a part of device tree bindings for Maxim MAX77705.
14*8ccc0d23SEmmanuel Vadot
15*8ccc0d23SEmmanuel Vadot  Maxim MAX77705 is a Companion Power Management and Type-C
16*8ccc0d23SEmmanuel Vadot  interface IC which includes charger, fuelgauge, LED, haptic motor driver and
17*8ccc0d23SEmmanuel Vadot  Type-C management.
18*8ccc0d23SEmmanuel Vadot
19*8ccc0d23SEmmanuel Vadotproperties:
20*8ccc0d23SEmmanuel Vadot  compatible:
21*8ccc0d23SEmmanuel Vadot    const: maxim,max77705
22*8ccc0d23SEmmanuel Vadot
23*8ccc0d23SEmmanuel Vadot  reg:
24*8ccc0d23SEmmanuel Vadot    maxItems: 1
25*8ccc0d23SEmmanuel Vadot
26*8ccc0d23SEmmanuel Vadot  interrupts:
27*8ccc0d23SEmmanuel Vadot    maxItems: 1
28*8ccc0d23SEmmanuel Vadot
29*8ccc0d23SEmmanuel Vadot  haptic:
30*8ccc0d23SEmmanuel Vadot    type: object
31*8ccc0d23SEmmanuel Vadot    additionalProperties: false
32*8ccc0d23SEmmanuel Vadot
33*8ccc0d23SEmmanuel Vadot    properties:
34*8ccc0d23SEmmanuel Vadot      compatible:
35*8ccc0d23SEmmanuel Vadot        const: maxim,max77705-haptic
36*8ccc0d23SEmmanuel Vadot
37*8ccc0d23SEmmanuel Vadot      haptic-supply: true
38*8ccc0d23SEmmanuel Vadot
39*8ccc0d23SEmmanuel Vadot      pwms:
40*8ccc0d23SEmmanuel Vadot        maxItems: 1
41*8ccc0d23SEmmanuel Vadot
42*8ccc0d23SEmmanuel Vadot    required:
43*8ccc0d23SEmmanuel Vadot      - compatible
44*8ccc0d23SEmmanuel Vadot      - haptic-supply
45*8ccc0d23SEmmanuel Vadot      - pwms
46*8ccc0d23SEmmanuel Vadot
47*8ccc0d23SEmmanuel Vadot  leds:
48*8ccc0d23SEmmanuel Vadot    type: object
49*8ccc0d23SEmmanuel Vadot    additionalProperties: false
50*8ccc0d23SEmmanuel Vadot    description:
51*8ccc0d23SEmmanuel Vadot      Up to 4 LED channels supported.
52*8ccc0d23SEmmanuel Vadot
53*8ccc0d23SEmmanuel Vadot    properties:
54*8ccc0d23SEmmanuel Vadot      compatible:
55*8ccc0d23SEmmanuel Vadot        const: maxim,max77705-rgb
56*8ccc0d23SEmmanuel Vadot
57*8ccc0d23SEmmanuel Vadot      "#address-cells":
58*8ccc0d23SEmmanuel Vadot        const: 1
59*8ccc0d23SEmmanuel Vadot
60*8ccc0d23SEmmanuel Vadot      "#size-cells":
61*8ccc0d23SEmmanuel Vadot        const: 0
62*8ccc0d23SEmmanuel Vadot
63*8ccc0d23SEmmanuel Vadot      multi-led:
64*8ccc0d23SEmmanuel Vadot        type: object
65*8ccc0d23SEmmanuel Vadot        $ref: /schemas/leds/leds-class-multicolor.yaml#
66*8ccc0d23SEmmanuel Vadot        unevaluatedProperties: false
67*8ccc0d23SEmmanuel Vadot
68*8ccc0d23SEmmanuel Vadot        properties:
69*8ccc0d23SEmmanuel Vadot          "#address-cells":
70*8ccc0d23SEmmanuel Vadot            const: 1
71*8ccc0d23SEmmanuel Vadot
72*8ccc0d23SEmmanuel Vadot          "#size-cells":
73*8ccc0d23SEmmanuel Vadot            const: 0
74*8ccc0d23SEmmanuel Vadot
75*8ccc0d23SEmmanuel Vadot        patternProperties:
76*8ccc0d23SEmmanuel Vadot          "^led@[0-3]$":
77*8ccc0d23SEmmanuel Vadot            type: object
78*8ccc0d23SEmmanuel Vadot            $ref: /schemas/leds/common.yaml#
79*8ccc0d23SEmmanuel Vadot            unevaluatedProperties: false
80*8ccc0d23SEmmanuel Vadot
81*8ccc0d23SEmmanuel Vadot            properties:
82*8ccc0d23SEmmanuel Vadot              reg:
83*8ccc0d23SEmmanuel Vadot                maxItems: 1
84*8ccc0d23SEmmanuel Vadot
85*8ccc0d23SEmmanuel Vadot            required:
86*8ccc0d23SEmmanuel Vadot              - reg
87*8ccc0d23SEmmanuel Vadot
88*8ccc0d23SEmmanuel Vadot    patternProperties:
89*8ccc0d23SEmmanuel Vadot      "^led@[0-3]$":
90*8ccc0d23SEmmanuel Vadot        type: object
91*8ccc0d23SEmmanuel Vadot        $ref: /schemas/leds/common.yaml#
92*8ccc0d23SEmmanuel Vadot        unevaluatedProperties: false
93*8ccc0d23SEmmanuel Vadot
94*8ccc0d23SEmmanuel Vadot        properties:
95*8ccc0d23SEmmanuel Vadot          reg:
96*8ccc0d23SEmmanuel Vadot            maxItems: 1
97*8ccc0d23SEmmanuel Vadot
98*8ccc0d23SEmmanuel Vadot        required:
99*8ccc0d23SEmmanuel Vadot          - reg
100*8ccc0d23SEmmanuel Vadot
101*8ccc0d23SEmmanuel Vadot    required:
102*8ccc0d23SEmmanuel Vadot      - compatible
103*8ccc0d23SEmmanuel Vadot
104*8ccc0d23SEmmanuel Vadotrequired:
105*8ccc0d23SEmmanuel Vadot  - compatible
106*8ccc0d23SEmmanuel Vadot
107*8ccc0d23SEmmanuel VadotadditionalProperties: false
108*8ccc0d23SEmmanuel Vadot
109*8ccc0d23SEmmanuel Vadotexamples:
110*8ccc0d23SEmmanuel Vadot  - |
111*8ccc0d23SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
112*8ccc0d23SEmmanuel Vadot    #include <dt-bindings/leds/common.h>
113*8ccc0d23SEmmanuel Vadot
114*8ccc0d23SEmmanuel Vadot    i2c {
115*8ccc0d23SEmmanuel Vadot        #address-cells = <1>;
116*8ccc0d23SEmmanuel Vadot        #size-cells = <0>;
117*8ccc0d23SEmmanuel Vadot
118*8ccc0d23SEmmanuel Vadot        pmic@66 {
119*8ccc0d23SEmmanuel Vadot            compatible = "maxim,max77705";
120*8ccc0d23SEmmanuel Vadot            reg = <0x66>;
121*8ccc0d23SEmmanuel Vadot            interrupt-parent = <&pm8998_gpios>;
122*8ccc0d23SEmmanuel Vadot            interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
123*8ccc0d23SEmmanuel Vadot            pinctrl-0 = <&chg_int_default>;
124*8ccc0d23SEmmanuel Vadot            pinctrl-names = "default";
125*8ccc0d23SEmmanuel Vadot
126*8ccc0d23SEmmanuel Vadot            leds {
127*8ccc0d23SEmmanuel Vadot                compatible = "maxim,max77705-rgb";
128*8ccc0d23SEmmanuel Vadot
129*8ccc0d23SEmmanuel Vadot                multi-led {
130*8ccc0d23SEmmanuel Vadot                    color = <LED_COLOR_ID_RGB>;
131*8ccc0d23SEmmanuel Vadot                    function = LED_FUNCTION_STATUS;
132*8ccc0d23SEmmanuel Vadot                    #address-cells = <1>;
133*8ccc0d23SEmmanuel Vadot                    #size-cells = <0>;
134*8ccc0d23SEmmanuel Vadot
135*8ccc0d23SEmmanuel Vadot                    led@1 {
136*8ccc0d23SEmmanuel Vadot                        reg = <1>;
137*8ccc0d23SEmmanuel Vadot                        color = <LED_COLOR_ID_RED>;
138*8ccc0d23SEmmanuel Vadot                    };
139*8ccc0d23SEmmanuel Vadot
140*8ccc0d23SEmmanuel Vadot                    led@2 {
141*8ccc0d23SEmmanuel Vadot                        reg = <2>;
142*8ccc0d23SEmmanuel Vadot                        color = <LED_COLOR_ID_GREEN>;
143*8ccc0d23SEmmanuel Vadot                    };
144*8ccc0d23SEmmanuel Vadot
145*8ccc0d23SEmmanuel Vadot                    led@3 {
146*8ccc0d23SEmmanuel Vadot                        reg = <3>;
147*8ccc0d23SEmmanuel Vadot                        color = <LED_COLOR_ID_BLUE>;
148*8ccc0d23SEmmanuel Vadot                    };
149*8ccc0d23SEmmanuel Vadot                };
150*8ccc0d23SEmmanuel Vadot            };
151*8ccc0d23SEmmanuel Vadot
152*8ccc0d23SEmmanuel Vadot            haptic {
153*8ccc0d23SEmmanuel Vadot                compatible = "maxim,max77705-haptic";
154*8ccc0d23SEmmanuel Vadot                haptic-supply = <&vib_regulator>;
155*8ccc0d23SEmmanuel Vadot                pwms = <&vib_pwm 0 50000>;
156*8ccc0d23SEmmanuel Vadot            };
157*8ccc0d23SEmmanuel Vadot        };
158*8ccc0d23SEmmanuel Vadot    };
159