xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/regulator/max8997-regulator.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Maxim MAX8997 Voltage and Current Regulator
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunThe Maxim MAX8997 is a multi-function device which includes voltage and
4*4882a593Smuzhiyuncurrent regulators, rtc, charger controller and other sub-blocks. It is
5*4882a593Smuzhiyuninterfaced to the host controller using a i2c interface. Each sub-block is
6*4882a593Smuzhiyunaddressed by the host system using different i2c slave address. This document
7*4882a593Smuzhiyundescribes the bindings for 'pmic' sub-block of max8997.
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunRequired properties:
10*4882a593Smuzhiyun- compatible: Should be "maxim,max8997-pmic".
11*4882a593Smuzhiyun- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun- max8997,pmic-buck1-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
14*4882a593Smuzhiyun  units for buck1 when changing voltage using gpio dvs. Refer to [1] below
15*4882a593Smuzhiyun  for additional information.
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun- max8997,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
18*4882a593Smuzhiyun  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
19*4882a593Smuzhiyun  for additional information.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun- max8997,pmic-buck5-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
22*4882a593Smuzhiyun  units for buck5 when changing voltage using gpio dvs. Refer to [1] below
23*4882a593Smuzhiyun  for additional information.
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun[1] If none of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
26*4882a593Smuzhiyun    property is specified, the 'max8997,pmic-buck[1/2/5]-dvs-voltage'
27*4882a593Smuzhiyun    property should specify atleast one voltage level (which would be a
28*4882a593Smuzhiyun    safe operating voltage).
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun    If either of the 'max8997,pmic-buck[1/2/5]-uses-gpio-dvs' optional
31*4882a593Smuzhiyun    property is specified, then all the eight voltage values for the
32*4882a593Smuzhiyun    'max8997,pmic-buck[1/2/5]-dvs-voltage' should be specified.
33*4882a593Smuzhiyun
34*4882a593SmuzhiyunOptional properties:
35*4882a593Smuzhiyun- interrupts: Interrupt specifiers for two interrupt sources.
36*4882a593Smuzhiyun  - First interrupt specifier is for 'irq1' interrupt.
37*4882a593Smuzhiyun  - Second interrupt specifier is for 'alert' interrupt.
38*4882a593Smuzhiyun- max8997,pmic-buck1-uses-gpio-dvs: 'buck1' can be controlled by gpio dvs.
39*4882a593Smuzhiyun- max8997,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
40*4882a593Smuzhiyun- max8997,pmic-buck5-uses-gpio-dvs: 'buck5' can be controlled by gpio dvs.
41*4882a593Smuzhiyun
42*4882a593SmuzhiyunAdditional properties required if either of the optional properties are used:
43*4882a593Smuzhiyun- max8997,pmic-ignore-gpiodvs-side-effect: When GPIO-DVS mode is used for
44*4882a593Smuzhiyun  multiple bucks, changing the voltage value of one of the bucks may affect
45*4882a593Smuzhiyun  that of another buck, which is the side effect of the change (set_voltage).
46*4882a593Smuzhiyun  Use this property to ignore such side effects and change the voltage.
47*4882a593Smuzhiyun
48*4882a593Smuzhiyun- max8997,pmic-buck125-default-dvs-idx: Default voltage setting selected from
49*4882a593Smuzhiyun  the possible 8 options selectable by the dvs gpios. The value of this
50*4882a593Smuzhiyun  property should be between 0 and 7. If not specified or if out of range, the
51*4882a593Smuzhiyun  default value of this property is set to 0.
52*4882a593Smuzhiyun
53*4882a593Smuzhiyun- max8997,pmic-buck125-dvs-gpios: GPIO specifiers for three host gpio's used
54*4882a593Smuzhiyun  for dvs. The format of the gpio specifier depends in the gpio controller.
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunRegulators: The regulators of max8997 that have to be instantiated should be
57*4882a593Smuzhiyunincluded in a sub-node named 'regulators'. Regulator nodes included in this
58*4882a593Smuzhiyunsub-node should be of the format as listed below.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun	regulator_name {
61*4882a593Smuzhiyun		standard regulator bindings here
62*4882a593Smuzhiyun	};
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunThe following are the names of the regulators that the max8997 pmic block
65*4882a593Smuzhiyunsupports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
66*4882a593Smuzhiyunas per the datasheet of max8997.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun	- LDOn
69*4882a593Smuzhiyun		  - valid values for n are 1 to 18 and 21
70*4882a593Smuzhiyun		  - Example: LDO0, LD01, LDO2, LDO21
71*4882a593Smuzhiyun	- BUCKn
72*4882a593Smuzhiyun		  - valid values for n are 1 to 7.
73*4882a593Smuzhiyun		  - Example: BUCK1, BUCK2, BUCK3, BUCK7
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun	- ENVICHG: Battery Charging Current Monitor Output. This is a fixed
76*4882a593Smuzhiyun		   voltage type regulator
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun	- ESAFEOUT1: (ldo19)
79*4882a593Smuzhiyun	- ESAFEOUT2: (ld020)
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun	- CHARGER_CV: main battery charger voltage control
82*4882a593Smuzhiyun	- CHARGER: main battery charger current control
83*4882a593Smuzhiyun	- CHARGER_TOPOFF: end of charge current threshold level
84*4882a593Smuzhiyun
85*4882a593SmuzhiyunThe bindings inside the regulator nodes use the standard regulator bindings
86*4882a593Smuzhiyunwhich are documented elsewhere.
87*4882a593Smuzhiyun
88*4882a593SmuzhiyunExample:
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun	max8997_pmic@66 {
91*4882a593Smuzhiyun		compatible = "maxim,max8997-pmic";
92*4882a593Smuzhiyun		interrupt-parent = <&wakeup_eint>;
93*4882a593Smuzhiyun		reg = <0x66>;
94*4882a593Smuzhiyun		interrupts = <4 0>, <3 0>;
95*4882a593Smuzhiyun
96*4882a593Smuzhiyun		max8997,pmic-buck1-uses-gpio-dvs;
97*4882a593Smuzhiyun		max8997,pmic-buck2-uses-gpio-dvs;
98*4882a593Smuzhiyun		max8997,pmic-buck5-uses-gpio-dvs;
99*4882a593Smuzhiyun
100*4882a593Smuzhiyun		max8997,pmic-ignore-gpiodvs-side-effect;
101*4882a593Smuzhiyun		max8997,pmic-buck125-default-dvs-idx = <0>;
102*4882a593Smuzhiyun
103*4882a593Smuzhiyun		max8997,pmic-buck125-dvs-gpios = <&gpx0 0 1 0 0>, /* SET1 */
104*4882a593Smuzhiyun						 <&gpx0 1 1 0 0>, /* SET2 */
105*4882a593Smuzhiyun						 <&gpx0 2 1 0 0>; /* SET3 */
106*4882a593Smuzhiyun
107*4882a593Smuzhiyun		max8997,pmic-buck1-dvs-voltage = <1350000>, <1300000>,
108*4882a593Smuzhiyun						 <1250000>, <1200000>,
109*4882a593Smuzhiyun						 <1150000>, <1100000>,
110*4882a593Smuzhiyun						 <1000000>, <950000>;
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun		max8997,pmic-buck2-dvs-voltage = <1100000>, <1100000>,
113*4882a593Smuzhiyun						 <1100000>, <1100000>,
114*4882a593Smuzhiyun						 <1000000>, <1000000>,
115*4882a593Smuzhiyun						 <1000000>, <1000000>;
116*4882a593Smuzhiyun
117*4882a593Smuzhiyun		max8997,pmic-buck5-dvs-voltage = <1200000>, <1200000>,
118*4882a593Smuzhiyun						 <1200000>, <1200000>,
119*4882a593Smuzhiyun						 <1200000>, <1200000>,
120*4882a593Smuzhiyun						 <1200000>, <1200000>;
121*4882a593Smuzhiyun
122*4882a593Smuzhiyun		regulators {
123*4882a593Smuzhiyun			ldo1_reg: LDO1 {
124*4882a593Smuzhiyun				regulator-name = "VDD_ABB_3.3V";
125*4882a593Smuzhiyun				regulator-min-microvolt = <3300000>;
126*4882a593Smuzhiyun				regulator-max-microvolt = <3300000>;
127*4882a593Smuzhiyun			};
128*4882a593Smuzhiyun
129*4882a593Smuzhiyun			ldo2_reg: LDO2 {
130*4882a593Smuzhiyun				regulator-name = "VDD_ALIVE_1.1V";
131*4882a593Smuzhiyun				regulator-min-microvolt = <1100000>;
132*4882a593Smuzhiyun				regulator-max-microvolt = <1100000>;
133*4882a593Smuzhiyun				regulator-always-on;
134*4882a593Smuzhiyun			};
135*4882a593Smuzhiyun
136*4882a593Smuzhiyun			buck1_reg: BUCK1 {
137*4882a593Smuzhiyun				regulator-name = "VDD_ARM_1.2V";
138*4882a593Smuzhiyun				regulator-min-microvolt = <950000>;
139*4882a593Smuzhiyun				regulator-max-microvolt = <1350000>;
140*4882a593Smuzhiyun				regulator-always-on;
141*4882a593Smuzhiyun				regulator-boot-on;
142*4882a593Smuzhiyun			};
143*4882a593Smuzhiyun		};
144*4882a593Smuzhiyun	};
145