Skip to content

Commit aae1464

Browse files
committed
Merge tag 'regulator-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "Hardly anything going on in the core this time around with the regulator API and pretty quiet on the driver front: - An API for comparing regulators, useful for devices that need to check if supply voltages exactly match rather than just nominally match. - Conversion of several DT bindings to YAML format. - Conversion of I2C drivers to probe_new(). - New drivers for Monolithic MPQ7920 and MP8859, and Rohm BD71828" * tag 'regulator-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (34 commits) dt-bindings: regulator: add document bindings for mpq7920 regulator: core: Fix exported symbols to the exported GPL version regulator: mpq7920: Fix incorrect defines regulator: vqmmc-ipq4019: Fix platform_no_drv_owner.cocci warnings regulator: vctrl-regulator: Avoid deadlock getting and setting the voltage regulator fix for "regulator: core: Add regulator_is_equal() helper" regulator: core: Add regulator_is_equal() helper regulator: mpq7920: Convert to use .probe_new regulator: mpq7920: Remove unneeded fields from struct mpq7920_regulator_info regulator: vqmmc-ipq4019: Trivial clean up regulator: vqmmc-ipq4019: Remove ipq4019_regulator_remove regulator: bindings: Drop document bindings for mpq7920 dt-bindings: Drop entry for Monolithic Power System, MPS regulator: bd718x7: Simplify the code by removing struct bd718xx_pmic_inits regulator: add IPQ4019 SDHCI VQMMC LDO driver regulator: Convert i2c drivers to use .probe_new regulator: mpq7920: Check the correct variable in mpq7920_regulator_register() regulator: mpq7920: Fix Woverflow warning on conversion regulator: mp8859: tidy up white space in probe regulator: mpq7920: add mpq7920 regulator driver ...
2 parents 1e1ab4b + e4e4c2f commit aae1464

38 files changed

