1# SPDX-License-Identifier: GPL-2.0-only
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/maxim,max77843.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Maxim MAX77843 MicroUSB and Companion Power Management IC
8
9maintainers:
10  - Krzysztof Kozlowski <krzk@kernel.org>
11
12description: |
13  This is a part of device tree bindings for Maxim MAX77843 MicroUSB
14  Integrated Circuit (MUIC).
15
16  The Maxim MAX77843 is a MicroUSB and Companion Power Management IC which
17  includes voltage current regulators, charger, fuel-gauge, haptic motor driver
18  and MicroUSB management IC.
19
20properties:
21  compatible:
22    const: maxim,max77843
23
24  interrupts:
25    maxItems: 1
26
27  reg:
28    maxItems: 1
29
30  extcon:
31    $ref: /schemas/extcon/maxim,max77843.yaml
32
33  motor-driver:
34    type: object
35    properties:
36      compatible:
37        const: maxim,max77843-haptic
38
39      haptic-supply:
40        description: Power supply to the haptic motor
41
42      pwms:
43        maxItems: 1
44
45    required:
46      - compatible
47      - haptic-supply
48      - pwms
49
50  regulators:
51    $ref: /schemas/regulator/maxim,max77843.yaml
52
53required:
54  - compatible
55  - interrupts
56  - reg
57
58additionalProperties: false
59
60examples:
61  - |
62    #include <dt-bindings/interrupt-controller/irq.h>
63
64    i2c {
65        #address-cells = <1>;
66        #size-cells = <0>;
67
68        pmic@66 {
69            compatible = "maxim,max77843";
70            interrupt-parent = <&gpa1>;
71            interrupts = <5 IRQ_TYPE_EDGE_FALLING>;
72            reg = <0x66>;
73
74            extcon {
75                compatible = "maxim,max77843-muic";
76
77                connector {
78                    compatible = "samsung,usb-connector-11pin",
79                                 "usb-b-connector";
80                    label = "micro-USB";
81                    type = "micro";
82
83                    ports {
84                        #address-cells = <1>;
85                        #size-cells = <0>;
86
87                        port@0 {
88                            /*
89                             * TODO: The DTS this is based on does not have
90                             * port@0 which is a required property. The ports
91                             * look incomplete and need fixing.
92                             * Add a disabled port just to satisfy dtschema.
93                             */
94                            reg = <0>;
95                            status = "disabled";
96                        };
97
98                        port@3 {
99                            reg = <3>;
100                            endpoint {
101                                remote-endpoint = <&mhl_to_musb_con>;
102                            };
103                        };
104                    };
105                };
106
107                ports {
108                    port {
109                        endpoint {
110                            remote-endpoint = <&usb_to_muic>;
111                        };
112                    };
113                };
114            };
115
116            regulators {
117                compatible = "maxim,max77843-regulator";
118
119                SAFEOUT1 {
120                    regulator-name = "SAFEOUT1";
121                    regulator-min-microvolt = <3300000>;
122                    regulator-max-microvolt = <4950000>;
123                };
124
125                SAFEOUT2 {
126                    regulator-name = "SAFEOUT2";
127                    regulator-min-microvolt = <3300000>;
128                    regulator-max-microvolt = <4950000>;
129                };
130
131                CHARGER {
132                    regulator-name = "CHARGER";
133                    regulator-min-microamp = <100000>;
134                    regulator-max-microamp = <3150000>;
135                };
136            };
137
138            motor-driver {
139                compatible = "maxim,max77843-haptic";
140                haptic-supply = <&ldo38_reg>;
141                pwms = <&pwm 0 33670 0>;
142            };
143        };
144    };
145