Skip to content

Commit 4bd37a9

Browse files
committed
Merge tag 'regulator-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "This was a quite quiet release for regulators on the drivers front, but we do have two small but useful core improvements: - Improve handling of cases where DT platforms specify both DT and init_data based configuration for a single regulator. - A helper of_regulator_get_optional() to simplify writing generic bindings for regulator consumers in subsystems. There's also some YAML conversions for the DT bindings which are a big part of the diffstat" * tag 'regulator-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: dt-bindings: qcom,rpmh: Correct PM8550VE supplies regulator: Switch back to struct platform_driver::remove() regulator: doc: remove documentation comment for regulator_init regulator: doc: add missing documentation for init_cb regulator: rk808: Restrict DVS GPIOs to the RK808 variant only regulator: rk808: Use dev_err_probe() in the probe path regulator: rk808: Perform trivial code cleanups regulator: dt-bindings: qcom,qca6390-pmu: add more properties for wcn6855 regulator: dt-bindings: lltc,ltc3676: convert to YAML regulator: core: Use fsleep() to get best sleep mechanism regulator: core: remove machine init callback from config regulator: core: add callback to perform runtime init regulator: core: do not silently ignore provided init_data regulator: max5970: Drop unused structs regulator: dt-bindings: vctrl-regulator: convert to YAML regulator: qcom-smd: make smd_vreg_rpm static regulator: Call of_node_put() only once in rzg2l_usb_vbus_regulator_probe() regulator: isl6271a: Drop explicit initialization of struct i2c_device_id::driver_data to 0 regulator: Add devres version of of_regulator_get_optional() regulator: Add of_regulator_get_optional() for pure DT regulator lookup
2 parents 37c7d35 + 21ccadc commit 4bd37a9

27 files changed