+2014
-156
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Monolithic Power Systems MP8859 voltage regulator
2+
3+
Required properties:
4+
- compatible: "mps,mp8859";
5+
- reg: I2C slave address.
6+
7+
Optional subnode for regulator: "mp8859_dcdc", using common regulator
8+
bindings given in <Documentation/devicetree/bindings/regulator/regulator.txt>.
9+
10+
Example:
11+
12+
mp8859: regulator@66 {
13+
compatible = "mps,mp8859";
14+
reg = <0x66>;
15+
dc_12v: mp8859_dcdc {
16+
regulator-name = "dc_12v";
17+
regulator-min-microvolt = <12000000>;
18+
regulator-max-microvolt = <12000000>;
19+
regulator-boot-on;
20+
regulator-always-on;
21+
};
22+
};
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mps,mpq7920.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Monolithic Power System MPQ7920 PMIC
8+
9+
maintainers:
10+
- Saravanan Sekar <[email protected]>
11+
12+
properties:
13+
$nodename:
14+
pattern: "pmic@[0-9a-f]{1,2}"
15+
compatible:
16+
enum:
17+
- mps,mpq7920
18+
19+
reg:
20+
maxItems: 1
21+
22+
regulators:
23+
type: object
24+
allOf:
25+
- $ref: regulator.yaml#
26+
description: |
27+
list of regulators provided by this controller, must be named
28+
after their hardware counterparts BUCK[1-4], one LDORTC, and LDO[2-5]
29+
30+
properties:
31+
mps,switch-freq:
32+
allOf:
33+
- $ref: "/schemas/types.yaml#/definitions/uint8"
34+
enum: [ 0, 1, 2, 3 ]
35+
default: 2
36+
description: |
37+
switching frequency must be one of following corresponding value
38+
1.1MHz, 1.65MHz, 2.2MHz, 2.75MHz
39+
40+
patternProperties:
41+
"^ldo[1-4]$":
42+
type: object
43+
allOf:
44+
- $ref: regulator.yaml#
45+
46+
"^ldortc$":
47+
type: object
48+
allOf:
49+
- $ref: regulator.yaml#
50+
51+
"^buck[1-4]$":
52+
type: object
53+
allOf:
54+
- $ref: regulator.yaml#
55+
56+
properties:
57+
mps,buck-softstart:
58+
allOf:
59+
- $ref: "/schemas/types.yaml#/definitions/uint8"
60+
enum: [ 0, 1, 2, 3 ]
61+
description: |
62+
defines the soft start time of this buck, must be one of the following
63+
corresponding values 150us, 300us, 610us, 920us
64+
65+
mps,buck-phase-delay:
66+
allOf:
67+
- $ref: "/schemas/types.yaml#/definitions/uint8"
68+
enum: [ 0, 1, 2, 3 ]
69+
description: |
70+
defines the phase delay of this buck, must be one of the following
71+
corresponding values 0deg, 90deg, 180deg, 270deg
72+
73+
mps,buck-ovp-disable:
74+
type: boolean
75+
description: |
76+
disables over voltage protection of this buck
77+
78+
additionalProperties: false
79+
additionalProperties: false
80+
81+
required:
82+
- compatible
83+
- reg
84+
- regulators
85+
86+
additionalProperties: false
87+
88+
examples:
89+
- |
90+
i2c {
91+
#address-cells = <1>;
92+
#size-cells = <0>;
93+
94+
pmic@69 {
95+
compatible = "mps,mpq7920";
96+
reg = <0x69>;
97+
98+
regulators {
99+
mps,switch-freq = /bits/ 8 <1>;
100+
101+
buck1 {
102+
regulator-name = "buck1";
103+
regulator-min-microvolt = <400000>;
104+
regulator-max-microvolt = <3587500>;
105+
regulator-min-microamp = <460000>;
106+
regulator-max-microamp = <7600000>;
107+
regulator-boot-on;
108+
mps,buck-ovp-disable;
109+
mps,buck-phase-delay = /bits/ 8 <2>;
110+
mps,buck-softstart = /bits/ 8 <1>;
111+
};
112+
113+
ldo2 {
114+
regulator-name = "ldo2";
115+
regulator-min-microvolt = <650000>;
116+
regulator-max-microvolt = <3587500>;
117+
};
118+
};
119+
};
120+
};
121+
...
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/rohm,bd71828-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ROHM BD71828 Power Management Integrated Circuit regulators
8+
9+
maintainers:
10+
- Matti Vaittinen <[email protected]>
11+
12+
description: |
13+
This module is part of the ROHM BD71828 MFD device. For more details
14+
see Documentation/devicetree/bindings/mfd/rohm,bd71828-pmic.yaml.
15+
16+
The regulator controller is represented as a sub-node of the PMIC node
17+
on the device tree.
18+
19+
Regulator nodes should be named to BUCK_<number> and LDO_<number>.
20+
The valid names for BD71828 regulator nodes are
21+
BUCK1, BUCK2, BUCK3, BUCK4, BUCK5, BUCK6, BUCK7
22+
LDO1, LDO2, LDO3, LDO4, LDO5, LDO6, LDO7
23+
24+
patternProperties:
25+
"^LDO[1-7]$":
26+
type: object
27+
allOf:
28+
- $ref: regulator.yaml#
29+
description:
30+
Properties for single LDO regulator.
31+
32+
properties:
33+
regulator-name:
34+
pattern: "^ldo[1-7]$"
35+
description:
36+
should be "ldo1", ..., "ldo7"
37+
38+
"^BUCK[1-7]$":
39+
type: object
40+
allOf:
41+
- $ref: regulator.yaml#
42+
description:
43+
Properties for single BUCK regulator.
44+
45+
properties:
46+
regulator-name:
47+
pattern: "^buck[1-7]$"
48+
description:
49+
should be "buck1", ..., "buck7"
50+
51+
rohm,dvs-run-voltage:
52+
allOf:
53+
- $ref: "/schemas/types.yaml#/definitions/uint32"
54+
- minimum: 0
55+
maximum: 3300000
56+
description:
57+
PMIC default "RUN" state voltage in uV. See below table for
58+
bucks which support this. 0 means disabled.
59+
60+
rohm,dvs-idle-voltage:
61+
allOf:
62+
- $ref: "/schemas/types.yaml#/definitions/uint32"
63+
- minimum: 0
64+
maximum: 3300000
65+
description:
66+
PMIC default "IDLE" state voltage in uV. See below table for
67+
bucks which support this. 0 means disabled.
68+
69+
rohm,dvs-suspend-voltage:
70+
allOf:
71+
- $ref: "/schemas/types.yaml#/definitions/uint32"
72+
- minimum: 0
73+
maximum: 3300000
74+
description:
75+
PMIC default "SUSPEND" state voltage in uV. See below table for
76+
bucks which support this. 0 means disabled.
77+
78+
rohm,dvs-lpsr-voltage:
79+
allOf:
80+
- $ref: "/schemas/types.yaml#/definitions/uint32"
81+
- minimum: 0
82+
maximum: 3300000
83+
description:
84+
PMIC default "LPSR" state voltage in uV. See below table for
85+
bucks which support this. 0 means disabled.
86+
87+
# Supported default DVS states:
88+
# buck | run | idle | suspend | lpsr
89+
#--------------------------------------------------------------
90+
# 1, 2, 6, and 7 | supported | supported | supported (*)
91+
#--------------------------------------------------------------
92+
# 3, 4, and 5 | supported (**)
93+
#--------------------------------------------------------------
94+
#
95+
#(*) LPSR and SUSPEND states use same voltage but both states have own
96+
# enable /
97+
# disable settings. Voltage 0 can be specified for a state to make
98+
# regulator disabled on that state.
99+
#
100+
#(**) All states use same voltage but have own enable / disable
101+
# settings. Voltage 0 can be specified for a state to make
102+
# regulator disabled on that state.
103+
104+
required:
105+
- regulator-name
106+
additionalProperties: false
107+
additionalProperties: false

