Skip to content

Commit bbb8399

Browse files
committed
Merge tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This time around the bulk of the work on the regulator API has been cleanups of various kinds, partly but not entirely inspired by the W=1 stuff that 0day turned on. There's also been a fairly large crop of new drivers, and a few bugfixes for existing drivers. - Mode setting support for MT6397 and DA9211. - New drivers for ChromeOS embedded controllers, Fairchild FAN53880, NXP PCA9450, Qualcomm LABIBB, MP5496, and VBUS booster, and Silergy SY8827N" * tag 'regulator-v5.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (67 commits) regulator: add the sub node names for the MP5496 PMIC regulator: cros-ec-regulator: Fix double free of desc->name. platform/chrome: cros_ec: Fix host command for regulator control. regulator: pca9450: Convert to use module_i2c_driver regulator: fix memory leak on error path of regulator_register() regulator: Replace HTTP links with HTTPS ones regulator: convert QCOM SMD-RPM regulator document to YAML schema regulator: gpio: Honor regulator-boot-on property regulator: core: Add destroy_regulator() regulator: Correct kernel-doc inconsistency regulator: Add labibb regulator binding regulator: qcom: Add labibb driver regulator: Allow regulators to verify enabled during enable() regulator: cros-ec: Constify cros_ec_regulator_voltage_ops regulator: devres: Standardise on function documentation headers regulator: of_regulator: Add missing colon for rdev kerneldoc argument regulator: devres: Fix issues with kerneldoc headers regulator: fan53880: Add support for COMPILE_TEST regulator: fan53880: Add missing .owner field in regulator_desc dt-bindings: regulator: add pca9450 regulator yaml ...
2 parents f8851cb + 3f02794 commit bbb8399

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+3042
-487
lines changed

Documentation/devicetree/bindings/regulator/da9211.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Required properties:
1515
Optional properties:
1616
- enable-gpios: platform gpio for control of BUCKA/BUCKB.
1717
- Any optional property defined in regulator.txt
18+
- regulator-initial-mode and regulator-allowed-modes may be specified using
19+
mode values from dt-bindings/regulator/dlg,da9211-regulator.h
1820

1921
Example 1) DA9211
2022
pmic: da9211@68 {
@@ -30,6 +32,8 @@ Example 1) DA9211
3032
regulator-min-microamp = <2000000>;
3133
regulator-max-microamp = <5000000>;
3234
enable-gpios = <&gpio 27 0>;
35+
regulator-allowed-modes = <DA9211_BUCK_MODE_SYNC
36+
DA9211_BUCK_MODE_AUTO>;
3337
};
3438
};
3539
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/google,cros-ec-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ChromeOS EC controlled voltage regulators
8+
9+
maintainers:
10+
- Pi-Hsun Shih <[email protected]>
11+
12+
description:
13+
Any property defined as part of the core regulator binding, defined in
14+
regulator.yaml, can also be used.
15+
16+
allOf:
17+
- $ref: "regulator.yaml#"
18+
19+
properties:
20+
compatible:
21+
const: google,cros-ec-regulator
22+
23+
reg:
24+
maxItems: 1
25+
description: Identifier for the voltage regulator to ChromeOS EC.
26+
27+
required:
28+
- compatible
29+
- reg
30+
31+
examples:
32+
- |
33+
spi0 {
34+
#address-cells = <1>;
35+
#size-cells = <0>;
36+
37+
cros_ec: ec@0 {
38+
compatible = "google,cros-ec-spi";
39+
reg = <0>;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
43+
regulator@0 {
44+
compatible = "google,cros-ec-regulator";
45+
regulator-min-microvolt = <1800000>;
46+
regulator-max-microvolt = <3300000>;
47+
reg = <0>;
48+
};
49+
};
50+
};
51+
...

Documentation/devicetree/bindings/regulator/lp872x.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Optional properties:
3737
(Documentation/devicetree/bindings/regulator/regulator.txt)
3838

3939
Datasheet
40-
- LP8720: http://www.ti.com/lit/ds/symlink/lp8720.pdf
41-
- LP8725: http://www.ti.com/lit/ds/symlink/lp8725.pdf
40+
- LP8720: https://www.ti.com/lit/ds/symlink/lp8720.pdf
41+
- LP8725: https://www.ti.com/lit/ds/symlink/lp8725.pdf
4242

4343
Example 1) LP8720
4444

