Skip to content

Commit 3860cae

Browse files
committed
Merge tag 'regulator-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "The biggest set of changes in here is the addition of the Qualcomm RPMH driver. As well as the regualtor driver itself being quite large due to the usual involved Qualcomm regulator stuff there's also some code shared with the arm-soc tree, a bus driver required to communicate with the hardware that actually winds up being much larger than the regulator driver itself and a LLCC driver that was part of the same signed tag used with the arm-soc tree. Other than that it's a fairly standard and quiet release, highlights include: - Addition of device links from regulator consumers to their regulators, helping the core avoid dependency issues during suspend. - Support for the entertainingly innovative suspend implementation in the BD9571MWV. - Support for switch regulators on the PFUZE100, this required two goes due to backwards compatibility issues with old DTs that were discovered. - Support for Freescale PFUZE3001 and SocioNext UniPhier. - The aforementioned Qualcomm RPMH driver together with the driver changes required to support it" * tag 'regulator-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (52 commits) regulator: add QCOM RPMh regulator driver regulator: dt-bindings: add QCOM RPMh regulator bindings regulator: samsung: Add SPDX license identifiers regulator: maxim: Add SPDX license identifiers regulator: bd71837: adobt MFD changes to regulator driver regulator: tps65217: Fix NULL pointer dereference on probe regulator: Add support for CPCAP regulators on Motorola Xoom devices. regulator: Add sw2_sw4 voltage table to cpcap regulator. regulator: bd9571mwv: Make symbol 'dev_attr_backup_mode' static regulator: pfuze100: add support to en-/disable switch regulators regulator: pfuze100: add optional disable switch-regulators binding soc: qcom: rmtfs-mem: fix memleak in probe error paths soc: qcom: llc-slice: Add missing MODULE_LICENSE() drivers: qcom: rpmh: fix unwanted error check for get_tcs_of_type() drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs firmware: qcom: scm: add a dummy qcom_scm_assign_mem() drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help children drivers: qcom: rpmh-rsc: allow active requests from wake TCS drivers: qcom: rpmh: add support for batch RPMH request drivers: qcom: rpmh: allow requests to be sent asynchronously ...
2 parents 010b0e7 + d22d593 commit 3860cae

50 files changed

Lines changed: 4187 additions & 272 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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
What: /sys/bus/i2c/devices/.../bd9571mwv-regulator.*.auto/backup_mode
2+
Date: Jul 2018
3+
KernelVersion: 4.19
4+
Contact: Geert Uytterhoeven <geert+renesas@glider.be>
5+
Description: Read/write the current state of DDR Backup Mode, which controls
6+
if DDR power rails will be kept powered during system suspend.
7+
("on"/"1" = enabled, "off"/"0" = disabled).
8+
Two types of power switches (or control signals) can be used:
9+
A. With a momentary power switch (or pulse signal), DDR
10+
Backup Mode is enabled by default when available, as the
11+
PMIC will be configured only during system suspend.
12+
B. With a toggle power switch (or level signal), the
13+
following steps must be followed exactly:
14+
1. Configure PMIC for backup mode, to change the role of
15+
the accessory power switch from a power switch to a
16+
wake-up switch,
17+
2. Switch accessory power switch off, to prepare for
18+
system suspend, which is a manual step not controlled
19+
by software,
20+
3. Suspend system,
21+
4. Switch accessory power switch on, to resume the
22+
system.
23+
DDR Backup Mode must be explicitly enabled by the user,
24+
to invoke step 1.
25+
See also Documentation/devicetree/bindings/mfd/bd9571mwv.txt.
26+
Users: User space applications for embedded boards equipped with a
27+
BD9571MWV PMIC.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
== Introduction==
2+
3+
LLCC (Last Level Cache Controller) provides last level of cache memory in SOC,
4+
that can be shared by multiple clients. Clients here are different cores in the
5+
SOC, the idea is to minimize the local caches at the clients and migrate to
6+
common pool of memory. Cache memory is divided into partitions called slices
7+
which are assigned to clients. Clients can query the slice details, activate
8+
and deactivate them.
9+
10+
Properties:
11+
- compatible:
12+
Usage: required
13+
Value type: <string>
14+
Definition: must be "qcom,sdm845-llcc"
15+
16+
- reg:
17+
Usage: required
18+
Value Type: <prop-encoded-array>
19+
Definition: Start address and the the size of the register region.
20+
21+
Example:
22+
23+
cache-controller@1100000 {
24+
compatible = "qcom,sdm845-llcc";
25+
reg = <0x1100000 0x250000>;
26+
};

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Requires node properties:
55
- "compatible" value one of:
66
"motorola,cpcap-regulator"
77
"motorola,mapphone-cpcap-regulator"
8+
"motorola,xoom-cpcap-regulator"
89