Documentation/devicetree/bindings/regulator/st,stm32-booster.txt

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/st,stm32-booster.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: STMicroelectronics STM32 booster for ADC analog input switches bindings
8+
9+
maintainers:
10+
- Fabrice Gasnier <[email protected]>
11+
12+
description: |
13+
Some STM32 devices embed a 3.3V booster supplied by Vdda, that can be used
14+
to supply ADC analog input switches.
15+
16+
allOf:
17+
- $ref: "regulator.yaml#"
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- st,stm32h7-booster
23+
- st,stm32mp1-booster
24+
25+
st,syscfg:
26+
allOf:
27+
- $ref: "/schemas/types.yaml#/definitions/phandle-array"
28+
description: phandle to system configuration controller.
29+
30+
vdda-supply:
31+
description: phandle to the vdda input analog voltage.
32+
33+
required:
34+
- compatible
35+
- st,syscfg
36+
- vdda-supply
37+
38+
examples:
39+
- |
40+
regulator-booster {
41+
compatible = "st,stm32mp1-booster";
42+
st,syscfg = <&syscfg>;
43+
vdda-supply = <&vdda>;
44+
};
45+
46+
...

Documentation/devicetree/bindings/regulator/st,stm32-vrefbuf.txt

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/st,stm32-vrefbuf.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: STMicroelectronics STM32 Voltage reference buffer bindings
8+
9+
description: |
10+
Some STM32 devices embed a voltage reference buffer which can be used as
11+
voltage reference for ADCs, DACs and also as voltage reference for external
12+
components through the dedicated VREF+ pin.
13+
14+
maintainers:
15+
- Fabrice Gasnier <[email protected]>
16+
17+
allOf:
18+
- $ref: "regulator.yaml#"
19+
20+
properties:
21+
compatible:
22+
const: st,stm32-vrefbuf
23+
24+
reg:
25+
maxItems: 1
26+
27+
clocks:
28+
maxItems: 1
29+
30+
vdda-supply:
31+
description: phandle to the vdda input analog voltage.
32+
33+
required:
34+
- compatible
35+
- reg
36+
- clocks
37+
- vdda-supply
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/clock/stm32mp1-clks.h>
42+
vrefbuf@50025000 {
43+
compatible = "st,stm32-vrefbuf";
44+
reg = <0x50025000 0x8>;
45+
regulator-min-microvolt = <1500000>;
46+
regulator-max-microvolt = <2500000>;
47+
clocks = <&rcc VREF>;
48+
vdda-supply = <&vdda>;
49+
};
50+
51+
...
52+

0 commit comments

Comments
 (0)