| 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 |
|
| 7 |
title: Maxim MAX77705 Companion Power Management and USB Type-C interface |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Dzmitry Sankouski <[email protected]> |
| 11 |
|
| 12 |
description: | |
| 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 |
|
| 19 |
properties: |
| 20 |
compatible: |
| 21 |
const: maxim,max77705 |
| 22 |
|
| 23 |
reg: |
| 24 |
maxItems: 1 |
| 25 |
|
| 26 |
interrupts: |
| 27 |
maxItems: 1 |
| 28 |
|
| 29 |
interrupt-controller: |
| 30 |
description: |
| 31 |
The driver implements an interrupt controller for the sub devices. |
| 32 |
The interrupt number mapping is as follows |
| 33 |
0 - charger |
| 34 |
1 - topsys |
| 35 |
2 - fuelgauge |
| 36 |
3 - usb type-c management block. |
| 37 |
|
| 38 |
'#interrupt-cells': |
| 39 |
const: 1 |
| 40 |
|
| 41 |
haptic: |
| 42 |
type: object |
| 43 |
additionalProperties: false |
| 44 |
|
| 45 |
properties: |
| 46 |
compatible: |
| 47 |
const: maxim,max77705-haptic |
| 48 |
|
| 49 |
haptic-supply: true |
| 50 |
|
| 51 |
pwms: |
| 52 |
maxItems: 1 |
| 53 |
|
| 54 |
required: |
| 55 |
- compatible |
| 56 |
- haptic-supply |
| 57 |
- pwms |
| 58 |
|
| 59 |
leds: |
| 60 |
type: object |
| 61 |
additionalProperties: false |
| 62 |
description: |
| 63 |
Up to 4 LED channels supported. |
| 64 |
|
| 65 |
properties: |
| 66 |
compatible: |
| 67 |
const: maxim,max77705-rgb |
| 68 |
|
| 69 |
"#address-cells": |
| 70 |
const: 1 |
| 71 |
|
| 72 |
"#size-cells": |
| 73 |
const: 0 |
| 74 |
|
| 75 |
multi-led: |
| 76 |
type: object |
| 77 |
$ref: /schemas/leds/leds-class-multicolor.yaml# |
| 78 |
unevaluatedProperties: false |
| 79 |
|
| 80 |
properties: |
| 81 |
"#address-cells": |
| 82 |
const: 1 |
| 83 |
|
| 84 |
"#size-cells": |
| 85 |
const: 0 |
| 86 |
|
| 87 |
patternProperties: |
| 88 |
"^led@[0-3]$": |
| 89 |
type: object |
| 90 |
$ref: /schemas/leds/common.yaml# |
| 91 |
unevaluatedProperties: false |
| 92 |
|
| 93 |
properties: |
| 94 |
reg: |
| 95 |
maxItems: 1 |
| 96 |
|
| 97 |
required: |
| 98 |
- reg |
| 99 |
|
| 100 |
patternProperties: |
| 101 |
"^led@[0-3]$": |
| 102 |
type: object |
| 103 |
$ref: /schemas/leds/common.yaml# |
| 104 |
unevaluatedProperties: false |
| 105 |
|
| 106 |
properties: |
| 107 |
reg: |
| 108 |
maxItems: 1 |
| 109 |
|
| 110 |
required: |
| 111 |
- reg |
| 112 |
|
| 113 |
required: |
| 114 |
- compatible |
| 115 |
|
| 116 |
required: |
| 117 |
- compatible |
| 118 |
|
| 119 |
additionalProperties: false |
| 120 |
|
| 121 |
examples: |
| 122 |
- | |
| 123 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 124 |
#include <dt-bindings/leds/common.h> |
| 125 |
|
| 126 |
i2c { |
| 127 |
#address-cells = <1>; |
| 128 |
#size-cells = <0>; |
| 129 |
|
| 130 |
pmic@66 { |
| 131 |
compatible = "maxim,max77705"; |
| 132 |
reg = <0x66>; |
| 133 |
#interrupt-cells = <1>; |
| 134 |
interrupt-parent = <&pm8998_gpios>; |
| 135 |
interrupts = <11 IRQ_TYPE_LEVEL_LOW>; |
| 136 |
interrupt-controller; |
| 137 |
pinctrl-0 = <&chg_int_default>; |
| 138 |
pinctrl-names = "default"; |
| 139 |
|
| 140 |
leds { |
| 141 |
compatible = "maxim,max77705-rgb"; |
| 142 |
|
| 143 |
multi-led { |
| 144 |
color = <LED_COLOR_ID_RGB>; |
| 145 |
function = LED_FUNCTION_STATUS; |
| 146 |
#address-cells = <1>; |
| 147 |
#size-cells = <0>; |
| 148 |
|
| 149 |
led@1 { |
| 150 |
reg = <1>; |
| 151 |
color = <LED_COLOR_ID_RED>; |
| 152 |
}; |
| 153 |
|
| 154 |
led@2 { |
| 155 |
reg = <2>; |
| 156 |
color = <LED_COLOR_ID_GREEN>; |
| 157 |
}; |
| 158 |
|
| 159 |
led@3 { |
| 160 |
reg = <3>; |
| 161 |
color = <LED_COLOR_ID_BLUE>; |
| 162 |
}; |
| 163 |
}; |
| 164 |
}; |
| 165 |
|
| 166 |
haptic { |
| 167 |
compatible = "maxim,max77705-haptic"; |
| 168 |
haptic-supply = <&vib_regulator>; |
| 169 |
pwms = <&vib_pwm 0 50000>; |
| 170 |
}; |
| 171 |
}; |
| 172 |
}; |