18c2ecf20Sopenharmony_ciQualcomm Technologies, Inc. RPMh Regulators 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_cirpmh-regulator devices support PMIC regulator management via the Voltage 48c2ecf20Sopenharmony_ciRegulator Manager (VRM) and Oscillator Buffer (XOB) RPMh accelerators. The APPS 58c2ecf20Sopenharmony_ciprocessor communicates with these hardware blocks via a Resource State 68c2ecf20Sopenharmony_ciCoordinator (RSC) using command packets. The VRM allows changing three 78c2ecf20Sopenharmony_ciparameters for a given regulator: enable state, output voltage, and operating 88c2ecf20Sopenharmony_cimode. The XOB allows changing only a single parameter for a given regulator: 98c2ecf20Sopenharmony_ciits enable state. Despite its name, the XOB is capable of controlling the 108c2ecf20Sopenharmony_cienable state of any PMIC peripheral. It is used for clock buffers, low-voltage 118c2ecf20Sopenharmony_ciswitches, and LDO/SMPS regulators which have a fixed voltage and mode. 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci======================= 148c2ecf20Sopenharmony_ciRequired Node Structure 158c2ecf20Sopenharmony_ci======================= 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ciRPMh regulators must be described in two levels of device nodes. The first 188c2ecf20Sopenharmony_cilevel describes the PMIC containing the regulators and must reside within an 198c2ecf20Sopenharmony_ciRPMh device node. The second level describes each regulator within the PMIC 208c2ecf20Sopenharmony_ciwhich is to be used on the board. Each of these regulators maps to a single 218c2ecf20Sopenharmony_ciRPMh resource. 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciThe names used for regulator nodes must match those supported by a given PMIC. 248c2ecf20Sopenharmony_ciSupported regulator node names: 258c2ecf20Sopenharmony_ci PM8005: smps1 - smps4 268c2ecf20Sopenharmony_ci PM8009: smps1 - smps2, ldo1 - ldo7 278c2ecf20Sopenharmony_ci PM8150: smps1 - smps10, ldo1 - ldo18 288c2ecf20Sopenharmony_ci PM8150L: smps1 - smps8, ldo1 - ldo11, bob, flash, rgb 298c2ecf20Sopenharmony_ci PM8998: smps1 - smps13, ldo1 - ldo28, lvs1 - lvs2 308c2ecf20Sopenharmony_ci PMI8998: bob 318c2ecf20Sopenharmony_ci PM6150: smps1 - smps5, ldo1 - ldo19 328c2ecf20Sopenharmony_ci PM6150L: smps1 - smps8, ldo1 - ldo11, bob 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci======================== 358c2ecf20Sopenharmony_ciFirst Level Nodes - PMIC 368c2ecf20Sopenharmony_ci======================== 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ci- compatible 398c2ecf20Sopenharmony_ci Usage: required 408c2ecf20Sopenharmony_ci Value type: <string> 418c2ecf20Sopenharmony_ci Definition: Must be one of below: 428c2ecf20Sopenharmony_ci "qcom,pm8005-rpmh-regulators" 438c2ecf20Sopenharmony_ci "qcom,pm8009-rpmh-regulators" 448c2ecf20Sopenharmony_ci "qcom,pm8150-rpmh-regulators" 458c2ecf20Sopenharmony_ci "qcom,pm8150l-rpmh-regulators" 468c2ecf20Sopenharmony_ci "qcom,pm8998-rpmh-regulators" 478c2ecf20Sopenharmony_ci "qcom,pmi8998-rpmh-regulators" 488c2ecf20Sopenharmony_ci "qcom,pm6150-rpmh-regulators" 498c2ecf20Sopenharmony_ci "qcom,pm6150l-rpmh-regulators" 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci- qcom,pmic-id 528c2ecf20Sopenharmony_ci Usage: required 538c2ecf20Sopenharmony_ci Value type: <string> 548c2ecf20Sopenharmony_ci Definition: RPMh resource name suffix used for the regulators found on 558c2ecf20Sopenharmony_ci this PMIC. Typical values: "a", "b", "c", "d", "e", "f". 568c2ecf20Sopenharmony_ci 578c2ecf20Sopenharmony_ci- vdd-s1-supply 588c2ecf20Sopenharmony_ci- vdd-s2-supply 598c2ecf20Sopenharmony_ci- vdd-s3-supply 608c2ecf20Sopenharmony_ci- vdd-s4-supply 618c2ecf20Sopenharmony_ci Usage: optional (PM8998 and PM8005 only) 628c2ecf20Sopenharmony_ci Value type: <phandle> 638c2ecf20Sopenharmony_ci Definition: phandle of the parent supply regulator of one or more of the 648c2ecf20Sopenharmony_ci regulators for this PMIC. 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci- vdd-s5-supply 678c2ecf20Sopenharmony_ci- vdd-s6-supply 688c2ecf20Sopenharmony_ci- vdd-s7-supply 698c2ecf20Sopenharmony_ci- vdd-s8-supply 708c2ecf20Sopenharmony_ci- vdd-s9-supply 718c2ecf20Sopenharmony_ci- vdd-s10-supply 728c2ecf20Sopenharmony_ci- vdd-s11-supply 738c2ecf20Sopenharmony_ci- vdd-s12-supply 748c2ecf20Sopenharmony_ci- vdd-s13-supply 758c2ecf20Sopenharmony_ci- vdd-l1-l27-supply 768c2ecf20Sopenharmony_ci- vdd-l2-l8-l17-supply 778c2ecf20Sopenharmony_ci- vdd-l3-l11-supply 788c2ecf20Sopenharmony_ci- vdd-l4-l5-supply 798c2ecf20Sopenharmony_ci- vdd-l6-supply 808c2ecf20Sopenharmony_ci- vdd-l7-l12-l14-l15-supply 818c2ecf20Sopenharmony_ci- vdd-l9-supply 828c2ecf20Sopenharmony_ci- vdd-l10-l23-l25-supply 838c2ecf20Sopenharmony_ci- vdd-l13-l19-l21-supply 848c2ecf20Sopenharmony_ci- vdd-l16-l28-supply 858c2ecf20Sopenharmony_ci- vdd-l18-l22-supply 868c2ecf20Sopenharmony_ci- vdd-l20-l24-supply 878c2ecf20Sopenharmony_ci- vdd-l26-supply 888c2ecf20Sopenharmony_ci- vin-lvs-1-2-supply 898c2ecf20Sopenharmony_ci Usage: optional (PM8998 only) 908c2ecf20Sopenharmony_ci Value type: <phandle> 918c2ecf20Sopenharmony_ci Definition: phandle of the parent supply regulator of one or more of the 928c2ecf20Sopenharmony_ci regulators for this PMIC. 938c2ecf20Sopenharmony_ci 948c2ecf20Sopenharmony_ci- vdd-bob-supply 958c2ecf20Sopenharmony_ci Usage: optional (PMI8998 only) 968c2ecf20Sopenharmony_ci Value type: <phandle> 978c2ecf20Sopenharmony_ci Definition: BOB regulator parent supply phandle 988c2ecf20Sopenharmony_ci 998c2ecf20Sopenharmony_ci=============================== 1008c2ecf20Sopenharmony_ciSecond Level Nodes - Regulators 1018c2ecf20Sopenharmony_ci=============================== 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ci- qcom,always-wait-for-ack 1048c2ecf20Sopenharmony_ci Usage: optional 1058c2ecf20Sopenharmony_ci Value type: <empty> 1068c2ecf20Sopenharmony_ci Definition: Boolean flag which indicates that the application processor 1078c2ecf20Sopenharmony_ci must wait for an ACK or a NACK from RPMh for every request 1088c2ecf20Sopenharmony_ci sent for this regulator including those which are for a 1098c2ecf20Sopenharmony_ci strictly lower power state. 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ciOther properties defined in Documentation/devicetree/bindings/regulator/regulator.txt 1128c2ecf20Sopenharmony_cimay also be used. regulator-initial-mode and regulator-allowed-modes may be 1138c2ecf20Sopenharmony_cispecified for VRM regulators using mode values from 1148c2ecf20Sopenharmony_ciinclude/dt-bindings/regulator/qcom,rpmh-regulator.h. regulator-allow-bypass 1158c2ecf20Sopenharmony_cimay be specified for BOB type regulators managed via VRM. 1168c2ecf20Sopenharmony_ciregulator-allow-set-load may be specified for LDO type regulators managed via 1178c2ecf20Sopenharmony_ciVRM. 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ci======== 1208c2ecf20Sopenharmony_ciExamples 1218c2ecf20Sopenharmony_ci======== 1228c2ecf20Sopenharmony_ci 1238c2ecf20Sopenharmony_ci#include <dt-bindings/regulator/qcom,rpmh-regulator.h> 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ci&apps_rsc { 1268c2ecf20Sopenharmony_ci pm8998-rpmh-regulators { 1278c2ecf20Sopenharmony_ci compatible = "qcom,pm8998-rpmh-regulators"; 1288c2ecf20Sopenharmony_ci qcom,pmic-id = "a"; 1298c2ecf20Sopenharmony_ci 1308c2ecf20Sopenharmony_ci vdd-l7-l12-l14-l15-supply = <&pm8998_s5>; 1318c2ecf20Sopenharmony_ci 1328c2ecf20Sopenharmony_ci smps2 { 1338c2ecf20Sopenharmony_ci regulator-min-microvolt = <1100000>; 1348c2ecf20Sopenharmony_ci regulator-max-microvolt = <1100000>; 1358c2ecf20Sopenharmony_ci }; 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci pm8998_s5: smps5 { 1388c2ecf20Sopenharmony_ci regulator-min-microvolt = <1904000>; 1398c2ecf20Sopenharmony_ci regulator-max-microvolt = <2040000>; 1408c2ecf20Sopenharmony_ci }; 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci ldo7 { 1438c2ecf20Sopenharmony_ci regulator-min-microvolt = <1800000>; 1448c2ecf20Sopenharmony_ci regulator-max-microvolt = <1800000>; 1458c2ecf20Sopenharmony_ci regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; 1468c2ecf20Sopenharmony_ci regulator-allowed-modes = 1478c2ecf20Sopenharmony_ci <RPMH_REGULATOR_MODE_LPM 1488c2ecf20Sopenharmony_ci RPMH_REGULATOR_MODE_HPM>; 1498c2ecf20Sopenharmony_ci regulator-allow-set-load; 1508c2ecf20Sopenharmony_ci }; 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci lvs1 { 1538c2ecf20Sopenharmony_ci regulator-min-microvolt = <1800000>; 1548c2ecf20Sopenharmony_ci regulator-max-microvolt = <1800000>; 1558c2ecf20Sopenharmony_ci }; 1568c2ecf20Sopenharmony_ci }; 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci pmi8998-rpmh-regulators { 1598c2ecf20Sopenharmony_ci compatible = "qcom,pmi8998-rpmh-regulators"; 1608c2ecf20Sopenharmony_ci qcom,pmic-id = "b"; 1618c2ecf20Sopenharmony_ci 1628c2ecf20Sopenharmony_ci bob { 1638c2ecf20Sopenharmony_ci regulator-min-microvolt = <3312000>; 1648c2ecf20Sopenharmony_ci regulator-max-microvolt = <3600000>; 1658c2ecf20Sopenharmony_ci regulator-allowed-modes = 1668c2ecf20Sopenharmony_ci <RPMH_REGULATOR_MODE_AUTO 1678c2ecf20Sopenharmony_ci RPMH_REGULATOR_MODE_HPM>; 1688c2ecf20Sopenharmony_ci regulator-initial-mode = <RPMH_REGULATOR_MODE_AUTO>; 1698c2ecf20Sopenharmony_ci }; 1708c2ecf20Sopenharmony_ci }; 1718c2ecf20Sopenharmony_ci}; 172