Skip to content

Commit 8909ff6

Browse files
committed
Merge tag 'regulator-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "A fairly quiet release for the regulator API, the bulk of the changes being lots of small cleanups and API updates contributed by Axel Lin with just a small set of larger changes: - New driver for LP8755 - DT support for S5M8767, TPS51632, TPS6507x and TPS65090 - Support for writing a "commit changes" bit in the regmap helper functions." * tag 'regulator-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (60 commits) regulator: Fix memory garbage dev_err printout. regulator: max77686: Reuse rdev_get_id() function. regulator: tps51632: Use regulator_[get|set]_voltage_sel_regmap regulator: as3711: Fix checking if no platform initialization data regulator: s5m8767: Prevent possible NULL pointer dereference regulator: s5m8767: Fix dev argument for devm_kzalloc and of_get_regulator_init_data regulator: core: Optimize _regulator_do_set_voltage if voltage does not change regulator: max8998: Let regulator core handle the case selector == old_selector regulator: s5m8767: Use of_get_child_count() regulator: anatop: improve precision of delay time regulator: show state for GPIO-controlled regulators regulator: s5m8767: Fix build in non-DT case regulator: add device tree support for s5m8767 regulator: palmas: Remove a redundant setting for warm_reset regulator: mc13xxx: Use of_get_child_count() regulator: max8997: Use of_get_child_count() regulator: tps65090: Fix using wrong dev argument for calling of_regulator_match regulators: anatop: add set_voltage_time_sel interface regulator: Add missing of_node_put() regulator: tps6507x: Fix using wrong dev argument for calling of_regulator_match ...
2 parents 88cff24 + 2730fd8 commit 8909ff6

41 files changed

Lines changed: 1923 additions & 569 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
TPS6507x Power Management Integrated Circuit
2+
3+
Required properties:
4+
- compatible: "ti,tps6507x"
5+
- reg: I2C slave address
6+
- regulators: This is the list of child nodes that specify the regulator
7+
initialization data for defined regulators. Not all regulators for the
8+
given device need to be present. The definition for each of these nodes
9+
is defined using the standard binding for regulators found at
10+
Documentation/devicetree/bindings/regulator/regulator.txt.
11+
The regulator is matched with the regulator-compatible.
12+
13+
The valid regulator-compatible values are:
14+
tps6507x: vdcdc1, vdcdc2, vdcdc3, vldo1, vldo2
15+
- xxx-supply: Input voltage supply regulator.
16+
These entries are required if regulators are enabled for a device.
17+
Missing of these properties can cause the regulator registration
18+
fails.
19+
If some of input supply is powered through battery or always-on
20+
supply then also it is require to have these parameters with proper
21+
node handle of always on power supply.
22+
tps6507x:
23+
vindcdc1_2-supply: VDCDC1 and VDCDC2 input.
24+
vindcdc3-supply : VDCDC3 input.
25+
vldo1_2-supply : VLDO1 and VLDO2 input.
26+
27+
Regulator Optional properties:
28+
- defdcdc_default: It's property of DCDC2 and DCDC3 regulators.
29+
0: If defdcdc pin of DCDC2/DCDC3 is pulled to GND.
30+
1: If defdcdc pin of DCDC2/DCDC3 is driven HIGH.
31+
If this property is not defined, it defaults to 0 (not enabled).
32+
33+
Example:
34+
35+
pmu: tps6507x@48 {
36+
compatible = "ti,tps6507x";
37+
reg = <0x48>;
38+
39+
vindcdc1_2-supply = <&vbat>;
40+
vindcdc3-supply = <...>;
41+
vinldo1_2-supply = <...>;
42+
43+
regulators {
44+
#address-cells = <1>;
45+
#size-cells = <0>;
46+
47+
vdcdc1_reg: regulator@0 {
48+
regulator-compatible = "VDCDC1";
49+
reg = <0>;
50+
regulator-min-microvolt = <3150000>;
51+
regulator-max-microvolt = <3450000>;
52+
regulator-always-on;
53+
regulator-boot-on;
54+
};
55+
vdcdc2_reg: regulator@1 {
56+
regulator-compatible = "VDCDC2";
57+
reg = <1>;
58+
regulator-min-microvolt = <1710000>;
59+
regulator-max-microvolt = <3450000>;
60+
regulator-always-on;
61+
regulator-boot-on;
62+
defdcdc_default = <1>;
63+
};
64+
vdcdc3_reg: regulator@2 {
65+
regulator-compatible = "VDCDC3";
66+
reg = <2>;
67+
regulator-min-microvolt = <950000>
68+
regulator-max-microvolt = <1350000>;
69+
regulator-always-on;
70+
regulator-boot-on;
71+
defdcdc_default = <1>;
72+
};
73+
ldo1_reg: regulator@3 {
74+
regulator-compatible = "LDO1";
75+
reg = <3>;
76+
regulator-min-microvolt = <1710000>;
77+
regulator-max-microvolt = <1890000>;
78+
regulator-always-on;
79+
regulator-boot-on;
80+
};
81+
ldo2_reg: regulator@4 {
82+
regulator-compatible = "LDO2";
83+
reg = <4>;
84+
regulator-min-microvolt = <1140000>;
85+
regulator-max-microvolt = <1320000>;
86+
regulator-always-on;
87+
regulator-boot-on;
88+
};
89+
};
90+
91+
};