+490
-309
lines changed
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/lltc,ltc3676.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Linear Technology LTC3676 8-output regulators
8+
9+
maintainers:
10+
- Tim Harvey <tharvey@gateworks.com>
11+
12+
description: |
13+
LTC3676 contains eight regulators, 4 switching SW1..SW4 and four LDO1..4 .
14+
15+
properties:
16+
compatible:
17+
const: lltc,ltc3676
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts:
23+
maxItems: 1
24+
25+
regulators:
26+
type: object
27+
additionalProperties: false
28+
description: |
29+
List of regulators provided by this controller, must be named
30+
after their hardware counterparts (SW|LDO)[1-4].
31+
32+
patternProperties:
33+
"^(sw[1-4]|ldo[24])$":
34+
type: object
35+
unevaluatedProperties: false
36+
$ref: regulator.yaml#
37+
description:
38+
Properties for single SW or LDO regulator. Regulators SW1..SW4 can
39+
regulate the feedback reference from 412.5mV to 800mV in 12.5 mV
40+
steps. The output voltage thus ranges between 0.4125 * (1 + R1/R2) V
41+
and 0.8 * (1 + R1/R2) V.
42+
Regulators LDO1, LDO2, LDO4 have a fixed 0.725 V reference and thus
43+
output 0.725 * (1 + R1/R2) V.
44+
The LDO1 standby regulator can not be disabled and thus should have
45+
the regulator-always-on property set.
46+
47+
properties:
48+
lltc,fb-voltage-divider:
49+
description:
50+
An array of two integers containing the resistor values
51+
R1 and R2 of the feedback voltage divider in ohms.
52+
$ref: /schemas/types.yaml#/definitions/uint32-array
53+
minItems: 2
54+
maxItems: 2
55+
56+
required:
57+
- lltc,fb-voltage-divider
58+
59+
properties:
60+
ldo1:
61+
type: object
62+
unevaluatedProperties: false
63+
$ref: regulator.yaml#
64+
description:
65+
The LDO1 standby regulator can not be disabled and thus should
66+
have the regulator-always-on property set. See patternProperties
67+
description above for the rest of the details.
68+
69+
properties:
70+
lltc,fb-voltage-divider:
71+
description:
72+
An array of two integers containing the resistor values
73+
R1 and R2 of the feedback voltage divider in ohms.
74+
$ref: /schemas/types.yaml#/definitions/uint32-array
75+
minItems: 2
76+
maxItems: 2
77+
78+
required:
79+
- lltc,fb-voltage-divider
80+
- regulator-always-on
81+
82+
ldo3:
83+
type: object
84+
unevaluatedProperties: false
85+
$ref: regulator.yaml#
86+
description:
87+
The LDO3 regulator is fixed to 1.8 V. See patternProperties
88+
description above for the rest of the details.
89+
90+
required:
91+
- compatible
92+
- reg
93+
- regulators
94+
95+
additionalProperties: false
96+
97+
examples:
98+
- |
99+
i2c {
100+
#address-cells = <1>;
101+
#size-cells = <0>;
102+
103+
pmic@3c {
104+
compatible = "lltc,ltc3676";
105+
reg = <0x3c>;
106+
107+
regulators {
108+
sw1_reg: sw1 {
109+
regulator-min-microvolt = <674400>;
110+
regulator-max-microvolt = <1308000>;
111+
lltc,fb-voltage-divider = <127000 200000>;
112+
regulator-ramp-delay = <7000>;
113+
regulator-boot-on;
114+
regulator-always-on;
115+
};
116+
117+
sw2_reg: sw2 {
118+
regulator-min-microvolt = <1033310>;
119+
regulator-max-microvolt = <200400>;
120+
lltc,fb-voltage-divider = <301000 200000>;
121+
regulator-ramp-delay = <7000>;
122+
regulator-boot-on;
123+
regulator-always-on;
124+
};
125+
126+
sw3_reg: sw3 {
127+
regulator-min-microvolt = <674400>;
128+
regulator-max-microvolt = <130800>;
129+
lltc,fb-voltage-divider = <127000 200000>;
130+
regulator-ramp-delay = <7000>;
131+
regulator-boot-on;
132+
regulator-always-on;
133+
};
134+
135+
sw4_reg: sw4 {
136+
regulator-min-microvolt = <868310>;
137+
regulator-max-microvolt = <168400>;
138+
lltc,fb-voltage-divider = <221000 200000>;
139+
regulator-ramp-delay = <7000>;
140+
regulator-boot-on;
141+
regulator-always-on;
142+
};
143+
144+
ldo2_reg: ldo2 {
145+
regulator-min-microvolt = <2490375>;
146+
regulator-max-microvolt = <2490375>;
147+
lltc,fb-voltage-divider = <487000 200000>;
148+
regulator-boot-on;
149+
regulator-always-on;
150+
};
151+
152+
ldo3_reg: ldo3 {
153+
regulator-min-microvolt = <1800000>;
154+
regulator-max-microvolt = <1800000>;
155+
regulator-boot-on;
156+
};
157+
158+
ldo4_reg: ldo4 {
159+
regulator-min-microvolt = <3023250>;
160+
regulator-max-microvolt = <3023250>;
161+
lltc,fb-voltage-divider = <634000 200000>;
162+
regulator-boot-on;
163+
regulator-always-on;
164+
};
165+
};
166+
};
167+
};

Documentation/devicetree/bindings/regulator/ltc3676.txt

Lines changed: 0 additions & 94 deletions
This file was deleted.

Documentation/devicetree/bindings/regulator/qcom,qca6390-pmu.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ properties:
3333
vddpmu-supply:
3434
description: VDD_PMU supply regulator handle
3535

36+
vddpmumx-supply:
37+
description: VDD_PMU_MX supply regulator handle
38+
39+
vddpmucx-supply:
40+
description: VDD_PMU_CX supply regulator handle
41+
3642
vddio1p2-supply:
3743
description: VDD_IO_1P2 supply regulator handle
3844

