Skip to content

Commit 80b022e

Browse files
batcheubroonie
authored andcommitted
regulator: max77693: Add max77693 regualtor driver.
This patch adds new regulator driver to support max77693 chip's regulators. max77693 has two linear voltage regulators and one current regulator which can be controlled through I2C bus. This driver also supports device tree. Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
1 parent 9e895ac commit 80b022e

6 files changed

Lines changed: 420 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Maxim MAX77693 multi-function device
2+
3+
MAX77693 is a Multifunction device with the following submodules:
4+
- PMIC,
5+
- CHARGER,
6+
- LED,
7+
- MUIC,
8+
- HAPTIC
9+
10+
It is interfaced to host controller using i2c.
11+
This document describes the bindings for the mfd device.
12+
13+
Required properties:
14+
- compatible : Must be "maxim,max77693".
15+
- reg : Specifies the i2c slave address of PMIC block.
16+
- interrupts : This i2c device has an IRQ line connected to the main SoC.
17+
- interrupt-parent : The parent interrupt controller.
18+
19+
Optional properties:
20+
- regulators : The regulators of max77693 have to be instantiated under subnod
21+
named "regulators" using the following format.
22+
23+
regulators {
24+
regualtor-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
25+
standard regulator constratints[*].
26+
};
27+
28+
[*] refer Documentation/devicetree/bindings/regulator/regulator.txt
29+
30+
Example:
31+
max77693@66 {
32+
compatible = "maxim,max77693";
33+
reg = <0x66>;
34+
interrupt-parent = <&gpx1>;
35+
interrupts = <5 2>;
36+
37+
regulators {
38+
esafeout@1 {
39+
regulator-compatible = "ESAFEOUT1";
40+
regulator-name = "ESAFEOUT1";
41+
regulator-boot-on;
42+
};
43+
esafeout@2 {
44+
regulator-compatible = "ESAFEOUT2";
45+
regulator-name = "ESAFEOUT2";
46+
};
47+
charger@0 {
48+
regulator-compatible = "CHARGER";
49+
regulator-name = "CHARGER";
50+
regulator-min-microamp = <60000>;
51+
regulator-max-microamp = <2580000>;
52+
regulator-boot-on;
53+
};
54+
};
55+
};

‎drivers/regulator/Kconfig‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,15 @@ config REGULATOR_MAX77686
250250
via I2C bus. The provided regulator is suitable for
251251
Exynos-4 chips to control VARM and VINT voltages.
252252

253+
config REGULATOR_MAX77693
254+
tristate "Maxim MAX77693 regulator"
255+
depends on MFD_MAX77693
256+
help
257+
This driver controls a Maxim 77693 regulator via I2C bus.
258+
The regulators include two LDOs, 'SAFEOUT1', 'SAFEOUT2'
259+
and one current regulator 'CHARGER'. This is suitable for
260+
Exynos-4x12 chips.
261+
253262
config REGULATOR_PCAP
254263
tristate "Motorola PCAP2 regulator driver"
255264
depends on EZX_PCAP

‎drivers/regulator/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ obj-$(CONFIG_REGULATOR_MAX8973) += max8973-regulator.o
4141
obj-$(CONFIG_REGULATOR_MAX8997) += max8997.o
4242
obj-$(CONFIG_REGULATOR_MAX8998) += max8998.o
4343
obj-$(CONFIG_REGULATOR_MAX77686) += max77686.o
44+
obj-$(CONFIG_REGULATOR_MAX77693) += max77693.o
4445
obj-$(CONFIG_REGULATOR_MC13783) += mc13783-regulator.o
4546
obj-$(CONFIG_REGULATOR_MC13892) += mc13892-regulator.o
4647
obj-$(CONFIG_REGULATOR_MC13XXX_CORE) += mc13xxx-regulator-core.o

0 commit comments

Comments
 (0)