xref: /freebsd/sys/contrib/device-tree/Bindings/regulator/qcom,rpmh-regulator.txt (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1Qualcomm Technologies, Inc. RPMh Regulators
2
3rpmh-regulator devices support PMIC regulator management via the Voltage
4Regulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators.  The APPS
5processor communicates with these hardware blocks via a Resource State
6Coordinator (RSC) using command packets.  The VRM allows changing three
7parameters for a given regulator: enable state, output voltage, and operating
8mode.  The XOB allows changing only a single parameter for a given regulator:
9its enable state.  Despite its name, the XOB is capable of controlling the
10enable state of any PMIC peripheral.  It is used for clock buffers, low-voltage
11switches, and LDO/SMPS regulators which have a fixed voltage and mode.
12
13=======================
14Required Node Structure
15=======================
16
17RPMh regulators must be described in two levels of device nodes.  The first
18level describes the PMIC containing the regulators and must reside within an
19RPMh device node.  The second level describes each regulator within the PMIC
20which is to be used on the board.  Each of these regulators maps to a single
21RPMh resource.
22
23The names used for regulator nodes must match those supported by a given PMIC.
24Supported regulator node names:
25	PM8005:		smps1 - smps4
26	PM8009:		smps1 - smps2, ldo1 - ldo7
27	PM8150:		smps1 - smps10, ldo1 - ldo18
28	PM8150L:	smps1 - smps8, ldo1 - ldo11, bob, flash, rgb
29	PM8350:		smps1 - smps12, ldo1 - ldo10,
30	PM8350C:	smps1 - smps10, ldo1 - ldo13, bob
31	PM8998:		smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2
32	PMI8998:	bob
33	PM6150:         smps1 - smps5, ldo1 - ldo19
34	PM6150L:        smps1 - smps8, ldo1 - ldo11, bob
35	PMX55:		smps1 - smps7, ldo1 - ldo16
36
37========================
38First Level Nodes - PMIC
39========================
40
41- compatible
42	Usage:      required
43	Value type: <string>
44	Definition: Must be one of below:
45		    "qcom,pm8005-rpmh-regulators"
46		    "qcom,pm8009-rpmh-regulators"
47		    "qcom,pm8009-1-rpmh-regulators"
48		    "qcom,pm8150-rpmh-regulators"
49		    "qcom,pm8150l-rpmh-regulators"
50		    "qcom,pm8350-rpmh-regulators"
51		    "qcom,pm8350c-rpmh-regulators"
52		    "qcom,pm8998-rpmh-regulators"
53		    "qcom,pmc8180-rpmh-regulators"
54		    "qcom,pmc8180c-rpmh-regulators"
55		    "qcom,pmi8998-rpmh-regulators"
56		    "qcom,pm6150-rpmh-regulators"
57		    "qcom,pm6150l-rpmh-regulators"
58		    "qcom,pmx55-rpmh-regulators"
59
60- qcom,pmic-id
61	Usage:      required
62	Value type: <string>
63	Definition: RPMh resource name suffix used for the regulators found on
64		    this PMIC.  Typical values: "a", "b", "c", "d", "e", "f".
65
66- vdd-s1-supply
67- vdd-s2-supply
68- vdd-s3-supply
69- vdd-s4-supply
70	Usage:      optional (PM8998 and PM8005 only)
71	Value type: <phandle>
72	Definition: phandle of the parent supply regulator of one or more of the
73		    regulators for this PMIC.
74
75- vdd-s5-supply
76- vdd-s6-supply
77- vdd-s7-supply
78- vdd-s8-supply
79- vdd-s9-supply
80- vdd-s10-supply
81- vdd-s11-supply
82- vdd-s12-supply
83- vdd-s13-supply
84- vdd-l1-l27-supply
85- vdd-l2-l8-l17-supply
86- vdd-l3-l11-supply
87- vdd-l4-l5-supply
88- vdd-l6-supply
89- vdd-l7-l12-l14-l15-supply
90- vdd-l9-supply
91- vdd-l10-l23-l25-supply
92- vdd-l13-l19-l21-supply
93- vdd-l16-l28-supply
94- vdd-l18-l22-supply
95- vdd-l20-l24-supply
96- vdd-l26-supply
97- vin-lvs-1-2-supply
98	Usage:      optional (PM8998 only)
99	Value type: <phandle>
100	Definition: phandle of the parent supply regulator of one or more of the
101		    regulators for this PMIC.
102
103- vdd-bob-supply
104	Usage:      optional (PMI8998 only)
105	Value type: <phandle>
106	Definition: BOB regulator parent supply phandle
107
108===============================
109Second Level Nodes - Regulators
110===============================
111
112- qcom,always-wait-for-ack
113	Usage:      optional
114	Value type: <empty>
115	Definition: Boolean flag which indicates that the application processor
116		    must wait for an ACK or a NACK from RPMh for every request
117		    sent for this regulator including those which are for a
118		    strictly lower power state.
119
120Other properties defined in Documentation/devicetree/bindings/regulator/regulator.txt
121may also be used.  regulator-initial-mode and regulator-allowed-modes may be
122specified for VRM regulators using mode values from
123include/dt-bindings/regulator/qcom,rpmh-regulator.h.  regulator-allow-bypass
124may be specified for BOB type regulators managed via VRM.
125regulator-allow-set-load may be specified for LDO type regulators managed via
126VRM.
127
128========
129Examples
130========
131
132#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
133
134&apps_rsc {
135	pm8998-rpmh-regulators {
136		compatible = "qcom,pm8998-rpmh-regulators";
137		qcom,pmic-id = "a";
138
139		vdd-l7-l12-l14-l15-supply = <&pm8998_s5>;
140
141		smps2 {
142			regulator-min-microvolt = <1100000>;
143			regulator-max-microvolt = <1100000>;
144		};
145
146		pm8998_s5: smps5 {
147			regulator-min-microvolt = <1904000>;
148			regulator-max-microvolt = <2040000>;
149		};
150
151		ldo7 {
152			regulator-min-microvolt = <1800000>;
153			regulator-max-microvolt = <1800000>;
154			regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
155			regulator-allowed-modes =
156				<RPMH_REGULATOR_MODE_LPM
157				 RPMH_REGULATOR_MODE_HPM>;
158			regulator-allow-set-load;
159		};
160
161		lvs1 {
162			regulator-min-microvolt = <1800000>;
163			regulator-max-microvolt = <1800000>;
164		};
165	};
166
167	pmi8998-rpmh-regulators {
168		compatible = "qcom,pmi8998-rpmh-regulators";
169		qcom,pmic-id = "b";
170
171		bob {
172			regulator-min-microvolt = <3312000>;
173			regulator-max-microvolt = <3600000>;
174			regulator-allowed-modes =
175				<RPMH_REGULATOR_MODE_AUTO
176				 RPMH_REGULATOR_MODE_HPM>;
177			regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>;
178		};
179	};
180};
181