Re: [PATCH] regulator: cpcap: Add basic regulator support

From: Rob Herring
Date: Wed Feb 01 2017 - 12:14:48 EST


On Mon, Jan 30, 2017 at 04:12:41PM -0800, Tony Lindgren wrote:
> Many Motorola phones like droid 4 are using a custom PMIC called CPCAP
> or 6556002. This PMIC is used with several SoCs, I've noticed at least
> omap3, omap4 and Tegra2 based Motorola phones and tablets using it.
>
> Cc: devicetree@xxxxxxxxxxxxxxx
> Cc: Marcel Partap <mpartap@xxxxxxx>
> Cc: Michael Scott <michael.scott@xxxxxxxxxx>
> Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
> ---
>
> With the cpcap core MFD driver now in Linux next as commit
> 3d66c8abc13e ("mfd: cpcap: Add minimal support"), here's a related
> regulator driver. This is needed to support more devices on droid 4,
> such as the LCD and touchscreen.
>
> ---
> .../bindings/regulator/cpcap-regulator.txt | 34 ++
> drivers/regulator/Kconfig | 7 +
> drivers/regulator/Makefile | 1 +
> drivers/regulator/cpcap-regulator.c | 517 +++++++++++++++++++++
> 4 files changed, 559 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
> create mode 100644 drivers/regulator/cpcap-regulator.c
>
> diff --git a/Documentation/devicetree/bindings/regulator/cpcap-regulator.txt b/Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
> @@ -0,0 +1,34 @@
> +Motorola CPCAP PMIC voltage regulators
> +------------------------------------
> +
> +Requires node properties:
> +- "compatible" value one of:
> + "motorola,cpcap-regulator"
> + "motorola,mapphone-cpcap-regulator"
> +
> +Required regulator properties:
> +- "regulator-name"
> +- "regulator-enable-ramp-delay"
> +- "regulator-min-microvolt"
> +- "regulator-max-microvolt"
> +
> +Optional regulator properties:
> +- "regulator-boot-on"
> +
> +See Documentation/devicetree/bindings/regulator/regulator.txt
> +for more details about the regulator properties.
> +
> +Example:
> +
> +cpcap_regulator: regulator@600 {

unit-address with no reg prop.

> + compatible = "motorola,cpcap-regulator";
> +
> + cpcap_regulators: regulators {
> + sw5: SW5 {
> + regulator-min-microvolt = <5050000>;
> + regulator-max-microvolt = <5050000>;
> + regulator-enable-ramp-delay = <50000>;
> + regulator-boot-on;
> + };
> + };
> +};