Documentation/devicetree/bindings/regulator/mt6397-regulator.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ LDO:
1616
ldo_vemc3v3, ldo_vgp1, ldo_vgp2, ldo_vgp3, ldo_vgp4, ldo_vgp5, ldo_vgp6,
1717
ldo_vibr
1818

19+
BUCK regulators can set regulator-initial-mode and regulator-allowed-modes to
20+
values specified in dt-bindings/regulator/mediatek,mt6397-regulator.h
21+
1922
Example:
2023
pmic {
2124
compatible = "mediatek,mt6397";
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/nxp,pca9450-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: NXP PCA9450A/B/C Power Management Integrated Circuit regulators
8+
9+
maintainers:
10+
- Robin Gong <[email protected]>
11+
12+
description: |
13+
Regulator nodes should be named to BUCK_<number> and LDO_<number>. The
14+
definition for each of these nodes is defined using the standard
15+
binding for regulators at
16+
Documentation/devicetree/bindings/regulator/regulator.txt.
17+
Datasheet is available at
18+
https://www.nxp.com/docs/en/data-sheet/PCA9450DS.pdf
19+
20+
#The valid names for PCA9450 regulator nodes are:
21+
#BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6,
22+
#LDO1, LDO2, LDO3, LDO4, LDO5
23+
#Note: Buck3 removed on PCA9450B and connect with Buck1 on PCA9450C.
24+
25+
properties:
26+
compatible:
27+
enum:
28+
- nxp,pca9450a
29+
- nxp,pca9450b
30+
- nxp,pca9450c
31+
32+
reg:
33+
maxItems: 1
34+
35+
interrupts:
36+
maxItems: 1
37+
38+
regulators:
39+
type: object
40+
description: |
41+
list of regulators provided by this controller
42+
43+
patternProperties:
44+
"^LDO[1-5]$":
45+
type: object
46+
$ref: regulator.yaml#
47+
description:
48+
Properties for single LDO regulator.
49+
50+
properties:
51+
regulator-name:
52+
pattern: "^LDO[1-5]$"
53+
description:
54+
should be "LDO1", ..., "LDO5"
55+
56+
unevaluatedProperties: false
57+
58+
"^BUCK[1-6]$":
59+
type: object
60+
$ref: regulator.yaml#
61+
description:
62+
Properties for single BUCK regulator.
63+
64+
properties:
65+
regulator-name:
66+
pattern: "^BUCK[1-6]$"
67+
description:
68+
should be "BUCK1", ..., "BUCK6"
69+
70+
nxp,dvs-run-voltage:
71+
$ref: "/schemas/types.yaml#/definitions/uint32"
72+
minimum: 600000
73+
maximum: 2187500
74+
description:
75+
PMIC default "RUN" state voltage in uV. Only Buck1~3 have such
76+
dvs(dynamic voltage scaling) property.
77+
78+
nxp,dvs-standby-voltage:
79+
$ref: "/schemas/types.yaml#/definitions/uint32"
80+
minimum: 600000
81+
maximum: 2187500
82+
description:
83+
PMIC default "STANDBY" state voltage in uV. Only Buck1~3 have such
84+
dvs(dynamic voltage scaling) property.
85+
86+
unevaluatedProperties: false
87+
88+
additionalProperties: false
89+
90+
required:
91+
- compatible
92+
- reg
93+
- interrupts
94+
- regulators
95+
96+
additionalProperties: false
97+
98+
examples:
99+
- |
100+
#include <dt-bindings/interrupt-controller/irq.h>
101+
102+
i2c {
103+
#address-cells = <1>;
104+
#size-cells = <0>;
105+
pmic: pmic@25 {
106+
compatible = "nxp,pca9450b";
107+
reg = <0x25>;
108+
pinctrl-0 = <&pinctrl_pmic>;
109+
interrupt-parent = <&gpio1>;
110+
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
111+
112+
regulators {
113+
buck1: BUCK1 {
114+
regulator-name = "BUCK1";
115+
regulator-min-microvolt = <600000>;
116+
regulator-max-microvolt = <2187500>;
117+
regulator-boot-on;
118+
regulator-always-on;
119+
regulator-ramp-delay = <3125>;
120+
};
121+
buck2: BUCK2 {
122+
regulator-name = "BUCK2";
123+
regulator-min-microvolt = <600000>;
124+
regulator-max-microvolt = <2187500>;
125+
regulator-boot-on;
126+
regulator-always-on;
127+
regulator-ramp-delay = <3125>;
128+
nxp,dvs-run-voltage = <950000>;
129+
nxp,dvs-standby-voltage = <850000>;
130+
};
131+
buck4: BUCK4 {
132+
regulator-name = "BUCK4";
133+
regulator-min-microvolt = <600000>;
134+
regulator-max-microvolt = <3400000>;
135+
regulator-boot-on;
136+
regulator-always-on;
137+
};
138+
buck5: BUCK5 {
139+
regulator-name = "BUCK5";
140+
regulator-min-microvolt = <600000>;
141+
regulator-max-microvolt = <3400000>;
142+
regulator-boot-on;
143+
regulator-always-on;
144+
};
145+
buck6: BUCK6 {
146+
regulator-name = "BUCK6";
147+
regulator-min-microvolt = <600000>;
148+
regulator-max-microvolt = <3400000>;
149+
regulator-boot-on;
150+
regulator-always-on;
151+
};
152+
153+
ldo1: LDO1 {
154+
regulator-name = "LDO1";
155+
regulator-min-microvolt = <1600000>;
156+
regulator-max-microvolt = <3300000>;
157+
regulator-boot-on;
158+
regulator-always-on;
159+
};
160+
ldo2: LDO2 {
161+
regulator-name = "LDO2";
162+
regulator-min-microvolt = <800000>;
163+
regulator-max-microvolt = <1150000>;
164+
regulator-boot-on;
165+
regulator-always-on;
166+
};
167+
ldo3: LDO3 {
168+
regulator-name = "LDO3";
169+
regulator-min-microvolt = <800000>;
170+
regulator-max-microvolt = <3300000>;
171+
regulator-boot-on;
172+
regulator-always-on;
173+
};
174+
ldo4: LDO4 {
175+
regulator-name = "LDO4";
176+
regulator-min-microvolt = <800000>;
177+
regulator-max-microvolt = <3300000>;
178+
regulator-boot-on;
179+
regulator-always-on;
180+
};
181+
ldo5: LDO5 {
182+
regulator-name = "LDO5";
183+
regulator-min-microvolt = <1800000>;
184+
regulator-max-microvolt = <3300000>;
185+
regulator-boot-on;
186+
regulator-always-on;
187+
};
188+
};
189+
};
190+
};
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/onnn,fan53880.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Onsemi FAN53880 PMIC
8+
9+
maintainers:
10+
- Christoph Fritz <[email protected]>
11+
12+
description: |
13+
The FAN53880 is an I2C porgrammable power management IC (PMIC)
14+
that contains a BUCK (step-down converter), four low dropouts (LDO)
15+
and one BOOST (step-up converter) output. It is designed for mobile
16+
power applications.
17+
18+
properties:
19+
$nodename:
20+
pattern: "pmic@[0-9a-f]{1,2}"
21+
compatible:
22+
enum:
23+
- onnn,fan53880
24+
25+
reg:
26+
maxItems: 1
27+
28+
VIN12-supply:
29+
description: Input supply phandle(s) for LDO1 and LDO2
30+
31+
VIN3-supply:
32+
description: Input supply phandle(s) for LDO3
33+
34+
VIN4-supply:
35+
description: Input supply phandle(s) for LDO4
36+
37+
PVIN-supply:
38+
description: Input supply phandle(s) for BUCK and BOOST
39+
40+
regulators:
41+
type: object
42+
$ref: regulator.yaml#
43+
description: |
44+
list of regulators provided by this controller, must be named
45+
after their hardware counterparts LDO[1-4], BUCK and BOOST
46+
47+
patternProperties:
48+
"^LDO[1-4]$":
49+
type: object
50+
$ref: regulator.yaml#
51+
52+
"^BUCK|BOOST$":
53+
type: object
54+
$ref: regulator.yaml#
55+
56+
additionalProperties: false
57+
58+
required:
59+
- compatible
60+
- reg
61+
- regulators
62+
63+
additionalProperties: false
64+
65+
examples:
66+
- |
67+
i2c {
68+
#address-cells = <1>;
69+
#size-cells = <0>;
70+
71+
pmic@35 {
72+
compatible = "onnn,fan53880";
73+
reg = <0x35>;
74+
75+
PVIN-supply = <&fixreg_example_vcc>;
76+
77+
regulators {
78+
BUCK {
79+
regulator-min-microvolt = <1200000>;
80+
regulator-max-microvolt = <1200000>;
81+
};
82+
};
83+
};
84+
};
85+
...

0 commit comments

Comments
 (0)