910
Required regulator properties:
1011
- "regulator-name"

‎Documentation/devicetree/bindings/regulator/pfuze100.txt‎

Lines changed: 85 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
PFUZE100 family of regulators
22

33
Required properties:
4-
- compatible: "fsl,pfuze100", "fsl,pfuze200", "fsl,pfuze3000"
4+
- compatible: "fsl,pfuze100", "fsl,pfuze200", "fsl,pfuze3000", "fsl,pfuze3001"
55
- reg: I2C slave address
66

7+
Optional properties:
8+
- fsl,pfuze-support-disable-sw: Boolean, if present disable all unused switch
9+
regulators to save power consumption. Attention, ensure that all important
10+
regulators (e.g. DDR ref, DDR supply) has set the "regulator-always-on"
11+
property. If not present, the switched regualtors are always on and can't be
12+
disabled. This binding is a workaround to keep backward compatibility with
13+
old dtb's which rely on the fact that the switched regulators are always on
14+
and don't mark them explicit as "regulator-always-on".
15+
716
Required child node:
817
- regulators: This is the list of child nodes that specify the regulator
918
initialization data for defined regulators. Please refer to below doc
@@ -16,6 +25,8 @@ Required child node:
1625
sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6,coin
1726
--PFUZE3000
1827
sw1a,sw1b,sw2,sw3,swbst,vsnvs,vrefddr,vldo1,vldo2,vccsd,v33,vldo3,vldo4
28+
--PFUZE3001
29+
sw1,sw2,sw3,vsnvs,vldo1,vldo2,vccsd,v33,vldo3,vldo4
1930

2031
Each regulator is defined using the standard binding for regulators.
2132