‎Documentation/devicetree/bindings/regulator/anatop-regulator.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Required properties:
99
- anatop-min-voltage: Minimum voltage of this regulator
1010
- anatop-max-voltage: Maximum voltage of this regulator
1111

12+
Optional properties:
13+
- anatop-delay-reg-offset: Anatop MFD step time register offset
14+
- anatop-delay-bit-shift: Bit shift for the step time register
15+
- anatop-delay-bit-width: Number of bits used in the step time register
16+
1217
Any property defined as part of the core regulator
1318
binding, defined in regulator.txt, can also be used.
1419

@@ -23,6 +28,9 @@ Example:
2328
anatop-reg-offset = <0x140>;
2429
anatop-vol-bit-shift = <9>;
2530
anatop-vol-bit-width = <5>;
31+
anatop-delay-reg-offset = <0x170>;
32+
anatop-delay-bit-shift = <24>;
33+
anatop-delay-bit-width = <2>;
2634
anatop-min-bit-val = <1>;
2735
anatop-min-voltage = <725000>;
2836
anatop-max-voltage = <1300000>;
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
* Samsung S5M8767 Voltage and Current Regulator
2+
3+
The Samsung S5M8767 is a multi-function device which includes volatage and
4+
current regulators, rtc, charger controller and other sub-blocks. It is
5+
interfaced to the host controller using a i2c interface. Each sub-block is
6+
addressed by the host system using different i2c slave address. This document
7+
describes the bindings for 'pmic' sub-block of s5m8767.
8+
9+
Required properties:
10+
- compatible: Should be "samsung,s5m8767-pmic".
11+
- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
12+
13+
- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
14+
units for buck2 when changing voltage using gpio dvs. Refer to [1] below
15+
for additional information.
16+
17+
- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
18+
units for buck3 when changing voltage using gpio dvs. Refer to [1] below
19+
for additional information.
20+
21+
- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
22+
units for buck4 when changing voltage using gpio dvs. Refer to [1] below
23+
for additional information.
24+
25+
- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
26+
for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
27+
28+
[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
29+
property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
30+
property should specify atleast one voltage level (which would be a
31+
safe operating voltage).
32+
33+
If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
34+
property is specified, then all the eight voltage values for the
35+
's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
36+
37+
Optional properties:
38+
- interrupt-parent: Specifies the phandle of the interrupt controller to which
39+
the interrupts from s5m8767 are delivered to.
40+
- interrupts: Interrupt specifiers for two interrupt sources.
41+
- First interrupt specifier is for 'irq1' interrupt.
42+
- Second interrupt specifier is for 'alert' interrupt.
43+
- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
44+
- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
45+
- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
46+
47+
Additional properties required if either of the optional properties are used:
48+
49+
- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
50+
the possible 8 options selectable by the dvs gpios. The value of this
51+
property should be between 0 and 7. If not specified or if out of range, the
52+
default value of this property is set to 0.
53+
54+
- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
55+
for dvs. The format of the gpio specifier depends in the gpio controller.
56+
57+
Regulators: The regulators of s5m8767 that have to be instantiated should be
58+
included in a sub-node named 'regulators'. Regulator nodes included in this
59+
sub-node should be of the format as listed below.
60+
61+
regulator_name {
62+
ldo1_reg: LDO1 {
63+
regulator-name = "VDD_ALIVE_1.0V";
64+
regulator-min-microvolt = <1100000>;
65+
regulator-max-microvolt = <1100000>;
66+
regulator-always-on;
67+
regulator-boot-on;
68+
op_mode = <1>; /* Normal Mode */
69+
};
70+
};
71+
The above regulator entries are defined in regulator bindings documentation
72+
except op_mode description.
73+
- op_mode: describes the different operating modes of the LDO's with
74+
power mode change in SOC. The different possible values are,
75+
0 - always off mode
76+
1 - on in normal mode
77+
2 - low power mode
78+
3 - suspend mode
79+
80+
The following are the names of the regulators that the s5m8767 pmic block
81+
supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
82+
as per the datasheet of s5m8767.
83+
84+
- LDOn
85+
- valid values for n are 1 to 28
86+
- Example: LDO0, LD01, LDO28
87+
- BUCKn
88+
- valid values for n are 1 to 9.
89+
- Example: BUCK1, BUCK2, BUCK9
90+
91+
The bindings inside the regulator nodes use the standard regulator bindings
92+
which are documented elsewhere.
93+
94+
Example:
95+
96+
s5m8767_pmic@66 {
97+
compatible = "samsung,s5m8767-pmic";
98+
reg = <0x66>;
99+
100+
s5m8767,pmic-buck2-uses-gpio-dvs;
101+
s5m8767,pmic-buck3-uses-gpio-dvs;
102+
s5m8767,pmic-buck4-uses-gpio-dvs;
103+
104+
s5m8767,pmic-buck-default-dvs-idx = <0>;
105+
106+
s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 1 0 0>, /* DVS1 */
107+
<&gpx0 1 1 0 0>, /* DVS2 */
108+
<&gpx0 2 1 0 0>; /* DVS3 */
109+
110+
s5m8767,pmic-buck-ds-gpios = <&gpx2 3 1 0 0>, /* SET1 */
111+
<&gpx2 4 1 0 0>, /* SET2 */
112+
<&gpx2 5 1 0 0>; /* SET3 */
113+
114+
s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
115+
<1250000>, <1200000>,
116+
<1150000>, <1100000>,
117+
<1000000>, <950000>;
118+
119+
s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
120+
<1100000>, <1100000>,
121+
<1000000>, <1000000>,
122+
<1000000>, <1000000>;
123+
124+
s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
125+
<1200000>, <1200000>,
126+
<1200000>, <1200000>,
127+
<1200000>, <1200000>;
128+
129+
regulators {
130+
ldo1_reg: LDO1 {
131+
regulator-name = "VDD_ABB_3.3V";
132+
regulator-min-microvolt = <3300000>;
133+
regulator-max-microvolt = <3300000>;
134+
op_mode = <1>; /* Normal Mode */
135+
};
136+
137+
ldo2_reg: LDO2 {
138+
regulator-name = "VDD_ALIVE_1.1V";
139+
regulator-min-microvolt = <1100000>;
140+
regulator-max-microvolt = <1100000>;
141+
regulator-always-on;
142+
};
143+
144+
buck1_reg: BUCK1 {
145+
regulator-name = "VDD_MIF_1.2V";
146+
regulator-min-microvolt = <950000>;
147+
regulator-max-microvolt = <1350000>;
148+
regulator-always-on;
149+
regulator-boot-on;
150+
};
151+
};
152+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
TPS51632 Voltage regulators
2+
3+
Required properties:
4+
- compatible: Must be "ti,tps51632"
5+
- reg: I2C slave address
6+
7+
Optional properties:
8+
- ti,enable-pwm-dvfs: Enable the DVFS voltage control through the PWM interface.
9+
- ti,dvfs-step-20mV: The 20mV step voltage when PWM DVFS enabled. Missing this
10+
will set 10mV step voltage in PWM DVFS mode. In normal mode, the voltage
11+
step is 10mV as per datasheet.
12+
13+
Any property defined as part of the core regulator binding, defined in
14+
regulator.txt, can also be used.
15+
16+
Example:
17+
18+
tps51632 {
19+
compatible = "ti,tps51632";
20+
reg = <0x43>;
21+
regulator-name = "tps51632-vout";
22+
regulator-min-microvolt = <500000>;
23+
regulator-max-microvolt = <1500000>;
24+
regulator-boot-on;
25+
ti,enable-pwm-dvfs;
26+
ti,dvfs-step-20mV;
27+
};

0 commit comments

Comments
 (0)