arm/dt: msmcopper: Add PMIC PM8941 and PM8841 regulator devices
Add devices to be used by the upcoming qpnp-regulator driver.
Use the Device Tree bindings established by the community for
basic configuration and regulator features. Also make use of
new bindings that are specific to regulators found in the
Qualcomm plug-and-play (QPNP) family of PMICs.
The new dtsi files are arranged so that parameters can be
overriden in convenient ways. msm-pm8841.dtsi and
msm-pm8941.dtsi contain the platform independent characteristics
for each of the PMIC regulator devices. This includes the SPMI
base register for each regulator device, its name, its compatible
string, and its status.
The next file, msmcopper-regulator.dtsi, then fills in platform
dependent regulator configurations for the copper platform. This
includes min/max voltage constraints, parent regulator, and
various qpnp-regulator parameters. The status parameter is also
specified in msmcopper-regulator.dtsi for each regulator device.
The value of status is deliberately overridden between
msm-pm8841.dtsi/msm-pm8941.dtsi and msmcopper-regulator.dtsi so
that devices are only added for regulators which should be
controlled via the qpnp-regulator driver. Overridding works here
thanks to the order that these dtsi files are included in
msmcopper.dtsi. When parsing a file from top to bottom, the last
value specified for a given parameter is the one that ends up in
the dtb file.
The intention here is that RPM controlled regulators will be
defined in a manner similar to the QPNP controlled regulators.
Only the actively used devices will be configured via
msmcopper-regulator.dtsi with status="okay".
When switching a given regulator device from QPNP to RPM control,
modifications are only needed in msmcopper-regulator.dtsi. The
phandles used by regulator consumers to identify their supplies
will not need to be modified to handle this transition.
Change-Id: I317de33bf16ddf3eab339f1e7213b116fe4c6e6f
Signed-off-by: David Collins <collinsd@codeaurora.org>
5 files changed