@@ -303,3 +314,76 @@ Example 3: PFUZE3000
303314
};
304315
};
305316
};
317+
318+
Example 4: PFUZE 3001
319+
320+
pfuze3001: pmic@8 {
321+
compatible = "fsl,pfuze3001";
322+
reg = <0x08>;
323+
324+
regulators {
325+
sw1_reg: sw1 {
326+
regulator-min-microvolt = <700000>;
327+
regulator-max-microvolt = <3300000>;
328+
regulator-boot-on;
329+
regulator-always-on;
330+
};
331+
332+
sw2_reg: sw2 {
333+
regulator-min-microvolt = <1500000>;
334+
regulator-max-microvolt = <3300000>;
335+
regulator-boot-on;
336+
regulator-always-on;
337+
};
338+
339+
sw3_reg: sw3 {
340+
regulator-min-microvolt = <900000>;
341+
regulator-max-microvolt = <1650000>;
342+
regulator-boot-on;
343+
regulator-always-on;
344+
};
345+
346+
snvs_reg: vsnvs {
347+
regulator-min-microvolt = <1000000>;
348+
regulator-max-microvolt = <3000000>;
349+
regulator-boot-on;
350+
regulator-always-on;
351+
};
352+
353+
vgen1_reg: vldo1 {
354+
regulator-min-microvolt = <1800000>;
355+
regulator-max-microvolt = <3300000>;
356+
regulator-always-on;
357+
};
358+
359+
vgen2_reg: vldo2 {
360+
regulator-min-microvolt = <800000>;
361+
regulator-max-microvolt = <1550000>;
362+
regulator-always-on;
363+
};
364+
365+
vgen3_reg: vccsd {
366+
regulator-min-microvolt = <2850000>;
367+
regulator-max-microvolt = <3300000>;
368+
regulator-always-on;
369+
};
370+
371+
vgen4_reg: v33 {
372+
regulator-min-microvolt = <2850000>;
373+
regulator-max-microvolt = <3300000>;
374+
regulator-always-on;
375+
};
376+
377+
vgen5_reg: vldo3 {
378+
regulator-min-microvolt = <1800000>;
379+
regulator-max-microvolt = <3300000>;
380+
regulator-always-on;
381+
};
382+
383+
vgen6_reg: vldo4 {
384+
regulator-min-microvolt = <1800000>;
385+
regulator-max-microvolt = <3300000>;
386+
regulator-always-on;
387+
};
388+
};
389+
};
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
Qualcomm Technologies, Inc. RPMh Regulators
2+
3+
rpmh-regulator devices support PMIC regulator management via the Voltage
4+
Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators. The APPS
5+
processor communicates with these hardware blocks via a Resource State
6+
Coordinator (RSC) using command packets. The VRM allows changing three
7+
parameters for a given regulator: enable state, output voltage, and operating
8+
mode. The XOB allows changing only a single parameter for a given regulator:
9+
its enable state. Despite its name, the XOB is capable of controlling the
10+
enable state of any PMIC peripheral. It is used for clock buffers, low-voltage
11+
switches, and LDO/SMPS regulators which have a fixed voltage and mode.
12+
13+
=======================
14+
Required Node Structure
15+
=======================
16+
17+
RPMh regulators must be described in two levels of device nodes. The first
18+
level describes the PMIC containing the regulators and must reside within an
19+
RPMh device node. The second level describes each regulator within the PMIC
20+
which is to be used on the board. Each of these regulators maps to a single
21+
RPMh resource.
22+
23+
The names used for regulator nodes must match those supported by a given PMIC.
24+
Supported regulator node names:
25+
PM8998: smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
26+
PMI8998: bob
27+
PM8005: smps1 - smps4
28+
29+
========================
30+
First Level Nodes - PMIC
31+
========================
32+
33+
- compatible
34+
Usage: required
35+
Value type: <string>
36+
Definition: Must be one of: "qcom,pm8998-rpmh-regulators",
37+
"qcom,pmi8998-rpmh-regulators" or
38+
"qcom,pm8005-rpmh-regulators".
39+
40+
- qcom,pmic-id
41+
Usage: required
42+
Value type: <string>
43+
Definition: RPMh resource name suffix used for the regulators found on
44+
this PMIC. Typical values: "a", "b", "c", "d", "e", "f".
45+
46+
- vdd-s1-supply
47+
- vdd-s2-supply
48+
- vdd-s3-supply
49+
- vdd-s4-supply
50+
Usage: optional (PM8998 and PM8005 only)
51+
Value type: <phandle>
52+
Definition: phandle of the parent supply regulator of one or more of the
53+
regulators for this PMIC.
54+
55+
- vdd-s5-supply
56+
- vdd-s6-supply
57+
- vdd-s7-supply
58+
- vdd-s8-supply
59+
- vdd-s9-supply
60+
- vdd-s10-supply
61+
- vdd-s11-supply
62+
- vdd-s12-supply
63+
- vdd-s13-supply
64+
- vdd-l1-l27-supply
65+
- vdd-l2-l8-l17-supply
66+
- vdd-l3-l11-supply
67+
- vdd-l4-l5-supply
68+
- vdd-l6-supply
69+
- vdd-l7-l12-l14-l15-supply
70+
- vdd-l9-supply
71+
- vdd-l10-l23-l25-supply
72+
- vdd-l13-l19-l21-supply
73+
- vdd-l16-l28-supply
74+
- vdd-l18-l22-supply
75+
- vdd-l20-l24-supply
76+
- vdd-l26-supply
77+
- vin-lvs-1-2-supply
78+
Usage: optional (PM8998 only)
79+
Value type: <phandle>
80+
Definition: phandle of the parent supply regulator of one or more of the
81+
regulators for this PMIC.
82+
83+
- vdd-bob-supply
84+
Usage: optional (PMI8998 only)
85+
Value type: <phandle>
86+
Definition: BOB regulator parent supply phandle
87+
88+
===============================
89+
Second Level Nodes - Regulators
90+
===============================
91+
92+
- qcom,always-wait-for-ack
93+
Usage: optional
94+
Value type: <empty>
95+
Definition: Boolean flag which indicates that the application processor
96+
must wait for an ACK or a NACK from RPMh for every request
97+
sent for this regulator including those which are for a
98+
strictly lower power state.
99+
100+
Other properties defined in Documentation/devicetree/bindings/regulator.txt
101+
may also be used. regulator-initial-mode and regulator-allowed-modes may be
102+
specified for VRM regulators using mode values from
103+
include/dt-bindings/regulator/qcom,rpmh-regulator.h. regulator-allow-bypass
104+
may be specified for BOB type regulators managed via VRM.
105+
regulator-allow-set-load may be specified for LDO type regulators managed via
106+
VRM.
107+
108+
========
109+
Examples
110+
========
111+
112+
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
113+
114+
&apps_rsc {
115+
pm8998-rpmh-regulators {
116+
compatible = "qcom,pm8998-rpmh-regulators";
117+
qcom,pmic-id = "a";
118+
119+
vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
120+
121+
smps2 {
122+
regulator-min-microvolt = <1100000>;
123+
regulator-max-microvolt = <1100000>;
124+
};
125+
126+
pm8998_s5: smps5 {
127+
regulator-min-microvolt = <1904000>;
128+
regulator-max-microvolt = <2040000>;
129+
};
130+
131+
ldo7 {
132+
regulator-min-microvolt = <1800000>;
133+
regulator-max-microvolt = <1800000>;
134+
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
135+
regulator-allowed-modes =
136+
<RPMH_REGULATOR_MODE_LPM
137+
RPMH_REGULATOR_MODE_HPM>;
138+
regulator-allow-set-load;
139+
};
140+
141+
lvs1 {
142+
regulator-min-microvolt = <1800000>;
143+
regulator-max-microvolt = <1800000>;
144+
};
145+
};
146+
147+
pmi8998-rpmh-regulators {
148+
compatible = "qcom,pmi8998-rpmh-regulators";
149+
qcom,pmic-id = "b";
150+
151+
bob {
152+
regulator-min-microvolt = <3312000>;
153+
regulator-max-microvolt = <3600000>;
154+
regulator-allowed-modes =
155+
<RPMH_REGULATOR_MODE_AUTO
156+
RPMH_REGULATOR_MODE_HPM>;
157+
regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
158+
};
159+
};
160+
};

‎Documentation/devicetree/bindings/regulator/rohm,bd71837-regulator.txt‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
ROHM BD71837 Power Management Integrated Circuit (PMIC) regulator bindings
22

3-
BD71837MWV is a programmable Power Management
4-
IC (PMIC) for powering single-core, dual-core, and
5-
quad-core SoC’s such as NXP-i.MX 8M. It is optimized
6-
for low BOM cost and compact solution footprint. It
7-
integrates 8 Buck regulators and 7 LDO’s to provide all
8-
the power rails required by the SoC and the commonly
9-
used peripherals.
10-
113
Required properties:
124
- regulator-name: should be "buck1", ..., "buck8" and "ldo1", ..., "ldo7"
135

0 commit comments

Comments
 (0)