@@ -72,6 +78,10 @@ properties:
7278
maxItems: 1
7379
description: GPIO line indicating the state of the clock supply to the BT module
7480

81+
xo-clk-gpios:
82+
maxItems: 1
83+
description: GPIO line allowing to select the XO clock configuration for the module
84+
7585
clocks:
7686
maxItems: 1
7787
description: Reference clock handle
@@ -119,6 +129,8 @@ allOf:
119129
- vddio-supply
120130
- vddaon-supply
121131
- vddpmu-supply
132+
- vddpmumx-supply
133+
- vddpmucx-supply
122134
- vddrfa0p95-supply
123135
- vddrfa1p3-supply
124136
- vddrfa1p9-supply

Documentation/devicetree/bindings/regulator/qcom,rpmh-regulator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ allOf:
349349
properties:
350350
compatible:
351351
enum:
352-
- qcom,pm8550ve-rpmh-regulators
353352
- qcom,pm8550vs-rpmh-regulators
354353
then:
355354
patternProperties:
@@ -385,6 +384,7 @@ allOf:
385384
compatible:
386385
enum:
387386
- qcom,pmc8380-rpmh-regulators
387+
- qcom,pm8550ve-rpmh-regulators
388388
then:
389389
patternProperties:
390390
"^vdd-l[1-3]-supply$": true
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/vctrl-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Voltage controlled regulators
8+
9+
maintainers:
10+
- Heiko Stuebner <heiko@sntech.de>
11+
12+
allOf:
13+
- $ref: regulator.yaml#
14+
15+
properties:
16+
compatible:
17+
const: vctrl-regulator
18+
19+
ctrl-supply:
20+
description: Regulator supplying the control voltage
21+
22+
ctrl-voltage-range:
23+
description:
24+
Array of two integer values describing the range (min/max) of the
25+
control voltage. The values specify the control voltage needed to
26+
generate the corresponding regulator-min/max-microvolt output
27+
voltage.
28+
minItems: 2
29+
maxItems: 2
30+
$ref: /schemas/types.yaml#/definitions/uint32-array
31+
32+
min-slew-down-rate:
33+
description:
34+
Describes how slowly the regulator voltage will decay down in the
35+
worst case (lightest expected load). Specified in uV / us (like
36+
main regulator ramp rate). This value is required when
37+
ovp-threshold-percent is specified.
38+
$ref: /schemas/types.yaml#/definitions/uint32
39+
40+
ovp-threshold-percent:
41+
description:
42+
Overvoltage protection (OVP) threshold of the regulator in percent.
43+
Some regulators have an OVP circuitry which shuts down the regulator
44+
when the actual output voltage deviates beyond a certain margin from
45+
the expected value for a given control voltage. On larger voltage
46+
decreases this can occur undesiredly since the output voltage does
47+
not adjust immediately to changes in the control voltage. To avoid
48+
this situation the vctrl driver breaks down larger voltage decreases
49+
into multiple steps, where each step is within the OVP threshold.
50+
minimum: 0
51+
maximum: 100
52+
53+
unevaluatedProperties: false
54+
55+
dependencies:
56+
ovp-threshold-percent: [ min-slew-down-rate ]
57+
58+
required:
59+
- compatible
60+
- ctrl-supply
61+
- ctrl-voltage-range
62+
- regulator-min-microvolt
63+
- regulator-max-microvolt
64+
65+
examples:
66+
- |
67+
vctrl-reg {
68+
compatible = "vctrl-regulator";
69+
regulator-name = "vctrl_reg";
70+
71+
ctrl-supply = <&ctrl_reg>;
72+
ctrl-voltage-range = <200000 500000>;
73+
74+
min-slew-down-rate = <225>;
75+
ovp-threshold-percent = <16>;
76+
77+
regulator-min-microvolt = <800000>;
78+
regulator-max-microvolt = <1500000>;
79+
};
80+
...

0 commit comments

Comments
 (0)