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