Skip to contentSkip to conversation

regulator: cpcap: Add basic regulator support

PATCH In review Tony Lindgren 3 participants 3 messages Feb 2, 2017 – Feb 6, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 regulator: cpcap: Add basic regulator support

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 Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Rob Herring <[email protected]>

---

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.

Changes since v1:

- Use standard regulator sel_regmap functions and drop the pointless custom implementations as commented by Mark Brown

- Fix unit-address with no reg property as commented by Rob Herring

---
 .../bindings/regulator/cpcap-regulator.txt         |  34 ++
 drivers/regulator/Kconfig                          |   7 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/cpcap-regulator.c                | 464 +++++++++++++++++++++
 4 files changed, 506 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
 create mode 100644 drivers/regulator/cpcap-regulator.c
Documentation/devicetree/bindings/regulator/cpcap-regulator.txt new file +34 -0
new file mode 100644
@@ -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 {
+	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;
+		};
+	};
+};
drivers/regulator/Kconfig +7 -0
@@ -163,6 +163,13 @@ config REGULATOR_BCM590XX
 	  BCM590xx PMUs. This will enable support for the software
 	  controllable LDO/Switching regulators.
 
+config REGULATOR_CPCAP
+	tristate "Motorola CPCAP regulator"
+	depends on MFD_CPCAP
+	help
+	  Say y here for CPCAP regulator found on some Motorola phones
+	  and tablets such as Droid 4.
+
 config REGULATOR_DA903X
 	tristate "Dialog Semiconductor DA9030/DA9034 regulators"
 	depends on PMIC_DA903X
drivers/regulator/Makefile +1 -0
@@ -11,6 +11,7 @@ obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
 
 obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o
 obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o
+obj-$(CONFIG_REGULATOR_CPCAP) += cpcap-regulator.o
 obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
 obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
 obj-$(CONFIG_REGULATOR_AB8500)	+= ab8500-ext.o ab8500.o
drivers/regulator/cpcap-regulator.c new file +464 -0

464 lines not on this page · raw message

Signature · 1 line
2.11.0
maintainer
#1 lore raw

Applied "regulator: cpcap: Add basic regulator support" to the regulator tree

The patch

regulator: cpcap: Add basic regulator support

has been applied to the regulator tree at

git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From 0ad4c07edd413cb64abed217355d51af3649c5a3 Mon Sep 17 00:00:00 2001

From: Tony Lindgren <[email protected]>
Date: Thu, 2 Feb 2017 15:43:57 -0800
Subject: [PATCH] regulator: cpcap: Add basic regulator support

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.

---
 .../bindings/regulator/cpcap-regulator.txt         |  34 ++
 drivers/regulator/Kconfig                          |   7 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/cpcap-regulator.c                | 464 +++++++++++++++++++++
 4 files changed, 506 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
 create mode 100644 drivers/regulator/cpcap-regulator.c
Documentation/devicetree/bindings/regulator/cpcap-regulator.txt new file +34 -0
new file mode 100644
index 000000000000..675f4437ce92
@@ -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 {
+	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;
+		};
+	};
+};
drivers/regulator/Kconfig +7 -0
index 936f7ccc9736..be06eb29c681 100644
@@ -163,6 +163,13 @@ config REGULATOR_BCM590XX
 	  BCM590xx PMUs. This will enable support for the software
 	  controllable LDO/Switching regulators.
 
+config REGULATOR_CPCAP
+	tristate "Motorola CPCAP regulator"
+	depends on MFD_CPCAP
+	help
+	  Say y here for CPCAP regulator found on some Motorola phones
+	  and tablets such as Droid 4.
+
 config REGULATOR_DA903X
 	tristate "Dialog Semiconductor DA9030/DA9034 regulators"
 	depends on PMIC_DA903X
drivers/regulator/Makefile +1 -0
index 14294692beb9..ef7725e2592a 100644
@@ -11,6 +11,7 @@ obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
 
 obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o
 obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o
+obj-$(CONFIG_REGULATOR_CPCAP) += cpcap-regulator.o
 obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
 obj-$(CONFIG_REGULATOR_AB3100) += ab3100.o
 obj-$(CONFIG_REGULATOR_AB8500)	+= ab8500-ext.o ab8500.o
drivers/regulator/cpcap-regulator.c new file +464 -0

464 lines not on this page · raw message

Signature · 6 lines
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v2 1/1
#2 lore raw
In reply to Tony Lindgren
Quoted 18 lines · Tony Lindgren

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 Marcel Partap <[email protected]>
Cc Michael Scott <[email protected]>
Cc Rob Herring <[email protected]>

---

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.

Changes since v1:

Quoted 7 lines

- Use standard regulator sel_regmap functions and drop the pointless custom implementations as commented by Mark Brown

- Fix unit-address with no reg property as commented by Rob Herring

---
 .../bindings/regulator/cpcap-regulator.txt         |  34 ++
Quoted 6 lines
 drivers/regulator/Kconfig                          |   7 +
 drivers/regulator/Makefile                         |   1 +
 drivers/regulator/cpcap-regulator.c                | 464 +++++++++++++++++++++
 4 files changed, 506 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/regulator/cpcap-regulator.txt
 create mode 100644 drivers/regulator/cpcap-regulator.c

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html